filefive 2.0.2 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -0
- package/dist/App.js +9 -11
- package/dist/Connection.js +13 -12
- package/dist/FileWatcher.js +1 -1
- package/dist/Local.js +11 -5
- package/dist/LocalWatcher.js +5 -2
- package/dist/Password.js +2 -2
- package/dist/Queue.js +12 -7
- package/dist/RemoteFiles.js +7 -2
- package/dist/commands/clear.js +5 -1
- package/dist/commands/connect.js +16 -6
- package/dist/commands/copy.js +3 -3
- package/dist/commands/disconnect.js +2 -0
- package/dist/commands/duplicate.js +1 -1
- package/dist/commands/mkdir.js +10 -3
- package/dist/commands/remove.js +1 -1
- package/dist/commands/rename.js +1 -1
- package/dist/commands/saveConnection.js +3 -0
- package/dist/commands/write.js +1 -1
- package/dist/events.js +10 -0
- package/dist/fs/S3.js +8 -7
- package/dist/fs/SFtp.js +5 -3
- package/dist/index.js +6 -5
- package/dist/log.js +5 -2
- package/dist/plugins/mirror/commands.js +185 -0
- package/dist/plugins/mirror/sessions.js +26 -0
- package/dist/plugins/mirror/watchers.js +4 -0
- package/dist/public/assets/android-chrome-144x144.png +0 -0
- package/dist/public/assets/android-chrome-192x192.png +0 -0
- package/dist/public/assets/android-chrome-256x256.png +0 -0
- package/dist/public/assets/android-chrome-36x36.png +0 -0
- package/dist/public/assets/android-chrome-384x384.png +0 -0
- package/dist/public/assets/android-chrome-48x48.png +0 -0
- package/dist/public/assets/android-chrome-512x512.png +0 -0
- package/dist/public/assets/android-chrome-72x72.png +0 -0
- package/dist/public/assets/android-chrome-96x96.png +0 -0
- package/dist/public/assets/apple-touch-icon-1024x1024.png +0 -0
- package/dist/public/assets/apple-touch-icon-114x114.png +0 -0
- package/dist/public/assets/apple-touch-icon-120x120.png +0 -0
- package/dist/public/assets/apple-touch-icon-144x144.png +0 -0
- package/dist/public/assets/apple-touch-icon-152x152.png +0 -0
- package/dist/public/assets/apple-touch-icon-167x167.png +0 -0
- package/dist/public/assets/apple-touch-icon-180x180.png +0 -0
- package/dist/public/assets/apple-touch-icon-57x57.png +0 -0
- package/dist/public/assets/apple-touch-icon-60x60.png +0 -0
- package/dist/public/assets/apple-touch-icon-72x72.png +0 -0
- package/dist/public/assets/apple-touch-icon-76x76.png +0 -0
- package/dist/public/assets/apple-touch-icon-precomposed.png +0 -0
- package/dist/public/assets/apple-touch-icon.png +0 -0
- package/dist/public/assets/apple-touch-startup-image-1125x2436.png +0 -0
- package/dist/public/assets/apple-touch-startup-image-1136x640.png +0 -0
- package/dist/public/assets/apple-touch-startup-image-1170x2532.png +0 -0
- package/dist/public/assets/apple-touch-startup-image-1179x2556.png +0 -0
- package/dist/public/assets/apple-touch-startup-image-1242x2208.png +0 -0
- package/dist/public/assets/apple-touch-startup-image-1242x2688.png +0 -0
- package/dist/public/assets/apple-touch-startup-image-1284x2778.png +0 -0
- package/dist/public/assets/apple-touch-startup-image-1290x2796.png +0 -0
- package/dist/public/assets/apple-touch-startup-image-1334x750.png +0 -0
- package/dist/public/assets/apple-touch-startup-image-1488x2266.png +0 -0
- package/dist/public/assets/apple-touch-startup-image-1536x2048.png +0 -0
- package/dist/public/assets/apple-touch-startup-image-1620x2160.png +0 -0
- package/dist/public/assets/apple-touch-startup-image-1640x2160.png +0 -0
- package/dist/public/assets/apple-touch-startup-image-1668x2224.png +0 -0
- package/dist/public/assets/apple-touch-startup-image-1668x2388.png +0 -0
- package/dist/public/assets/apple-touch-startup-image-1792x828.png +0 -0
- package/dist/public/assets/apple-touch-startup-image-2048x1536.png +0 -0
- package/dist/public/assets/apple-touch-startup-image-2048x2732.png +0 -0
- package/dist/public/assets/apple-touch-startup-image-2160x1620.png +0 -0
- package/dist/public/assets/apple-touch-startup-image-2160x1640.png +0 -0
- package/dist/public/assets/apple-touch-startup-image-2208x1242.png +0 -0
- package/dist/public/assets/apple-touch-startup-image-2224x1668.png +0 -0
- package/dist/public/assets/apple-touch-startup-image-2266x1488.png +0 -0
- package/dist/public/assets/apple-touch-startup-image-2388x1668.png +0 -0
- package/dist/public/assets/apple-touch-startup-image-2436x1125.png +0 -0
- package/dist/public/assets/apple-touch-startup-image-2532x1170.png +0 -0
- package/dist/public/assets/apple-touch-startup-image-2556x1179.png +0 -0
- package/dist/public/assets/apple-touch-startup-image-2688x1242.png +0 -0
- package/dist/public/assets/apple-touch-startup-image-2732x2048.png +0 -0
- package/dist/public/assets/apple-touch-startup-image-2778x1284.png +0 -0
- package/dist/public/assets/apple-touch-startup-image-2796x1290.png +0 -0
- package/dist/public/assets/apple-touch-startup-image-640x1136.png +0 -0
- package/dist/public/assets/apple-touch-startup-image-750x1334.png +0 -0
- package/dist/public/assets/apple-touch-startup-image-828x1792.png +0 -0
- package/dist/public/assets/favicon-16x16.png +0 -0
- package/dist/public/assets/favicon-32x32.png +0 -0
- package/dist/public/assets/favicon-48x48.png +0 -0
- package/dist/public/assets/mstile-144x144.png +0 -0
- package/dist/public/assets/mstile-150x150.png +0 -0
- package/dist/public/assets/mstile-310x150.png +0 -0
- package/dist/public/assets/mstile-310x310.png +0 -0
- package/dist/public/assets/mstile-70x70.png +0 -0
- package/dist/public/assets/yandex-browser-50x50.png +0 -0
- package/dist/public/index.js +2 -1
- package/dist/public/index.js.map +1 -0
- package/dist/queues/Duplicate.js +1 -1
- package/dist/queues/Queue.js +12 -14
- package/dist/queues/Remove.js +3 -1
- package/dist/transformers/git.js +54 -28
- package/dist/types.js +9 -1
- package/dist/utils/ReferenceCountMap.js +3 -3
- package/dist/utils/URI.js +5 -3
- package/dist/utils/filter.js +31 -0
- package/package.json +22 -19
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","mappings":";AAGA","sources":["webpack://f5-frontend/./src/assets/git.css","webpack://f5-frontend/./src/assets/styles.css","webpack://f5-frontend/./src/assets/themes/black.css","webpack://f5-frontend/./src/assets/themes/blue.css","webpack://f5-frontend/./src/assets/themes/green.css","webpack://f5-frontend/./src/assets/themes/pink.css","webpack://f5-frontend/./src/ui/styles.css","webpack://f5-frontend/./src/ui/components/Button/Button.module.less","webpack://f5-frontend/./src/ui/components/Checkbox/Checkbox.module.less","webpack://f5-frontend/./src/ui/components/CircleProgress/CircleProgress.module.less","webpack://f5-frontend/./src/ui/components/Menu/Menu.module.less","webpack://f5-frontend/./src/ui/components/Modal/Modal.module.less","webpack://f5-frontend/./src/ui/components/Password/Password.module.less","webpack://f5-frontend/./src/ui/components/Popover/Popover.module.less","webpack://f5-frontend/./src/ui/components/Progress/Progress.module.less","webpack://f5-frontend/./src/ui/components/Select/Select.module.less","webpack://f5-frontend/./src/ui/components/Spinner/Spinner.module.less","webpack://f5-frontend/./src/ui/components/Split/Split.module.less","webpack://f5-frontend/./src/ui/components/Switch/Switch.module.less","webpack://f5-frontend/./src/ui/components/Tooltips/Tooltip.module.less","webpack://f5-frontend/./src/components/App/App.less","webpack://f5-frontend/./src/components/Breadcrumbs/Breadcrumbs.less","webpack://f5-frontend/./src/components/Connections/Connections.less","webpack://f5-frontend/./src/components/EditFileName/EditFileName.less","webpack://f5-frontend/./src/components/Error/Error.less","webpack://f5-frontend/./src/components/Explorer/Explorer.less","webpack://f5-frontend/./src/components/Filter/Filter.less","webpack://f5-frontend/./src/components/List/List.less","webpack://f5-frontend/./src/components/Path/Path.less","webpack://f5-frontend/./src/components/Queue/Queue.less","webpack://f5-frontend/./src/components/QueueAction/QueueAction.less","webpack://f5-frontend/./src/components/Toolbar/Toolbar.less","webpack://f5-frontend/./src/components/Workspace/Workspace.less","webpack://f5-frontend/./src/modals/Connection/Connection.less","webpack://f5-frontend/./src/modals/Password/Password.less","webpack://f5-frontend/./src/modals/Settings/Settings.less","webpack://f5-frontend/./src/plugins/mirror/Create/Create.less","webpack://f5-frontend/./src/plugins/mirror/List/List.less","webpack://f5-frontend/./node_modules/css-loader/dist/runtime/api.js","webpack://f5-frontend/./node_modules/css-loader/dist/runtime/getUrl.js","webpack://f5-frontend/./node_modules/css-loader/dist/runtime/noSourceMaps.js","webpack://f5-frontend/./node_modules/numeral/numeral.js","webpack://f5-frontend/./node_modules/punycode/punycode.es6.js","webpack://f5-frontend/./node_modules/react-dom/cjs/react-dom-client.production.js","webpack://f5-frontend/./node_modules/react-dom/cjs/react-dom.production.js","webpack://f5-frontend/./node_modules/react-dom/client.js","webpack://f5-frontend/./node_modules/react-dom/index.js","webpack://f5-frontend/./node_modules/react/cjs/react.production.js","webpack://f5-frontend/./node_modules/react/index.js","webpack://f5-frontend/./node_modules/scheduler/cjs/scheduler.production.js","webpack://f5-frontend/./node_modules/scheduler/index.js","webpack://f5-frontend/./node_modules/tr46/index.js","webpack://f5-frontend/./node_modules/tr46/lib/regexes.js","webpack://f5-frontend/./node_modules/tr46/lib/statusMapping.js","webpack://f5-frontend/./src/shared/types.ts","webpack://f5-frontend/./node_modules/tslib/tslib.es6.mjs","webpack://f5-frontend/./node_modules/rxjs/dist/esm5/internal/util/isFunction.js","webpack://f5-frontend/./node_modules/rxjs/dist/esm5/internal/util/createErrorClass.js","webpack://f5-frontend/./node_modules/rxjs/dist/esm5/internal/util/UnsubscriptionError.js","webpack://f5-frontend/./node_modules/rxjs/dist/esm5/internal/util/arrRemove.js","webpack://f5-frontend/./node_modules/rxjs/dist/esm5/internal/Subscription.js","webpack://f5-frontend/./node_modules/rxjs/dist/esm5/internal/config.js","webpack://f5-frontend/./node_modules/rxjs/dist/esm5/internal/scheduler/timeoutProvider.js","webpack://f5-frontend/./node_modules/rxjs/dist/esm5/internal/util/noop.js","webpack://f5-frontend/./node_modules/rxjs/dist/esm5/internal/NotificationFactories.js","webpack://f5-frontend/./node_modules/rxjs/dist/esm5/internal/util/errorContext.js","webpack://f5-frontend/./node_modules/rxjs/dist/esm5/internal/Subscriber.js","webpack://f5-frontend/./node_modules/rxjs/dist/esm5/internal/util/reportUnhandledError.js","webpack://f5-frontend/./node_modules/rxjs/dist/esm5/internal/symbol/observable.js","webpack://f5-frontend/./node_modules/rxjs/dist/esm5/internal/util/identity.js","webpack://f5-frontend/./node_modules/rxjs/dist/esm5/internal/Observable.js","webpack://f5-frontend/./node_modules/rxjs/dist/esm5/internal/util/pipe.js","webpack://f5-frontend/./node_modules/rxjs/dist/esm5/internal/util/ObjectUnsubscribedError.js","webpack://f5-frontend/./node_modules/rxjs/dist/esm5/internal/Subject.js","webpack://f5-frontend/./src/observables/error.ts","webpack://f5-frontend/./src/api.ts","webpack://f5-frontend/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://f5-frontend/./node_modules/style-loader/dist/runtime/styleDomAPI.js","webpack://f5-frontend/./node_modules/style-loader/dist/runtime/insertBySelector.js","webpack://f5-frontend/./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack://f5-frontend/./node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack://f5-frontend/./node_modules/style-loader/dist/runtime/styleTagTransform.js","webpack://f5-frontend/./src/assets/styles.css?951f","webpack://f5-frontend/./src/ui/components/Button/Button.module.less?727e","webpack://f5-frontend/./src/ui/components/Button/Button.tsx","webpack://f5-frontend/./src/ui/components/Spinner/Spinner.module.less?a273","webpack://f5-frontend/./src/ui/components/Spinner/Spinner.tsx","webpack://f5-frontend/./src/ui/components/Progress/Progress.module.less?1b34","webpack://f5-frontend/./src/ui/components/Progress/Progress.tsx","webpack://f5-frontend/./src/ui/components/CircleProgress/CircleProgress.module.less?7e30","webpack://f5-frontend/./src/ui/components/CircleProgress/CircleProgress.tsx","webpack://f5-frontend/./src/ui/components/Modal/Modal.module.less?04c8","webpack://f5-frontend/./src/ui/components/Modal/Modal.tsx","webpack://f5-frontend/./src/ui/setRef.ts","webpack://f5-frontend/./src/ui/components/Popover/Popover.module.less?2095","webpack://f5-frontend/./src/ui/components/Popover/Popover.tsx","webpack://f5-frontend/./src/ui/components/ContextMenu.tsx","webpack://f5-frontend/./src/ui/components/Popper.tsx","webpack://f5-frontend/./src/ui/components/Menu/Menu.module.less?2418","webpack://f5-frontend/./src/ui/components/Menu/Menu.tsx","webpack://f5-frontend/./src/ui/components/Select/Select.module.less?c0cb","webpack://f5-frontend/./src/ui/components/Select/Select.tsx","webpack://f5-frontend/./src/ui/components/Switch/Switch.module.less?a2e7","webpack://f5-frontend/./src/ui/components/Password/Password.module.less?698d","webpack://f5-frontend/./src/ui/components/Password/Password.tsx","webpack://f5-frontend/./src/ui/components/Checkbox/Checkbox.module.less?708a","webpack://f5-frontend/./src/ui/components/Checkbox/Checkbox.tsx","webpack://f5-frontend/./src/ui/components/Tooltips/Tooltip.module.less?49f4","webpack://f5-frontend/./src/ui/components/Tooltips/Tooltip.tsx","webpack://f5-frontend/./src/ui/components/Tooltips/Tooltips.tsx","webpack://f5-frontend/./src/ui/components/Split/Split.module.less?9b5b","webpack://f5-frontend/./src/ui/components/Split/Split.tsx","webpack://f5-frontend/./src/context/config.ts","webpack://f5-frontend/./node_modules/whatwg-url/index.js","webpack://f5-frontend/./src/shared/utils/URI.ts","webpack://f5-frontend/./src/shared/utils/filter.ts","webpack://f5-frontend/./node_modules/ramda/es/internal/_isPlaceholder.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_curry1.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_arity.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_curry2.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_curryN.js","webpack://f5-frontend/./node_modules/ramda/es/curryN.js","webpack://f5-frontend/./node_modules/ramda/es/curry.js","webpack://f5-frontend/./src/utils/path.ts","webpack://f5-frontend/./src/shared/utils/os.ts","webpack://f5-frontend/./src/utils/fileicon.ts","webpack://f5-frontend/./src/components/Explorer/Explorer.less?4092","webpack://f5-frontend/./src/components/Breadcrumbs/Breadcrumbs.less?50a6","webpack://f5-frontend/./node_modules/ramda/es/internal/_nth.js","webpack://f5-frontend/./node_modules/ramda/es/last.js","webpack://f5-frontend/./src/commands.ts","webpack://f5-frontend/./src/observables/command.ts","webpack://f5-frontend/./src/components/Breadcrumbs/Breadcrumbs.tsx","webpack://f5-frontend/./src/components/Filter/Filter.less?0742","webpack://f5-frontend/./src/components/Filter/Filter.tsx","webpack://f5-frontend/./src/components/List/List.less?9236","webpack://f5-frontend/./node_modules/ramda/es/internal/_arrayFromIterator.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_includesWith.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_has.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_objectIs.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_isArguments.js","webpack://f5-frontend/./node_modules/ramda/es/keys.js","webpack://f5-frontend/./node_modules/ramda/es/type.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_equals.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_functionName.js","webpack://f5-frontend/./node_modules/ramda/es/equals.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_isArray.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_dispatchable.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_isTransformer.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_xfBase.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_xtake.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_reduced.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_checkForMethod.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_curry3.js","webpack://f5-frontend/./node_modules/ramda/es/slice.js","webpack://f5-frontend/./node_modules/ramda/es/take.js","webpack://f5-frontend/./node_modules/ramda/es/startsWith.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_arrayReduce.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_map.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_xmap.js","webpack://f5-frontend/./node_modules/ramda/es/map.js","webpack://f5-frontend/./node_modules/ramda/es/where.js","webpack://f5-frontend/./node_modules/ramda/es/whereEq.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_includes.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_indexOf.js","webpack://f5-frontend/./node_modules/ramda/es/includes.js","webpack://f5-frontend/./node_modules/ramda/es/__.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_isInteger.js","webpack://f5-frontend/./node_modules/ramda/es/prop.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_prop.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_Set.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_isObject.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_xfilter.js","webpack://f5-frontend/./node_modules/ramda/es/filter.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_isMap.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_filterMap.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_filter.js","webpack://f5-frontend/./node_modules/ramda/es/reject.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_complement.js","webpack://f5-frontend/./node_modules/ramda/es/without.js","webpack://f5-frontend/./node_modules/ramda/es/propEq.js","webpack://f5-frontend/./node_modules/ramda/es/isNil.js","webpack://f5-frontend/./node_modules/ramda/es/isNotNil.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_identity.js","webpack://f5-frontend/./node_modules/ramda/es/identity.js","webpack://f5-frontend/./node_modules/ramda/es/adjust.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_concat.js","webpack://f5-frontend/./node_modules/ramda/es/always.js","webpack://f5-frontend/./node_modules/ramda/es/update.js","webpack://f5-frontend/./node_modules/ramda/es/move.js","webpack://f5-frontend/./node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js","webpack://f5-frontend/./node_modules/rxjs/dist/esm5/internal/operators/filter.js","webpack://f5-frontend/./node_modules/rxjs/dist/esm5/internal/util/lift.js","webpack://f5-frontend/./src/hooks/useSetAsSet.ts","webpack://f5-frontend/./src/hooks/useEffectOnUpdate.ts","webpack://f5-frontend/./src/hooks/useEvent.ts","webpack://f5-frontend/./src/hooks/useSubscribe.ts","webpack://f5-frontend/./src/hooks/useShortcuts.ts","webpack://f5-frontend/./src/hooks/useCustomCompareEffect.ts","webpack://f5-frontend/./src/components/EditFileName/EditFileName.less?ab79","webpack://f5-frontend/./src/components/EditFileName/EditFileName.tsx","webpack://f5-frontend/./src/components/List/List.tsx","webpack://f5-frontend/./src/hooks/useSet.ts","webpack://f5-frontend/./src/hooks/useType.ts","webpack://f5-frontend/./src/utils/debounce.ts","webpack://f5-frontend/./src/components/Toolbar/Toolbar.less?1fcb","webpack://f5-frontend/./src/components/Toolbar/Toolbar.tsx","webpack://f5-frontend/./src/observables/dir.ts","webpack://f5-frontend/./node_modules/ramda/es/descend.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_pipe.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_isArrayLike.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_isString.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_createReduce.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_xArrayReduce.js","webpack://f5-frontend/./node_modules/ramda/es/bind.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_xReduce.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_xwrap.js","webpack://f5-frontend/./node_modules/ramda/es/reduce.js","webpack://f5-frontend/./node_modules/ramda/es/tail.js","webpack://f5-frontend/./node_modules/ramda/es/pipe.js","webpack://f5-frontend/./node_modules/ramda/es/ascend.js","webpack://f5-frontend/./node_modules/ramda/es/sortWith.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_xdrop.js","webpack://f5-frontend/./node_modules/ramda/es/drop.js","webpack://f5-frontend/./node_modules/ramda/es/takeLast.js","webpack://f5-frontend/./node_modules/ramda/es/pick.js","webpack://f5-frontend/./node_modules/ramda/es/omit.js","webpack://f5-frontend/./node_modules/ramda/es/sortBy.js","webpack://f5-frontend/./node_modules/ramda/es/length.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_isNumber.js","webpack://f5-frontend/./node_modules/ramda/es/insertAll.js","webpack://f5-frontend/./node_modules/ramda/es/sort.js","webpack://f5-frontend/./node_modules/date-fns/locale/en-US/_lib/formatDistance.js","webpack://f5-frontend/./node_modules/date-fns/locale/_lib/buildFormatLongFn.js","webpack://f5-frontend/./node_modules/date-fns/locale/en-US/_lib/formatLong.js","webpack://f5-frontend/./node_modules/date-fns/locale/en-US/_lib/formatRelative.js","webpack://f5-frontend/./node_modules/date-fns/locale/_lib/buildLocalizeFn.js","webpack://f5-frontend/./node_modules/date-fns/locale/en-US/_lib/localize.js","webpack://f5-frontend/./node_modules/date-fns/locale/_lib/buildMatchFn.js","webpack://f5-frontend/./node_modules/date-fns/locale/en-US/_lib/match.js","webpack://f5-frontend/./node_modules/date-fns/locale/_lib/buildMatchPatternFn.js","webpack://f5-frontend/./node_modules/date-fns/locale/en-US.js","webpack://f5-frontend/./node_modules/date-fns/_lib/defaultOptions.js","webpack://f5-frontend/./node_modules/date-fns/constants.js","webpack://f5-frontend/./node_modules/date-fns/constructFrom.js","webpack://f5-frontend/./node_modules/date-fns/toDate.js","webpack://f5-frontend/./node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js","webpack://f5-frontend/./node_modules/date-fns/startOfDay.js","webpack://f5-frontend/./node_modules/date-fns/getDayOfYear.js","webpack://f5-frontend/./node_modules/date-fns/differenceInCalendarDays.js","webpack://f5-frontend/./node_modules/date-fns/_lib/normalizeDates.js","webpack://f5-frontend/./node_modules/date-fns/startOfYear.js","webpack://f5-frontend/./node_modules/date-fns/startOfWeek.js","webpack://f5-frontend/./node_modules/date-fns/startOfISOWeek.js","webpack://f5-frontend/./node_modules/date-fns/getISOWeekYear.js","webpack://f5-frontend/./node_modules/date-fns/getISOWeek.js","webpack://f5-frontend/./node_modules/date-fns/startOfISOWeekYear.js","webpack://f5-frontend/./node_modules/date-fns/getWeekYear.js","webpack://f5-frontend/./node_modules/date-fns/getWeek.js","webpack://f5-frontend/./node_modules/date-fns/startOfWeekYear.js","webpack://f5-frontend/./node_modules/date-fns/_lib/addLeadingZeros.js","webpack://f5-frontend/./node_modules/date-fns/_lib/format/lightFormatters.js","webpack://f5-frontend/./node_modules/date-fns/_lib/format/formatters.js","webpack://f5-frontend/./node_modules/date-fns/_lib/format/longFormatters.js","webpack://f5-frontend/./node_modules/date-fns/_lib/protectedTokens.js","webpack://f5-frontend/./node_modules/date-fns/isValid.js","webpack://f5-frontend/./node_modules/date-fns/isDate.js","webpack://f5-frontend/./node_modules/date-fns/format.js","webpack://f5-frontend/./node_modules/i18next/dist/esm/i18next.js","webpack://f5-frontend/./src/observables/queue.ts","webpack://f5-frontend/./src/components/Explorer/Explorer.tsx","webpack://f5-frontend/./src/hooks/useFocus.ts","webpack://f5-frontend/./src/shared/FileSystem.ts","webpack://f5-frontend/./src/menu/connectionsDir.ts","webpack://f5-frontend/./src/menu/connection.ts","webpack://f5-frontend/./node_modules/react-hook-form/dist/index.esm.mjs","webpack://f5-frontend/./node_modules/ramda/es/evolve.js","webpack://f5-frontend/./node_modules/ramda/es/trim.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_objectAssign.js","webpack://f5-frontend/./node_modules/ramda/es/mergeRight.js","webpack://f5-frontend/./src/modals/Settings/Settings.less?8478","webpack://f5-frontend/./src/modals/Settings/Settings.tsx","webpack://f5-frontend/./src/modals/Connection/Connection.less?570b","webpack://f5-frontend/./src/modals/Connection/Connection.tsx","webpack://f5-frontend/./src/components/NoConnections.tsx","webpack://f5-frontend/./src/components/Connections/Connections.less?90ab","webpack://f5-frontend/./src/components/Connections/Connections.tsx","webpack://f5-frontend/./src/menu/localFile.ts","webpack://f5-frontend/./src/menu/remoteFile.ts","webpack://f5-frontend/./src/menu/localDir.ts","webpack://f5-frontend/./src/menu/remoteDir.ts","webpack://f5-frontend/./src/components/Workspace/MissingDir.tsx","webpack://f5-frontend/./node_modules/ramda/es/remove.js","webpack://f5-frontend/./src/components/Path/Path.less?1669","webpack://f5-frontend/./src/components/Path/Path.tsx","webpack://f5-frontend/./src/plugins/mirror/Create/Create.less?17ff","webpack://f5-frontend/./src/plugins/mirror/Create/Create.tsx","webpack://f5-frontend/./src/plugins/mirror/events.ts","webpack://f5-frontend/./src/plugins/mirror/List/List.less?6a27","webpack://f5-frontend/./src/plugins/mirror/List/List.tsx","webpack://f5-frontend/./src/components/Workspace/LocalPane.tsx","webpack://f5-frontend/./src/components/Workspace/Workspace.less?4008","webpack://f5-frontend/./src/components/Workspace/Workspace.tsx","webpack://f5-frontend/./src/hooks/useConcatAsyncEffect.ts","webpack://f5-frontend/./src/components/App/App.less?3091","webpack://f5-frontend/./node_modules/ramda/es/internal/_quote.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_toISOString.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_toString.js","webpack://f5-frontend/./node_modules/ramda/es/toString.js","webpack://f5-frontend/./node_modules/ramda/es/invoker.js","webpack://f5-frontend/./node_modules/ramda/es/internal/_isFunction.js","webpack://f5-frontend/./node_modules/ramda/es/split.js","webpack://f5-frontend/./src/components/Queue/Queue.less?b291","webpack://f5-frontend/./src/components/Queue/Queue.tsx","webpack://f5-frontend/./src/components/QueueAction/QueueAction.less?8396","webpack://f5-frontend/./src/components/QueueAction/QueueAction.tsx","webpack://f5-frontend/./src/components/Error/Error.less?e170","webpack://f5-frontend/./src/components/Error/Error.tsx","webpack://f5-frontend/./src/modals/Password/Password.less?bfd6","webpack://f5-frontend/./src/modals/Password/Password.tsx","webpack://f5-frontend/./src/modals/Deletion.tsx","webpack://f5-frontend/./src/modals/Clearance.tsx","webpack://f5-frontend/./src/observables/file.ts","webpack://f5-frontend/./node_modules/ramda/es/mergeWithKey.js","webpack://f5-frontend/./node_modules/ramda/es/mergeDeepWithKey.js","webpack://f5-frontend/./node_modules/ramda/es/mergeDeepRight.js","webpack://f5-frontend/./src/components/App/App.tsx","webpack://f5-frontend/./src/hooks/useMode.ts","webpack://f5-frontend/./src/hooks/useCopyPaste.ts","webpack://f5-frontend/./src/hooks/useMap.ts","webpack://f5-frontend/./src/index.tsx","webpack://f5-frontend/./node_modules/webidl-conversions/lib/index.js","webpack://f5-frontend/./node_modules/whatwg-url/lib/Function.js","webpack://f5-frontend/./node_modules/whatwg-url/lib/URL-impl.js","webpack://f5-frontend/./node_modules/whatwg-url/lib/URL.js","webpack://f5-frontend/./node_modules/whatwg-url/lib/URLSearchParams-impl.js","webpack://f5-frontend/./node_modules/whatwg-url/lib/URLSearchParams.js","webpack://f5-frontend/./node_modules/whatwg-url/lib/encoding.js","webpack://f5-frontend/./node_modules/whatwg-url/lib/infra.js","webpack://f5-frontend/./node_modules/whatwg-url/lib/percent-encoding.js","webpack://f5-frontend/./node_modules/whatwg-url/lib/url-miscellaneous.js","webpack://f5-frontend/./node_modules/whatwg-url/lib/url-state-machine.js","webpack://f5-frontend/./node_modules/whatwg-url/lib/url-string-validator.js","webpack://f5-frontend/./node_modules/whatwg-url/lib/urlencoded.js","webpack://f5-frontend/./node_modules/whatwg-url/lib/utils.js","webpack://f5-frontend/./node_modules/whatwg-url/webidl2js-wrapper.js","webpack://f5-frontend/./node_modules/@exodus/bytes/fallback/multi-byte.encodings.cjs","webpack://f5-frontend/./node_modules/classnames/index.js","webpack://f5-frontend/./node_modules/@exodus/bytes/assert.js","webpack://f5-frontend/./node_modules/@exodus/bytes/fallback/base64.js","webpack://f5-frontend/./node_modules/@exodus/bytes/base64.js","webpack://f5-frontend/./node_modules/@exodus/bytes/fallback/multi-byte.table.js","webpack://f5-frontend/./node_modules/@exodus/bytes/fallback/multi-byte.js","webpack://f5-frontend/./node_modules/@exodus/bytes/encoding.js","webpack://f5-frontend/./node_modules/@exodus/bytes/multi-byte.js","webpack://f5-frontend/./node_modules/@exodus/bytes/fallback/_utils.js","webpack://f5-frontend/./node_modules/@exodus/bytes/fallback/encoding.api.js","webpack://f5-frontend/./node_modules/@exodus/bytes/fallback/encoding.labels.js","webpack://f5-frontend/./node_modules/@exodus/bytes/fallback/encoding.util.js","webpack://f5-frontend/./node_modules/@exodus/bytes/fallback/encoding.js","webpack://f5-frontend/./node_modules/@exodus/bytes/fallback/latin1.js","webpack://f5-frontend/./node_modules/@exodus/bytes/fallback/platform.browser.js","webpack://f5-frontend/./node_modules/@exodus/bytes/fallback/platform.native.js","webpack://f5-frontend/./node_modules/@exodus/bytes/fallback/single-byte.encodings.js","webpack://f5-frontend/./node_modules/@exodus/bytes/fallback/single-byte.js","webpack://f5-frontend/./node_modules/@exodus/bytes/single-byte.js","webpack://f5-frontend/./node_modules/@exodus/bytes/fallback/utf16.js","webpack://f5-frontend/./node_modules/@exodus/bytes/utf16.browser.js","webpack://f5-frontend/./node_modules/@exodus/bytes/utf8.js","webpack://f5-frontend/./node_modules/@exodus/bytes/fallback/percent.js","webpack://f5-frontend/./node_modules/@exodus/bytes/whatwg.js","webpack://f5-frontend/webpack/bootstrap","webpack://f5-frontend/webpack/runtime/compat get default export","webpack://f5-frontend/webpack/runtime/define property getters","webpack://f5-frontend/webpack/runtime/global","webpack://f5-frontend/webpack/runtime/hasOwnProperty shorthand","webpack://f5-frontend/webpack/runtime/make namespace object","webpack://f5-frontend/webpack/runtime/set anonymous default export name","webpack://f5-frontend/webpack/runtime/wrap commonjs module","webpack://f5-frontend/webpack/runtime/publicPath","webpack://f5-frontend/webpack/runtime/jsonp chunk loading","webpack://f5-frontend/webpack/runtime/nonce","webpack://f5-frontend/webpack/startup"],"sourcesContent":["// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `[data-f5-attribute] {\n font-size: 0.9em;\n}\n[data-f5-attribute=\"git_u\"] {\n &::after {\n content: 'U';\n }\n}\n[data-f5-attribute=\"git_m\"] {\n &::after {\n content: 'M';\n }\n}\n[data-f5-attribute=\"git_a\"] {\n &::after {\n content: 'A';\n }\n}\n.d [data-f5-attribute=\"git_c\"] {\n font-size: .5em;\n &::after {\n content: '⬤';\n }\n}\n\n[data-f5-attributes~=\"git_u\"] * {\n --color: #6DA862;\n --selected-color: #6DA862;\n}\n[data-f5-attributes~=\"git_m\"] * {\n --color: #BD923D;\n --selected-color: #BD923D;\n}\n[data-f5-attributes~=\"git_a\"] * {\n --color: #6DA862;\n --selected-color: #6DA862;\n}\n\n.d[data-f5-attributes~=\"git_c\"] * {\n --color: #6DA862;\n --selected-color: #6DA862;\n}\n\n\n[data-f5-attributes~=\"git_i\"] * {\n --color: #656E7A;\n --selected-color: #656E7A;\n}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nimport ___CSS_LOADER_AT_RULE_IMPORT_0___ from \"-!../../node_modules/css-loader/dist/cjs.js!./git.css\";\nimport ___CSS_LOADER_AT_RULE_IMPORT_1___ from \"-!../../node_modules/css-loader/dist/cjs.js!../ui/styles.css\";\nimport ___CSS_LOADER_AT_RULE_IMPORT_2___ from \"-!../../node_modules/css-loader/dist/cjs.js!./themes/black.css\";\nimport ___CSS_LOADER_AT_RULE_IMPORT_3___ from \"-!../../node_modules/css-loader/dist/cjs.js!./themes/blue.css\";\nimport ___CSS_LOADER_AT_RULE_IMPORT_4___ from \"-!../../node_modules/css-loader/dist/cjs.js!./themes/green.css\";\nimport ___CSS_LOADER_AT_RULE_IMPORT_5___ from \"-!../../node_modules/css-loader/dist/cjs.js!./themes/pink.css\";\nimport ___CSS_LOADER_GET_URL_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/getUrl.js\";\nvar ___CSS_LOADER_URL_IMPORT_0___ = new URL(\"./fonts/OpenSans-VariableFont_wdth,wght.ttf\", import.meta.url);\nvar ___CSS_LOADER_URL_IMPORT_1___ = new URL(\"./fonts/OpenSans-Italic-VariableFont_wdth,wght.ttf\", import.meta.url);\nvar ___CSS_LOADER_URL_IMPORT_2___ = new URL(\"./fonts/MaterialSymbolsOutlined.woff2\", import.meta.url);\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n___CSS_LOADER_EXPORT___.i(___CSS_LOADER_AT_RULE_IMPORT_0___);\n___CSS_LOADER_EXPORT___.i(___CSS_LOADER_AT_RULE_IMPORT_1___);\n___CSS_LOADER_EXPORT___.i(___CSS_LOADER_AT_RULE_IMPORT_2___);\n___CSS_LOADER_EXPORT___.i(___CSS_LOADER_AT_RULE_IMPORT_3___);\n___CSS_LOADER_EXPORT___.i(___CSS_LOADER_AT_RULE_IMPORT_4___);\n___CSS_LOADER_EXPORT___.i(___CSS_LOADER_AT_RULE_IMPORT_5___);\nvar ___CSS_LOADER_URL_REPLACEMENT_0___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_0___);\nvar ___CSS_LOADER_URL_REPLACEMENT_1___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_1___);\nvar ___CSS_LOADER_URL_REPLACEMENT_2___ = ___CSS_LOADER_GET_URL_IMPORT___(___CSS_LOADER_URL_IMPORT_2___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `@font-face {\n font-family: OpenSans;\n src: url(${___CSS_LOADER_URL_REPLACEMENT_0___});\n font-weight: 300;\n font-variation-settings: \"wght\" 300;\n}\n\n@font-face {\n font-family: OpenSans;\n src: url(${___CSS_LOADER_URL_REPLACEMENT_0___});\n font-weight: 400;\n font-variation-settings: \"wght\" 400;\n}\n@font-face {\n font-family: OpenSans;\n src: url(${___CSS_LOADER_URL_REPLACEMENT_1___});\n font-style: italic;\n}\n@font-face {\n font-family: OpenSans;\n src: url(${___CSS_LOADER_URL_REPLACEMENT_0___});\n font-weight: 500;\n font-variation-settings: \"wght\" 500;\n}\n@font-face {\n font-family: OpenSans;\n src: url(${___CSS_LOADER_URL_REPLACEMENT_0___});\n font-weight: 600;\n font-variation-settings: \"wght\" 600;\n}\n\n@font-face {\n font-family: 'Material Symbols Outlined';\n font-style: normal;\n font-weight: 400;\n src: url(${___CSS_LOADER_URL_REPLACEMENT_2___}) format('woff2');\n}\n/*\nhttps://developers.google.com/fonts/docs/material_symbols\nhttps://fonts.googleapis.com/css2?family=Material+Symbols+Outlined \n*/\n\n.icon {\n font-family: 'Material Symbols Outlined';\n font-weight: normal;\n font-style: normal;\n font-size: var(--icon-size);\n line-height: 1;\n letter-spacing: normal;\n text-transform: none;\n display: inline-block;\n white-space: nowrap;\n word-wrap: normal;\n direction: ltr;\n -webkit-font-feature-settings: 'liga';\n -webkit-font-smoothing: antialiased;\n}\n\n* {\n margin: 0px;\n padding: 0px;\n border: 0;\n font: inherit;\n font-style: normal;\n font-weight: 400;\n color: var(--color);\n}\n\n*, *::before, *::after {\n box-sizing: border-box;\n}\n\nimage, picture, svg, video {\n display: block;\n max-width: 100%; \n}\n\n*::-webkit-scrollbar {\n width: 5px;\n height: 5px;\n background-color: transparent;\n}\n*::-webkit-scrollbar-thumb {\n background-color: var(--hover-background);\n}\n*::-webkit-scrollbar-corner {\n background-color: transparent;\n}\n* {\n scrollbar-width: thin;\n scrollbar-color: var(--hover-background) transparent;\n}\n\n*:focus {\n outline: none !important\n}\n\nli {\n list-style: none;\n}\n\nbutton {\n background-color: transparent;\n}\n\nhtml {\n color-scheme: dark light;\n}\n\nbody {\n font-family: var(--font-family);\n font-size: var(--font-size);\n}\n\nstrong {\n font-weight: 600;\n}\n\ninput {\n font-size: 1rem;\n font-weight: 400;\n}\n\nsvg.drag-image text {\n fill: var(--color);\n font-family: var(--font-family);\n font-size: 13px;\n}\n\nsection {\n > p {\n padding: .4em 0;\n }\n}\n\n.fill-center {\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center; \n text-align: center;\n > .center {\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n gap: 1em;\n text-align: center;\n }\n .icon:first-of-type {\n font-size: 6em;\n }\n .link {\n color: var(--link);\n text-decoration: underline;\n cursor: pointer;\n }\n b {\n background-color: var(--bar-background);\n padding: .2em .5em;\n border-radius: 6px;\n font-weight: 600;\n }\n}\n\n.modal-content {\n header {\n font-weight: 600;\n font-size: 1.4em;\n margin-bottom: 1em;\n }\n p {\n padding: .5em 0;\n > em {\n display: block;\n font-weight: 600;\n background-color: var(--bar-background);\n padding: .5em .8em;\n border: 1px solid var(--border-color);\n border-radius: 5px;\n margin: .2em 0;\n }\n }\n strong {\n font-size: 1.1rem;\n font-weight: 600;\n }\n i {\n font-weight: 400;\n }\n > .info {\n margin: .8em 0;\n display: flex;\n align-items: center;\n gap: 1em;\n font-size: .9em;\n background-color: var(--bar-background);\n border: 1px solid var(--dry-primary);\n border-radius: 5px;\n padding: .5em;\n &::before {\n font-family: 'Material Symbols Outlined';\n font-size: 1.8em;\n color: var(--dry-primary);\n content: \"info\";\n }\n }\n}\n\n.dry-menu .attention * {\n color: var(--attention-color);\n}\n\n:root {\n --font-family: OpenSans;\n --font-size: 13.5px;\n --icon-size: 14px;\n --background: #fff;\n --color: #040404;\n --bar-background: #ECE7E5;\n --bar-color: #000000;\n --border-color: #E3E2E3; \n --hover-background: #e9edf9;\n --selected-background: #2551C8;\n --selected-color: #fff;\n --drop-background: #BEBEBE;\n --link: #1976d2;\n --highlight: #4e91fd;\n\n --attention-color: #C24944;\n\n --success-bg: #2A3F35;\n --success-color: #67A85E;\n\n --info-bg: #27334D;\n --info-color: #7094D5;\n}\n\nform {\n label {\n display: block;\n margin: 1em 0 .2em 0;\n }\n & input.dry {\n display: block;\n width: 100%;\n }\n & input.dry::placeholder {\n font-weight: 400;\n }\n > p {\n display: flex;\n align-items: center;\n opacity: .6;\n font-size: .9em;\n > .icon {\n margin-right: .4em;\n }\n > a {\n color: var(--link);\n }\n }\n}\n\n:root {\n --dry-bg: var(--background);\n --dry-color: var(--color);\n --dry-border-color: var(--border-color);\n --dry-border-width: 1px;\n --dry-border-style: solid;\n --dry-border: var(--dry-border-width) var(--dry-border-style) var(--dry-border-color);\n --dry-border-radius: .6rem;\n --dry-hover-bg: var(--hover-background);\n --dry-primary: var(--primary);\n --dry-primary-highlight-text: var(--background);\n \n --dry-resizer-color: var(--border-color);\n --dry-resizer-width: 4px;\n --dry-progress-color: var(--primary);\n --dry-progress-bg: var(--background);\n --dry-modal-zindex: 1000;\n}\n\n&[data-mode=\"dark\"] {\n --dry-tooltip-bg: #000;\n --dry-tooltip-color: #ffffffcc;\n --dry-primary-highlight: #4d5565;\n --dry-modal-fade: #00000060; \n}\n&[data-mode=\"light\"] {\n --dry-tooltip-bg: #757575;\n --dry-tooltip-color: #e5e5e5;\n --dry-primary-highlight: #8c9098;\n --dry-modal-fade: #ffffff60; \n}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `[data-theme=\"black\"] {\n --primary: #404754;\n &[data-mode=\"dark\"] {\n --background: #1F2227;\n --color: #abb2bf;\n --bar-background: #24272D;\n --bar-color: #6C6E74;\n --border-color: #373A40; \n --active-border-color: #656973;\n --hover-background: #2D3139;\n --selected-background: #333841;\n --selected-color: #d7dae0;\n --drop-background: #142E48;\n }\n &[data-mode=\"light\"] {\n --background: #fff;\n --color: #1F2227; \n --bar-background: #F7F8FA;\n --bar-color: #676D75;\n --border-color: #D2D7DE;\n --active-border-color: #373A40;\n --hover-background: #d1d3d6;\n --selected-background: #E9EBEE;\n --selected-color: #15181c;\n --drop-background: #b8c0c8;\n }\n}\n`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `[data-theme=\"blue\"] {\n --primary: #58A5F8;\n &[data-mode=\"dark\"] {\n --background: #1A222C;\n --color: #B5C3D3;\n --bar-background: #24303F;\n --bar-color: #898A8A;\n --border-color: #24303F; \n --active-border-color: #656973;\n --hover-background: #3a4452;\n --selected-background: #212b38;\n --selected-color: #d7dae0;\n --drop-background: #142E48;\n }\n &[data-mode=\"light\"] {\n --highlight: #112131;\n --background: #dfe8f2;\n --color: #040404; \n --bar-background: #5F90C2;\n --bar-color: #676D75;\n --border-color: #4480C7;\n --active-border-color: #5F90C2;\n --hover-background: #bed2e6;\n --selected-background: #a4c0dc;\n --selected-color: #15181c;\n --drop-background: #b8c0c8;\n }\n}\n`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `[data-theme=\"green\"] {\n --primary: #5BB040;\n &[data-mode=\"dark\"] {\n --background: #121C11;\n --color: #a2afbd;\n --bar-background: #1D2B1A;\n --bar-color: #6C6E74;\n --border-color: #23341F; \n --active-border-color: #5BB040;\n --hover-background: #334030;\n --selected-background: #314c2e;\n --selected-color: #d7dae0;\n --drop-background: #142E48;\n }\n &[data-mode=\"light\"] {\n --background: #ebeeeb;\n --color: #121C11; \n --bar-background: #5BB040;\n --bar-color: #596058;\n --border-color: #D2D7DE;\n --active-border-color: #373A40;\n --hover-background: #b8c3b7;\n --selected-background: #8a9c87;\n --selected-color: #15181c;\n --drop-background: #b8c0c8;\n }\n}\n`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `[data-theme=\"pink\"] {\n --primary: #EB69A1;\n &[data-mode=\"dark\"] {\n --background: #21171A;\n --bar-background: #3B292E;\n --color: #F1EFF0;\n --bar-color: #6C6E74;\n --border-color: #787680; \n --active-border-color: #E6679D;\n --hover-background: #4e2f48;\n --selected-background: #461f30;\n --selected-color: #FFFFFF;\n --drop-background: #3f2c33;\n }\n &[data-mode=\"light\"] {\n --background: #fff;\n --color: #21171A; \n --bar-background: #edeaec;\n --bar-color: #676D75;\n --border-color: #D2D7DE;\n --active-border-color: #E6679D;\n --hover-background: #f7d1e1;\n --selected-background: #f0a3c4;\n --selected-color: #15181c;\n --drop-background: #eb85b0;\n }\n}\n`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `:root {\n --dry-bg: #fff;\n --dry-color: #000;\n --dry-border-color: #d9d9d9;\n --dry-border-width: 1px;\n --dry-border-style: solid;\n --dry-border: var(--dry-border-width) var(--dry-border-style) var(--dry-border-color);\n --dry-border-radius: .3rem;\n --dry-shadow-color: #0000001a;\n --dry-shadow-color2: #0000000f;\n --dry-shadow: var(--dry-shadow-color) 0px 4px 6px -1px, var(--dry-shadow-color2) 0px 2px 4px -1px; \n --dry-primary: #1976d2;\n --dry-primary-text: #fff;\n --dry-primary-highlight: #E9F4FE;\n --dry-primary-highlight-text: var(--dry-primary);\n\n --dry-modal-fade: #00000020;\n --dry-hover-bg: #F3F4F6;\n --dry-control-bg: #fff;\n\n --dry-error: #FCF3F2;\n --dry-error-text: #AC352D;\n\n --dry-tooltip-bg: var(--dry-color);\n --dry-tooltip-color: var(--dry-bg);\n\n --dry-progress-color: var(--dry-primary);\n --dry-progress-bg: var(--dry-border-color);\n\n --dry-resizer-width: calc(var(--dry-border-width) * 2);\n --dry-resizer-color: var(--dry-border-color);\n\n \n --dry-modal-zindex: 1000;\n --dry-popover-zindex: 10000;\n --dry-tooltip-zindex: 100000;\n\n --dry-transition: .5s;\n}\n\n:is(input, textarea).dry {\n background-color: var(--dry-bg);\n border: var(--dry-border);\n border-radius: var(--dry-border-radius);\n padding: .5em .8em;\n box-sizing: border-box;\n}\n:is(input, textarea).dry::placeholder {\n opacity: .6;\n}\n:is(input, textarea).dry:focus {\n border-color: var(--dry-primary);\n outline: none !important\n}\n:is(input, textarea).dry.error {\n border-color: var(--dry-error-text);\n}\n\n.dry-buttons {\n display: inline-flex;\n border: var(--dry-border);\n border-radius: var(--dry-border-radius);\n & > button {\n flex: auto 1 1;\n background-color: transparent;\n border: 0;\n border-radius: 0;\n border-right: var(--dry-border);\n padding: .5em 1em;\n font-size: 1em;\n cursor: pointer;\n &:first-child {\n border-radius: var(--dry-border-radius) 0 0 var(--dry-border-radius);\n }\n &:last-child {\n border-right-color: transparent;\n border-radius: 0 var(--dry-border-radius) var(--dry-border-radius) 0;\n }\n &:hover {\n background-color: var(--dry-primary-highlight);\n color: var(--dry-primary-highlight-text);\n }\n &[data-checked=\"true\"] {\n background-color: var(--dry-primary);\n color: var(--dry-primary-text);\n border-color: var(--dry-primary);\n }\n }\n}\n\n.dawn {\n animation: appear 0.4s linear 1;\n}\n\n@keyframes appear {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.KeSHAfVUq0d0TKSCDYw7 {\n display: inline-block;\n background-color: transparent;\n color: var(--dry-color);\n padding: 0.4em 1em;\n border: var(--dry-border-width) var(--dry-border-style) var(--dry-border-color);\n border-radius: var(--dry-border-radius);\n --dry-shadow: #0000000d 0px 0px 0px 1px;\n box-shadow: var(--dry-shadow);\n cursor: pointer;\n transition: all 0.3s;\n}\n.KeSHAfVUq0d0TKSCDYw7:hover:not(:disabled) {\n border-color: var(--dry-primary);\n}\n.KeSHAfVUq0d0TKSCDYw7[data-primary=\"true\"] {\n background-color: var(--dry-primary);\n color: var(--dry-primary-text);\n border-color: var(--dry-primary);\n}\n.KeSHAfVUq0d0TKSCDYw7[data-primary=\"true\"]:hover:not(:disabled) {\n background-color: var(--dry-primary-highlight);\n color: var(--dry-primary-highlight-text);\n border-color: var(--dry-primary-highlight);\n}\n.KeSHAfVUq0d0TKSCDYw7:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\n.KeSHAfVUq0d0TKSCDYw7:disabled[data-primary=\"true\"] {\n color: var(--dry-color);\n}\n.KeSHAfVUq0d0TKSCDYw7[hidden] {\n display: none;\n}\n`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"root\": `KeSHAfVUq0d0TKSCDYw7`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.d4vDHiXBd1WM5qAti63W {\n display: inline-flex;\n align-items: center;\n gap: 0.5em;\n user-select: none;\n cursor: pointer;\n}\n.d4vDHiXBd1WM5qAti63W > i {\n flex: 1.2em 0 0;\n height: 1.2em;\n border: 1px solid var(--dry-border-color);\n border-radius: 3px;\n}\n.d4vDHiXBd1WM5qAti63W > i > svg:first-child {\n fill: var(--dry-primary-text);\n}\n.d4vDHiXBd1WM5qAti63W[data-checked=\"true\"] > i {\n border-color: var(--dry-primary);\n background-color: var(--dry-primary);\n}\n.d4vDHiXBd1WM5qAti63W[data-placement=\"right\"] {\n flex-direction: row-reverse;\n}\n`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"root\": `d4vDHiXBd1WM5qAti63W`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.E2koSa7ERmjDWqHw6GHG {\n position: relative;\n}\n.E2koSa7ERmjDWqHw6GHG > svg {\n transform: rotate(-90deg);\n display: block;\n fill: var(--dry-bg);\n}\n.E2koSa7ERmjDWqHw6GHG > svg > circle:first-child {\n stroke: var(--dry-primary);\n}\n.E2koSa7ERmjDWqHw6GHG > svg > circle:last-child {\n stroke: var(--dry-bg);\n stroke-dasharray: 126;\n transition: all 0.6s;\n}\n.CEscnWxVZsE8RYj_HDZw {\n position: absolute;\n inset: 25%;\n z-index: 1;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"root\": `E2koSa7ERmjDWqHw6GHG`,\n\t\"content\": `CEscnWxVZsE8RYj_HDZw`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.Q2G6xRkNfxsgBJOgBLCK {\n display: inline-block;\n list-style: none;\n padding: 0.2em 0.4em;\n margin: 0;\n background-color: var(--dry-bg);\n border: var(--dry-border);\n border-radius: var(--dry-border-radius);\n user-select: none;\n box-shadow: var(--dry-shadow);\n display: grid;\n grid-template-columns: 1fr auto;\n}\n.Q2G6xRkNfxsgBJOgBLCK.checklist > li {\n padding-left: 2em;\n}\n.Q2G6xRkNfxsgBJOgBLCK > li {\n cursor: pointer;\n padding: 0.5em 1em;\n white-space: nowrap;\n border-radius: var(--dry-border-radius);\n position: relative;\n grid-column: span 2;\n display: grid;\n grid-template-columns: subgrid;\n gap: 1em;\n}\n.Q2G6xRkNfxsgBJOgBLCK > li:hover {\n background-color: var(--dry-hover-bg);\n}\n.Q2G6xRkNfxsgBJOgBLCK > li.yy6OYcuJR76KnKsjviWf {\n margin-bottom: 0.6em;\n}\n.Q2G6xRkNfxsgBJOgBLCK > li.yy6OYcuJR76KnKsjviWf::after {\n position: absolute;\n inset: auto 0 -0.3em 0;\n height: var(--dry-border-width);\n background-color: var(--dry-border-color);\n content: \"\";\n}\n.Q2G6xRkNfxsgBJOgBLCK > li > :first-child {\n display: flex;\n justify-content: left;\n align-items: center;\n gap: 0.2em;\n}\n.Q2G6xRkNfxsgBJOgBLCK > li > :first-child > svg {\n width: 1.4em;\n height: 1.2em;\n}\n.Q2G6xRkNfxsgBJOgBLCK > li > :first-child > svg path {\n fill: var(--dry-color);\n}\n.Q2G6xRkNfxsgBJOgBLCK > li > :last-child {\n text-align: right;\n font-size: 0.9em;\n opacity: 0.6;\n}\n.Q2G6xRkNfxsgBJOgBLCK > li.checked {\n padding-left: 0.4em;\n}\n`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"root\": `Q2G6xRkNfxsgBJOgBLCK`,\n\t\"separator\": `yy6OYcuJR76KnKsjviWf`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.liJ16YgDMJgVay4WrFPi {\n position: fixed;\n inset: 0;\n z-index: var(--dry-modal-zindex);\n background-color: var(--dry-modal-fade);\n display: flex;\n justify-content: center;\n align-items: center;\n}\n.liJ16YgDMJgVay4WrFPi {\n animation: appear 0.4s linear 1;\n}\n.nCq60plFwJGcqFbL5rdv {\n background-color: var(--dry-bg);\n border-radius: var(--dry-border-radius);\n padding: 1.5em;\n --dry-shadow: rgba(0, 0, 0, 0.4) 0px 30px 90px;\n box-shadow: var(--dry-shadow);\n position: relative;\n}\n.nCq60plFwJGcqFbL5rdv footer {\n display: flex;\n flex-direction: row;\n justify-content: right;\n gap: 1em;\n margin-top: 2em;\n}\n._A7jpqRlT7DbfOsq4V9S {\n position: absolute;\n top: 0.5em;\n right: 1em;\n font-size: 1.2em;\n background: transparent;\n border: 0;\n cursor: pointer;\n color: var(--dry-color);\n opacity: 0.6;\n}\n._A7jpqRlT7DbfOsq4V9S:hover {\n opacity: 1;\n}\n`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"overlay\": `liJ16YgDMJgVay4WrFPi`,\n\t\"dialog\": `nCq60plFwJGcqFbL5rdv`,\n\t\"close\": `_A7jpqRlT7DbfOsq4V9S`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.isf8Gc5_GjFk8geGtNve {\n display: inline-block;\n position: relative;\n}\n.isf8Gc5_GjFk8geGtNve > input {\n width: 100%;\n max-width: 100%;\n padding-right: 3em;\n}\n.isf8Gc5_GjFk8geGtNve > svg {\n position: absolute;\n right: 0.4em;\n top: 50%;\n transform: translateY(-50%);\n cursor: pointer;\n}\n.isf8Gc5_GjFk8geGtNve > svg path {\n fill: var(--dry-border-color);\n}\n.isf8Gc5_GjFk8geGtNve > input:autofill + svg {\n display: none;\n}\n`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"root\": `isf8Gc5_GjFk8geGtNve`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.RO6BJCwm_qKQvbOfoVIQ {\n position: fixed;\n inset: 0 0 0 0;\n z-index: var(--dry-popover-zindex);\n background-color: transparent;\n}\n.jDcs6HyHFJI8HJVflmrC {\n position: absolute;\n z-index: 1;\n}\n`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"overlay\": `RO6BJCwm_qKQvbOfoVIQ`,\n\t\"content\": `jDcs6HyHFJI8HJVflmrC`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.WRm9AvCgUveRON5TrcML {\n background-color: var(--dry-progress-bg);\n border-radius: var(--dry-border-radius);\n overflow: hidden;\n}\n.WRm9AvCgUveRON5TrcML > div {\n background-color: var(--dry-progress-color);\n border-radius: var(--dry-border-radius);\n height: 0.4em;\n transform-origin: 0 0;\n transition: all 0.8s;\n}\n`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"root\": `WRm9AvCgUveRON5TrcML`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.e_peFIsugxlj_DZrXUM7 {\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 1em;\n background-color: var(--dry-bg);\n color: var(--dry-color);\n font-size: 1rem;\n font-weight: 500;\n border: var(--dry-border);\n border-radius: var(--dry-border-radius);\n padding: 0.5em 0.8em;\n cursor: pointer;\n}\n.e_peFIsugxlj_DZrXUM7:focus {\n border-color: var(--dry-primary);\n}\n.e_peFIsugxlj_DZrXUM7 > span {\n flex: 1 1 100%;\n text-align: left;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.e_peFIsugxlj_DZrXUM7 > svg path {\n fill: var(--dry-border-color);\n}\n.tYZP_ZrLUaQHJrCj_S2_ {\n position: fixed;\n z-index: var(--dry-popover-zindex);\n background-color: var(--dry-bg);\n list-style: none;\n padding: 2px 0;\n margin: 0;\n border: var(--dry-border);\n border-radius: var(--dry-border-radius);\n box-shadow: var(--dry-shadow);\n}\n.tYZP_ZrLUaQHJrCj_S2_ > li {\n padding: 0.5em 1em;\n min-height: 1em;\n cursor: pointer;\n transition: all var(--dry-transition);\n}\n.tYZP_ZrLUaQHJrCj_S2_ > li:hover {\n background-color: var(--dry-hover-bg);\n}\n.tYZP_ZrLUaQHJrCj_S2_ > li.vUDwk2GpK4z5JUDly4NH,\n.tYZP_ZrLUaQHJrCj_S2_ > li:hover.vUDwk2GpK4z5JUDly4NH {\n background-color: var(--dry-primary-highlight);\n color: var(--dry-primary-highlight-text);\n font-weight: bold;\n}\n`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"button\": `e_peFIsugxlj_DZrXUM7`,\n\t\"options\": `tYZP_ZrLUaQHJrCj_S2_`,\n\t\"active\": `vUDwk2GpK4z5JUDly4NH`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.Zl4tj6cB6WZUbDQ0tYR9 {\n animation: TA8Dg9xAZrGTFeqYfy7r 2s linear infinite;\n}\n.Zl4tj6cB6WZUbDQ0tYR9 > circle {\n stroke: var(--dry-primary);\n stroke-linecap: round;\n animation: td4fStxLvB2SAvwiY6LL 1.5s ease-in-out infinite;\n}\n@keyframes TA8Dg9xAZrGTFeqYfy7r {\n 100% {\n transform: rotate(360deg);\n }\n}\n@keyframes td4fStxLvB2SAvwiY6LL {\n 0% {\n stroke-dasharray: 1, 150;\n stroke-dashoffset: 0;\n }\n 50% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -35;\n }\n 100% {\n stroke-dasharray: 90, 150;\n stroke-dashoffset: -124;\n }\n}\n`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"root\": `Zl4tj6cB6WZUbDQ0tYR9`,\n\t\"rotate\": `TA8Dg9xAZrGTFeqYfy7r`,\n\t\"dash\": `td4fStxLvB2SAvwiY6LL`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.rg2Eqk78Ebeb8IHOmYkS {\n display: flex;\n align-items: stretch;\n width: 100%;\n height: 100%;\n background-color: var(--background);\n}\n.rg2Eqk78Ebeb8IHOmYkS > div {\n overflow-x: auto;\n}\n.rg2Eqk78Ebeb8IHOmYkS > div > * {\n max-height: 100%;\n height: 100%;\n}\n.rg2Eqk78Ebeb8IHOmYkS > div:first-child {\n flex: calc(50% - var(--dry-resizer-width) / 2) 0 0;\n}\n.rg2Eqk78Ebeb8IHOmYkS > div:last-child {\n flex: 100% 1 1;\n}\n.rg2Eqk78Ebeb8IHOmYkS > i {\n flex: var(--dry-resizer-width) 0 0;\n background-color: var(--dry-resizer-color);\n cursor: col-resize;\n position: relative;\n}\n.rg2Eqk78Ebeb8IHOmYkS[data-vertical=\"true\"] {\n flex-direction: column;\n}\n.rg2Eqk78Ebeb8IHOmYkS[data-vertical=\"true\"] > div {\n overflow-y: auto;\n}\n.rg2Eqk78Ebeb8IHOmYkS[data-vertical=\"true\"] > i {\n cursor: row-resize;\n}\n`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"root\": `rg2Eqk78Ebeb8IHOmYkS`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.lBe_oSTt_ZP6yOPJVcH0 {\n display: inline-flex;\n align-items: center;\n cursor: pointer;\n}\n.lBe_oSTt_ZP6yOPJVcH0 > .toggle {\n width: 44px;\n height: 24px;\n}\n.lBe_oSTt_ZP6yOPJVcH0 > .toggle rect {\n fill: var(--dry-border-color);\n transition: all 0.3s ease-in-out;\n}\n.lBe_oSTt_ZP6yOPJVcH0 > .toggle circle {\n fill: var(--dry-control-bg);\n transition: all 0.3s ease-in-out;\n}\n.lBe_oSTt_ZP6yOPJVcH0[data-on=\"true\"] > .toggle rect {\n fill: var(--dry-primary);\n}\n`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"root\": `lBe_oSTt_ZP6yOPJVcH0`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.Da3jBk1212Y1clUFgI_o {\n position: fixed;\n left: 0;\n top: 0;\n z-index: var(--dry-tooltip-zindex);\n background-color: var(--dry-tooltip-bg);\n color: var(--dry-tooltip-color);\n border-radius: var(--dry-border-radius);\n padding: 2px 5px;\n white-space: nowrap;\n pointer-events: none;\n}\n.Da3jBk1212Y1clUFgI_o {\n animation: appear 0.6s linear 1;\n}\n.Da3jBk1212Y1clUFgI_o > code {\n margin-left: 1em;\n text-align: center;\n font-size: 0.9em;\n opacity: 0.6;\n color: var(--dry-tooltip-color);\n}\n`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"tooltip\": `Da3jBk1212Y1clUFgI_o`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.Ngw7sIkIIKiUxX0QLi2D {\n padding-top: 2.2rem;\n position: relative;\n background-color: var(--background);\n height: 100vh;\n overflow: hidden;\n}\n.Ngw7sIkIIKiUxX0QLi2D.hasQueues {\n padding-bottom: 2em;\n}\n.Ngw7sIkIIKiUxX0QLi2D > .queues {\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n height: 4em;\n padding: 0.3em 0.6em;\n background-color: var(--bar-background);\n color: var(--bar-color);\n text-overflow: ellipsis;\n display: flex;\n gap: 0.6em;\n align-items: center;\n}\n.Ngw7sIkIIKiUxX0QLi2D > .queues > div {\n flex: 2em 0 1;\n}\n.Ngw7sIkIIKiUxX0QLi2D > .queues > div.active {\n flex: 100% 1 1;\n}\n.Ngw7sIkIIKiUxX0QLi2D > .queues > div:not(.active) {\n cursor: pointer;\n}\n.I1IbaRHH91BDfsVegY7F {\n position: absolute;\n top: 0;\n right: 0;\n left: 0;\n height: 2.2rem;\n padding: 0.2em 0.6em;\n display: flex;\n justify-content: space-between;\n align-items: center;\n}\n.I1IbaRHH91BDfsVegY7F > span:first-child {\n display: flex;\n gap: 1em;\n align-items: center;\n}\n.I1IbaRHH91BDfsVegY7F > span:first-child > a:first-child {\n text-decoration: none;\n display: flex;\n justify-content: center;\n align-items: center;\n text-align: center;\n font-size: 1.4rem;\n font-weight: 600;\n}\n.I1IbaRHH91BDfsVegY7F > span:first-child > a:first-child > span {\n width: 2rem;\n background-color: #4e91fd;\n color: #F2EE53;\n border-radius: 4px;\n font-weight: 600;\n font-size: 1.2rem;\n margin-right: 0.6em;\n}\n.I1IbaRHH91BDfsVegY7F > span:first-child > nav {\n display: flex;\n justify-content: center;\n align-items: center;\n gap: 1em;\n background-color: var(--bar-background);\n border-radius: 6px;\n padding: 3px 10px;\n}\n.I1IbaRHH91BDfsVegY7F > span:first-child > nav > svg > path {\n fill: var(--bar-color);\n}\n.I1IbaRHH91BDfsVegY7F > span:first-child > nav > a {\n display: flex;\n gap: 0.5em;\n align-items: center;\n text-decoration: none;\n background-color: var(--background);\n font-size: 0.8rem;\n border-radius: 6px;\n padding: 3px 6px;\n}\n.I1IbaRHH91BDfsVegY7F > span:first-child > nav > a > svg > path {\n transition: all 0.6s;\n fill: var(--bar-color);\n}\n.I1IbaRHH91BDfsVegY7F > span:first-child > nav > a > span {\n transition: all 0.6s;\n color: var(--bar-color);\n}\n.I1IbaRHH91BDfsVegY7F > span:first-child > nav > a:hover {\n --bar-color: var(--color);\n}\n.I1IbaRHH91BDfsVegY7F > span:last-child {\n display: flex;\n gap: 1em;\n}\n.I1IbaRHH91BDfsVegY7F > span:last-child > button:not([type=\"button\"]) {\n font-size: 1.2rem;\n color: var(--bar-color);\n cursor: pointer;\n opacity: 0.6;\n transition: all 0.6s;\n}\n.I1IbaRHH91BDfsVegY7F > span:last-child > button:not([type=\"button\"]):hover {\n opacity: 1;\n}\n.Wene3lgkhzJ7k1L4X9_1 {\n height: 100%;\n}\n.fill-center {\n height: 100%;\n}\n._uBLdumUYHf9qzxOniD9 {\n border: 1px solid transparent;\n background-clip: padding-box;\n background-color: var(--bar-background);\n padding: 0.5rem 1em;\n border-radius: var(--dry-border-radius);\n box-shadow: var(--dry-shadow);\n}\n._uBLdumUYHf9qzxOniD9 > p {\n padding: 0.2em 0;\n}\n._uBLdumUYHf9qzxOniD9 > p em {\n font-weight: 500;\n background-color: var(--background);\n padding: 0.4em 0.5em;\n}\n._uBLdumUYHf9qzxOniD9 > pre {\n display: block;\n font-family: monospace;\n background-color: var(--background);\n padding: 0.1em;\n margin: 0.2em;\n}\n`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"root\": `Ngw7sIkIIKiUxX0QLi2D`,\n\t\"hasQueues\": `hasQueues`,\n\t\"queues\": `queues`,\n\t\"active\": `active`,\n\t\"toolbar\": `I1IbaRHH91BDfsVegY7F`,\n\t\"workspace\": `Wene3lgkhzJ7k1L4X9_1`,\n\t\"fillCenter\": `fill-center`,\n\t\"update\": `_uBLdumUYHf9qzxOniD9`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.sep {\n font-family: 'Material Symbols Outlined';\n font-size: 0.8em;\n opacity: 0.6;\n content: \"arrow_forward_ios\";\n}\n.gBCUM1mxIaQRmJMmNsAg {\n user-select: none;\n display: flex;\n align-items: center;\n background-color: var(--background);\n color: var(--color);\n font-size: 1.1em;\n margin: 0.4em;\n padding: 0.2em 0.4em;\n border: 1px solid transparent;\n transition: border 0.6s;\n border-radius: 6px;\n}\n.gBCUM1mxIaQRmJMmNsAg em {\n background-color: var(--selected-background);\n border-radius: 6px;\n display: flex;\n align-items: center;\n gap: 0.3em;\n padding: 0 0.4em;\n cursor: pointer;\n}\n.gBCUM1mxIaQRmJMmNsAg em > span {\n overflow-x: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.gBCUM1mxIaQRmJMmNsAg .connection.icon {\n font-size: 1.1em;\n padding-right: 0.2em;\n cursor: pointer;\n}\n.gBCUM1mxIaQRmJMmNsAg > span {\n flex: auto 0 1;\n white-space: nowrap;\n overflow-x: hidden;\n text-overflow: ellipsis;\n cursor: pointer;\n padding: 0 0.2em;\n border-radius: 6px;\n}\n.gBCUM1mxIaQRmJMmNsAg > span:hover {\n background-color: var(--selected-background);\n}\n.gBCUM1mxIaQRmJMmNsAg > i {\n flex: auto 0 0;\n font-size: 0.7em;\n opacity: 0.6;\n}\n`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"sep\": `sep`,\n\t\"root\": `gBCUM1mxIaQRmJMmNsAg`,\n\t\"connection\": `connection`,\n\t\"icon\": `icon`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.Xlh6NqHA_ERyTV80IR7B {\n display: contents;\n}\n.Xlh6NqHA_ERyTV80IR7B td:not(.d) .fileicon {\n background: none !important;\n}\n.Xlh6NqHA_ERyTV80IR7B td:not(.d) .fileicon::before {\n font-family: 'Material Symbols Outlined' !important;\n opacity: 0.6;\n font-size: 1rem !important;\n content: 'cloud_upload' !important;\n}\n`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"root\": `Xlh6NqHA_ERyTV80IR7B`,\n\t\"d\": `d`,\n\t\"fileicon\": `fileicon`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.hptB55GiM0HjF62RL4YL {\n width: 100%;\n font-size: 1rem;\n border: var(--dry-border);\n border-radius: var(--dry-border-radius);\n background-color: var(--dry-control-bg);\n color: var(--color);\n padding: 0 0.2em;\n font-size: 0.9rem;\n}\n.hptB55GiM0HjF62RL4YL.error {\n border-color: var(--dry-error-text);\n}\n`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"root\": `hptB55GiM0HjF62RL4YL`,\n\t\"error\": `error`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.cA98L5hbZ94cB04Zdtkl {\n position: fixed;\n right: 1em;\n bottom: 4em;\n z-index: 99;\n background-color: var(--bar-background);\n width: 45vw;\n height: 15vh;\n padding: 1.2rem 0.5rem 0.5rem 3.5rem;\n border-radius: var(--dry-border-radius);\n}\n.cA98L5hbZ94cB04Zdtkl > .close {\n position: absolute;\n right: 0.8rem;\n top: 0.2rem;\n font-size: 0.8em;\n cursor: pointer;\n}\n.cA98L5hbZ94cB04Zdtkl > .icon {\n position: absolute;\n font-size: 2.5rem;\n left: 0.5rem;\n top: 50%;\n transform: translateY(-50%);\n color: var(--attention-color);\n}\n.cA98L5hbZ94cB04Zdtkl > .icon[data-type=\"info\"] {\n color: var(--info-color);\n}\n.cA98L5hbZ94cB04Zdtkl > div {\n overflow-y: scroll;\n max-height: 100%;\n border-radius: var(--dry-border-radius);\n font-size: 0.8rem;\n padding: 0.2em;\n}\n.cA98L5hbZ94cB04Zdtkl > div em {\n display: block;\n font-weight: 500;\n background-color: var(--background);\n padding: 0.4em 0.5em;\n}\n.cA98L5hbZ94cB04Zdtkl .message b {\n font-weight: 600;\n}\n.cA98L5hbZ94cB04Zdtkl .message em {\n display: inline-flex;\n}\n.cA98L5hbZ94cB04Zdtkl .message pre {\n display: block;\n font-family: monospace;\n background-color: var(--background);\n padding: 0.4em 0.5em;\n}\n.cA98L5hbZ94cB04Zdtkl > footer {\n position: absolute;\n left: 2rem;\n right: 2rem;\n bottom: 0.5em;\n display: flex;\n justify-content: right;\n align-items: center;\n gap: 1em;\n}\n`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"root\": `cA98L5hbZ94cB04Zdtkl`,\n\t\"close\": `close`,\n\t\"icon\": `icon`,\n\t\"message\": `message`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.v8JghCVLbQeK4iVCV0h3 {\n height: 100%;\n display: flex;\n flex-direction: column;\n border-top: 1px solid transparent;\n transition: border-color 0.6s;\n}\n.v8JghCVLbQeK4iVCV0h3 > header {\n position: sticky;\n top: 0;\n background-color: var(--bar-background);\n width: 100%;\n user-select: none;\n}\n.v8JghCVLbQeK4iVCV0h3 > header > .toolbar {\n flex: 20px 0 0 ;\n display: flex;\n justify-content: end;\n}\n.v8JghCVLbQeK4iVCV0h3 > header > .toolbar > button {\n flex: 20px 0 0;\n height: 20px;\n padding: 2px;\n cursor: pointer;\n}\n.v8JghCVLbQeK4iVCV0h3 > header > .path {\n width: 100%;\n display: flex;\n gap: 0.5em;\n align-items: center;\n padding-left: 0.5em;\n}\n.v8JghCVLbQeK4iVCV0h3 > header > .path button {\n flex: 1em 0 0;\n height: 1.4em;\n color: var(--bar-color);\n font-size: 1.2em;\n cursor: pointer;\n}\n.v8JghCVLbQeK4iVCV0h3 > header > .path button:hover {\n background-color: var(--hover-background);\n}\n.v8JghCVLbQeK4iVCV0h3 > header > .path button:disabled {\n cursor: default;\n opacity: 0.6;\n}\n.v8JghCVLbQeK4iVCV0h3 > header > .path button:disabled:hover {\n background-color: transparent;\n}\n.v8JghCVLbQeK4iVCV0h3 > header > .path div {\n flex: 100% 1 1;\n overflow-y: hidden;\n}\n.v8JghCVLbQeK4iVCV0h3 > .list {\n flex: 100% 1 1;\n overflow: auto;\n}\n.v8JghCVLbQeK4iVCV0h3 > footer {\n background-color: var(--bar-background);\n flex: 1.5em 0 0;\n padding: 0 1em;\n font-size: 0.9em;\n opacity: 0.8;\n white-space: nowrap;\n overflow: hidden;\n}\n.v8JghCVLbQeK4iVCV0h3.focused {\n border-color: var(--active-border-color);\n}\n`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"root\": `v8JghCVLbQeK4iVCV0h3`,\n\t\"toolbar\": `toolbar`,\n\t\"path\": `path`,\n\t\"list\": `list`,\n\t\"focused\": `focused`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.quEmf7iby8BXeRKio4GA {\n display: flex;\n align-items: center;\n gap: 0.6em;\n padding: 0.4em 1em 0.4em 0.4em;\n background-color: var(--bar-background);\n}\n.quEmf7iby8BXeRKio4GA > div {\n flex: 100% 1 1;\n display: flex;\n background-color: var(--background);\n padding: 0.2em 0.6em 0.2em 0.3em;\n border-radius: var(--dry-border-radius);\n}\n.quEmf7iby8BXeRKio4GA > div > i {\n flex: 1em 0 0;\n color: var(--bar-color);\n font-size: 1.3em;\n margin-top: 0.1em;\n opacity: 0.6;\n}\n.quEmf7iby8BXeRKio4GA > div .UJhi44HBi6Vvj65c8eIf {\n flex: 100% 1 1;\n}\n.quEmf7iby8BXeRKio4GA > div .UJhi44HBi6Vvj65c8eIf button {\n flex: 1em 0 0;\n display: flex;\n font-size: 0.7rem;\n border-radius: 2px;\n padding: 0.1em 0.4em;\n opacity: 0.8;\n cursor: pointer;\n}\n.quEmf7iby8BXeRKio4GA > div .UJhi44HBi6Vvj65c8eIf button:hover {\n background-color: var(--hover-background);\n}\n.quEmf7iby8BXeRKio4GA > div .UJhi44HBi6Vvj65c8eIf button[data-on=\"true\"] {\n background-color: var(--selected-background);\n}\n.quEmf7iby8BXeRKio4GA > div .UJhi44HBi6Vvj65c8eIf button > .icon {\n font-size: 1.4em;\n line-height: 1.1em;\n}\n.quEmf7iby8BXeRKio4GA > div .UJhi44HBi6Vvj65c8eIf .SAZBshKkqC1vfPMG87rS {\n flex: 100% 1 1;\n display: flex;\n align-items: center;\n gap: 0.2em;\n}\n.quEmf7iby8BXeRKio4GA > div .UJhi44HBi6Vvj65c8eIf .SAZBshKkqC1vfPMG87rS > input {\n flex: 100% 1 1;\n background-color: var(--background);\n font-size: 0.9rem;\n border: 1px solid transparent;\n}\n.quEmf7iby8BXeRKio4GA > div .UJhi44HBi6Vvj65c8eIf .SAZBshKkqC1vfPMG87rS > input::placeholder {\n font-weight: 300;\n opacity: 0.6;\n}\n.quEmf7iby8BXeRKio4GA > div .UJhi44HBi6Vvj65c8eIf .SAZBshKkqC1vfPMG87rS[data-error=\"true\"] > input {\n color: var(--dry-error-text);\n}\n.quEmf7iby8BXeRKio4GA > div .UJhi44HBi6Vvj65c8eIf .eVCcuX6qaQb3d0DUEO4O {\n margin-top: 0.4em;\n font-size: 0.9em;\n display: flex;\n align-items: center;\n gap: 0.2em;\n}\n.quEmf7iby8BXeRKio4GA > div .UJhi44HBi6Vvj65c8eIf .eVCcuX6qaQb3d0DUEO4O button {\n display: flex;\n gap: 0.2em;\n padding: 0 0.2em;\n}\n.quEmf7iby8BXeRKio4GA > div .UJhi44HBi6Vvj65c8eIf .eVCcuX6qaQb3d0DUEO4O > i {\n opacity: 0.3;\n}\n.quEmf7iby8BXeRKio4GA > div .UJhi44HBi6Vvj65c8eIf .eVCcuX6qaQb3d0DUEO4O ._iULeRbGf3pwixVjB2QI {\n flex: 100% 1 1;\n justify-content: right;\n border-radius: 2px;\n display: flex;\n gap: 0.2em;\n align-items: center;\n}\n.quEmf7iby8BXeRKio4GA > div .UJhi44HBi6Vvj65c8eIf .eVCcuX6qaQb3d0DUEO4O ._iULeRbGf3pwixVjB2QI > i {\n opacity: 0.3;\n}\n.quEmf7iby8BXeRKio4GA > div .UJhi44HBi6Vvj65c8eIf .eVCcuX6qaQb3d0DUEO4O ._iULeRbGf3pwixVjB2QI > button {\n border-radius: 2px;\n padding: 0em 0.4em;\n white-space: nowrap;\n}\n.quEmf7iby8BXeRKio4GA > button {\n flex: 1em 0 0;\n color: var(--bar-color);\n cursor: pointer;\n}\n`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"root\": `quEmf7iby8BXeRKio4GA`,\n\t\"filter\": `UJhi44HBi6Vvj65c8eIf`,\n\t\"icon\": `icon`,\n\t\"name\": `SAZBshKkqC1vfPMG87rS`,\n\t\"other\": `eVCcuX6qaQb3d0DUEO4O`,\n\t\"git\": `_iULeRbGf3pwixVjB2QI`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.RMQCDj2fZHqlQw8rpCmy {\n padding: 0 0.4em 0 0.8em;\n background-color: var(--background);\n}\n.RMQCDj2fZHqlQw8rpCmy table {\n width: 100%;\n border-spacing: 0;\n table-layout: fixed;\n cursor: default;\n user-select: none;\n}\n.RMQCDj2fZHqlQw8rpCmy table thead {\n position: sticky;\n top: 0;\n z-index: 1;\n}\n.RMQCDj2fZHqlQw8rpCmy table thead th {\n background-color: var(--background);\n font-weight: 500;\n text-align: left;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 2px;\n border-bottom: 8px solid transparent;\n box-sizing: border-box;\n position: relative;\n}\n.RMQCDj2fZHqlQw8rpCmy table thead th > i {\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: 2px;\n margin: 0 3px;\n background-color: var(--border-color);\n cursor: col-resize;\n}\n.RMQCDj2fZHqlQw8rpCmy table thead th:last-child::after {\n display: none;\n}\n.RMQCDj2fZHqlQw8rpCmy table thead th.sorted {\n padding-right: calc(1.5em + 8px);\n}\n.RMQCDj2fZHqlQw8rpCmy table thead th:not(:last-child) {\n cursor: pointer;\n}\n.RMQCDj2fZHqlQw8rpCmy table thead th:not(:last-child) span {\n position: absolute;\n top: -0.1em;\n right: 2px;\n font-size: 2em;\n}\n.RMQCDj2fZHqlQw8rpCmy table thead th.drop {\n cursor: ew-resize;\n}\n.RMQCDj2fZHqlQw8rpCmy table thead th.drop > i {\n background-color: var(--selected-color);\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr {\n animation: appear 0.4s linear 1;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr > td {\n border-width: 1px 0 1px 0;\n border-style: solid;\n border-color: transparent;\n overflow-y: hidden;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr > td:first-child {\n border-left-width: 1px;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr > td:last-child {\n border-right-width: 1px;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr.dragover > td {\n background-color: var(--drop-background) !important;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td {\n --icon-size: 0.8rem;\n padding: 0.08em 0;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child {\n width: 100%;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child > div {\n display: flex;\n align-items: center;\n gap: 0 0.3em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child > div.expanded > .icon {\n transform: rotate(90deg);\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child > div > .icon {\n opacity: 0.6;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child > div > .fileicon {\n opacity: 0.8;\n width: 1rem;\n height: 1rem;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child > div > .fileicon::before {\n font-size: 1rem;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child > div > span {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child > div > ul {\n flex: auto 1 1;\n display: flex;\n justify-content: end;\n gap: 1em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child > div > ul > .icon {\n font-size: 1.2em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child:not(.d):not(.i) > div {\n padding-left: calc(var(--icon-size) + 0.3em);\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"1\"] {\n padding-left: 0.6em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"2\"] {\n padding-left: 1.2em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"3\"] {\n padding-left: 1.8em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"4\"] {\n padding-left: 2.4em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"5\"] {\n padding-left: 3em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"6\"] {\n padding-left: 3.6em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"7\"] {\n padding-left: 4.2em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"8\"] {\n padding-left: 4.8em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"9\"] {\n padding-left: 5.4em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"10\"] {\n padding-left: 6em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"11\"] {\n padding-left: 6.6em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"12\"] {\n padding-left: 7.2em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"13\"] {\n padding-left: 7.8em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"14\"] {\n padding-left: 8.4em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"15\"] {\n padding-left: 9em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"16\"] {\n padding-left: 9.6em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"17\"] {\n padding-left: 10.2em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"18\"] {\n padding-left: 10.8em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"19\"] {\n padding-left: 11.4em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"20\"] {\n padding-left: 12em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"21\"] {\n padding-left: 12.6em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"22\"] {\n padding-left: 13.2em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"23\"] {\n padding-left: 13.8em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"24\"] {\n padding-left: 14.4em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"25\"] {\n padding-left: 15em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"26\"] {\n padding-left: 15.6em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"27\"] {\n padding-left: 16.2em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"28\"] {\n padding-left: 16.8em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"29\"] {\n padding-left: 17.4em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"30\"] {\n padding-left: 18em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"31\"] {\n padding-left: 18.6em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"32\"] {\n padding-left: 19.2em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"33\"] {\n padding-left: 19.8em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"34\"] {\n padding-left: 20.4em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"35\"] {\n padding-left: 21em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"36\"] {\n padding-left: 21.6em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"37\"] {\n padding-left: 22.2em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"38\"] {\n padding-left: 22.8em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"39\"] {\n padding-left: 23.4em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"40\"] {\n padding-left: 24em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"41\"] {\n padding-left: 24.6em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"42\"] {\n padding-left: 25.2em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"43\"] {\n padding-left: 25.8em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"44\"] {\n padding-left: 26.4em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"45\"] {\n padding-left: 27em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"46\"] {\n padding-left: 27.6em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"47\"] {\n padding-left: 28.2em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"48\"] {\n padding-left: 28.8em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"49\"] {\n padding-left: 29.4em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"50\"] {\n padding-left: 30em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"51\"] {\n padding-left: 30.6em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"52\"] {\n padding-left: 31.2em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"53\"] {\n padding-left: 31.8em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"54\"] {\n padding-left: 32.4em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"55\"] {\n padding-left: 33em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"56\"] {\n padding-left: 33.6em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"57\"] {\n padding-left: 34.2em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"58\"] {\n padding-left: 34.8em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"59\"] {\n padding-left: 35.4em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"60\"] {\n padding-left: 36em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"61\"] {\n padding-left: 36.6em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"62\"] {\n padding-left: 37.2em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"63\"] {\n padding-left: 37.8em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"64\"] {\n padding-left: 38.4em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"65\"] {\n padding-left: 39em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"66\"] {\n padding-left: 39.6em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"67\"] {\n padding-left: 40.2em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"68\"] {\n padding-left: 40.8em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"69\"] {\n padding-left: 41.4em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"70\"] {\n padding-left: 42em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"71\"] {\n padding-left: 42.6em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"72\"] {\n padding-left: 43.2em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"73\"] {\n padding-left: 43.8em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"74\"] {\n padding-left: 44.4em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"75\"] {\n padding-left: 45em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"76\"] {\n padding-left: 45.6em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"77\"] {\n padding-left: 46.2em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"78\"] {\n padding-left: 46.8em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"79\"] {\n padding-left: 47.4em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"80\"] {\n padding-left: 48em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"81\"] {\n padding-left: 48.6em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"82\"] {\n padding-left: 49.2em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"83\"] {\n padding-left: 49.8em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"84\"] {\n padding-left: 50.4em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"85\"] {\n padding-left: 51em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"86\"] {\n padding-left: 51.6em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"87\"] {\n padding-left: 52.2em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"88\"] {\n padding-left: 52.8em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"89\"] {\n padding-left: 53.4em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"90\"] {\n padding-left: 54em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"91\"] {\n padding-left: 54.6em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"92\"] {\n padding-left: 55.2em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"93\"] {\n padding-left: 55.8em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"94\"] {\n padding-left: 56.4em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"95\"] {\n padding-left: 57em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"96\"] {\n padding-left: 57.6em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"97\"] {\n padding-left: 58.2em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"98\"] {\n padding-left: 58.8em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"99\"] {\n padding-left: 59.4em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:first-child[data-depth=\"100\"] {\n padding-left: 60em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td:not(:last-child) {\n padding-right: 0.5em;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr td.type-number {\n text-align: right;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr.selected {\n background-color: var(--selected-background);\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr.selected > td,\n.RMQCDj2fZHqlQw8rpCmy table tbody tr.selected > td > div > span {\n color: var(--selected-color);\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr:hover {\n background-color: var(--hover-background);\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr.up {\n opacity: 0.6;\n}\n.RMQCDj2fZHqlQw8rpCmy table tbody tr.up .icon {\n transform: rotate(90deg);\n font-size: 1.1em;\n}\n.RMQCDj2fZHqlQw8rpCmy table th,\n.RMQCDj2fZHqlQw8rpCmy table td {\n white-space: nowrap;\n overflow-x: hidden;\n text-overflow: ellipsis;\n}\n.RMQCDj2fZHqlQw8rpCmy:focus tr.target > td {\n border-color: var(--active-border-color);\n}\n`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"root\": `RMQCDj2fZHqlQw8rpCmy`,\n\t\"sorted\": `sorted`,\n\t\"drop\": `drop`,\n\t\"dragover\": `dragover`,\n\t\"expanded\": `expanded`,\n\t\"icon\": `icon`,\n\t\"fileicon\": `fileicon`,\n\t\"d\": `d`,\n\t\"i\": `i`,\n\t\"typeNumber\": `type-number`,\n\t\"selected\": `selected`,\n\t\"up\": `up`,\n\t\"target\": `target`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.SdwR6GLozHlor501OOfV {\n display: flex;\n align-items: center;\n}\n.SdwR6GLozHlor501OOfV > i {\n padding: 0 0.3em;\n opacity: 0.6;\n}\n.SdwR6GLozHlor501OOfV > .icon {\n font-size: 1.5em;\n padding: 0;\n}\n`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"root\": `SdwR6GLozHlor501OOfV`,\n\t\"icon\": `icon`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.ygMTY6277yZU49vFVGyA .progress {\n display: flex;\n justify-content: center;\n align-items: center;\n font-size: 0.4rem;\n}\n.ygMTY6277yZU49vFVGyA .progress > :first-child {\n flex: 100% 1 1;\n}\n.ygMTY6277yZU49vFVGyA .progress .icon {\n flex: auto 0 0;\n font-size: 3.2em;\n margin-left: 0.4em;\n cursor: pointer;\n}\n`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"active\": `ygMTY6277yZU49vFVGyA`,\n\t\"progress\": `progress`,\n\t\"icon\": `icon`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.ISKo4CnGBHkP0OdpuJr1 > p {\n line-height: 2em;\n}\n.ISKo4CnGBHkP0OdpuJr1 > p > strong {\n display: block;\n background-color: var(--bar-background);\n font-size: 1em;\n padding: 0.1em 0.5em;\n border-radius: var(--dry-border-radius);\n}\n.ISKo4CnGBHkP0OdpuJr1 > div:last-of-type {\n margin-bottom: 3em;\n}\n.gtGmNB9tGTyb3C7eowq3 {\n display: flex;\n padding: 0.8em 0;\n align-items: center;\n}\n.gtGmNB9tGTyb3C7eowq3 > i {\n flex: 2em 0 0;\n font-size: 2em;\n text-align: center;\n}\n.qnh8nBe8UxyXpDBHM04A {\n margin-top: 2em;\n display: flex;\n flex-direction: column;\n gap: 1em;\n}\n`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"root\": `ISKo4CnGBHkP0OdpuJr1`,\n\t\"file\": `gtGmNB9tGTyb3C7eowq3`,\n\t\"checks\": `qnh8nBe8UxyXpDBHM04A`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.YFN8PpGqOIHmkqyRsXsY {\n display: flex;\n justify-content: right;\n align-items: center;\n gap: 0.5em;\n background-color: var(--bar-background);\n color: var(--border-color);\n padding: 0.1em 0.4em 0 0.4em;\n user-select: none;\n}\n.YFN8PpGqOIHmkqyRsXsY > .icon {\n display: flex;\n align-items: center;\n gap: 0.2em;\n font-size: 1.1rem;\n color: var(--bar-color);\n padding: 0.2em;\n border-radius: 4px;\n cursor: pointer;\n}\n.YFN8PpGqOIHmkqyRsXsY > .icon:hover {\n background-color: var(--hover-background);\n}\n.YFN8PpGqOIHmkqyRsXsY > .icon:disabled {\n opacity: 0.6;\n cursor: auto;\n}\n.YFN8PpGqOIHmkqyRsXsY > .icon:disabled:hover {\n background-color: inherit;\n color: revert;\n}\n.YFN8PpGqOIHmkqyRsXsY > .icon > span {\n font-family: var(--font-family);\n font-size: 0.8rem;\n}\n.YFN8PpGqOIHmkqyRsXsY > i {\n height: 1rem;\n width: 1px;\n background-color: var(--bar-color);\n opacity: 0.6;\n}\n`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"root\": `YFN8PpGqOIHmkqyRsXsY`,\n\t\"icon\": `icon`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.PlEnCmtAEWOBOC3_gIuh {\n position: absolute;\n top: 2.2rem;\n left: 50%;\n transform: translateX(-50%);\n background-color: var(--bar-background);\n color: var(--bar-color);\n width: 1.5rem;\n height: 1.5rem;\n border-radius: 6px;\n cursor: pointer;\n z-index: 1;\n font-size: 1.2rem;\n transition: all 0.6s;\n}\n.PlEnCmtAEWOBOC3_gIuh.on {\n color: var(--highlight);\n}\n.FK2E7xoj0UqwBVtCVNTH {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n background-color: var(--bar-background);\n color: var(--border-color);\n border: 1px solid var(--dry-resizer-color);\n border-radius: 6px;\n display: flex;\n flex-direction: column;\n gap: 0.2em;\n cursor: auto;\n user-select: none;\n z-index: 1;\n}\n.FK2E7xoj0UqwBVtCVNTH > .icon {\n font-size: 1.15rem;\n color: var(--bar-color);\n padding: 0.2em 0.1em;\n border-radius: 6px;\n cursor: pointer;\n}\n.FK2E7xoj0UqwBVtCVNTH > .icon:hover {\n background-color: var(--hover-background);\n}\n.FK2E7xoj0UqwBVtCVNTH > .icon:disabled {\n opacity: 0.6;\n cursor: auto;\n}\n.FK2E7xoj0UqwBVtCVNTH > .icon:disabled:hover {\n background-color: inherit;\n color: revert;\n}\n.FK2E7xoj0UqwBVtCVNTH > .icon:nth-child(1),\n.FK2E7xoj0UqwBVtCVNTH > .icon:nth-child(2) {\n transform: rotate(90deg);\n}\n.FK2E7xoj0UqwBVtCVNTH > .icon:nth-child(2) {\n margin-bottom: 0.6em;\n}\n.FK2E7xoj0UqwBVtCVNTH > .icon:nth-child(3),\n.FK2E7xoj0UqwBVtCVNTH > .icon:nth-child(4) {\n transform: rotate(-90deg);\n}\n.resizer {\n user-select: none;\n}\n.left > div .path {\n padding-right: 1rem;\n}\n.right > div .path {\n padding-left: 1rem;\n}\n.sync .breadcrumbs {\n border-color: var(--highlight);\n}\n`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"synctoggle\": `PlEnCmtAEWOBOC3_gIuh`,\n\t\"on\": `on`,\n\t\"transfertoolbar\": `FK2E7xoj0UqwBVtCVNTH`,\n\t\"icon\": `icon`,\n\t\"resizer\": `resizer`,\n\t\"left\": `left`,\n\t\"path\": `path`,\n\t\"right\": `right`,\n\t\"sync\": `sync`,\n\t\"breadcrumbs\": `breadcrumbs`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.vrw97cJxMo7JsVdGuyFF {\n width: 30em;\n}\n.vrw97cJxMo7JsVdGuyFF > h1 {\n text-transform: uppercase;\n font-size: 1.2em;\n font-weight: 600;\n margin-bottom: 1em;\n}\n.vrw97cJxMo7JsVdGuyFF > ul {\n display: flex;\n gap: 0.5em;\n}\n.vrw97cJxMo7JsVdGuyFF > ul li:first-child {\n flex: 80% 0 0;\n}\n.vrw97cJxMo7JsVdGuyFF input[name=\"username\"] {\n display: none;\n}\n.vrw97cJxMo7JsVdGuyFF .username {\n visibility: hidden;\n overflow: hidden;\n height: 0;\n}\n`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"root\": `vrw97cJxMo7JsVdGuyFF`,\n\t\"username\": `username`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.cyHvbkwF9rvkMg2DLbuX {\n font-size: 1rem;\n}\n.cyHvbkwF9rvkMg2DLbuX em {\n font-size: 1rem;\n font-weight: 500;\n padding: 0 0.4em;\n background-color: var(--background);\n}\n.cyHvbkwF9rvkMg2DLbuX p {\n padding: 0.5em 0;\n}\n.cyHvbkwF9rvkMg2DLbuX [name=\"password\"] {\n margin: 0 0.4em;\n}\n.cyHvbkwF9rvkMg2DLbuX .username {\n visibility: hidden;\n overflow: hidden;\n height: 0;\n}\n`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"form\": `cyHvbkwF9rvkMg2DLbuX`,\n\t\"username\": `username`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.xPDp6_U97GiWxdlfA2mR > small {\n display: block;\n font-size: 0.9em;\n margin-top: 2em;\n opacity: 0.6;\n}\n.form {\n width: 28vw;\n}\n.themes {\n display: flex;\n gap: 1em;\n}\n.themes > span {\n flex: 2.4em 0 0;\n height: 2.4em;\n border: var(--dry-border);\n border-width: 2px;\n border-radius: 50%;\n background-color: var(--primary);\n margin: 0.3em;\n cursor: pointer;\n}\n.themes > span[data-active=\"true\"] {\n outline: 0.3em solid var(--primary);\n cursor: auto;\n}\n`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"root\": `xPDp6_U97GiWxdlfA2mR`,\n\t\"form\": `form`,\n\t\"themes\": `themes`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.uHtU0mZgHIQYXkUQwRhP {\n display: flex;\n align-items: center;\n gap: 0.5em;\n}\n.uHtU0mZgHIQYXkUQwRhP > i {\n font-size: 2em;\n}\n.uHtU0mZgHIQYXkUQwRhP small {\n display: block;\n font-size: 0.8em;\n opacity: 0.6;\n}\n`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"flag\": `uHtU0mZgHIQYXkUQwRhP`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `.zobA7Od_xcc9WpGVDqYX {\n padding: 0.5em 0.5em 1em 0.5em;\n background-color: var(--background);\n user-select: none;\n}\n.zobA7Od_xcc9WpGVDqYX > li {\n display: flex;\n gap: 0.5em;\n align-items: start;\n background-color: var(--background);\n border: 1px solid var(--border-color);\n border-left-width: 5px;\n border-radius: var(--dry-border-radius);\n padding: 0.5em 0.5em;\n margin-bottom: 0.5em;\n}\n.zobA7Od_xcc9WpGVDqYX > li > i {\n flex: 1.8em 0 0;\n height: 1.8em;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: var(--bar-background);\n border-radius: 50%;\n font-size: 1.8em;\n margin-top: 0.5em;\n}\n.zobA7Od_xcc9WpGVDqYX > li > article {\n flex: 100% 1 1;\n}\n.zobA7Od_xcc9WpGVDqYX > li > article > h1 {\n font-weight: 600;\n line-height: 2em;\n}\n.zobA7Od_xcc9WpGVDqYX > li > article > div {\n font-size: 0.9em;\n display: flex;\n gap: 0.5em;\n}\n.zobA7Od_xcc9WpGVDqYX > li > article > div > :nth-child(1) {\n flex: 100% 1 1;\n}\n.zobA7Od_xcc9WpGVDqYX > li > article > div > :nth-child(1) .path-breadcrumbs {\n margin: 0.2em 0;\n}\n.zobA7Od_xcc9WpGVDqYX > li > article > div > :nth-child(1) b {\n display: flex;\n gap: 0.5em;\n margin: 0.2em 0;\n}\n.zobA7Od_xcc9WpGVDqYX > li > article > div > :nth-child(1) b i {\n font-size: 1.5em;\n opacity: 0.6;\n}\n.zobA7Od_xcc9WpGVDqYX > li > article > div > :nth-child(1) b > span {\n flex: 0px 0 1;\n display: flex;\n align-items: center;\n gap: 0.5em;\n border: 1px solid var(--border-color);\n padding: 0.4em 0.8em 0.4em 0.4em;\n border-radius: 6px;\n}\n.zobA7Od_xcc9WpGVDqYX > li > article > div > :nth-child(1) b > span > span {\n display: flex;\n flex-direction: column;\n}\n.zobA7Od_xcc9WpGVDqYX > li > article > div > :nth-child(1) b > span > span > span {\n display: flex;\n gap: 0.2em;\n}\n.zobA7Od_xcc9WpGVDqYX > li > article > div > :nth-child(1) b > span > span > span > em {\n display: flex;\n gap: 0.4em;\n align-items: center;\n white-space: nowrap;\n background-color: var(--bar-background);\n padding: 0.1em 0.4em;\n border-radius: 8px;\n}\n.zobA7Od_xcc9WpGVDqYX > li > article > div > :nth-child(1) b > span > span > span > em > i {\n font-size: 0.9em;\n}\n.zobA7Od_xcc9WpGVDqYX > li > article > div > :nth-child(1) * {\n color: var(--bar-color);\n}\n.zobA7Od_xcc9WpGVDqYX > li > article > div > :nth-child(1) > mark {\n display: inline-flex;\n align-items: center;\n gap: 0.4em;\n border-radius: 5px;\n padding: 0.2em 0.6em;\n margin-top: 0.5em;\n}\n.zobA7Od_xcc9WpGVDqYX > li > article > div > :nth-child(1) > mark.synced {\n background-color: var(--success-bg);\n color: var(--success-color);\n}\n.zobA7Od_xcc9WpGVDqYX > li > article > div > :nth-child(1) > mark.synced > * {\n color: var(--success-color);\n}\n.zobA7Od_xcc9WpGVDqYX > li > article > div > :nth-child(1) > mark.syncing {\n background-color: var(--info-bg);\n color: var(--info-color);\n}\n.zobA7Od_xcc9WpGVDqYX > li > article > div > :nth-child(1) > mark.syncing > i {\n color: var(--info-color);\n animation: rotate360 2s linear infinite;\n}\n.zobA7Od_xcc9WpGVDqYX > li > article > div > :nth-child(2) {\n display: flex;\n justify-content: center;\n align-items: start;\n}\n.zobA7Od_xcc9WpGVDqYX > li > article > div > :nth-child(2) > button {\n font-size: 1.8em;\n opacity: 0.8;\n cursor: pointer;\n color: var(--attention-color);\n}\n.zobA7Od_xcc9WpGVDqYX > li > article > div > :nth-child(2) > button:hover {\n opacity: 1;\n}\n.zobA7Od_xcc9WpGVDqYX > li:last-child {\n margin: 0;\n}\n@keyframes rotate360 {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n`, \"\"]);\n// Exports\n___CSS_LOADER_EXPORT___.locals = {\n\t\"list\": `zobA7Od_xcc9WpGVDqYX`,\n\t\"pathBreadcrumbs\": `path-breadcrumbs`,\n\t\"synced\": `synced`,\n\t\"syncing\": `syncing`\n};\nexport default ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","\"use strict\";\n\nmodule.exports = function (url, options) {\n if (!options) {\n options = {};\n }\n if (!url) {\n return url;\n }\n url = String(url.__esModule ? url.default : url);\n\n // If url is already wrapped in quotes, remove them\n if (/^['\"].*['\"]$/.test(url)) {\n url = url.slice(1, -1);\n }\n if (options.hash) {\n url += options.hash;\n }\n\n // Should url be wrapped?\n // See https://drafts.csswg.org/css-values-3/#urls\n if (/[\"'() \\t\\n]|(%20)/.test(url) || options.needQuotes) {\n return \"\\\"\".concat(url.replace(/\"/g, '\\\\\"').replace(/\\n/g, \"\\\\n\"), \"\\\"\");\n }\n return url;\n};","\"use strict\";\n\nmodule.exports = function (i) {\n return i[1];\n};","/*! @preserve\n * numeral.js\n * version : 2.0.6\n * author : Adam Draper\n * license : MIT\n * http://adamwdraper.github.com/Numeral-js/\n */\n\n(function (global, factory) {\n if (typeof define === 'function' && define.amd) {\n define(factory);\n } else if (typeof module === 'object' && module.exports) {\n module.exports = factory();\n } else {\n global.numeral = factory();\n }\n}(this, function () {\n /************************************\n Variables\n ************************************/\n\n var numeral,\n _,\n VERSION = '2.0.6',\n formats = {},\n locales = {},\n defaults = {\n currentLocale: 'en',\n zeroFormat: null,\n nullFormat: null,\n defaultFormat: '0,0',\n scalePercentBy100: true\n },\n options = {\n currentLocale: defaults.currentLocale,\n zeroFormat: defaults.zeroFormat,\n nullFormat: defaults.nullFormat,\n defaultFormat: defaults.defaultFormat,\n scalePercentBy100: defaults.scalePercentBy100\n };\n\n\n /************************************\n Constructors\n ************************************/\n\n // Numeral prototype object\n function Numeral(input, number) {\n this._input = input;\n\n this._value = number;\n }\n\n numeral = function(input) {\n var value,\n kind,\n unformatFunction,\n regexp;\n\n if (numeral.isNumeral(input)) {\n value = input.value();\n } else if (input === 0 || typeof input === 'undefined') {\n value = 0;\n } else if (input === null || _.isNaN(input)) {\n value = null;\n } else if (typeof input === 'string') {\n if (options.zeroFormat && input === options.zeroFormat) {\n value = 0;\n } else if (options.nullFormat && input === options.nullFormat || !input.replace(/[^0-9]+/g, '').length) {\n value = null;\n } else {\n for (kind in formats) {\n regexp = typeof formats[kind].regexps.unformat === 'function' ? formats[kind].regexps.unformat() : formats[kind].regexps.unformat;\n\n if (regexp && input.match(regexp)) {\n unformatFunction = formats[kind].unformat;\n\n break;\n }\n }\n\n unformatFunction = unformatFunction || numeral._.stringToNumber;\n\n value = unformatFunction(input);\n }\n } else {\n value = Number(input)|| null;\n }\n\n return new Numeral(input, value);\n };\n\n // version number\n numeral.version = VERSION;\n\n // compare numeral object\n numeral.isNumeral = function(obj) {\n return obj instanceof Numeral;\n };\n\n // helper functions\n numeral._ = _ = {\n // formats numbers separators, decimals places, signs, abbreviations\n numberToFormat: function(value, format, roundingFunction) {\n var locale = locales[numeral.options.currentLocale],\n negP = false,\n optDec = false,\n leadingCount = 0,\n abbr = '',\n trillion = 1000000000000,\n billion = 1000000000,\n million = 1000000,\n thousand = 1000,\n decimal = '',\n neg = false,\n abbrForce, // force abbreviation\n abs,\n min,\n max,\n power,\n int,\n precision,\n signed,\n thousands,\n output;\n\n // make sure we never format a null value\n value = value || 0;\n\n abs = Math.abs(value);\n\n // see if we should use parentheses for negative number or if we should prefix with a sign\n // if both are present we default to parentheses\n if (numeral._.includes(format, '(')) {\n negP = true;\n format = format.replace(/[\\(|\\)]/g, '');\n } else if (numeral._.includes(format, '+') || numeral._.includes(format, '-')) {\n signed = numeral._.includes(format, '+') ? format.indexOf('+') : value < 0 ? format.indexOf('-') : -1;\n format = format.replace(/[\\+|\\-]/g, '');\n }\n\n // see if abbreviation is wanted\n if (numeral._.includes(format, 'a')) {\n abbrForce = format.match(/a(k|m|b|t)?/);\n\n abbrForce = abbrForce ? abbrForce[1] : false;\n\n // check for space before abbreviation\n if (numeral._.includes(format, ' a')) {\n abbr = ' ';\n }\n\n format = format.replace(new RegExp(abbr + 'a[kmbt]?'), '');\n\n if (abs >= trillion && !abbrForce || abbrForce === 't') {\n // trillion\n abbr += locale.abbreviations.trillion;\n value = value / trillion;\n } else if (abs < trillion && abs >= billion && !abbrForce || abbrForce === 'b') {\n // billion\n abbr += locale.abbreviations.billion;\n value = value / billion;\n } else if (abs < billion && abs >= million && !abbrForce || abbrForce === 'm') {\n // million\n abbr += locale.abbreviations.million;\n value = value / million;\n } else if (abs < million && abs >= thousand && !abbrForce || abbrForce === 'k') {\n // thousand\n abbr += locale.abbreviations.thousand;\n value = value / thousand;\n }\n }\n\n // check for optional decimals\n if (numeral._.includes(format, '[.]')) {\n optDec = true;\n format = format.replace('[.]', '.');\n }\n\n // break number and format\n int = value.toString().split('.')[0];\n precision = format.split('.')[1];\n thousands = format.indexOf(',');\n leadingCount = (format.split('.')[0].split(',')[0].match(/0/g) || []).length;\n\n if (precision) {\n if (numeral._.includes(precision, '[')) {\n precision = precision.replace(']', '');\n precision = precision.split('[');\n decimal = numeral._.toFixed(value, (precision[0].length + precision[1].length), roundingFunction, precision[1].length);\n } else {\n decimal = numeral._.toFixed(value, precision.length, roundingFunction);\n }\n\n int = decimal.split('.')[0];\n\n if (numeral._.includes(decimal, '.')) {\n decimal = locale.delimiters.decimal + decimal.split('.')[1];\n } else {\n decimal = '';\n }\n\n if (optDec && Number(decimal.slice(1)) === 0) {\n decimal = '';\n }\n } else {\n int = numeral._.toFixed(value, 0, roundingFunction);\n }\n\n // check abbreviation again after rounding\n if (abbr && !abbrForce && Number(int) >= 1000 && abbr !== locale.abbreviations.trillion) {\n int = String(Number(int) / 1000);\n\n switch (abbr) {\n case locale.abbreviations.thousand:\n abbr = locale.abbreviations.million;\n break;\n case locale.abbreviations.million:\n abbr = locale.abbreviations.billion;\n break;\n case locale.abbreviations.billion:\n abbr = locale.abbreviations.trillion;\n break;\n }\n }\n\n\n // format number\n if (numeral._.includes(int, '-')) {\n int = int.slice(1);\n neg = true;\n }\n\n if (int.length < leadingCount) {\n for (var i = leadingCount - int.length; i > 0; i--) {\n int = '0' + int;\n }\n }\n\n if (thousands > -1) {\n int = int.toString().replace(/(\\d)(?=(\\d{3})+(?!\\d))/g, '$1' + locale.delimiters.thousands);\n }\n\n if (format.indexOf('.') === 0) {\n int = '';\n }\n\n output = int + decimal + (abbr ? abbr : '');\n\n if (negP) {\n output = (negP && neg ? '(' : '') + output + (negP && neg ? ')' : '');\n } else {\n if (signed >= 0) {\n output = signed === 0 ? (neg ? '-' : '+') + output : output + (neg ? '-' : '+');\n } else if (neg) {\n output = '-' + output;\n }\n }\n\n return output;\n },\n // unformats numbers separators, decimals places, signs, abbreviations\n stringToNumber: function(string) {\n var locale = locales[options.currentLocale],\n stringOriginal = string,\n abbreviations = {\n thousand: 3,\n million: 6,\n billion: 9,\n trillion: 12\n },\n abbreviation,\n value,\n i,\n regexp;\n\n if (options.zeroFormat && string === options.zeroFormat) {\n value = 0;\n } else if (options.nullFormat && string === options.nullFormat || !string.replace(/[^0-9]+/g, '').length) {\n value = null;\n } else {\n value = 1;\n\n if (locale.delimiters.decimal !== '.') {\n string = string.replace(/\\./g, '').replace(locale.delimiters.decimal, '.');\n }\n\n for (abbreviation in abbreviations) {\n regexp = new RegExp('[^a-zA-Z]' + locale.abbreviations[abbreviation] + '(?:\\\\)|(\\\\' + locale.currency.symbol + ')?(?:\\\\))?)?$');\n\n if (stringOriginal.match(regexp)) {\n value *= Math.pow(10, abbreviations[abbreviation]);\n break;\n }\n }\n\n // check for negative number\n value *= (string.split('-').length + Math.min(string.split('(').length - 1, string.split(')').length - 1)) % 2 ? 1 : -1;\n\n // remove non numbers\n string = string.replace(/[^0-9\\.]+/g, '');\n\n value *= Number(string);\n }\n\n return value;\n },\n isNaN: function(value) {\n return typeof value === 'number' && isNaN(value);\n },\n includes: function(string, search) {\n return string.indexOf(search) !== -1;\n },\n insert: function(string, subString, start) {\n return string.slice(0, start) + subString + string.slice(start);\n },\n reduce: function(array, callback /*, initialValue*/) {\n if (this === null) {\n throw new TypeError('Array.prototype.reduce called on null or undefined');\n }\n\n if (typeof callback !== 'function') {\n throw new TypeError(callback + ' is not a function');\n }\n\n var t = Object(array),\n len = t.length >>> 0,\n k = 0,\n value;\n\n if (arguments.length === 3) {\n value = arguments[2];\n } else {\n while (k < len && !(k in t)) {\n k++;\n }\n\n if (k >= len) {\n throw new TypeError('Reduce of empty array with no initial value');\n }\n\n value = t[k++];\n }\n for (; k < len; k++) {\n if (k in t) {\n value = callback(value, t[k], k, t);\n }\n }\n return value;\n },\n /**\n * Computes the multiplier necessary to make x >= 1,\n * effectively eliminating miscalculations caused by\n * finite precision.\n */\n multiplier: function (x) {\n var parts = x.toString().split('.');\n\n return parts.length < 2 ? 1 : Math.pow(10, parts[1].length);\n },\n /**\n * Given a variable number of arguments, returns the maximum\n * multiplier that must be used to normalize an operation involving\n * all of them.\n */\n correctionFactor: function () {\n var args = Array.prototype.slice.call(arguments);\n\n return args.reduce(function(accum, next) {\n var mn = _.multiplier(next);\n return accum > mn ? accum : mn;\n }, 1);\n },\n /**\n * Implementation of toFixed() that treats floats more like decimals\n *\n * Fixes binary rounding issues (eg. (0.615).toFixed(2) === '0.61') that present\n * problems for accounting- and finance-related software.\n */\n toFixed: function(value, maxDecimals, roundingFunction, optionals) {\n var splitValue = value.toString().split('.'),\n minDecimals = maxDecimals - (optionals || 0),\n boundedPrecision,\n optionalsRegExp,\n power,\n output;\n\n // Use the smallest precision value possible to avoid errors from floating point representation\n if (splitValue.length === 2) {\n boundedPrecision = Math.min(Math.max(splitValue[1].length, minDecimals), maxDecimals);\n } else {\n boundedPrecision = minDecimals;\n }\n\n power = Math.pow(10, boundedPrecision);\n\n // Multiply up by precision, round accurately, then divide and use native toFixed():\n output = (roundingFunction(value + 'e+' + boundedPrecision) / power).toFixed(boundedPrecision);\n\n if (optionals > maxDecimals - boundedPrecision) {\n optionalsRegExp = new RegExp('\\\\.?0{1,' + (optionals - (maxDecimals - boundedPrecision)) + '}$');\n output = output.replace(optionalsRegExp, '');\n }\n\n return output;\n }\n };\n\n // avaliable options\n numeral.options = options;\n\n // avaliable formats\n numeral.formats = formats;\n\n // avaliable formats\n numeral.locales = locales;\n\n // This function sets the current locale. If\n // no arguments are passed in, it will simply return the current global\n // locale key.\n numeral.locale = function(key) {\n if (key) {\n options.currentLocale = key.toLowerCase();\n }\n\n return options.currentLocale;\n };\n\n // This function provides access to the loaded locale data. If\n // no arguments are passed in, it will simply return the current\n // global locale object.\n numeral.localeData = function(key) {\n if (!key) {\n return locales[options.currentLocale];\n }\n\n key = key.toLowerCase();\n\n if (!locales[key]) {\n throw new Error('Unknown locale : ' + key);\n }\n\n return locales[key];\n };\n\n numeral.reset = function() {\n for (var property in defaults) {\n options[property] = defaults[property];\n }\n };\n\n numeral.zeroFormat = function(format) {\n options.zeroFormat = typeof(format) === 'string' ? format : null;\n };\n\n numeral.nullFormat = function (format) {\n options.nullFormat = typeof(format) === 'string' ? format : null;\n };\n\n numeral.defaultFormat = function(format) {\n options.defaultFormat = typeof(format) === 'string' ? format : '0.0';\n };\n\n numeral.register = function(type, name, format) {\n name = name.toLowerCase();\n\n if (this[type + 's'][name]) {\n throw new TypeError(name + ' ' + type + ' already registered.');\n }\n\n this[type + 's'][name] = format;\n\n return format;\n };\n\n\n numeral.validate = function(val, culture) {\n var _decimalSep,\n _thousandSep,\n _currSymbol,\n _valArray,\n _abbrObj,\n _thousandRegEx,\n localeData,\n temp;\n\n //coerce val to string\n if (typeof val !== 'string') {\n val += '';\n\n if (console.warn) {\n console.warn('Numeral.js: Value is not string. It has been co-erced to: ', val);\n }\n }\n\n //trim whitespaces from either sides\n val = val.trim();\n\n //if val is just digits return true\n if (!!val.match(/^\\d+$/)) {\n return true;\n }\n\n //if val is empty return false\n if (val === '') {\n return false;\n }\n\n //get the decimal and thousands separator from numeral.localeData\n try {\n //check if the culture is understood by numeral. if not, default it to current locale\n localeData = numeral.localeData(culture);\n } catch (e) {\n localeData = numeral.localeData(numeral.locale());\n }\n\n //setup the delimiters and currency symbol based on culture/locale\n _currSymbol = localeData.currency.symbol;\n _abbrObj = localeData.abbreviations;\n _decimalSep = localeData.delimiters.decimal;\n if (localeData.delimiters.thousands === '.') {\n _thousandSep = '\\\\.';\n } else {\n _thousandSep = localeData.delimiters.thousands;\n }\n\n // validating currency symbol\n temp = val.match(/^[^\\d]+/);\n if (temp !== null) {\n val = val.substr(1);\n if (temp[0] !== _currSymbol) {\n return false;\n }\n }\n\n //validating abbreviation symbol\n temp = val.match(/[^\\d]+$/);\n if (temp !== null) {\n val = val.slice(0, -1);\n if (temp[0] !== _abbrObj.thousand && temp[0] !== _abbrObj.million && temp[0] !== _abbrObj.billion && temp[0] !== _abbrObj.trillion) {\n return false;\n }\n }\n\n _thousandRegEx = new RegExp(_thousandSep + '{2}');\n\n if (!val.match(/[^\\d.,]/g)) {\n _valArray = val.split(_decimalSep);\n if (_valArray.length > 2) {\n return false;\n } else {\n if (_valArray.length < 2) {\n return ( !! _valArray[0].match(/^\\d+.*\\d$/) && !_valArray[0].match(_thousandRegEx));\n } else {\n if (_valArray[0].length === 1) {\n return ( !! _valArray[0].match(/^\\d+$/) && !_valArray[0].match(_thousandRegEx) && !! _valArray[1].match(/^\\d+$/));\n } else {\n return ( !! _valArray[0].match(/^\\d+.*\\d$/) && !_valArray[0].match(_thousandRegEx) && !! _valArray[1].match(/^\\d+$/));\n }\n }\n }\n }\n\n return false;\n };\n\n\n /************************************\n Numeral Prototype\n ************************************/\n\n numeral.fn = Numeral.prototype = {\n clone: function() {\n return numeral(this);\n },\n format: function(inputString, roundingFunction) {\n var value = this._value,\n format = inputString || options.defaultFormat,\n kind,\n output,\n formatFunction;\n\n // make sure we have a roundingFunction\n roundingFunction = roundingFunction || Math.round;\n\n // format based on value\n if (value === 0 && options.zeroFormat !== null) {\n output = options.zeroFormat;\n } else if (value === null && options.nullFormat !== null) {\n output = options.nullFormat;\n } else {\n for (kind in formats) {\n if (format.match(formats[kind].regexps.format)) {\n formatFunction = formats[kind].format;\n\n break;\n }\n }\n\n formatFunction = formatFunction || numeral._.numberToFormat;\n\n output = formatFunction(value, format, roundingFunction);\n }\n\n return output;\n },\n value: function() {\n return this._value;\n },\n input: function() {\n return this._input;\n },\n set: function(value) {\n this._value = Number(value);\n\n return this;\n },\n add: function(value) {\n var corrFactor = _.correctionFactor.call(null, this._value, value);\n\n function cback(accum, curr, currI, O) {\n return accum + Math.round(corrFactor * curr);\n }\n\n this._value = _.reduce([this._value, value], cback, 0) / corrFactor;\n\n return this;\n },\n subtract: function(value) {\n var corrFactor = _.correctionFactor.call(null, this._value, value);\n\n function cback(accum, curr, currI, O) {\n return accum - Math.round(corrFactor * curr);\n }\n\n this._value = _.reduce([value], cback, Math.round(this._value * corrFactor)) / corrFactor;\n\n return this;\n },\n multiply: function(value) {\n function cback(accum, curr, currI, O) {\n var corrFactor = _.correctionFactor(accum, curr);\n return Math.round(accum * corrFactor) * Math.round(curr * corrFactor) / Math.round(corrFactor * corrFactor);\n }\n\n this._value = _.reduce([this._value, value], cback, 1);\n\n return this;\n },\n divide: function(value) {\n function cback(accum, curr, currI, O) {\n var corrFactor = _.correctionFactor(accum, curr);\n return Math.round(accum * corrFactor) / Math.round(curr * corrFactor);\n }\n\n this._value = _.reduce([this._value, value], cback);\n\n return this;\n },\n difference: function(value) {\n return Math.abs(numeral(this._value).subtract(value).value());\n }\n };\n\n /************************************\n Default Locale && Format\n ************************************/\n\n numeral.register('locale', 'en', {\n delimiters: {\n thousands: ',',\n decimal: '.'\n },\n abbreviations: {\n thousand: 'k',\n million: 'm',\n billion: 'b',\n trillion: 't'\n },\n ordinal: function(number) {\n var b = number % 10;\n return (~~(number % 100 / 10) === 1) ? 'th' :\n (b === 1) ? 'st' :\n (b === 2) ? 'nd' :\n (b === 3) ? 'rd' : 'th';\n },\n currency: {\n symbol: '$'\n }\n });\n\n \n\n(function() {\n numeral.register('format', 'bps', {\n regexps: {\n format: /(BPS)/,\n unformat: /(BPS)/\n },\n format: function(value, format, roundingFunction) {\n var space = numeral._.includes(format, ' BPS') ? ' ' : '',\n output;\n\n value = value * 10000;\n\n // check for space before BPS\n format = format.replace(/\\s?BPS/, '');\n\n output = numeral._.numberToFormat(value, format, roundingFunction);\n\n if (numeral._.includes(output, ')')) {\n output = output.split('');\n\n output.splice(-1, 0, space + 'BPS');\n\n output = output.join('');\n } else {\n output = output + space + 'BPS';\n }\n\n return output;\n },\n unformat: function(string) {\n return +(numeral._.stringToNumber(string) * 0.0001).toFixed(15);\n }\n });\n})();\n\n\n(function() {\n var decimal = {\n base: 1000,\n suffixes: ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']\n },\n binary = {\n base: 1024,\n suffixes: ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB']\n };\n\n var allSuffixes = decimal.suffixes.concat(binary.suffixes.filter(function (item) {\n return decimal.suffixes.indexOf(item) < 0;\n }));\n var unformatRegex = allSuffixes.join('|');\n // Allow support for BPS (http://www.investopedia.com/terms/b/basispoint.asp)\n unformatRegex = '(' + unformatRegex.replace('B', 'B(?!PS)') + ')';\n\n numeral.register('format', 'bytes', {\n regexps: {\n format: /([0\\s]i?b)/,\n unformat: new RegExp(unformatRegex)\n },\n format: function(value, format, roundingFunction) {\n var output,\n bytes = numeral._.includes(format, 'ib') ? binary : decimal,\n suffix = numeral._.includes(format, ' b') || numeral._.includes(format, ' ib') ? ' ' : '',\n power,\n min,\n max;\n\n // check for space before\n format = format.replace(/\\s?i?b/, '');\n\n for (power = 0; power <= bytes.suffixes.length; power++) {\n min = Math.pow(bytes.base, power);\n max = Math.pow(bytes.base, power + 1);\n\n if (value === null || value === 0 || value >= min && value < max) {\n suffix += bytes.suffixes[power];\n\n if (min > 0) {\n value = value / min;\n }\n\n break;\n }\n }\n\n output = numeral._.numberToFormat(value, format, roundingFunction);\n\n return output + suffix;\n },\n unformat: function(string) {\n var value = numeral._.stringToNumber(string),\n power,\n bytesMultiplier;\n\n if (value) {\n for (power = decimal.suffixes.length - 1; power >= 0; power--) {\n if (numeral._.includes(string, decimal.suffixes[power])) {\n bytesMultiplier = Math.pow(decimal.base, power);\n\n break;\n }\n\n if (numeral._.includes(string, binary.suffixes[power])) {\n bytesMultiplier = Math.pow(binary.base, power);\n\n break;\n }\n }\n\n value *= (bytesMultiplier || 1);\n }\n\n return value;\n }\n });\n})();\n\n\n(function() {\n numeral.register('format', 'currency', {\n regexps: {\n format: /(\\$)/\n },\n format: function(value, format, roundingFunction) {\n var locale = numeral.locales[numeral.options.currentLocale],\n symbols = {\n before: format.match(/^([\\+|\\-|\\(|\\s|\\$]*)/)[0],\n after: format.match(/([\\+|\\-|\\)|\\s|\\$]*)$/)[0]\n },\n output,\n symbol,\n i;\n\n // strip format of spaces and $\n format = format.replace(/\\s?\\$\\s?/, '');\n\n // format the number\n output = numeral._.numberToFormat(value, format, roundingFunction);\n\n // update the before and after based on value\n if (value >= 0) {\n symbols.before = symbols.before.replace(/[\\-\\(]/, '');\n symbols.after = symbols.after.replace(/[\\-\\)]/, '');\n } else if (value < 0 && (!numeral._.includes(symbols.before, '-') && !numeral._.includes(symbols.before, '('))) {\n symbols.before = '-' + symbols.before;\n }\n\n // loop through each before symbol\n for (i = 0; i < symbols.before.length; i++) {\n symbol = symbols.before[i];\n\n switch (symbol) {\n case '$':\n output = numeral._.insert(output, locale.currency.symbol, i);\n break;\n case ' ':\n output = numeral._.insert(output, ' ', i + locale.currency.symbol.length - 1);\n break;\n }\n }\n\n // loop through each after symbol\n for (i = symbols.after.length - 1; i >= 0; i--) {\n symbol = symbols.after[i];\n\n switch (symbol) {\n case '$':\n output = i === symbols.after.length - 1 ? output + locale.currency.symbol : numeral._.insert(output, locale.currency.symbol, -(symbols.after.length - (1 + i)));\n break;\n case ' ':\n output = i === symbols.after.length - 1 ? output + ' ' : numeral._.insert(output, ' ', -(symbols.after.length - (1 + i) + locale.currency.symbol.length - 1));\n break;\n }\n }\n\n\n return output;\n }\n });\n})();\n\n\n(function() {\n numeral.register('format', 'exponential', {\n regexps: {\n format: /(e\\+|e-)/,\n unformat: /(e\\+|e-)/\n },\n format: function(value, format, roundingFunction) {\n var output,\n exponential = typeof value === 'number' && !numeral._.isNaN(value) ? value.toExponential() : '0e+0',\n parts = exponential.split('e');\n\n format = format.replace(/e[\\+|\\-]{1}0/, '');\n\n output = numeral._.numberToFormat(Number(parts[0]), format, roundingFunction);\n\n return output + 'e' + parts[1];\n },\n unformat: function(string) {\n var parts = numeral._.includes(string, 'e+') ? string.split('e+') : string.split('e-'),\n value = Number(parts[0]),\n power = Number(parts[1]);\n\n power = numeral._.includes(string, 'e-') ? power *= -1 : power;\n\n function cback(accum, curr, currI, O) {\n var corrFactor = numeral._.correctionFactor(accum, curr),\n num = (accum * corrFactor) * (curr * corrFactor) / (corrFactor * corrFactor);\n return num;\n }\n\n return numeral._.reduce([value, Math.pow(10, power)], cback, 1);\n }\n });\n})();\n\n\n(function() {\n numeral.register('format', 'ordinal', {\n regexps: {\n format: /(o)/\n },\n format: function(value, format, roundingFunction) {\n var locale = numeral.locales[numeral.options.currentLocale],\n output,\n ordinal = numeral._.includes(format, ' o') ? ' ' : '';\n\n // check for space before\n format = format.replace(/\\s?o/, '');\n\n ordinal += locale.ordinal(value);\n\n output = numeral._.numberToFormat(value, format, roundingFunction);\n\n return output + ordinal;\n }\n });\n})();\n\n\n(function() {\n numeral.register('format', 'percentage', {\n regexps: {\n format: /(%)/,\n unformat: /(%)/\n },\n format: function(value, format, roundingFunction) {\n var space = numeral._.includes(format, ' %') ? ' ' : '',\n output;\n\n if (numeral.options.scalePercentBy100) {\n value = value * 100;\n }\n\n // check for space before %\n format = format.replace(/\\s?\\%/, '');\n\n output = numeral._.numberToFormat(value, format, roundingFunction);\n\n if (numeral._.includes(output, ')')) {\n output = output.split('');\n\n output.splice(-1, 0, space + '%');\n\n output = output.join('');\n } else {\n output = output + space + '%';\n }\n\n return output;\n },\n unformat: function(string) {\n var number = numeral._.stringToNumber(string);\n if (numeral.options.scalePercentBy100) {\n return number * 0.01;\n }\n return number;\n }\n });\n})();\n\n\n(function() {\n numeral.register('format', 'time', {\n regexps: {\n format: /(:)/,\n unformat: /(:)/\n },\n format: function(value, format, roundingFunction) {\n var hours = Math.floor(value / 60 / 60),\n minutes = Math.floor((value - (hours * 60 * 60)) / 60),\n seconds = Math.round(value - (hours * 60 * 60) - (minutes * 60));\n\n return hours + ':' + (minutes < 10 ? '0' + minutes : minutes) + ':' + (seconds < 10 ? '0' + seconds : seconds);\n },\n unformat: function(string) {\n var timeArray = string.split(':'),\n seconds = 0;\n\n // turn hours and minutes into seconds and add them all up\n if (timeArray.length === 3) {\n // hours\n seconds = seconds + (Number(timeArray[0]) * 60 * 60);\n // minutes\n seconds = seconds + (Number(timeArray[1]) * 60);\n // seconds\n seconds = seconds + Number(timeArray[2]);\n } else if (timeArray.length === 2) {\n // minutes\n seconds = seconds + (Number(timeArray[0]) * 60);\n // seconds\n seconds = seconds + Number(timeArray[1]);\n }\n return Number(seconds);\n }\n });\n})();\n\nreturn numeral;\n}));\n","'use strict';\n\n/** Highest positive signed 32-bit float value */\nconst maxInt = 2147483647; // aka. 0x7FFFFFFF or 2^31-1\n\n/** Bootstring parameters */\nconst base = 36;\nconst tMin = 1;\nconst tMax = 26;\nconst skew = 38;\nconst damp = 700;\nconst initialBias = 72;\nconst initialN = 128; // 0x80\nconst delimiter = '-'; // '\\x2D'\n\n/** Regular expressions */\nconst regexPunycode = /^xn--/;\nconst regexNonASCII = /[^\\0-\\x7F]/; // Note: U+007F DEL is excluded too.\nconst regexSeparators = /[\\x2E\\u3002\\uFF0E\\uFF61]/g; // RFC 3490 separators\n\n/** Error messages */\nconst errors = {\n\t'overflow': 'Overflow: input needs wider integers to process',\n\t'not-basic': 'Illegal input >= 0x80 (not a basic code point)',\n\t'invalid-input': 'Invalid input'\n};\n\n/** Convenience shortcuts */\nconst baseMinusTMin = base - tMin;\nconst floor = Math.floor;\nconst stringFromCharCode = String.fromCharCode;\n\n/*--------------------------------------------------------------------------*/\n\n/**\n * A generic error utility function.\n * @private\n * @param {String} type The error type.\n * @returns {Error} Throws a `RangeError` with the applicable error message.\n */\nfunction error(type) {\n\tthrow new RangeError(errors[type]);\n}\n\n/**\n * A generic `Array#map` utility function.\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} callback The function that gets called for every array\n * item.\n * @returns {Array} A new array of values returned by the callback function.\n */\nfunction map(array, callback) {\n\tconst result = [];\n\tlet length = array.length;\n\twhile (length--) {\n\t\tresult[length] = callback(array[length]);\n\t}\n\treturn result;\n}\n\n/**\n * A simple `Array#map`-like wrapper to work with domain name strings or email\n * addresses.\n * @private\n * @param {String} domain The domain name or email address.\n * @param {Function} callback The function that gets called for every\n * character.\n * @returns {String} A new string of characters returned by the callback\n * function.\n */\nfunction mapDomain(domain, callback) {\n\tconst parts = domain.split('@');\n\tlet result = '';\n\tif (parts.length > 1) {\n\t\t// In email addresses, only the domain name should be punycoded. Leave\n\t\t// the local part (i.e. everything up to `@`) intact.\n\t\tresult = parts[0] + '@';\n\t\tdomain = parts[1];\n\t}\n\t// Avoid `split(regex)` for IE8 compatibility. See #17.\n\tdomain = domain.replace(regexSeparators, '\\x2E');\n\tconst labels = domain.split('.');\n\tconst encoded = map(labels, callback).join('.');\n\treturn result + encoded;\n}\n\n/**\n * Creates an array containing the numeric code points of each Unicode\n * character in the string. While JavaScript uses UCS-2 internally,\n * this function will convert a pair of surrogate halves (each of which\n * UCS-2 exposes as separate characters) into a single code point,\n * matching UTF-16.\n * @see `punycode.ucs2.encode`\n * @see <https://mathiasbynens.be/notes/javascript-encoding>\n * @memberOf punycode.ucs2\n * @name decode\n * @param {String} string The Unicode input string (UCS-2).\n * @returns {Array} The new array of code points.\n */\nfunction ucs2decode(string) {\n\tconst output = [];\n\tlet counter = 0;\n\tconst length = string.length;\n\twhile (counter < length) {\n\t\tconst value = string.charCodeAt(counter++);\n\t\tif (value >= 0xD800 && value <= 0xDBFF && counter < length) {\n\t\t\t// It's a high surrogate, and there is a next character.\n\t\t\tconst extra = string.charCodeAt(counter++);\n\t\t\tif ((extra & 0xFC00) == 0xDC00) { // Low surrogate.\n\t\t\t\toutput.push(((value & 0x3FF) << 10) + (extra & 0x3FF) + 0x10000);\n\t\t\t} else {\n\t\t\t\t// It's an unmatched surrogate; only append this code unit, in case the\n\t\t\t\t// next code unit is the high surrogate of a surrogate pair.\n\t\t\t\toutput.push(value);\n\t\t\t\tcounter--;\n\t\t\t}\n\t\t} else {\n\t\t\toutput.push(value);\n\t\t}\n\t}\n\treturn output;\n}\n\n/**\n * Creates a string based on an array of numeric code points.\n * @see `punycode.ucs2.decode`\n * @memberOf punycode.ucs2\n * @name encode\n * @param {Array} codePoints The array of numeric code points.\n * @returns {String} The new Unicode string (UCS-2).\n */\nconst ucs2encode = codePoints => String.fromCodePoint(...codePoints);\n\n/**\n * Converts a basic code point into a digit/integer.\n * @see `digitToBasic()`\n * @private\n * @param {Number} codePoint The basic numeric code point value.\n * @returns {Number} The numeric value of a basic code point (for use in\n * representing integers) in the range `0` to `base - 1`, or `base` if\n * the code point does not represent a value.\n */\nconst basicToDigit = function(codePoint) {\n\tif (codePoint >= 0x30 && codePoint < 0x3A) {\n\t\treturn 26 + (codePoint - 0x30);\n\t}\n\tif (codePoint >= 0x41 && codePoint < 0x5B) {\n\t\treturn codePoint - 0x41;\n\t}\n\tif (codePoint >= 0x61 && codePoint < 0x7B) {\n\t\treturn codePoint - 0x61;\n\t}\n\treturn base;\n};\n\n/**\n * Converts a digit/integer into a basic code point.\n * @see `basicToDigit()`\n * @private\n * @param {Number} digit The numeric value of a basic code point.\n * @returns {Number} The basic code point whose value (when used for\n * representing integers) is `digit`, which needs to be in the range\n * `0` to `base - 1`. If `flag` is non-zero, the uppercase form is\n * used; else, the lowercase form is used. The behavior is undefined\n * if `flag` is non-zero and `digit` has no uppercase form.\n */\nconst digitToBasic = function(digit, flag) {\n\t// 0..25 map to ASCII a..z or A..Z\n\t// 26..35 map to ASCII 0..9\n\treturn digit + 22 + 75 * (digit < 26) - ((flag != 0) << 5);\n};\n\n/**\n * Bias adaptation function as per section 3.4 of RFC 3492.\n * https://tools.ietf.org/html/rfc3492#section-3.4\n * @private\n */\nconst adapt = function(delta, numPoints, firstTime) {\n\tlet k = 0;\n\tdelta = firstTime ? floor(delta / damp) : delta >> 1;\n\tdelta += floor(delta / numPoints);\n\tfor (/* no initialization */; delta > baseMinusTMin * tMax >> 1; k += base) {\n\t\tdelta = floor(delta / baseMinusTMin);\n\t}\n\treturn floor(k + (baseMinusTMin + 1) * delta / (delta + skew));\n};\n\n/**\n * Converts a Punycode string of ASCII-only symbols to a string of Unicode\n * symbols.\n * @memberOf punycode\n * @param {String} input The Punycode string of ASCII-only symbols.\n * @returns {String} The resulting string of Unicode symbols.\n */\nconst decode = function(input) {\n\t// Don't use UCS-2.\n\tconst output = [];\n\tconst inputLength = input.length;\n\tlet i = 0;\n\tlet n = initialN;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points: let `basic` be the number of input code\n\t// points before the last delimiter, or `0` if there is none, then copy\n\t// the first basic code points to the output.\n\n\tlet basic = input.lastIndexOf(delimiter);\n\tif (basic < 0) {\n\t\tbasic = 0;\n\t}\n\n\tfor (let j = 0; j < basic; ++j) {\n\t\t// if it's not a basic code point\n\t\tif (input.charCodeAt(j) >= 0x80) {\n\t\t\terror('not-basic');\n\t\t}\n\t\toutput.push(input.charCodeAt(j));\n\t}\n\n\t// Main decoding loop: start just after the last delimiter if any basic code\n\t// points were copied; start at the beginning otherwise.\n\n\tfor (let index = basic > 0 ? basic + 1 : 0; index < inputLength; /* no final expression */) {\n\n\t\t// `index` is the index of the next character to be consumed.\n\t\t// Decode a generalized variable-length integer into `delta`,\n\t\t// which gets added to `i`. The overflow checking is easier\n\t\t// if we increase `i` as we go, then subtract off its starting\n\t\t// value at the end to obtain `delta`.\n\t\tconst oldi = i;\n\t\tfor (let w = 1, k = base; /* no condition */; k += base) {\n\n\t\t\tif (index >= inputLength) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\n\t\t\tconst digit = basicToDigit(input.charCodeAt(index++));\n\n\t\t\tif (digit >= base) {\n\t\t\t\terror('invalid-input');\n\t\t\t}\n\t\t\tif (digit > floor((maxInt - i) / w)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\ti += digit * w;\n\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\n\t\t\tif (digit < t) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tconst baseMinusT = base - t;\n\t\t\tif (w > floor(maxInt / baseMinusT)) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\n\t\t\tw *= baseMinusT;\n\n\t\t}\n\n\t\tconst out = output.length + 1;\n\t\tbias = adapt(i - oldi, out, oldi == 0);\n\n\t\t// `i` was supposed to wrap around from `out` to `0`,\n\t\t// incrementing `n` each time, so we'll fix that now:\n\t\tif (floor(i / out) > maxInt - n) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tn += floor(i / out);\n\t\ti %= out;\n\n\t\t// Insert `n` at position `i` of the output.\n\t\toutput.splice(i++, 0, n);\n\n\t}\n\n\treturn String.fromCodePoint(...output);\n};\n\n/**\n * Converts a string of Unicode symbols (e.g. a domain name label) to a\n * Punycode string of ASCII-only symbols.\n * @memberOf punycode\n * @param {String} input The string of Unicode symbols.\n * @returns {String} The resulting Punycode string of ASCII-only symbols.\n */\nconst encode = function(input) {\n\tconst output = [];\n\n\t// Convert the input in UCS-2 to an array of Unicode code points.\n\tinput = ucs2decode(input);\n\n\t// Cache the length.\n\tconst inputLength = input.length;\n\n\t// Initialize the state.\n\tlet n = initialN;\n\tlet delta = 0;\n\tlet bias = initialBias;\n\n\t// Handle the basic code points.\n\tfor (const currentValue of input) {\n\t\tif (currentValue < 0x80) {\n\t\t\toutput.push(stringFromCharCode(currentValue));\n\t\t}\n\t}\n\n\tconst basicLength = output.length;\n\tlet handledCPCount = basicLength;\n\n\t// `handledCPCount` is the number of code points that have been handled;\n\t// `basicLength` is the number of basic code points.\n\n\t// Finish the basic string with a delimiter unless it's empty.\n\tif (basicLength) {\n\t\toutput.push(delimiter);\n\t}\n\n\t// Main encoding loop:\n\twhile (handledCPCount < inputLength) {\n\n\t\t// All non-basic code points < n have been handled already. Find the next\n\t\t// larger one:\n\t\tlet m = maxInt;\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue >= n && currentValue < m) {\n\t\t\t\tm = currentValue;\n\t\t\t}\n\t\t}\n\n\t\t// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>,\n\t\t// but guard against overflow.\n\t\tconst handledCPCountPlusOne = handledCPCount + 1;\n\t\tif (m - n > floor((maxInt - delta) / handledCPCountPlusOne)) {\n\t\t\terror('overflow');\n\t\t}\n\n\t\tdelta += (m - n) * handledCPCountPlusOne;\n\t\tn = m;\n\n\t\tfor (const currentValue of input) {\n\t\t\tif (currentValue < n && ++delta > maxInt) {\n\t\t\t\terror('overflow');\n\t\t\t}\n\t\t\tif (currentValue === n) {\n\t\t\t\t// Represent delta as a generalized variable-length integer.\n\t\t\t\tlet q = delta;\n\t\t\t\tfor (let k = base; /* no condition */; k += base) {\n\t\t\t\t\tconst t = k <= bias ? tMin : (k >= bias + tMax ? tMax : k - bias);\n\t\t\t\t\tif (q < t) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tconst qMinusT = q - t;\n\t\t\t\t\tconst baseMinusT = base - t;\n\t\t\t\t\toutput.push(\n\t\t\t\t\t\tstringFromCharCode(digitToBasic(t + qMinusT % baseMinusT, 0))\n\t\t\t\t\t);\n\t\t\t\t\tq = floor(qMinusT / baseMinusT);\n\t\t\t\t}\n\n\t\t\t\toutput.push(stringFromCharCode(digitToBasic(q, 0)));\n\t\t\t\tbias = adapt(delta, handledCPCountPlusOne, handledCPCount === basicLength);\n\t\t\t\tdelta = 0;\n\t\t\t\t++handledCPCount;\n\t\t\t}\n\t\t}\n\n\t\t++delta;\n\t\t++n;\n\n\t}\n\treturn output.join('');\n};\n\n/**\n * Converts a Punycode string representing a domain name or an email address\n * to Unicode. Only the Punycoded parts of the input will be converted, i.e.\n * it doesn't matter if you call it on a string that has already been\n * converted to Unicode.\n * @memberOf punycode\n * @param {String} input The Punycoded domain name or email address to\n * convert to Unicode.\n * @returns {String} The Unicode representation of the given Punycode\n * string.\n */\nconst toUnicode = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexPunycode.test(string)\n\t\t\t? decode(string.slice(4).toLowerCase())\n\t\t\t: string;\n\t});\n};\n\n/**\n * Converts a Unicode string representing a domain name or an email address to\n * Punycode. Only the non-ASCII parts of the domain name will be converted,\n * i.e. it doesn't matter if you call it with a domain that's already in\n * ASCII.\n * @memberOf punycode\n * @param {String} input The domain name or email address to convert, as a\n * Unicode string.\n * @returns {String} The Punycode representation of the given domain name or\n * email address.\n */\nconst toASCII = function(input) {\n\treturn mapDomain(input, function(string) {\n\t\treturn regexNonASCII.test(string)\n\t\t\t? 'xn--' + encode(string)\n\t\t\t: string;\n\t});\n};\n\n/*--------------------------------------------------------------------------*/\n\n/** Define the public API */\nconst punycode = {\n\t/**\n\t * A string representing the current Punycode.js version number.\n\t * @memberOf punycode\n\t * @type String\n\t */\n\t'version': '2.3.1',\n\t/**\n\t * An object of methods to convert from JavaScript's internal character\n\t * representation (UCS-2) to Unicode code points, and back.\n\t * @see <https://mathiasbynens.be/notes/javascript-encoding>\n\t * @memberOf punycode\n\t * @type Object\n\t */\n\t'ucs2': {\n\t\t'decode': ucs2decode,\n\t\t'encode': ucs2encode\n\t},\n\t'decode': decode,\n\t'encode': encode,\n\t'toASCII': toASCII,\n\t'toUnicode': toUnicode\n};\n\nexport { ucs2decode, ucs2encode, decode, encode, toASCII, toUnicode };\nexport default punycode;\n","/**\n * @license React\n * react-dom-client.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/*\n Modernizr 3.0.0pre (Custom Build) | MIT\n*/\n\"use strict\";\nvar Scheduler = require(\"scheduler\"),\n React = require(\"react\"),\n ReactDOM = require(\"react-dom\");\nfunction formatProdErrorMessage(code) {\n var url = \"https://react.dev/errors/\" + code;\n if (1 < arguments.length) {\n url += \"?args[]=\" + encodeURIComponent(arguments[1]);\n for (var i = 2; i < arguments.length; i++)\n url += \"&args[]=\" + encodeURIComponent(arguments[i]);\n }\n return (\n \"Minified React error #\" +\n code +\n \"; visit \" +\n url +\n \" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"\n );\n}\nfunction isValidContainer(node) {\n return !(\n !node ||\n (1 !== node.nodeType && 9 !== node.nodeType && 11 !== node.nodeType)\n );\n}\nfunction getNearestMountedFiber(fiber) {\n var node = fiber,\n nearestMounted = fiber;\n if (fiber.alternate) for (; node.return; ) node = node.return;\n else {\n fiber = node;\n do\n (node = fiber),\n 0 !== (node.flags & 4098) && (nearestMounted = node.return),\n (fiber = node.return);\n while (fiber);\n }\n return 3 === node.tag ? nearestMounted : null;\n}\nfunction getSuspenseInstanceFromFiber(fiber) {\n if (13 === fiber.tag) {\n var suspenseState = fiber.memoizedState;\n null === suspenseState &&\n ((fiber = fiber.alternate),\n null !== fiber && (suspenseState = fiber.memoizedState));\n if (null !== suspenseState) return suspenseState.dehydrated;\n }\n return null;\n}\nfunction getActivityInstanceFromFiber(fiber) {\n if (31 === fiber.tag) {\n var activityState = fiber.memoizedState;\n null === activityState &&\n ((fiber = fiber.alternate),\n null !== fiber && (activityState = fiber.memoizedState));\n if (null !== activityState) return activityState.dehydrated;\n }\n return null;\n}\nfunction assertIsMounted(fiber) {\n if (getNearestMountedFiber(fiber) !== fiber)\n throw Error(formatProdErrorMessage(188));\n}\nfunction findCurrentFiberUsingSlowPath(fiber) {\n var alternate = fiber.alternate;\n if (!alternate) {\n alternate = getNearestMountedFiber(fiber);\n if (null === alternate) throw Error(formatProdErrorMessage(188));\n return alternate !== fiber ? null : fiber;\n }\n for (var a = fiber, b = alternate; ; ) {\n var parentA = a.return;\n if (null === parentA) break;\n var parentB = parentA.alternate;\n if (null === parentB) {\n b = parentA.return;\n if (null !== b) {\n a = b;\n continue;\n }\n break;\n }\n if (parentA.child === parentB.child) {\n for (parentB = parentA.child; parentB; ) {\n if (parentB === a) return assertIsMounted(parentA), fiber;\n if (parentB === b) return assertIsMounted(parentA), alternate;\n parentB = parentB.sibling;\n }\n throw Error(formatProdErrorMessage(188));\n }\n if (a.return !== b.return) (a = parentA), (b = parentB);\n else {\n for (var didFindChild = !1, child$0 = parentA.child; child$0; ) {\n if (child$0 === a) {\n didFindChild = !0;\n a = parentA;\n b = parentB;\n break;\n }\n if (child$0 === b) {\n didFindChild = !0;\n b = parentA;\n a = parentB;\n break;\n }\n child$0 = child$0.sibling;\n }\n if (!didFindChild) {\n for (child$0 = parentB.child; child$0; ) {\n if (child$0 === a) {\n didFindChild = !0;\n a = parentB;\n b = parentA;\n break;\n }\n if (child$0 === b) {\n didFindChild = !0;\n b = parentB;\n a = parentA;\n break;\n }\n child$0 = child$0.sibling;\n }\n if (!didFindChild) throw Error(formatProdErrorMessage(189));\n }\n }\n if (a.alternate !== b) throw Error(formatProdErrorMessage(190));\n }\n if (3 !== a.tag) throw Error(formatProdErrorMessage(188));\n return a.stateNode.current === a ? fiber : alternate;\n}\nfunction findCurrentHostFiberImpl(node) {\n var tag = node.tag;\n if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return node;\n for (node = node.child; null !== node; ) {\n tag = findCurrentHostFiberImpl(node);\n if (null !== tag) return tag;\n node = node.sibling;\n }\n return null;\n}\nvar assign = Object.assign,\n REACT_LEGACY_ELEMENT_TYPE = Symbol.for(\"react.element\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\");\nSymbol.for(\"react.scope\");\nvar REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\");\nSymbol.for(\"react.legacy_hidden\");\nSymbol.for(\"react.tracing_marker\");\nvar REACT_MEMO_CACHE_SENTINEL = Symbol.for(\"react.memo_cache_sentinel\");\nSymbol.for(\"react.view_transition\");\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nfunction getIteratorFn(maybeIterable) {\n if (null === maybeIterable || \"object\" !== typeof maybeIterable) return null;\n maybeIterable =\n (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n maybeIterable[\"@@iterator\"];\n return \"function\" === typeof maybeIterable ? maybeIterable : null;\n}\nvar REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\");\nfunction getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (type.$$typeof) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n}\nvar isArrayImpl = Array.isArray,\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n ReactDOMSharedInternals =\n ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n sharedNotPendingObject = {\n pending: !1,\n data: null,\n method: null,\n action: null\n },\n valueStack = [],\n index = -1;\nfunction createCursor(defaultValue) {\n return { current: defaultValue };\n}\nfunction pop(cursor) {\n 0 > index ||\n ((cursor.current = valueStack[index]), (valueStack[index] = null), index--);\n}\nfunction push(cursor, value) {\n index++;\n valueStack[index] = cursor.current;\n cursor.current = value;\n}\nvar contextStackCursor = createCursor(null),\n contextFiberStackCursor = createCursor(null),\n rootInstanceStackCursor = createCursor(null),\n hostTransitionProviderCursor = createCursor(null);\nfunction pushHostContainer(fiber, nextRootInstance) {\n push(rootInstanceStackCursor, nextRootInstance);\n push(contextFiberStackCursor, fiber);\n push(contextStackCursor, null);\n switch (nextRootInstance.nodeType) {\n case 9:\n case 11:\n fiber = (fiber = nextRootInstance.documentElement)\n ? (fiber = fiber.namespaceURI)\n ? getOwnHostContext(fiber)\n : 0\n : 0;\n break;\n default:\n if (\n ((fiber = nextRootInstance.tagName),\n (nextRootInstance = nextRootInstance.namespaceURI))\n )\n (nextRootInstance = getOwnHostContext(nextRootInstance)),\n (fiber = getChildHostContextProd(nextRootInstance, fiber));\n else\n switch (fiber) {\n case \"svg\":\n fiber = 1;\n break;\n case \"math\":\n fiber = 2;\n break;\n default:\n fiber = 0;\n }\n }\n pop(contextStackCursor);\n push(contextStackCursor, fiber);\n}\nfunction popHostContainer() {\n pop(contextStackCursor);\n pop(contextFiberStackCursor);\n pop(rootInstanceStackCursor);\n}\nfunction pushHostContext(fiber) {\n null !== fiber.memoizedState && push(hostTransitionProviderCursor, fiber);\n var context = contextStackCursor.current;\n var JSCompiler_inline_result = getChildHostContextProd(context, fiber.type);\n context !== JSCompiler_inline_result &&\n (push(contextFiberStackCursor, fiber),\n push(contextStackCursor, JSCompiler_inline_result));\n}\nfunction popHostContext(fiber) {\n contextFiberStackCursor.current === fiber &&\n (pop(contextStackCursor), pop(contextFiberStackCursor));\n hostTransitionProviderCursor.current === fiber &&\n (pop(hostTransitionProviderCursor),\n (HostTransitionContext._currentValue = sharedNotPendingObject));\n}\nvar prefix, suffix;\nfunction describeBuiltInComponentFrame(name) {\n if (void 0 === prefix)\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = (match && match[1]) || \"\";\n suffix =\n -1 < x.stack.indexOf(\"\\n at\")\n ? \" (<anonymous>)\"\n : -1 < x.stack.indexOf(\"@\")\n ? \"@unknown:0:0\"\n : \"\";\n }\n return \"\\n\" + prefix + name + suffix;\n}\nvar reentry = !1;\nfunction describeNativeComponentFrame(fn, construct) {\n if (!fn || reentry) return \"\";\n reentry = !0;\n var previousPrepareStackTrace = Error.prepareStackTrace;\n Error.prepareStackTrace = void 0;\n try {\n var RunInRootFrame = {\n DetermineComponentFrameRoot: function () {\n try {\n if (construct) {\n var Fake = function () {\n throw Error();\n };\n Object.defineProperty(Fake.prototype, \"props\", {\n set: function () {\n throw Error();\n }\n });\n if (\"object\" === typeof Reflect && Reflect.construct) {\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n var control = x;\n }\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x$1) {\n control = x$1;\n }\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x$2) {\n control = x$2;\n }\n (Fake = fn()) &&\n \"function\" === typeof Fake.catch &&\n Fake.catch(function () {});\n }\n } catch (sample) {\n if (sample && control && \"string\" === typeof sample.stack)\n return [sample.stack, control.stack];\n }\n return [null, null];\n }\n };\n RunInRootFrame.DetermineComponentFrameRoot.displayName =\n \"DetermineComponentFrameRoot\";\n var namePropDescriptor = Object.getOwnPropertyDescriptor(\n RunInRootFrame.DetermineComponentFrameRoot,\n \"name\"\n );\n namePropDescriptor &&\n namePropDescriptor.configurable &&\n Object.defineProperty(\n RunInRootFrame.DetermineComponentFrameRoot,\n \"name\",\n { value: \"DetermineComponentFrameRoot\" }\n );\n var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(),\n sampleStack = _RunInRootFrame$Deter[0],\n controlStack = _RunInRootFrame$Deter[1];\n if (sampleStack && controlStack) {\n var sampleLines = sampleStack.split(\"\\n\"),\n controlLines = controlStack.split(\"\\n\");\n for (\n namePropDescriptor = RunInRootFrame = 0;\n RunInRootFrame < sampleLines.length &&\n !sampleLines[RunInRootFrame].includes(\"DetermineComponentFrameRoot\");\n\n )\n RunInRootFrame++;\n for (\n ;\n namePropDescriptor < controlLines.length &&\n !controlLines[namePropDescriptor].includes(\n \"DetermineComponentFrameRoot\"\n );\n\n )\n namePropDescriptor++;\n if (\n RunInRootFrame === sampleLines.length ||\n namePropDescriptor === controlLines.length\n )\n for (\n RunInRootFrame = sampleLines.length - 1,\n namePropDescriptor = controlLines.length - 1;\n 1 <= RunInRootFrame &&\n 0 <= namePropDescriptor &&\n sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor];\n\n )\n namePropDescriptor--;\n for (\n ;\n 1 <= RunInRootFrame && 0 <= namePropDescriptor;\n RunInRootFrame--, namePropDescriptor--\n )\n if (sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]) {\n if (1 !== RunInRootFrame || 1 !== namePropDescriptor) {\n do\n if (\n (RunInRootFrame--,\n namePropDescriptor--,\n 0 > namePropDescriptor ||\n sampleLines[RunInRootFrame] !==\n controlLines[namePropDescriptor])\n ) {\n var frame =\n \"\\n\" +\n sampleLines[RunInRootFrame].replace(\" at new \", \" at \");\n fn.displayName &&\n frame.includes(\"<anonymous>\") &&\n (frame = frame.replace(\"<anonymous>\", fn.displayName));\n return frame;\n }\n while (1 <= RunInRootFrame && 0 <= namePropDescriptor);\n }\n break;\n }\n }\n } finally {\n (reentry = !1), (Error.prepareStackTrace = previousPrepareStackTrace);\n }\n return (previousPrepareStackTrace = fn ? fn.displayName || fn.name : \"\")\n ? describeBuiltInComponentFrame(previousPrepareStackTrace)\n : \"\";\n}\nfunction describeFiber(fiber, childFiber) {\n switch (fiber.tag) {\n case 26:\n case 27:\n case 5:\n return describeBuiltInComponentFrame(fiber.type);\n case 16:\n return describeBuiltInComponentFrame(\"Lazy\");\n case 13:\n return fiber.child !== childFiber && null !== childFiber\n ? describeBuiltInComponentFrame(\"Suspense Fallback\")\n : describeBuiltInComponentFrame(\"Suspense\");\n case 19:\n return describeBuiltInComponentFrame(\"SuspenseList\");\n case 0:\n case 15:\n return describeNativeComponentFrame(fiber.type, !1);\n case 11:\n return describeNativeComponentFrame(fiber.type.render, !1);\n case 1:\n return describeNativeComponentFrame(fiber.type, !0);\n case 31:\n return describeBuiltInComponentFrame(\"Activity\");\n default:\n return \"\";\n }\n}\nfunction getStackByFiberInDevAndProd(workInProgress) {\n try {\n var info = \"\",\n previous = null;\n do\n (info += describeFiber(workInProgress, previous)),\n (previous = workInProgress),\n (workInProgress = workInProgress.return);\n while (workInProgress);\n return info;\n } catch (x) {\n return \"\\nError generating stack: \" + x.message + \"\\n\" + x.stack;\n }\n}\nvar hasOwnProperty = Object.prototype.hasOwnProperty,\n scheduleCallback$3 = Scheduler.unstable_scheduleCallback,\n cancelCallback$1 = Scheduler.unstable_cancelCallback,\n shouldYield = Scheduler.unstable_shouldYield,\n requestPaint = Scheduler.unstable_requestPaint,\n now = Scheduler.unstable_now,\n getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel,\n ImmediatePriority = Scheduler.unstable_ImmediatePriority,\n UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,\n NormalPriority$1 = Scheduler.unstable_NormalPriority,\n LowPriority = Scheduler.unstable_LowPriority,\n IdlePriority = Scheduler.unstable_IdlePriority,\n log$1 = Scheduler.log,\n unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue,\n rendererID = null,\n injectedHook = null;\nfunction setIsStrictModeForDevtools(newIsStrictMode) {\n \"function\" === typeof log$1 && unstable_setDisableYieldValue(newIsStrictMode);\n if (injectedHook && \"function\" === typeof injectedHook.setStrictMode)\n try {\n injectedHook.setStrictMode(rendererID, newIsStrictMode);\n } catch (err) {}\n}\nvar clz32 = Math.clz32 ? Math.clz32 : clz32Fallback,\n log = Math.log,\n LN2 = Math.LN2;\nfunction clz32Fallback(x) {\n x >>>= 0;\n return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;\n}\nvar nextTransitionUpdateLane = 256,\n nextTransitionDeferredLane = 262144,\n nextRetryLane = 4194304;\nfunction getHighestPriorityLanes(lanes) {\n var pendingSyncLanes = lanes & 42;\n if (0 !== pendingSyncLanes) return pendingSyncLanes;\n switch (lanes & -lanes) {\n case 1:\n return 1;\n case 2:\n return 2;\n case 4:\n return 4;\n case 8:\n return 8;\n case 16:\n return 16;\n case 32:\n return 32;\n case 64:\n return 64;\n case 128:\n return 128;\n case 256:\n case 512:\n case 1024:\n case 2048:\n case 4096:\n case 8192:\n case 16384:\n case 32768:\n case 65536:\n case 131072:\n return lanes & 261888;\n case 262144:\n case 524288:\n case 1048576:\n case 2097152:\n return lanes & 3932160;\n case 4194304:\n case 8388608:\n case 16777216:\n case 33554432:\n return lanes & 62914560;\n case 67108864:\n return 67108864;\n case 134217728:\n return 134217728;\n case 268435456:\n return 268435456;\n case 536870912:\n return 536870912;\n case 1073741824:\n return 0;\n default:\n return lanes;\n }\n}\nfunction getNextLanes(root, wipLanes, rootHasPendingCommit) {\n var pendingLanes = root.pendingLanes;\n if (0 === pendingLanes) return 0;\n var nextLanes = 0,\n suspendedLanes = root.suspendedLanes,\n pingedLanes = root.pingedLanes;\n root = root.warmLanes;\n var nonIdlePendingLanes = pendingLanes & 134217727;\n 0 !== nonIdlePendingLanes\n ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes),\n 0 !== pendingLanes\n ? (nextLanes = getHighestPriorityLanes(pendingLanes))\n : ((pingedLanes &= nonIdlePendingLanes),\n 0 !== pingedLanes\n ? (nextLanes = getHighestPriorityLanes(pingedLanes))\n : rootHasPendingCommit ||\n ((rootHasPendingCommit = nonIdlePendingLanes & ~root),\n 0 !== rootHasPendingCommit &&\n (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))))\n : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes),\n 0 !== nonIdlePendingLanes\n ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes))\n : 0 !== pingedLanes\n ? (nextLanes = getHighestPriorityLanes(pingedLanes))\n : rootHasPendingCommit ||\n ((rootHasPendingCommit = pendingLanes & ~root),\n 0 !== rootHasPendingCommit &&\n (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))));\n return 0 === nextLanes\n ? 0\n : 0 !== wipLanes &&\n wipLanes !== nextLanes &&\n 0 === (wipLanes & suspendedLanes) &&\n ((suspendedLanes = nextLanes & -nextLanes),\n (rootHasPendingCommit = wipLanes & -wipLanes),\n suspendedLanes >= rootHasPendingCommit ||\n (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194048)))\n ? wipLanes\n : nextLanes;\n}\nfunction checkIfRootIsPrerendering(root, renderLanes) {\n return (\n 0 ===\n (root.pendingLanes &\n ~(root.suspendedLanes & ~root.pingedLanes) &\n renderLanes)\n );\n}\nfunction computeExpirationTime(lane, currentTime) {\n switch (lane) {\n case 1:\n case 2:\n case 4:\n case 8:\n case 64:\n return currentTime + 250;\n case 16:\n case 32:\n case 128:\n case 256:\n case 512:\n case 1024:\n case 2048:\n case 4096:\n case 8192:\n case 16384:\n case 32768:\n case 65536:\n case 131072:\n case 262144:\n case 524288:\n case 1048576:\n case 2097152:\n return currentTime + 5e3;\n case 4194304:\n case 8388608:\n case 16777216:\n case 33554432:\n return -1;\n case 67108864:\n case 134217728:\n case 268435456:\n case 536870912:\n case 1073741824:\n return -1;\n default:\n return -1;\n }\n}\nfunction claimNextRetryLane() {\n var lane = nextRetryLane;\n nextRetryLane <<= 1;\n 0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304);\n return lane;\n}\nfunction createLaneMap(initial) {\n for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial);\n return laneMap;\n}\nfunction markRootUpdated$1(root, updateLane) {\n root.pendingLanes |= updateLane;\n 268435456 !== updateLane &&\n ((root.suspendedLanes = 0), (root.pingedLanes = 0), (root.warmLanes = 0));\n}\nfunction markRootFinished(\n root,\n finishedLanes,\n remainingLanes,\n spawnedLane,\n updatedLanes,\n suspendedRetryLanes\n) {\n var previouslyPendingLanes = root.pendingLanes;\n root.pendingLanes = remainingLanes;\n root.suspendedLanes = 0;\n root.pingedLanes = 0;\n root.warmLanes = 0;\n root.expiredLanes &= remainingLanes;\n root.entangledLanes &= remainingLanes;\n root.errorRecoveryDisabledLanes &= remainingLanes;\n root.shellSuspendCounter = 0;\n var entanglements = root.entanglements,\n expirationTimes = root.expirationTimes,\n hiddenUpdates = root.hiddenUpdates;\n for (\n remainingLanes = previouslyPendingLanes & ~remainingLanes;\n 0 < remainingLanes;\n\n ) {\n var index$7 = 31 - clz32(remainingLanes),\n lane = 1 << index$7;\n entanglements[index$7] = 0;\n expirationTimes[index$7] = -1;\n var hiddenUpdatesForLane = hiddenUpdates[index$7];\n if (null !== hiddenUpdatesForLane)\n for (\n hiddenUpdates[index$7] = null, index$7 = 0;\n index$7 < hiddenUpdatesForLane.length;\n index$7++\n ) {\n var update = hiddenUpdatesForLane[index$7];\n null !== update && (update.lane &= -536870913);\n }\n remainingLanes &= ~lane;\n }\n 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0);\n 0 !== suspendedRetryLanes &&\n 0 === updatedLanes &&\n 0 !== root.tag &&\n (root.suspendedLanes |=\n suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes));\n}\nfunction markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {\n root.pendingLanes |= spawnedLane;\n root.suspendedLanes &= ~spawnedLane;\n var spawnedLaneIndex = 31 - clz32(spawnedLane);\n root.entangledLanes |= spawnedLane;\n root.entanglements[spawnedLaneIndex] =\n root.entanglements[spawnedLaneIndex] |\n 1073741824 |\n (entangledLanes & 261930);\n}\nfunction markRootEntangled(root, entangledLanes) {\n var rootEntangledLanes = (root.entangledLanes |= entangledLanes);\n for (root = root.entanglements; rootEntangledLanes; ) {\n var index$8 = 31 - clz32(rootEntangledLanes),\n lane = 1 << index$8;\n (lane & entangledLanes) | (root[index$8] & entangledLanes) &&\n (root[index$8] |= entangledLanes);\n rootEntangledLanes &= ~lane;\n }\n}\nfunction getBumpedLaneForHydration(root, renderLanes) {\n var renderLane = renderLanes & -renderLanes;\n renderLane =\n 0 !== (renderLane & 42) ? 1 : getBumpedLaneForHydrationByLane(renderLane);\n return 0 !== (renderLane & (root.suspendedLanes | renderLanes))\n ? 0\n : renderLane;\n}\nfunction getBumpedLaneForHydrationByLane(lane) {\n switch (lane) {\n case 2:\n lane = 1;\n break;\n case 8:\n lane = 4;\n break;\n case 32:\n lane = 16;\n break;\n case 256:\n case 512:\n case 1024:\n case 2048:\n case 4096:\n case 8192:\n case 16384:\n case 32768:\n case 65536:\n case 131072:\n case 262144:\n case 524288:\n case 1048576:\n case 2097152:\n case 4194304:\n case 8388608:\n case 16777216:\n case 33554432:\n lane = 128;\n break;\n case 268435456:\n lane = 134217728;\n break;\n default:\n lane = 0;\n }\n return lane;\n}\nfunction lanesToEventPriority(lanes) {\n lanes &= -lanes;\n return 2 < lanes\n ? 8 < lanes\n ? 0 !== (lanes & 134217727)\n ? 32\n : 268435456\n : 8\n : 2;\n}\nfunction resolveUpdatePriority() {\n var updatePriority = ReactDOMSharedInternals.p;\n if (0 !== updatePriority) return updatePriority;\n updatePriority = window.event;\n return void 0 === updatePriority ? 32 : getEventPriority(updatePriority.type);\n}\nfunction runWithPriority(priority, fn) {\n var previousPriority = ReactDOMSharedInternals.p;\n try {\n return (ReactDOMSharedInternals.p = priority), fn();\n } finally {\n ReactDOMSharedInternals.p = previousPriority;\n }\n}\nvar randomKey = Math.random().toString(36).slice(2),\n internalInstanceKey = \"__reactFiber$\" + randomKey,\n internalPropsKey = \"__reactProps$\" + randomKey,\n internalContainerInstanceKey = \"__reactContainer$\" + randomKey,\n internalEventHandlersKey = \"__reactEvents$\" + randomKey,\n internalEventHandlerListenersKey = \"__reactListeners$\" + randomKey,\n internalEventHandlesSetKey = \"__reactHandles$\" + randomKey,\n internalRootNodeResourcesKey = \"__reactResources$\" + randomKey,\n internalHoistableMarker = \"__reactMarker$\" + randomKey;\nfunction detachDeletedInstance(node) {\n delete node[internalInstanceKey];\n delete node[internalPropsKey];\n delete node[internalEventHandlersKey];\n delete node[internalEventHandlerListenersKey];\n delete node[internalEventHandlesSetKey];\n}\nfunction getClosestInstanceFromNode(targetNode) {\n var targetInst = targetNode[internalInstanceKey];\n if (targetInst) return targetInst;\n for (var parentNode = targetNode.parentNode; parentNode; ) {\n if (\n (targetInst =\n parentNode[internalContainerInstanceKey] ||\n parentNode[internalInstanceKey])\n ) {\n parentNode = targetInst.alternate;\n if (\n null !== targetInst.child ||\n (null !== parentNode && null !== parentNode.child)\n )\n for (\n targetNode = getParentHydrationBoundary(targetNode);\n null !== targetNode;\n\n ) {\n if ((parentNode = targetNode[internalInstanceKey])) return parentNode;\n targetNode = getParentHydrationBoundary(targetNode);\n }\n return targetInst;\n }\n targetNode = parentNode;\n parentNode = targetNode.parentNode;\n }\n return null;\n}\nfunction getInstanceFromNode(node) {\n if (\n (node = node[internalInstanceKey] || node[internalContainerInstanceKey])\n ) {\n var tag = node.tag;\n if (\n 5 === tag ||\n 6 === tag ||\n 13 === tag ||\n 31 === tag ||\n 26 === tag ||\n 27 === tag ||\n 3 === tag\n )\n return node;\n }\n return null;\n}\nfunction getNodeFromInstance(inst) {\n var tag = inst.tag;\n if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return inst.stateNode;\n throw Error(formatProdErrorMessage(33));\n}\nfunction getResourcesFromRoot(root) {\n var resources = root[internalRootNodeResourcesKey];\n resources ||\n (resources = root[internalRootNodeResourcesKey] =\n { hoistableStyles: new Map(), hoistableScripts: new Map() });\n return resources;\n}\nfunction markNodeAsHoistable(node) {\n node[internalHoistableMarker] = !0;\n}\nvar allNativeEvents = new Set(),\n registrationNameDependencies = {};\nfunction registerTwoPhaseEvent(registrationName, dependencies) {\n registerDirectEvent(registrationName, dependencies);\n registerDirectEvent(registrationName + \"Capture\", dependencies);\n}\nfunction registerDirectEvent(registrationName, dependencies) {\n registrationNameDependencies[registrationName] = dependencies;\n for (\n registrationName = 0;\n registrationName < dependencies.length;\n registrationName++\n )\n allNativeEvents.add(dependencies[registrationName]);\n}\nvar VALID_ATTRIBUTE_NAME_REGEX = RegExp(\n \"^[:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD][:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$\"\n ),\n illegalAttributeNameCache = {},\n validatedAttributeNameCache = {};\nfunction isAttributeNameSafe(attributeName) {\n if (hasOwnProperty.call(validatedAttributeNameCache, attributeName))\n return !0;\n if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) return !1;\n if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName))\n return (validatedAttributeNameCache[attributeName] = !0);\n illegalAttributeNameCache[attributeName] = !0;\n return !1;\n}\nfunction setValueForAttribute(node, name, value) {\n if (isAttributeNameSafe(name))\n if (null === value) node.removeAttribute(name);\n else {\n switch (typeof value) {\n case \"undefined\":\n case \"function\":\n case \"symbol\":\n node.removeAttribute(name);\n return;\n case \"boolean\":\n var prefix$10 = name.toLowerCase().slice(0, 5);\n if (\"data-\" !== prefix$10 && \"aria-\" !== prefix$10) {\n node.removeAttribute(name);\n return;\n }\n }\n node.setAttribute(name, \"\" + value);\n }\n}\nfunction setValueForKnownAttribute(node, name, value) {\n if (null === value) node.removeAttribute(name);\n else {\n switch (typeof value) {\n case \"undefined\":\n case \"function\":\n case \"symbol\":\n case \"boolean\":\n node.removeAttribute(name);\n return;\n }\n node.setAttribute(name, \"\" + value);\n }\n}\nfunction setValueForNamespacedAttribute(node, namespace, name, value) {\n if (null === value) node.removeAttribute(name);\n else {\n switch (typeof value) {\n case \"undefined\":\n case \"function\":\n case \"symbol\":\n case \"boolean\":\n node.removeAttribute(name);\n return;\n }\n node.setAttributeNS(namespace, name, \"\" + value);\n }\n}\nfunction getToStringValue(value) {\n switch (typeof value) {\n case \"bigint\":\n case \"boolean\":\n case \"number\":\n case \"string\":\n case \"undefined\":\n return value;\n case \"object\":\n return value;\n default:\n return \"\";\n }\n}\nfunction isCheckable(elem) {\n var type = elem.type;\n return (\n (elem = elem.nodeName) &&\n \"input\" === elem.toLowerCase() &&\n (\"checkbox\" === type || \"radio\" === type)\n );\n}\nfunction trackValueOnNode(node, valueField, currentValue) {\n var descriptor = Object.getOwnPropertyDescriptor(\n node.constructor.prototype,\n valueField\n );\n if (\n !node.hasOwnProperty(valueField) &&\n \"undefined\" !== typeof descriptor &&\n \"function\" === typeof descriptor.get &&\n \"function\" === typeof descriptor.set\n ) {\n var get = descriptor.get,\n set = descriptor.set;\n Object.defineProperty(node, valueField, {\n configurable: !0,\n get: function () {\n return get.call(this);\n },\n set: function (value) {\n currentValue = \"\" + value;\n set.call(this, value);\n }\n });\n Object.defineProperty(node, valueField, {\n enumerable: descriptor.enumerable\n });\n return {\n getValue: function () {\n return currentValue;\n },\n setValue: function (value) {\n currentValue = \"\" + value;\n },\n stopTracking: function () {\n node._valueTracker = null;\n delete node[valueField];\n }\n };\n }\n}\nfunction track(node) {\n if (!node._valueTracker) {\n var valueField = isCheckable(node) ? \"checked\" : \"value\";\n node._valueTracker = trackValueOnNode(\n node,\n valueField,\n \"\" + node[valueField]\n );\n }\n}\nfunction updateValueIfChanged(node) {\n if (!node) return !1;\n var tracker = node._valueTracker;\n if (!tracker) return !0;\n var lastValue = tracker.getValue();\n var value = \"\";\n node &&\n (value = isCheckable(node)\n ? node.checked\n ? \"true\"\n : \"false\"\n : node.value);\n node = value;\n return node !== lastValue ? (tracker.setValue(node), !0) : !1;\n}\nfunction getActiveElement(doc) {\n doc = doc || (\"undefined\" !== typeof document ? document : void 0);\n if (\"undefined\" === typeof doc) return null;\n try {\n return doc.activeElement || doc.body;\n } catch (e) {\n return doc.body;\n }\n}\nvar escapeSelectorAttributeValueInsideDoubleQuotesRegex = /[\\n\"\\\\]/g;\nfunction escapeSelectorAttributeValueInsideDoubleQuotes(value) {\n return value.replace(\n escapeSelectorAttributeValueInsideDoubleQuotesRegex,\n function (ch) {\n return \"\\\\\" + ch.charCodeAt(0).toString(16) + \" \";\n }\n );\n}\nfunction updateInput(\n element,\n value,\n defaultValue,\n lastDefaultValue,\n checked,\n defaultChecked,\n type,\n name\n) {\n element.name = \"\";\n null != type &&\n \"function\" !== typeof type &&\n \"symbol\" !== typeof type &&\n \"boolean\" !== typeof type\n ? (element.type = type)\n : element.removeAttribute(\"type\");\n if (null != value)\n if (\"number\" === type) {\n if ((0 === value && \"\" === element.value) || element.value != value)\n element.value = \"\" + getToStringValue(value);\n } else\n element.value !== \"\" + getToStringValue(value) &&\n (element.value = \"\" + getToStringValue(value));\n else\n (\"submit\" !== type && \"reset\" !== type) || element.removeAttribute(\"value\");\n null != value\n ? setDefaultValue(element, type, getToStringValue(value))\n : null != defaultValue\n ? setDefaultValue(element, type, getToStringValue(defaultValue))\n : null != lastDefaultValue && element.removeAttribute(\"value\");\n null == checked &&\n null != defaultChecked &&\n (element.defaultChecked = !!defaultChecked);\n null != checked &&\n (element.checked =\n checked && \"function\" !== typeof checked && \"symbol\" !== typeof checked);\n null != name &&\n \"function\" !== typeof name &&\n \"symbol\" !== typeof name &&\n \"boolean\" !== typeof name\n ? (element.name = \"\" + getToStringValue(name))\n : element.removeAttribute(\"name\");\n}\nfunction initInput(\n element,\n value,\n defaultValue,\n checked,\n defaultChecked,\n type,\n name,\n isHydrating\n) {\n null != type &&\n \"function\" !== typeof type &&\n \"symbol\" !== typeof type &&\n \"boolean\" !== typeof type &&\n (element.type = type);\n if (null != value || null != defaultValue) {\n if (\n !(\n (\"submit\" !== type && \"reset\" !== type) ||\n (void 0 !== value && null !== value)\n )\n ) {\n track(element);\n return;\n }\n defaultValue =\n null != defaultValue ? \"\" + getToStringValue(defaultValue) : \"\";\n value = null != value ? \"\" + getToStringValue(value) : defaultValue;\n isHydrating || value === element.value || (element.value = value);\n element.defaultValue = value;\n }\n checked = null != checked ? checked : defaultChecked;\n checked =\n \"function\" !== typeof checked && \"symbol\" !== typeof checked && !!checked;\n element.checked = isHydrating ? element.checked : !!checked;\n element.defaultChecked = !!checked;\n null != name &&\n \"function\" !== typeof name &&\n \"symbol\" !== typeof name &&\n \"boolean\" !== typeof name &&\n (element.name = name);\n track(element);\n}\nfunction setDefaultValue(node, type, value) {\n (\"number\" === type && getActiveElement(node.ownerDocument) === node) ||\n node.defaultValue === \"\" + value ||\n (node.defaultValue = \"\" + value);\n}\nfunction updateOptions(node, multiple, propValue, setDefaultSelected) {\n node = node.options;\n if (multiple) {\n multiple = {};\n for (var i = 0; i < propValue.length; i++)\n multiple[\"$\" + propValue[i]] = !0;\n for (propValue = 0; propValue < node.length; propValue++)\n (i = multiple.hasOwnProperty(\"$\" + node[propValue].value)),\n node[propValue].selected !== i && (node[propValue].selected = i),\n i && setDefaultSelected && (node[propValue].defaultSelected = !0);\n } else {\n propValue = \"\" + getToStringValue(propValue);\n multiple = null;\n for (i = 0; i < node.length; i++) {\n if (node[i].value === propValue) {\n node[i].selected = !0;\n setDefaultSelected && (node[i].defaultSelected = !0);\n return;\n }\n null !== multiple || node[i].disabled || (multiple = node[i]);\n }\n null !== multiple && (multiple.selected = !0);\n }\n}\nfunction updateTextarea(element, value, defaultValue) {\n if (\n null != value &&\n ((value = \"\" + getToStringValue(value)),\n value !== element.value && (element.value = value),\n null == defaultValue)\n ) {\n element.defaultValue !== value && (element.defaultValue = value);\n return;\n }\n element.defaultValue =\n null != defaultValue ? \"\" + getToStringValue(defaultValue) : \"\";\n}\nfunction initTextarea(element, value, defaultValue, children) {\n if (null == value) {\n if (null != children) {\n if (null != defaultValue) throw Error(formatProdErrorMessage(92));\n if (isArrayImpl(children)) {\n if (1 < children.length) throw Error(formatProdErrorMessage(93));\n children = children[0];\n }\n defaultValue = children;\n }\n null == defaultValue && (defaultValue = \"\");\n value = defaultValue;\n }\n defaultValue = getToStringValue(value);\n element.defaultValue = defaultValue;\n children = element.textContent;\n children === defaultValue &&\n \"\" !== children &&\n null !== children &&\n (element.value = children);\n track(element);\n}\nfunction setTextContent(node, text) {\n if (text) {\n var firstChild = node.firstChild;\n if (\n firstChild &&\n firstChild === node.lastChild &&\n 3 === firstChild.nodeType\n ) {\n firstChild.nodeValue = text;\n return;\n }\n }\n node.textContent = text;\n}\nvar unitlessNumbers = new Set(\n \"animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp\".split(\n \" \"\n )\n);\nfunction setValueForStyle(style, styleName, value) {\n var isCustomProperty = 0 === styleName.indexOf(\"--\");\n null == value || \"boolean\" === typeof value || \"\" === value\n ? isCustomProperty\n ? style.setProperty(styleName, \"\")\n : \"float\" === styleName\n ? (style.cssFloat = \"\")\n : (style[styleName] = \"\")\n : isCustomProperty\n ? style.setProperty(styleName, value)\n : \"number\" !== typeof value ||\n 0 === value ||\n unitlessNumbers.has(styleName)\n ? \"float\" === styleName\n ? (style.cssFloat = value)\n : (style[styleName] = (\"\" + value).trim())\n : (style[styleName] = value + \"px\");\n}\nfunction setValueForStyles(node, styles, prevStyles) {\n if (null != styles && \"object\" !== typeof styles)\n throw Error(formatProdErrorMessage(62));\n node = node.style;\n if (null != prevStyles) {\n for (var styleName in prevStyles)\n !prevStyles.hasOwnProperty(styleName) ||\n (null != styles && styles.hasOwnProperty(styleName)) ||\n (0 === styleName.indexOf(\"--\")\n ? node.setProperty(styleName, \"\")\n : \"float\" === styleName\n ? (node.cssFloat = \"\")\n : (node[styleName] = \"\"));\n for (var styleName$16 in styles)\n (styleName = styles[styleName$16]),\n styles.hasOwnProperty(styleName$16) &&\n prevStyles[styleName$16] !== styleName &&\n setValueForStyle(node, styleName$16, styleName);\n } else\n for (var styleName$17 in styles)\n styles.hasOwnProperty(styleName$17) &&\n setValueForStyle(node, styleName$17, styles[styleName$17]);\n}\nfunction isCustomElement(tagName) {\n if (-1 === tagName.indexOf(\"-\")) return !1;\n switch (tagName) {\n case \"annotation-xml\":\n case \"color-profile\":\n case \"font-face\":\n case \"font-face-src\":\n case \"font-face-uri\":\n case \"font-face-format\":\n case \"font-face-name\":\n case \"missing-glyph\":\n return !1;\n default:\n return !0;\n }\n}\nvar aliases = new Map([\n [\"acceptCharset\", \"accept-charset\"],\n [\"htmlFor\", \"for\"],\n [\"httpEquiv\", \"http-equiv\"],\n [\"crossOrigin\", \"crossorigin\"],\n [\"accentHeight\", \"accent-height\"],\n [\"alignmentBaseline\", \"alignment-baseline\"],\n [\"arabicForm\", \"arabic-form\"],\n [\"baselineShift\", \"baseline-shift\"],\n [\"capHeight\", \"cap-height\"],\n [\"clipPath\", \"clip-path\"],\n [\"clipRule\", \"clip-rule\"],\n [\"colorInterpolation\", \"color-interpolation\"],\n [\"colorInterpolationFilters\", \"color-interpolation-filters\"],\n [\"colorProfile\", \"color-profile\"],\n [\"colorRendering\", \"color-rendering\"],\n [\"dominantBaseline\", \"dominant-baseline\"],\n [\"enableBackground\", \"enable-background\"],\n [\"fillOpacity\", \"fill-opacity\"],\n [\"fillRule\", \"fill-rule\"],\n [\"floodColor\", \"flood-color\"],\n [\"floodOpacity\", \"flood-opacity\"],\n [\"fontFamily\", \"font-family\"],\n [\"fontSize\", \"font-size\"],\n [\"fontSizeAdjust\", \"font-size-adjust\"],\n [\"fontStretch\", \"font-stretch\"],\n [\"fontStyle\", \"font-style\"],\n [\"fontVariant\", \"font-variant\"],\n [\"fontWeight\", \"font-weight\"],\n [\"glyphName\", \"glyph-name\"],\n [\"glyphOrientationHorizontal\", \"glyph-orientation-horizontal\"],\n [\"glyphOrientationVertical\", \"glyph-orientation-vertical\"],\n [\"horizAdvX\", \"horiz-adv-x\"],\n [\"horizOriginX\", \"horiz-origin-x\"],\n [\"imageRendering\", \"image-rendering\"],\n [\"letterSpacing\", \"letter-spacing\"],\n [\"lightingColor\", \"lighting-color\"],\n [\"markerEnd\", \"marker-end\"],\n [\"markerMid\", \"marker-mid\"],\n [\"markerStart\", \"marker-start\"],\n [\"overlinePosition\", \"overline-position\"],\n [\"overlineThickness\", \"overline-thickness\"],\n [\"paintOrder\", \"paint-order\"],\n [\"panose-1\", \"panose-1\"],\n [\"pointerEvents\", \"pointer-events\"],\n [\"renderingIntent\", \"rendering-intent\"],\n [\"shapeRendering\", \"shape-rendering\"],\n [\"stopColor\", \"stop-color\"],\n [\"stopOpacity\", \"stop-opacity\"],\n [\"strikethroughPosition\", \"strikethrough-position\"],\n [\"strikethroughThickness\", \"strikethrough-thickness\"],\n [\"strokeDasharray\", \"stroke-dasharray\"],\n [\"strokeDashoffset\", \"stroke-dashoffset\"],\n [\"strokeLinecap\", \"stroke-linecap\"],\n [\"strokeLinejoin\", \"stroke-linejoin\"],\n [\"strokeMiterlimit\", \"stroke-miterlimit\"],\n [\"strokeOpacity\", \"stroke-opacity\"],\n [\"strokeWidth\", \"stroke-width\"],\n [\"textAnchor\", \"text-anchor\"],\n [\"textDecoration\", \"text-decoration\"],\n [\"textRendering\", \"text-rendering\"],\n [\"transformOrigin\", \"transform-origin\"],\n [\"underlinePosition\", \"underline-position\"],\n [\"underlineThickness\", \"underline-thickness\"],\n [\"unicodeBidi\", \"unicode-bidi\"],\n [\"unicodeRange\", \"unicode-range\"],\n [\"unitsPerEm\", \"units-per-em\"],\n [\"vAlphabetic\", \"v-alphabetic\"],\n [\"vHanging\", \"v-hanging\"],\n [\"vIdeographic\", \"v-ideographic\"],\n [\"vMathematical\", \"v-mathematical\"],\n [\"vectorEffect\", \"vector-effect\"],\n [\"vertAdvY\", \"vert-adv-y\"],\n [\"vertOriginX\", \"vert-origin-x\"],\n [\"vertOriginY\", \"vert-origin-y\"],\n [\"wordSpacing\", \"word-spacing\"],\n [\"writingMode\", \"writing-mode\"],\n [\"xmlnsXlink\", \"xmlns:xlink\"],\n [\"xHeight\", \"x-height\"]\n ]),\n isJavaScriptProtocol =\n /^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*:/i;\nfunction sanitizeURL(url) {\n return isJavaScriptProtocol.test(\"\" + url)\n ? \"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')\"\n : url;\n}\nfunction noop$1() {}\nvar currentReplayingEvent = null;\nfunction getEventTarget(nativeEvent) {\n nativeEvent = nativeEvent.target || nativeEvent.srcElement || window;\n nativeEvent.correspondingUseElement &&\n (nativeEvent = nativeEvent.correspondingUseElement);\n return 3 === nativeEvent.nodeType ? nativeEvent.parentNode : nativeEvent;\n}\nvar restoreTarget = null,\n restoreQueue = null;\nfunction restoreStateOfTarget(target) {\n var internalInstance = getInstanceFromNode(target);\n if (internalInstance && (target = internalInstance.stateNode)) {\n var props = target[internalPropsKey] || null;\n a: switch (((target = internalInstance.stateNode), internalInstance.type)) {\n case \"input\":\n updateInput(\n target,\n props.value,\n props.defaultValue,\n props.defaultValue,\n props.checked,\n props.defaultChecked,\n props.type,\n props.name\n );\n internalInstance = props.name;\n if (\"radio\" === props.type && null != internalInstance) {\n for (props = target; props.parentNode; ) props = props.parentNode;\n props = props.querySelectorAll(\n 'input[name=\"' +\n escapeSelectorAttributeValueInsideDoubleQuotes(\n \"\" + internalInstance\n ) +\n '\"][type=\"radio\"]'\n );\n for (\n internalInstance = 0;\n internalInstance < props.length;\n internalInstance++\n ) {\n var otherNode = props[internalInstance];\n if (otherNode !== target && otherNode.form === target.form) {\n var otherProps = otherNode[internalPropsKey] || null;\n if (!otherProps) throw Error(formatProdErrorMessage(90));\n updateInput(\n otherNode,\n otherProps.value,\n otherProps.defaultValue,\n otherProps.defaultValue,\n otherProps.checked,\n otherProps.defaultChecked,\n otherProps.type,\n otherProps.name\n );\n }\n }\n for (\n internalInstance = 0;\n internalInstance < props.length;\n internalInstance++\n )\n (otherNode = props[internalInstance]),\n otherNode.form === target.form && updateValueIfChanged(otherNode);\n }\n break a;\n case \"textarea\":\n updateTextarea(target, props.value, props.defaultValue);\n break a;\n case \"select\":\n (internalInstance = props.value),\n null != internalInstance &&\n updateOptions(target, !!props.multiple, internalInstance, !1);\n }\n }\n}\nvar isInsideEventHandler = !1;\nfunction batchedUpdates$1(fn, a, b) {\n if (isInsideEventHandler) return fn(a, b);\n isInsideEventHandler = !0;\n try {\n var JSCompiler_inline_result = fn(a);\n return JSCompiler_inline_result;\n } finally {\n if (\n ((isInsideEventHandler = !1),\n null !== restoreTarget || null !== restoreQueue)\n )\n if (\n (flushSyncWork$1(),\n restoreTarget &&\n ((a = restoreTarget),\n (fn = restoreQueue),\n (restoreQueue = restoreTarget = null),\n restoreStateOfTarget(a),\n fn))\n )\n for (a = 0; a < fn.length; a++) restoreStateOfTarget(fn[a]);\n }\n}\nfunction getListener(inst, registrationName) {\n var stateNode = inst.stateNode;\n if (null === stateNode) return null;\n var props = stateNode[internalPropsKey] || null;\n if (null === props) return null;\n stateNode = props[registrationName];\n a: switch (registrationName) {\n case \"onClick\":\n case \"onClickCapture\":\n case \"onDoubleClick\":\n case \"onDoubleClickCapture\":\n case \"onMouseDown\":\n case \"onMouseDownCapture\":\n case \"onMouseMove\":\n case \"onMouseMoveCapture\":\n case \"onMouseUp\":\n case \"onMouseUpCapture\":\n case \"onMouseEnter\":\n (props = !props.disabled) ||\n ((inst = inst.type),\n (props = !(\n \"button\" === inst ||\n \"input\" === inst ||\n \"select\" === inst ||\n \"textarea\" === inst\n )));\n inst = !props;\n break a;\n default:\n inst = !1;\n }\n if (inst) return null;\n if (stateNode && \"function\" !== typeof stateNode)\n throw Error(\n formatProdErrorMessage(231, registrationName, typeof stateNode)\n );\n return stateNode;\n}\nvar canUseDOM = !(\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ),\n passiveBrowserEventsSupported = !1;\nif (canUseDOM)\n try {\n var options = {};\n Object.defineProperty(options, \"passive\", {\n get: function () {\n passiveBrowserEventsSupported = !0;\n }\n });\n window.addEventListener(\"test\", options, options);\n window.removeEventListener(\"test\", options, options);\n } catch (e) {\n passiveBrowserEventsSupported = !1;\n }\nvar root = null,\n startText = null,\n fallbackText = null;\nfunction getData() {\n if (fallbackText) return fallbackText;\n var start,\n startValue = startText,\n startLength = startValue.length,\n end,\n endValue = \"value\" in root ? root.value : root.textContent,\n endLength = endValue.length;\n for (\n start = 0;\n start < startLength && startValue[start] === endValue[start];\n start++\n );\n var minEnd = startLength - start;\n for (\n end = 1;\n end <= minEnd &&\n startValue[startLength - end] === endValue[endLength - end];\n end++\n );\n return (fallbackText = endValue.slice(start, 1 < end ? 1 - end : void 0));\n}\nfunction getEventCharCode(nativeEvent) {\n var keyCode = nativeEvent.keyCode;\n \"charCode\" in nativeEvent\n ? ((nativeEvent = nativeEvent.charCode),\n 0 === nativeEvent && 13 === keyCode && (nativeEvent = 13))\n : (nativeEvent = keyCode);\n 10 === nativeEvent && (nativeEvent = 13);\n return 32 <= nativeEvent || 13 === nativeEvent ? nativeEvent : 0;\n}\nfunction functionThatReturnsTrue() {\n return !0;\n}\nfunction functionThatReturnsFalse() {\n return !1;\n}\nfunction createSyntheticEvent(Interface) {\n function SyntheticBaseEvent(\n reactName,\n reactEventType,\n targetInst,\n nativeEvent,\n nativeEventTarget\n ) {\n this._reactName = reactName;\n this._targetInst = targetInst;\n this.type = reactEventType;\n this.nativeEvent = nativeEvent;\n this.target = nativeEventTarget;\n this.currentTarget = null;\n for (var propName in Interface)\n Interface.hasOwnProperty(propName) &&\n ((reactName = Interface[propName]),\n (this[propName] = reactName\n ? reactName(nativeEvent)\n : nativeEvent[propName]));\n this.isDefaultPrevented = (\n null != nativeEvent.defaultPrevented\n ? nativeEvent.defaultPrevented\n : !1 === nativeEvent.returnValue\n )\n ? functionThatReturnsTrue\n : functionThatReturnsFalse;\n this.isPropagationStopped = functionThatReturnsFalse;\n return this;\n }\n assign(SyntheticBaseEvent.prototype, {\n preventDefault: function () {\n this.defaultPrevented = !0;\n var event = this.nativeEvent;\n event &&\n (event.preventDefault\n ? event.preventDefault()\n : \"unknown\" !== typeof event.returnValue && (event.returnValue = !1),\n (this.isDefaultPrevented = functionThatReturnsTrue));\n },\n stopPropagation: function () {\n var event = this.nativeEvent;\n event &&\n (event.stopPropagation\n ? event.stopPropagation()\n : \"unknown\" !== typeof event.cancelBubble &&\n (event.cancelBubble = !0),\n (this.isPropagationStopped = functionThatReturnsTrue));\n },\n persist: function () {},\n isPersistent: functionThatReturnsTrue\n });\n return SyntheticBaseEvent;\n}\nvar EventInterface = {\n eventPhase: 0,\n bubbles: 0,\n cancelable: 0,\n timeStamp: function (event) {\n return event.timeStamp || Date.now();\n },\n defaultPrevented: 0,\n isTrusted: 0\n },\n SyntheticEvent = createSyntheticEvent(EventInterface),\n UIEventInterface = assign({}, EventInterface, { view: 0, detail: 0 }),\n SyntheticUIEvent = createSyntheticEvent(UIEventInterface),\n lastMovementX,\n lastMovementY,\n lastMouseEvent,\n MouseEventInterface = assign({}, UIEventInterface, {\n screenX: 0,\n screenY: 0,\n clientX: 0,\n clientY: 0,\n pageX: 0,\n pageY: 0,\n ctrlKey: 0,\n shiftKey: 0,\n altKey: 0,\n metaKey: 0,\n getModifierState: getEventModifierState,\n button: 0,\n buttons: 0,\n relatedTarget: function (event) {\n return void 0 === event.relatedTarget\n ? event.fromElement === event.srcElement\n ? event.toElement\n : event.fromElement\n : event.relatedTarget;\n },\n movementX: function (event) {\n if (\"movementX\" in event) return event.movementX;\n event !== lastMouseEvent &&\n (lastMouseEvent && \"mousemove\" === event.type\n ? ((lastMovementX = event.screenX - lastMouseEvent.screenX),\n (lastMovementY = event.screenY - lastMouseEvent.screenY))\n : (lastMovementY = lastMovementX = 0),\n (lastMouseEvent = event));\n return lastMovementX;\n },\n movementY: function (event) {\n return \"movementY\" in event ? event.movementY : lastMovementY;\n }\n }),\n SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface),\n DragEventInterface = assign({}, MouseEventInterface, { dataTransfer: 0 }),\n SyntheticDragEvent = createSyntheticEvent(DragEventInterface),\n FocusEventInterface = assign({}, UIEventInterface, { relatedTarget: 0 }),\n SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface),\n AnimationEventInterface = assign({}, EventInterface, {\n animationName: 0,\n elapsedTime: 0,\n pseudoElement: 0\n }),\n SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface),\n ClipboardEventInterface = assign({}, EventInterface, {\n clipboardData: function (event) {\n return \"clipboardData\" in event\n ? event.clipboardData\n : window.clipboardData;\n }\n }),\n SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface),\n CompositionEventInterface = assign({}, EventInterface, { data: 0 }),\n SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface),\n normalizeKey = {\n Esc: \"Escape\",\n Spacebar: \" \",\n Left: \"ArrowLeft\",\n Up: \"ArrowUp\",\n Right: \"ArrowRight\",\n Down: \"ArrowDown\",\n Del: \"Delete\",\n Win: \"OS\",\n Menu: \"ContextMenu\",\n Apps: \"ContextMenu\",\n Scroll: \"ScrollLock\",\n MozPrintableKey: \"Unidentified\"\n },\n translateToKey = {\n 8: \"Backspace\",\n 9: \"Tab\",\n 12: \"Clear\",\n 13: \"Enter\",\n 16: \"Shift\",\n 17: \"Control\",\n 18: \"Alt\",\n 19: \"Pause\",\n 20: \"CapsLock\",\n 27: \"Escape\",\n 32: \" \",\n 33: \"PageUp\",\n 34: \"PageDown\",\n 35: \"End\",\n 36: \"Home\",\n 37: \"ArrowLeft\",\n 38: \"ArrowUp\",\n 39: \"ArrowRight\",\n 40: \"ArrowDown\",\n 45: \"Insert\",\n 46: \"Delete\",\n 112: \"F1\",\n 113: \"F2\",\n 114: \"F3\",\n 115: \"F4\",\n 116: \"F5\",\n 117: \"F6\",\n 118: \"F7\",\n 119: \"F8\",\n 120: \"F9\",\n 121: \"F10\",\n 122: \"F11\",\n 123: \"F12\",\n 144: \"NumLock\",\n 145: \"ScrollLock\",\n 224: \"Meta\"\n },\n modifierKeyToProp = {\n Alt: \"altKey\",\n Control: \"ctrlKey\",\n Meta: \"metaKey\",\n Shift: \"shiftKey\"\n };\nfunction modifierStateGetter(keyArg) {\n var nativeEvent = this.nativeEvent;\n return nativeEvent.getModifierState\n ? nativeEvent.getModifierState(keyArg)\n : (keyArg = modifierKeyToProp[keyArg])\n ? !!nativeEvent[keyArg]\n : !1;\n}\nfunction getEventModifierState() {\n return modifierStateGetter;\n}\nvar KeyboardEventInterface = assign({}, UIEventInterface, {\n key: function (nativeEvent) {\n if (nativeEvent.key) {\n var key = normalizeKey[nativeEvent.key] || nativeEvent.key;\n if (\"Unidentified\" !== key) return key;\n }\n return \"keypress\" === nativeEvent.type\n ? ((nativeEvent = getEventCharCode(nativeEvent)),\n 13 === nativeEvent ? \"Enter\" : String.fromCharCode(nativeEvent))\n : \"keydown\" === nativeEvent.type || \"keyup\" === nativeEvent.type\n ? translateToKey[nativeEvent.keyCode] || \"Unidentified\"\n : \"\";\n },\n code: 0,\n location: 0,\n ctrlKey: 0,\n shiftKey: 0,\n altKey: 0,\n metaKey: 0,\n repeat: 0,\n locale: 0,\n getModifierState: getEventModifierState,\n charCode: function (event) {\n return \"keypress\" === event.type ? getEventCharCode(event) : 0;\n },\n keyCode: function (event) {\n return \"keydown\" === event.type || \"keyup\" === event.type\n ? event.keyCode\n : 0;\n },\n which: function (event) {\n return \"keypress\" === event.type\n ? getEventCharCode(event)\n : \"keydown\" === event.type || \"keyup\" === event.type\n ? event.keyCode\n : 0;\n }\n }),\n SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface),\n PointerEventInterface = assign({}, MouseEventInterface, {\n pointerId: 0,\n width: 0,\n height: 0,\n pressure: 0,\n tangentialPressure: 0,\n tiltX: 0,\n tiltY: 0,\n twist: 0,\n pointerType: 0,\n isPrimary: 0\n }),\n SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface),\n TouchEventInterface = assign({}, UIEventInterface, {\n touches: 0,\n targetTouches: 0,\n changedTouches: 0,\n altKey: 0,\n metaKey: 0,\n ctrlKey: 0,\n shiftKey: 0,\n getModifierState: getEventModifierState\n }),\n SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface),\n TransitionEventInterface = assign({}, EventInterface, {\n propertyName: 0,\n elapsedTime: 0,\n pseudoElement: 0\n }),\n SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface),\n WheelEventInterface = assign({}, MouseEventInterface, {\n deltaX: function (event) {\n return \"deltaX\" in event\n ? event.deltaX\n : \"wheelDeltaX\" in event\n ? -event.wheelDeltaX\n : 0;\n },\n deltaY: function (event) {\n return \"deltaY\" in event\n ? event.deltaY\n : \"wheelDeltaY\" in event\n ? -event.wheelDeltaY\n : \"wheelDelta\" in event\n ? -event.wheelDelta\n : 0;\n },\n deltaZ: 0,\n deltaMode: 0\n }),\n SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface),\n ToggleEventInterface = assign({}, EventInterface, {\n newState: 0,\n oldState: 0\n }),\n SyntheticToggleEvent = createSyntheticEvent(ToggleEventInterface),\n END_KEYCODES = [9, 13, 27, 32],\n canUseCompositionEvent = canUseDOM && \"CompositionEvent\" in window,\n documentMode = null;\ncanUseDOM &&\n \"documentMode\" in document &&\n (documentMode = document.documentMode);\nvar canUseTextInputEvent = canUseDOM && \"TextEvent\" in window && !documentMode,\n useFallbackCompositionData =\n canUseDOM &&\n (!canUseCompositionEvent ||\n (documentMode && 8 < documentMode && 11 >= documentMode)),\n SPACEBAR_CHAR = String.fromCharCode(32),\n hasSpaceKeypress = !1;\nfunction isFallbackCompositionEnd(domEventName, nativeEvent) {\n switch (domEventName) {\n case \"keyup\":\n return -1 !== END_KEYCODES.indexOf(nativeEvent.keyCode);\n case \"keydown\":\n return 229 !== nativeEvent.keyCode;\n case \"keypress\":\n case \"mousedown\":\n case \"focusout\":\n return !0;\n default:\n return !1;\n }\n}\nfunction getDataFromCustomEvent(nativeEvent) {\n nativeEvent = nativeEvent.detail;\n return \"object\" === typeof nativeEvent && \"data\" in nativeEvent\n ? nativeEvent.data\n : null;\n}\nvar isComposing = !1;\nfunction getNativeBeforeInputChars(domEventName, nativeEvent) {\n switch (domEventName) {\n case \"compositionend\":\n return getDataFromCustomEvent(nativeEvent);\n case \"keypress\":\n if (32 !== nativeEvent.which) return null;\n hasSpaceKeypress = !0;\n return SPACEBAR_CHAR;\n case \"textInput\":\n return (\n (domEventName = nativeEvent.data),\n domEventName === SPACEBAR_CHAR && hasSpaceKeypress ? null : domEventName\n );\n default:\n return null;\n }\n}\nfunction getFallbackBeforeInputChars(domEventName, nativeEvent) {\n if (isComposing)\n return \"compositionend\" === domEventName ||\n (!canUseCompositionEvent &&\n isFallbackCompositionEnd(domEventName, nativeEvent))\n ? ((domEventName = getData()),\n (fallbackText = startText = root = null),\n (isComposing = !1),\n domEventName)\n : null;\n switch (domEventName) {\n case \"paste\":\n return null;\n case \"keypress\":\n if (\n !(nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) ||\n (nativeEvent.ctrlKey && nativeEvent.altKey)\n ) {\n if (nativeEvent.char && 1 < nativeEvent.char.length)\n return nativeEvent.char;\n if (nativeEvent.which) return String.fromCharCode(nativeEvent.which);\n }\n return null;\n case \"compositionend\":\n return useFallbackCompositionData && \"ko\" !== nativeEvent.locale\n ? null\n : nativeEvent.data;\n default:\n return null;\n }\n}\nvar supportedInputTypes = {\n color: !0,\n date: !0,\n datetime: !0,\n \"datetime-local\": !0,\n email: !0,\n month: !0,\n number: !0,\n password: !0,\n range: !0,\n search: !0,\n tel: !0,\n text: !0,\n time: !0,\n url: !0,\n week: !0\n};\nfunction isTextInputElement(elem) {\n var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n return \"input\" === nodeName\n ? !!supportedInputTypes[elem.type]\n : \"textarea\" === nodeName\n ? !0\n : !1;\n}\nfunction createAndAccumulateChangeEvent(\n dispatchQueue,\n inst,\n nativeEvent,\n target\n) {\n restoreTarget\n ? restoreQueue\n ? restoreQueue.push(target)\n : (restoreQueue = [target])\n : (restoreTarget = target);\n inst = accumulateTwoPhaseListeners(inst, \"onChange\");\n 0 < inst.length &&\n ((nativeEvent = new SyntheticEvent(\n \"onChange\",\n \"change\",\n null,\n nativeEvent,\n target\n )),\n dispatchQueue.push({ event: nativeEvent, listeners: inst }));\n}\nvar activeElement$1 = null,\n activeElementInst$1 = null;\nfunction runEventInBatch(dispatchQueue) {\n processDispatchQueue(dispatchQueue, 0);\n}\nfunction getInstIfValueChanged(targetInst) {\n var targetNode = getNodeFromInstance(targetInst);\n if (updateValueIfChanged(targetNode)) return targetInst;\n}\nfunction getTargetInstForChangeEvent(domEventName, targetInst) {\n if (\"change\" === domEventName) return targetInst;\n}\nvar isInputEventSupported = !1;\nif (canUseDOM) {\n var JSCompiler_inline_result$jscomp$286;\n if (canUseDOM) {\n var isSupported$jscomp$inline_427 = \"oninput\" in document;\n if (!isSupported$jscomp$inline_427) {\n var element$jscomp$inline_428 = document.createElement(\"div\");\n element$jscomp$inline_428.setAttribute(\"oninput\", \"return;\");\n isSupported$jscomp$inline_427 =\n \"function\" === typeof element$jscomp$inline_428.oninput;\n }\n JSCompiler_inline_result$jscomp$286 = isSupported$jscomp$inline_427;\n } else JSCompiler_inline_result$jscomp$286 = !1;\n isInputEventSupported =\n JSCompiler_inline_result$jscomp$286 &&\n (!document.documentMode || 9 < document.documentMode);\n}\nfunction stopWatchingForValueChange() {\n activeElement$1 &&\n (activeElement$1.detachEvent(\"onpropertychange\", handlePropertyChange),\n (activeElementInst$1 = activeElement$1 = null));\n}\nfunction handlePropertyChange(nativeEvent) {\n if (\n \"value\" === nativeEvent.propertyName &&\n getInstIfValueChanged(activeElementInst$1)\n ) {\n var dispatchQueue = [];\n createAndAccumulateChangeEvent(\n dispatchQueue,\n activeElementInst$1,\n nativeEvent,\n getEventTarget(nativeEvent)\n );\n batchedUpdates$1(runEventInBatch, dispatchQueue);\n }\n}\nfunction handleEventsForInputEventPolyfill(domEventName, target, targetInst) {\n \"focusin\" === domEventName\n ? (stopWatchingForValueChange(),\n (activeElement$1 = target),\n (activeElementInst$1 = targetInst),\n activeElement$1.attachEvent(\"onpropertychange\", handlePropertyChange))\n : \"focusout\" === domEventName && stopWatchingForValueChange();\n}\nfunction getTargetInstForInputEventPolyfill(domEventName) {\n if (\n \"selectionchange\" === domEventName ||\n \"keyup\" === domEventName ||\n \"keydown\" === domEventName\n )\n return getInstIfValueChanged(activeElementInst$1);\n}\nfunction getTargetInstForClickEvent(domEventName, targetInst) {\n if (\"click\" === domEventName) return getInstIfValueChanged(targetInst);\n}\nfunction getTargetInstForInputOrChangeEvent(domEventName, targetInst) {\n if (\"input\" === domEventName || \"change\" === domEventName)\n return getInstIfValueChanged(targetInst);\n}\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is;\nfunction shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) return !0;\n if (\n \"object\" !== typeof objA ||\n null === objA ||\n \"object\" !== typeof objB ||\n null === objB\n )\n return !1;\n var keysA = Object.keys(objA),\n keysB = Object.keys(objB);\n if (keysA.length !== keysB.length) return !1;\n for (keysB = 0; keysB < keysA.length; keysB++) {\n var currentKey = keysA[keysB];\n if (\n !hasOwnProperty.call(objB, currentKey) ||\n !objectIs(objA[currentKey], objB[currentKey])\n )\n return !1;\n }\n return !0;\n}\nfunction getLeafNode(node) {\n for (; node && node.firstChild; ) node = node.firstChild;\n return node;\n}\nfunction getNodeForCharacterOffset(root, offset) {\n var node = getLeafNode(root);\n root = 0;\n for (var nodeEnd; node; ) {\n if (3 === node.nodeType) {\n nodeEnd = root + node.textContent.length;\n if (root <= offset && nodeEnd >= offset)\n return { node: node, offset: offset - root };\n root = nodeEnd;\n }\n a: {\n for (; node; ) {\n if (node.nextSibling) {\n node = node.nextSibling;\n break a;\n }\n node = node.parentNode;\n }\n node = void 0;\n }\n node = getLeafNode(node);\n }\n}\nfunction containsNode(outerNode, innerNode) {\n return outerNode && innerNode\n ? outerNode === innerNode\n ? !0\n : outerNode && 3 === outerNode.nodeType\n ? !1\n : innerNode && 3 === innerNode.nodeType\n ? containsNode(outerNode, innerNode.parentNode)\n : \"contains\" in outerNode\n ? outerNode.contains(innerNode)\n : outerNode.compareDocumentPosition\n ? !!(outerNode.compareDocumentPosition(innerNode) & 16)\n : !1\n : !1;\n}\nfunction getActiveElementDeep(containerInfo) {\n containerInfo =\n null != containerInfo &&\n null != containerInfo.ownerDocument &&\n null != containerInfo.ownerDocument.defaultView\n ? containerInfo.ownerDocument.defaultView\n : window;\n for (\n var element = getActiveElement(containerInfo.document);\n element instanceof containerInfo.HTMLIFrameElement;\n\n ) {\n try {\n var JSCompiler_inline_result =\n \"string\" === typeof element.contentWindow.location.href;\n } catch (err) {\n JSCompiler_inline_result = !1;\n }\n if (JSCompiler_inline_result) containerInfo = element.contentWindow;\n else break;\n element = getActiveElement(containerInfo.document);\n }\n return element;\n}\nfunction hasSelectionCapabilities(elem) {\n var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n return (\n nodeName &&\n ((\"input\" === nodeName &&\n (\"text\" === elem.type ||\n \"search\" === elem.type ||\n \"tel\" === elem.type ||\n \"url\" === elem.type ||\n \"password\" === elem.type)) ||\n \"textarea\" === nodeName ||\n \"true\" === elem.contentEditable)\n );\n}\nvar skipSelectionChangeEvent =\n canUseDOM && \"documentMode\" in document && 11 >= document.documentMode,\n activeElement = null,\n activeElementInst = null,\n lastSelection = null,\n mouseDown = !1;\nfunction constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget) {\n var doc =\n nativeEventTarget.window === nativeEventTarget\n ? nativeEventTarget.document\n : 9 === nativeEventTarget.nodeType\n ? nativeEventTarget\n : nativeEventTarget.ownerDocument;\n mouseDown ||\n null == activeElement ||\n activeElement !== getActiveElement(doc) ||\n ((doc = activeElement),\n \"selectionStart\" in doc && hasSelectionCapabilities(doc)\n ? (doc = { start: doc.selectionStart, end: doc.selectionEnd })\n : ((doc = (\n (doc.ownerDocument && doc.ownerDocument.defaultView) ||\n window\n ).getSelection()),\n (doc = {\n anchorNode: doc.anchorNode,\n anchorOffset: doc.anchorOffset,\n focusNode: doc.focusNode,\n focusOffset: doc.focusOffset\n })),\n (lastSelection && shallowEqual(lastSelection, doc)) ||\n ((lastSelection = doc),\n (doc = accumulateTwoPhaseListeners(activeElementInst, \"onSelect\")),\n 0 < doc.length &&\n ((nativeEvent = new SyntheticEvent(\n \"onSelect\",\n \"select\",\n null,\n nativeEvent,\n nativeEventTarget\n )),\n dispatchQueue.push({ event: nativeEvent, listeners: doc }),\n (nativeEvent.target = activeElement))));\n}\nfunction makePrefixMap(styleProp, eventName) {\n var prefixes = {};\n prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();\n prefixes[\"Webkit\" + styleProp] = \"webkit\" + eventName;\n prefixes[\"Moz\" + styleProp] = \"moz\" + eventName;\n return prefixes;\n}\nvar vendorPrefixes = {\n animationend: makePrefixMap(\"Animation\", \"AnimationEnd\"),\n animationiteration: makePrefixMap(\"Animation\", \"AnimationIteration\"),\n animationstart: makePrefixMap(\"Animation\", \"AnimationStart\"),\n transitionrun: makePrefixMap(\"Transition\", \"TransitionRun\"),\n transitionstart: makePrefixMap(\"Transition\", \"TransitionStart\"),\n transitioncancel: makePrefixMap(\"Transition\", \"TransitionCancel\"),\n transitionend: makePrefixMap(\"Transition\", \"TransitionEnd\")\n },\n prefixedEventNames = {},\n style = {};\ncanUseDOM &&\n ((style = document.createElement(\"div\").style),\n \"AnimationEvent\" in window ||\n (delete vendorPrefixes.animationend.animation,\n delete vendorPrefixes.animationiteration.animation,\n delete vendorPrefixes.animationstart.animation),\n \"TransitionEvent\" in window ||\n delete vendorPrefixes.transitionend.transition);\nfunction getVendorPrefixedEventName(eventName) {\n if (prefixedEventNames[eventName]) return prefixedEventNames[eventName];\n if (!vendorPrefixes[eventName]) return eventName;\n var prefixMap = vendorPrefixes[eventName],\n styleProp;\n for (styleProp in prefixMap)\n if (prefixMap.hasOwnProperty(styleProp) && styleProp in style)\n return (prefixedEventNames[eventName] = prefixMap[styleProp]);\n return eventName;\n}\nvar ANIMATION_END = getVendorPrefixedEventName(\"animationend\"),\n ANIMATION_ITERATION = getVendorPrefixedEventName(\"animationiteration\"),\n ANIMATION_START = getVendorPrefixedEventName(\"animationstart\"),\n TRANSITION_RUN = getVendorPrefixedEventName(\"transitionrun\"),\n TRANSITION_START = getVendorPrefixedEventName(\"transitionstart\"),\n TRANSITION_CANCEL = getVendorPrefixedEventName(\"transitioncancel\"),\n TRANSITION_END = getVendorPrefixedEventName(\"transitionend\"),\n topLevelEventsToReactNames = new Map(),\n simpleEventPluginEvents =\n \"abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel\".split(\n \" \"\n );\nsimpleEventPluginEvents.push(\"scrollEnd\");\nfunction registerSimpleEvent(domEventName, reactName) {\n topLevelEventsToReactNames.set(domEventName, reactName);\n registerTwoPhaseEvent(reactName, [domEventName]);\n}\nvar reportGlobalError =\n \"function\" === typeof reportError\n ? reportError\n : function (error) {\n if (\n \"object\" === typeof window &&\n \"function\" === typeof window.ErrorEvent\n ) {\n var event = new window.ErrorEvent(\"error\", {\n bubbles: !0,\n cancelable: !0,\n message:\n \"object\" === typeof error &&\n null !== error &&\n \"string\" === typeof error.message\n ? String(error.message)\n : String(error),\n error: error\n });\n if (!window.dispatchEvent(event)) return;\n } else if (\n \"object\" === typeof process &&\n \"function\" === typeof process.emit\n ) {\n process.emit(\"uncaughtException\", error);\n return;\n }\n console.error(error);\n },\n concurrentQueues = [],\n concurrentQueuesIndex = 0,\n concurrentlyUpdatedLanes = 0;\nfunction finishQueueingConcurrentUpdates() {\n for (\n var endIndex = concurrentQueuesIndex,\n i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0);\n i < endIndex;\n\n ) {\n var fiber = concurrentQueues[i];\n concurrentQueues[i++] = null;\n var queue = concurrentQueues[i];\n concurrentQueues[i++] = null;\n var update = concurrentQueues[i];\n concurrentQueues[i++] = null;\n var lane = concurrentQueues[i];\n concurrentQueues[i++] = null;\n if (null !== queue && null !== update) {\n var pending = queue.pending;\n null === pending\n ? (update.next = update)\n : ((update.next = pending.next), (pending.next = update));\n queue.pending = update;\n }\n 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane);\n }\n}\nfunction enqueueUpdate$1(fiber, queue, update, lane) {\n concurrentQueues[concurrentQueuesIndex++] = fiber;\n concurrentQueues[concurrentQueuesIndex++] = queue;\n concurrentQueues[concurrentQueuesIndex++] = update;\n concurrentQueues[concurrentQueuesIndex++] = lane;\n concurrentlyUpdatedLanes |= lane;\n fiber.lanes |= lane;\n fiber = fiber.alternate;\n null !== fiber && (fiber.lanes |= lane);\n}\nfunction enqueueConcurrentHookUpdate(fiber, queue, update, lane) {\n enqueueUpdate$1(fiber, queue, update, lane);\n return getRootForUpdatedFiber(fiber);\n}\nfunction enqueueConcurrentRenderForLane(fiber, lane) {\n enqueueUpdate$1(fiber, null, null, lane);\n return getRootForUpdatedFiber(fiber);\n}\nfunction markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) {\n sourceFiber.lanes |= lane;\n var alternate = sourceFiber.alternate;\n null !== alternate && (alternate.lanes |= lane);\n for (var isHidden = !1, parent = sourceFiber.return; null !== parent; )\n (parent.childLanes |= lane),\n (alternate = parent.alternate),\n null !== alternate && (alternate.childLanes |= lane),\n 22 === parent.tag &&\n ((sourceFiber = parent.stateNode),\n null === sourceFiber || sourceFiber._visibility & 1 || (isHidden = !0)),\n (sourceFiber = parent),\n (parent = parent.return);\n return 3 === sourceFiber.tag\n ? ((parent = sourceFiber.stateNode),\n isHidden &&\n null !== update &&\n ((isHidden = 31 - clz32(lane)),\n (sourceFiber = parent.hiddenUpdates),\n (alternate = sourceFiber[isHidden]),\n null === alternate\n ? (sourceFiber[isHidden] = [update])\n : alternate.push(update),\n (update.lane = lane | 536870912)),\n parent)\n : null;\n}\nfunction getRootForUpdatedFiber(sourceFiber) {\n if (50 < nestedUpdateCount)\n throw (\n ((nestedUpdateCount = 0),\n (rootWithNestedUpdates = null),\n Error(formatProdErrorMessage(185)))\n );\n for (var parent = sourceFiber.return; null !== parent; )\n (sourceFiber = parent), (parent = sourceFiber.return);\n return 3 === sourceFiber.tag ? sourceFiber.stateNode : null;\n}\nvar emptyContextObject = {};\nfunction FiberNode(tag, pendingProps, key, mode) {\n this.tag = tag;\n this.key = key;\n this.sibling =\n this.child =\n this.return =\n this.stateNode =\n this.type =\n this.elementType =\n null;\n this.index = 0;\n this.refCleanup = this.ref = null;\n this.pendingProps = pendingProps;\n this.dependencies =\n this.memoizedState =\n this.updateQueue =\n this.memoizedProps =\n null;\n this.mode = mode;\n this.subtreeFlags = this.flags = 0;\n this.deletions = null;\n this.childLanes = this.lanes = 0;\n this.alternate = null;\n}\nfunction createFiberImplClass(tag, pendingProps, key, mode) {\n return new FiberNode(tag, pendingProps, key, mode);\n}\nfunction shouldConstruct(Component) {\n Component = Component.prototype;\n return !(!Component || !Component.isReactComponent);\n}\nfunction createWorkInProgress(current, pendingProps) {\n var workInProgress = current.alternate;\n null === workInProgress\n ? ((workInProgress = createFiberImplClass(\n current.tag,\n pendingProps,\n current.key,\n current.mode\n )),\n (workInProgress.elementType = current.elementType),\n (workInProgress.type = current.type),\n (workInProgress.stateNode = current.stateNode),\n (workInProgress.alternate = current),\n (current.alternate = workInProgress))\n : ((workInProgress.pendingProps = pendingProps),\n (workInProgress.type = current.type),\n (workInProgress.flags = 0),\n (workInProgress.subtreeFlags = 0),\n (workInProgress.deletions = null));\n workInProgress.flags = current.flags & 65011712;\n workInProgress.childLanes = current.childLanes;\n workInProgress.lanes = current.lanes;\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n pendingProps = current.dependencies;\n workInProgress.dependencies =\n null === pendingProps\n ? null\n : { lanes: pendingProps.lanes, firstContext: pendingProps.firstContext };\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n workInProgress.refCleanup = current.refCleanup;\n return workInProgress;\n}\nfunction resetWorkInProgress(workInProgress, renderLanes) {\n workInProgress.flags &= 65011714;\n var current = workInProgress.alternate;\n null === current\n ? ((workInProgress.childLanes = 0),\n (workInProgress.lanes = renderLanes),\n (workInProgress.child = null),\n (workInProgress.subtreeFlags = 0),\n (workInProgress.memoizedProps = null),\n (workInProgress.memoizedState = null),\n (workInProgress.updateQueue = null),\n (workInProgress.dependencies = null),\n (workInProgress.stateNode = null))\n : ((workInProgress.childLanes = current.childLanes),\n (workInProgress.lanes = current.lanes),\n (workInProgress.child = current.child),\n (workInProgress.subtreeFlags = 0),\n (workInProgress.deletions = null),\n (workInProgress.memoizedProps = current.memoizedProps),\n (workInProgress.memoizedState = current.memoizedState),\n (workInProgress.updateQueue = current.updateQueue),\n (workInProgress.type = current.type),\n (renderLanes = current.dependencies),\n (workInProgress.dependencies =\n null === renderLanes\n ? null\n : {\n lanes: renderLanes.lanes,\n firstContext: renderLanes.firstContext\n }));\n return workInProgress;\n}\nfunction createFiberFromTypeAndProps(\n type,\n key,\n pendingProps,\n owner,\n mode,\n lanes\n) {\n var fiberTag = 0;\n owner = type;\n if (\"function\" === typeof type) shouldConstruct(type) && (fiberTag = 1);\n else if (\"string\" === typeof type)\n fiberTag = isHostHoistableType(\n type,\n pendingProps,\n contextStackCursor.current\n )\n ? 26\n : \"html\" === type || \"head\" === type || \"body\" === type\n ? 27\n : 5;\n else\n a: switch (type) {\n case REACT_ACTIVITY_TYPE:\n return (\n (type = createFiberImplClass(31, pendingProps, key, mode)),\n (type.elementType = REACT_ACTIVITY_TYPE),\n (type.lanes = lanes),\n type\n );\n case REACT_FRAGMENT_TYPE:\n return createFiberFromFragment(pendingProps.children, mode, lanes, key);\n case REACT_STRICT_MODE_TYPE:\n fiberTag = 8;\n mode |= 24;\n break;\n case REACT_PROFILER_TYPE:\n return (\n (type = createFiberImplClass(12, pendingProps, key, mode | 2)),\n (type.elementType = REACT_PROFILER_TYPE),\n (type.lanes = lanes),\n type\n );\n case REACT_SUSPENSE_TYPE:\n return (\n (type = createFiberImplClass(13, pendingProps, key, mode)),\n (type.elementType = REACT_SUSPENSE_TYPE),\n (type.lanes = lanes),\n type\n );\n case REACT_SUSPENSE_LIST_TYPE:\n return (\n (type = createFiberImplClass(19, pendingProps, key, mode)),\n (type.elementType = REACT_SUSPENSE_LIST_TYPE),\n (type.lanes = lanes),\n type\n );\n default:\n if (\"object\" === typeof type && null !== type)\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n fiberTag = 10;\n break a;\n case REACT_CONSUMER_TYPE:\n fiberTag = 9;\n break a;\n case REACT_FORWARD_REF_TYPE:\n fiberTag = 11;\n break a;\n case REACT_MEMO_TYPE:\n fiberTag = 14;\n break a;\n case REACT_LAZY_TYPE:\n fiberTag = 16;\n owner = null;\n break a;\n }\n fiberTag = 29;\n pendingProps = Error(\n formatProdErrorMessage(130, null === type ? \"null\" : typeof type, \"\")\n );\n owner = null;\n }\n key = createFiberImplClass(fiberTag, pendingProps, key, mode);\n key.elementType = type;\n key.type = owner;\n key.lanes = lanes;\n return key;\n}\nfunction createFiberFromFragment(elements, mode, lanes, key) {\n elements = createFiberImplClass(7, elements, key, mode);\n elements.lanes = lanes;\n return elements;\n}\nfunction createFiberFromText(content, mode, lanes) {\n content = createFiberImplClass(6, content, null, mode);\n content.lanes = lanes;\n return content;\n}\nfunction createFiberFromDehydratedFragment(dehydratedNode) {\n var fiber = createFiberImplClass(18, null, null, 0);\n fiber.stateNode = dehydratedNode;\n return fiber;\n}\nfunction createFiberFromPortal(portal, mode, lanes) {\n mode = createFiberImplClass(\n 4,\n null !== portal.children ? portal.children : [],\n portal.key,\n mode\n );\n mode.lanes = lanes;\n mode.stateNode = {\n containerInfo: portal.containerInfo,\n pendingChildren: null,\n implementation: portal.implementation\n };\n return mode;\n}\nvar CapturedStacks = new WeakMap();\nfunction createCapturedValueAtFiber(value, source) {\n if (\"object\" === typeof value && null !== value) {\n var existing = CapturedStacks.get(value);\n if (void 0 !== existing) return existing;\n source = {\n value: value,\n source: source,\n stack: getStackByFiberInDevAndProd(source)\n };\n CapturedStacks.set(value, source);\n return source;\n }\n return {\n value: value,\n source: source,\n stack: getStackByFiberInDevAndProd(source)\n };\n}\nvar forkStack = [],\n forkStackIndex = 0,\n treeForkProvider = null,\n treeForkCount = 0,\n idStack = [],\n idStackIndex = 0,\n treeContextProvider = null,\n treeContextId = 1,\n treeContextOverflow = \"\";\nfunction pushTreeFork(workInProgress, totalChildren) {\n forkStack[forkStackIndex++] = treeForkCount;\n forkStack[forkStackIndex++] = treeForkProvider;\n treeForkProvider = workInProgress;\n treeForkCount = totalChildren;\n}\nfunction pushTreeId(workInProgress, totalChildren, index) {\n idStack[idStackIndex++] = treeContextId;\n idStack[idStackIndex++] = treeContextOverflow;\n idStack[idStackIndex++] = treeContextProvider;\n treeContextProvider = workInProgress;\n var baseIdWithLeadingBit = treeContextId;\n workInProgress = treeContextOverflow;\n var baseLength = 32 - clz32(baseIdWithLeadingBit) - 1;\n baseIdWithLeadingBit &= ~(1 << baseLength);\n index += 1;\n var length = 32 - clz32(totalChildren) + baseLength;\n if (30 < length) {\n var numberOfOverflowBits = baseLength - (baseLength % 5);\n length = (\n baseIdWithLeadingBit &\n ((1 << numberOfOverflowBits) - 1)\n ).toString(32);\n baseIdWithLeadingBit >>= numberOfOverflowBits;\n baseLength -= numberOfOverflowBits;\n treeContextId =\n (1 << (32 - clz32(totalChildren) + baseLength)) |\n (index << baseLength) |\n baseIdWithLeadingBit;\n treeContextOverflow = length + workInProgress;\n } else\n (treeContextId =\n (1 << length) | (index << baseLength) | baseIdWithLeadingBit),\n (treeContextOverflow = workInProgress);\n}\nfunction pushMaterializedTreeId(workInProgress) {\n null !== workInProgress.return &&\n (pushTreeFork(workInProgress, 1), pushTreeId(workInProgress, 1, 0));\n}\nfunction popTreeContext(workInProgress) {\n for (; workInProgress === treeForkProvider; )\n (treeForkProvider = forkStack[--forkStackIndex]),\n (forkStack[forkStackIndex] = null),\n (treeForkCount = forkStack[--forkStackIndex]),\n (forkStack[forkStackIndex] = null);\n for (; workInProgress === treeContextProvider; )\n (treeContextProvider = idStack[--idStackIndex]),\n (idStack[idStackIndex] = null),\n (treeContextOverflow = idStack[--idStackIndex]),\n (idStack[idStackIndex] = null),\n (treeContextId = idStack[--idStackIndex]),\n (idStack[idStackIndex] = null);\n}\nfunction restoreSuspendedTreeContext(workInProgress, suspendedContext) {\n idStack[idStackIndex++] = treeContextId;\n idStack[idStackIndex++] = treeContextOverflow;\n idStack[idStackIndex++] = treeContextProvider;\n treeContextId = suspendedContext.id;\n treeContextOverflow = suspendedContext.overflow;\n treeContextProvider = workInProgress;\n}\nvar hydrationParentFiber = null,\n nextHydratableInstance = null,\n isHydrating = !1,\n hydrationErrors = null,\n rootOrSingletonContext = !1,\n HydrationMismatchException = Error(formatProdErrorMessage(519));\nfunction throwOnHydrationMismatch(fiber) {\n var error = Error(\n formatProdErrorMessage(\n 418,\n 1 < arguments.length && void 0 !== arguments[1] && arguments[1]\n ? \"text\"\n : \"HTML\",\n \"\"\n )\n );\n queueHydrationError(createCapturedValueAtFiber(error, fiber));\n throw HydrationMismatchException;\n}\nfunction prepareToHydrateHostInstance(fiber) {\n var instance = fiber.stateNode,\n type = fiber.type,\n props = fiber.memoizedProps;\n instance[internalInstanceKey] = fiber;\n instance[internalPropsKey] = props;\n switch (type) {\n case \"dialog\":\n listenToNonDelegatedEvent(\"cancel\", instance);\n listenToNonDelegatedEvent(\"close\", instance);\n break;\n case \"iframe\":\n case \"object\":\n case \"embed\":\n listenToNonDelegatedEvent(\"load\", instance);\n break;\n case \"video\":\n case \"audio\":\n for (type = 0; type < mediaEventTypes.length; type++)\n listenToNonDelegatedEvent(mediaEventTypes[type], instance);\n break;\n case \"source\":\n listenToNonDelegatedEvent(\"error\", instance);\n break;\n case \"img\":\n case \"image\":\n case \"link\":\n listenToNonDelegatedEvent(\"error\", instance);\n listenToNonDelegatedEvent(\"load\", instance);\n break;\n case \"details\":\n listenToNonDelegatedEvent(\"toggle\", instance);\n break;\n case \"input\":\n listenToNonDelegatedEvent(\"invalid\", instance);\n initInput(\n instance,\n props.value,\n props.defaultValue,\n props.checked,\n props.defaultChecked,\n props.type,\n props.name,\n !0\n );\n break;\n case \"select\":\n listenToNonDelegatedEvent(\"invalid\", instance);\n break;\n case \"textarea\":\n listenToNonDelegatedEvent(\"invalid\", instance),\n initTextarea(instance, props.value, props.defaultValue, props.children);\n }\n type = props.children;\n (\"string\" !== typeof type &&\n \"number\" !== typeof type &&\n \"bigint\" !== typeof type) ||\n instance.textContent === \"\" + type ||\n !0 === props.suppressHydrationWarning ||\n checkForUnmatchedText(instance.textContent, type)\n ? (null != props.popover &&\n (listenToNonDelegatedEvent(\"beforetoggle\", instance),\n listenToNonDelegatedEvent(\"toggle\", instance)),\n null != props.onScroll && listenToNonDelegatedEvent(\"scroll\", instance),\n null != props.onScrollEnd &&\n listenToNonDelegatedEvent(\"scrollend\", instance),\n null != props.onClick && (instance.onclick = noop$1),\n (instance = !0))\n : (instance = !1);\n instance || throwOnHydrationMismatch(fiber, !0);\n}\nfunction popToNextHostParent(fiber) {\n for (hydrationParentFiber = fiber.return; hydrationParentFiber; )\n switch (hydrationParentFiber.tag) {\n case 5:\n case 31:\n case 13:\n rootOrSingletonContext = !1;\n return;\n case 27:\n case 3:\n rootOrSingletonContext = !0;\n return;\n default:\n hydrationParentFiber = hydrationParentFiber.return;\n }\n}\nfunction popHydrationState(fiber) {\n if (fiber !== hydrationParentFiber) return !1;\n if (!isHydrating) return popToNextHostParent(fiber), (isHydrating = !0), !1;\n var tag = fiber.tag,\n JSCompiler_temp;\n if ((JSCompiler_temp = 3 !== tag && 27 !== tag)) {\n if ((JSCompiler_temp = 5 === tag))\n (JSCompiler_temp = fiber.type),\n (JSCompiler_temp =\n !(\"form\" !== JSCompiler_temp && \"button\" !== JSCompiler_temp) ||\n shouldSetTextContent(fiber.type, fiber.memoizedProps));\n JSCompiler_temp = !JSCompiler_temp;\n }\n JSCompiler_temp && nextHydratableInstance && throwOnHydrationMismatch(fiber);\n popToNextHostParent(fiber);\n if (13 === tag) {\n fiber = fiber.memoizedState;\n fiber = null !== fiber ? fiber.dehydrated : null;\n if (!fiber) throw Error(formatProdErrorMessage(317));\n nextHydratableInstance =\n getNextHydratableInstanceAfterHydrationBoundary(fiber);\n } else if (31 === tag) {\n fiber = fiber.memoizedState;\n fiber = null !== fiber ? fiber.dehydrated : null;\n if (!fiber) throw Error(formatProdErrorMessage(317));\n nextHydratableInstance =\n getNextHydratableInstanceAfterHydrationBoundary(fiber);\n } else\n 27 === tag\n ? ((tag = nextHydratableInstance),\n isSingletonScope(fiber.type)\n ? ((fiber = previousHydratableOnEnteringScopedSingleton),\n (previousHydratableOnEnteringScopedSingleton = null),\n (nextHydratableInstance = fiber))\n : (nextHydratableInstance = tag))\n : (nextHydratableInstance = hydrationParentFiber\n ? getNextHydratable(fiber.stateNode.nextSibling)\n : null);\n return !0;\n}\nfunction resetHydrationState() {\n nextHydratableInstance = hydrationParentFiber = null;\n isHydrating = !1;\n}\nfunction upgradeHydrationErrorsToRecoverable() {\n var queuedErrors = hydrationErrors;\n null !== queuedErrors &&\n (null === workInProgressRootRecoverableErrors\n ? (workInProgressRootRecoverableErrors = queuedErrors)\n : workInProgressRootRecoverableErrors.push.apply(\n workInProgressRootRecoverableErrors,\n queuedErrors\n ),\n (hydrationErrors = null));\n return queuedErrors;\n}\nfunction queueHydrationError(error) {\n null === hydrationErrors\n ? (hydrationErrors = [error])\n : hydrationErrors.push(error);\n}\nvar valueCursor = createCursor(null),\n currentlyRenderingFiber$1 = null,\n lastContextDependency = null;\nfunction pushProvider(providerFiber, context, nextValue) {\n push(valueCursor, context._currentValue);\n context._currentValue = nextValue;\n}\nfunction popProvider(context) {\n context._currentValue = valueCursor.current;\n pop(valueCursor);\n}\nfunction scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) {\n for (; null !== parent; ) {\n var alternate = parent.alternate;\n (parent.childLanes & renderLanes) !== renderLanes\n ? ((parent.childLanes |= renderLanes),\n null !== alternate && (alternate.childLanes |= renderLanes))\n : null !== alternate &&\n (alternate.childLanes & renderLanes) !== renderLanes &&\n (alternate.childLanes |= renderLanes);\n if (parent === propagationRoot) break;\n parent = parent.return;\n }\n}\nfunction propagateContextChanges(\n workInProgress,\n contexts,\n renderLanes,\n forcePropagateEntireTree\n) {\n var fiber = workInProgress.child;\n null !== fiber && (fiber.return = workInProgress);\n for (; null !== fiber; ) {\n var list = fiber.dependencies;\n if (null !== list) {\n var nextFiber = fiber.child;\n list = list.firstContext;\n a: for (; null !== list; ) {\n var dependency = list;\n list = fiber;\n for (var i = 0; i < contexts.length; i++)\n if (dependency.context === contexts[i]) {\n list.lanes |= renderLanes;\n dependency = list.alternate;\n null !== dependency && (dependency.lanes |= renderLanes);\n scheduleContextWorkOnParentPath(\n list.return,\n renderLanes,\n workInProgress\n );\n forcePropagateEntireTree || (nextFiber = null);\n break a;\n }\n list = dependency.next;\n }\n } else if (18 === fiber.tag) {\n nextFiber = fiber.return;\n if (null === nextFiber) throw Error(formatProdErrorMessage(341));\n nextFiber.lanes |= renderLanes;\n list = nextFiber.alternate;\n null !== list && (list.lanes |= renderLanes);\n scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress);\n nextFiber = null;\n } else nextFiber = fiber.child;\n if (null !== nextFiber) nextFiber.return = fiber;\n else\n for (nextFiber = fiber; null !== nextFiber; ) {\n if (nextFiber === workInProgress) {\n nextFiber = null;\n break;\n }\n fiber = nextFiber.sibling;\n if (null !== fiber) {\n fiber.return = nextFiber.return;\n nextFiber = fiber;\n break;\n }\n nextFiber = nextFiber.return;\n }\n fiber = nextFiber;\n }\n}\nfunction propagateParentContextChanges(\n current,\n workInProgress,\n renderLanes,\n forcePropagateEntireTree\n) {\n current = null;\n for (\n var parent = workInProgress, isInsidePropagationBailout = !1;\n null !== parent;\n\n ) {\n if (!isInsidePropagationBailout)\n if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0;\n else if (0 !== (parent.flags & 262144)) break;\n if (10 === parent.tag) {\n var currentParent = parent.alternate;\n if (null === currentParent) throw Error(formatProdErrorMessage(387));\n currentParent = currentParent.memoizedProps;\n if (null !== currentParent) {\n var context = parent.type;\n objectIs(parent.pendingProps.value, currentParent.value) ||\n (null !== current ? current.push(context) : (current = [context]));\n }\n } else if (parent === hostTransitionProviderCursor.current) {\n currentParent = parent.alternate;\n if (null === currentParent) throw Error(formatProdErrorMessage(387));\n currentParent.memoizedState.memoizedState !==\n parent.memoizedState.memoizedState &&\n (null !== current\n ? current.push(HostTransitionContext)\n : (current = [HostTransitionContext]));\n }\n parent = parent.return;\n }\n null !== current &&\n propagateContextChanges(\n workInProgress,\n current,\n renderLanes,\n forcePropagateEntireTree\n );\n workInProgress.flags |= 262144;\n}\nfunction checkIfContextChanged(currentDependencies) {\n for (\n currentDependencies = currentDependencies.firstContext;\n null !== currentDependencies;\n\n ) {\n if (\n !objectIs(\n currentDependencies.context._currentValue,\n currentDependencies.memoizedValue\n )\n )\n return !0;\n currentDependencies = currentDependencies.next;\n }\n return !1;\n}\nfunction prepareToReadContext(workInProgress) {\n currentlyRenderingFiber$1 = workInProgress;\n lastContextDependency = null;\n workInProgress = workInProgress.dependencies;\n null !== workInProgress && (workInProgress.firstContext = null);\n}\nfunction readContext(context) {\n return readContextForConsumer(currentlyRenderingFiber$1, context);\n}\nfunction readContextDuringReconciliation(consumer, context) {\n null === currentlyRenderingFiber$1 && prepareToReadContext(consumer);\n return readContextForConsumer(consumer, context);\n}\nfunction readContextForConsumer(consumer, context) {\n var value = context._currentValue;\n context = { context: context, memoizedValue: value, next: null };\n if (null === lastContextDependency) {\n if (null === consumer) throw Error(formatProdErrorMessage(308));\n lastContextDependency = context;\n consumer.dependencies = { lanes: 0, firstContext: context };\n consumer.flags |= 524288;\n } else lastContextDependency = lastContextDependency.next = context;\n return value;\n}\nvar AbortControllerLocal =\n \"undefined\" !== typeof AbortController\n ? AbortController\n : function () {\n var listeners = [],\n signal = (this.signal = {\n aborted: !1,\n addEventListener: function (type, listener) {\n listeners.push(listener);\n }\n });\n this.abort = function () {\n signal.aborted = !0;\n listeners.forEach(function (listener) {\n return listener();\n });\n };\n },\n scheduleCallback$2 = Scheduler.unstable_scheduleCallback,\n NormalPriority = Scheduler.unstable_NormalPriority,\n CacheContext = {\n $$typeof: REACT_CONTEXT_TYPE,\n Consumer: null,\n Provider: null,\n _currentValue: null,\n _currentValue2: null,\n _threadCount: 0\n };\nfunction createCache() {\n return {\n controller: new AbortControllerLocal(),\n data: new Map(),\n refCount: 0\n };\n}\nfunction releaseCache(cache) {\n cache.refCount--;\n 0 === cache.refCount &&\n scheduleCallback$2(NormalPriority, function () {\n cache.controller.abort();\n });\n}\nvar currentEntangledListeners = null,\n currentEntangledPendingCount = 0,\n currentEntangledLane = 0,\n currentEntangledActionThenable = null;\nfunction entangleAsyncAction(transition, thenable) {\n if (null === currentEntangledListeners) {\n var entangledListeners = (currentEntangledListeners = []);\n currentEntangledPendingCount = 0;\n currentEntangledLane = requestTransitionLane();\n currentEntangledActionThenable = {\n status: \"pending\",\n value: void 0,\n then: function (resolve) {\n entangledListeners.push(resolve);\n }\n };\n }\n currentEntangledPendingCount++;\n thenable.then(pingEngtangledActionScope, pingEngtangledActionScope);\n return thenable;\n}\nfunction pingEngtangledActionScope() {\n if (\n 0 === --currentEntangledPendingCount &&\n null !== currentEntangledListeners\n ) {\n null !== currentEntangledActionThenable &&\n (currentEntangledActionThenable.status = \"fulfilled\");\n var listeners = currentEntangledListeners;\n currentEntangledListeners = null;\n currentEntangledLane = 0;\n currentEntangledActionThenable = null;\n for (var i = 0; i < listeners.length; i++) (0, listeners[i])();\n }\n}\nfunction chainThenableValue(thenable, result) {\n var listeners = [],\n thenableWithOverride = {\n status: \"pending\",\n value: null,\n reason: null,\n then: function (resolve) {\n listeners.push(resolve);\n }\n };\n thenable.then(\n function () {\n thenableWithOverride.status = \"fulfilled\";\n thenableWithOverride.value = result;\n for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result);\n },\n function (error) {\n thenableWithOverride.status = \"rejected\";\n thenableWithOverride.reason = error;\n for (error = 0; error < listeners.length; error++)\n (0, listeners[error])(void 0);\n }\n );\n return thenableWithOverride;\n}\nvar prevOnStartTransitionFinish = ReactSharedInternals.S;\nReactSharedInternals.S = function (transition, returnValue) {\n globalMostRecentTransitionTime = now();\n \"object\" === typeof returnValue &&\n null !== returnValue &&\n \"function\" === typeof returnValue.then &&\n entangleAsyncAction(transition, returnValue);\n null !== prevOnStartTransitionFinish &&\n prevOnStartTransitionFinish(transition, returnValue);\n};\nvar resumedCache = createCursor(null);\nfunction peekCacheFromPool() {\n var cacheResumedFromPreviousRender = resumedCache.current;\n return null !== cacheResumedFromPreviousRender\n ? cacheResumedFromPreviousRender\n : workInProgressRoot.pooledCache;\n}\nfunction pushTransition(offscreenWorkInProgress, prevCachePool) {\n null === prevCachePool\n ? push(resumedCache, resumedCache.current)\n : push(resumedCache, prevCachePool.pool);\n}\nfunction getSuspendedCache() {\n var cacheFromPool = peekCacheFromPool();\n return null === cacheFromPool\n ? null\n : { parent: CacheContext._currentValue, pool: cacheFromPool };\n}\nvar SuspenseException = Error(formatProdErrorMessage(460)),\n SuspenseyCommitException = Error(formatProdErrorMessage(474)),\n SuspenseActionException = Error(formatProdErrorMessage(542)),\n noopSuspenseyCommitThenable = { then: function () {} };\nfunction isThenableResolved(thenable) {\n thenable = thenable.status;\n return \"fulfilled\" === thenable || \"rejected\" === thenable;\n}\nfunction trackUsedThenable(thenableState, thenable, index) {\n index = thenableState[index];\n void 0 === index\n ? thenableState.push(thenable)\n : index !== thenable && (thenable.then(noop$1, noop$1), (thenable = index));\n switch (thenable.status) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw (\n ((thenableState = thenable.reason),\n checkIfUseWrappedInAsyncCatch(thenableState),\n thenableState)\n );\n default:\n if (\"string\" === typeof thenable.status) thenable.then(noop$1, noop$1);\n else {\n thenableState = workInProgressRoot;\n if (null !== thenableState && 100 < thenableState.shellSuspendCounter)\n throw Error(formatProdErrorMessage(482));\n thenableState = thenable;\n thenableState.status = \"pending\";\n thenableState.then(\n function (fulfilledValue) {\n if (\"pending\" === thenable.status) {\n var fulfilledThenable = thenable;\n fulfilledThenable.status = \"fulfilled\";\n fulfilledThenable.value = fulfilledValue;\n }\n },\n function (error) {\n if (\"pending\" === thenable.status) {\n var rejectedThenable = thenable;\n rejectedThenable.status = \"rejected\";\n rejectedThenable.reason = error;\n }\n }\n );\n }\n switch (thenable.status) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw (\n ((thenableState = thenable.reason),\n checkIfUseWrappedInAsyncCatch(thenableState),\n thenableState)\n );\n }\n suspendedThenable = thenable;\n throw SuspenseException;\n }\n}\nfunction resolveLazy(lazyType) {\n try {\n var init = lazyType._init;\n return init(lazyType._payload);\n } catch (x) {\n if (null !== x && \"object\" === typeof x && \"function\" === typeof x.then)\n throw ((suspendedThenable = x), SuspenseException);\n throw x;\n }\n}\nvar suspendedThenable = null;\nfunction getSuspendedThenable() {\n if (null === suspendedThenable) throw Error(formatProdErrorMessage(459));\n var thenable = suspendedThenable;\n suspendedThenable = null;\n return thenable;\n}\nfunction checkIfUseWrappedInAsyncCatch(rejectedReason) {\n if (\n rejectedReason === SuspenseException ||\n rejectedReason === SuspenseActionException\n )\n throw Error(formatProdErrorMessage(483));\n}\nvar thenableState$1 = null,\n thenableIndexCounter$1 = 0;\nfunction unwrapThenable(thenable) {\n var index = thenableIndexCounter$1;\n thenableIndexCounter$1 += 1;\n null === thenableState$1 && (thenableState$1 = []);\n return trackUsedThenable(thenableState$1, thenable, index);\n}\nfunction coerceRef(workInProgress, element) {\n element = element.props.ref;\n workInProgress.ref = void 0 !== element ? element : null;\n}\nfunction throwOnInvalidObjectTypeImpl(returnFiber, newChild) {\n if (newChild.$$typeof === REACT_LEGACY_ELEMENT_TYPE)\n throw Error(formatProdErrorMessage(525));\n returnFiber = Object.prototype.toString.call(newChild);\n throw Error(\n formatProdErrorMessage(\n 31,\n \"[object Object]\" === returnFiber\n ? \"object with keys {\" + Object.keys(newChild).join(\", \") + \"}\"\n : returnFiber\n )\n );\n}\nfunction createChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (shouldTrackSideEffects) {\n var deletions = returnFiber.deletions;\n null === deletions\n ? ((returnFiber.deletions = [childToDelete]), (returnFiber.flags |= 16))\n : deletions.push(childToDelete);\n }\n }\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) return null;\n for (; null !== currentFirstChild; )\n deleteChild(returnFiber, currentFirstChild),\n (currentFirstChild = currentFirstChild.sibling);\n return null;\n }\n function mapRemainingChildren(currentFirstChild) {\n for (var existingChildren = new Map(); null !== currentFirstChild; )\n null !== currentFirstChild.key\n ? existingChildren.set(currentFirstChild.key, currentFirstChild)\n : existingChildren.set(currentFirstChild.index, currentFirstChild),\n (currentFirstChild = currentFirstChild.sibling);\n return existingChildren;\n }\n function useFiber(fiber, pendingProps) {\n fiber = createWorkInProgress(fiber, pendingProps);\n fiber.index = 0;\n fiber.sibling = null;\n return fiber;\n }\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects)\n return (newFiber.flags |= 1048576), lastPlacedIndex;\n newIndex = newFiber.alternate;\n if (null !== newIndex)\n return (\n (newIndex = newIndex.index),\n newIndex < lastPlacedIndex\n ? ((newFiber.flags |= 67108866), lastPlacedIndex)\n : newIndex\n );\n newFiber.flags |= 67108866;\n return lastPlacedIndex;\n }\n function placeSingleChild(newFiber) {\n shouldTrackSideEffects &&\n null === newFiber.alternate &&\n (newFiber.flags |= 67108866);\n return newFiber;\n }\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (null === current || 6 !== current.tag)\n return (\n (current = createFiberFromText(textContent, returnFiber.mode, lanes)),\n (current.return = returnFiber),\n current\n );\n current = useFiber(current, textContent);\n current.return = returnFiber;\n return current;\n }\n function updateElement(returnFiber, current, element, lanes) {\n var elementType = element.type;\n if (elementType === REACT_FRAGMENT_TYPE)\n return updateFragment(\n returnFiber,\n current,\n element.props.children,\n lanes,\n element.key\n );\n if (\n null !== current &&\n (current.elementType === elementType ||\n (\"object\" === typeof elementType &&\n null !== elementType &&\n elementType.$$typeof === REACT_LAZY_TYPE &&\n resolveLazy(elementType) === current.type))\n )\n return (\n (current = useFiber(current, element.props)),\n coerceRef(current, element),\n (current.return = returnFiber),\n current\n );\n current = createFiberFromTypeAndProps(\n element.type,\n element.key,\n element.props,\n null,\n returnFiber.mode,\n lanes\n );\n coerceRef(current, element);\n current.return = returnFiber;\n return current;\n }\n function updatePortal(returnFiber, current, portal, lanes) {\n if (\n null === current ||\n 4 !== current.tag ||\n current.stateNode.containerInfo !== portal.containerInfo ||\n current.stateNode.implementation !== portal.implementation\n )\n return (\n (current = createFiberFromPortal(portal, returnFiber.mode, lanes)),\n (current.return = returnFiber),\n current\n );\n current = useFiber(current, portal.children || []);\n current.return = returnFiber;\n return current;\n }\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (null === current || 7 !== current.tag)\n return (\n (current = createFiberFromFragment(\n fragment,\n returnFiber.mode,\n lanes,\n key\n )),\n (current.return = returnFiber),\n current\n );\n current = useFiber(current, fragment);\n current.return = returnFiber;\n return current;\n }\n function createChild(returnFiber, newChild, lanes) {\n if (\n (\"string\" === typeof newChild && \"\" !== newChild) ||\n \"number\" === typeof newChild ||\n \"bigint\" === typeof newChild\n )\n return (\n (newChild = createFiberFromText(\n \"\" + newChild,\n returnFiber.mode,\n lanes\n )),\n (newChild.return = returnFiber),\n newChild\n );\n if (\"object\" === typeof newChild && null !== newChild) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return (\n (lanes = createFiberFromTypeAndProps(\n newChild.type,\n newChild.key,\n newChild.props,\n null,\n returnFiber.mode,\n lanes\n )),\n coerceRef(lanes, newChild),\n (lanes.return = returnFiber),\n lanes\n );\n case REACT_PORTAL_TYPE:\n return (\n (newChild = createFiberFromPortal(\n newChild,\n returnFiber.mode,\n lanes\n )),\n (newChild.return = returnFiber),\n newChild\n );\n case REACT_LAZY_TYPE:\n return (\n (newChild = resolveLazy(newChild)),\n createChild(returnFiber, newChild, lanes)\n );\n }\n if (isArrayImpl(newChild) || getIteratorFn(newChild))\n return (\n (newChild = createFiberFromFragment(\n newChild,\n returnFiber.mode,\n lanes,\n null\n )),\n (newChild.return = returnFiber),\n newChild\n );\n if (\"function\" === typeof newChild.then)\n return createChild(returnFiber, unwrapThenable(newChild), lanes);\n if (newChild.$$typeof === REACT_CONTEXT_TYPE)\n return createChild(\n returnFiber,\n readContextDuringReconciliation(returnFiber, newChild),\n lanes\n );\n throwOnInvalidObjectTypeImpl(returnFiber, newChild);\n }\n return null;\n }\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n var key = null !== oldFiber ? oldFiber.key : null;\n if (\n (\"string\" === typeof newChild && \"\" !== newChild) ||\n \"number\" === typeof newChild ||\n \"bigint\" === typeof newChild\n )\n return null !== key\n ? null\n : updateTextNode(returnFiber, oldFiber, \"\" + newChild, lanes);\n if (\"object\" === typeof newChild && null !== newChild) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return newChild.key === key\n ? updateElement(returnFiber, oldFiber, newChild, lanes)\n : null;\n case REACT_PORTAL_TYPE:\n return newChild.key === key\n ? updatePortal(returnFiber, oldFiber, newChild, lanes)\n : null;\n case REACT_LAZY_TYPE:\n return (\n (newChild = resolveLazy(newChild)),\n updateSlot(returnFiber, oldFiber, newChild, lanes)\n );\n }\n if (isArrayImpl(newChild) || getIteratorFn(newChild))\n return null !== key\n ? null\n : updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n if (\"function\" === typeof newChild.then)\n return updateSlot(\n returnFiber,\n oldFiber,\n unwrapThenable(newChild),\n lanes\n );\n if (newChild.$$typeof === REACT_CONTEXT_TYPE)\n return updateSlot(\n returnFiber,\n oldFiber,\n readContextDuringReconciliation(returnFiber, newChild),\n lanes\n );\n throwOnInvalidObjectTypeImpl(returnFiber, newChild);\n }\n return null;\n }\n function updateFromMap(\n existingChildren,\n returnFiber,\n newIdx,\n newChild,\n lanes\n ) {\n if (\n (\"string\" === typeof newChild && \"\" !== newChild) ||\n \"number\" === typeof newChild ||\n \"bigint\" === typeof newChild\n )\n return (\n (existingChildren = existingChildren.get(newIdx) || null),\n updateTextNode(returnFiber, existingChildren, \"\" + newChild, lanes)\n );\n if (\"object\" === typeof newChild && null !== newChild) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return (\n (existingChildren =\n existingChildren.get(\n null === newChild.key ? newIdx : newChild.key\n ) || null),\n updateElement(returnFiber, existingChildren, newChild, lanes)\n );\n case REACT_PORTAL_TYPE:\n return (\n (existingChildren =\n existingChildren.get(\n null === newChild.key ? newIdx : newChild.key\n ) || null),\n updatePortal(returnFiber, existingChildren, newChild, lanes)\n );\n case REACT_LAZY_TYPE:\n return (\n (newChild = resolveLazy(newChild)),\n updateFromMap(\n existingChildren,\n returnFiber,\n newIdx,\n newChild,\n lanes\n )\n );\n }\n if (isArrayImpl(newChild) || getIteratorFn(newChild))\n return (\n (existingChildren = existingChildren.get(newIdx) || null),\n updateFragment(returnFiber, existingChildren, newChild, lanes, null)\n );\n if (\"function\" === typeof newChild.then)\n return updateFromMap(\n existingChildren,\n returnFiber,\n newIdx,\n unwrapThenable(newChild),\n lanes\n );\n if (newChild.$$typeof === REACT_CONTEXT_TYPE)\n return updateFromMap(\n existingChildren,\n returnFiber,\n newIdx,\n readContextDuringReconciliation(returnFiber, newChild),\n lanes\n );\n throwOnInvalidObjectTypeImpl(returnFiber, newChild);\n }\n return null;\n }\n function reconcileChildrenArray(\n returnFiber,\n currentFirstChild,\n newChildren,\n lanes\n ) {\n for (\n var resultingFirstChild = null,\n previousNewFiber = null,\n oldFiber = currentFirstChild,\n newIdx = (currentFirstChild = 0),\n nextOldFiber = null;\n null !== oldFiber && newIdx < newChildren.length;\n newIdx++\n ) {\n oldFiber.index > newIdx\n ? ((nextOldFiber = oldFiber), (oldFiber = null))\n : (nextOldFiber = oldFiber.sibling);\n var newFiber = updateSlot(\n returnFiber,\n oldFiber,\n newChildren[newIdx],\n lanes\n );\n if (null === newFiber) {\n null === oldFiber && (oldFiber = nextOldFiber);\n break;\n }\n shouldTrackSideEffects &&\n oldFiber &&\n null === newFiber.alternate &&\n deleteChild(returnFiber, oldFiber);\n currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);\n null === previousNewFiber\n ? (resultingFirstChild = newFiber)\n : (previousNewFiber.sibling = newFiber);\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n if (newIdx === newChildren.length)\n return (\n deleteRemainingChildren(returnFiber, oldFiber),\n isHydrating && pushTreeFork(returnFiber, newIdx),\n resultingFirstChild\n );\n if (null === oldFiber) {\n for (; newIdx < newChildren.length; newIdx++)\n (oldFiber = createChild(returnFiber, newChildren[newIdx], lanes)),\n null !== oldFiber &&\n ((currentFirstChild = placeChild(\n oldFiber,\n currentFirstChild,\n newIdx\n )),\n null === previousNewFiber\n ? (resultingFirstChild = oldFiber)\n : (previousNewFiber.sibling = oldFiber),\n (previousNewFiber = oldFiber));\n isHydrating && pushTreeFork(returnFiber, newIdx);\n return resultingFirstChild;\n }\n for (\n oldFiber = mapRemainingChildren(oldFiber);\n newIdx < newChildren.length;\n newIdx++\n )\n (nextOldFiber = updateFromMap(\n oldFiber,\n returnFiber,\n newIdx,\n newChildren[newIdx],\n lanes\n )),\n null !== nextOldFiber &&\n (shouldTrackSideEffects &&\n null !== nextOldFiber.alternate &&\n oldFiber.delete(\n null === nextOldFiber.key ? newIdx : nextOldFiber.key\n ),\n (currentFirstChild = placeChild(\n nextOldFiber,\n currentFirstChild,\n newIdx\n )),\n null === previousNewFiber\n ? (resultingFirstChild = nextOldFiber)\n : (previousNewFiber.sibling = nextOldFiber),\n (previousNewFiber = nextOldFiber));\n shouldTrackSideEffects &&\n oldFiber.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n isHydrating && pushTreeFork(returnFiber, newIdx);\n return resultingFirstChild;\n }\n function reconcileChildrenIterator(\n returnFiber,\n currentFirstChild,\n newChildren,\n lanes\n ) {\n if (null == newChildren) throw Error(formatProdErrorMessage(151));\n for (\n var resultingFirstChild = null,\n previousNewFiber = null,\n oldFiber = currentFirstChild,\n newIdx = (currentFirstChild = 0),\n nextOldFiber = null,\n step = newChildren.next();\n null !== oldFiber && !step.done;\n newIdx++, step = newChildren.next()\n ) {\n oldFiber.index > newIdx\n ? ((nextOldFiber = oldFiber), (oldFiber = null))\n : (nextOldFiber = oldFiber.sibling);\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n if (null === newFiber) {\n null === oldFiber && (oldFiber = nextOldFiber);\n break;\n }\n shouldTrackSideEffects &&\n oldFiber &&\n null === newFiber.alternate &&\n deleteChild(returnFiber, oldFiber);\n currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);\n null === previousNewFiber\n ? (resultingFirstChild = newFiber)\n : (previousNewFiber.sibling = newFiber);\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n if (step.done)\n return (\n deleteRemainingChildren(returnFiber, oldFiber),\n isHydrating && pushTreeFork(returnFiber, newIdx),\n resultingFirstChild\n );\n if (null === oldFiber) {\n for (; !step.done; newIdx++, step = newChildren.next())\n (step = createChild(returnFiber, step.value, lanes)),\n null !== step &&\n ((currentFirstChild = placeChild(step, currentFirstChild, newIdx)),\n null === previousNewFiber\n ? (resultingFirstChild = step)\n : (previousNewFiber.sibling = step),\n (previousNewFiber = step));\n isHydrating && pushTreeFork(returnFiber, newIdx);\n return resultingFirstChild;\n }\n for (\n oldFiber = mapRemainingChildren(oldFiber);\n !step.done;\n newIdx++, step = newChildren.next()\n )\n (step = updateFromMap(oldFiber, returnFiber, newIdx, step.value, lanes)),\n null !== step &&\n (shouldTrackSideEffects &&\n null !== step.alternate &&\n oldFiber.delete(null === step.key ? newIdx : step.key),\n (currentFirstChild = placeChild(step, currentFirstChild, newIdx)),\n null === previousNewFiber\n ? (resultingFirstChild = step)\n : (previousNewFiber.sibling = step),\n (previousNewFiber = step));\n shouldTrackSideEffects &&\n oldFiber.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n isHydrating && pushTreeFork(returnFiber, newIdx);\n return resultingFirstChild;\n }\n function reconcileChildFibersImpl(\n returnFiber,\n currentFirstChild,\n newChild,\n lanes\n ) {\n \"object\" === typeof newChild &&\n null !== newChild &&\n newChild.type === REACT_FRAGMENT_TYPE &&\n null === newChild.key &&\n (newChild = newChild.props.children);\n if (\"object\" === typeof newChild && null !== newChild) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n a: {\n for (var key = newChild.key; null !== currentFirstChild; ) {\n if (currentFirstChild.key === key) {\n key = newChild.type;\n if (key === REACT_FRAGMENT_TYPE) {\n if (7 === currentFirstChild.tag) {\n deleteRemainingChildren(\n returnFiber,\n currentFirstChild.sibling\n );\n lanes = useFiber(\n currentFirstChild,\n newChild.props.children\n );\n lanes.return = returnFiber;\n returnFiber = lanes;\n break a;\n }\n } else if (\n currentFirstChild.elementType === key ||\n (\"object\" === typeof key &&\n null !== key &&\n key.$$typeof === REACT_LAZY_TYPE &&\n resolveLazy(key) === currentFirstChild.type)\n ) {\n deleteRemainingChildren(\n returnFiber,\n currentFirstChild.sibling\n );\n lanes = useFiber(currentFirstChild, newChild.props);\n coerceRef(lanes, newChild);\n lanes.return = returnFiber;\n returnFiber = lanes;\n break a;\n }\n deleteRemainingChildren(returnFiber, currentFirstChild);\n break;\n } else deleteChild(returnFiber, currentFirstChild);\n currentFirstChild = currentFirstChild.sibling;\n }\n newChild.type === REACT_FRAGMENT_TYPE\n ? ((lanes = createFiberFromFragment(\n newChild.props.children,\n returnFiber.mode,\n lanes,\n newChild.key\n )),\n (lanes.return = returnFiber),\n (returnFiber = lanes))\n : ((lanes = createFiberFromTypeAndProps(\n newChild.type,\n newChild.key,\n newChild.props,\n null,\n returnFiber.mode,\n lanes\n )),\n coerceRef(lanes, newChild),\n (lanes.return = returnFiber),\n (returnFiber = lanes));\n }\n return placeSingleChild(returnFiber);\n case REACT_PORTAL_TYPE:\n a: {\n for (key = newChild.key; null !== currentFirstChild; ) {\n if (currentFirstChild.key === key)\n if (\n 4 === currentFirstChild.tag &&\n currentFirstChild.stateNode.containerInfo ===\n newChild.containerInfo &&\n currentFirstChild.stateNode.implementation ===\n newChild.implementation\n ) {\n deleteRemainingChildren(\n returnFiber,\n currentFirstChild.sibling\n );\n lanes = useFiber(currentFirstChild, newChild.children || []);\n lanes.return = returnFiber;\n returnFiber = lanes;\n break a;\n } else {\n deleteRemainingChildren(returnFiber, currentFirstChild);\n break;\n }\n else deleteChild(returnFiber, currentFirstChild);\n currentFirstChild = currentFirstChild.sibling;\n }\n lanes = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n lanes.return = returnFiber;\n returnFiber = lanes;\n }\n return placeSingleChild(returnFiber);\n case REACT_LAZY_TYPE:\n return (\n (newChild = resolveLazy(newChild)),\n reconcileChildFibersImpl(\n returnFiber,\n currentFirstChild,\n newChild,\n lanes\n )\n );\n }\n if (isArrayImpl(newChild))\n return reconcileChildrenArray(\n returnFiber,\n currentFirstChild,\n newChild,\n lanes\n );\n if (getIteratorFn(newChild)) {\n key = getIteratorFn(newChild);\n if (\"function\" !== typeof key) throw Error(formatProdErrorMessage(150));\n newChild = key.call(newChild);\n return reconcileChildrenIterator(\n returnFiber,\n currentFirstChild,\n newChild,\n lanes\n );\n }\n if (\"function\" === typeof newChild.then)\n return reconcileChildFibersImpl(\n returnFiber,\n currentFirstChild,\n unwrapThenable(newChild),\n lanes\n );\n if (newChild.$$typeof === REACT_CONTEXT_TYPE)\n return reconcileChildFibersImpl(\n returnFiber,\n currentFirstChild,\n readContextDuringReconciliation(returnFiber, newChild),\n lanes\n );\n throwOnInvalidObjectTypeImpl(returnFiber, newChild);\n }\n return (\"string\" === typeof newChild && \"\" !== newChild) ||\n \"number\" === typeof newChild ||\n \"bigint\" === typeof newChild\n ? ((newChild = \"\" + newChild),\n null !== currentFirstChild && 6 === currentFirstChild.tag\n ? (deleteRemainingChildren(returnFiber, currentFirstChild.sibling),\n (lanes = useFiber(currentFirstChild, newChild)),\n (lanes.return = returnFiber),\n (returnFiber = lanes))\n : (deleteRemainingChildren(returnFiber, currentFirstChild),\n (lanes = createFiberFromText(newChild, returnFiber.mode, lanes)),\n (lanes.return = returnFiber),\n (returnFiber = lanes)),\n placeSingleChild(returnFiber))\n : deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n return function (returnFiber, currentFirstChild, newChild, lanes) {\n try {\n thenableIndexCounter$1 = 0;\n var firstChildFiber = reconcileChildFibersImpl(\n returnFiber,\n currentFirstChild,\n newChild,\n lanes\n );\n thenableState$1 = null;\n return firstChildFiber;\n } catch (x) {\n if (x === SuspenseException || x === SuspenseActionException) throw x;\n var fiber = createFiberImplClass(29, x, null, returnFiber.mode);\n fiber.lanes = lanes;\n fiber.return = returnFiber;\n return fiber;\n } finally {\n }\n };\n}\nvar reconcileChildFibers = createChildReconciler(!0),\n mountChildFibers = createChildReconciler(!1),\n hasForceUpdate = !1;\nfunction initializeUpdateQueue(fiber) {\n fiber.updateQueue = {\n baseState: fiber.memoizedState,\n firstBaseUpdate: null,\n lastBaseUpdate: null,\n shared: { pending: null, lanes: 0, hiddenCallbacks: null },\n callbacks: null\n };\n}\nfunction cloneUpdateQueue(current, workInProgress) {\n current = current.updateQueue;\n workInProgress.updateQueue === current &&\n (workInProgress.updateQueue = {\n baseState: current.baseState,\n firstBaseUpdate: current.firstBaseUpdate,\n lastBaseUpdate: current.lastBaseUpdate,\n shared: current.shared,\n callbacks: null\n });\n}\nfunction createUpdate(lane) {\n return { lane: lane, tag: 0, payload: null, callback: null, next: null };\n}\nfunction enqueueUpdate(fiber, update, lane) {\n var updateQueue = fiber.updateQueue;\n if (null === updateQueue) return null;\n updateQueue = updateQueue.shared;\n if (0 !== (executionContext & 2)) {\n var pending = updateQueue.pending;\n null === pending\n ? (update.next = update)\n : ((update.next = pending.next), (pending.next = update));\n updateQueue.pending = update;\n update = getRootForUpdatedFiber(fiber);\n markUpdateLaneFromFiberToRoot(fiber, null, lane);\n return update;\n }\n enqueueUpdate$1(fiber, updateQueue, update, lane);\n return getRootForUpdatedFiber(fiber);\n}\nfunction entangleTransitions(root, fiber, lane) {\n fiber = fiber.updateQueue;\n if (null !== fiber && ((fiber = fiber.shared), 0 !== (lane & 4194048))) {\n var queueLanes = fiber.lanes;\n queueLanes &= root.pendingLanes;\n lane |= queueLanes;\n fiber.lanes = lane;\n markRootEntangled(root, lane);\n }\n}\nfunction enqueueCapturedUpdate(workInProgress, capturedUpdate) {\n var queue = workInProgress.updateQueue,\n current = workInProgress.alternate;\n if (\n null !== current &&\n ((current = current.updateQueue), queue === current)\n ) {\n var newFirst = null,\n newLast = null;\n queue = queue.firstBaseUpdate;\n if (null !== queue) {\n do {\n var clone = {\n lane: queue.lane,\n tag: queue.tag,\n payload: queue.payload,\n callback: null,\n next: null\n };\n null === newLast\n ? (newFirst = newLast = clone)\n : (newLast = newLast.next = clone);\n queue = queue.next;\n } while (null !== queue);\n null === newLast\n ? (newFirst = newLast = capturedUpdate)\n : (newLast = newLast.next = capturedUpdate);\n } else newFirst = newLast = capturedUpdate;\n queue = {\n baseState: current.baseState,\n firstBaseUpdate: newFirst,\n lastBaseUpdate: newLast,\n shared: current.shared,\n callbacks: current.callbacks\n };\n workInProgress.updateQueue = queue;\n return;\n }\n workInProgress = queue.lastBaseUpdate;\n null === workInProgress\n ? (queue.firstBaseUpdate = capturedUpdate)\n : (workInProgress.next = capturedUpdate);\n queue.lastBaseUpdate = capturedUpdate;\n}\nvar didReadFromEntangledAsyncAction = !1;\nfunction suspendIfUpdateReadFromEntangledAsyncAction() {\n if (didReadFromEntangledAsyncAction) {\n var entangledActionThenable = currentEntangledActionThenable;\n if (null !== entangledActionThenable) throw entangledActionThenable;\n }\n}\nfunction processUpdateQueue(\n workInProgress$jscomp$0,\n props,\n instance$jscomp$0,\n renderLanes\n) {\n didReadFromEntangledAsyncAction = !1;\n var queue = workInProgress$jscomp$0.updateQueue;\n hasForceUpdate = !1;\n var firstBaseUpdate = queue.firstBaseUpdate,\n lastBaseUpdate = queue.lastBaseUpdate,\n pendingQueue = queue.shared.pending;\n if (null !== pendingQueue) {\n queue.shared.pending = null;\n var lastPendingUpdate = pendingQueue,\n firstPendingUpdate = lastPendingUpdate.next;\n lastPendingUpdate.next = null;\n null === lastBaseUpdate\n ? (firstBaseUpdate = firstPendingUpdate)\n : (lastBaseUpdate.next = firstPendingUpdate);\n lastBaseUpdate = lastPendingUpdate;\n var current = workInProgress$jscomp$0.alternate;\n null !== current &&\n ((current = current.updateQueue),\n (pendingQueue = current.lastBaseUpdate),\n pendingQueue !== lastBaseUpdate &&\n (null === pendingQueue\n ? (current.firstBaseUpdate = firstPendingUpdate)\n : (pendingQueue.next = firstPendingUpdate),\n (current.lastBaseUpdate = lastPendingUpdate)));\n }\n if (null !== firstBaseUpdate) {\n var newState = queue.baseState;\n lastBaseUpdate = 0;\n current = firstPendingUpdate = lastPendingUpdate = null;\n pendingQueue = firstBaseUpdate;\n do {\n var updateLane = pendingQueue.lane & -536870913,\n isHiddenUpdate = updateLane !== pendingQueue.lane;\n if (\n isHiddenUpdate\n ? (workInProgressRootRenderLanes & updateLane) === updateLane\n : (renderLanes & updateLane) === updateLane\n ) {\n 0 !== updateLane &&\n updateLane === currentEntangledLane &&\n (didReadFromEntangledAsyncAction = !0);\n null !== current &&\n (current = current.next =\n {\n lane: 0,\n tag: pendingQueue.tag,\n payload: pendingQueue.payload,\n callback: null,\n next: null\n });\n a: {\n var workInProgress = workInProgress$jscomp$0,\n update = pendingQueue;\n updateLane = props;\n var instance = instance$jscomp$0;\n switch (update.tag) {\n case 1:\n workInProgress = update.payload;\n if (\"function\" === typeof workInProgress) {\n newState = workInProgress.call(instance, newState, updateLane);\n break a;\n }\n newState = workInProgress;\n break a;\n case 3:\n workInProgress.flags = (workInProgress.flags & -65537) | 128;\n case 0:\n workInProgress = update.payload;\n updateLane =\n \"function\" === typeof workInProgress\n ? workInProgress.call(instance, newState, updateLane)\n : workInProgress;\n if (null === updateLane || void 0 === updateLane) break a;\n newState = assign({}, newState, updateLane);\n break a;\n case 2:\n hasForceUpdate = !0;\n }\n }\n updateLane = pendingQueue.callback;\n null !== updateLane &&\n ((workInProgress$jscomp$0.flags |= 64),\n isHiddenUpdate && (workInProgress$jscomp$0.flags |= 8192),\n (isHiddenUpdate = queue.callbacks),\n null === isHiddenUpdate\n ? (queue.callbacks = [updateLane])\n : isHiddenUpdate.push(updateLane));\n } else\n (isHiddenUpdate = {\n lane: updateLane,\n tag: pendingQueue.tag,\n payload: pendingQueue.payload,\n callback: pendingQueue.callback,\n next: null\n }),\n null === current\n ? ((firstPendingUpdate = current = isHiddenUpdate),\n (lastPendingUpdate = newState))\n : (current = current.next = isHiddenUpdate),\n (lastBaseUpdate |= updateLane);\n pendingQueue = pendingQueue.next;\n if (null === pendingQueue)\n if (((pendingQueue = queue.shared.pending), null === pendingQueue))\n break;\n else\n (isHiddenUpdate = pendingQueue),\n (pendingQueue = isHiddenUpdate.next),\n (isHiddenUpdate.next = null),\n (queue.lastBaseUpdate = isHiddenUpdate),\n (queue.shared.pending = null);\n } while (1);\n null === current && (lastPendingUpdate = newState);\n queue.baseState = lastPendingUpdate;\n queue.firstBaseUpdate = firstPendingUpdate;\n queue.lastBaseUpdate = current;\n null === firstBaseUpdate && (queue.shared.lanes = 0);\n workInProgressRootSkippedLanes |= lastBaseUpdate;\n workInProgress$jscomp$0.lanes = lastBaseUpdate;\n workInProgress$jscomp$0.memoizedState = newState;\n }\n}\nfunction callCallback(callback, context) {\n if (\"function\" !== typeof callback)\n throw Error(formatProdErrorMessage(191, callback));\n callback.call(context);\n}\nfunction commitCallbacks(updateQueue, context) {\n var callbacks = updateQueue.callbacks;\n if (null !== callbacks)\n for (\n updateQueue.callbacks = null, updateQueue = 0;\n updateQueue < callbacks.length;\n updateQueue++\n )\n callCallback(callbacks[updateQueue], context);\n}\nvar currentTreeHiddenStackCursor = createCursor(null),\n prevEntangledRenderLanesCursor = createCursor(0);\nfunction pushHiddenContext(fiber, context) {\n fiber = entangledRenderLanes;\n push(prevEntangledRenderLanesCursor, fiber);\n push(currentTreeHiddenStackCursor, context);\n entangledRenderLanes = fiber | context.baseLanes;\n}\nfunction reuseHiddenContextOnStack() {\n push(prevEntangledRenderLanesCursor, entangledRenderLanes);\n push(currentTreeHiddenStackCursor, currentTreeHiddenStackCursor.current);\n}\nfunction popHiddenContext() {\n entangledRenderLanes = prevEntangledRenderLanesCursor.current;\n pop(currentTreeHiddenStackCursor);\n pop(prevEntangledRenderLanesCursor);\n}\nvar suspenseHandlerStackCursor = createCursor(null),\n shellBoundary = null;\nfunction pushPrimaryTreeSuspenseHandler(handler) {\n var current = handler.alternate;\n push(suspenseStackCursor, suspenseStackCursor.current & 1);\n push(suspenseHandlerStackCursor, handler);\n null === shellBoundary &&\n (null === current || null !== currentTreeHiddenStackCursor.current\n ? (shellBoundary = handler)\n : null !== current.memoizedState && (shellBoundary = handler));\n}\nfunction pushDehydratedActivitySuspenseHandler(fiber) {\n push(suspenseStackCursor, suspenseStackCursor.current);\n push(suspenseHandlerStackCursor, fiber);\n null === shellBoundary && (shellBoundary = fiber);\n}\nfunction pushOffscreenSuspenseHandler(fiber) {\n 22 === fiber.tag\n ? (push(suspenseStackCursor, suspenseStackCursor.current),\n push(suspenseHandlerStackCursor, fiber),\n null === shellBoundary && (shellBoundary = fiber))\n : reuseSuspenseHandlerOnStack(fiber);\n}\nfunction reuseSuspenseHandlerOnStack() {\n push(suspenseStackCursor, suspenseStackCursor.current);\n push(suspenseHandlerStackCursor, suspenseHandlerStackCursor.current);\n}\nfunction popSuspenseHandler(fiber) {\n pop(suspenseHandlerStackCursor);\n shellBoundary === fiber && (shellBoundary = null);\n pop(suspenseStackCursor);\n}\nvar suspenseStackCursor = createCursor(0);\nfunction findFirstSuspended(row) {\n for (var node = row; null !== node; ) {\n if (13 === node.tag) {\n var state = node.memoizedState;\n if (\n null !== state &&\n ((state = state.dehydrated),\n null === state ||\n isSuspenseInstancePending(state) ||\n isSuspenseInstanceFallback(state))\n )\n return node;\n } else if (\n 19 === node.tag &&\n (\"forwards\" === node.memoizedProps.revealOrder ||\n \"backwards\" === node.memoizedProps.revealOrder ||\n \"unstable_legacy-backwards\" === node.memoizedProps.revealOrder ||\n \"together\" === node.memoizedProps.revealOrder)\n ) {\n if (0 !== (node.flags & 128)) return node;\n } else if (null !== node.child) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n if (node === row) break;\n for (; null === node.sibling; ) {\n if (null === node.return || node.return === row) return null;\n node = node.return;\n }\n node.sibling.return = node.return;\n node = node.sibling;\n }\n return null;\n}\nvar renderLanes = 0,\n currentlyRenderingFiber = null,\n currentHook = null,\n workInProgressHook = null,\n didScheduleRenderPhaseUpdate = !1,\n didScheduleRenderPhaseUpdateDuringThisPass = !1,\n shouldDoubleInvokeUserFnsInHooksDEV = !1,\n localIdCounter = 0,\n thenableIndexCounter = 0,\n thenableState = null,\n globalClientIdCounter = 0;\nfunction throwInvalidHookError() {\n throw Error(formatProdErrorMessage(321));\n}\nfunction areHookInputsEqual(nextDeps, prevDeps) {\n if (null === prevDeps) return !1;\n for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++)\n if (!objectIs(nextDeps[i], prevDeps[i])) return !1;\n return !0;\n}\nfunction renderWithHooks(\n current,\n workInProgress,\n Component,\n props,\n secondArg,\n nextRenderLanes\n) {\n renderLanes = nextRenderLanes;\n currentlyRenderingFiber = workInProgress;\n workInProgress.memoizedState = null;\n workInProgress.updateQueue = null;\n workInProgress.lanes = 0;\n ReactSharedInternals.H =\n null === current || null === current.memoizedState\n ? HooksDispatcherOnMount\n : HooksDispatcherOnUpdate;\n shouldDoubleInvokeUserFnsInHooksDEV = !1;\n nextRenderLanes = Component(props, secondArg);\n shouldDoubleInvokeUserFnsInHooksDEV = !1;\n didScheduleRenderPhaseUpdateDuringThisPass &&\n (nextRenderLanes = renderWithHooksAgain(\n workInProgress,\n Component,\n props,\n secondArg\n ));\n finishRenderingHooks(current);\n return nextRenderLanes;\n}\nfunction finishRenderingHooks(current) {\n ReactSharedInternals.H = ContextOnlyDispatcher;\n var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next;\n renderLanes = 0;\n workInProgressHook = currentHook = currentlyRenderingFiber = null;\n didScheduleRenderPhaseUpdate = !1;\n thenableIndexCounter = 0;\n thenableState = null;\n if (didRenderTooFewHooks) throw Error(formatProdErrorMessage(300));\n null === current ||\n didReceiveUpdate ||\n ((current = current.dependencies),\n null !== current &&\n checkIfContextChanged(current) &&\n (didReceiveUpdate = !0));\n}\nfunction renderWithHooksAgain(workInProgress, Component, props, secondArg) {\n currentlyRenderingFiber = workInProgress;\n var numberOfReRenders = 0;\n do {\n didScheduleRenderPhaseUpdateDuringThisPass && (thenableState = null);\n thenableIndexCounter = 0;\n didScheduleRenderPhaseUpdateDuringThisPass = !1;\n if (25 <= numberOfReRenders) throw Error(formatProdErrorMessage(301));\n numberOfReRenders += 1;\n workInProgressHook = currentHook = null;\n if (null != workInProgress.updateQueue) {\n var children = workInProgress.updateQueue;\n children.lastEffect = null;\n children.events = null;\n children.stores = null;\n null != children.memoCache && (children.memoCache.index = 0);\n }\n ReactSharedInternals.H = HooksDispatcherOnRerender;\n children = Component(props, secondArg);\n } while (didScheduleRenderPhaseUpdateDuringThisPass);\n return children;\n}\nfunction TransitionAwareHostComponent() {\n var dispatcher = ReactSharedInternals.H,\n maybeThenable = dispatcher.useState()[0];\n maybeThenable =\n \"function\" === typeof maybeThenable.then\n ? useThenable(maybeThenable)\n : maybeThenable;\n dispatcher = dispatcher.useState()[0];\n (null !== currentHook ? currentHook.memoizedState : null) !== dispatcher &&\n (currentlyRenderingFiber.flags |= 1024);\n return maybeThenable;\n}\nfunction checkDidRenderIdHook() {\n var didRenderIdHook = 0 !== localIdCounter;\n localIdCounter = 0;\n return didRenderIdHook;\n}\nfunction bailoutHooks(current, workInProgress, lanes) {\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.flags &= -2053;\n current.lanes &= ~lanes;\n}\nfunction resetHooksOnUnwind(workInProgress) {\n if (didScheduleRenderPhaseUpdate) {\n for (\n workInProgress = workInProgress.memoizedState;\n null !== workInProgress;\n\n ) {\n var queue = workInProgress.queue;\n null !== queue && (queue.pending = null);\n workInProgress = workInProgress.next;\n }\n didScheduleRenderPhaseUpdate = !1;\n }\n renderLanes = 0;\n workInProgressHook = currentHook = currentlyRenderingFiber = null;\n didScheduleRenderPhaseUpdateDuringThisPass = !1;\n thenableIndexCounter = localIdCounter = 0;\n thenableState = null;\n}\nfunction mountWorkInProgressHook() {\n var hook = {\n memoizedState: null,\n baseState: null,\n baseQueue: null,\n queue: null,\n next: null\n };\n null === workInProgressHook\n ? (currentlyRenderingFiber.memoizedState = workInProgressHook = hook)\n : (workInProgressHook = workInProgressHook.next = hook);\n return workInProgressHook;\n}\nfunction updateWorkInProgressHook() {\n if (null === currentHook) {\n var nextCurrentHook = currentlyRenderingFiber.alternate;\n nextCurrentHook =\n null !== nextCurrentHook ? nextCurrentHook.memoizedState : null;\n } else nextCurrentHook = currentHook.next;\n var nextWorkInProgressHook =\n null === workInProgressHook\n ? currentlyRenderingFiber.memoizedState\n : workInProgressHook.next;\n if (null !== nextWorkInProgressHook)\n (workInProgressHook = nextWorkInProgressHook),\n (currentHook = nextCurrentHook);\n else {\n if (null === nextCurrentHook) {\n if (null === currentlyRenderingFiber.alternate)\n throw Error(formatProdErrorMessage(467));\n throw Error(formatProdErrorMessage(310));\n }\n currentHook = nextCurrentHook;\n nextCurrentHook = {\n memoizedState: currentHook.memoizedState,\n baseState: currentHook.baseState,\n baseQueue: currentHook.baseQueue,\n queue: currentHook.queue,\n next: null\n };\n null === workInProgressHook\n ? (currentlyRenderingFiber.memoizedState = workInProgressHook =\n nextCurrentHook)\n : (workInProgressHook = workInProgressHook.next = nextCurrentHook);\n }\n return workInProgressHook;\n}\nfunction createFunctionComponentUpdateQueue() {\n return { lastEffect: null, events: null, stores: null, memoCache: null };\n}\nfunction useThenable(thenable) {\n var index = thenableIndexCounter;\n thenableIndexCounter += 1;\n null === thenableState && (thenableState = []);\n thenable = trackUsedThenable(thenableState, thenable, index);\n index = currentlyRenderingFiber;\n null ===\n (null === workInProgressHook\n ? index.memoizedState\n : workInProgressHook.next) &&\n ((index = index.alternate),\n (ReactSharedInternals.H =\n null === index || null === index.memoizedState\n ? HooksDispatcherOnMount\n : HooksDispatcherOnUpdate));\n return thenable;\n}\nfunction use(usable) {\n if (null !== usable && \"object\" === typeof usable) {\n if (\"function\" === typeof usable.then) return useThenable(usable);\n if (usable.$$typeof === REACT_CONTEXT_TYPE) return readContext(usable);\n }\n throw Error(formatProdErrorMessage(438, String(usable)));\n}\nfunction useMemoCache(size) {\n var memoCache = null,\n updateQueue = currentlyRenderingFiber.updateQueue;\n null !== updateQueue && (memoCache = updateQueue.memoCache);\n if (null == memoCache) {\n var current = currentlyRenderingFiber.alternate;\n null !== current &&\n ((current = current.updateQueue),\n null !== current &&\n ((current = current.memoCache),\n null != current &&\n (memoCache = {\n data: current.data.map(function (array) {\n return array.slice();\n }),\n index: 0\n })));\n }\n null == memoCache && (memoCache = { data: [], index: 0 });\n null === updateQueue &&\n ((updateQueue = createFunctionComponentUpdateQueue()),\n (currentlyRenderingFiber.updateQueue = updateQueue));\n updateQueue.memoCache = memoCache;\n updateQueue = memoCache.data[memoCache.index];\n if (void 0 === updateQueue)\n for (\n updateQueue = memoCache.data[memoCache.index] = Array(size), current = 0;\n current < size;\n current++\n )\n updateQueue[current] = REACT_MEMO_CACHE_SENTINEL;\n memoCache.index++;\n return updateQueue;\n}\nfunction basicStateReducer(state, action) {\n return \"function\" === typeof action ? action(state) : action;\n}\nfunction updateReducer(reducer) {\n var hook = updateWorkInProgressHook();\n return updateReducerImpl(hook, currentHook, reducer);\n}\nfunction updateReducerImpl(hook, current, reducer) {\n var queue = hook.queue;\n if (null === queue) throw Error(formatProdErrorMessage(311));\n queue.lastRenderedReducer = reducer;\n var baseQueue = hook.baseQueue,\n pendingQueue = queue.pending;\n if (null !== pendingQueue) {\n if (null !== baseQueue) {\n var baseFirst = baseQueue.next;\n baseQueue.next = pendingQueue.next;\n pendingQueue.next = baseFirst;\n }\n current.baseQueue = baseQueue = pendingQueue;\n queue.pending = null;\n }\n pendingQueue = hook.baseState;\n if (null === baseQueue) hook.memoizedState = pendingQueue;\n else {\n current = baseQueue.next;\n var newBaseQueueFirst = (baseFirst = null),\n newBaseQueueLast = null,\n update = current,\n didReadFromEntangledAsyncAction$60 = !1;\n do {\n var updateLane = update.lane & -536870913;\n if (\n updateLane !== update.lane\n ? (workInProgressRootRenderLanes & updateLane) === updateLane\n : (renderLanes & updateLane) === updateLane\n ) {\n var revertLane = update.revertLane;\n if (0 === revertLane)\n null !== newBaseQueueLast &&\n (newBaseQueueLast = newBaseQueueLast.next =\n {\n lane: 0,\n revertLane: 0,\n gesture: null,\n action: update.action,\n hasEagerState: update.hasEagerState,\n eagerState: update.eagerState,\n next: null\n }),\n updateLane === currentEntangledLane &&\n (didReadFromEntangledAsyncAction$60 = !0);\n else if ((renderLanes & revertLane) === revertLane) {\n update = update.next;\n revertLane === currentEntangledLane &&\n (didReadFromEntangledAsyncAction$60 = !0);\n continue;\n } else\n (updateLane = {\n lane: 0,\n revertLane: update.revertLane,\n gesture: null,\n action: update.action,\n hasEagerState: update.hasEagerState,\n eagerState: update.eagerState,\n next: null\n }),\n null === newBaseQueueLast\n ? ((newBaseQueueFirst = newBaseQueueLast = updateLane),\n (baseFirst = pendingQueue))\n : (newBaseQueueLast = newBaseQueueLast.next = updateLane),\n (currentlyRenderingFiber.lanes |= revertLane),\n (workInProgressRootSkippedLanes |= revertLane);\n updateLane = update.action;\n shouldDoubleInvokeUserFnsInHooksDEV &&\n reducer(pendingQueue, updateLane);\n pendingQueue = update.hasEagerState\n ? update.eagerState\n : reducer(pendingQueue, updateLane);\n } else\n (revertLane = {\n lane: updateLane,\n revertLane: update.revertLane,\n gesture: update.gesture,\n action: update.action,\n hasEagerState: update.hasEagerState,\n eagerState: update.eagerState,\n next: null\n }),\n null === newBaseQueueLast\n ? ((newBaseQueueFirst = newBaseQueueLast = revertLane),\n (baseFirst = pendingQueue))\n : (newBaseQueueLast = newBaseQueueLast.next = revertLane),\n (currentlyRenderingFiber.lanes |= updateLane),\n (workInProgressRootSkippedLanes |= updateLane);\n update = update.next;\n } while (null !== update && update !== current);\n null === newBaseQueueLast\n ? (baseFirst = pendingQueue)\n : (newBaseQueueLast.next = newBaseQueueFirst);\n if (\n !objectIs(pendingQueue, hook.memoizedState) &&\n ((didReceiveUpdate = !0),\n didReadFromEntangledAsyncAction$60 &&\n ((reducer = currentEntangledActionThenable), null !== reducer))\n )\n throw reducer;\n hook.memoizedState = pendingQueue;\n hook.baseState = baseFirst;\n hook.baseQueue = newBaseQueueLast;\n queue.lastRenderedState = pendingQueue;\n }\n null === baseQueue && (queue.lanes = 0);\n return [hook.memoizedState, queue.dispatch];\n}\nfunction rerenderReducer(reducer) {\n var hook = updateWorkInProgressHook(),\n queue = hook.queue;\n if (null === queue) throw Error(formatProdErrorMessage(311));\n queue.lastRenderedReducer = reducer;\n var dispatch = queue.dispatch,\n lastRenderPhaseUpdate = queue.pending,\n newState = hook.memoizedState;\n if (null !== lastRenderPhaseUpdate) {\n queue.pending = null;\n var update = (lastRenderPhaseUpdate = lastRenderPhaseUpdate.next);\n do (newState = reducer(newState, update.action)), (update = update.next);\n while (update !== lastRenderPhaseUpdate);\n objectIs(newState, hook.memoizedState) || (didReceiveUpdate = !0);\n hook.memoizedState = newState;\n null === hook.baseQueue && (hook.baseState = newState);\n queue.lastRenderedState = newState;\n }\n return [newState, dispatch];\n}\nfunction updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n var fiber = currentlyRenderingFiber,\n hook = updateWorkInProgressHook(),\n isHydrating$jscomp$0 = isHydrating;\n if (isHydrating$jscomp$0) {\n if (void 0 === getServerSnapshot) throw Error(formatProdErrorMessage(407));\n getServerSnapshot = getServerSnapshot();\n } else getServerSnapshot = getSnapshot();\n var snapshotChanged = !objectIs(\n (currentHook || hook).memoizedState,\n getServerSnapshot\n );\n snapshotChanged &&\n ((hook.memoizedState = getServerSnapshot), (didReceiveUpdate = !0));\n hook = hook.queue;\n updateEffect(subscribeToStore.bind(null, fiber, hook, subscribe), [\n subscribe\n ]);\n if (\n hook.getSnapshot !== getSnapshot ||\n snapshotChanged ||\n (null !== workInProgressHook && workInProgressHook.memoizedState.tag & 1)\n ) {\n fiber.flags |= 2048;\n pushSimpleEffect(\n 9,\n { destroy: void 0 },\n updateStoreInstance.bind(\n null,\n fiber,\n hook,\n getServerSnapshot,\n getSnapshot\n ),\n null\n );\n if (null === workInProgressRoot) throw Error(formatProdErrorMessage(349));\n isHydrating$jscomp$0 ||\n 0 !== (renderLanes & 127) ||\n pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);\n }\n return getServerSnapshot;\n}\nfunction pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) {\n fiber.flags |= 16384;\n fiber = { getSnapshot: getSnapshot, value: renderedSnapshot };\n getSnapshot = currentlyRenderingFiber.updateQueue;\n null === getSnapshot\n ? ((getSnapshot = createFunctionComponentUpdateQueue()),\n (currentlyRenderingFiber.updateQueue = getSnapshot),\n (getSnapshot.stores = [fiber]))\n : ((renderedSnapshot = getSnapshot.stores),\n null === renderedSnapshot\n ? (getSnapshot.stores = [fiber])\n : renderedSnapshot.push(fiber));\n}\nfunction updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) {\n inst.value = nextSnapshot;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceStoreRerender(fiber);\n}\nfunction subscribeToStore(fiber, inst, subscribe) {\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceStoreRerender(fiber);\n });\n}\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n}\nfunction forceStoreRerender(fiber) {\n var root = enqueueConcurrentRenderForLane(fiber, 2);\n null !== root && scheduleUpdateOnFiber(root, fiber, 2);\n}\nfunction mountStateImpl(initialState) {\n var hook = mountWorkInProgressHook();\n if (\"function\" === typeof initialState) {\n var initialStateInitializer = initialState;\n initialState = initialStateInitializer();\n if (shouldDoubleInvokeUserFnsInHooksDEV) {\n setIsStrictModeForDevtools(!0);\n try {\n initialStateInitializer();\n } finally {\n setIsStrictModeForDevtools(!1);\n }\n }\n }\n hook.memoizedState = hook.baseState = initialState;\n hook.queue = {\n pending: null,\n lanes: 0,\n dispatch: null,\n lastRenderedReducer: basicStateReducer,\n lastRenderedState: initialState\n };\n return hook;\n}\nfunction updateOptimisticImpl(hook, current, passthrough, reducer) {\n hook.baseState = passthrough;\n return updateReducerImpl(\n hook,\n currentHook,\n \"function\" === typeof reducer ? reducer : basicStateReducer\n );\n}\nfunction dispatchActionState(\n fiber,\n actionQueue,\n setPendingState,\n setState,\n payload\n) {\n if (isRenderPhaseUpdate(fiber)) throw Error(formatProdErrorMessage(485));\n fiber = actionQueue.action;\n if (null !== fiber) {\n var actionNode = {\n payload: payload,\n action: fiber,\n next: null,\n isTransition: !0,\n status: \"pending\",\n value: null,\n reason: null,\n listeners: [],\n then: function (listener) {\n actionNode.listeners.push(listener);\n }\n };\n null !== ReactSharedInternals.T\n ? setPendingState(!0)\n : (actionNode.isTransition = !1);\n setState(actionNode);\n setPendingState = actionQueue.pending;\n null === setPendingState\n ? ((actionNode.next = actionQueue.pending = actionNode),\n runActionStateAction(actionQueue, actionNode))\n : ((actionNode.next = setPendingState.next),\n (actionQueue.pending = setPendingState.next = actionNode));\n }\n}\nfunction runActionStateAction(actionQueue, node) {\n var action = node.action,\n payload = node.payload,\n prevState = actionQueue.state;\n if (node.isTransition) {\n var prevTransition = ReactSharedInternals.T,\n currentTransition = {};\n ReactSharedInternals.T = currentTransition;\n try {\n var returnValue = action(prevState, payload),\n onStartTransitionFinish = ReactSharedInternals.S;\n null !== onStartTransitionFinish &&\n onStartTransitionFinish(currentTransition, returnValue);\n handleActionReturnValue(actionQueue, node, returnValue);\n } catch (error) {\n onActionError(actionQueue, node, error);\n } finally {\n null !== prevTransition &&\n null !== currentTransition.types &&\n (prevTransition.types = currentTransition.types),\n (ReactSharedInternals.T = prevTransition);\n }\n } else\n try {\n (prevTransition = action(prevState, payload)),\n handleActionReturnValue(actionQueue, node, prevTransition);\n } catch (error$66) {\n onActionError(actionQueue, node, error$66);\n }\n}\nfunction handleActionReturnValue(actionQueue, node, returnValue) {\n null !== returnValue &&\n \"object\" === typeof returnValue &&\n \"function\" === typeof returnValue.then\n ? returnValue.then(\n function (nextState) {\n onActionSuccess(actionQueue, node, nextState);\n },\n function (error) {\n return onActionError(actionQueue, node, error);\n }\n )\n : onActionSuccess(actionQueue, node, returnValue);\n}\nfunction onActionSuccess(actionQueue, actionNode, nextState) {\n actionNode.status = \"fulfilled\";\n actionNode.value = nextState;\n notifyActionListeners(actionNode);\n actionQueue.state = nextState;\n actionNode = actionQueue.pending;\n null !== actionNode &&\n ((nextState = actionNode.next),\n nextState === actionNode\n ? (actionQueue.pending = null)\n : ((nextState = nextState.next),\n (actionNode.next = nextState),\n runActionStateAction(actionQueue, nextState)));\n}\nfunction onActionError(actionQueue, actionNode, error) {\n var last = actionQueue.pending;\n actionQueue.pending = null;\n if (null !== last) {\n last = last.next;\n do\n (actionNode.status = \"rejected\"),\n (actionNode.reason = error),\n notifyActionListeners(actionNode),\n (actionNode = actionNode.next);\n while (actionNode !== last);\n }\n actionQueue.action = null;\n}\nfunction notifyActionListeners(actionNode) {\n actionNode = actionNode.listeners;\n for (var i = 0; i < actionNode.length; i++) (0, actionNode[i])();\n}\nfunction actionStateReducer(oldState, newState) {\n return newState;\n}\nfunction mountActionState(action, initialStateProp) {\n if (isHydrating) {\n var ssrFormState = workInProgressRoot.formState;\n if (null !== ssrFormState) {\n a: {\n var JSCompiler_inline_result = currentlyRenderingFiber;\n if (isHydrating) {\n if (nextHydratableInstance) {\n b: {\n var JSCompiler_inline_result$jscomp$0 = nextHydratableInstance;\n for (\n var inRootOrSingleton = rootOrSingletonContext;\n 8 !== JSCompiler_inline_result$jscomp$0.nodeType;\n\n ) {\n if (!inRootOrSingleton) {\n JSCompiler_inline_result$jscomp$0 = null;\n break b;\n }\n JSCompiler_inline_result$jscomp$0 = getNextHydratable(\n JSCompiler_inline_result$jscomp$0.nextSibling\n );\n if (null === JSCompiler_inline_result$jscomp$0) {\n JSCompiler_inline_result$jscomp$0 = null;\n break b;\n }\n }\n inRootOrSingleton = JSCompiler_inline_result$jscomp$0.data;\n JSCompiler_inline_result$jscomp$0 =\n \"F!\" === inRootOrSingleton || \"F\" === inRootOrSingleton\n ? JSCompiler_inline_result$jscomp$0\n : null;\n }\n if (JSCompiler_inline_result$jscomp$0) {\n nextHydratableInstance = getNextHydratable(\n JSCompiler_inline_result$jscomp$0.nextSibling\n );\n JSCompiler_inline_result =\n \"F!\" === JSCompiler_inline_result$jscomp$0.data;\n break a;\n }\n }\n throwOnHydrationMismatch(JSCompiler_inline_result);\n }\n JSCompiler_inline_result = !1;\n }\n JSCompiler_inline_result && (initialStateProp = ssrFormState[0]);\n }\n }\n ssrFormState = mountWorkInProgressHook();\n ssrFormState.memoizedState = ssrFormState.baseState = initialStateProp;\n JSCompiler_inline_result = {\n pending: null,\n lanes: 0,\n dispatch: null,\n lastRenderedReducer: actionStateReducer,\n lastRenderedState: initialStateProp\n };\n ssrFormState.queue = JSCompiler_inline_result;\n ssrFormState = dispatchSetState.bind(\n null,\n currentlyRenderingFiber,\n JSCompiler_inline_result\n );\n JSCompiler_inline_result.dispatch = ssrFormState;\n JSCompiler_inline_result = mountStateImpl(!1);\n inRootOrSingleton = dispatchOptimisticSetState.bind(\n null,\n currentlyRenderingFiber,\n !1,\n JSCompiler_inline_result.queue\n );\n JSCompiler_inline_result = mountWorkInProgressHook();\n JSCompiler_inline_result$jscomp$0 = {\n state: initialStateProp,\n dispatch: null,\n action: action,\n pending: null\n };\n JSCompiler_inline_result.queue = JSCompiler_inline_result$jscomp$0;\n ssrFormState = dispatchActionState.bind(\n null,\n currentlyRenderingFiber,\n JSCompiler_inline_result$jscomp$0,\n inRootOrSingleton,\n ssrFormState\n );\n JSCompiler_inline_result$jscomp$0.dispatch = ssrFormState;\n JSCompiler_inline_result.memoizedState = action;\n return [initialStateProp, ssrFormState, !1];\n}\nfunction updateActionState(action) {\n var stateHook = updateWorkInProgressHook();\n return updateActionStateImpl(stateHook, currentHook, action);\n}\nfunction updateActionStateImpl(stateHook, currentStateHook, action) {\n currentStateHook = updateReducerImpl(\n stateHook,\n currentStateHook,\n actionStateReducer\n )[0];\n stateHook = updateReducer(basicStateReducer)[0];\n if (\n \"object\" === typeof currentStateHook &&\n null !== currentStateHook &&\n \"function\" === typeof currentStateHook.then\n )\n try {\n var state = useThenable(currentStateHook);\n } catch (x) {\n if (x === SuspenseException) throw SuspenseActionException;\n throw x;\n }\n else state = currentStateHook;\n currentStateHook = updateWorkInProgressHook();\n var actionQueue = currentStateHook.queue,\n dispatch = actionQueue.dispatch;\n action !== currentStateHook.memoizedState &&\n ((currentlyRenderingFiber.flags |= 2048),\n pushSimpleEffect(\n 9,\n { destroy: void 0 },\n actionStateActionEffect.bind(null, actionQueue, action),\n null\n ));\n return [state, dispatch, stateHook];\n}\nfunction actionStateActionEffect(actionQueue, action) {\n actionQueue.action = action;\n}\nfunction rerenderActionState(action) {\n var stateHook = updateWorkInProgressHook(),\n currentStateHook = currentHook;\n if (null !== currentStateHook)\n return updateActionStateImpl(stateHook, currentStateHook, action);\n updateWorkInProgressHook();\n stateHook = stateHook.memoizedState;\n currentStateHook = updateWorkInProgressHook();\n var dispatch = currentStateHook.queue.dispatch;\n currentStateHook.memoizedState = action;\n return [stateHook, dispatch, !1];\n}\nfunction pushSimpleEffect(tag, inst, create, deps) {\n tag = { tag: tag, create: create, deps: deps, inst: inst, next: null };\n inst = currentlyRenderingFiber.updateQueue;\n null === inst &&\n ((inst = createFunctionComponentUpdateQueue()),\n (currentlyRenderingFiber.updateQueue = inst));\n create = inst.lastEffect;\n null === create\n ? (inst.lastEffect = tag.next = tag)\n : ((deps = create.next),\n (create.next = tag),\n (tag.next = deps),\n (inst.lastEffect = tag));\n return tag;\n}\nfunction updateRef() {\n return updateWorkInProgressHook().memoizedState;\n}\nfunction mountEffectImpl(fiberFlags, hookFlags, create, deps) {\n var hook = mountWorkInProgressHook();\n currentlyRenderingFiber.flags |= fiberFlags;\n hook.memoizedState = pushSimpleEffect(\n 1 | hookFlags,\n { destroy: void 0 },\n create,\n void 0 === deps ? null : deps\n );\n}\nfunction updateEffectImpl(fiberFlags, hookFlags, create, deps) {\n var hook = updateWorkInProgressHook();\n deps = void 0 === deps ? null : deps;\n var inst = hook.memoizedState.inst;\n null !== currentHook &&\n null !== deps &&\n areHookInputsEqual(deps, currentHook.memoizedState.deps)\n ? (hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps))\n : ((currentlyRenderingFiber.flags |= fiberFlags),\n (hook.memoizedState = pushSimpleEffect(\n 1 | hookFlags,\n inst,\n create,\n deps\n )));\n}\nfunction mountEffect(create, deps) {\n mountEffectImpl(8390656, 8, create, deps);\n}\nfunction updateEffect(create, deps) {\n updateEffectImpl(2048, 8, create, deps);\n}\nfunction useEffectEventImpl(payload) {\n currentlyRenderingFiber.flags |= 4;\n var componentUpdateQueue = currentlyRenderingFiber.updateQueue;\n if (null === componentUpdateQueue)\n (componentUpdateQueue = createFunctionComponentUpdateQueue()),\n (currentlyRenderingFiber.updateQueue = componentUpdateQueue),\n (componentUpdateQueue.events = [payload]);\n else {\n var events = componentUpdateQueue.events;\n null === events\n ? (componentUpdateQueue.events = [payload])\n : events.push(payload);\n }\n}\nfunction updateEvent(callback) {\n var ref = updateWorkInProgressHook().memoizedState;\n useEffectEventImpl({ ref: ref, nextImpl: callback });\n return function () {\n if (0 !== (executionContext & 2)) throw Error(formatProdErrorMessage(440));\n return ref.impl.apply(void 0, arguments);\n };\n}\nfunction updateInsertionEffect(create, deps) {\n return updateEffectImpl(4, 2, create, deps);\n}\nfunction updateLayoutEffect(create, deps) {\n return updateEffectImpl(4, 4, create, deps);\n}\nfunction imperativeHandleEffect(create, ref) {\n if (\"function\" === typeof ref) {\n create = create();\n var refCleanup = ref(create);\n return function () {\n \"function\" === typeof refCleanup ? refCleanup() : ref(null);\n };\n }\n if (null !== ref && void 0 !== ref)\n return (\n (create = create()),\n (ref.current = create),\n function () {\n ref.current = null;\n }\n );\n}\nfunction updateImperativeHandle(ref, create, deps) {\n deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;\n updateEffectImpl(4, 4, imperativeHandleEffect.bind(null, create, ref), deps);\n}\nfunction mountDebugValue() {}\nfunction updateCallback(callback, deps) {\n var hook = updateWorkInProgressHook();\n deps = void 0 === deps ? null : deps;\n var prevState = hook.memoizedState;\n if (null !== deps && areHookInputsEqual(deps, prevState[1]))\n return prevState[0];\n hook.memoizedState = [callback, deps];\n return callback;\n}\nfunction updateMemo(nextCreate, deps) {\n var hook = updateWorkInProgressHook();\n deps = void 0 === deps ? null : deps;\n var prevState = hook.memoizedState;\n if (null !== deps && areHookInputsEqual(deps, prevState[1]))\n return prevState[0];\n prevState = nextCreate();\n if (shouldDoubleInvokeUserFnsInHooksDEV) {\n setIsStrictModeForDevtools(!0);\n try {\n nextCreate();\n } finally {\n setIsStrictModeForDevtools(!1);\n }\n }\n hook.memoizedState = [prevState, deps];\n return prevState;\n}\nfunction mountDeferredValueImpl(hook, value, initialValue) {\n if (\n void 0 === initialValue ||\n (0 !== (renderLanes & 1073741824) &&\n 0 === (workInProgressRootRenderLanes & 261930))\n )\n return (hook.memoizedState = value);\n hook.memoizedState = initialValue;\n hook = requestDeferredLane();\n currentlyRenderingFiber.lanes |= hook;\n workInProgressRootSkippedLanes |= hook;\n return initialValue;\n}\nfunction updateDeferredValueImpl(hook, prevValue, value, initialValue) {\n if (objectIs(value, prevValue)) return value;\n if (null !== currentTreeHiddenStackCursor.current)\n return (\n (hook = mountDeferredValueImpl(hook, value, initialValue)),\n objectIs(hook, prevValue) || (didReceiveUpdate = !0),\n hook\n );\n if (\n 0 === (renderLanes & 42) ||\n (0 !== (renderLanes & 1073741824) &&\n 0 === (workInProgressRootRenderLanes & 261930))\n )\n return (didReceiveUpdate = !0), (hook.memoizedState = value);\n hook = requestDeferredLane();\n currentlyRenderingFiber.lanes |= hook;\n workInProgressRootSkippedLanes |= hook;\n return prevValue;\n}\nfunction startTransition(fiber, queue, pendingState, finishedState, callback) {\n var previousPriority = ReactDOMSharedInternals.p;\n ReactDOMSharedInternals.p =\n 0 !== previousPriority && 8 > previousPriority ? previousPriority : 8;\n var prevTransition = ReactSharedInternals.T,\n currentTransition = {};\n ReactSharedInternals.T = currentTransition;\n dispatchOptimisticSetState(fiber, !1, queue, pendingState);\n try {\n var returnValue = callback(),\n onStartTransitionFinish = ReactSharedInternals.S;\n null !== onStartTransitionFinish &&\n onStartTransitionFinish(currentTransition, returnValue);\n if (\n null !== returnValue &&\n \"object\" === typeof returnValue &&\n \"function\" === typeof returnValue.then\n ) {\n var thenableForFinishedState = chainThenableValue(\n returnValue,\n finishedState\n );\n dispatchSetStateInternal(\n fiber,\n queue,\n thenableForFinishedState,\n requestUpdateLane(fiber)\n );\n } else\n dispatchSetStateInternal(\n fiber,\n queue,\n finishedState,\n requestUpdateLane(fiber)\n );\n } catch (error) {\n dispatchSetStateInternal(\n fiber,\n queue,\n { then: function () {}, status: \"rejected\", reason: error },\n requestUpdateLane()\n );\n } finally {\n (ReactDOMSharedInternals.p = previousPriority),\n null !== prevTransition &&\n null !== currentTransition.types &&\n (prevTransition.types = currentTransition.types),\n (ReactSharedInternals.T = prevTransition);\n }\n}\nfunction noop() {}\nfunction startHostTransition(formFiber, pendingState, action, formData) {\n if (5 !== formFiber.tag) throw Error(formatProdErrorMessage(476));\n var queue = ensureFormComponentIsStateful(formFiber).queue;\n startTransition(\n formFiber,\n queue,\n pendingState,\n sharedNotPendingObject,\n null === action\n ? noop\n : function () {\n requestFormReset$1(formFiber);\n return action(formData);\n }\n );\n}\nfunction ensureFormComponentIsStateful(formFiber) {\n var existingStateHook = formFiber.memoizedState;\n if (null !== existingStateHook) return existingStateHook;\n existingStateHook = {\n memoizedState: sharedNotPendingObject,\n baseState: sharedNotPendingObject,\n baseQueue: null,\n queue: {\n pending: null,\n lanes: 0,\n dispatch: null,\n lastRenderedReducer: basicStateReducer,\n lastRenderedState: sharedNotPendingObject\n },\n next: null\n };\n var initialResetState = {};\n existingStateHook.next = {\n memoizedState: initialResetState,\n baseState: initialResetState,\n baseQueue: null,\n queue: {\n pending: null,\n lanes: 0,\n dispatch: null,\n lastRenderedReducer: basicStateReducer,\n lastRenderedState: initialResetState\n },\n next: null\n };\n formFiber.memoizedState = existingStateHook;\n formFiber = formFiber.alternate;\n null !== formFiber && (formFiber.memoizedState = existingStateHook);\n return existingStateHook;\n}\nfunction requestFormReset$1(formFiber) {\n var stateHook = ensureFormComponentIsStateful(formFiber);\n null === stateHook.next && (stateHook = formFiber.alternate.memoizedState);\n dispatchSetStateInternal(\n formFiber,\n stateHook.next.queue,\n {},\n requestUpdateLane()\n );\n}\nfunction useHostTransitionStatus() {\n return readContext(HostTransitionContext);\n}\nfunction updateId() {\n return updateWorkInProgressHook().memoizedState;\n}\nfunction updateRefresh() {\n return updateWorkInProgressHook().memoizedState;\n}\nfunction refreshCache(fiber) {\n for (var provider = fiber.return; null !== provider; ) {\n switch (provider.tag) {\n case 24:\n case 3:\n var lane = requestUpdateLane();\n fiber = createUpdate(lane);\n var root$69 = enqueueUpdate(provider, fiber, lane);\n null !== root$69 &&\n (scheduleUpdateOnFiber(root$69, provider, lane),\n entangleTransitions(root$69, provider, lane));\n provider = { cache: createCache() };\n fiber.payload = provider;\n return;\n }\n provider = provider.return;\n }\n}\nfunction dispatchReducerAction(fiber, queue, action) {\n var lane = requestUpdateLane();\n action = {\n lane: lane,\n revertLane: 0,\n gesture: null,\n action: action,\n hasEagerState: !1,\n eagerState: null,\n next: null\n };\n isRenderPhaseUpdate(fiber)\n ? enqueueRenderPhaseUpdate(queue, action)\n : ((action = enqueueConcurrentHookUpdate(fiber, queue, action, lane)),\n null !== action &&\n (scheduleUpdateOnFiber(action, fiber, lane),\n entangleTransitionUpdate(action, queue, lane)));\n}\nfunction dispatchSetState(fiber, queue, action) {\n var lane = requestUpdateLane();\n dispatchSetStateInternal(fiber, queue, action, lane);\n}\nfunction dispatchSetStateInternal(fiber, queue, action, lane) {\n var update = {\n lane: lane,\n revertLane: 0,\n gesture: null,\n action: action,\n hasEagerState: !1,\n eagerState: null,\n next: null\n };\n if (isRenderPhaseUpdate(fiber)) enqueueRenderPhaseUpdate(queue, update);\n else {\n var alternate = fiber.alternate;\n if (\n 0 === fiber.lanes &&\n (null === alternate || 0 === alternate.lanes) &&\n ((alternate = queue.lastRenderedReducer), null !== alternate)\n )\n try {\n var currentState = queue.lastRenderedState,\n eagerState = alternate(currentState, action);\n update.hasEagerState = !0;\n update.eagerState = eagerState;\n if (objectIs(eagerState, currentState))\n return (\n enqueueUpdate$1(fiber, queue, update, 0),\n null === workInProgressRoot && finishQueueingConcurrentUpdates(),\n !1\n );\n } catch (error) {\n } finally {\n }\n action = enqueueConcurrentHookUpdate(fiber, queue, update, lane);\n if (null !== action)\n return (\n scheduleUpdateOnFiber(action, fiber, lane),\n entangleTransitionUpdate(action, queue, lane),\n !0\n );\n }\n return !1;\n}\nfunction dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) {\n action = {\n lane: 2,\n revertLane: requestTransitionLane(),\n gesture: null,\n action: action,\n hasEagerState: !1,\n eagerState: null,\n next: null\n };\n if (isRenderPhaseUpdate(fiber)) {\n if (throwIfDuringRender) throw Error(formatProdErrorMessage(479));\n } else\n (throwIfDuringRender = enqueueConcurrentHookUpdate(\n fiber,\n queue,\n action,\n 2\n )),\n null !== throwIfDuringRender &&\n scheduleUpdateOnFiber(throwIfDuringRender, fiber, 2);\n}\nfunction isRenderPhaseUpdate(fiber) {\n var alternate = fiber.alternate;\n return (\n fiber === currentlyRenderingFiber ||\n (null !== alternate && alternate === currentlyRenderingFiber)\n );\n}\nfunction enqueueRenderPhaseUpdate(queue, update) {\n didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate =\n !0;\n var pending = queue.pending;\n null === pending\n ? (update.next = update)\n : ((update.next = pending.next), (pending.next = update));\n queue.pending = update;\n}\nfunction entangleTransitionUpdate(root, queue, lane) {\n if (0 !== (lane & 4194048)) {\n var queueLanes = queue.lanes;\n queueLanes &= root.pendingLanes;\n lane |= queueLanes;\n queue.lanes = lane;\n markRootEntangled(root, lane);\n }\n}\nvar ContextOnlyDispatcher = {\n readContext: readContext,\n use: use,\n useCallback: throwInvalidHookError,\n useContext: throwInvalidHookError,\n useEffect: throwInvalidHookError,\n useImperativeHandle: throwInvalidHookError,\n useLayoutEffect: throwInvalidHookError,\n useInsertionEffect: throwInvalidHookError,\n useMemo: throwInvalidHookError,\n useReducer: throwInvalidHookError,\n useRef: throwInvalidHookError,\n useState: throwInvalidHookError,\n useDebugValue: throwInvalidHookError,\n useDeferredValue: throwInvalidHookError,\n useTransition: throwInvalidHookError,\n useSyncExternalStore: throwInvalidHookError,\n useId: throwInvalidHookError,\n useHostTransitionStatus: throwInvalidHookError,\n useFormState: throwInvalidHookError,\n useActionState: throwInvalidHookError,\n useOptimistic: throwInvalidHookError,\n useMemoCache: throwInvalidHookError,\n useCacheRefresh: throwInvalidHookError\n};\nContextOnlyDispatcher.useEffectEvent = throwInvalidHookError;\nvar HooksDispatcherOnMount = {\n readContext: readContext,\n use: use,\n useCallback: function (callback, deps) {\n mountWorkInProgressHook().memoizedState = [\n callback,\n void 0 === deps ? null : deps\n ];\n return callback;\n },\n useContext: readContext,\n useEffect: mountEffect,\n useImperativeHandle: function (ref, create, deps) {\n deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;\n mountEffectImpl(\n 4194308,\n 4,\n imperativeHandleEffect.bind(null, create, ref),\n deps\n );\n },\n useLayoutEffect: function (create, deps) {\n return mountEffectImpl(4194308, 4, create, deps);\n },\n useInsertionEffect: function (create, deps) {\n mountEffectImpl(4, 2, create, deps);\n },\n useMemo: function (nextCreate, deps) {\n var hook = mountWorkInProgressHook();\n deps = void 0 === deps ? null : deps;\n var nextValue = nextCreate();\n if (shouldDoubleInvokeUserFnsInHooksDEV) {\n setIsStrictModeForDevtools(!0);\n try {\n nextCreate();\n } finally {\n setIsStrictModeForDevtools(!1);\n }\n }\n hook.memoizedState = [nextValue, deps];\n return nextValue;\n },\n useReducer: function (reducer, initialArg, init) {\n var hook = mountWorkInProgressHook();\n if (void 0 !== init) {\n var initialState = init(initialArg);\n if (shouldDoubleInvokeUserFnsInHooksDEV) {\n setIsStrictModeForDevtools(!0);\n try {\n init(initialArg);\n } finally {\n setIsStrictModeForDevtools(!1);\n }\n }\n } else initialState = initialArg;\n hook.memoizedState = hook.baseState = initialState;\n reducer = {\n pending: null,\n lanes: 0,\n dispatch: null,\n lastRenderedReducer: reducer,\n lastRenderedState: initialState\n };\n hook.queue = reducer;\n reducer = reducer.dispatch = dispatchReducerAction.bind(\n null,\n currentlyRenderingFiber,\n reducer\n );\n return [hook.memoizedState, reducer];\n },\n useRef: function (initialValue) {\n var hook = mountWorkInProgressHook();\n initialValue = { current: initialValue };\n return (hook.memoizedState = initialValue);\n },\n useState: function (initialState) {\n initialState = mountStateImpl(initialState);\n var queue = initialState.queue,\n dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue);\n queue.dispatch = dispatch;\n return [initialState.memoizedState, dispatch];\n },\n useDebugValue: mountDebugValue,\n useDeferredValue: function (value, initialValue) {\n var hook = mountWorkInProgressHook();\n return mountDeferredValueImpl(hook, value, initialValue);\n },\n useTransition: function () {\n var stateHook = mountStateImpl(!1);\n stateHook = startTransition.bind(\n null,\n currentlyRenderingFiber,\n stateHook.queue,\n !0,\n !1\n );\n mountWorkInProgressHook().memoizedState = stateHook;\n return [!1, stateHook];\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n var fiber = currentlyRenderingFiber,\n hook = mountWorkInProgressHook();\n if (isHydrating) {\n if (void 0 === getServerSnapshot)\n throw Error(formatProdErrorMessage(407));\n getServerSnapshot = getServerSnapshot();\n } else {\n getServerSnapshot = getSnapshot();\n if (null === workInProgressRoot)\n throw Error(formatProdErrorMessage(349));\n 0 !== (workInProgressRootRenderLanes & 127) ||\n pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);\n }\n hook.memoizedState = getServerSnapshot;\n var inst = { value: getServerSnapshot, getSnapshot: getSnapshot };\n hook.queue = inst;\n mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [\n subscribe\n ]);\n fiber.flags |= 2048;\n pushSimpleEffect(\n 9,\n { destroy: void 0 },\n updateStoreInstance.bind(\n null,\n fiber,\n inst,\n getServerSnapshot,\n getSnapshot\n ),\n null\n );\n return getServerSnapshot;\n },\n useId: function () {\n var hook = mountWorkInProgressHook(),\n identifierPrefix = workInProgressRoot.identifierPrefix;\n if (isHydrating) {\n var JSCompiler_inline_result = treeContextOverflow;\n var idWithLeadingBit = treeContextId;\n JSCompiler_inline_result =\n (\n idWithLeadingBit & ~(1 << (32 - clz32(idWithLeadingBit) - 1))\n ).toString(32) + JSCompiler_inline_result;\n identifierPrefix =\n \"_\" + identifierPrefix + \"R_\" + JSCompiler_inline_result;\n JSCompiler_inline_result = localIdCounter++;\n 0 < JSCompiler_inline_result &&\n (identifierPrefix += \"H\" + JSCompiler_inline_result.toString(32));\n identifierPrefix += \"_\";\n } else\n (JSCompiler_inline_result = globalClientIdCounter++),\n (identifierPrefix =\n \"_\" +\n identifierPrefix +\n \"r_\" +\n JSCompiler_inline_result.toString(32) +\n \"_\");\n return (hook.memoizedState = identifierPrefix);\n },\n useHostTransitionStatus: useHostTransitionStatus,\n useFormState: mountActionState,\n useActionState: mountActionState,\n useOptimistic: function (passthrough) {\n var hook = mountWorkInProgressHook();\n hook.memoizedState = hook.baseState = passthrough;\n var queue = {\n pending: null,\n lanes: 0,\n dispatch: null,\n lastRenderedReducer: null,\n lastRenderedState: null\n };\n hook.queue = queue;\n hook = dispatchOptimisticSetState.bind(\n null,\n currentlyRenderingFiber,\n !0,\n queue\n );\n queue.dispatch = hook;\n return [passthrough, hook];\n },\n useMemoCache: useMemoCache,\n useCacheRefresh: function () {\n return (mountWorkInProgressHook().memoizedState = refreshCache.bind(\n null,\n currentlyRenderingFiber\n ));\n },\n useEffectEvent: function (callback) {\n var hook = mountWorkInProgressHook(),\n ref = { impl: callback };\n hook.memoizedState = ref;\n return function () {\n if (0 !== (executionContext & 2))\n throw Error(formatProdErrorMessage(440));\n return ref.impl.apply(void 0, arguments);\n };\n }\n },\n HooksDispatcherOnUpdate = {\n readContext: readContext,\n use: use,\n useCallback: updateCallback,\n useContext: readContext,\n useEffect: updateEffect,\n useImperativeHandle: updateImperativeHandle,\n useInsertionEffect: updateInsertionEffect,\n useLayoutEffect: updateLayoutEffect,\n useMemo: updateMemo,\n useReducer: updateReducer,\n useRef: updateRef,\n useState: function () {\n return updateReducer(basicStateReducer);\n },\n useDebugValue: mountDebugValue,\n useDeferredValue: function (value, initialValue) {\n var hook = updateWorkInProgressHook();\n return updateDeferredValueImpl(\n hook,\n currentHook.memoizedState,\n value,\n initialValue\n );\n },\n useTransition: function () {\n var booleanOrThenable = updateReducer(basicStateReducer)[0],\n start = updateWorkInProgressHook().memoizedState;\n return [\n \"boolean\" === typeof booleanOrThenable\n ? booleanOrThenable\n : useThenable(booleanOrThenable),\n start\n ];\n },\n useSyncExternalStore: updateSyncExternalStore,\n useId: updateId,\n useHostTransitionStatus: useHostTransitionStatus,\n useFormState: updateActionState,\n useActionState: updateActionState,\n useOptimistic: function (passthrough, reducer) {\n var hook = updateWorkInProgressHook();\n return updateOptimisticImpl(hook, currentHook, passthrough, reducer);\n },\n useMemoCache: useMemoCache,\n useCacheRefresh: updateRefresh\n };\nHooksDispatcherOnUpdate.useEffectEvent = updateEvent;\nvar HooksDispatcherOnRerender = {\n readContext: readContext,\n use: use,\n useCallback: updateCallback,\n useContext: readContext,\n useEffect: updateEffect,\n useImperativeHandle: updateImperativeHandle,\n useInsertionEffect: updateInsertionEffect,\n useLayoutEffect: updateLayoutEffect,\n useMemo: updateMemo,\n useReducer: rerenderReducer,\n useRef: updateRef,\n useState: function () {\n return rerenderReducer(basicStateReducer);\n },\n useDebugValue: mountDebugValue,\n useDeferredValue: function (value, initialValue) {\n var hook = updateWorkInProgressHook();\n return null === currentHook\n ? mountDeferredValueImpl(hook, value, initialValue)\n : updateDeferredValueImpl(\n hook,\n currentHook.memoizedState,\n value,\n initialValue\n );\n },\n useTransition: function () {\n var booleanOrThenable = rerenderReducer(basicStateReducer)[0],\n start = updateWorkInProgressHook().memoizedState;\n return [\n \"boolean\" === typeof booleanOrThenable\n ? booleanOrThenable\n : useThenable(booleanOrThenable),\n start\n ];\n },\n useSyncExternalStore: updateSyncExternalStore,\n useId: updateId,\n useHostTransitionStatus: useHostTransitionStatus,\n useFormState: rerenderActionState,\n useActionState: rerenderActionState,\n useOptimistic: function (passthrough, reducer) {\n var hook = updateWorkInProgressHook();\n if (null !== currentHook)\n return updateOptimisticImpl(hook, currentHook, passthrough, reducer);\n hook.baseState = passthrough;\n return [passthrough, hook.queue.dispatch];\n },\n useMemoCache: useMemoCache,\n useCacheRefresh: updateRefresh\n};\nHooksDispatcherOnRerender.useEffectEvent = updateEvent;\nfunction applyDerivedStateFromProps(\n workInProgress,\n ctor,\n getDerivedStateFromProps,\n nextProps\n) {\n ctor = workInProgress.memoizedState;\n getDerivedStateFromProps = getDerivedStateFromProps(nextProps, ctor);\n getDerivedStateFromProps =\n null === getDerivedStateFromProps || void 0 === getDerivedStateFromProps\n ? ctor\n : assign({}, ctor, getDerivedStateFromProps);\n workInProgress.memoizedState = getDerivedStateFromProps;\n 0 === workInProgress.lanes &&\n (workInProgress.updateQueue.baseState = getDerivedStateFromProps);\n}\nvar classComponentUpdater = {\n enqueueSetState: function (inst, payload, callback) {\n inst = inst._reactInternals;\n var lane = requestUpdateLane(),\n update = createUpdate(lane);\n update.payload = payload;\n void 0 !== callback && null !== callback && (update.callback = callback);\n payload = enqueueUpdate(inst, update, lane);\n null !== payload &&\n (scheduleUpdateOnFiber(payload, inst, lane),\n entangleTransitions(payload, inst, lane));\n },\n enqueueReplaceState: function (inst, payload, callback) {\n inst = inst._reactInternals;\n var lane = requestUpdateLane(),\n update = createUpdate(lane);\n update.tag = 1;\n update.payload = payload;\n void 0 !== callback && null !== callback && (update.callback = callback);\n payload = enqueueUpdate(inst, update, lane);\n null !== payload &&\n (scheduleUpdateOnFiber(payload, inst, lane),\n entangleTransitions(payload, inst, lane));\n },\n enqueueForceUpdate: function (inst, callback) {\n inst = inst._reactInternals;\n var lane = requestUpdateLane(),\n update = createUpdate(lane);\n update.tag = 2;\n void 0 !== callback && null !== callback && (update.callback = callback);\n callback = enqueueUpdate(inst, update, lane);\n null !== callback &&\n (scheduleUpdateOnFiber(callback, inst, lane),\n entangleTransitions(callback, inst, lane));\n }\n};\nfunction checkShouldComponentUpdate(\n workInProgress,\n ctor,\n oldProps,\n newProps,\n oldState,\n newState,\n nextContext\n) {\n workInProgress = workInProgress.stateNode;\n return \"function\" === typeof workInProgress.shouldComponentUpdate\n ? workInProgress.shouldComponentUpdate(newProps, newState, nextContext)\n : ctor.prototype && ctor.prototype.isPureReactComponent\n ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState)\n : !0;\n}\nfunction callComponentWillReceiveProps(\n workInProgress,\n instance,\n newProps,\n nextContext\n) {\n workInProgress = instance.state;\n \"function\" === typeof instance.componentWillReceiveProps &&\n instance.componentWillReceiveProps(newProps, nextContext);\n \"function\" === typeof instance.UNSAFE_componentWillReceiveProps &&\n instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);\n instance.state !== workInProgress &&\n classComponentUpdater.enqueueReplaceState(instance, instance.state, null);\n}\nfunction resolveClassComponentProps(Component, baseProps) {\n var newProps = baseProps;\n if (\"ref\" in baseProps) {\n newProps = {};\n for (var propName in baseProps)\n \"ref\" !== propName && (newProps[propName] = baseProps[propName]);\n }\n if ((Component = Component.defaultProps)) {\n newProps === baseProps && (newProps = assign({}, newProps));\n for (var propName$73 in Component)\n void 0 === newProps[propName$73] &&\n (newProps[propName$73] = Component[propName$73]);\n }\n return newProps;\n}\nfunction defaultOnUncaughtError(error) {\n reportGlobalError(error);\n}\nfunction defaultOnCaughtError(error) {\n console.error(error);\n}\nfunction defaultOnRecoverableError(error) {\n reportGlobalError(error);\n}\nfunction logUncaughtError(root, errorInfo) {\n try {\n var onUncaughtError = root.onUncaughtError;\n onUncaughtError(errorInfo.value, { componentStack: errorInfo.stack });\n } catch (e$74) {\n setTimeout(function () {\n throw e$74;\n });\n }\n}\nfunction logCaughtError(root, boundary, errorInfo) {\n try {\n var onCaughtError = root.onCaughtError;\n onCaughtError(errorInfo.value, {\n componentStack: errorInfo.stack,\n errorBoundary: 1 === boundary.tag ? boundary.stateNode : null\n });\n } catch (e$75) {\n setTimeout(function () {\n throw e$75;\n });\n }\n}\nfunction createRootErrorUpdate(root, errorInfo, lane) {\n lane = createUpdate(lane);\n lane.tag = 3;\n lane.payload = { element: null };\n lane.callback = function () {\n logUncaughtError(root, errorInfo);\n };\n return lane;\n}\nfunction createClassErrorUpdate(lane) {\n lane = createUpdate(lane);\n lane.tag = 3;\n return lane;\n}\nfunction initializeClassErrorUpdate(update, root, fiber, errorInfo) {\n var getDerivedStateFromError = fiber.type.getDerivedStateFromError;\n if (\"function\" === typeof getDerivedStateFromError) {\n var error = errorInfo.value;\n update.payload = function () {\n return getDerivedStateFromError(error);\n };\n update.callback = function () {\n logCaughtError(root, fiber, errorInfo);\n };\n }\n var inst = fiber.stateNode;\n null !== inst &&\n \"function\" === typeof inst.componentDidCatch &&\n (update.callback = function () {\n logCaughtError(root, fiber, errorInfo);\n \"function\" !== typeof getDerivedStateFromError &&\n (null === legacyErrorBoundariesThatAlreadyFailed\n ? (legacyErrorBoundariesThatAlreadyFailed = new Set([this]))\n : legacyErrorBoundariesThatAlreadyFailed.add(this));\n var stack = errorInfo.stack;\n this.componentDidCatch(errorInfo.value, {\n componentStack: null !== stack ? stack : \"\"\n });\n });\n}\nfunction throwException(\n root,\n returnFiber,\n sourceFiber,\n value,\n rootRenderLanes\n) {\n sourceFiber.flags |= 32768;\n if (\n null !== value &&\n \"object\" === typeof value &&\n \"function\" === typeof value.then\n ) {\n returnFiber = sourceFiber.alternate;\n null !== returnFiber &&\n propagateParentContextChanges(\n returnFiber,\n sourceFiber,\n rootRenderLanes,\n !0\n );\n sourceFiber = suspenseHandlerStackCursor.current;\n if (null !== sourceFiber) {\n switch (sourceFiber.tag) {\n case 31:\n case 13:\n return (\n null === shellBoundary\n ? renderDidSuspendDelayIfPossible()\n : null === sourceFiber.alternate &&\n 0 === workInProgressRootExitStatus &&\n (workInProgressRootExitStatus = 3),\n (sourceFiber.flags &= -257),\n (sourceFiber.flags |= 65536),\n (sourceFiber.lanes = rootRenderLanes),\n value === noopSuspenseyCommitThenable\n ? (sourceFiber.flags |= 16384)\n : ((returnFiber = sourceFiber.updateQueue),\n null === returnFiber\n ? (sourceFiber.updateQueue = new Set([value]))\n : returnFiber.add(value),\n attachPingListener(root, value, rootRenderLanes)),\n !1\n );\n case 22:\n return (\n (sourceFiber.flags |= 65536),\n value === noopSuspenseyCommitThenable\n ? (sourceFiber.flags |= 16384)\n : ((returnFiber = sourceFiber.updateQueue),\n null === returnFiber\n ? ((returnFiber = {\n transitions: null,\n markerInstances: null,\n retryQueue: new Set([value])\n }),\n (sourceFiber.updateQueue = returnFiber))\n : ((sourceFiber = returnFiber.retryQueue),\n null === sourceFiber\n ? (returnFiber.retryQueue = new Set([value]))\n : sourceFiber.add(value)),\n attachPingListener(root, value, rootRenderLanes)),\n !1\n );\n }\n throw Error(formatProdErrorMessage(435, sourceFiber.tag));\n }\n attachPingListener(root, value, rootRenderLanes);\n renderDidSuspendDelayIfPossible();\n return !1;\n }\n if (isHydrating)\n return (\n (returnFiber = suspenseHandlerStackCursor.current),\n null !== returnFiber\n ? (0 === (returnFiber.flags & 65536) && (returnFiber.flags |= 256),\n (returnFiber.flags |= 65536),\n (returnFiber.lanes = rootRenderLanes),\n value !== HydrationMismatchException &&\n ((root = Error(formatProdErrorMessage(422), { cause: value })),\n queueHydrationError(createCapturedValueAtFiber(root, sourceFiber))))\n : (value !== HydrationMismatchException &&\n ((returnFiber = Error(formatProdErrorMessage(423), {\n cause: value\n })),\n queueHydrationError(\n createCapturedValueAtFiber(returnFiber, sourceFiber)\n )),\n (root = root.current.alternate),\n (root.flags |= 65536),\n (rootRenderLanes &= -rootRenderLanes),\n (root.lanes |= rootRenderLanes),\n (value = createCapturedValueAtFiber(value, sourceFiber)),\n (rootRenderLanes = createRootErrorUpdate(\n root.stateNode,\n value,\n rootRenderLanes\n )),\n enqueueCapturedUpdate(root, rootRenderLanes),\n 4 !== workInProgressRootExitStatus &&\n (workInProgressRootExitStatus = 2)),\n !1\n );\n var wrapperError = Error(formatProdErrorMessage(520), { cause: value });\n wrapperError = createCapturedValueAtFiber(wrapperError, sourceFiber);\n null === workInProgressRootConcurrentErrors\n ? (workInProgressRootConcurrentErrors = [wrapperError])\n : workInProgressRootConcurrentErrors.push(wrapperError);\n 4 !== workInProgressRootExitStatus && (workInProgressRootExitStatus = 2);\n if (null === returnFiber) return !0;\n value = createCapturedValueAtFiber(value, sourceFiber);\n sourceFiber = returnFiber;\n do {\n switch (sourceFiber.tag) {\n case 3:\n return (\n (sourceFiber.flags |= 65536),\n (root = rootRenderLanes & -rootRenderLanes),\n (sourceFiber.lanes |= root),\n (root = createRootErrorUpdate(sourceFiber.stateNode, value, root)),\n enqueueCapturedUpdate(sourceFiber, root),\n !1\n );\n case 1:\n if (\n ((returnFiber = sourceFiber.type),\n (wrapperError = sourceFiber.stateNode),\n 0 === (sourceFiber.flags & 128) &&\n (\"function\" === typeof returnFiber.getDerivedStateFromError ||\n (null !== wrapperError &&\n \"function\" === typeof wrapperError.componentDidCatch &&\n (null === legacyErrorBoundariesThatAlreadyFailed ||\n !legacyErrorBoundariesThatAlreadyFailed.has(wrapperError)))))\n )\n return (\n (sourceFiber.flags |= 65536),\n (rootRenderLanes &= -rootRenderLanes),\n (sourceFiber.lanes |= rootRenderLanes),\n (rootRenderLanes = createClassErrorUpdate(rootRenderLanes)),\n initializeClassErrorUpdate(\n rootRenderLanes,\n root,\n sourceFiber,\n value\n ),\n enqueueCapturedUpdate(sourceFiber, rootRenderLanes),\n !1\n );\n }\n sourceFiber = sourceFiber.return;\n } while (null !== sourceFiber);\n return !1;\n}\nvar SelectiveHydrationException = Error(formatProdErrorMessage(461)),\n didReceiveUpdate = !1;\nfunction reconcileChildren(current, workInProgress, nextChildren, renderLanes) {\n workInProgress.child =\n null === current\n ? mountChildFibers(workInProgress, null, nextChildren, renderLanes)\n : reconcileChildFibers(\n workInProgress,\n current.child,\n nextChildren,\n renderLanes\n );\n}\nfunction updateForwardRef(\n current,\n workInProgress,\n Component,\n nextProps,\n renderLanes\n) {\n Component = Component.render;\n var ref = workInProgress.ref;\n if (\"ref\" in nextProps) {\n var propsWithoutRef = {};\n for (var key in nextProps)\n \"ref\" !== key && (propsWithoutRef[key] = nextProps[key]);\n } else propsWithoutRef = nextProps;\n prepareToReadContext(workInProgress);\n nextProps = renderWithHooks(\n current,\n workInProgress,\n Component,\n propsWithoutRef,\n ref,\n renderLanes\n );\n key = checkDidRenderIdHook();\n if (null !== current && !didReceiveUpdate)\n return (\n bailoutHooks(current, workInProgress, renderLanes),\n bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)\n );\n isHydrating && key && pushMaterializedTreeId(workInProgress);\n workInProgress.flags |= 1;\n reconcileChildren(current, workInProgress, nextProps, renderLanes);\n return workInProgress.child;\n}\nfunction updateMemoComponent(\n current,\n workInProgress,\n Component,\n nextProps,\n renderLanes\n) {\n if (null === current) {\n var type = Component.type;\n if (\n \"function\" === typeof type &&\n !shouldConstruct(type) &&\n void 0 === type.defaultProps &&\n null === Component.compare\n )\n return (\n (workInProgress.tag = 15),\n (workInProgress.type = type),\n updateSimpleMemoComponent(\n current,\n workInProgress,\n type,\n nextProps,\n renderLanes\n )\n );\n current = createFiberFromTypeAndProps(\n Component.type,\n null,\n nextProps,\n workInProgress,\n workInProgress.mode,\n renderLanes\n );\n current.ref = workInProgress.ref;\n current.return = workInProgress;\n return (workInProgress.child = current);\n }\n type = current.child;\n if (!checkScheduledUpdateOrContext(current, renderLanes)) {\n var prevProps = type.memoizedProps;\n Component = Component.compare;\n Component = null !== Component ? Component : shallowEqual;\n if (Component(prevProps, nextProps) && current.ref === workInProgress.ref)\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n workInProgress.flags |= 1;\n current = createWorkInProgress(type, nextProps);\n current.ref = workInProgress.ref;\n current.return = workInProgress;\n return (workInProgress.child = current);\n}\nfunction updateSimpleMemoComponent(\n current,\n workInProgress,\n Component,\n nextProps,\n renderLanes\n) {\n if (null !== current) {\n var prevProps = current.memoizedProps;\n if (\n shallowEqual(prevProps, nextProps) &&\n current.ref === workInProgress.ref\n )\n if (\n ((didReceiveUpdate = !1),\n (workInProgress.pendingProps = nextProps = prevProps),\n checkScheduledUpdateOrContext(current, renderLanes))\n )\n 0 !== (current.flags & 131072) && (didReceiveUpdate = !0);\n else\n return (\n (workInProgress.lanes = current.lanes),\n bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)\n );\n }\n return updateFunctionComponent(\n current,\n workInProgress,\n Component,\n nextProps,\n renderLanes\n );\n}\nfunction updateOffscreenComponent(\n current,\n workInProgress,\n renderLanes,\n nextProps\n) {\n var nextChildren = nextProps.children,\n prevState = null !== current ? current.memoizedState : null;\n null === current &&\n null === workInProgress.stateNode &&\n (workInProgress.stateNode = {\n _visibility: 1,\n _pendingMarkers: null,\n _retryCache: null,\n _transitions: null\n });\n if (\"hidden\" === nextProps.mode) {\n if (0 !== (workInProgress.flags & 128)) {\n prevState =\n null !== prevState ? prevState.baseLanes | renderLanes : renderLanes;\n if (null !== current) {\n nextProps = workInProgress.child = current.child;\n for (nextChildren = 0; null !== nextProps; )\n (nextChildren =\n nextChildren | nextProps.lanes | nextProps.childLanes),\n (nextProps = nextProps.sibling);\n nextProps = nextChildren & ~prevState;\n } else (nextProps = 0), (workInProgress.child = null);\n return deferHiddenOffscreenComponent(\n current,\n workInProgress,\n prevState,\n renderLanes,\n nextProps\n );\n }\n if (0 !== (renderLanes & 536870912))\n (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }),\n null !== current &&\n pushTransition(\n workInProgress,\n null !== prevState ? prevState.cachePool : null\n ),\n null !== prevState\n ? pushHiddenContext(workInProgress, prevState)\n : reuseHiddenContextOnStack(),\n pushOffscreenSuspenseHandler(workInProgress);\n else\n return (\n (nextProps = workInProgress.lanes = 536870912),\n deferHiddenOffscreenComponent(\n current,\n workInProgress,\n null !== prevState ? prevState.baseLanes | renderLanes : renderLanes,\n renderLanes,\n nextProps\n )\n );\n } else\n null !== prevState\n ? (pushTransition(workInProgress, prevState.cachePool),\n pushHiddenContext(workInProgress, prevState),\n reuseSuspenseHandlerOnStack(workInProgress),\n (workInProgress.memoizedState = null))\n : (null !== current && pushTransition(workInProgress, null),\n reuseHiddenContextOnStack(),\n reuseSuspenseHandlerOnStack(workInProgress));\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\nfunction bailoutOffscreenComponent(current, workInProgress) {\n (null !== current && 22 === current.tag) ||\n null !== workInProgress.stateNode ||\n (workInProgress.stateNode = {\n _visibility: 1,\n _pendingMarkers: null,\n _retryCache: null,\n _transitions: null\n });\n return workInProgress.sibling;\n}\nfunction deferHiddenOffscreenComponent(\n current,\n workInProgress,\n nextBaseLanes,\n renderLanes,\n remainingChildLanes\n) {\n var JSCompiler_inline_result = peekCacheFromPool();\n JSCompiler_inline_result =\n null === JSCompiler_inline_result\n ? null\n : { parent: CacheContext._currentValue, pool: JSCompiler_inline_result };\n workInProgress.memoizedState = {\n baseLanes: nextBaseLanes,\n cachePool: JSCompiler_inline_result\n };\n null !== current && pushTransition(workInProgress, null);\n reuseHiddenContextOnStack();\n pushOffscreenSuspenseHandler(workInProgress);\n null !== current &&\n propagateParentContextChanges(current, workInProgress, renderLanes, !0);\n workInProgress.childLanes = remainingChildLanes;\n return null;\n}\nfunction mountActivityChildren(workInProgress, nextProps) {\n nextProps = mountWorkInProgressOffscreenFiber(\n { mode: nextProps.mode, children: nextProps.children },\n workInProgress.mode\n );\n nextProps.ref = workInProgress.ref;\n workInProgress.child = nextProps;\n nextProps.return = workInProgress;\n return nextProps;\n}\nfunction retryActivityComponentWithoutHydrating(\n current,\n workInProgress,\n renderLanes\n) {\n reconcileChildFibers(workInProgress, current.child, null, renderLanes);\n current = mountActivityChildren(workInProgress, workInProgress.pendingProps);\n current.flags |= 2;\n popSuspenseHandler(workInProgress);\n workInProgress.memoizedState = null;\n return current;\n}\nfunction updateActivityComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps,\n didSuspend = 0 !== (workInProgress.flags & 128);\n workInProgress.flags &= -129;\n if (null === current) {\n if (isHydrating) {\n if (\"hidden\" === nextProps.mode)\n return (\n (current = mountActivityChildren(workInProgress, nextProps)),\n (workInProgress.lanes = 536870912),\n bailoutOffscreenComponent(null, current)\n );\n pushDehydratedActivitySuspenseHandler(workInProgress);\n (current = nextHydratableInstance)\n ? ((current = canHydrateHydrationBoundary(\n current,\n rootOrSingletonContext\n )),\n (current = null !== current && \"&\" === current.data ? current : null),\n null !== current &&\n ((workInProgress.memoizedState = {\n dehydrated: current,\n treeContext:\n null !== treeContextProvider\n ? { id: treeContextId, overflow: treeContextOverflow }\n : null,\n retryLane: 536870912,\n hydrationErrors: null\n }),\n (renderLanes = createFiberFromDehydratedFragment(current)),\n (renderLanes.return = workInProgress),\n (workInProgress.child = renderLanes),\n (hydrationParentFiber = workInProgress),\n (nextHydratableInstance = null)))\n : (current = null);\n if (null === current) throw throwOnHydrationMismatch(workInProgress);\n workInProgress.lanes = 536870912;\n return null;\n }\n return mountActivityChildren(workInProgress, nextProps);\n }\n var prevState = current.memoizedState;\n if (null !== prevState) {\n var dehydrated = prevState.dehydrated;\n pushDehydratedActivitySuspenseHandler(workInProgress);\n if (didSuspend)\n if (workInProgress.flags & 256)\n (workInProgress.flags &= -257),\n (workInProgress = retryActivityComponentWithoutHydrating(\n current,\n workInProgress,\n renderLanes\n ));\n else if (null !== workInProgress.memoizedState)\n (workInProgress.child = current.child),\n (workInProgress.flags |= 128),\n (workInProgress = null);\n else throw Error(formatProdErrorMessage(558));\n else if (\n (didReceiveUpdate ||\n propagateParentContextChanges(current, workInProgress, renderLanes, !1),\n (didSuspend = 0 !== (renderLanes & current.childLanes)),\n didReceiveUpdate || didSuspend)\n ) {\n nextProps = workInProgressRoot;\n if (\n null !== nextProps &&\n ((dehydrated = getBumpedLaneForHydration(nextProps, renderLanes)),\n 0 !== dehydrated && dehydrated !== prevState.retryLane)\n )\n throw (\n ((prevState.retryLane = dehydrated),\n enqueueConcurrentRenderForLane(current, dehydrated),\n scheduleUpdateOnFiber(nextProps, current, dehydrated),\n SelectiveHydrationException)\n );\n renderDidSuspendDelayIfPossible();\n workInProgress = retryActivityComponentWithoutHydrating(\n current,\n workInProgress,\n renderLanes\n );\n } else\n (current = prevState.treeContext),\n (nextHydratableInstance = getNextHydratable(dehydrated.nextSibling)),\n (hydrationParentFiber = workInProgress),\n (isHydrating = !0),\n (hydrationErrors = null),\n (rootOrSingletonContext = !1),\n null !== current &&\n restoreSuspendedTreeContext(workInProgress, current),\n (workInProgress = mountActivityChildren(workInProgress, nextProps)),\n (workInProgress.flags |= 4096);\n return workInProgress;\n }\n current = createWorkInProgress(current.child, {\n mode: nextProps.mode,\n children: nextProps.children\n });\n current.ref = workInProgress.ref;\n workInProgress.child = current;\n current.return = workInProgress;\n return current;\n}\nfunction markRef(current, workInProgress) {\n var ref = workInProgress.ref;\n if (null === ref)\n null !== current &&\n null !== current.ref &&\n (workInProgress.flags |= 4194816);\n else {\n if (\"function\" !== typeof ref && \"object\" !== typeof ref)\n throw Error(formatProdErrorMessage(284));\n if (null === current || current.ref !== ref)\n workInProgress.flags |= 4194816;\n }\n}\nfunction updateFunctionComponent(\n current,\n workInProgress,\n Component,\n nextProps,\n renderLanes\n) {\n prepareToReadContext(workInProgress);\n Component = renderWithHooks(\n current,\n workInProgress,\n Component,\n nextProps,\n void 0,\n renderLanes\n );\n nextProps = checkDidRenderIdHook();\n if (null !== current && !didReceiveUpdate)\n return (\n bailoutHooks(current, workInProgress, renderLanes),\n bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)\n );\n isHydrating && nextProps && pushMaterializedTreeId(workInProgress);\n workInProgress.flags |= 1;\n reconcileChildren(current, workInProgress, Component, renderLanes);\n return workInProgress.child;\n}\nfunction replayFunctionComponent(\n current,\n workInProgress,\n nextProps,\n Component,\n secondArg,\n renderLanes\n) {\n prepareToReadContext(workInProgress);\n workInProgress.updateQueue = null;\n nextProps = renderWithHooksAgain(\n workInProgress,\n Component,\n nextProps,\n secondArg\n );\n finishRenderingHooks(current);\n Component = checkDidRenderIdHook();\n if (null !== current && !didReceiveUpdate)\n return (\n bailoutHooks(current, workInProgress, renderLanes),\n bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)\n );\n isHydrating && Component && pushMaterializedTreeId(workInProgress);\n workInProgress.flags |= 1;\n reconcileChildren(current, workInProgress, nextProps, renderLanes);\n return workInProgress.child;\n}\nfunction updateClassComponent(\n current,\n workInProgress,\n Component,\n nextProps,\n renderLanes\n) {\n prepareToReadContext(workInProgress);\n if (null === workInProgress.stateNode) {\n var context = emptyContextObject,\n contextType = Component.contextType;\n \"object\" === typeof contextType &&\n null !== contextType &&\n (context = readContext(contextType));\n context = new Component(nextProps, context);\n workInProgress.memoizedState =\n null !== context.state && void 0 !== context.state ? context.state : null;\n context.updater = classComponentUpdater;\n workInProgress.stateNode = context;\n context._reactInternals = workInProgress;\n context = workInProgress.stateNode;\n context.props = nextProps;\n context.state = workInProgress.memoizedState;\n context.refs = {};\n initializeUpdateQueue(workInProgress);\n contextType = Component.contextType;\n context.context =\n \"object\" === typeof contextType && null !== contextType\n ? readContext(contextType)\n : emptyContextObject;\n context.state = workInProgress.memoizedState;\n contextType = Component.getDerivedStateFromProps;\n \"function\" === typeof contextType &&\n (applyDerivedStateFromProps(\n workInProgress,\n Component,\n contextType,\n nextProps\n ),\n (context.state = workInProgress.memoizedState));\n \"function\" === typeof Component.getDerivedStateFromProps ||\n \"function\" === typeof context.getSnapshotBeforeUpdate ||\n (\"function\" !== typeof context.UNSAFE_componentWillMount &&\n \"function\" !== typeof context.componentWillMount) ||\n ((contextType = context.state),\n \"function\" === typeof context.componentWillMount &&\n context.componentWillMount(),\n \"function\" === typeof context.UNSAFE_componentWillMount &&\n context.UNSAFE_componentWillMount(),\n contextType !== context.state &&\n classComponentUpdater.enqueueReplaceState(context, context.state, null),\n processUpdateQueue(workInProgress, nextProps, context, renderLanes),\n suspendIfUpdateReadFromEntangledAsyncAction(),\n (context.state = workInProgress.memoizedState));\n \"function\" === typeof context.componentDidMount &&\n (workInProgress.flags |= 4194308);\n nextProps = !0;\n } else if (null === current) {\n context = workInProgress.stateNode;\n var unresolvedOldProps = workInProgress.memoizedProps,\n oldProps = resolveClassComponentProps(Component, unresolvedOldProps);\n context.props = oldProps;\n var oldContext = context.context,\n contextType$jscomp$0 = Component.contextType;\n contextType = emptyContextObject;\n \"object\" === typeof contextType$jscomp$0 &&\n null !== contextType$jscomp$0 &&\n (contextType = readContext(contextType$jscomp$0));\n var getDerivedStateFromProps = Component.getDerivedStateFromProps;\n contextType$jscomp$0 =\n \"function\" === typeof getDerivedStateFromProps ||\n \"function\" === typeof context.getSnapshotBeforeUpdate;\n unresolvedOldProps = workInProgress.pendingProps !== unresolvedOldProps;\n contextType$jscomp$0 ||\n (\"function\" !== typeof context.UNSAFE_componentWillReceiveProps &&\n \"function\" !== typeof context.componentWillReceiveProps) ||\n ((unresolvedOldProps || oldContext !== contextType) &&\n callComponentWillReceiveProps(\n workInProgress,\n context,\n nextProps,\n contextType\n ));\n hasForceUpdate = !1;\n var oldState = workInProgress.memoizedState;\n context.state = oldState;\n processUpdateQueue(workInProgress, nextProps, context, renderLanes);\n suspendIfUpdateReadFromEntangledAsyncAction();\n oldContext = workInProgress.memoizedState;\n unresolvedOldProps || oldState !== oldContext || hasForceUpdate\n ? (\"function\" === typeof getDerivedStateFromProps &&\n (applyDerivedStateFromProps(\n workInProgress,\n Component,\n getDerivedStateFromProps,\n nextProps\n ),\n (oldContext = workInProgress.memoizedState)),\n (oldProps =\n hasForceUpdate ||\n checkShouldComponentUpdate(\n workInProgress,\n Component,\n oldProps,\n nextProps,\n oldState,\n oldContext,\n contextType\n ))\n ? (contextType$jscomp$0 ||\n (\"function\" !== typeof context.UNSAFE_componentWillMount &&\n \"function\" !== typeof context.componentWillMount) ||\n (\"function\" === typeof context.componentWillMount &&\n context.componentWillMount(),\n \"function\" === typeof context.UNSAFE_componentWillMount &&\n context.UNSAFE_componentWillMount()),\n \"function\" === typeof context.componentDidMount &&\n (workInProgress.flags |= 4194308))\n : (\"function\" === typeof context.componentDidMount &&\n (workInProgress.flags |= 4194308),\n (workInProgress.memoizedProps = nextProps),\n (workInProgress.memoizedState = oldContext)),\n (context.props = nextProps),\n (context.state = oldContext),\n (context.context = contextType),\n (nextProps = oldProps))\n : (\"function\" === typeof context.componentDidMount &&\n (workInProgress.flags |= 4194308),\n (nextProps = !1));\n } else {\n context = workInProgress.stateNode;\n cloneUpdateQueue(current, workInProgress);\n contextType = workInProgress.memoizedProps;\n contextType$jscomp$0 = resolveClassComponentProps(Component, contextType);\n context.props = contextType$jscomp$0;\n getDerivedStateFromProps = workInProgress.pendingProps;\n oldState = context.context;\n oldContext = Component.contextType;\n oldProps = emptyContextObject;\n \"object\" === typeof oldContext &&\n null !== oldContext &&\n (oldProps = readContext(oldContext));\n unresolvedOldProps = Component.getDerivedStateFromProps;\n (oldContext =\n \"function\" === typeof unresolvedOldProps ||\n \"function\" === typeof context.getSnapshotBeforeUpdate) ||\n (\"function\" !== typeof context.UNSAFE_componentWillReceiveProps &&\n \"function\" !== typeof context.componentWillReceiveProps) ||\n ((contextType !== getDerivedStateFromProps || oldState !== oldProps) &&\n callComponentWillReceiveProps(\n workInProgress,\n context,\n nextProps,\n oldProps\n ));\n hasForceUpdate = !1;\n oldState = workInProgress.memoizedState;\n context.state = oldState;\n processUpdateQueue(workInProgress, nextProps, context, renderLanes);\n suspendIfUpdateReadFromEntangledAsyncAction();\n var newState = workInProgress.memoizedState;\n contextType !== getDerivedStateFromProps ||\n oldState !== newState ||\n hasForceUpdate ||\n (null !== current &&\n null !== current.dependencies &&\n checkIfContextChanged(current.dependencies))\n ? (\"function\" === typeof unresolvedOldProps &&\n (applyDerivedStateFromProps(\n workInProgress,\n Component,\n unresolvedOldProps,\n nextProps\n ),\n (newState = workInProgress.memoizedState)),\n (contextType$jscomp$0 =\n hasForceUpdate ||\n checkShouldComponentUpdate(\n workInProgress,\n Component,\n contextType$jscomp$0,\n nextProps,\n oldState,\n newState,\n oldProps\n ) ||\n (null !== current &&\n null !== current.dependencies &&\n checkIfContextChanged(current.dependencies)))\n ? (oldContext ||\n (\"function\" !== typeof context.UNSAFE_componentWillUpdate &&\n \"function\" !== typeof context.componentWillUpdate) ||\n (\"function\" === typeof context.componentWillUpdate &&\n context.componentWillUpdate(nextProps, newState, oldProps),\n \"function\" === typeof context.UNSAFE_componentWillUpdate &&\n context.UNSAFE_componentWillUpdate(\n nextProps,\n newState,\n oldProps\n )),\n \"function\" === typeof context.componentDidUpdate &&\n (workInProgress.flags |= 4),\n \"function\" === typeof context.getSnapshotBeforeUpdate &&\n (workInProgress.flags |= 1024))\n : (\"function\" !== typeof context.componentDidUpdate ||\n (contextType === current.memoizedProps &&\n oldState === current.memoizedState) ||\n (workInProgress.flags |= 4),\n \"function\" !== typeof context.getSnapshotBeforeUpdate ||\n (contextType === current.memoizedProps &&\n oldState === current.memoizedState) ||\n (workInProgress.flags |= 1024),\n (workInProgress.memoizedProps = nextProps),\n (workInProgress.memoizedState = newState)),\n (context.props = nextProps),\n (context.state = newState),\n (context.context = oldProps),\n (nextProps = contextType$jscomp$0))\n : (\"function\" !== typeof context.componentDidUpdate ||\n (contextType === current.memoizedProps &&\n oldState === current.memoizedState) ||\n (workInProgress.flags |= 4),\n \"function\" !== typeof context.getSnapshotBeforeUpdate ||\n (contextType === current.memoizedProps &&\n oldState === current.memoizedState) ||\n (workInProgress.flags |= 1024),\n (nextProps = !1));\n }\n context = nextProps;\n markRef(current, workInProgress);\n nextProps = 0 !== (workInProgress.flags & 128);\n context || nextProps\n ? ((context = workInProgress.stateNode),\n (Component =\n nextProps && \"function\" !== typeof Component.getDerivedStateFromError\n ? null\n : context.render()),\n (workInProgress.flags |= 1),\n null !== current && nextProps\n ? ((workInProgress.child = reconcileChildFibers(\n workInProgress,\n current.child,\n null,\n renderLanes\n )),\n (workInProgress.child = reconcileChildFibers(\n workInProgress,\n null,\n Component,\n renderLanes\n )))\n : reconcileChildren(current, workInProgress, Component, renderLanes),\n (workInProgress.memoizedState = context.state),\n (current = workInProgress.child))\n : (current = bailoutOnAlreadyFinishedWork(\n current,\n workInProgress,\n renderLanes\n ));\n return current;\n}\nfunction mountHostRootWithoutHydrating(\n current,\n workInProgress,\n nextChildren,\n renderLanes\n) {\n resetHydrationState();\n workInProgress.flags |= 256;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\nvar SUSPENDED_MARKER = {\n dehydrated: null,\n treeContext: null,\n retryLane: 0,\n hydrationErrors: null\n};\nfunction mountSuspenseOffscreenState(renderLanes) {\n return { baseLanes: renderLanes, cachePool: getSuspendedCache() };\n}\nfunction getRemainingWorkInPrimaryTree(\n current,\n primaryTreeDidDefer,\n renderLanes\n) {\n current = null !== current ? current.childLanes & ~renderLanes : 0;\n primaryTreeDidDefer && (current |= workInProgressDeferredLane);\n return current;\n}\nfunction updateSuspenseComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps,\n showFallback = !1,\n didSuspend = 0 !== (workInProgress.flags & 128),\n JSCompiler_temp;\n (JSCompiler_temp = didSuspend) ||\n (JSCompiler_temp =\n null !== current && null === current.memoizedState\n ? !1\n : 0 !== (suspenseStackCursor.current & 2));\n JSCompiler_temp && ((showFallback = !0), (workInProgress.flags &= -129));\n JSCompiler_temp = 0 !== (workInProgress.flags & 32);\n workInProgress.flags &= -33;\n if (null === current) {\n if (isHydrating) {\n showFallback\n ? pushPrimaryTreeSuspenseHandler(workInProgress)\n : reuseSuspenseHandlerOnStack(workInProgress);\n (current = nextHydratableInstance)\n ? ((current = canHydrateHydrationBoundary(\n current,\n rootOrSingletonContext\n )),\n (current = null !== current && \"&\" !== current.data ? current : null),\n null !== current &&\n ((workInProgress.memoizedState = {\n dehydrated: current,\n treeContext:\n null !== treeContextProvider\n ? { id: treeContextId, overflow: treeContextOverflow }\n : null,\n retryLane: 536870912,\n hydrationErrors: null\n }),\n (renderLanes = createFiberFromDehydratedFragment(current)),\n (renderLanes.return = workInProgress),\n (workInProgress.child = renderLanes),\n (hydrationParentFiber = workInProgress),\n (nextHydratableInstance = null)))\n : (current = null);\n if (null === current) throw throwOnHydrationMismatch(workInProgress);\n isSuspenseInstanceFallback(current)\n ? (workInProgress.lanes = 32)\n : (workInProgress.lanes = 536870912);\n return null;\n }\n var nextPrimaryChildren = nextProps.children;\n nextProps = nextProps.fallback;\n if (showFallback)\n return (\n reuseSuspenseHandlerOnStack(workInProgress),\n (showFallback = workInProgress.mode),\n (nextPrimaryChildren = mountWorkInProgressOffscreenFiber(\n { mode: \"hidden\", children: nextPrimaryChildren },\n showFallback\n )),\n (nextProps = createFiberFromFragment(\n nextProps,\n showFallback,\n renderLanes,\n null\n )),\n (nextPrimaryChildren.return = workInProgress),\n (nextProps.return = workInProgress),\n (nextPrimaryChildren.sibling = nextProps),\n (workInProgress.child = nextPrimaryChildren),\n (nextProps = workInProgress.child),\n (nextProps.memoizedState = mountSuspenseOffscreenState(renderLanes)),\n (nextProps.childLanes = getRemainingWorkInPrimaryTree(\n current,\n JSCompiler_temp,\n renderLanes\n )),\n (workInProgress.memoizedState = SUSPENDED_MARKER),\n bailoutOffscreenComponent(null, nextProps)\n );\n pushPrimaryTreeSuspenseHandler(workInProgress);\n return mountSuspensePrimaryChildren(workInProgress, nextPrimaryChildren);\n }\n var prevState = current.memoizedState;\n if (\n null !== prevState &&\n ((nextPrimaryChildren = prevState.dehydrated), null !== nextPrimaryChildren)\n ) {\n if (didSuspend)\n workInProgress.flags & 256\n ? (pushPrimaryTreeSuspenseHandler(workInProgress),\n (workInProgress.flags &= -257),\n (workInProgress = retrySuspenseComponentWithoutHydrating(\n current,\n workInProgress,\n renderLanes\n )))\n : null !== workInProgress.memoizedState\n ? (reuseSuspenseHandlerOnStack(workInProgress),\n (workInProgress.child = current.child),\n (workInProgress.flags |= 128),\n (workInProgress = null))\n : (reuseSuspenseHandlerOnStack(workInProgress),\n (nextPrimaryChildren = nextProps.fallback),\n (showFallback = workInProgress.mode),\n (nextProps = mountWorkInProgressOffscreenFiber(\n { mode: \"visible\", children: nextProps.children },\n showFallback\n )),\n (nextPrimaryChildren = createFiberFromFragment(\n nextPrimaryChildren,\n showFallback,\n renderLanes,\n null\n )),\n (nextPrimaryChildren.flags |= 2),\n (nextProps.return = workInProgress),\n (nextPrimaryChildren.return = workInProgress),\n (nextProps.sibling = nextPrimaryChildren),\n (workInProgress.child = nextProps),\n reconcileChildFibers(\n workInProgress,\n current.child,\n null,\n renderLanes\n ),\n (nextProps = workInProgress.child),\n (nextProps.memoizedState =\n mountSuspenseOffscreenState(renderLanes)),\n (nextProps.childLanes = getRemainingWorkInPrimaryTree(\n current,\n JSCompiler_temp,\n renderLanes\n )),\n (workInProgress.memoizedState = SUSPENDED_MARKER),\n (workInProgress = bailoutOffscreenComponent(null, nextProps)));\n else if (\n (pushPrimaryTreeSuspenseHandler(workInProgress),\n isSuspenseInstanceFallback(nextPrimaryChildren))\n ) {\n JSCompiler_temp =\n nextPrimaryChildren.nextSibling &&\n nextPrimaryChildren.nextSibling.dataset;\n if (JSCompiler_temp) var digest = JSCompiler_temp.dgst;\n JSCompiler_temp = digest;\n nextProps = Error(formatProdErrorMessage(419));\n nextProps.stack = \"\";\n nextProps.digest = JSCompiler_temp;\n queueHydrationError({ value: nextProps, source: null, stack: null });\n workInProgress = retrySuspenseComponentWithoutHydrating(\n current,\n workInProgress,\n renderLanes\n );\n } else if (\n (didReceiveUpdate ||\n propagateParentContextChanges(current, workInProgress, renderLanes, !1),\n (JSCompiler_temp = 0 !== (renderLanes & current.childLanes)),\n didReceiveUpdate || JSCompiler_temp)\n ) {\n JSCompiler_temp = workInProgressRoot;\n if (\n null !== JSCompiler_temp &&\n ((nextProps = getBumpedLaneForHydration(JSCompiler_temp, renderLanes)),\n 0 !== nextProps && nextProps !== prevState.retryLane)\n )\n throw (\n ((prevState.retryLane = nextProps),\n enqueueConcurrentRenderForLane(current, nextProps),\n scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps),\n SelectiveHydrationException)\n );\n isSuspenseInstancePending(nextPrimaryChildren) ||\n renderDidSuspendDelayIfPossible();\n workInProgress = retrySuspenseComponentWithoutHydrating(\n current,\n workInProgress,\n renderLanes\n );\n } else\n isSuspenseInstancePending(nextPrimaryChildren)\n ? ((workInProgress.flags |= 192),\n (workInProgress.child = current.child),\n (workInProgress = null))\n : ((current = prevState.treeContext),\n (nextHydratableInstance = getNextHydratable(\n nextPrimaryChildren.nextSibling\n )),\n (hydrationParentFiber = workInProgress),\n (isHydrating = !0),\n (hydrationErrors = null),\n (rootOrSingletonContext = !1),\n null !== current &&\n restoreSuspendedTreeContext(workInProgress, current),\n (workInProgress = mountSuspensePrimaryChildren(\n workInProgress,\n nextProps.children\n )),\n (workInProgress.flags |= 4096));\n return workInProgress;\n }\n if (showFallback)\n return (\n reuseSuspenseHandlerOnStack(workInProgress),\n (nextPrimaryChildren = nextProps.fallback),\n (showFallback = workInProgress.mode),\n (prevState = current.child),\n (digest = prevState.sibling),\n (nextProps = createWorkInProgress(prevState, {\n mode: \"hidden\",\n children: nextProps.children\n })),\n (nextProps.subtreeFlags = prevState.subtreeFlags & 65011712),\n null !== digest\n ? (nextPrimaryChildren = createWorkInProgress(\n digest,\n nextPrimaryChildren\n ))\n : ((nextPrimaryChildren = createFiberFromFragment(\n nextPrimaryChildren,\n showFallback,\n renderLanes,\n null\n )),\n (nextPrimaryChildren.flags |= 2)),\n (nextPrimaryChildren.return = workInProgress),\n (nextProps.return = workInProgress),\n (nextProps.sibling = nextPrimaryChildren),\n (workInProgress.child = nextProps),\n bailoutOffscreenComponent(null, nextProps),\n (nextProps = workInProgress.child),\n (nextPrimaryChildren = current.child.memoizedState),\n null === nextPrimaryChildren\n ? (nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes))\n : ((showFallback = nextPrimaryChildren.cachePool),\n null !== showFallback\n ? ((prevState = CacheContext._currentValue),\n (showFallback =\n showFallback.parent !== prevState\n ? { parent: prevState, pool: prevState }\n : showFallback))\n : (showFallback = getSuspendedCache()),\n (nextPrimaryChildren = {\n baseLanes: nextPrimaryChildren.baseLanes | renderLanes,\n cachePool: showFallback\n })),\n (nextProps.memoizedState = nextPrimaryChildren),\n (nextProps.childLanes = getRemainingWorkInPrimaryTree(\n current,\n JSCompiler_temp,\n renderLanes\n )),\n (workInProgress.memoizedState = SUSPENDED_MARKER),\n bailoutOffscreenComponent(current.child, nextProps)\n );\n pushPrimaryTreeSuspenseHandler(workInProgress);\n renderLanes = current.child;\n current = renderLanes.sibling;\n renderLanes = createWorkInProgress(renderLanes, {\n mode: \"visible\",\n children: nextProps.children\n });\n renderLanes.return = workInProgress;\n renderLanes.sibling = null;\n null !== current &&\n ((JSCompiler_temp = workInProgress.deletions),\n null === JSCompiler_temp\n ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16))\n : JSCompiler_temp.push(current));\n workInProgress.child = renderLanes;\n workInProgress.memoizedState = null;\n return renderLanes;\n}\nfunction mountSuspensePrimaryChildren(workInProgress, primaryChildren) {\n primaryChildren = mountWorkInProgressOffscreenFiber(\n { mode: \"visible\", children: primaryChildren },\n workInProgress.mode\n );\n primaryChildren.return = workInProgress;\n return (workInProgress.child = primaryChildren);\n}\nfunction mountWorkInProgressOffscreenFiber(offscreenProps, mode) {\n offscreenProps = createFiberImplClass(22, offscreenProps, null, mode);\n offscreenProps.lanes = 0;\n return offscreenProps;\n}\nfunction retrySuspenseComponentWithoutHydrating(\n current,\n workInProgress,\n renderLanes\n) {\n reconcileChildFibers(workInProgress, current.child, null, renderLanes);\n current = mountSuspensePrimaryChildren(\n workInProgress,\n workInProgress.pendingProps.children\n );\n current.flags |= 2;\n workInProgress.memoizedState = null;\n return current;\n}\nfunction scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) {\n fiber.lanes |= renderLanes;\n var alternate = fiber.alternate;\n null !== alternate && (alternate.lanes |= renderLanes);\n scheduleContextWorkOnParentPath(fiber.return, renderLanes, propagationRoot);\n}\nfunction initSuspenseListRenderState(\n workInProgress,\n isBackwards,\n tail,\n lastContentRow,\n tailMode,\n treeForkCount\n) {\n var renderState = workInProgress.memoizedState;\n null === renderState\n ? (workInProgress.memoizedState = {\n isBackwards: isBackwards,\n rendering: null,\n renderingStartTime: 0,\n last: lastContentRow,\n tail: tail,\n tailMode: tailMode,\n treeForkCount: treeForkCount\n })\n : ((renderState.isBackwards = isBackwards),\n (renderState.rendering = null),\n (renderState.renderingStartTime = 0),\n (renderState.last = lastContentRow),\n (renderState.tail = tail),\n (renderState.tailMode = tailMode),\n (renderState.treeForkCount = treeForkCount));\n}\nfunction updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps,\n revealOrder = nextProps.revealOrder,\n tailMode = nextProps.tail;\n nextProps = nextProps.children;\n var suspenseContext = suspenseStackCursor.current,\n shouldForceFallback = 0 !== (suspenseContext & 2);\n shouldForceFallback\n ? ((suspenseContext = (suspenseContext & 1) | 2),\n (workInProgress.flags |= 128))\n : (suspenseContext &= 1);\n push(suspenseStackCursor, suspenseContext);\n reconcileChildren(current, workInProgress, nextProps, renderLanes);\n nextProps = isHydrating ? treeForkCount : 0;\n if (!shouldForceFallback && null !== current && 0 !== (current.flags & 128))\n a: for (current = workInProgress.child; null !== current; ) {\n if (13 === current.tag)\n null !== current.memoizedState &&\n scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress);\n else if (19 === current.tag)\n scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress);\n else if (null !== current.child) {\n current.child.return = current;\n current = current.child;\n continue;\n }\n if (current === workInProgress) break a;\n for (; null === current.sibling; ) {\n if (null === current.return || current.return === workInProgress)\n break a;\n current = current.return;\n }\n current.sibling.return = current.return;\n current = current.sibling;\n }\n switch (revealOrder) {\n case \"forwards\":\n renderLanes = workInProgress.child;\n for (revealOrder = null; null !== renderLanes; )\n (current = renderLanes.alternate),\n null !== current &&\n null === findFirstSuspended(current) &&\n (revealOrder = renderLanes),\n (renderLanes = renderLanes.sibling);\n renderLanes = revealOrder;\n null === renderLanes\n ? ((revealOrder = workInProgress.child), (workInProgress.child = null))\n : ((revealOrder = renderLanes.sibling), (renderLanes.sibling = null));\n initSuspenseListRenderState(\n workInProgress,\n !1,\n revealOrder,\n renderLanes,\n tailMode,\n nextProps\n );\n break;\n case \"backwards\":\n case \"unstable_legacy-backwards\":\n renderLanes = null;\n revealOrder = workInProgress.child;\n for (workInProgress.child = null; null !== revealOrder; ) {\n current = revealOrder.alternate;\n if (null !== current && null === findFirstSuspended(current)) {\n workInProgress.child = revealOrder;\n break;\n }\n current = revealOrder.sibling;\n revealOrder.sibling = renderLanes;\n renderLanes = revealOrder;\n revealOrder = current;\n }\n initSuspenseListRenderState(\n workInProgress,\n !0,\n renderLanes,\n null,\n tailMode,\n nextProps\n );\n break;\n case \"together\":\n initSuspenseListRenderState(\n workInProgress,\n !1,\n null,\n null,\n void 0,\n nextProps\n );\n break;\n default:\n workInProgress.memoizedState = null;\n }\n return workInProgress.child;\n}\nfunction bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) {\n null !== current && (workInProgress.dependencies = current.dependencies);\n workInProgressRootSkippedLanes |= workInProgress.lanes;\n if (0 === (renderLanes & workInProgress.childLanes))\n if (null !== current) {\n if (\n (propagateParentContextChanges(\n current,\n workInProgress,\n renderLanes,\n !1\n ),\n 0 === (renderLanes & workInProgress.childLanes))\n )\n return null;\n } else return null;\n if (null !== current && workInProgress.child !== current.child)\n throw Error(formatProdErrorMessage(153));\n if (null !== workInProgress.child) {\n current = workInProgress.child;\n renderLanes = createWorkInProgress(current, current.pendingProps);\n workInProgress.child = renderLanes;\n for (renderLanes.return = workInProgress; null !== current.sibling; )\n (current = current.sibling),\n (renderLanes = renderLanes.sibling =\n createWorkInProgress(current, current.pendingProps)),\n (renderLanes.return = workInProgress);\n renderLanes.sibling = null;\n }\n return workInProgress.child;\n}\nfunction checkScheduledUpdateOrContext(current, renderLanes) {\n if (0 !== (current.lanes & renderLanes)) return !0;\n current = current.dependencies;\n return null !== current && checkIfContextChanged(current) ? !0 : !1;\n}\nfunction attemptEarlyBailoutIfNoScheduledUpdate(\n current,\n workInProgress,\n renderLanes\n) {\n switch (workInProgress.tag) {\n case 3:\n pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n pushProvider(workInProgress, CacheContext, current.memoizedState.cache);\n resetHydrationState();\n break;\n case 27:\n case 5:\n pushHostContext(workInProgress);\n break;\n case 4:\n pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n break;\n case 10:\n pushProvider(\n workInProgress,\n workInProgress.type,\n workInProgress.memoizedProps.value\n );\n break;\n case 31:\n if (null !== workInProgress.memoizedState)\n return (\n (workInProgress.flags |= 128),\n pushDehydratedActivitySuspenseHandler(workInProgress),\n null\n );\n break;\n case 13:\n var state$102 = workInProgress.memoizedState;\n if (null !== state$102) {\n if (null !== state$102.dehydrated)\n return (\n pushPrimaryTreeSuspenseHandler(workInProgress),\n (workInProgress.flags |= 128),\n null\n );\n if (0 !== (renderLanes & workInProgress.child.childLanes))\n return updateSuspenseComponent(current, workInProgress, renderLanes);\n pushPrimaryTreeSuspenseHandler(workInProgress);\n current = bailoutOnAlreadyFinishedWork(\n current,\n workInProgress,\n renderLanes\n );\n return null !== current ? current.sibling : null;\n }\n pushPrimaryTreeSuspenseHandler(workInProgress);\n break;\n case 19:\n var didSuspendBefore = 0 !== (current.flags & 128);\n state$102 = 0 !== (renderLanes & workInProgress.childLanes);\n state$102 ||\n (propagateParentContextChanges(\n current,\n workInProgress,\n renderLanes,\n !1\n ),\n (state$102 = 0 !== (renderLanes & workInProgress.childLanes)));\n if (didSuspendBefore) {\n if (state$102)\n return updateSuspenseListComponent(\n current,\n workInProgress,\n renderLanes\n );\n workInProgress.flags |= 128;\n }\n didSuspendBefore = workInProgress.memoizedState;\n null !== didSuspendBefore &&\n ((didSuspendBefore.rendering = null),\n (didSuspendBefore.tail = null),\n (didSuspendBefore.lastEffect = null));\n push(suspenseStackCursor, suspenseStackCursor.current);\n if (state$102) break;\n else return null;\n case 22:\n return (\n (workInProgress.lanes = 0),\n updateOffscreenComponent(\n current,\n workInProgress,\n renderLanes,\n workInProgress.pendingProps\n )\n );\n case 24:\n pushProvider(workInProgress, CacheContext, current.memoizedState.cache);\n }\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n}\nfunction beginWork(current, workInProgress, renderLanes) {\n if (null !== current)\n if (current.memoizedProps !== workInProgress.pendingProps)\n didReceiveUpdate = !0;\n else {\n if (\n !checkScheduledUpdateOrContext(current, renderLanes) &&\n 0 === (workInProgress.flags & 128)\n )\n return (\n (didReceiveUpdate = !1),\n attemptEarlyBailoutIfNoScheduledUpdate(\n current,\n workInProgress,\n renderLanes\n )\n );\n didReceiveUpdate = 0 !== (current.flags & 131072) ? !0 : !1;\n }\n else\n (didReceiveUpdate = !1),\n isHydrating &&\n 0 !== (workInProgress.flags & 1048576) &&\n pushTreeId(workInProgress, treeForkCount, workInProgress.index);\n workInProgress.lanes = 0;\n switch (workInProgress.tag) {\n case 16:\n a: {\n var props = workInProgress.pendingProps;\n current = resolveLazy(workInProgress.elementType);\n workInProgress.type = current;\n if (\"function\" === typeof current)\n shouldConstruct(current)\n ? ((props = resolveClassComponentProps(current, props)),\n (workInProgress.tag = 1),\n (workInProgress = updateClassComponent(\n null,\n workInProgress,\n current,\n props,\n renderLanes\n )))\n : ((workInProgress.tag = 0),\n (workInProgress = updateFunctionComponent(\n null,\n workInProgress,\n current,\n props,\n renderLanes\n )));\n else {\n if (void 0 !== current && null !== current) {\n var $$typeof = current.$$typeof;\n if ($$typeof === REACT_FORWARD_REF_TYPE) {\n workInProgress.tag = 11;\n workInProgress = updateForwardRef(\n null,\n workInProgress,\n current,\n props,\n renderLanes\n );\n break a;\n } else if ($$typeof === REACT_MEMO_TYPE) {\n workInProgress.tag = 14;\n workInProgress = updateMemoComponent(\n null,\n workInProgress,\n current,\n props,\n renderLanes\n );\n break a;\n }\n }\n workInProgress = getComponentNameFromType(current) || current;\n throw Error(formatProdErrorMessage(306, workInProgress, \"\"));\n }\n }\n return workInProgress;\n case 0:\n return updateFunctionComponent(\n current,\n workInProgress,\n workInProgress.type,\n workInProgress.pendingProps,\n renderLanes\n );\n case 1:\n return (\n (props = workInProgress.type),\n ($$typeof = resolveClassComponentProps(\n props,\n workInProgress.pendingProps\n )),\n updateClassComponent(\n current,\n workInProgress,\n props,\n $$typeof,\n renderLanes\n )\n );\n case 3:\n a: {\n pushHostContainer(\n workInProgress,\n workInProgress.stateNode.containerInfo\n );\n if (null === current) throw Error(formatProdErrorMessage(387));\n props = workInProgress.pendingProps;\n var prevState = workInProgress.memoizedState;\n $$typeof = prevState.element;\n cloneUpdateQueue(current, workInProgress);\n processUpdateQueue(workInProgress, props, null, renderLanes);\n var nextState = workInProgress.memoizedState;\n props = nextState.cache;\n pushProvider(workInProgress, CacheContext, props);\n props !== prevState.cache &&\n propagateContextChanges(\n workInProgress,\n [CacheContext],\n renderLanes,\n !0\n );\n suspendIfUpdateReadFromEntangledAsyncAction();\n props = nextState.element;\n if (prevState.isDehydrated)\n if (\n ((prevState = {\n element: props,\n isDehydrated: !1,\n cache: nextState.cache\n }),\n (workInProgress.updateQueue.baseState = prevState),\n (workInProgress.memoizedState = prevState),\n workInProgress.flags & 256)\n ) {\n workInProgress = mountHostRootWithoutHydrating(\n current,\n workInProgress,\n props,\n renderLanes\n );\n break a;\n } else if (props !== $$typeof) {\n $$typeof = createCapturedValueAtFiber(\n Error(formatProdErrorMessage(424)),\n workInProgress\n );\n queueHydrationError($$typeof);\n workInProgress = mountHostRootWithoutHydrating(\n current,\n workInProgress,\n props,\n renderLanes\n );\n break a;\n } else {\n current = workInProgress.stateNode.containerInfo;\n switch (current.nodeType) {\n case 9:\n current = current.body;\n break;\n default:\n current =\n \"HTML\" === current.nodeName\n ? current.ownerDocument.body\n : current;\n }\n nextHydratableInstance = getNextHydratable(current.firstChild);\n hydrationParentFiber = workInProgress;\n isHydrating = !0;\n hydrationErrors = null;\n rootOrSingletonContext = !0;\n renderLanes = mountChildFibers(\n workInProgress,\n null,\n props,\n renderLanes\n );\n for (workInProgress.child = renderLanes; renderLanes; )\n (renderLanes.flags = (renderLanes.flags & -3) | 4096),\n (renderLanes = renderLanes.sibling);\n }\n else {\n resetHydrationState();\n if (props === $$typeof) {\n workInProgress = bailoutOnAlreadyFinishedWork(\n current,\n workInProgress,\n renderLanes\n );\n break a;\n }\n reconcileChildren(current, workInProgress, props, renderLanes);\n }\n workInProgress = workInProgress.child;\n }\n return workInProgress;\n case 26:\n return (\n markRef(current, workInProgress),\n null === current\n ? (renderLanes = getResource(\n workInProgress.type,\n null,\n workInProgress.pendingProps,\n null\n ))\n ? (workInProgress.memoizedState = renderLanes)\n : isHydrating ||\n ((renderLanes = workInProgress.type),\n (current = workInProgress.pendingProps),\n (props = getOwnerDocumentFromRootContainer(\n rootInstanceStackCursor.current\n ).createElement(renderLanes)),\n (props[internalInstanceKey] = workInProgress),\n (props[internalPropsKey] = current),\n setInitialProperties(props, renderLanes, current),\n markNodeAsHoistable(props),\n (workInProgress.stateNode = props))\n : (workInProgress.memoizedState = getResource(\n workInProgress.type,\n current.memoizedProps,\n workInProgress.pendingProps,\n current.memoizedState\n )),\n null\n );\n case 27:\n return (\n pushHostContext(workInProgress),\n null === current &&\n isHydrating &&\n ((props = workInProgress.stateNode =\n resolveSingletonInstance(\n workInProgress.type,\n workInProgress.pendingProps,\n rootInstanceStackCursor.current\n )),\n (hydrationParentFiber = workInProgress),\n (rootOrSingletonContext = !0),\n ($$typeof = nextHydratableInstance),\n isSingletonScope(workInProgress.type)\n ? ((previousHydratableOnEnteringScopedSingleton = $$typeof),\n (nextHydratableInstance = getNextHydratable(props.firstChild)))\n : (nextHydratableInstance = $$typeof)),\n reconcileChildren(\n current,\n workInProgress,\n workInProgress.pendingProps.children,\n renderLanes\n ),\n markRef(current, workInProgress),\n null === current && (workInProgress.flags |= 4194304),\n workInProgress.child\n );\n case 5:\n if (null === current && isHydrating) {\n if (($$typeof = props = nextHydratableInstance))\n (props = canHydrateInstance(\n props,\n workInProgress.type,\n workInProgress.pendingProps,\n rootOrSingletonContext\n )),\n null !== props\n ? ((workInProgress.stateNode = props),\n (hydrationParentFiber = workInProgress),\n (nextHydratableInstance = getNextHydratable(props.firstChild)),\n (rootOrSingletonContext = !1),\n ($$typeof = !0))\n : ($$typeof = !1);\n $$typeof || throwOnHydrationMismatch(workInProgress);\n }\n pushHostContext(workInProgress);\n $$typeof = workInProgress.type;\n prevState = workInProgress.pendingProps;\n nextState = null !== current ? current.memoizedProps : null;\n props = prevState.children;\n shouldSetTextContent($$typeof, prevState)\n ? (props = null)\n : null !== nextState &&\n shouldSetTextContent($$typeof, nextState) &&\n (workInProgress.flags |= 32);\n null !== workInProgress.memoizedState &&\n (($$typeof = renderWithHooks(\n current,\n workInProgress,\n TransitionAwareHostComponent,\n null,\n null,\n renderLanes\n )),\n (HostTransitionContext._currentValue = $$typeof));\n markRef(current, workInProgress);\n reconcileChildren(current, workInProgress, props, renderLanes);\n return workInProgress.child;\n case 6:\n if (null === current && isHydrating) {\n if ((current = renderLanes = nextHydratableInstance))\n (renderLanes = canHydrateTextInstance(\n renderLanes,\n workInProgress.pendingProps,\n rootOrSingletonContext\n )),\n null !== renderLanes\n ? ((workInProgress.stateNode = renderLanes),\n (hydrationParentFiber = workInProgress),\n (nextHydratableInstance = null),\n (current = !0))\n : (current = !1);\n current || throwOnHydrationMismatch(workInProgress);\n }\n return null;\n case 13:\n return updateSuspenseComponent(current, workInProgress, renderLanes);\n case 4:\n return (\n pushHostContainer(\n workInProgress,\n workInProgress.stateNode.containerInfo\n ),\n (props = workInProgress.pendingProps),\n null === current\n ? (workInProgress.child = reconcileChildFibers(\n workInProgress,\n null,\n props,\n renderLanes\n ))\n : reconcileChildren(current, workInProgress, props, renderLanes),\n workInProgress.child\n );\n case 11:\n return updateForwardRef(\n current,\n workInProgress,\n workInProgress.type,\n workInProgress.pendingProps,\n renderLanes\n );\n case 7:\n return (\n reconcileChildren(\n current,\n workInProgress,\n workInProgress.pendingProps,\n renderLanes\n ),\n workInProgress.child\n );\n case 8:\n return (\n reconcileChildren(\n current,\n workInProgress,\n workInProgress.pendingProps.children,\n renderLanes\n ),\n workInProgress.child\n );\n case 12:\n return (\n reconcileChildren(\n current,\n workInProgress,\n workInProgress.pendingProps.children,\n renderLanes\n ),\n workInProgress.child\n );\n case 10:\n return (\n (props = workInProgress.pendingProps),\n pushProvider(workInProgress, workInProgress.type, props.value),\n reconcileChildren(current, workInProgress, props.children, renderLanes),\n workInProgress.child\n );\n case 9:\n return (\n ($$typeof = workInProgress.type._context),\n (props = workInProgress.pendingProps.children),\n prepareToReadContext(workInProgress),\n ($$typeof = readContext($$typeof)),\n (props = props($$typeof)),\n (workInProgress.flags |= 1),\n reconcileChildren(current, workInProgress, props, renderLanes),\n workInProgress.child\n );\n case 14:\n return updateMemoComponent(\n current,\n workInProgress,\n workInProgress.type,\n workInProgress.pendingProps,\n renderLanes\n );\n case 15:\n return updateSimpleMemoComponent(\n current,\n workInProgress,\n workInProgress.type,\n workInProgress.pendingProps,\n renderLanes\n );\n case 19:\n return updateSuspenseListComponent(current, workInProgress, renderLanes);\n case 31:\n return updateActivityComponent(current, workInProgress, renderLanes);\n case 22:\n return updateOffscreenComponent(\n current,\n workInProgress,\n renderLanes,\n workInProgress.pendingProps\n );\n case 24:\n return (\n prepareToReadContext(workInProgress),\n (props = readContext(CacheContext)),\n null === current\n ? (($$typeof = peekCacheFromPool()),\n null === $$typeof &&\n (($$typeof = workInProgressRoot),\n (prevState = createCache()),\n ($$typeof.pooledCache = prevState),\n prevState.refCount++,\n null !== prevState && ($$typeof.pooledCacheLanes |= renderLanes),\n ($$typeof = prevState)),\n (workInProgress.memoizedState = { parent: props, cache: $$typeof }),\n initializeUpdateQueue(workInProgress),\n pushProvider(workInProgress, CacheContext, $$typeof))\n : (0 !== (current.lanes & renderLanes) &&\n (cloneUpdateQueue(current, workInProgress),\n processUpdateQueue(workInProgress, null, null, renderLanes),\n suspendIfUpdateReadFromEntangledAsyncAction()),\n ($$typeof = current.memoizedState),\n (prevState = workInProgress.memoizedState),\n $$typeof.parent !== props\n ? (($$typeof = { parent: props, cache: props }),\n (workInProgress.memoizedState = $$typeof),\n 0 === workInProgress.lanes &&\n (workInProgress.memoizedState =\n workInProgress.updateQueue.baseState =\n $$typeof),\n pushProvider(workInProgress, CacheContext, props))\n : ((props = prevState.cache),\n pushProvider(workInProgress, CacheContext, props),\n props !== $$typeof.cache &&\n propagateContextChanges(\n workInProgress,\n [CacheContext],\n renderLanes,\n !0\n ))),\n reconcileChildren(\n current,\n workInProgress,\n workInProgress.pendingProps.children,\n renderLanes\n ),\n workInProgress.child\n );\n case 29:\n throw workInProgress.pendingProps;\n }\n throw Error(formatProdErrorMessage(156, workInProgress.tag));\n}\nfunction markUpdate(workInProgress) {\n workInProgress.flags |= 4;\n}\nfunction preloadInstanceAndSuspendIfNeeded(\n workInProgress,\n type,\n oldProps,\n newProps,\n renderLanes\n) {\n if ((type = 0 !== (workInProgress.mode & 32))) type = !1;\n if (type) {\n if (\n ((workInProgress.flags |= 16777216),\n (renderLanes & 335544128) === renderLanes)\n )\n if (workInProgress.stateNode.complete) workInProgress.flags |= 8192;\n else if (shouldRemainOnPreviousScreen()) workInProgress.flags |= 8192;\n else\n throw (\n ((suspendedThenable = noopSuspenseyCommitThenable),\n SuspenseyCommitException)\n );\n } else workInProgress.flags &= -16777217;\n}\nfunction preloadResourceAndSuspendIfNeeded(workInProgress, resource) {\n if (\"stylesheet\" !== resource.type || 0 !== (resource.state.loading & 4))\n workInProgress.flags &= -16777217;\n else if (((workInProgress.flags |= 16777216), !preloadResource(resource)))\n if (shouldRemainOnPreviousScreen()) workInProgress.flags |= 8192;\n else\n throw (\n ((suspendedThenable = noopSuspenseyCommitThenable),\n SuspenseyCommitException)\n );\n}\nfunction scheduleRetryEffect(workInProgress, retryQueue) {\n null !== retryQueue && (workInProgress.flags |= 4);\n workInProgress.flags & 16384 &&\n ((retryQueue =\n 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912),\n (workInProgress.lanes |= retryQueue),\n (workInProgressSuspendedRetryLanes |= retryQueue));\n}\nfunction cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {\n if (!isHydrating)\n switch (renderState.tailMode) {\n case \"hidden\":\n hasRenderedATailFallback = renderState.tail;\n for (var lastTailNode = null; null !== hasRenderedATailFallback; )\n null !== hasRenderedATailFallback.alternate &&\n (lastTailNode = hasRenderedATailFallback),\n (hasRenderedATailFallback = hasRenderedATailFallback.sibling);\n null === lastTailNode\n ? (renderState.tail = null)\n : (lastTailNode.sibling = null);\n break;\n case \"collapsed\":\n lastTailNode = renderState.tail;\n for (var lastTailNode$106 = null; null !== lastTailNode; )\n null !== lastTailNode.alternate && (lastTailNode$106 = lastTailNode),\n (lastTailNode = lastTailNode.sibling);\n null === lastTailNode$106\n ? hasRenderedATailFallback || null === renderState.tail\n ? (renderState.tail = null)\n : (renderState.tail.sibling = null)\n : (lastTailNode$106.sibling = null);\n }\n}\nfunction bubbleProperties(completedWork) {\n var didBailout =\n null !== completedWork.alternate &&\n completedWork.alternate.child === completedWork.child,\n newChildLanes = 0,\n subtreeFlags = 0;\n if (didBailout)\n for (var child$107 = completedWork.child; null !== child$107; )\n (newChildLanes |= child$107.lanes | child$107.childLanes),\n (subtreeFlags |= child$107.subtreeFlags & 65011712),\n (subtreeFlags |= child$107.flags & 65011712),\n (child$107.return = completedWork),\n (child$107 = child$107.sibling);\n else\n for (child$107 = completedWork.child; null !== child$107; )\n (newChildLanes |= child$107.lanes | child$107.childLanes),\n (subtreeFlags |= child$107.subtreeFlags),\n (subtreeFlags |= child$107.flags),\n (child$107.return = completedWork),\n (child$107 = child$107.sibling);\n completedWork.subtreeFlags |= subtreeFlags;\n completedWork.childLanes = newChildLanes;\n return didBailout;\n}\nfunction completeWork(current, workInProgress, renderLanes) {\n var newProps = workInProgress.pendingProps;\n popTreeContext(workInProgress);\n switch (workInProgress.tag) {\n case 16:\n case 15:\n case 0:\n case 11:\n case 7:\n case 8:\n case 12:\n case 9:\n case 14:\n return bubbleProperties(workInProgress), null;\n case 1:\n return bubbleProperties(workInProgress), null;\n case 3:\n renderLanes = workInProgress.stateNode;\n newProps = null;\n null !== current && (newProps = current.memoizedState.cache);\n workInProgress.memoizedState.cache !== newProps &&\n (workInProgress.flags |= 2048);\n popProvider(CacheContext);\n popHostContainer();\n renderLanes.pendingContext &&\n ((renderLanes.context = renderLanes.pendingContext),\n (renderLanes.pendingContext = null));\n if (null === current || null === current.child)\n popHydrationState(workInProgress)\n ? markUpdate(workInProgress)\n : null === current ||\n (current.memoizedState.isDehydrated &&\n 0 === (workInProgress.flags & 256)) ||\n ((workInProgress.flags |= 1024),\n upgradeHydrationErrorsToRecoverable());\n bubbleProperties(workInProgress);\n return null;\n case 26:\n var type = workInProgress.type,\n nextResource = workInProgress.memoizedState;\n null === current\n ? (markUpdate(workInProgress),\n null !== nextResource\n ? (bubbleProperties(workInProgress),\n preloadResourceAndSuspendIfNeeded(workInProgress, nextResource))\n : (bubbleProperties(workInProgress),\n preloadInstanceAndSuspendIfNeeded(\n workInProgress,\n type,\n null,\n newProps,\n renderLanes\n )))\n : nextResource\n ? nextResource !== current.memoizedState\n ? (markUpdate(workInProgress),\n bubbleProperties(workInProgress),\n preloadResourceAndSuspendIfNeeded(workInProgress, nextResource))\n : (bubbleProperties(workInProgress),\n (workInProgress.flags &= -16777217))\n : ((current = current.memoizedProps),\n current !== newProps && markUpdate(workInProgress),\n bubbleProperties(workInProgress),\n preloadInstanceAndSuspendIfNeeded(\n workInProgress,\n type,\n current,\n newProps,\n renderLanes\n ));\n return null;\n case 27:\n popHostContext(workInProgress);\n renderLanes = rootInstanceStackCursor.current;\n type = workInProgress.type;\n if (null !== current && null != workInProgress.stateNode)\n current.memoizedProps !== newProps && markUpdate(workInProgress);\n else {\n if (!newProps) {\n if (null === workInProgress.stateNode)\n throw Error(formatProdErrorMessage(166));\n bubbleProperties(workInProgress);\n return null;\n }\n current = contextStackCursor.current;\n popHydrationState(workInProgress)\n ? prepareToHydrateHostInstance(workInProgress, current)\n : ((current = resolveSingletonInstance(type, newProps, renderLanes)),\n (workInProgress.stateNode = current),\n markUpdate(workInProgress));\n }\n bubbleProperties(workInProgress);\n return null;\n case 5:\n popHostContext(workInProgress);\n type = workInProgress.type;\n if (null !== current && null != workInProgress.stateNode)\n current.memoizedProps !== newProps && markUpdate(workInProgress);\n else {\n if (!newProps) {\n if (null === workInProgress.stateNode)\n throw Error(formatProdErrorMessage(166));\n bubbleProperties(workInProgress);\n return null;\n }\n nextResource = contextStackCursor.current;\n if (popHydrationState(workInProgress))\n prepareToHydrateHostInstance(workInProgress, nextResource);\n else {\n var ownerDocument = getOwnerDocumentFromRootContainer(\n rootInstanceStackCursor.current\n );\n switch (nextResource) {\n case 1:\n nextResource = ownerDocument.createElementNS(\n \"http://www.w3.org/2000/svg\",\n type\n );\n break;\n case 2:\n nextResource = ownerDocument.createElementNS(\n \"http://www.w3.org/1998/Math/MathML\",\n type\n );\n break;\n default:\n switch (type) {\n case \"svg\":\n nextResource = ownerDocument.createElementNS(\n \"http://www.w3.org/2000/svg\",\n type\n );\n break;\n case \"math\":\n nextResource = ownerDocument.createElementNS(\n \"http://www.w3.org/1998/Math/MathML\",\n type\n );\n break;\n case \"script\":\n nextResource = ownerDocument.createElement(\"div\");\n nextResource.innerHTML = \"<script>\\x3c/script>\";\n nextResource = nextResource.removeChild(\n nextResource.firstChild\n );\n break;\n case \"select\":\n nextResource =\n \"string\" === typeof newProps.is\n ? ownerDocument.createElement(\"select\", {\n is: newProps.is\n })\n : ownerDocument.createElement(\"select\");\n newProps.multiple\n ? (nextResource.multiple = !0)\n : newProps.size && (nextResource.size = newProps.size);\n break;\n default:\n nextResource =\n \"string\" === typeof newProps.is\n ? ownerDocument.createElement(type, { is: newProps.is })\n : ownerDocument.createElement(type);\n }\n }\n nextResource[internalInstanceKey] = workInProgress;\n nextResource[internalPropsKey] = newProps;\n a: for (\n ownerDocument = workInProgress.child;\n null !== ownerDocument;\n\n ) {\n if (5 === ownerDocument.tag || 6 === ownerDocument.tag)\n nextResource.appendChild(ownerDocument.stateNode);\n else if (\n 4 !== ownerDocument.tag &&\n 27 !== ownerDocument.tag &&\n null !== ownerDocument.child\n ) {\n ownerDocument.child.return = ownerDocument;\n ownerDocument = ownerDocument.child;\n continue;\n }\n if (ownerDocument === workInProgress) break a;\n for (; null === ownerDocument.sibling; ) {\n if (\n null === ownerDocument.return ||\n ownerDocument.return === workInProgress\n )\n break a;\n ownerDocument = ownerDocument.return;\n }\n ownerDocument.sibling.return = ownerDocument.return;\n ownerDocument = ownerDocument.sibling;\n }\n workInProgress.stateNode = nextResource;\n a: switch (\n (setInitialProperties(nextResource, type, newProps), type)\n ) {\n case \"button\":\n case \"input\":\n case \"select\":\n case \"textarea\":\n newProps = !!newProps.autoFocus;\n break a;\n case \"img\":\n newProps = !0;\n break a;\n default:\n newProps = !1;\n }\n newProps && markUpdate(workInProgress);\n }\n }\n bubbleProperties(workInProgress);\n preloadInstanceAndSuspendIfNeeded(\n workInProgress,\n workInProgress.type,\n null === current ? null : current.memoizedProps,\n workInProgress.pendingProps,\n renderLanes\n );\n return null;\n case 6:\n if (current && null != workInProgress.stateNode)\n current.memoizedProps !== newProps && markUpdate(workInProgress);\n else {\n if (\"string\" !== typeof newProps && null === workInProgress.stateNode)\n throw Error(formatProdErrorMessage(166));\n current = rootInstanceStackCursor.current;\n if (popHydrationState(workInProgress)) {\n current = workInProgress.stateNode;\n renderLanes = workInProgress.memoizedProps;\n newProps = null;\n type = hydrationParentFiber;\n if (null !== type)\n switch (type.tag) {\n case 27:\n case 5:\n newProps = type.memoizedProps;\n }\n current[internalInstanceKey] = workInProgress;\n current =\n current.nodeValue === renderLanes ||\n (null !== newProps && !0 === newProps.suppressHydrationWarning) ||\n checkForUnmatchedText(current.nodeValue, renderLanes)\n ? !0\n : !1;\n current || throwOnHydrationMismatch(workInProgress, !0);\n } else\n (current =\n getOwnerDocumentFromRootContainer(current).createTextNode(\n newProps\n )),\n (current[internalInstanceKey] = workInProgress),\n (workInProgress.stateNode = current);\n }\n bubbleProperties(workInProgress);\n return null;\n case 31:\n renderLanes = workInProgress.memoizedState;\n if (null === current || null !== current.memoizedState) {\n newProps = popHydrationState(workInProgress);\n if (null !== renderLanes) {\n if (null === current) {\n if (!newProps) throw Error(formatProdErrorMessage(318));\n current = workInProgress.memoizedState;\n current = null !== current ? current.dehydrated : null;\n if (!current) throw Error(formatProdErrorMessage(557));\n current[internalInstanceKey] = workInProgress;\n } else\n resetHydrationState(),\n 0 === (workInProgress.flags & 128) &&\n (workInProgress.memoizedState = null),\n (workInProgress.flags |= 4);\n bubbleProperties(workInProgress);\n current = !1;\n } else\n (renderLanes = upgradeHydrationErrorsToRecoverable()),\n null !== current &&\n null !== current.memoizedState &&\n (current.memoizedState.hydrationErrors = renderLanes),\n (current = !0);\n if (!current) {\n if (workInProgress.flags & 256)\n return popSuspenseHandler(workInProgress), workInProgress;\n popSuspenseHandler(workInProgress);\n return null;\n }\n if (0 !== (workInProgress.flags & 128))\n throw Error(formatProdErrorMessage(558));\n }\n bubbleProperties(workInProgress);\n return null;\n case 13:\n newProps = workInProgress.memoizedState;\n if (\n null === current ||\n (null !== current.memoizedState &&\n null !== current.memoizedState.dehydrated)\n ) {\n type = popHydrationState(workInProgress);\n if (null !== newProps && null !== newProps.dehydrated) {\n if (null === current) {\n if (!type) throw Error(formatProdErrorMessage(318));\n type = workInProgress.memoizedState;\n type = null !== type ? type.dehydrated : null;\n if (!type) throw Error(formatProdErrorMessage(317));\n type[internalInstanceKey] = workInProgress;\n } else\n resetHydrationState(),\n 0 === (workInProgress.flags & 128) &&\n (workInProgress.memoizedState = null),\n (workInProgress.flags |= 4);\n bubbleProperties(workInProgress);\n type = !1;\n } else\n (type = upgradeHydrationErrorsToRecoverable()),\n null !== current &&\n null !== current.memoizedState &&\n (current.memoizedState.hydrationErrors = type),\n (type = !0);\n if (!type) {\n if (workInProgress.flags & 256)\n return popSuspenseHandler(workInProgress), workInProgress;\n popSuspenseHandler(workInProgress);\n return null;\n }\n }\n popSuspenseHandler(workInProgress);\n if (0 !== (workInProgress.flags & 128))\n return (workInProgress.lanes = renderLanes), workInProgress;\n renderLanes = null !== newProps;\n current = null !== current && null !== current.memoizedState;\n renderLanes &&\n ((newProps = workInProgress.child),\n (type = null),\n null !== newProps.alternate &&\n null !== newProps.alternate.memoizedState &&\n null !== newProps.alternate.memoizedState.cachePool &&\n (type = newProps.alternate.memoizedState.cachePool.pool),\n (nextResource = null),\n null !== newProps.memoizedState &&\n null !== newProps.memoizedState.cachePool &&\n (nextResource = newProps.memoizedState.cachePool.pool),\n nextResource !== type && (newProps.flags |= 2048));\n renderLanes !== current &&\n renderLanes &&\n (workInProgress.child.flags |= 8192);\n scheduleRetryEffect(workInProgress, workInProgress.updateQueue);\n bubbleProperties(workInProgress);\n return null;\n case 4:\n return (\n popHostContainer(),\n null === current &&\n listenToAllSupportedEvents(workInProgress.stateNode.containerInfo),\n bubbleProperties(workInProgress),\n null\n );\n case 10:\n return (\n popProvider(workInProgress.type), bubbleProperties(workInProgress), null\n );\n case 19:\n pop(suspenseStackCursor);\n newProps = workInProgress.memoizedState;\n if (null === newProps) return bubbleProperties(workInProgress), null;\n type = 0 !== (workInProgress.flags & 128);\n nextResource = newProps.rendering;\n if (null === nextResource)\n if (type) cutOffTailIfNeeded(newProps, !1);\n else {\n if (\n 0 !== workInProgressRootExitStatus ||\n (null !== current && 0 !== (current.flags & 128))\n )\n for (current = workInProgress.child; null !== current; ) {\n nextResource = findFirstSuspended(current);\n if (null !== nextResource) {\n workInProgress.flags |= 128;\n cutOffTailIfNeeded(newProps, !1);\n current = nextResource.updateQueue;\n workInProgress.updateQueue = current;\n scheduleRetryEffect(workInProgress, current);\n workInProgress.subtreeFlags = 0;\n current = renderLanes;\n for (renderLanes = workInProgress.child; null !== renderLanes; )\n resetWorkInProgress(renderLanes, current),\n (renderLanes = renderLanes.sibling);\n push(\n suspenseStackCursor,\n (suspenseStackCursor.current & 1) | 2\n );\n isHydrating &&\n pushTreeFork(workInProgress, newProps.treeForkCount);\n return workInProgress.child;\n }\n current = current.sibling;\n }\n null !== newProps.tail &&\n now() > workInProgressRootRenderTargetTime &&\n ((workInProgress.flags |= 128),\n (type = !0),\n cutOffTailIfNeeded(newProps, !1),\n (workInProgress.lanes = 4194304));\n }\n else {\n if (!type)\n if (\n ((current = findFirstSuspended(nextResource)), null !== current)\n ) {\n if (\n ((workInProgress.flags |= 128),\n (type = !0),\n (current = current.updateQueue),\n (workInProgress.updateQueue = current),\n scheduleRetryEffect(workInProgress, current),\n cutOffTailIfNeeded(newProps, !0),\n null === newProps.tail &&\n \"hidden\" === newProps.tailMode &&\n !nextResource.alternate &&\n !isHydrating)\n )\n return bubbleProperties(workInProgress), null;\n } else\n 2 * now() - newProps.renderingStartTime >\n workInProgressRootRenderTargetTime &&\n 536870912 !== renderLanes &&\n ((workInProgress.flags |= 128),\n (type = !0),\n cutOffTailIfNeeded(newProps, !1),\n (workInProgress.lanes = 4194304));\n newProps.isBackwards\n ? ((nextResource.sibling = workInProgress.child),\n (workInProgress.child = nextResource))\n : ((current = newProps.last),\n null !== current\n ? (current.sibling = nextResource)\n : (workInProgress.child = nextResource),\n (newProps.last = nextResource));\n }\n if (null !== newProps.tail)\n return (\n (current = newProps.tail),\n (newProps.rendering = current),\n (newProps.tail = current.sibling),\n (newProps.renderingStartTime = now()),\n (current.sibling = null),\n (renderLanes = suspenseStackCursor.current),\n push(\n suspenseStackCursor,\n type ? (renderLanes & 1) | 2 : renderLanes & 1\n ),\n isHydrating && pushTreeFork(workInProgress, newProps.treeForkCount),\n current\n );\n bubbleProperties(workInProgress);\n return null;\n case 22:\n case 23:\n return (\n popSuspenseHandler(workInProgress),\n popHiddenContext(),\n (newProps = null !== workInProgress.memoizedState),\n null !== current\n ? (null !== current.memoizedState) !== newProps &&\n (workInProgress.flags |= 8192)\n : newProps && (workInProgress.flags |= 8192),\n newProps\n ? 0 !== (renderLanes & 536870912) &&\n 0 === (workInProgress.flags & 128) &&\n (bubbleProperties(workInProgress),\n workInProgress.subtreeFlags & 6 && (workInProgress.flags |= 8192))\n : bubbleProperties(workInProgress),\n (renderLanes = workInProgress.updateQueue),\n null !== renderLanes &&\n scheduleRetryEffect(workInProgress, renderLanes.retryQueue),\n (renderLanes = null),\n null !== current &&\n null !== current.memoizedState &&\n null !== current.memoizedState.cachePool &&\n (renderLanes = current.memoizedState.cachePool.pool),\n (newProps = null),\n null !== workInProgress.memoizedState &&\n null !== workInProgress.memoizedState.cachePool &&\n (newProps = workInProgress.memoizedState.cachePool.pool),\n newProps !== renderLanes && (workInProgress.flags |= 2048),\n null !== current && pop(resumedCache),\n null\n );\n case 24:\n return (\n (renderLanes = null),\n null !== current && (renderLanes = current.memoizedState.cache),\n workInProgress.memoizedState.cache !== renderLanes &&\n (workInProgress.flags |= 2048),\n popProvider(CacheContext),\n bubbleProperties(workInProgress),\n null\n );\n case 25:\n return null;\n case 30:\n return null;\n }\n throw Error(formatProdErrorMessage(156, workInProgress.tag));\n}\nfunction unwindWork(current, workInProgress) {\n popTreeContext(workInProgress);\n switch (workInProgress.tag) {\n case 1:\n return (\n (current = workInProgress.flags),\n current & 65536\n ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)\n : null\n );\n case 3:\n return (\n popProvider(CacheContext),\n popHostContainer(),\n (current = workInProgress.flags),\n 0 !== (current & 65536) && 0 === (current & 128)\n ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)\n : null\n );\n case 26:\n case 27:\n case 5:\n return popHostContext(workInProgress), null;\n case 31:\n if (null !== workInProgress.memoizedState) {\n popSuspenseHandler(workInProgress);\n if (null === workInProgress.alternate)\n throw Error(formatProdErrorMessage(340));\n resetHydrationState();\n }\n current = workInProgress.flags;\n return current & 65536\n ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)\n : null;\n case 13:\n popSuspenseHandler(workInProgress);\n current = workInProgress.memoizedState;\n if (null !== current && null !== current.dehydrated) {\n if (null === workInProgress.alternate)\n throw Error(formatProdErrorMessage(340));\n resetHydrationState();\n }\n current = workInProgress.flags;\n return current & 65536\n ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)\n : null;\n case 19:\n return pop(suspenseStackCursor), null;\n case 4:\n return popHostContainer(), null;\n case 10:\n return popProvider(workInProgress.type), null;\n case 22:\n case 23:\n return (\n popSuspenseHandler(workInProgress),\n popHiddenContext(),\n null !== current && pop(resumedCache),\n (current = workInProgress.flags),\n current & 65536\n ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)\n : null\n );\n case 24:\n return popProvider(CacheContext), null;\n case 25:\n return null;\n default:\n return null;\n }\n}\nfunction unwindInterruptedWork(current, interruptedWork) {\n popTreeContext(interruptedWork);\n switch (interruptedWork.tag) {\n case 3:\n popProvider(CacheContext);\n popHostContainer();\n break;\n case 26:\n case 27:\n case 5:\n popHostContext(interruptedWork);\n break;\n case 4:\n popHostContainer();\n break;\n case 31:\n null !== interruptedWork.memoizedState &&\n popSuspenseHandler(interruptedWork);\n break;\n case 13:\n popSuspenseHandler(interruptedWork);\n break;\n case 19:\n pop(suspenseStackCursor);\n break;\n case 10:\n popProvider(interruptedWork.type);\n break;\n case 22:\n case 23:\n popSuspenseHandler(interruptedWork);\n popHiddenContext();\n null !== current && pop(resumedCache);\n break;\n case 24:\n popProvider(CacheContext);\n }\n}\nfunction commitHookEffectListMount(flags, finishedWork) {\n try {\n var updateQueue = finishedWork.updateQueue,\n lastEffect = null !== updateQueue ? updateQueue.lastEffect : null;\n if (null !== lastEffect) {\n var firstEffect = lastEffect.next;\n updateQueue = firstEffect;\n do {\n if ((updateQueue.tag & flags) === flags) {\n lastEffect = void 0;\n var create = updateQueue.create,\n inst = updateQueue.inst;\n lastEffect = create();\n inst.destroy = lastEffect;\n }\n updateQueue = updateQueue.next;\n } while (updateQueue !== firstEffect);\n }\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n}\nfunction commitHookEffectListUnmount(\n flags,\n finishedWork,\n nearestMountedAncestor$jscomp$0\n) {\n try {\n var updateQueue = finishedWork.updateQueue,\n lastEffect = null !== updateQueue ? updateQueue.lastEffect : null;\n if (null !== lastEffect) {\n var firstEffect = lastEffect.next;\n updateQueue = firstEffect;\n do {\n if ((updateQueue.tag & flags) === flags) {\n var inst = updateQueue.inst,\n destroy = inst.destroy;\n if (void 0 !== destroy) {\n inst.destroy = void 0;\n lastEffect = finishedWork;\n var nearestMountedAncestor = nearestMountedAncestor$jscomp$0,\n destroy_ = destroy;\n try {\n destroy_();\n } catch (error) {\n captureCommitPhaseError(\n lastEffect,\n nearestMountedAncestor,\n error\n );\n }\n }\n }\n updateQueue = updateQueue.next;\n } while (updateQueue !== firstEffect);\n }\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n}\nfunction commitClassCallbacks(finishedWork) {\n var updateQueue = finishedWork.updateQueue;\n if (null !== updateQueue) {\n var instance = finishedWork.stateNode;\n try {\n commitCallbacks(updateQueue, instance);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n}\nfunction safelyCallComponentWillUnmount(\n current,\n nearestMountedAncestor,\n instance\n) {\n instance.props = resolveClassComponentProps(\n current.type,\n current.memoizedProps\n );\n instance.state = current.memoizedState;\n try {\n instance.componentWillUnmount();\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n}\nfunction safelyAttachRef(current, nearestMountedAncestor) {\n try {\n var ref = current.ref;\n if (null !== ref) {\n switch (current.tag) {\n case 26:\n case 27:\n case 5:\n var instanceToUse = current.stateNode;\n break;\n case 30:\n instanceToUse = current.stateNode;\n break;\n default:\n instanceToUse = current.stateNode;\n }\n \"function\" === typeof ref\n ? (current.refCleanup = ref(instanceToUse))\n : (ref.current = instanceToUse);\n }\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n}\nfunction safelyDetachRef(current, nearestMountedAncestor) {\n var ref = current.ref,\n refCleanup = current.refCleanup;\n if (null !== ref)\n if (\"function\" === typeof refCleanup)\n try {\n refCleanup();\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n } finally {\n (current.refCleanup = null),\n (current = current.alternate),\n null != current && (current.refCleanup = null);\n }\n else if (\"function\" === typeof ref)\n try {\n ref(null);\n } catch (error$140) {\n captureCommitPhaseError(current, nearestMountedAncestor, error$140);\n }\n else ref.current = null;\n}\nfunction commitHostMount(finishedWork) {\n var type = finishedWork.type,\n props = finishedWork.memoizedProps,\n instance = finishedWork.stateNode;\n try {\n a: switch (type) {\n case \"button\":\n case \"input\":\n case \"select\":\n case \"textarea\":\n props.autoFocus && instance.focus();\n break a;\n case \"img\":\n props.src\n ? (instance.src = props.src)\n : props.srcSet && (instance.srcset = props.srcSet);\n }\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n}\nfunction commitHostUpdate(finishedWork, newProps, oldProps) {\n try {\n var domElement = finishedWork.stateNode;\n updateProperties(domElement, finishedWork.type, oldProps, newProps);\n domElement[internalPropsKey] = newProps;\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n}\nfunction isHostParent(fiber) {\n return (\n 5 === fiber.tag ||\n 3 === fiber.tag ||\n 26 === fiber.tag ||\n (27 === fiber.tag && isSingletonScope(fiber.type)) ||\n 4 === fiber.tag\n );\n}\nfunction getHostSibling(fiber) {\n a: for (;;) {\n for (; null === fiber.sibling; ) {\n if (null === fiber.return || isHostParent(fiber.return)) return null;\n fiber = fiber.return;\n }\n fiber.sibling.return = fiber.return;\n for (\n fiber = fiber.sibling;\n 5 !== fiber.tag && 6 !== fiber.tag && 18 !== fiber.tag;\n\n ) {\n if (27 === fiber.tag && isSingletonScope(fiber.type)) continue a;\n if (fiber.flags & 2) continue a;\n if (null === fiber.child || 4 === fiber.tag) continue a;\n else (fiber.child.return = fiber), (fiber = fiber.child);\n }\n if (!(fiber.flags & 2)) return fiber.stateNode;\n }\n}\nfunction insertOrAppendPlacementNodeIntoContainer(node, before, parent) {\n var tag = node.tag;\n if (5 === tag || 6 === tag)\n (node = node.stateNode),\n before\n ? (9 === parent.nodeType\n ? parent.body\n : \"HTML\" === parent.nodeName\n ? parent.ownerDocument.body\n : parent\n ).insertBefore(node, before)\n : ((before =\n 9 === parent.nodeType\n ? parent.body\n : \"HTML\" === parent.nodeName\n ? parent.ownerDocument.body\n : parent),\n before.appendChild(node),\n (parent = parent._reactRootContainer),\n (null !== parent && void 0 !== parent) ||\n null !== before.onclick ||\n (before.onclick = noop$1));\n else if (\n 4 !== tag &&\n (27 === tag &&\n isSingletonScope(node.type) &&\n ((parent = node.stateNode), (before = null)),\n (node = node.child),\n null !== node)\n )\n for (\n insertOrAppendPlacementNodeIntoContainer(node, before, parent),\n node = node.sibling;\n null !== node;\n\n )\n insertOrAppendPlacementNodeIntoContainer(node, before, parent),\n (node = node.sibling);\n}\nfunction insertOrAppendPlacementNode(node, before, parent) {\n var tag = node.tag;\n if (5 === tag || 6 === tag)\n (node = node.stateNode),\n before ? parent.insertBefore(node, before) : parent.appendChild(node);\n else if (\n 4 !== tag &&\n (27 === tag && isSingletonScope(node.type) && (parent = node.stateNode),\n (node = node.child),\n null !== node)\n )\n for (\n insertOrAppendPlacementNode(node, before, parent), node = node.sibling;\n null !== node;\n\n )\n insertOrAppendPlacementNode(node, before, parent), (node = node.sibling);\n}\nfunction commitHostSingletonAcquisition(finishedWork) {\n var singleton = finishedWork.stateNode,\n props = finishedWork.memoizedProps;\n try {\n for (\n var type = finishedWork.type, attributes = singleton.attributes;\n attributes.length;\n\n )\n singleton.removeAttributeNode(attributes[0]);\n setInitialProperties(singleton, type, props);\n singleton[internalInstanceKey] = finishedWork;\n singleton[internalPropsKey] = props;\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n}\nvar offscreenSubtreeIsHidden = !1,\n offscreenSubtreeWasHidden = !1,\n needsFormReset = !1,\n PossiblyWeakSet = \"function\" === typeof WeakSet ? WeakSet : Set,\n nextEffect = null;\nfunction commitBeforeMutationEffects(root, firstChild) {\n root = root.containerInfo;\n eventsEnabled = _enabled;\n root = getActiveElementDeep(root);\n if (hasSelectionCapabilities(root)) {\n if (\"selectionStart\" in root)\n var JSCompiler_temp = {\n start: root.selectionStart,\n end: root.selectionEnd\n };\n else\n a: {\n JSCompiler_temp =\n ((JSCompiler_temp = root.ownerDocument) &&\n JSCompiler_temp.defaultView) ||\n window;\n var selection =\n JSCompiler_temp.getSelection && JSCompiler_temp.getSelection();\n if (selection && 0 !== selection.rangeCount) {\n JSCompiler_temp = selection.anchorNode;\n var anchorOffset = selection.anchorOffset,\n focusNode = selection.focusNode;\n selection = selection.focusOffset;\n try {\n JSCompiler_temp.nodeType, focusNode.nodeType;\n } catch (e$20) {\n JSCompiler_temp = null;\n break a;\n }\n var length = 0,\n start = -1,\n end = -1,\n indexWithinAnchor = 0,\n indexWithinFocus = 0,\n node = root,\n parentNode = null;\n b: for (;;) {\n for (var next; ; ) {\n node !== JSCompiler_temp ||\n (0 !== anchorOffset && 3 !== node.nodeType) ||\n (start = length + anchorOffset);\n node !== focusNode ||\n (0 !== selection && 3 !== node.nodeType) ||\n (end = length + selection);\n 3 === node.nodeType && (length += node.nodeValue.length);\n if (null === (next = node.firstChild)) break;\n parentNode = node;\n node = next;\n }\n for (;;) {\n if (node === root) break b;\n parentNode === JSCompiler_temp &&\n ++indexWithinAnchor === anchorOffset &&\n (start = length);\n parentNode === focusNode &&\n ++indexWithinFocus === selection &&\n (end = length);\n if (null !== (next = node.nextSibling)) break;\n node = parentNode;\n parentNode = node.parentNode;\n }\n node = next;\n }\n JSCompiler_temp =\n -1 === start || -1 === end ? null : { start: start, end: end };\n } else JSCompiler_temp = null;\n }\n JSCompiler_temp = JSCompiler_temp || { start: 0, end: 0 };\n } else JSCompiler_temp = null;\n selectionInformation = { focusedElem: root, selectionRange: JSCompiler_temp };\n _enabled = !1;\n for (nextEffect = firstChild; null !== nextEffect; )\n if (\n ((firstChild = nextEffect),\n (root = firstChild.child),\n 0 !== (firstChild.subtreeFlags & 1028) && null !== root)\n )\n (root.return = firstChild), (nextEffect = root);\n else\n for (; null !== nextEffect; ) {\n firstChild = nextEffect;\n focusNode = firstChild.alternate;\n root = firstChild.flags;\n switch (firstChild.tag) {\n case 0:\n if (\n 0 !== (root & 4) &&\n ((root = firstChild.updateQueue),\n (root = null !== root ? root.events : null),\n null !== root)\n )\n for (\n JSCompiler_temp = 0;\n JSCompiler_temp < root.length;\n JSCompiler_temp++\n )\n (anchorOffset = root[JSCompiler_temp]),\n (anchorOffset.ref.impl = anchorOffset.nextImpl);\n break;\n case 11:\n case 15:\n break;\n case 1:\n if (0 !== (root & 1024) && null !== focusNode) {\n root = void 0;\n JSCompiler_temp = firstChild;\n anchorOffset = focusNode.memoizedProps;\n focusNode = focusNode.memoizedState;\n selection = JSCompiler_temp.stateNode;\n try {\n var resolvedPrevProps = resolveClassComponentProps(\n JSCompiler_temp.type,\n anchorOffset\n );\n root = selection.getSnapshotBeforeUpdate(\n resolvedPrevProps,\n focusNode\n );\n selection.__reactInternalSnapshotBeforeUpdate = root;\n } catch (error) {\n captureCommitPhaseError(\n JSCompiler_temp,\n JSCompiler_temp.return,\n error\n );\n }\n }\n break;\n case 3:\n if (0 !== (root & 1024))\n if (\n ((root = firstChild.stateNode.containerInfo),\n (JSCompiler_temp = root.nodeType),\n 9 === JSCompiler_temp)\n )\n clearContainerSparingly(root);\n else if (1 === JSCompiler_temp)\n switch (root.nodeName) {\n case \"HEAD\":\n case \"HTML\":\n case \"BODY\":\n clearContainerSparingly(root);\n break;\n default:\n root.textContent = \"\";\n }\n break;\n case 5:\n case 26:\n case 27:\n case 6:\n case 4:\n case 17:\n break;\n default:\n if (0 !== (root & 1024)) throw Error(formatProdErrorMessage(163));\n }\n root = firstChild.sibling;\n if (null !== root) {\n root.return = firstChild.return;\n nextEffect = root;\n break;\n }\n nextEffect = firstChild.return;\n }\n}\nfunction commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {\n var flags = finishedWork.flags;\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 15:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n flags & 4 && commitHookEffectListMount(5, finishedWork);\n break;\n case 1:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n if (flags & 4)\n if (((finishedRoot = finishedWork.stateNode), null === current))\n try {\n finishedRoot.componentDidMount();\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n else {\n var prevProps = resolveClassComponentProps(\n finishedWork.type,\n current.memoizedProps\n );\n current = current.memoizedState;\n try {\n finishedRoot.componentDidUpdate(\n prevProps,\n current,\n finishedRoot.__reactInternalSnapshotBeforeUpdate\n );\n } catch (error$139) {\n captureCommitPhaseError(\n finishedWork,\n finishedWork.return,\n error$139\n );\n }\n }\n flags & 64 && commitClassCallbacks(finishedWork);\n flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);\n break;\n case 3:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n if (\n flags & 64 &&\n ((finishedRoot = finishedWork.updateQueue), null !== finishedRoot)\n ) {\n current = null;\n if (null !== finishedWork.child)\n switch (finishedWork.child.tag) {\n case 27:\n case 5:\n current = finishedWork.child.stateNode;\n break;\n case 1:\n current = finishedWork.child.stateNode;\n }\n try {\n commitCallbacks(finishedRoot, current);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n break;\n case 27:\n null === current &&\n flags & 4 &&\n commitHostSingletonAcquisition(finishedWork);\n case 26:\n case 5:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n null === current && flags & 4 && commitHostMount(finishedWork);\n flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);\n break;\n case 12:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n break;\n case 31:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n flags & 4 && commitActivityHydrationCallbacks(finishedRoot, finishedWork);\n break;\n case 13:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);\n flags & 64 &&\n ((finishedRoot = finishedWork.memoizedState),\n null !== finishedRoot &&\n ((finishedRoot = finishedRoot.dehydrated),\n null !== finishedRoot &&\n ((finishedWork = retryDehydratedSuspenseBoundary.bind(\n null,\n finishedWork\n )),\n registerSuspenseInstanceRetry(finishedRoot, finishedWork))));\n break;\n case 22:\n flags = null !== finishedWork.memoizedState || offscreenSubtreeIsHidden;\n if (!flags) {\n current =\n (null !== current && null !== current.memoizedState) ||\n offscreenSubtreeWasHidden;\n prevProps = offscreenSubtreeIsHidden;\n var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;\n offscreenSubtreeIsHidden = flags;\n (offscreenSubtreeWasHidden = current) && !prevOffscreenSubtreeWasHidden\n ? recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n 0 !== (finishedWork.subtreeFlags & 8772)\n )\n : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n offscreenSubtreeIsHidden = prevProps;\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n }\n break;\n case 30:\n break;\n default:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n }\n}\nfunction detachFiberAfterEffects(fiber) {\n var alternate = fiber.alternate;\n null !== alternate &&\n ((fiber.alternate = null), detachFiberAfterEffects(alternate));\n fiber.child = null;\n fiber.deletions = null;\n fiber.sibling = null;\n 5 === fiber.tag &&\n ((alternate = fiber.stateNode),\n null !== alternate && detachDeletedInstance(alternate));\n fiber.stateNode = null;\n fiber.return = null;\n fiber.dependencies = null;\n fiber.memoizedProps = null;\n fiber.memoizedState = null;\n fiber.pendingProps = null;\n fiber.stateNode = null;\n fiber.updateQueue = null;\n}\nvar hostParent = null,\n hostParentIsContainer = !1;\nfunction recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n parent\n) {\n for (parent = parent.child; null !== parent; )\n commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, parent),\n (parent = parent.sibling);\n}\nfunction commitDeletionEffectsOnFiber(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n) {\n if (injectedHook && \"function\" === typeof injectedHook.onCommitFiberUnmount)\n try {\n injectedHook.onCommitFiberUnmount(rendererID, deletedFiber);\n } catch (err) {}\n switch (deletedFiber.tag) {\n case 26:\n offscreenSubtreeWasHidden ||\n safelyDetachRef(deletedFiber, nearestMountedAncestor);\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n deletedFiber.memoizedState\n ? deletedFiber.memoizedState.count--\n : deletedFiber.stateNode &&\n ((deletedFiber = deletedFiber.stateNode),\n deletedFiber.parentNode.removeChild(deletedFiber));\n break;\n case 27:\n offscreenSubtreeWasHidden ||\n safelyDetachRef(deletedFiber, nearestMountedAncestor);\n var prevHostParent = hostParent,\n prevHostParentIsContainer = hostParentIsContainer;\n isSingletonScope(deletedFiber.type) &&\n ((hostParent = deletedFiber.stateNode), (hostParentIsContainer = !1));\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n releaseSingletonInstance(deletedFiber.stateNode);\n hostParent = prevHostParent;\n hostParentIsContainer = prevHostParentIsContainer;\n break;\n case 5:\n offscreenSubtreeWasHidden ||\n safelyDetachRef(deletedFiber, nearestMountedAncestor);\n case 6:\n prevHostParent = hostParent;\n prevHostParentIsContainer = hostParentIsContainer;\n hostParent = null;\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n hostParent = prevHostParent;\n hostParentIsContainer = prevHostParentIsContainer;\n if (null !== hostParent)\n if (hostParentIsContainer)\n try {\n (9 === hostParent.nodeType\n ? hostParent.body\n : \"HTML\" === hostParent.nodeName\n ? hostParent.ownerDocument.body\n : hostParent\n ).removeChild(deletedFiber.stateNode);\n } catch (error) {\n captureCommitPhaseError(\n deletedFiber,\n nearestMountedAncestor,\n error\n );\n }\n else\n try {\n hostParent.removeChild(deletedFiber.stateNode);\n } catch (error) {\n captureCommitPhaseError(\n deletedFiber,\n nearestMountedAncestor,\n error\n );\n }\n break;\n case 18:\n null !== hostParent &&\n (hostParentIsContainer\n ? ((finishedRoot = hostParent),\n clearHydrationBoundary(\n 9 === finishedRoot.nodeType\n ? finishedRoot.body\n : \"HTML\" === finishedRoot.nodeName\n ? finishedRoot.ownerDocument.body\n : finishedRoot,\n deletedFiber.stateNode\n ),\n retryIfBlockedOn(finishedRoot))\n : clearHydrationBoundary(hostParent, deletedFiber.stateNode));\n break;\n case 4:\n prevHostParent = hostParent;\n prevHostParentIsContainer = hostParentIsContainer;\n hostParent = deletedFiber.stateNode.containerInfo;\n hostParentIsContainer = !0;\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n hostParent = prevHostParent;\n hostParentIsContainer = prevHostParentIsContainer;\n break;\n case 0:\n case 11:\n case 14:\n case 15:\n commitHookEffectListUnmount(2, deletedFiber, nearestMountedAncestor);\n offscreenSubtreeWasHidden ||\n commitHookEffectListUnmount(4, deletedFiber, nearestMountedAncestor);\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n break;\n case 1:\n offscreenSubtreeWasHidden ||\n (safelyDetachRef(deletedFiber, nearestMountedAncestor),\n (prevHostParent = deletedFiber.stateNode),\n \"function\" === typeof prevHostParent.componentWillUnmount &&\n safelyCallComponentWillUnmount(\n deletedFiber,\n nearestMountedAncestor,\n prevHostParent\n ));\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n break;\n case 21:\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n break;\n case 22:\n offscreenSubtreeWasHidden =\n (prevHostParent = offscreenSubtreeWasHidden) ||\n null !== deletedFiber.memoizedState;\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n offscreenSubtreeWasHidden = prevHostParent;\n break;\n default:\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n }\n}\nfunction commitActivityHydrationCallbacks(finishedRoot, finishedWork) {\n if (\n null === finishedWork.memoizedState &&\n ((finishedRoot = finishedWork.alternate),\n null !== finishedRoot &&\n ((finishedRoot = finishedRoot.memoizedState), null !== finishedRoot))\n ) {\n finishedRoot = finishedRoot.dehydrated;\n try {\n retryIfBlockedOn(finishedRoot);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n}\nfunction commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {\n if (\n null === finishedWork.memoizedState &&\n ((finishedRoot = finishedWork.alternate),\n null !== finishedRoot &&\n ((finishedRoot = finishedRoot.memoizedState),\n null !== finishedRoot &&\n ((finishedRoot = finishedRoot.dehydrated), null !== finishedRoot)))\n )\n try {\n retryIfBlockedOn(finishedRoot);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n}\nfunction getRetryCache(finishedWork) {\n switch (finishedWork.tag) {\n case 31:\n case 13:\n case 19:\n var retryCache = finishedWork.stateNode;\n null === retryCache &&\n (retryCache = finishedWork.stateNode = new PossiblyWeakSet());\n return retryCache;\n case 22:\n return (\n (finishedWork = finishedWork.stateNode),\n (retryCache = finishedWork._retryCache),\n null === retryCache &&\n (retryCache = finishedWork._retryCache = new PossiblyWeakSet()),\n retryCache\n );\n default:\n throw Error(formatProdErrorMessage(435, finishedWork.tag));\n }\n}\nfunction attachSuspenseRetryListeners(finishedWork, wakeables) {\n var retryCache = getRetryCache(finishedWork);\n wakeables.forEach(function (wakeable) {\n if (!retryCache.has(wakeable)) {\n retryCache.add(wakeable);\n var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);\n wakeable.then(retry, retry);\n }\n });\n}\nfunction recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) {\n var deletions = parentFiber.deletions;\n if (null !== deletions)\n for (var i = 0; i < deletions.length; i++) {\n var childToDelete = deletions[i],\n root = root$jscomp$0,\n returnFiber = parentFiber,\n parent = returnFiber;\n a: for (; null !== parent; ) {\n switch (parent.tag) {\n case 27:\n if (isSingletonScope(parent.type)) {\n hostParent = parent.stateNode;\n hostParentIsContainer = !1;\n break a;\n }\n break;\n case 5:\n hostParent = parent.stateNode;\n hostParentIsContainer = !1;\n break a;\n case 3:\n case 4:\n hostParent = parent.stateNode.containerInfo;\n hostParentIsContainer = !0;\n break a;\n }\n parent = parent.return;\n }\n if (null === hostParent) throw Error(formatProdErrorMessage(160));\n commitDeletionEffectsOnFiber(root, returnFiber, childToDelete);\n hostParent = null;\n hostParentIsContainer = !1;\n root = childToDelete.alternate;\n null !== root && (root.return = null);\n childToDelete.return = null;\n }\n if (parentFiber.subtreeFlags & 13886)\n for (parentFiber = parentFiber.child; null !== parentFiber; )\n commitMutationEffectsOnFiber(parentFiber, root$jscomp$0),\n (parentFiber = parentFiber.sibling);\n}\nvar currentHoistableRoot = null;\nfunction commitMutationEffectsOnFiber(finishedWork, root) {\n var current = finishedWork.alternate,\n flags = finishedWork.flags;\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 14:\n case 15:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n flags & 4 &&\n (commitHookEffectListUnmount(3, finishedWork, finishedWork.return),\n commitHookEffectListMount(3, finishedWork),\n commitHookEffectListUnmount(5, finishedWork, finishedWork.return));\n break;\n case 1:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n flags & 512 &&\n (offscreenSubtreeWasHidden ||\n null === current ||\n safelyDetachRef(current, current.return));\n flags & 64 &&\n offscreenSubtreeIsHidden &&\n ((finishedWork = finishedWork.updateQueue),\n null !== finishedWork &&\n ((flags = finishedWork.callbacks),\n null !== flags &&\n ((current = finishedWork.shared.hiddenCallbacks),\n (finishedWork.shared.hiddenCallbacks =\n null === current ? flags : current.concat(flags)))));\n break;\n case 26:\n var hoistableRoot = currentHoistableRoot;\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n flags & 512 &&\n (offscreenSubtreeWasHidden ||\n null === current ||\n safelyDetachRef(current, current.return));\n if (flags & 4) {\n var currentResource = null !== current ? current.memoizedState : null;\n flags = finishedWork.memoizedState;\n if (null === current)\n if (null === flags)\n if (null === finishedWork.stateNode) {\n a: {\n flags = finishedWork.type;\n current = finishedWork.memoizedProps;\n hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;\n b: switch (flags) {\n case \"title\":\n currentResource =\n hoistableRoot.getElementsByTagName(\"title\")[0];\n if (\n !currentResource ||\n currentResource[internalHoistableMarker] ||\n currentResource[internalInstanceKey] ||\n \"http://www.w3.org/2000/svg\" ===\n currentResource.namespaceURI ||\n currentResource.hasAttribute(\"itemprop\")\n )\n (currentResource = hoistableRoot.createElement(flags)),\n hoistableRoot.head.insertBefore(\n currentResource,\n hoistableRoot.querySelector(\"head > title\")\n );\n setInitialProperties(currentResource, flags, current);\n currentResource[internalInstanceKey] = finishedWork;\n markNodeAsHoistable(currentResource);\n flags = currentResource;\n break a;\n case \"link\":\n var maybeNodes = getHydratableHoistableCache(\n \"link\",\n \"href\",\n hoistableRoot\n ).get(flags + (current.href || \"\"));\n if (maybeNodes)\n for (var i = 0; i < maybeNodes.length; i++)\n if (\n ((currentResource = maybeNodes[i]),\n currentResource.getAttribute(\"href\") ===\n (null == current.href || \"\" === current.href\n ? null\n : current.href) &&\n currentResource.getAttribute(\"rel\") ===\n (null == current.rel ? null : current.rel) &&\n currentResource.getAttribute(\"title\") ===\n (null == current.title ? null : current.title) &&\n currentResource.getAttribute(\"crossorigin\") ===\n (null == current.crossOrigin\n ? null\n : current.crossOrigin))\n ) {\n maybeNodes.splice(i, 1);\n break b;\n }\n currentResource = hoistableRoot.createElement(flags);\n setInitialProperties(currentResource, flags, current);\n hoistableRoot.head.appendChild(currentResource);\n break;\n case \"meta\":\n if (\n (maybeNodes = getHydratableHoistableCache(\n \"meta\",\n \"content\",\n hoistableRoot\n ).get(flags + (current.content || \"\")))\n )\n for (i = 0; i < maybeNodes.length; i++)\n if (\n ((currentResource = maybeNodes[i]),\n currentResource.getAttribute(\"content\") ===\n (null == current.content\n ? null\n : \"\" + current.content) &&\n currentResource.getAttribute(\"name\") ===\n (null == current.name ? null : current.name) &&\n currentResource.getAttribute(\"property\") ===\n (null == current.property\n ? null\n : current.property) &&\n currentResource.getAttribute(\"http-equiv\") ===\n (null == current.httpEquiv\n ? null\n : current.httpEquiv) &&\n currentResource.getAttribute(\"charset\") ===\n (null == current.charSet\n ? null\n : current.charSet))\n ) {\n maybeNodes.splice(i, 1);\n break b;\n }\n currentResource = hoistableRoot.createElement(flags);\n setInitialProperties(currentResource, flags, current);\n hoistableRoot.head.appendChild(currentResource);\n break;\n default:\n throw Error(formatProdErrorMessage(468, flags));\n }\n currentResource[internalInstanceKey] = finishedWork;\n markNodeAsHoistable(currentResource);\n flags = currentResource;\n }\n finishedWork.stateNode = flags;\n } else\n mountHoistable(\n hoistableRoot,\n finishedWork.type,\n finishedWork.stateNode\n );\n else\n finishedWork.stateNode = acquireResource(\n hoistableRoot,\n flags,\n finishedWork.memoizedProps\n );\n else\n currentResource !== flags\n ? (null === currentResource\n ? null !== current.stateNode &&\n ((current = current.stateNode),\n current.parentNode.removeChild(current))\n : currentResource.count--,\n null === flags\n ? mountHoistable(\n hoistableRoot,\n finishedWork.type,\n finishedWork.stateNode\n )\n : acquireResource(\n hoistableRoot,\n flags,\n finishedWork.memoizedProps\n ))\n : null === flags &&\n null !== finishedWork.stateNode &&\n commitHostUpdate(\n finishedWork,\n finishedWork.memoizedProps,\n current.memoizedProps\n );\n }\n break;\n case 27:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n flags & 512 &&\n (offscreenSubtreeWasHidden ||\n null === current ||\n safelyDetachRef(current, current.return));\n null !== current &&\n flags & 4 &&\n commitHostUpdate(\n finishedWork,\n finishedWork.memoizedProps,\n current.memoizedProps\n );\n break;\n case 5:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n flags & 512 &&\n (offscreenSubtreeWasHidden ||\n null === current ||\n safelyDetachRef(current, current.return));\n if (finishedWork.flags & 32) {\n hoistableRoot = finishedWork.stateNode;\n try {\n setTextContent(hoistableRoot, \"\");\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n flags & 4 &&\n null != finishedWork.stateNode &&\n ((hoistableRoot = finishedWork.memoizedProps),\n commitHostUpdate(\n finishedWork,\n hoistableRoot,\n null !== current ? current.memoizedProps : hoistableRoot\n ));\n flags & 1024 && (needsFormReset = !0);\n break;\n case 6:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n if (flags & 4) {\n if (null === finishedWork.stateNode)\n throw Error(formatProdErrorMessage(162));\n flags = finishedWork.memoizedProps;\n current = finishedWork.stateNode;\n try {\n current.nodeValue = flags;\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n break;\n case 3:\n tagCaches = null;\n hoistableRoot = currentHoistableRoot;\n currentHoistableRoot = getHoistableRoot(root.containerInfo);\n recursivelyTraverseMutationEffects(root, finishedWork);\n currentHoistableRoot = hoistableRoot;\n commitReconciliationEffects(finishedWork);\n if (flags & 4 && null !== current && current.memoizedState.isDehydrated)\n try {\n retryIfBlockedOn(root.containerInfo);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n needsFormReset &&\n ((needsFormReset = !1), recursivelyResetForms(finishedWork));\n break;\n case 4:\n flags = currentHoistableRoot;\n currentHoistableRoot = getHoistableRoot(\n finishedWork.stateNode.containerInfo\n );\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n currentHoistableRoot = flags;\n break;\n case 12:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n break;\n case 31:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n flags & 4 &&\n ((flags = finishedWork.updateQueue),\n null !== flags &&\n ((finishedWork.updateQueue = null),\n attachSuspenseRetryListeners(finishedWork, flags)));\n break;\n case 13:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n finishedWork.child.flags & 8192 &&\n (null !== finishedWork.memoizedState) !==\n (null !== current && null !== current.memoizedState) &&\n (globalMostRecentFallbackTime = now());\n flags & 4 &&\n ((flags = finishedWork.updateQueue),\n null !== flags &&\n ((finishedWork.updateQueue = null),\n attachSuspenseRetryListeners(finishedWork, flags)));\n break;\n case 22:\n hoistableRoot = null !== finishedWork.memoizedState;\n var wasHidden = null !== current && null !== current.memoizedState,\n prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden,\n prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;\n offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden || hoistableRoot;\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || wasHidden;\n recursivelyTraverseMutationEffects(root, finishedWork);\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;\n commitReconciliationEffects(finishedWork);\n if (flags & 8192)\n a: for (\n root = finishedWork.stateNode,\n root._visibility = hoistableRoot\n ? root._visibility & -2\n : root._visibility | 1,\n hoistableRoot &&\n (null === current ||\n wasHidden ||\n offscreenSubtreeIsHidden ||\n offscreenSubtreeWasHidden ||\n recursivelyTraverseDisappearLayoutEffects(finishedWork)),\n current = null,\n root = finishedWork;\n ;\n\n ) {\n if (5 === root.tag || 26 === root.tag) {\n if (null === current) {\n wasHidden = current = root;\n try {\n if (((currentResource = wasHidden.stateNode), hoistableRoot))\n (maybeNodes = currentResource.style),\n \"function\" === typeof maybeNodes.setProperty\n ? maybeNodes.setProperty(\"display\", \"none\", \"important\")\n : (maybeNodes.display = \"none\");\n else {\n i = wasHidden.stateNode;\n var styleProp = wasHidden.memoizedProps.style,\n display =\n void 0 !== styleProp &&\n null !== styleProp &&\n styleProp.hasOwnProperty(\"display\")\n ? styleProp.display\n : null;\n i.style.display =\n null == display || \"boolean\" === typeof display\n ? \"\"\n : (\"\" + display).trim();\n }\n } catch (error) {\n captureCommitPhaseError(wasHidden, wasHidden.return, error);\n }\n }\n } else if (6 === root.tag) {\n if (null === current) {\n wasHidden = root;\n try {\n wasHidden.stateNode.nodeValue = hoistableRoot\n ? \"\"\n : wasHidden.memoizedProps;\n } catch (error) {\n captureCommitPhaseError(wasHidden, wasHidden.return, error);\n }\n }\n } else if (18 === root.tag) {\n if (null === current) {\n wasHidden = root;\n try {\n var instance = wasHidden.stateNode;\n hoistableRoot\n ? hideOrUnhideDehydratedBoundary(instance, !0)\n : hideOrUnhideDehydratedBoundary(wasHidden.stateNode, !1);\n } catch (error) {\n captureCommitPhaseError(wasHidden, wasHidden.return, error);\n }\n }\n } else if (\n ((22 !== root.tag && 23 !== root.tag) ||\n null === root.memoizedState ||\n root === finishedWork) &&\n null !== root.child\n ) {\n root.child.return = root;\n root = root.child;\n continue;\n }\n if (root === finishedWork) break a;\n for (; null === root.sibling; ) {\n if (null === root.return || root.return === finishedWork) break a;\n current === root && (current = null);\n root = root.return;\n }\n current === root && (current = null);\n root.sibling.return = root.return;\n root = root.sibling;\n }\n flags & 4 &&\n ((flags = finishedWork.updateQueue),\n null !== flags &&\n ((current = flags.retryQueue),\n null !== current &&\n ((flags.retryQueue = null),\n attachSuspenseRetryListeners(finishedWork, current))));\n break;\n case 19:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n flags & 4 &&\n ((flags = finishedWork.updateQueue),\n null !== flags &&\n ((finishedWork.updateQueue = null),\n attachSuspenseRetryListeners(finishedWork, flags)));\n break;\n case 30:\n break;\n case 21:\n break;\n default:\n recursivelyTraverseMutationEffects(root, finishedWork),\n commitReconciliationEffects(finishedWork);\n }\n}\nfunction commitReconciliationEffects(finishedWork) {\n var flags = finishedWork.flags;\n if (flags & 2) {\n try {\n for (\n var hostParentFiber, parentFiber = finishedWork.return;\n null !== parentFiber;\n\n ) {\n if (isHostParent(parentFiber)) {\n hostParentFiber = parentFiber;\n break;\n }\n parentFiber = parentFiber.return;\n }\n if (null == hostParentFiber) throw Error(formatProdErrorMessage(160));\n switch (hostParentFiber.tag) {\n case 27:\n var parent = hostParentFiber.stateNode,\n before = getHostSibling(finishedWork);\n insertOrAppendPlacementNode(finishedWork, before, parent);\n break;\n case 5:\n var parent$141 = hostParentFiber.stateNode;\n hostParentFiber.flags & 32 &&\n (setTextContent(parent$141, \"\"), (hostParentFiber.flags &= -33));\n var before$142 = getHostSibling(finishedWork);\n insertOrAppendPlacementNode(finishedWork, before$142, parent$141);\n break;\n case 3:\n case 4:\n var parent$143 = hostParentFiber.stateNode.containerInfo,\n before$144 = getHostSibling(finishedWork);\n insertOrAppendPlacementNodeIntoContainer(\n finishedWork,\n before$144,\n parent$143\n );\n break;\n default:\n throw Error(formatProdErrorMessage(161));\n }\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n finishedWork.flags &= -3;\n }\n flags & 4096 && (finishedWork.flags &= -4097);\n}\nfunction recursivelyResetForms(parentFiber) {\n if (parentFiber.subtreeFlags & 1024)\n for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n var fiber = parentFiber;\n recursivelyResetForms(fiber);\n 5 === fiber.tag && fiber.flags & 1024 && fiber.stateNode.reset();\n parentFiber = parentFiber.sibling;\n }\n}\nfunction recursivelyTraverseLayoutEffects(root, parentFiber) {\n if (parentFiber.subtreeFlags & 8772)\n for (parentFiber = parentFiber.child; null !== parentFiber; )\n commitLayoutEffectOnFiber(root, parentFiber.alternate, parentFiber),\n (parentFiber = parentFiber.sibling);\n}\nfunction recursivelyTraverseDisappearLayoutEffects(parentFiber) {\n for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n var finishedWork = parentFiber;\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 14:\n case 15:\n commitHookEffectListUnmount(4, finishedWork, finishedWork.return);\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n break;\n case 1:\n safelyDetachRef(finishedWork, finishedWork.return);\n var instance = finishedWork.stateNode;\n \"function\" === typeof instance.componentWillUnmount &&\n safelyCallComponentWillUnmount(\n finishedWork,\n finishedWork.return,\n instance\n );\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n break;\n case 27:\n releaseSingletonInstance(finishedWork.stateNode);\n case 26:\n case 5:\n safelyDetachRef(finishedWork, finishedWork.return);\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n break;\n case 22:\n null === finishedWork.memoizedState &&\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n break;\n case 30:\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n break;\n default:\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n }\n parentFiber = parentFiber.sibling;\n }\n}\nfunction recursivelyTraverseReappearLayoutEffects(\n finishedRoot$jscomp$0,\n parentFiber,\n includeWorkInProgressEffects\n) {\n includeWorkInProgressEffects =\n includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 8772);\n for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n var current = parentFiber.alternate,\n finishedRoot = finishedRoot$jscomp$0,\n finishedWork = parentFiber,\n flags = finishedWork.flags;\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 15:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n commitHookEffectListMount(4, finishedWork);\n break;\n case 1:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n current = finishedWork;\n finishedRoot = current.stateNode;\n if (\"function\" === typeof finishedRoot.componentDidMount)\n try {\n finishedRoot.componentDidMount();\n } catch (error) {\n captureCommitPhaseError(current, current.return, error);\n }\n current = finishedWork;\n finishedRoot = current.updateQueue;\n if (null !== finishedRoot) {\n var instance = current.stateNode;\n try {\n var hiddenCallbacks = finishedRoot.shared.hiddenCallbacks;\n if (null !== hiddenCallbacks)\n for (\n finishedRoot.shared.hiddenCallbacks = null, finishedRoot = 0;\n finishedRoot < hiddenCallbacks.length;\n finishedRoot++\n )\n callCallback(hiddenCallbacks[finishedRoot], instance);\n } catch (error) {\n captureCommitPhaseError(current, current.return, error);\n }\n }\n includeWorkInProgressEffects &&\n flags & 64 &&\n commitClassCallbacks(finishedWork);\n safelyAttachRef(finishedWork, finishedWork.return);\n break;\n case 27:\n commitHostSingletonAcquisition(finishedWork);\n case 26:\n case 5:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n includeWorkInProgressEffects &&\n null === current &&\n flags & 4 &&\n commitHostMount(finishedWork);\n safelyAttachRef(finishedWork, finishedWork.return);\n break;\n case 12:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n break;\n case 31:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n includeWorkInProgressEffects &&\n flags & 4 &&\n commitActivityHydrationCallbacks(finishedRoot, finishedWork);\n break;\n case 13:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n includeWorkInProgressEffects &&\n flags & 4 &&\n commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);\n break;\n case 22:\n null === finishedWork.memoizedState &&\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n safelyAttachRef(finishedWork, finishedWork.return);\n break;\n case 30:\n break;\n default:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n }\n parentFiber = parentFiber.sibling;\n }\n}\nfunction commitOffscreenPassiveMountEffects(current, finishedWork) {\n var previousCache = null;\n null !== current &&\n null !== current.memoizedState &&\n null !== current.memoizedState.cachePool &&\n (previousCache = current.memoizedState.cachePool.pool);\n current = null;\n null !== finishedWork.memoizedState &&\n null !== finishedWork.memoizedState.cachePool &&\n (current = finishedWork.memoizedState.cachePool.pool);\n current !== previousCache &&\n (null != current && current.refCount++,\n null != previousCache && releaseCache(previousCache));\n}\nfunction commitCachePassiveMountEffect(current, finishedWork) {\n current = null;\n null !== finishedWork.alternate &&\n (current = finishedWork.alternate.memoizedState.cache);\n finishedWork = finishedWork.memoizedState.cache;\n finishedWork !== current &&\n (finishedWork.refCount++, null != current && releaseCache(current));\n}\nfunction recursivelyTraversePassiveMountEffects(\n root,\n parentFiber,\n committedLanes,\n committedTransitions\n) {\n if (parentFiber.subtreeFlags & 10256)\n for (parentFiber = parentFiber.child; null !== parentFiber; )\n commitPassiveMountOnFiber(\n root,\n parentFiber,\n committedLanes,\n committedTransitions\n ),\n (parentFiber = parentFiber.sibling);\n}\nfunction commitPassiveMountOnFiber(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n) {\n var flags = finishedWork.flags;\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 15:\n recursivelyTraversePassiveMountEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n );\n flags & 2048 && commitHookEffectListMount(9, finishedWork);\n break;\n case 1:\n recursivelyTraversePassiveMountEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n );\n break;\n case 3:\n recursivelyTraversePassiveMountEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n );\n flags & 2048 &&\n ((finishedRoot = null),\n null !== finishedWork.alternate &&\n (finishedRoot = finishedWork.alternate.memoizedState.cache),\n (finishedWork = finishedWork.memoizedState.cache),\n finishedWork !== finishedRoot &&\n (finishedWork.refCount++,\n null != finishedRoot && releaseCache(finishedRoot)));\n break;\n case 12:\n if (flags & 2048) {\n recursivelyTraversePassiveMountEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n );\n finishedRoot = finishedWork.stateNode;\n try {\n var _finishedWork$memoize2 = finishedWork.memoizedProps,\n id = _finishedWork$memoize2.id,\n onPostCommit = _finishedWork$memoize2.onPostCommit;\n \"function\" === typeof onPostCommit &&\n onPostCommit(\n id,\n null === finishedWork.alternate ? \"mount\" : \"update\",\n finishedRoot.passiveEffectDuration,\n -0\n );\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n } else\n recursivelyTraversePassiveMountEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n );\n break;\n case 31:\n recursivelyTraversePassiveMountEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n );\n break;\n case 13:\n recursivelyTraversePassiveMountEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n );\n break;\n case 23:\n break;\n case 22:\n _finishedWork$memoize2 = finishedWork.stateNode;\n id = finishedWork.alternate;\n null !== finishedWork.memoizedState\n ? _finishedWork$memoize2._visibility & 2\n ? recursivelyTraversePassiveMountEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n )\n : recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork)\n : _finishedWork$memoize2._visibility & 2\n ? recursivelyTraversePassiveMountEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n )\n : ((_finishedWork$memoize2._visibility |= 2),\n recursivelyTraverseReconnectPassiveEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions,\n 0 !== (finishedWork.subtreeFlags & 10256) || !1\n ));\n flags & 2048 && commitOffscreenPassiveMountEffects(id, finishedWork);\n break;\n case 24:\n recursivelyTraversePassiveMountEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n );\n flags & 2048 &&\n commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);\n break;\n default:\n recursivelyTraversePassiveMountEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n );\n }\n}\nfunction recursivelyTraverseReconnectPassiveEffects(\n finishedRoot$jscomp$0,\n parentFiber,\n committedLanes$jscomp$0,\n committedTransitions$jscomp$0,\n includeWorkInProgressEffects\n) {\n includeWorkInProgressEffects =\n includeWorkInProgressEffects &&\n (0 !== (parentFiber.subtreeFlags & 10256) || !1);\n for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n var finishedRoot = finishedRoot$jscomp$0,\n finishedWork = parentFiber,\n committedLanes = committedLanes$jscomp$0,\n committedTransitions = committedTransitions$jscomp$0,\n flags = finishedWork.flags;\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 15:\n recursivelyTraverseReconnectPassiveEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions,\n includeWorkInProgressEffects\n );\n commitHookEffectListMount(8, finishedWork);\n break;\n case 23:\n break;\n case 22:\n var instance = finishedWork.stateNode;\n null !== finishedWork.memoizedState\n ? instance._visibility & 2\n ? recursivelyTraverseReconnectPassiveEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions,\n includeWorkInProgressEffects\n )\n : recursivelyTraverseAtomicPassiveEffects(\n finishedRoot,\n finishedWork\n )\n : ((instance._visibility |= 2),\n recursivelyTraverseReconnectPassiveEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions,\n includeWorkInProgressEffects\n ));\n includeWorkInProgressEffects &&\n flags & 2048 &&\n commitOffscreenPassiveMountEffects(\n finishedWork.alternate,\n finishedWork\n );\n break;\n case 24:\n recursivelyTraverseReconnectPassiveEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions,\n includeWorkInProgressEffects\n );\n includeWorkInProgressEffects &&\n flags & 2048 &&\n commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);\n break;\n default:\n recursivelyTraverseReconnectPassiveEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions,\n includeWorkInProgressEffects\n );\n }\n parentFiber = parentFiber.sibling;\n }\n}\nfunction recursivelyTraverseAtomicPassiveEffects(\n finishedRoot$jscomp$0,\n parentFiber\n) {\n if (parentFiber.subtreeFlags & 10256)\n for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n var finishedRoot = finishedRoot$jscomp$0,\n finishedWork = parentFiber,\n flags = finishedWork.flags;\n switch (finishedWork.tag) {\n case 22:\n recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);\n flags & 2048 &&\n commitOffscreenPassiveMountEffects(\n finishedWork.alternate,\n finishedWork\n );\n break;\n case 24:\n recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);\n flags & 2048 &&\n commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);\n break;\n default:\n recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);\n }\n parentFiber = parentFiber.sibling;\n }\n}\nvar suspenseyCommitFlag = 8192;\nfunction recursivelyAccumulateSuspenseyCommit(\n parentFiber,\n committedLanes,\n suspendedState\n) {\n if (parentFiber.subtreeFlags & suspenseyCommitFlag)\n for (parentFiber = parentFiber.child; null !== parentFiber; )\n accumulateSuspenseyCommitOnFiber(\n parentFiber,\n committedLanes,\n suspendedState\n ),\n (parentFiber = parentFiber.sibling);\n}\nfunction accumulateSuspenseyCommitOnFiber(\n fiber,\n committedLanes,\n suspendedState\n) {\n switch (fiber.tag) {\n case 26:\n recursivelyAccumulateSuspenseyCommit(\n fiber,\n committedLanes,\n suspendedState\n );\n fiber.flags & suspenseyCommitFlag &&\n null !== fiber.memoizedState &&\n suspendResource(\n suspendedState,\n currentHoistableRoot,\n fiber.memoizedState,\n fiber.memoizedProps\n );\n break;\n case 5:\n recursivelyAccumulateSuspenseyCommit(\n fiber,\n committedLanes,\n suspendedState\n );\n break;\n case 3:\n case 4:\n var previousHoistableRoot = currentHoistableRoot;\n currentHoistableRoot = getHoistableRoot(fiber.stateNode.containerInfo);\n recursivelyAccumulateSuspenseyCommit(\n fiber,\n committedLanes,\n suspendedState\n );\n currentHoistableRoot = previousHoistableRoot;\n break;\n case 22:\n null === fiber.memoizedState &&\n ((previousHoistableRoot = fiber.alternate),\n null !== previousHoistableRoot &&\n null !== previousHoistableRoot.memoizedState\n ? ((previousHoistableRoot = suspenseyCommitFlag),\n (suspenseyCommitFlag = 16777216),\n recursivelyAccumulateSuspenseyCommit(\n fiber,\n committedLanes,\n suspendedState\n ),\n (suspenseyCommitFlag = previousHoistableRoot))\n : recursivelyAccumulateSuspenseyCommit(\n fiber,\n committedLanes,\n suspendedState\n ));\n break;\n default:\n recursivelyAccumulateSuspenseyCommit(\n fiber,\n committedLanes,\n suspendedState\n );\n }\n}\nfunction detachAlternateSiblings(parentFiber) {\n var previousFiber = parentFiber.alternate;\n if (\n null !== previousFiber &&\n ((parentFiber = previousFiber.child), null !== parentFiber)\n ) {\n previousFiber.child = null;\n do\n (previousFiber = parentFiber.sibling),\n (parentFiber.sibling = null),\n (parentFiber = previousFiber);\n while (null !== parentFiber);\n }\n}\nfunction recursivelyTraversePassiveUnmountEffects(parentFiber) {\n var deletions = parentFiber.deletions;\n if (0 !== (parentFiber.flags & 16)) {\n if (null !== deletions)\n for (var i = 0; i < deletions.length; i++) {\n var childToDelete = deletions[i];\n nextEffect = childToDelete;\n commitPassiveUnmountEffectsInsideOfDeletedTree_begin(\n childToDelete,\n parentFiber\n );\n }\n detachAlternateSiblings(parentFiber);\n }\n if (parentFiber.subtreeFlags & 10256)\n for (parentFiber = parentFiber.child; null !== parentFiber; )\n commitPassiveUnmountOnFiber(parentFiber),\n (parentFiber = parentFiber.sibling);\n}\nfunction commitPassiveUnmountOnFiber(finishedWork) {\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 15:\n recursivelyTraversePassiveUnmountEffects(finishedWork);\n finishedWork.flags & 2048 &&\n commitHookEffectListUnmount(9, finishedWork, finishedWork.return);\n break;\n case 3:\n recursivelyTraversePassiveUnmountEffects(finishedWork);\n break;\n case 12:\n recursivelyTraversePassiveUnmountEffects(finishedWork);\n break;\n case 22:\n var instance = finishedWork.stateNode;\n null !== finishedWork.memoizedState &&\n instance._visibility & 2 &&\n (null === finishedWork.return || 13 !== finishedWork.return.tag)\n ? ((instance._visibility &= -3),\n recursivelyTraverseDisconnectPassiveEffects(finishedWork))\n : recursivelyTraversePassiveUnmountEffects(finishedWork);\n break;\n default:\n recursivelyTraversePassiveUnmountEffects(finishedWork);\n }\n}\nfunction recursivelyTraverseDisconnectPassiveEffects(parentFiber) {\n var deletions = parentFiber.deletions;\n if (0 !== (parentFiber.flags & 16)) {\n if (null !== deletions)\n for (var i = 0; i < deletions.length; i++) {\n var childToDelete = deletions[i];\n nextEffect = childToDelete;\n commitPassiveUnmountEffectsInsideOfDeletedTree_begin(\n childToDelete,\n parentFiber\n );\n }\n detachAlternateSiblings(parentFiber);\n }\n for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n deletions = parentFiber;\n switch (deletions.tag) {\n case 0:\n case 11:\n case 15:\n commitHookEffectListUnmount(8, deletions, deletions.return);\n recursivelyTraverseDisconnectPassiveEffects(deletions);\n break;\n case 22:\n i = deletions.stateNode;\n i._visibility & 2 &&\n ((i._visibility &= -3),\n recursivelyTraverseDisconnectPassiveEffects(deletions));\n break;\n default:\n recursivelyTraverseDisconnectPassiveEffects(deletions);\n }\n parentFiber = parentFiber.sibling;\n }\n}\nfunction commitPassiveUnmountEffectsInsideOfDeletedTree_begin(\n deletedSubtreeRoot,\n nearestMountedAncestor\n) {\n for (; null !== nextEffect; ) {\n var fiber = nextEffect;\n switch (fiber.tag) {\n case 0:\n case 11:\n case 15:\n commitHookEffectListUnmount(8, fiber, nearestMountedAncestor);\n break;\n case 23:\n case 22:\n if (\n null !== fiber.memoizedState &&\n null !== fiber.memoizedState.cachePool\n ) {\n var cache = fiber.memoizedState.cachePool.pool;\n null != cache && cache.refCount++;\n }\n break;\n case 24:\n releaseCache(fiber.memoizedState.cache);\n }\n cache = fiber.child;\n if (null !== cache) (cache.return = fiber), (nextEffect = cache);\n else\n a: for (fiber = deletedSubtreeRoot; null !== nextEffect; ) {\n cache = nextEffect;\n var sibling = cache.sibling,\n returnFiber = cache.return;\n detachFiberAfterEffects(cache);\n if (cache === fiber) {\n nextEffect = null;\n break a;\n }\n if (null !== sibling) {\n sibling.return = returnFiber;\n nextEffect = sibling;\n break a;\n }\n nextEffect = returnFiber;\n }\n }\n}\nvar DefaultAsyncDispatcher = {\n getCacheForType: function (resourceType) {\n var cache = readContext(CacheContext),\n cacheForType = cache.data.get(resourceType);\n void 0 === cacheForType &&\n ((cacheForType = resourceType()),\n cache.data.set(resourceType, cacheForType));\n return cacheForType;\n },\n cacheSignal: function () {\n return readContext(CacheContext).controller.signal;\n }\n },\n PossiblyWeakMap = \"function\" === typeof WeakMap ? WeakMap : Map,\n executionContext = 0,\n workInProgressRoot = null,\n workInProgress = null,\n workInProgressRootRenderLanes = 0,\n workInProgressSuspendedReason = 0,\n workInProgressThrownValue = null,\n workInProgressRootDidSkipSuspendedSiblings = !1,\n workInProgressRootIsPrerendering = !1,\n workInProgressRootDidAttachPingListener = !1,\n entangledRenderLanes = 0,\n workInProgressRootExitStatus = 0,\n workInProgressRootSkippedLanes = 0,\n workInProgressRootInterleavedUpdatedLanes = 0,\n workInProgressRootPingedLanes = 0,\n workInProgressDeferredLane = 0,\n workInProgressSuspendedRetryLanes = 0,\n workInProgressRootConcurrentErrors = null,\n workInProgressRootRecoverableErrors = null,\n workInProgressRootDidIncludeRecursiveRenderUpdate = !1,\n globalMostRecentFallbackTime = 0,\n globalMostRecentTransitionTime = 0,\n workInProgressRootRenderTargetTime = Infinity,\n workInProgressTransitions = null,\n legacyErrorBoundariesThatAlreadyFailed = null,\n pendingEffectsStatus = 0,\n pendingEffectsRoot = null,\n pendingFinishedWork = null,\n pendingEffectsLanes = 0,\n pendingEffectsRemainingLanes = 0,\n pendingPassiveTransitions = null,\n pendingRecoverableErrors = null,\n nestedUpdateCount = 0,\n rootWithNestedUpdates = null;\nfunction requestUpdateLane() {\n return 0 !== (executionContext & 2) && 0 !== workInProgressRootRenderLanes\n ? workInProgressRootRenderLanes & -workInProgressRootRenderLanes\n : null !== ReactSharedInternals.T\n ? requestTransitionLane()\n : resolveUpdatePriority();\n}\nfunction requestDeferredLane() {\n if (0 === workInProgressDeferredLane)\n if (0 === (workInProgressRootRenderLanes & 536870912) || isHydrating) {\n var lane = nextTransitionDeferredLane;\n nextTransitionDeferredLane <<= 1;\n 0 === (nextTransitionDeferredLane & 3932160) &&\n (nextTransitionDeferredLane = 262144);\n workInProgressDeferredLane = lane;\n } else workInProgressDeferredLane = 536870912;\n lane = suspenseHandlerStackCursor.current;\n null !== lane && (lane.flags |= 32);\n return workInProgressDeferredLane;\n}\nfunction scheduleUpdateOnFiber(root, fiber, lane) {\n if (\n (root === workInProgressRoot &&\n (2 === workInProgressSuspendedReason ||\n 9 === workInProgressSuspendedReason)) ||\n null !== root.cancelPendingCommit\n )\n prepareFreshStack(root, 0),\n markRootSuspended(\n root,\n workInProgressRootRenderLanes,\n workInProgressDeferredLane,\n !1\n );\n markRootUpdated$1(root, lane);\n if (0 === (executionContext & 2) || root !== workInProgressRoot)\n root === workInProgressRoot &&\n (0 === (executionContext & 2) &&\n (workInProgressRootInterleavedUpdatedLanes |= lane),\n 4 === workInProgressRootExitStatus &&\n markRootSuspended(\n root,\n workInProgressRootRenderLanes,\n workInProgressDeferredLane,\n !1\n )),\n ensureRootIsScheduled(root);\n}\nfunction performWorkOnRoot(root$jscomp$0, lanes, forceSync) {\n if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327));\n var shouldTimeSlice =\n (!forceSync &&\n 0 === (lanes & 127) &&\n 0 === (lanes & root$jscomp$0.expiredLanes)) ||\n checkIfRootIsPrerendering(root$jscomp$0, lanes),\n exitStatus = shouldTimeSlice\n ? renderRootConcurrent(root$jscomp$0, lanes)\n : renderRootSync(root$jscomp$0, lanes, !0),\n renderWasConcurrent = shouldTimeSlice;\n do {\n if (0 === exitStatus) {\n workInProgressRootIsPrerendering &&\n !shouldTimeSlice &&\n markRootSuspended(root$jscomp$0, lanes, 0, !1);\n break;\n } else {\n forceSync = root$jscomp$0.current.alternate;\n if (\n renderWasConcurrent &&\n !isRenderConsistentWithExternalStores(forceSync)\n ) {\n exitStatus = renderRootSync(root$jscomp$0, lanes, !1);\n renderWasConcurrent = !1;\n continue;\n }\n if (2 === exitStatus) {\n renderWasConcurrent = lanes;\n if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent)\n var JSCompiler_inline_result = 0;\n else\n (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913),\n (JSCompiler_inline_result =\n 0 !== JSCompiler_inline_result\n ? JSCompiler_inline_result\n : JSCompiler_inline_result & 536870912\n ? 536870912\n : 0);\n if (0 !== JSCompiler_inline_result) {\n lanes = JSCompiler_inline_result;\n a: {\n var root = root$jscomp$0;\n exitStatus = workInProgressRootConcurrentErrors;\n var wasRootDehydrated = root.current.memoizedState.isDehydrated;\n wasRootDehydrated &&\n (prepareFreshStack(root, JSCompiler_inline_result).flags |= 256);\n JSCompiler_inline_result = renderRootSync(\n root,\n JSCompiler_inline_result,\n !1\n );\n if (2 !== JSCompiler_inline_result) {\n if (\n workInProgressRootDidAttachPingListener &&\n !wasRootDehydrated\n ) {\n root.errorRecoveryDisabledLanes |= renderWasConcurrent;\n workInProgressRootInterleavedUpdatedLanes |=\n renderWasConcurrent;\n exitStatus = 4;\n break a;\n }\n renderWasConcurrent = workInProgressRootRecoverableErrors;\n workInProgressRootRecoverableErrors = exitStatus;\n null !== renderWasConcurrent &&\n (null === workInProgressRootRecoverableErrors\n ? (workInProgressRootRecoverableErrors = renderWasConcurrent)\n : workInProgressRootRecoverableErrors.push.apply(\n workInProgressRootRecoverableErrors,\n renderWasConcurrent\n ));\n }\n exitStatus = JSCompiler_inline_result;\n }\n renderWasConcurrent = !1;\n if (2 !== exitStatus) continue;\n }\n }\n if (1 === exitStatus) {\n prepareFreshStack(root$jscomp$0, 0);\n markRootSuspended(root$jscomp$0, lanes, 0, !0);\n break;\n }\n a: {\n shouldTimeSlice = root$jscomp$0;\n renderWasConcurrent = exitStatus;\n switch (renderWasConcurrent) {\n case 0:\n case 1:\n throw Error(formatProdErrorMessage(345));\n case 4:\n if ((lanes & 4194048) !== lanes) break;\n case 6:\n markRootSuspended(\n shouldTimeSlice,\n lanes,\n workInProgressDeferredLane,\n !workInProgressRootDidSkipSuspendedSiblings\n );\n break a;\n case 2:\n workInProgressRootRecoverableErrors = null;\n break;\n case 3:\n case 5:\n break;\n default:\n throw Error(formatProdErrorMessage(329));\n }\n if (\n (lanes & 62914560) === lanes &&\n ((exitStatus = globalMostRecentFallbackTime + 300 - now()),\n 10 < exitStatus)\n ) {\n markRootSuspended(\n shouldTimeSlice,\n lanes,\n workInProgressDeferredLane,\n !workInProgressRootDidSkipSuspendedSiblings\n );\n if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a;\n pendingEffectsLanes = lanes;\n shouldTimeSlice.timeoutHandle = scheduleTimeout(\n commitRootWhenReady.bind(\n null,\n shouldTimeSlice,\n forceSync,\n workInProgressRootRecoverableErrors,\n workInProgressTransitions,\n workInProgressRootDidIncludeRecursiveRenderUpdate,\n lanes,\n workInProgressDeferredLane,\n workInProgressRootInterleavedUpdatedLanes,\n workInProgressSuspendedRetryLanes,\n workInProgressRootDidSkipSuspendedSiblings,\n renderWasConcurrent,\n \"Throttled\",\n -0,\n 0\n ),\n exitStatus\n );\n break a;\n }\n commitRootWhenReady(\n shouldTimeSlice,\n forceSync,\n workInProgressRootRecoverableErrors,\n workInProgressTransitions,\n workInProgressRootDidIncludeRecursiveRenderUpdate,\n lanes,\n workInProgressDeferredLane,\n workInProgressRootInterleavedUpdatedLanes,\n workInProgressSuspendedRetryLanes,\n workInProgressRootDidSkipSuspendedSiblings,\n renderWasConcurrent,\n null,\n -0,\n 0\n );\n }\n }\n break;\n } while (1);\n ensureRootIsScheduled(root$jscomp$0);\n}\nfunction commitRootWhenReady(\n root,\n finishedWork,\n recoverableErrors,\n transitions,\n didIncludeRenderPhaseUpdate,\n lanes,\n spawnedLane,\n updatedLanes,\n suspendedRetryLanes,\n didSkipSuspendedSiblings,\n exitStatus,\n suspendedCommitReason,\n completedRenderStartTime,\n completedRenderEndTime\n) {\n root.timeoutHandle = -1;\n suspendedCommitReason = finishedWork.subtreeFlags;\n if (\n suspendedCommitReason & 8192 ||\n 16785408 === (suspendedCommitReason & 16785408)\n ) {\n suspendedCommitReason = {\n stylesheets: null,\n count: 0,\n imgCount: 0,\n imgBytes: 0,\n suspenseyImages: [],\n waitingForImages: !0,\n waitingForViewTransition: !1,\n unsuspend: noop$1\n };\n accumulateSuspenseyCommitOnFiber(\n finishedWork,\n lanes,\n suspendedCommitReason\n );\n var timeoutOffset =\n (lanes & 62914560) === lanes\n ? globalMostRecentFallbackTime - now()\n : (lanes & 4194048) === lanes\n ? globalMostRecentTransitionTime - now()\n : 0;\n timeoutOffset = waitForCommitToBeReady(\n suspendedCommitReason,\n timeoutOffset\n );\n if (null !== timeoutOffset) {\n pendingEffectsLanes = lanes;\n root.cancelPendingCommit = timeoutOffset(\n commitRoot.bind(\n null,\n root,\n finishedWork,\n lanes,\n recoverableErrors,\n transitions,\n didIncludeRenderPhaseUpdate,\n spawnedLane,\n updatedLanes,\n suspendedRetryLanes,\n exitStatus,\n suspendedCommitReason,\n null,\n completedRenderStartTime,\n completedRenderEndTime\n )\n );\n markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings);\n return;\n }\n }\n commitRoot(\n root,\n finishedWork,\n lanes,\n recoverableErrors,\n transitions,\n didIncludeRenderPhaseUpdate,\n spawnedLane,\n updatedLanes,\n suspendedRetryLanes\n );\n}\nfunction isRenderConsistentWithExternalStores(finishedWork) {\n for (var node = finishedWork; ; ) {\n var tag = node.tag;\n if (\n (0 === tag || 11 === tag || 15 === tag) &&\n node.flags & 16384 &&\n ((tag = node.updateQueue),\n null !== tag && ((tag = tag.stores), null !== tag))\n )\n for (var i = 0; i < tag.length; i++) {\n var check = tag[i],\n getSnapshot = check.getSnapshot;\n check = check.value;\n try {\n if (!objectIs(getSnapshot(), check)) return !1;\n } catch (error) {\n return !1;\n }\n }\n tag = node.child;\n if (node.subtreeFlags & 16384 && null !== tag)\n (tag.return = node), (node = tag);\n else {\n if (node === finishedWork) break;\n for (; null === node.sibling; ) {\n if (null === node.return || node.return === finishedWork) return !0;\n node = node.return;\n }\n node.sibling.return = node.return;\n node = node.sibling;\n }\n }\n return !0;\n}\nfunction markRootSuspended(\n root,\n suspendedLanes,\n spawnedLane,\n didAttemptEntireTree\n) {\n suspendedLanes &= ~workInProgressRootPingedLanes;\n suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes;\n root.suspendedLanes |= suspendedLanes;\n root.pingedLanes &= ~suspendedLanes;\n didAttemptEntireTree && (root.warmLanes |= suspendedLanes);\n didAttemptEntireTree = root.expirationTimes;\n for (var lanes = suspendedLanes; 0 < lanes; ) {\n var index$6 = 31 - clz32(lanes),\n lane = 1 << index$6;\n didAttemptEntireTree[index$6] = -1;\n lanes &= ~lane;\n }\n 0 !== spawnedLane &&\n markSpawnedDeferredLane(root, spawnedLane, suspendedLanes);\n}\nfunction flushSyncWork$1() {\n return 0 === (executionContext & 6)\n ? (flushSyncWorkAcrossRoots_impl(0, !1), !1)\n : !0;\n}\nfunction resetWorkInProgressStack() {\n if (null !== workInProgress) {\n if (0 === workInProgressSuspendedReason)\n var interruptedWork = workInProgress.return;\n else\n (interruptedWork = workInProgress),\n (lastContextDependency = currentlyRenderingFiber$1 = null),\n resetHooksOnUnwind(interruptedWork),\n (thenableState$1 = null),\n (thenableIndexCounter$1 = 0),\n (interruptedWork = workInProgress);\n for (; null !== interruptedWork; )\n unwindInterruptedWork(interruptedWork.alternate, interruptedWork),\n (interruptedWork = interruptedWork.return);\n workInProgress = null;\n }\n}\nfunction prepareFreshStack(root, lanes) {\n var timeoutHandle = root.timeoutHandle;\n -1 !== timeoutHandle &&\n ((root.timeoutHandle = -1), cancelTimeout(timeoutHandle));\n timeoutHandle = root.cancelPendingCommit;\n null !== timeoutHandle &&\n ((root.cancelPendingCommit = null), timeoutHandle());\n pendingEffectsLanes = 0;\n resetWorkInProgressStack();\n workInProgressRoot = root;\n workInProgress = timeoutHandle = createWorkInProgress(root.current, null);\n workInProgressRootRenderLanes = lanes;\n workInProgressSuspendedReason = 0;\n workInProgressThrownValue = null;\n workInProgressRootDidSkipSuspendedSiblings = !1;\n workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes);\n workInProgressRootDidAttachPingListener = !1;\n workInProgressSuspendedRetryLanes =\n workInProgressDeferredLane =\n workInProgressRootPingedLanes =\n workInProgressRootInterleavedUpdatedLanes =\n workInProgressRootSkippedLanes =\n workInProgressRootExitStatus =\n 0;\n workInProgressRootRecoverableErrors = workInProgressRootConcurrentErrors =\n null;\n workInProgressRootDidIncludeRecursiveRenderUpdate = !1;\n 0 !== (lanes & 8) && (lanes |= lanes & 32);\n var allEntangledLanes = root.entangledLanes;\n if (0 !== allEntangledLanes)\n for (\n root = root.entanglements, allEntangledLanes &= lanes;\n 0 < allEntangledLanes;\n\n ) {\n var index$4 = 31 - clz32(allEntangledLanes),\n lane = 1 << index$4;\n lanes |= root[index$4];\n allEntangledLanes &= ~lane;\n }\n entangledRenderLanes = lanes;\n finishQueueingConcurrentUpdates();\n return timeoutHandle;\n}\nfunction handleThrow(root, thrownValue) {\n currentlyRenderingFiber = null;\n ReactSharedInternals.H = ContextOnlyDispatcher;\n thrownValue === SuspenseException || thrownValue === SuspenseActionException\n ? ((thrownValue = getSuspendedThenable()),\n (workInProgressSuspendedReason = 3))\n : thrownValue === SuspenseyCommitException\n ? ((thrownValue = getSuspendedThenable()),\n (workInProgressSuspendedReason = 4))\n : (workInProgressSuspendedReason =\n thrownValue === SelectiveHydrationException\n ? 8\n : null !== thrownValue &&\n \"object\" === typeof thrownValue &&\n \"function\" === typeof thrownValue.then\n ? 6\n : 1);\n workInProgressThrownValue = thrownValue;\n null === workInProgress &&\n ((workInProgressRootExitStatus = 1),\n logUncaughtError(\n root,\n createCapturedValueAtFiber(thrownValue, root.current)\n ));\n}\nfunction shouldRemainOnPreviousScreen() {\n var handler = suspenseHandlerStackCursor.current;\n return null === handler\n ? !0\n : (workInProgressRootRenderLanes & 4194048) ===\n workInProgressRootRenderLanes\n ? null === shellBoundary\n ? !0\n : !1\n : (workInProgressRootRenderLanes & 62914560) ===\n workInProgressRootRenderLanes ||\n 0 !== (workInProgressRootRenderLanes & 536870912)\n ? handler === shellBoundary\n : !1;\n}\nfunction pushDispatcher() {\n var prevDispatcher = ReactSharedInternals.H;\n ReactSharedInternals.H = ContextOnlyDispatcher;\n return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher;\n}\nfunction pushAsyncDispatcher() {\n var prevAsyncDispatcher = ReactSharedInternals.A;\n ReactSharedInternals.A = DefaultAsyncDispatcher;\n return prevAsyncDispatcher;\n}\nfunction renderDidSuspendDelayIfPossible() {\n workInProgressRootExitStatus = 4;\n workInProgressRootDidSkipSuspendedSiblings ||\n ((workInProgressRootRenderLanes & 4194048) !==\n workInProgressRootRenderLanes &&\n null !== suspenseHandlerStackCursor.current) ||\n (workInProgressRootIsPrerendering = !0);\n (0 === (workInProgressRootSkippedLanes & 134217727) &&\n 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) ||\n null === workInProgressRoot ||\n markRootSuspended(\n workInProgressRoot,\n workInProgressRootRenderLanes,\n workInProgressDeferredLane,\n !1\n );\n}\nfunction renderRootSync(root, lanes, shouldYieldForPrerendering) {\n var prevExecutionContext = executionContext;\n executionContext |= 2;\n var prevDispatcher = pushDispatcher(),\n prevAsyncDispatcher = pushAsyncDispatcher();\n if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes)\n (workInProgressTransitions = null), prepareFreshStack(root, lanes);\n lanes = !1;\n var exitStatus = workInProgressRootExitStatus;\n a: do\n try {\n if (0 !== workInProgressSuspendedReason && null !== workInProgress) {\n var unitOfWork = workInProgress,\n thrownValue = workInProgressThrownValue;\n switch (workInProgressSuspendedReason) {\n case 8:\n resetWorkInProgressStack();\n exitStatus = 6;\n break a;\n case 3:\n case 2:\n case 9:\n case 6:\n null === suspenseHandlerStackCursor.current && (lanes = !0);\n var reason = workInProgressSuspendedReason;\n workInProgressSuspendedReason = 0;\n workInProgressThrownValue = null;\n throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason);\n if (\n shouldYieldForPrerendering &&\n workInProgressRootIsPrerendering\n ) {\n exitStatus = 0;\n break a;\n }\n break;\n default:\n (reason = workInProgressSuspendedReason),\n (workInProgressSuspendedReason = 0),\n (workInProgressThrownValue = null),\n throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason);\n }\n }\n workLoopSync();\n exitStatus = workInProgressRootExitStatus;\n break;\n } catch (thrownValue$165) {\n handleThrow(root, thrownValue$165);\n }\n while (1);\n lanes && root.shellSuspendCounter++;\n lastContextDependency = currentlyRenderingFiber$1 = null;\n executionContext = prevExecutionContext;\n ReactSharedInternals.H = prevDispatcher;\n ReactSharedInternals.A = prevAsyncDispatcher;\n null === workInProgress &&\n ((workInProgressRoot = null),\n (workInProgressRootRenderLanes = 0),\n finishQueueingConcurrentUpdates());\n return exitStatus;\n}\nfunction workLoopSync() {\n for (; null !== workInProgress; ) performUnitOfWork(workInProgress);\n}\nfunction renderRootConcurrent(root, lanes) {\n var prevExecutionContext = executionContext;\n executionContext |= 2;\n var prevDispatcher = pushDispatcher(),\n prevAsyncDispatcher = pushAsyncDispatcher();\n workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes\n ? ((workInProgressTransitions = null),\n (workInProgressRootRenderTargetTime = now() + 500),\n prepareFreshStack(root, lanes))\n : (workInProgressRootIsPrerendering = checkIfRootIsPrerendering(\n root,\n lanes\n ));\n a: do\n try {\n if (0 !== workInProgressSuspendedReason && null !== workInProgress) {\n lanes = workInProgress;\n var thrownValue = workInProgressThrownValue;\n b: switch (workInProgressSuspendedReason) {\n case 1:\n workInProgressSuspendedReason = 0;\n workInProgressThrownValue = null;\n throwAndUnwindWorkLoop(root, lanes, thrownValue, 1);\n break;\n case 2:\n case 9:\n if (isThenableResolved(thrownValue)) {\n workInProgressSuspendedReason = 0;\n workInProgressThrownValue = null;\n replaySuspendedUnitOfWork(lanes);\n break;\n }\n lanes = function () {\n (2 !== workInProgressSuspendedReason &&\n 9 !== workInProgressSuspendedReason) ||\n workInProgressRoot !== root ||\n (workInProgressSuspendedReason = 7);\n ensureRootIsScheduled(root);\n };\n thrownValue.then(lanes, lanes);\n break a;\n case 3:\n workInProgressSuspendedReason = 7;\n break a;\n case 4:\n workInProgressSuspendedReason = 5;\n break a;\n case 7:\n isThenableResolved(thrownValue)\n ? ((workInProgressSuspendedReason = 0),\n (workInProgressThrownValue = null),\n replaySuspendedUnitOfWork(lanes))\n : ((workInProgressSuspendedReason = 0),\n (workInProgressThrownValue = null),\n throwAndUnwindWorkLoop(root, lanes, thrownValue, 7));\n break;\n case 5:\n var resource = null;\n switch (workInProgress.tag) {\n case 26:\n resource = workInProgress.memoizedState;\n case 5:\n case 27:\n var hostFiber = workInProgress;\n if (\n resource\n ? preloadResource(resource)\n : hostFiber.stateNode.complete\n ) {\n workInProgressSuspendedReason = 0;\n workInProgressThrownValue = null;\n var sibling = hostFiber.sibling;\n if (null !== sibling) workInProgress = sibling;\n else {\n var returnFiber = hostFiber.return;\n null !== returnFiber\n ? ((workInProgress = returnFiber),\n completeUnitOfWork(returnFiber))\n : (workInProgress = null);\n }\n break b;\n }\n }\n workInProgressSuspendedReason = 0;\n workInProgressThrownValue = null;\n throwAndUnwindWorkLoop(root, lanes, thrownValue, 5);\n break;\n case 6:\n workInProgressSuspendedReason = 0;\n workInProgressThrownValue = null;\n throwAndUnwindWorkLoop(root, lanes, thrownValue, 6);\n break;\n case 8:\n resetWorkInProgressStack();\n workInProgressRootExitStatus = 6;\n break a;\n default:\n throw Error(formatProdErrorMessage(462));\n }\n }\n workLoopConcurrentByScheduler();\n break;\n } catch (thrownValue$167) {\n handleThrow(root, thrownValue$167);\n }\n while (1);\n lastContextDependency = currentlyRenderingFiber$1 = null;\n ReactSharedInternals.H = prevDispatcher;\n ReactSharedInternals.A = prevAsyncDispatcher;\n executionContext = prevExecutionContext;\n if (null !== workInProgress) return 0;\n workInProgressRoot = null;\n workInProgressRootRenderLanes = 0;\n finishQueueingConcurrentUpdates();\n return workInProgressRootExitStatus;\n}\nfunction workLoopConcurrentByScheduler() {\n for (; null !== workInProgress && !shouldYield(); )\n performUnitOfWork(workInProgress);\n}\nfunction performUnitOfWork(unitOfWork) {\n var next = beginWork(unitOfWork.alternate, unitOfWork, entangledRenderLanes);\n unitOfWork.memoizedProps = unitOfWork.pendingProps;\n null === next ? completeUnitOfWork(unitOfWork) : (workInProgress = next);\n}\nfunction replaySuspendedUnitOfWork(unitOfWork) {\n var next = unitOfWork;\n var current = next.alternate;\n switch (next.tag) {\n case 15:\n case 0:\n next = replayFunctionComponent(\n current,\n next,\n next.pendingProps,\n next.type,\n void 0,\n workInProgressRootRenderLanes\n );\n break;\n case 11:\n next = replayFunctionComponent(\n current,\n next,\n next.pendingProps,\n next.type.render,\n next.ref,\n workInProgressRootRenderLanes\n );\n break;\n case 5:\n resetHooksOnUnwind(next);\n default:\n unwindInterruptedWork(current, next),\n (next = workInProgress =\n resetWorkInProgress(next, entangledRenderLanes)),\n (next = beginWork(current, next, entangledRenderLanes));\n }\n unitOfWork.memoizedProps = unitOfWork.pendingProps;\n null === next ? completeUnitOfWork(unitOfWork) : (workInProgress = next);\n}\nfunction throwAndUnwindWorkLoop(\n root,\n unitOfWork,\n thrownValue,\n suspendedReason\n) {\n lastContextDependency = currentlyRenderingFiber$1 = null;\n resetHooksOnUnwind(unitOfWork);\n thenableState$1 = null;\n thenableIndexCounter$1 = 0;\n var returnFiber = unitOfWork.return;\n try {\n if (\n throwException(\n root,\n returnFiber,\n unitOfWork,\n thrownValue,\n workInProgressRootRenderLanes\n )\n ) {\n workInProgressRootExitStatus = 1;\n logUncaughtError(\n root,\n createCapturedValueAtFiber(thrownValue, root.current)\n );\n workInProgress = null;\n return;\n }\n } catch (error) {\n if (null !== returnFiber) throw ((workInProgress = returnFiber), error);\n workInProgressRootExitStatus = 1;\n logUncaughtError(\n root,\n createCapturedValueAtFiber(thrownValue, root.current)\n );\n workInProgress = null;\n return;\n }\n if (unitOfWork.flags & 32768) {\n if (isHydrating || 1 === suspendedReason) root = !0;\n else if (\n workInProgressRootIsPrerendering ||\n 0 !== (workInProgressRootRenderLanes & 536870912)\n )\n root = !1;\n else if (\n ((workInProgressRootDidSkipSuspendedSiblings = root = !0),\n 2 === suspendedReason ||\n 9 === suspendedReason ||\n 3 === suspendedReason ||\n 6 === suspendedReason)\n )\n (suspendedReason = suspenseHandlerStackCursor.current),\n null !== suspendedReason &&\n 13 === suspendedReason.tag &&\n (suspendedReason.flags |= 16384);\n unwindUnitOfWork(unitOfWork, root);\n } else completeUnitOfWork(unitOfWork);\n}\nfunction completeUnitOfWork(unitOfWork) {\n var completedWork = unitOfWork;\n do {\n if (0 !== (completedWork.flags & 32768)) {\n unwindUnitOfWork(\n completedWork,\n workInProgressRootDidSkipSuspendedSiblings\n );\n return;\n }\n unitOfWork = completedWork.return;\n var next = completeWork(\n completedWork.alternate,\n completedWork,\n entangledRenderLanes\n );\n if (null !== next) {\n workInProgress = next;\n return;\n }\n completedWork = completedWork.sibling;\n if (null !== completedWork) {\n workInProgress = completedWork;\n return;\n }\n workInProgress = completedWork = unitOfWork;\n } while (null !== completedWork);\n 0 === workInProgressRootExitStatus && (workInProgressRootExitStatus = 5);\n}\nfunction unwindUnitOfWork(unitOfWork, skipSiblings) {\n do {\n var next = unwindWork(unitOfWork.alternate, unitOfWork);\n if (null !== next) {\n next.flags &= 32767;\n workInProgress = next;\n return;\n }\n next = unitOfWork.return;\n null !== next &&\n ((next.flags |= 32768), (next.subtreeFlags = 0), (next.deletions = null));\n if (\n !skipSiblings &&\n ((unitOfWork = unitOfWork.sibling), null !== unitOfWork)\n ) {\n workInProgress = unitOfWork;\n return;\n }\n workInProgress = unitOfWork = next;\n } while (null !== unitOfWork);\n workInProgressRootExitStatus = 6;\n workInProgress = null;\n}\nfunction commitRoot(\n root,\n finishedWork,\n lanes,\n recoverableErrors,\n transitions,\n didIncludeRenderPhaseUpdate,\n spawnedLane,\n updatedLanes,\n suspendedRetryLanes\n) {\n root.cancelPendingCommit = null;\n do flushPendingEffects();\n while (0 !== pendingEffectsStatus);\n if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327));\n if (null !== finishedWork) {\n if (finishedWork === root.current) throw Error(formatProdErrorMessage(177));\n didIncludeRenderPhaseUpdate = finishedWork.lanes | finishedWork.childLanes;\n didIncludeRenderPhaseUpdate |= concurrentlyUpdatedLanes;\n markRootFinished(\n root,\n lanes,\n didIncludeRenderPhaseUpdate,\n spawnedLane,\n updatedLanes,\n suspendedRetryLanes\n );\n root === workInProgressRoot &&\n ((workInProgress = workInProgressRoot = null),\n (workInProgressRootRenderLanes = 0));\n pendingFinishedWork = finishedWork;\n pendingEffectsRoot = root;\n pendingEffectsLanes = lanes;\n pendingEffectsRemainingLanes = didIncludeRenderPhaseUpdate;\n pendingPassiveTransitions = transitions;\n pendingRecoverableErrors = recoverableErrors;\n 0 !== (finishedWork.subtreeFlags & 10256) ||\n 0 !== (finishedWork.flags & 10256)\n ? ((root.callbackNode = null),\n (root.callbackPriority = 0),\n scheduleCallback$1(NormalPriority$1, function () {\n flushPassiveEffects();\n return null;\n }))\n : ((root.callbackNode = null), (root.callbackPriority = 0));\n recoverableErrors = 0 !== (finishedWork.flags & 13878);\n if (0 !== (finishedWork.subtreeFlags & 13878) || recoverableErrors) {\n recoverableErrors = ReactSharedInternals.T;\n ReactSharedInternals.T = null;\n transitions = ReactDOMSharedInternals.p;\n ReactDOMSharedInternals.p = 2;\n spawnedLane = executionContext;\n executionContext |= 4;\n try {\n commitBeforeMutationEffects(root, finishedWork, lanes);\n } finally {\n (executionContext = spawnedLane),\n (ReactDOMSharedInternals.p = transitions),\n (ReactSharedInternals.T = recoverableErrors);\n }\n }\n pendingEffectsStatus = 1;\n flushMutationEffects();\n flushLayoutEffects();\n flushSpawnedWork();\n }\n}\nfunction flushMutationEffects() {\n if (1 === pendingEffectsStatus) {\n pendingEffectsStatus = 0;\n var root = pendingEffectsRoot,\n finishedWork = pendingFinishedWork,\n rootMutationHasEffect = 0 !== (finishedWork.flags & 13878);\n if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) {\n rootMutationHasEffect = ReactSharedInternals.T;\n ReactSharedInternals.T = null;\n var previousPriority = ReactDOMSharedInternals.p;\n ReactDOMSharedInternals.p = 2;\n var prevExecutionContext = executionContext;\n executionContext |= 4;\n try {\n commitMutationEffectsOnFiber(finishedWork, root);\n var priorSelectionInformation = selectionInformation,\n curFocusedElem = getActiveElementDeep(root.containerInfo),\n priorFocusedElem = priorSelectionInformation.focusedElem,\n priorSelectionRange = priorSelectionInformation.selectionRange;\n if (\n curFocusedElem !== priorFocusedElem &&\n priorFocusedElem &&\n priorFocusedElem.ownerDocument &&\n containsNode(\n priorFocusedElem.ownerDocument.documentElement,\n priorFocusedElem\n )\n ) {\n if (\n null !== priorSelectionRange &&\n hasSelectionCapabilities(priorFocusedElem)\n ) {\n var start = priorSelectionRange.start,\n end = priorSelectionRange.end;\n void 0 === end && (end = start);\n if (\"selectionStart\" in priorFocusedElem)\n (priorFocusedElem.selectionStart = start),\n (priorFocusedElem.selectionEnd = Math.min(\n end,\n priorFocusedElem.value.length\n ));\n else {\n var doc = priorFocusedElem.ownerDocument || document,\n win = (doc && doc.defaultView) || window;\n if (win.getSelection) {\n var selection = win.getSelection(),\n length = priorFocusedElem.textContent.length,\n start$jscomp$0 = Math.min(priorSelectionRange.start, length),\n end$jscomp$0 =\n void 0 === priorSelectionRange.end\n ? start$jscomp$0\n : Math.min(priorSelectionRange.end, length);\n !selection.extend &&\n start$jscomp$0 > end$jscomp$0 &&\n ((curFocusedElem = end$jscomp$0),\n (end$jscomp$0 = start$jscomp$0),\n (start$jscomp$0 = curFocusedElem));\n var startMarker = getNodeForCharacterOffset(\n priorFocusedElem,\n start$jscomp$0\n ),\n endMarker = getNodeForCharacterOffset(\n priorFocusedElem,\n end$jscomp$0\n );\n if (\n startMarker &&\n endMarker &&\n (1 !== selection.rangeCount ||\n selection.anchorNode !== startMarker.node ||\n selection.anchorOffset !== startMarker.offset ||\n selection.focusNode !== endMarker.node ||\n selection.focusOffset !== endMarker.offset)\n ) {\n var range = doc.createRange();\n range.setStart(startMarker.node, startMarker.offset);\n selection.removeAllRanges();\n start$jscomp$0 > end$jscomp$0\n ? (selection.addRange(range),\n selection.extend(endMarker.node, endMarker.offset))\n : (range.setEnd(endMarker.node, endMarker.offset),\n selection.addRange(range));\n }\n }\n }\n }\n doc = [];\n for (\n selection = priorFocusedElem;\n (selection = selection.parentNode);\n\n )\n 1 === selection.nodeType &&\n doc.push({\n element: selection,\n left: selection.scrollLeft,\n top: selection.scrollTop\n });\n \"function\" === typeof priorFocusedElem.focus &&\n priorFocusedElem.focus();\n for (\n priorFocusedElem = 0;\n priorFocusedElem < doc.length;\n priorFocusedElem++\n ) {\n var info = doc[priorFocusedElem];\n info.element.scrollLeft = info.left;\n info.element.scrollTop = info.top;\n }\n }\n _enabled = !!eventsEnabled;\n selectionInformation = eventsEnabled = null;\n } finally {\n (executionContext = prevExecutionContext),\n (ReactDOMSharedInternals.p = previousPriority),\n (ReactSharedInternals.T = rootMutationHasEffect);\n }\n }\n root.current = finishedWork;\n pendingEffectsStatus = 2;\n }\n}\nfunction flushLayoutEffects() {\n if (2 === pendingEffectsStatus) {\n pendingEffectsStatus = 0;\n var root = pendingEffectsRoot,\n finishedWork = pendingFinishedWork,\n rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772);\n if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) {\n rootHasLayoutEffect = ReactSharedInternals.T;\n ReactSharedInternals.T = null;\n var previousPriority = ReactDOMSharedInternals.p;\n ReactDOMSharedInternals.p = 2;\n var prevExecutionContext = executionContext;\n executionContext |= 4;\n try {\n commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork);\n } finally {\n (executionContext = prevExecutionContext),\n (ReactDOMSharedInternals.p = previousPriority),\n (ReactSharedInternals.T = rootHasLayoutEffect);\n }\n }\n pendingEffectsStatus = 3;\n }\n}\nfunction flushSpawnedWork() {\n if (4 === pendingEffectsStatus || 3 === pendingEffectsStatus) {\n pendingEffectsStatus = 0;\n requestPaint();\n var root = pendingEffectsRoot,\n finishedWork = pendingFinishedWork,\n lanes = pendingEffectsLanes,\n recoverableErrors = pendingRecoverableErrors;\n 0 !== (finishedWork.subtreeFlags & 10256) ||\n 0 !== (finishedWork.flags & 10256)\n ? (pendingEffectsStatus = 5)\n : ((pendingEffectsStatus = 0),\n (pendingFinishedWork = pendingEffectsRoot = null),\n releaseRootPooledCache(root, root.pendingLanes));\n var remainingLanes = root.pendingLanes;\n 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null);\n lanesToEventPriority(lanes);\n finishedWork = finishedWork.stateNode;\n if (injectedHook && \"function\" === typeof injectedHook.onCommitFiberRoot)\n try {\n injectedHook.onCommitFiberRoot(\n rendererID,\n finishedWork,\n void 0,\n 128 === (finishedWork.current.flags & 128)\n );\n } catch (err) {}\n if (null !== recoverableErrors) {\n finishedWork = ReactSharedInternals.T;\n remainingLanes = ReactDOMSharedInternals.p;\n ReactDOMSharedInternals.p = 2;\n ReactSharedInternals.T = null;\n try {\n for (\n var onRecoverableError = root.onRecoverableError, i = 0;\n i < recoverableErrors.length;\n i++\n ) {\n var recoverableError = recoverableErrors[i];\n onRecoverableError(recoverableError.value, {\n componentStack: recoverableError.stack\n });\n }\n } finally {\n (ReactSharedInternals.T = finishedWork),\n (ReactDOMSharedInternals.p = remainingLanes);\n }\n }\n 0 !== (pendingEffectsLanes & 3) && flushPendingEffects();\n ensureRootIsScheduled(root);\n remainingLanes = root.pendingLanes;\n 0 !== (lanes & 261930) && 0 !== (remainingLanes & 42)\n ? root === rootWithNestedUpdates\n ? nestedUpdateCount++\n : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))\n : (nestedUpdateCount = 0);\n flushSyncWorkAcrossRoots_impl(0, !1);\n }\n}\nfunction releaseRootPooledCache(root, remainingLanes) {\n 0 === (root.pooledCacheLanes &= remainingLanes) &&\n ((remainingLanes = root.pooledCache),\n null != remainingLanes &&\n ((root.pooledCache = null), releaseCache(remainingLanes)));\n}\nfunction flushPendingEffects() {\n flushMutationEffects();\n flushLayoutEffects();\n flushSpawnedWork();\n return flushPassiveEffects();\n}\nfunction flushPassiveEffects() {\n if (5 !== pendingEffectsStatus) return !1;\n var root = pendingEffectsRoot,\n remainingLanes = pendingEffectsRemainingLanes;\n pendingEffectsRemainingLanes = 0;\n var renderPriority = lanesToEventPriority(pendingEffectsLanes),\n prevTransition = ReactSharedInternals.T,\n previousPriority = ReactDOMSharedInternals.p;\n try {\n ReactDOMSharedInternals.p = 32 > renderPriority ? 32 : renderPriority;\n ReactSharedInternals.T = null;\n renderPriority = pendingPassiveTransitions;\n pendingPassiveTransitions = null;\n var root$jscomp$0 = pendingEffectsRoot,\n lanes = pendingEffectsLanes;\n pendingEffectsStatus = 0;\n pendingFinishedWork = pendingEffectsRoot = null;\n pendingEffectsLanes = 0;\n if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(331));\n var prevExecutionContext = executionContext;\n executionContext |= 4;\n commitPassiveUnmountOnFiber(root$jscomp$0.current);\n commitPassiveMountOnFiber(\n root$jscomp$0,\n root$jscomp$0.current,\n lanes,\n renderPriority\n );\n executionContext = prevExecutionContext;\n flushSyncWorkAcrossRoots_impl(0, !1);\n if (\n injectedHook &&\n \"function\" === typeof injectedHook.onPostCommitFiberRoot\n )\n try {\n injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0);\n } catch (err) {}\n return !0;\n } finally {\n (ReactDOMSharedInternals.p = previousPriority),\n (ReactSharedInternals.T = prevTransition),\n releaseRootPooledCache(root, remainingLanes);\n }\n}\nfunction captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {\n sourceFiber = createCapturedValueAtFiber(error, sourceFiber);\n sourceFiber = createRootErrorUpdate(rootFiber.stateNode, sourceFiber, 2);\n rootFiber = enqueueUpdate(rootFiber, sourceFiber, 2);\n null !== rootFiber &&\n (markRootUpdated$1(rootFiber, 2), ensureRootIsScheduled(rootFiber));\n}\nfunction captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) {\n if (3 === sourceFiber.tag)\n captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);\n else\n for (; null !== nearestMountedAncestor; ) {\n if (3 === nearestMountedAncestor.tag) {\n captureCommitPhaseErrorOnRoot(\n nearestMountedAncestor,\n sourceFiber,\n error\n );\n break;\n } else if (1 === nearestMountedAncestor.tag) {\n var instance = nearestMountedAncestor.stateNode;\n if (\n \"function\" ===\n typeof nearestMountedAncestor.type.getDerivedStateFromError ||\n (\"function\" === typeof instance.componentDidCatch &&\n (null === legacyErrorBoundariesThatAlreadyFailed ||\n !legacyErrorBoundariesThatAlreadyFailed.has(instance)))\n ) {\n sourceFiber = createCapturedValueAtFiber(error, sourceFiber);\n error = createClassErrorUpdate(2);\n instance = enqueueUpdate(nearestMountedAncestor, error, 2);\n null !== instance &&\n (initializeClassErrorUpdate(\n error,\n instance,\n nearestMountedAncestor,\n sourceFiber\n ),\n markRootUpdated$1(instance, 2),\n ensureRootIsScheduled(instance));\n break;\n }\n }\n nearestMountedAncestor = nearestMountedAncestor.return;\n }\n}\nfunction attachPingListener(root, wakeable, lanes) {\n var pingCache = root.pingCache;\n if (null === pingCache) {\n pingCache = root.pingCache = new PossiblyWeakMap();\n var threadIDs = new Set();\n pingCache.set(wakeable, threadIDs);\n } else\n (threadIDs = pingCache.get(wakeable)),\n void 0 === threadIDs &&\n ((threadIDs = new Set()), pingCache.set(wakeable, threadIDs));\n threadIDs.has(lanes) ||\n ((workInProgressRootDidAttachPingListener = !0),\n threadIDs.add(lanes),\n (root = pingSuspendedRoot.bind(null, root, wakeable, lanes)),\n wakeable.then(root, root));\n}\nfunction pingSuspendedRoot(root, wakeable, pingedLanes) {\n var pingCache = root.pingCache;\n null !== pingCache && pingCache.delete(wakeable);\n root.pingedLanes |= root.suspendedLanes & pingedLanes;\n root.warmLanes &= ~pingedLanes;\n workInProgressRoot === root &&\n (workInProgressRootRenderLanes & pingedLanes) === pingedLanes &&\n (4 === workInProgressRootExitStatus ||\n (3 === workInProgressRootExitStatus &&\n (workInProgressRootRenderLanes & 62914560) ===\n workInProgressRootRenderLanes &&\n 300 > now() - globalMostRecentFallbackTime)\n ? 0 === (executionContext & 2) && prepareFreshStack(root, 0)\n : (workInProgressRootPingedLanes |= pingedLanes),\n workInProgressSuspendedRetryLanes === workInProgressRootRenderLanes &&\n (workInProgressSuspendedRetryLanes = 0));\n ensureRootIsScheduled(root);\n}\nfunction retryTimedOutBoundary(boundaryFiber, retryLane) {\n 0 === retryLane && (retryLane = claimNextRetryLane());\n boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane);\n null !== boundaryFiber &&\n (markRootUpdated$1(boundaryFiber, retryLane),\n ensureRootIsScheduled(boundaryFiber));\n}\nfunction retryDehydratedSuspenseBoundary(boundaryFiber) {\n var suspenseState = boundaryFiber.memoizedState,\n retryLane = 0;\n null !== suspenseState && (retryLane = suspenseState.retryLane);\n retryTimedOutBoundary(boundaryFiber, retryLane);\n}\nfunction resolveRetryWakeable(boundaryFiber, wakeable) {\n var retryLane = 0;\n switch (boundaryFiber.tag) {\n case 31:\n case 13:\n var retryCache = boundaryFiber.stateNode;\n var suspenseState = boundaryFiber.memoizedState;\n null !== suspenseState && (retryLane = suspenseState.retryLane);\n break;\n case 19:\n retryCache = boundaryFiber.stateNode;\n break;\n case 22:\n retryCache = boundaryFiber.stateNode._retryCache;\n break;\n default:\n throw Error(formatProdErrorMessage(314));\n }\n null !== retryCache && retryCache.delete(wakeable);\n retryTimedOutBoundary(boundaryFiber, retryLane);\n}\nfunction scheduleCallback$1(priorityLevel, callback) {\n return scheduleCallback$3(priorityLevel, callback);\n}\nvar firstScheduledRoot = null,\n lastScheduledRoot = null,\n didScheduleMicrotask = !1,\n mightHavePendingSyncWork = !1,\n isFlushingWork = !1,\n currentEventTransitionLane = 0;\nfunction ensureRootIsScheduled(root) {\n root !== lastScheduledRoot &&\n null === root.next &&\n (null === lastScheduledRoot\n ? (firstScheduledRoot = lastScheduledRoot = root)\n : (lastScheduledRoot = lastScheduledRoot.next = root));\n mightHavePendingSyncWork = !0;\n didScheduleMicrotask ||\n ((didScheduleMicrotask = !0), scheduleImmediateRootScheduleTask());\n}\nfunction flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {\n if (!isFlushingWork && mightHavePendingSyncWork) {\n isFlushingWork = !0;\n do {\n var didPerformSomeWork = !1;\n for (var root$170 = firstScheduledRoot; null !== root$170; ) {\n if (!onlyLegacy)\n if (0 !== syncTransitionLanes) {\n var pendingLanes = root$170.pendingLanes;\n if (0 === pendingLanes) var JSCompiler_inline_result = 0;\n else {\n var suspendedLanes = root$170.suspendedLanes,\n pingedLanes = root$170.pingedLanes;\n JSCompiler_inline_result =\n (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1;\n JSCompiler_inline_result &=\n pendingLanes & ~(suspendedLanes & ~pingedLanes);\n JSCompiler_inline_result =\n JSCompiler_inline_result & 201326741\n ? (JSCompiler_inline_result & 201326741) | 1\n : JSCompiler_inline_result\n ? JSCompiler_inline_result | 2\n : 0;\n }\n 0 !== JSCompiler_inline_result &&\n ((didPerformSomeWork = !0),\n performSyncWorkOnRoot(root$170, JSCompiler_inline_result));\n } else\n (JSCompiler_inline_result = workInProgressRootRenderLanes),\n (JSCompiler_inline_result = getNextLanes(\n root$170,\n root$170 === workInProgressRoot ? JSCompiler_inline_result : 0,\n null !== root$170.cancelPendingCommit ||\n -1 !== root$170.timeoutHandle\n )),\n 0 === (JSCompiler_inline_result & 3) ||\n checkIfRootIsPrerendering(root$170, JSCompiler_inline_result) ||\n ((didPerformSomeWork = !0),\n performSyncWorkOnRoot(root$170, JSCompiler_inline_result));\n root$170 = root$170.next;\n }\n } while (didPerformSomeWork);\n isFlushingWork = !1;\n }\n}\nfunction processRootScheduleInImmediateTask() {\n processRootScheduleInMicrotask();\n}\nfunction processRootScheduleInMicrotask() {\n mightHavePendingSyncWork = didScheduleMicrotask = !1;\n var syncTransitionLanes = 0;\n 0 !== currentEventTransitionLane &&\n shouldAttemptEagerTransition() &&\n (syncTransitionLanes = currentEventTransitionLane);\n for (\n var currentTime = now(), prev = null, root = firstScheduledRoot;\n null !== root;\n\n ) {\n var next = root.next,\n nextLanes = scheduleTaskForRootDuringMicrotask(root, currentTime);\n if (0 === nextLanes)\n (root.next = null),\n null === prev ? (firstScheduledRoot = next) : (prev.next = next),\n null === next && (lastScheduledRoot = prev);\n else if (\n ((prev = root), 0 !== syncTransitionLanes || 0 !== (nextLanes & 3))\n )\n mightHavePendingSyncWork = !0;\n root = next;\n }\n (0 !== pendingEffectsStatus && 5 !== pendingEffectsStatus) ||\n flushSyncWorkAcrossRoots_impl(syncTransitionLanes, !1);\n 0 !== currentEventTransitionLane && (currentEventTransitionLane = 0);\n}\nfunction scheduleTaskForRootDuringMicrotask(root, currentTime) {\n for (\n var suspendedLanes = root.suspendedLanes,\n pingedLanes = root.pingedLanes,\n expirationTimes = root.expirationTimes,\n lanes = root.pendingLanes & -62914561;\n 0 < lanes;\n\n ) {\n var index$5 = 31 - clz32(lanes),\n lane = 1 << index$5,\n expirationTime = expirationTimes[index$5];\n if (-1 === expirationTime) {\n if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes))\n expirationTimes[index$5] = computeExpirationTime(lane, currentTime);\n } else expirationTime <= currentTime && (root.expiredLanes |= lane);\n lanes &= ~lane;\n }\n currentTime = workInProgressRoot;\n suspendedLanes = workInProgressRootRenderLanes;\n suspendedLanes = getNextLanes(\n root,\n root === currentTime ? suspendedLanes : 0,\n null !== root.cancelPendingCommit || -1 !== root.timeoutHandle\n );\n pingedLanes = root.callbackNode;\n if (\n 0 === suspendedLanes ||\n (root === currentTime &&\n (2 === workInProgressSuspendedReason ||\n 9 === workInProgressSuspendedReason)) ||\n null !== root.cancelPendingCommit\n )\n return (\n null !== pingedLanes &&\n null !== pingedLanes &&\n cancelCallback$1(pingedLanes),\n (root.callbackNode = null),\n (root.callbackPriority = 0)\n );\n if (\n 0 === (suspendedLanes & 3) ||\n checkIfRootIsPrerendering(root, suspendedLanes)\n ) {\n currentTime = suspendedLanes & -suspendedLanes;\n if (currentTime === root.callbackPriority) return currentTime;\n null !== pingedLanes && cancelCallback$1(pingedLanes);\n switch (lanesToEventPriority(suspendedLanes)) {\n case 2:\n case 8:\n suspendedLanes = UserBlockingPriority;\n break;\n case 32:\n suspendedLanes = NormalPriority$1;\n break;\n case 268435456:\n suspendedLanes = IdlePriority;\n break;\n default:\n suspendedLanes = NormalPriority$1;\n }\n pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root);\n suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes);\n root.callbackPriority = currentTime;\n root.callbackNode = suspendedLanes;\n return currentTime;\n }\n null !== pingedLanes && null !== pingedLanes && cancelCallback$1(pingedLanes);\n root.callbackPriority = 2;\n root.callbackNode = null;\n return 2;\n}\nfunction performWorkOnRootViaSchedulerTask(root, didTimeout) {\n if (0 !== pendingEffectsStatus && 5 !== pendingEffectsStatus)\n return (root.callbackNode = null), (root.callbackPriority = 0), null;\n var originalCallbackNode = root.callbackNode;\n if (flushPendingEffects() && root.callbackNode !== originalCallbackNode)\n return null;\n var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes;\n workInProgressRootRenderLanes$jscomp$0 = getNextLanes(\n root,\n root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0,\n null !== root.cancelPendingCommit || -1 !== root.timeoutHandle\n );\n if (0 === workInProgressRootRenderLanes$jscomp$0) return null;\n performWorkOnRoot(root, workInProgressRootRenderLanes$jscomp$0, didTimeout);\n scheduleTaskForRootDuringMicrotask(root, now());\n return null != root.callbackNode && root.callbackNode === originalCallbackNode\n ? performWorkOnRootViaSchedulerTask.bind(null, root)\n : null;\n}\nfunction performSyncWorkOnRoot(root, lanes) {\n if (flushPendingEffects()) return null;\n performWorkOnRoot(root, lanes, !0);\n}\nfunction scheduleImmediateRootScheduleTask() {\n scheduleMicrotask(function () {\n 0 !== (executionContext & 6)\n ? scheduleCallback$3(\n ImmediatePriority,\n processRootScheduleInImmediateTask\n )\n : processRootScheduleInMicrotask();\n });\n}\nfunction requestTransitionLane() {\n if (0 === currentEventTransitionLane) {\n var actionScopeLane = currentEntangledLane;\n 0 === actionScopeLane &&\n ((actionScopeLane = nextTransitionUpdateLane),\n (nextTransitionUpdateLane <<= 1),\n 0 === (nextTransitionUpdateLane & 261888) &&\n (nextTransitionUpdateLane = 256));\n currentEventTransitionLane = actionScopeLane;\n }\n return currentEventTransitionLane;\n}\nfunction coerceFormActionProp(actionProp) {\n return null == actionProp ||\n \"symbol\" === typeof actionProp ||\n \"boolean\" === typeof actionProp\n ? null\n : \"function\" === typeof actionProp\n ? actionProp\n : sanitizeURL(\"\" + actionProp);\n}\nfunction createFormDataWithSubmitter(form, submitter) {\n var temp = submitter.ownerDocument.createElement(\"input\");\n temp.name = submitter.name;\n temp.value = submitter.value;\n form.id && temp.setAttribute(\"form\", form.id);\n submitter.parentNode.insertBefore(temp, submitter);\n form = new FormData(form);\n temp.parentNode.removeChild(temp);\n return form;\n}\nfunction extractEvents$1(\n dispatchQueue,\n domEventName,\n maybeTargetInst,\n nativeEvent,\n nativeEventTarget\n) {\n if (\n \"submit\" === domEventName &&\n maybeTargetInst &&\n maybeTargetInst.stateNode === nativeEventTarget\n ) {\n var action = coerceFormActionProp(\n (nativeEventTarget[internalPropsKey] || null).action\n ),\n submitter = nativeEvent.submitter;\n submitter &&\n ((domEventName = (domEventName = submitter[internalPropsKey] || null)\n ? coerceFormActionProp(domEventName.formAction)\n : submitter.getAttribute(\"formAction\")),\n null !== domEventName && ((action = domEventName), (submitter = null)));\n var event = new SyntheticEvent(\n \"action\",\n \"action\",\n null,\n nativeEvent,\n nativeEventTarget\n );\n dispatchQueue.push({\n event: event,\n listeners: [\n {\n instance: null,\n listener: function () {\n if (nativeEvent.defaultPrevented) {\n if (0 !== currentEventTransitionLane) {\n var formData = submitter\n ? createFormDataWithSubmitter(nativeEventTarget, submitter)\n : new FormData(nativeEventTarget);\n startHostTransition(\n maybeTargetInst,\n {\n pending: !0,\n data: formData,\n method: nativeEventTarget.method,\n action: action\n },\n null,\n formData\n );\n }\n } else\n \"function\" === typeof action &&\n (event.preventDefault(),\n (formData = submitter\n ? createFormDataWithSubmitter(nativeEventTarget, submitter)\n : new FormData(nativeEventTarget)),\n startHostTransition(\n maybeTargetInst,\n {\n pending: !0,\n data: formData,\n method: nativeEventTarget.method,\n action: action\n },\n action,\n formData\n ));\n },\n currentTarget: nativeEventTarget\n }\n ]\n });\n }\n}\nfor (\n var i$jscomp$inline_1577 = 0;\n i$jscomp$inline_1577 < simpleEventPluginEvents.length;\n i$jscomp$inline_1577++\n) {\n var eventName$jscomp$inline_1578 =\n simpleEventPluginEvents[i$jscomp$inline_1577],\n domEventName$jscomp$inline_1579 =\n eventName$jscomp$inline_1578.toLowerCase(),\n capitalizedEvent$jscomp$inline_1580 =\n eventName$jscomp$inline_1578[0].toUpperCase() +\n eventName$jscomp$inline_1578.slice(1);\n registerSimpleEvent(\n domEventName$jscomp$inline_1579,\n \"on\" + capitalizedEvent$jscomp$inline_1580\n );\n}\nregisterSimpleEvent(ANIMATION_END, \"onAnimationEnd\");\nregisterSimpleEvent(ANIMATION_ITERATION, \"onAnimationIteration\");\nregisterSimpleEvent(ANIMATION_START, \"onAnimationStart\");\nregisterSimpleEvent(\"dblclick\", \"onDoubleClick\");\nregisterSimpleEvent(\"focusin\", \"onFocus\");\nregisterSimpleEvent(\"focusout\", \"onBlur\");\nregisterSimpleEvent(TRANSITION_RUN, \"onTransitionRun\");\nregisterSimpleEvent(TRANSITION_START, \"onTransitionStart\");\nregisterSimpleEvent(TRANSITION_CANCEL, \"onTransitionCancel\");\nregisterSimpleEvent(TRANSITION_END, \"onTransitionEnd\");\nregisterDirectEvent(\"onMouseEnter\", [\"mouseout\", \"mouseover\"]);\nregisterDirectEvent(\"onMouseLeave\", [\"mouseout\", \"mouseover\"]);\nregisterDirectEvent(\"onPointerEnter\", [\"pointerout\", \"pointerover\"]);\nregisterDirectEvent(\"onPointerLeave\", [\"pointerout\", \"pointerover\"]);\nregisterTwoPhaseEvent(\n \"onChange\",\n \"change click focusin focusout input keydown keyup selectionchange\".split(\" \")\n);\nregisterTwoPhaseEvent(\n \"onSelect\",\n \"focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange\".split(\n \" \"\n )\n);\nregisterTwoPhaseEvent(\"onBeforeInput\", [\n \"compositionend\",\n \"keypress\",\n \"textInput\",\n \"paste\"\n]);\nregisterTwoPhaseEvent(\n \"onCompositionEnd\",\n \"compositionend focusout keydown keypress keyup mousedown\".split(\" \")\n);\nregisterTwoPhaseEvent(\n \"onCompositionStart\",\n \"compositionstart focusout keydown keypress keyup mousedown\".split(\" \")\n);\nregisterTwoPhaseEvent(\n \"onCompositionUpdate\",\n \"compositionupdate focusout keydown keypress keyup mousedown\".split(\" \")\n);\nvar mediaEventTypes =\n \"abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting\".split(\n \" \"\n ),\n nonDelegatedEvents = new Set(\n \"beforetoggle cancel close invalid load scroll scrollend toggle\"\n .split(\" \")\n .concat(mediaEventTypes)\n );\nfunction processDispatchQueue(dispatchQueue, eventSystemFlags) {\n eventSystemFlags = 0 !== (eventSystemFlags & 4);\n for (var i = 0; i < dispatchQueue.length; i++) {\n var _dispatchQueue$i = dispatchQueue[i],\n event = _dispatchQueue$i.event;\n _dispatchQueue$i = _dispatchQueue$i.listeners;\n a: {\n var previousInstance = void 0;\n if (eventSystemFlags)\n for (\n var i$jscomp$0 = _dispatchQueue$i.length - 1;\n 0 <= i$jscomp$0;\n i$jscomp$0--\n ) {\n var _dispatchListeners$i = _dispatchQueue$i[i$jscomp$0],\n instance = _dispatchListeners$i.instance,\n currentTarget = _dispatchListeners$i.currentTarget;\n _dispatchListeners$i = _dispatchListeners$i.listener;\n if (instance !== previousInstance && event.isPropagationStopped())\n break a;\n previousInstance = _dispatchListeners$i;\n event.currentTarget = currentTarget;\n try {\n previousInstance(event);\n } catch (error) {\n reportGlobalError(error);\n }\n event.currentTarget = null;\n previousInstance = instance;\n }\n else\n for (\n i$jscomp$0 = 0;\n i$jscomp$0 < _dispatchQueue$i.length;\n i$jscomp$0++\n ) {\n _dispatchListeners$i = _dispatchQueue$i[i$jscomp$0];\n instance = _dispatchListeners$i.instance;\n currentTarget = _dispatchListeners$i.currentTarget;\n _dispatchListeners$i = _dispatchListeners$i.listener;\n if (instance !== previousInstance && event.isPropagationStopped())\n break a;\n previousInstance = _dispatchListeners$i;\n event.currentTarget = currentTarget;\n try {\n previousInstance(event);\n } catch (error) {\n reportGlobalError(error);\n }\n event.currentTarget = null;\n previousInstance = instance;\n }\n }\n }\n}\nfunction listenToNonDelegatedEvent(domEventName, targetElement) {\n var JSCompiler_inline_result = targetElement[internalEventHandlersKey];\n void 0 === JSCompiler_inline_result &&\n (JSCompiler_inline_result = targetElement[internalEventHandlersKey] =\n new Set());\n var listenerSetKey = domEventName + \"__bubble\";\n JSCompiler_inline_result.has(listenerSetKey) ||\n (addTrappedEventListener(targetElement, domEventName, 2, !1),\n JSCompiler_inline_result.add(listenerSetKey));\n}\nfunction listenToNativeEvent(domEventName, isCapturePhaseListener, target) {\n var eventSystemFlags = 0;\n isCapturePhaseListener && (eventSystemFlags |= 4);\n addTrappedEventListener(\n target,\n domEventName,\n eventSystemFlags,\n isCapturePhaseListener\n );\n}\nvar listeningMarker = \"_reactListening\" + Math.random().toString(36).slice(2);\nfunction listenToAllSupportedEvents(rootContainerElement) {\n if (!rootContainerElement[listeningMarker]) {\n rootContainerElement[listeningMarker] = !0;\n allNativeEvents.forEach(function (domEventName) {\n \"selectionchange\" !== domEventName &&\n (nonDelegatedEvents.has(domEventName) ||\n listenToNativeEvent(domEventName, !1, rootContainerElement),\n listenToNativeEvent(domEventName, !0, rootContainerElement));\n });\n var ownerDocument =\n 9 === rootContainerElement.nodeType\n ? rootContainerElement\n : rootContainerElement.ownerDocument;\n null === ownerDocument ||\n ownerDocument[listeningMarker] ||\n ((ownerDocument[listeningMarker] = !0),\n listenToNativeEvent(\"selectionchange\", !1, ownerDocument));\n }\n}\nfunction addTrappedEventListener(\n targetContainer,\n domEventName,\n eventSystemFlags,\n isCapturePhaseListener\n) {\n switch (getEventPriority(domEventName)) {\n case 2:\n var listenerWrapper = dispatchDiscreteEvent;\n break;\n case 8:\n listenerWrapper = dispatchContinuousEvent;\n break;\n default:\n listenerWrapper = dispatchEvent;\n }\n eventSystemFlags = listenerWrapper.bind(\n null,\n domEventName,\n eventSystemFlags,\n targetContainer\n );\n listenerWrapper = void 0;\n !passiveBrowserEventsSupported ||\n (\"touchstart\" !== domEventName &&\n \"touchmove\" !== domEventName &&\n \"wheel\" !== domEventName) ||\n (listenerWrapper = !0);\n isCapturePhaseListener\n ? void 0 !== listenerWrapper\n ? targetContainer.addEventListener(domEventName, eventSystemFlags, {\n capture: !0,\n passive: listenerWrapper\n })\n : targetContainer.addEventListener(domEventName, eventSystemFlags, !0)\n : void 0 !== listenerWrapper\n ? targetContainer.addEventListener(domEventName, eventSystemFlags, {\n passive: listenerWrapper\n })\n : targetContainer.addEventListener(domEventName, eventSystemFlags, !1);\n}\nfunction dispatchEventForPluginEventSystem(\n domEventName,\n eventSystemFlags,\n nativeEvent,\n targetInst$jscomp$0,\n targetContainer\n) {\n var ancestorInst = targetInst$jscomp$0;\n if (\n 0 === (eventSystemFlags & 1) &&\n 0 === (eventSystemFlags & 2) &&\n null !== targetInst$jscomp$0\n )\n a: for (;;) {\n if (null === targetInst$jscomp$0) return;\n var nodeTag = targetInst$jscomp$0.tag;\n if (3 === nodeTag || 4 === nodeTag) {\n var container = targetInst$jscomp$0.stateNode.containerInfo;\n if (container === targetContainer) break;\n if (4 === nodeTag)\n for (nodeTag = targetInst$jscomp$0.return; null !== nodeTag; ) {\n var grandTag = nodeTag.tag;\n if (\n (3 === grandTag || 4 === grandTag) &&\n nodeTag.stateNode.containerInfo === targetContainer\n )\n return;\n nodeTag = nodeTag.return;\n }\n for (; null !== container; ) {\n nodeTag = getClosestInstanceFromNode(container);\n if (null === nodeTag) return;\n grandTag = nodeTag.tag;\n if (\n 5 === grandTag ||\n 6 === grandTag ||\n 26 === grandTag ||\n 27 === grandTag\n ) {\n targetInst$jscomp$0 = ancestorInst = nodeTag;\n continue a;\n }\n container = container.parentNode;\n }\n }\n targetInst$jscomp$0 = targetInst$jscomp$0.return;\n }\n batchedUpdates$1(function () {\n var targetInst = ancestorInst,\n nativeEventTarget = getEventTarget(nativeEvent),\n dispatchQueue = [];\n a: {\n var reactName = topLevelEventsToReactNames.get(domEventName);\n if (void 0 !== reactName) {\n var SyntheticEventCtor = SyntheticEvent,\n reactEventType = domEventName;\n switch (domEventName) {\n case \"keypress\":\n if (0 === getEventCharCode(nativeEvent)) break a;\n case \"keydown\":\n case \"keyup\":\n SyntheticEventCtor = SyntheticKeyboardEvent;\n break;\n case \"focusin\":\n reactEventType = \"focus\";\n SyntheticEventCtor = SyntheticFocusEvent;\n break;\n case \"focusout\":\n reactEventType = \"blur\";\n SyntheticEventCtor = SyntheticFocusEvent;\n break;\n case \"beforeblur\":\n case \"afterblur\":\n SyntheticEventCtor = SyntheticFocusEvent;\n break;\n case \"click\":\n if (2 === nativeEvent.button) break a;\n case \"auxclick\":\n case \"dblclick\":\n case \"mousedown\":\n case \"mousemove\":\n case \"mouseup\":\n case \"mouseout\":\n case \"mouseover\":\n case \"contextmenu\":\n SyntheticEventCtor = SyntheticMouseEvent;\n break;\n case \"drag\":\n case \"dragend\":\n case \"dragenter\":\n case \"dragexit\":\n case \"dragleave\":\n case \"dragover\":\n case \"dragstart\":\n case \"drop\":\n SyntheticEventCtor = SyntheticDragEvent;\n break;\n case \"touchcancel\":\n case \"touchend\":\n case \"touchmove\":\n case \"touchstart\":\n SyntheticEventCtor = SyntheticTouchEvent;\n break;\n case ANIMATION_END:\n case ANIMATION_ITERATION:\n case ANIMATION_START:\n SyntheticEventCtor = SyntheticAnimationEvent;\n break;\n case TRANSITION_END:\n SyntheticEventCtor = SyntheticTransitionEvent;\n break;\n case \"scroll\":\n case \"scrollend\":\n SyntheticEventCtor = SyntheticUIEvent;\n break;\n case \"wheel\":\n SyntheticEventCtor = SyntheticWheelEvent;\n break;\n case \"copy\":\n case \"cut\":\n case \"paste\":\n SyntheticEventCtor = SyntheticClipboardEvent;\n break;\n case \"gotpointercapture\":\n case \"lostpointercapture\":\n case \"pointercancel\":\n case \"pointerdown\":\n case \"pointermove\":\n case \"pointerout\":\n case \"pointerover\":\n case \"pointerup\":\n SyntheticEventCtor = SyntheticPointerEvent;\n break;\n case \"toggle\":\n case \"beforetoggle\":\n SyntheticEventCtor = SyntheticToggleEvent;\n }\n var inCapturePhase = 0 !== (eventSystemFlags & 4),\n accumulateTargetOnly =\n !inCapturePhase &&\n (\"scroll\" === domEventName || \"scrollend\" === domEventName),\n reactEventName = inCapturePhase\n ? null !== reactName\n ? reactName + \"Capture\"\n : null\n : reactName;\n inCapturePhase = [];\n for (\n var instance = targetInst, lastHostComponent;\n null !== instance;\n\n ) {\n var _instance = instance;\n lastHostComponent = _instance.stateNode;\n _instance = _instance.tag;\n (5 !== _instance && 26 !== _instance && 27 !== _instance) ||\n null === lastHostComponent ||\n null === reactEventName ||\n ((_instance = getListener(instance, reactEventName)),\n null != _instance &&\n inCapturePhase.push(\n createDispatchListener(instance, _instance, lastHostComponent)\n ));\n if (accumulateTargetOnly) break;\n instance = instance.return;\n }\n 0 < inCapturePhase.length &&\n ((reactName = new SyntheticEventCtor(\n reactName,\n reactEventType,\n null,\n nativeEvent,\n nativeEventTarget\n )),\n dispatchQueue.push({ event: reactName, listeners: inCapturePhase }));\n }\n }\n if (0 === (eventSystemFlags & 7)) {\n a: {\n reactName =\n \"mouseover\" === domEventName || \"pointerover\" === domEventName;\n SyntheticEventCtor =\n \"mouseout\" === domEventName || \"pointerout\" === domEventName;\n if (\n reactName &&\n nativeEvent !== currentReplayingEvent &&\n (reactEventType =\n nativeEvent.relatedTarget || nativeEvent.fromElement) &&\n (getClosestInstanceFromNode(reactEventType) ||\n reactEventType[internalContainerInstanceKey])\n )\n break a;\n if (SyntheticEventCtor || reactName) {\n reactName =\n nativeEventTarget.window === nativeEventTarget\n ? nativeEventTarget\n : (reactName = nativeEventTarget.ownerDocument)\n ? reactName.defaultView || reactName.parentWindow\n : window;\n if (SyntheticEventCtor) {\n if (\n ((reactEventType =\n nativeEvent.relatedTarget || nativeEvent.toElement),\n (SyntheticEventCtor = targetInst),\n (reactEventType = reactEventType\n ? getClosestInstanceFromNode(reactEventType)\n : null),\n null !== reactEventType &&\n ((accumulateTargetOnly =\n getNearestMountedFiber(reactEventType)),\n (inCapturePhase = reactEventType.tag),\n reactEventType !== accumulateTargetOnly ||\n (5 !== inCapturePhase &&\n 27 !== inCapturePhase &&\n 6 !== inCapturePhase)))\n )\n reactEventType = null;\n } else (SyntheticEventCtor = null), (reactEventType = targetInst);\n if (SyntheticEventCtor !== reactEventType) {\n inCapturePhase = SyntheticMouseEvent;\n _instance = \"onMouseLeave\";\n reactEventName = \"onMouseEnter\";\n instance = \"mouse\";\n if (\"pointerout\" === domEventName || \"pointerover\" === domEventName)\n (inCapturePhase = SyntheticPointerEvent),\n (_instance = \"onPointerLeave\"),\n (reactEventName = \"onPointerEnter\"),\n (instance = \"pointer\");\n accumulateTargetOnly =\n null == SyntheticEventCtor\n ? reactName\n : getNodeFromInstance(SyntheticEventCtor);\n lastHostComponent =\n null == reactEventType\n ? reactName\n : getNodeFromInstance(reactEventType);\n reactName = new inCapturePhase(\n _instance,\n instance + \"leave\",\n SyntheticEventCtor,\n nativeEvent,\n nativeEventTarget\n );\n reactName.target = accumulateTargetOnly;\n reactName.relatedTarget = lastHostComponent;\n _instance = null;\n getClosestInstanceFromNode(nativeEventTarget) === targetInst &&\n ((inCapturePhase = new inCapturePhase(\n reactEventName,\n instance + \"enter\",\n reactEventType,\n nativeEvent,\n nativeEventTarget\n )),\n (inCapturePhase.target = lastHostComponent),\n (inCapturePhase.relatedTarget = accumulateTargetOnly),\n (_instance = inCapturePhase));\n accumulateTargetOnly = _instance;\n if (SyntheticEventCtor && reactEventType)\n b: {\n inCapturePhase = getParent;\n reactEventName = SyntheticEventCtor;\n instance = reactEventType;\n lastHostComponent = 0;\n for (\n _instance = reactEventName;\n _instance;\n _instance = inCapturePhase(_instance)\n )\n lastHostComponent++;\n _instance = 0;\n for (var tempB = instance; tempB; tempB = inCapturePhase(tempB))\n _instance++;\n for (; 0 < lastHostComponent - _instance; )\n (reactEventName = inCapturePhase(reactEventName)),\n lastHostComponent--;\n for (; 0 < _instance - lastHostComponent; )\n (instance = inCapturePhase(instance)), _instance--;\n for (; lastHostComponent--; ) {\n if (\n reactEventName === instance ||\n (null !== instance && reactEventName === instance.alternate)\n ) {\n inCapturePhase = reactEventName;\n break b;\n }\n reactEventName = inCapturePhase(reactEventName);\n instance = inCapturePhase(instance);\n }\n inCapturePhase = null;\n }\n else inCapturePhase = null;\n null !== SyntheticEventCtor &&\n accumulateEnterLeaveListenersForEvent(\n dispatchQueue,\n reactName,\n SyntheticEventCtor,\n inCapturePhase,\n !1\n );\n null !== reactEventType &&\n null !== accumulateTargetOnly &&\n accumulateEnterLeaveListenersForEvent(\n dispatchQueue,\n accumulateTargetOnly,\n reactEventType,\n inCapturePhase,\n !0\n );\n }\n }\n }\n a: {\n reactName = targetInst ? getNodeFromInstance(targetInst) : window;\n SyntheticEventCtor =\n reactName.nodeName && reactName.nodeName.toLowerCase();\n if (\n \"select\" === SyntheticEventCtor ||\n (\"input\" === SyntheticEventCtor && \"file\" === reactName.type)\n )\n var getTargetInstFunc = getTargetInstForChangeEvent;\n else if (isTextInputElement(reactName))\n if (isInputEventSupported)\n getTargetInstFunc = getTargetInstForInputOrChangeEvent;\n else {\n getTargetInstFunc = getTargetInstForInputEventPolyfill;\n var handleEventFunc = handleEventsForInputEventPolyfill;\n }\n else\n (SyntheticEventCtor = reactName.nodeName),\n !SyntheticEventCtor ||\n \"input\" !== SyntheticEventCtor.toLowerCase() ||\n (\"checkbox\" !== reactName.type && \"radio\" !== reactName.type)\n ? targetInst &&\n isCustomElement(targetInst.elementType) &&\n (getTargetInstFunc = getTargetInstForChangeEvent)\n : (getTargetInstFunc = getTargetInstForClickEvent);\n if (\n getTargetInstFunc &&\n (getTargetInstFunc = getTargetInstFunc(domEventName, targetInst))\n ) {\n createAndAccumulateChangeEvent(\n dispatchQueue,\n getTargetInstFunc,\n nativeEvent,\n nativeEventTarget\n );\n break a;\n }\n handleEventFunc && handleEventFunc(domEventName, reactName, targetInst);\n \"focusout\" === domEventName &&\n targetInst &&\n \"number\" === reactName.type &&\n null != targetInst.memoizedProps.value &&\n setDefaultValue(reactName, \"number\", reactName.value);\n }\n handleEventFunc = targetInst ? getNodeFromInstance(targetInst) : window;\n switch (domEventName) {\n case \"focusin\":\n if (\n isTextInputElement(handleEventFunc) ||\n \"true\" === handleEventFunc.contentEditable\n )\n (activeElement = handleEventFunc),\n (activeElementInst = targetInst),\n (lastSelection = null);\n break;\n case \"focusout\":\n lastSelection = activeElementInst = activeElement = null;\n break;\n case \"mousedown\":\n mouseDown = !0;\n break;\n case \"contextmenu\":\n case \"mouseup\":\n case \"dragend\":\n mouseDown = !1;\n constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);\n break;\n case \"selectionchange\":\n if (skipSelectionChangeEvent) break;\n case \"keydown\":\n case \"keyup\":\n constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);\n }\n var fallbackData;\n if (canUseCompositionEvent)\n b: {\n switch (domEventName) {\n case \"compositionstart\":\n var eventType = \"onCompositionStart\";\n break b;\n case \"compositionend\":\n eventType = \"onCompositionEnd\";\n break b;\n case \"compositionupdate\":\n eventType = \"onCompositionUpdate\";\n break b;\n }\n eventType = void 0;\n }\n else\n isComposing\n ? isFallbackCompositionEnd(domEventName, nativeEvent) &&\n (eventType = \"onCompositionEnd\")\n : \"keydown\" === domEventName &&\n 229 === nativeEvent.keyCode &&\n (eventType = \"onCompositionStart\");\n eventType &&\n (useFallbackCompositionData &&\n \"ko\" !== nativeEvent.locale &&\n (isComposing || \"onCompositionStart\" !== eventType\n ? \"onCompositionEnd\" === eventType &&\n isComposing &&\n (fallbackData = getData())\n : ((root = nativeEventTarget),\n (startText = \"value\" in root ? root.value : root.textContent),\n (isComposing = !0))),\n (handleEventFunc = accumulateTwoPhaseListeners(targetInst, eventType)),\n 0 < handleEventFunc.length &&\n ((eventType = new SyntheticCompositionEvent(\n eventType,\n domEventName,\n null,\n nativeEvent,\n nativeEventTarget\n )),\n dispatchQueue.push({ event: eventType, listeners: handleEventFunc }),\n fallbackData\n ? (eventType.data = fallbackData)\n : ((fallbackData = getDataFromCustomEvent(nativeEvent)),\n null !== fallbackData && (eventType.data = fallbackData))));\n if (\n (fallbackData = canUseTextInputEvent\n ? getNativeBeforeInputChars(domEventName, nativeEvent)\n : getFallbackBeforeInputChars(domEventName, nativeEvent))\n )\n (eventType = accumulateTwoPhaseListeners(targetInst, \"onBeforeInput\")),\n 0 < eventType.length &&\n ((handleEventFunc = new SyntheticCompositionEvent(\n \"onBeforeInput\",\n \"beforeinput\",\n null,\n nativeEvent,\n nativeEventTarget\n )),\n dispatchQueue.push({\n event: handleEventFunc,\n listeners: eventType\n }),\n (handleEventFunc.data = fallbackData));\n extractEvents$1(\n dispatchQueue,\n domEventName,\n targetInst,\n nativeEvent,\n nativeEventTarget\n );\n }\n processDispatchQueue(dispatchQueue, eventSystemFlags);\n });\n}\nfunction createDispatchListener(instance, listener, currentTarget) {\n return {\n instance: instance,\n listener: listener,\n currentTarget: currentTarget\n };\n}\nfunction accumulateTwoPhaseListeners(targetFiber, reactName) {\n for (\n var captureName = reactName + \"Capture\", listeners = [];\n null !== targetFiber;\n\n ) {\n var _instance2 = targetFiber,\n stateNode = _instance2.stateNode;\n _instance2 = _instance2.tag;\n (5 !== _instance2 && 26 !== _instance2 && 27 !== _instance2) ||\n null === stateNode ||\n ((_instance2 = getListener(targetFiber, captureName)),\n null != _instance2 &&\n listeners.unshift(\n createDispatchListener(targetFiber, _instance2, stateNode)\n ),\n (_instance2 = getListener(targetFiber, reactName)),\n null != _instance2 &&\n listeners.push(\n createDispatchListener(targetFiber, _instance2, stateNode)\n ));\n if (3 === targetFiber.tag) return listeners;\n targetFiber = targetFiber.return;\n }\n return [];\n}\nfunction getParent(inst) {\n if (null === inst) return null;\n do inst = inst.return;\n while (inst && 5 !== inst.tag && 27 !== inst.tag);\n return inst ? inst : null;\n}\nfunction accumulateEnterLeaveListenersForEvent(\n dispatchQueue,\n event,\n target,\n common,\n inCapturePhase\n) {\n for (\n var registrationName = event._reactName, listeners = [];\n null !== target && target !== common;\n\n ) {\n var _instance3 = target,\n alternate = _instance3.alternate,\n stateNode = _instance3.stateNode;\n _instance3 = _instance3.tag;\n if (null !== alternate && alternate === common) break;\n (5 !== _instance3 && 26 !== _instance3 && 27 !== _instance3) ||\n null === stateNode ||\n ((alternate = stateNode),\n inCapturePhase\n ? ((stateNode = getListener(target, registrationName)),\n null != stateNode &&\n listeners.unshift(\n createDispatchListener(target, stateNode, alternate)\n ))\n : inCapturePhase ||\n ((stateNode = getListener(target, registrationName)),\n null != stateNode &&\n listeners.push(\n createDispatchListener(target, stateNode, alternate)\n )));\n target = target.return;\n }\n 0 !== listeners.length &&\n dispatchQueue.push({ event: event, listeners: listeners });\n}\nvar NORMALIZE_NEWLINES_REGEX = /\\r\\n?/g,\n NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\\u0000|\\uFFFD/g;\nfunction normalizeMarkupForTextOrAttribute(markup) {\n return (\"string\" === typeof markup ? markup : \"\" + markup)\n .replace(NORMALIZE_NEWLINES_REGEX, \"\\n\")\n .replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, \"\");\n}\nfunction checkForUnmatchedText(serverText, clientText) {\n clientText = normalizeMarkupForTextOrAttribute(clientText);\n return normalizeMarkupForTextOrAttribute(serverText) === clientText ? !0 : !1;\n}\nfunction setProp(domElement, tag, key, value, props, prevValue) {\n switch (key) {\n case \"children\":\n \"string\" === typeof value\n ? \"body\" === tag ||\n (\"textarea\" === tag && \"\" === value) ||\n setTextContent(domElement, value)\n : (\"number\" === typeof value || \"bigint\" === typeof value) &&\n \"body\" !== tag &&\n setTextContent(domElement, \"\" + value);\n break;\n case \"className\":\n setValueForKnownAttribute(domElement, \"class\", value);\n break;\n case \"tabIndex\":\n setValueForKnownAttribute(domElement, \"tabindex\", value);\n break;\n case \"dir\":\n case \"role\":\n case \"viewBox\":\n case \"width\":\n case \"height\":\n setValueForKnownAttribute(domElement, key, value);\n break;\n case \"style\":\n setValueForStyles(domElement, value, prevValue);\n break;\n case \"data\":\n if (\"object\" !== tag) {\n setValueForKnownAttribute(domElement, \"data\", value);\n break;\n }\n case \"src\":\n case \"href\":\n if (\"\" === value && (\"a\" !== tag || \"href\" !== key)) {\n domElement.removeAttribute(key);\n break;\n }\n if (\n null == value ||\n \"function\" === typeof value ||\n \"symbol\" === typeof value ||\n \"boolean\" === typeof value\n ) {\n domElement.removeAttribute(key);\n break;\n }\n value = sanitizeURL(\"\" + value);\n domElement.setAttribute(key, value);\n break;\n case \"action\":\n case \"formAction\":\n if (\"function\" === typeof value) {\n domElement.setAttribute(\n key,\n \"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')\"\n );\n break;\n } else\n \"function\" === typeof prevValue &&\n (\"formAction\" === key\n ? (\"input\" !== tag &&\n setProp(domElement, tag, \"name\", props.name, props, null),\n setProp(\n domElement,\n tag,\n \"formEncType\",\n props.formEncType,\n props,\n null\n ),\n setProp(\n domElement,\n tag,\n \"formMethod\",\n props.formMethod,\n props,\n null\n ),\n setProp(\n domElement,\n tag,\n \"formTarget\",\n props.formTarget,\n props,\n null\n ))\n : (setProp(domElement, tag, \"encType\", props.encType, props, null),\n setProp(domElement, tag, \"method\", props.method, props, null),\n setProp(domElement, tag, \"target\", props.target, props, null)));\n if (\n null == value ||\n \"symbol\" === typeof value ||\n \"boolean\" === typeof value\n ) {\n domElement.removeAttribute(key);\n break;\n }\n value = sanitizeURL(\"\" + value);\n domElement.setAttribute(key, value);\n break;\n case \"onClick\":\n null != value && (domElement.onclick = noop$1);\n break;\n case \"onScroll\":\n null != value && listenToNonDelegatedEvent(\"scroll\", domElement);\n break;\n case \"onScrollEnd\":\n null != value && listenToNonDelegatedEvent(\"scrollend\", domElement);\n break;\n case \"dangerouslySetInnerHTML\":\n if (null != value) {\n if (\"object\" !== typeof value || !(\"__html\" in value))\n throw Error(formatProdErrorMessage(61));\n key = value.__html;\n if (null != key) {\n if (null != props.children) throw Error(formatProdErrorMessage(60));\n domElement.innerHTML = key;\n }\n }\n break;\n case \"multiple\":\n domElement.multiple =\n value && \"function\" !== typeof value && \"symbol\" !== typeof value;\n break;\n case \"muted\":\n domElement.muted =\n value && \"function\" !== typeof value && \"symbol\" !== typeof value;\n break;\n case \"suppressContentEditableWarning\":\n case \"suppressHydrationWarning\":\n case \"defaultValue\":\n case \"defaultChecked\":\n case \"innerHTML\":\n case \"ref\":\n break;\n case \"autoFocus\":\n break;\n case \"xlinkHref\":\n if (\n null == value ||\n \"function\" === typeof value ||\n \"boolean\" === typeof value ||\n \"symbol\" === typeof value\n ) {\n domElement.removeAttribute(\"xlink:href\");\n break;\n }\n key = sanitizeURL(\"\" + value);\n domElement.setAttributeNS(\n \"http://www.w3.org/1999/xlink\",\n \"xlink:href\",\n key\n );\n break;\n case \"contentEditable\":\n case \"spellCheck\":\n case \"draggable\":\n case \"value\":\n case \"autoReverse\":\n case \"externalResourcesRequired\":\n case \"focusable\":\n case \"preserveAlpha\":\n null != value && \"function\" !== typeof value && \"symbol\" !== typeof value\n ? domElement.setAttribute(key, \"\" + value)\n : domElement.removeAttribute(key);\n break;\n case \"inert\":\n case \"allowFullScreen\":\n case \"async\":\n case \"autoPlay\":\n case \"controls\":\n case \"default\":\n case \"defer\":\n case \"disabled\":\n case \"disablePictureInPicture\":\n case \"disableRemotePlayback\":\n case \"formNoValidate\":\n case \"hidden\":\n case \"loop\":\n case \"noModule\":\n case \"noValidate\":\n case \"open\":\n case \"playsInline\":\n case \"readOnly\":\n case \"required\":\n case \"reversed\":\n case \"scoped\":\n case \"seamless\":\n case \"itemScope\":\n value && \"function\" !== typeof value && \"symbol\" !== typeof value\n ? domElement.setAttribute(key, \"\")\n : domElement.removeAttribute(key);\n break;\n case \"capture\":\n case \"download\":\n !0 === value\n ? domElement.setAttribute(key, \"\")\n : !1 !== value &&\n null != value &&\n \"function\" !== typeof value &&\n \"symbol\" !== typeof value\n ? domElement.setAttribute(key, value)\n : domElement.removeAttribute(key);\n break;\n case \"cols\":\n case \"rows\":\n case \"size\":\n case \"span\":\n null != value &&\n \"function\" !== typeof value &&\n \"symbol\" !== typeof value &&\n !isNaN(value) &&\n 1 <= value\n ? domElement.setAttribute(key, value)\n : domElement.removeAttribute(key);\n break;\n case \"rowSpan\":\n case \"start\":\n null == value ||\n \"function\" === typeof value ||\n \"symbol\" === typeof value ||\n isNaN(value)\n ? domElement.removeAttribute(key)\n : domElement.setAttribute(key, value);\n break;\n case \"popover\":\n listenToNonDelegatedEvent(\"beforetoggle\", domElement);\n listenToNonDelegatedEvent(\"toggle\", domElement);\n setValueForAttribute(domElement, \"popover\", value);\n break;\n case \"xlinkActuate\":\n setValueForNamespacedAttribute(\n domElement,\n \"http://www.w3.org/1999/xlink\",\n \"xlink:actuate\",\n value\n );\n break;\n case \"xlinkArcrole\":\n setValueForNamespacedAttribute(\n domElement,\n \"http://www.w3.org/1999/xlink\",\n \"xlink:arcrole\",\n value\n );\n break;\n case \"xlinkRole\":\n setValueForNamespacedAttribute(\n domElement,\n \"http://www.w3.org/1999/xlink\",\n \"xlink:role\",\n value\n );\n break;\n case \"xlinkShow\":\n setValueForNamespacedAttribute(\n domElement,\n \"http://www.w3.org/1999/xlink\",\n \"xlink:show\",\n value\n );\n break;\n case \"xlinkTitle\":\n setValueForNamespacedAttribute(\n domElement,\n \"http://www.w3.org/1999/xlink\",\n \"xlink:title\",\n value\n );\n break;\n case \"xlinkType\":\n setValueForNamespacedAttribute(\n domElement,\n \"http://www.w3.org/1999/xlink\",\n \"xlink:type\",\n value\n );\n break;\n case \"xmlBase\":\n setValueForNamespacedAttribute(\n domElement,\n \"http://www.w3.org/XML/1998/namespace\",\n \"xml:base\",\n value\n );\n break;\n case \"xmlLang\":\n setValueForNamespacedAttribute(\n domElement,\n \"http://www.w3.org/XML/1998/namespace\",\n \"xml:lang\",\n value\n );\n break;\n case \"xmlSpace\":\n setValueForNamespacedAttribute(\n domElement,\n \"http://www.w3.org/XML/1998/namespace\",\n \"xml:space\",\n value\n );\n break;\n case \"is\":\n setValueForAttribute(domElement, \"is\", value);\n break;\n case \"innerText\":\n case \"textContent\":\n break;\n default:\n if (\n !(2 < key.length) ||\n (\"o\" !== key[0] && \"O\" !== key[0]) ||\n (\"n\" !== key[1] && \"N\" !== key[1])\n )\n (key = aliases.get(key) || key),\n setValueForAttribute(domElement, key, value);\n }\n}\nfunction setPropOnCustomElement(domElement, tag, key, value, props, prevValue) {\n switch (key) {\n case \"style\":\n setValueForStyles(domElement, value, prevValue);\n break;\n case \"dangerouslySetInnerHTML\":\n if (null != value) {\n if (\"object\" !== typeof value || !(\"__html\" in value))\n throw Error(formatProdErrorMessage(61));\n key = value.__html;\n if (null != key) {\n if (null != props.children) throw Error(formatProdErrorMessage(60));\n domElement.innerHTML = key;\n }\n }\n break;\n case \"children\":\n \"string\" === typeof value\n ? setTextContent(domElement, value)\n : (\"number\" === typeof value || \"bigint\" === typeof value) &&\n setTextContent(domElement, \"\" + value);\n break;\n case \"onScroll\":\n null != value && listenToNonDelegatedEvent(\"scroll\", domElement);\n break;\n case \"onScrollEnd\":\n null != value && listenToNonDelegatedEvent(\"scrollend\", domElement);\n break;\n case \"onClick\":\n null != value && (domElement.onclick = noop$1);\n break;\n case \"suppressContentEditableWarning\":\n case \"suppressHydrationWarning\":\n case \"innerHTML\":\n case \"ref\":\n break;\n case \"innerText\":\n case \"textContent\":\n break;\n default:\n if (!registrationNameDependencies.hasOwnProperty(key))\n a: {\n if (\n \"o\" === key[0] &&\n \"n\" === key[1] &&\n ((props = key.endsWith(\"Capture\")),\n (tag = key.slice(2, props ? key.length - 7 : void 0)),\n (prevValue = domElement[internalPropsKey] || null),\n (prevValue = null != prevValue ? prevValue[key] : null),\n \"function\" === typeof prevValue &&\n domElement.removeEventListener(tag, prevValue, props),\n \"function\" === typeof value)\n ) {\n \"function\" !== typeof prevValue &&\n null !== prevValue &&\n (key in domElement\n ? (domElement[key] = null)\n : domElement.hasAttribute(key) &&\n domElement.removeAttribute(key));\n domElement.addEventListener(tag, value, props);\n break a;\n }\n key in domElement\n ? (domElement[key] = value)\n : !0 === value\n ? domElement.setAttribute(key, \"\")\n : setValueForAttribute(domElement, key, value);\n }\n }\n}\nfunction setInitialProperties(domElement, tag, props) {\n switch (tag) {\n case \"div\":\n case \"span\":\n case \"svg\":\n case \"path\":\n case \"a\":\n case \"g\":\n case \"p\":\n case \"li\":\n break;\n case \"img\":\n listenToNonDelegatedEvent(\"error\", domElement);\n listenToNonDelegatedEvent(\"load\", domElement);\n var hasSrc = !1,\n hasSrcSet = !1,\n propKey;\n for (propKey in props)\n if (props.hasOwnProperty(propKey)) {\n var propValue = props[propKey];\n if (null != propValue)\n switch (propKey) {\n case \"src\":\n hasSrc = !0;\n break;\n case \"srcSet\":\n hasSrcSet = !0;\n break;\n case \"children\":\n case \"dangerouslySetInnerHTML\":\n throw Error(formatProdErrorMessage(137, tag));\n default:\n setProp(domElement, tag, propKey, propValue, props, null);\n }\n }\n hasSrcSet &&\n setProp(domElement, tag, \"srcSet\", props.srcSet, props, null);\n hasSrc && setProp(domElement, tag, \"src\", props.src, props, null);\n return;\n case \"input\":\n listenToNonDelegatedEvent(\"invalid\", domElement);\n var defaultValue = (propKey = propValue = hasSrcSet = null),\n checked = null,\n defaultChecked = null;\n for (hasSrc in props)\n if (props.hasOwnProperty(hasSrc)) {\n var propValue$184 = props[hasSrc];\n if (null != propValue$184)\n switch (hasSrc) {\n case \"name\":\n hasSrcSet = propValue$184;\n break;\n case \"type\":\n propValue = propValue$184;\n break;\n case \"checked\":\n checked = propValue$184;\n break;\n case \"defaultChecked\":\n defaultChecked = propValue$184;\n break;\n case \"value\":\n propKey = propValue$184;\n break;\n case \"defaultValue\":\n defaultValue = propValue$184;\n break;\n case \"children\":\n case \"dangerouslySetInnerHTML\":\n if (null != propValue$184)\n throw Error(formatProdErrorMessage(137, tag));\n break;\n default:\n setProp(domElement, tag, hasSrc, propValue$184, props, null);\n }\n }\n initInput(\n domElement,\n propKey,\n defaultValue,\n checked,\n defaultChecked,\n propValue,\n hasSrcSet,\n !1\n );\n return;\n case \"select\":\n listenToNonDelegatedEvent(\"invalid\", domElement);\n hasSrc = propValue = propKey = null;\n for (hasSrcSet in props)\n if (\n props.hasOwnProperty(hasSrcSet) &&\n ((defaultValue = props[hasSrcSet]), null != defaultValue)\n )\n switch (hasSrcSet) {\n case \"value\":\n propKey = defaultValue;\n break;\n case \"defaultValue\":\n propValue = defaultValue;\n break;\n case \"multiple\":\n hasSrc = defaultValue;\n default:\n setProp(domElement, tag, hasSrcSet, defaultValue, props, null);\n }\n tag = propKey;\n props = propValue;\n domElement.multiple = !!hasSrc;\n null != tag\n ? updateOptions(domElement, !!hasSrc, tag, !1)\n : null != props && updateOptions(domElement, !!hasSrc, props, !0);\n return;\n case \"textarea\":\n listenToNonDelegatedEvent(\"invalid\", domElement);\n propKey = hasSrcSet = hasSrc = null;\n for (propValue in props)\n if (\n props.hasOwnProperty(propValue) &&\n ((defaultValue = props[propValue]), null != defaultValue)\n )\n switch (propValue) {\n case \"value\":\n hasSrc = defaultValue;\n break;\n case \"defaultValue\":\n hasSrcSet = defaultValue;\n break;\n case \"children\":\n propKey = defaultValue;\n break;\n case \"dangerouslySetInnerHTML\":\n if (null != defaultValue) throw Error(formatProdErrorMessage(91));\n break;\n default:\n setProp(domElement, tag, propValue, defaultValue, props, null);\n }\n initTextarea(domElement, hasSrc, hasSrcSet, propKey);\n return;\n case \"option\":\n for (checked in props)\n if (\n props.hasOwnProperty(checked) &&\n ((hasSrc = props[checked]), null != hasSrc)\n )\n switch (checked) {\n case \"selected\":\n domElement.selected =\n hasSrc &&\n \"function\" !== typeof hasSrc &&\n \"symbol\" !== typeof hasSrc;\n break;\n default:\n setProp(domElement, tag, checked, hasSrc, props, null);\n }\n return;\n case \"dialog\":\n listenToNonDelegatedEvent(\"beforetoggle\", domElement);\n listenToNonDelegatedEvent(\"toggle\", domElement);\n listenToNonDelegatedEvent(\"cancel\", domElement);\n listenToNonDelegatedEvent(\"close\", domElement);\n break;\n case \"iframe\":\n case \"object\":\n listenToNonDelegatedEvent(\"load\", domElement);\n break;\n case \"video\":\n case \"audio\":\n for (hasSrc = 0; hasSrc < mediaEventTypes.length; hasSrc++)\n listenToNonDelegatedEvent(mediaEventTypes[hasSrc], domElement);\n break;\n case \"image\":\n listenToNonDelegatedEvent(\"error\", domElement);\n listenToNonDelegatedEvent(\"load\", domElement);\n break;\n case \"details\":\n listenToNonDelegatedEvent(\"toggle\", domElement);\n break;\n case \"embed\":\n case \"source\":\n case \"link\":\n listenToNonDelegatedEvent(\"error\", domElement),\n listenToNonDelegatedEvent(\"load\", domElement);\n case \"area\":\n case \"base\":\n case \"br\":\n case \"col\":\n case \"hr\":\n case \"keygen\":\n case \"meta\":\n case \"param\":\n case \"track\":\n case \"wbr\":\n case \"menuitem\":\n for (defaultChecked in props)\n if (\n props.hasOwnProperty(defaultChecked) &&\n ((hasSrc = props[defaultChecked]), null != hasSrc)\n )\n switch (defaultChecked) {\n case \"children\":\n case \"dangerouslySetInnerHTML\":\n throw Error(formatProdErrorMessage(137, tag));\n default:\n setProp(domElement, tag, defaultChecked, hasSrc, props, null);\n }\n return;\n default:\n if (isCustomElement(tag)) {\n for (propValue$184 in props)\n props.hasOwnProperty(propValue$184) &&\n ((hasSrc = props[propValue$184]),\n void 0 !== hasSrc &&\n setPropOnCustomElement(\n domElement,\n tag,\n propValue$184,\n hasSrc,\n props,\n void 0\n ));\n return;\n }\n }\n for (defaultValue in props)\n props.hasOwnProperty(defaultValue) &&\n ((hasSrc = props[defaultValue]),\n null != hasSrc &&\n setProp(domElement, tag, defaultValue, hasSrc, props, null));\n}\nfunction updateProperties(domElement, tag, lastProps, nextProps) {\n switch (tag) {\n case \"div\":\n case \"span\":\n case \"svg\":\n case \"path\":\n case \"a\":\n case \"g\":\n case \"p\":\n case \"li\":\n break;\n case \"input\":\n var name = null,\n type = null,\n value = null,\n defaultValue = null,\n lastDefaultValue = null,\n checked = null,\n defaultChecked = null;\n for (propKey in lastProps) {\n var lastProp = lastProps[propKey];\n if (lastProps.hasOwnProperty(propKey) && null != lastProp)\n switch (propKey) {\n case \"checked\":\n break;\n case \"value\":\n break;\n case \"defaultValue\":\n lastDefaultValue = lastProp;\n default:\n nextProps.hasOwnProperty(propKey) ||\n setProp(domElement, tag, propKey, null, nextProps, lastProp);\n }\n }\n for (var propKey$201 in nextProps) {\n var propKey = nextProps[propKey$201];\n lastProp = lastProps[propKey$201];\n if (\n nextProps.hasOwnProperty(propKey$201) &&\n (null != propKey || null != lastProp)\n )\n switch (propKey$201) {\n case \"type\":\n type = propKey;\n break;\n case \"name\":\n name = propKey;\n break;\n case \"checked\":\n checked = propKey;\n break;\n case \"defaultChecked\":\n defaultChecked = propKey;\n break;\n case \"value\":\n value = propKey;\n break;\n case \"defaultValue\":\n defaultValue = propKey;\n break;\n case \"children\":\n case \"dangerouslySetInnerHTML\":\n if (null != propKey)\n throw Error(formatProdErrorMessage(137, tag));\n break;\n default:\n propKey !== lastProp &&\n setProp(\n domElement,\n tag,\n propKey$201,\n propKey,\n nextProps,\n lastProp\n );\n }\n }\n updateInput(\n domElement,\n value,\n defaultValue,\n lastDefaultValue,\n checked,\n defaultChecked,\n type,\n name\n );\n return;\n case \"select\":\n propKey = value = defaultValue = propKey$201 = null;\n for (type in lastProps)\n if (\n ((lastDefaultValue = lastProps[type]),\n lastProps.hasOwnProperty(type) && null != lastDefaultValue)\n )\n switch (type) {\n case \"value\":\n break;\n case \"multiple\":\n propKey = lastDefaultValue;\n default:\n nextProps.hasOwnProperty(type) ||\n setProp(\n domElement,\n tag,\n type,\n null,\n nextProps,\n lastDefaultValue\n );\n }\n for (name in nextProps)\n if (\n ((type = nextProps[name]),\n (lastDefaultValue = lastProps[name]),\n nextProps.hasOwnProperty(name) &&\n (null != type || null != lastDefaultValue))\n )\n switch (name) {\n case \"value\":\n propKey$201 = type;\n break;\n case \"defaultValue\":\n defaultValue = type;\n break;\n case \"multiple\":\n value = type;\n default:\n type !== lastDefaultValue &&\n setProp(\n domElement,\n tag,\n name,\n type,\n nextProps,\n lastDefaultValue\n );\n }\n tag = defaultValue;\n lastProps = value;\n nextProps = propKey;\n null != propKey$201\n ? updateOptions(domElement, !!lastProps, propKey$201, !1)\n : !!nextProps !== !!lastProps &&\n (null != tag\n ? updateOptions(domElement, !!lastProps, tag, !0)\n : updateOptions(domElement, !!lastProps, lastProps ? [] : \"\", !1));\n return;\n case \"textarea\":\n propKey = propKey$201 = null;\n for (defaultValue in lastProps)\n if (\n ((name = lastProps[defaultValue]),\n lastProps.hasOwnProperty(defaultValue) &&\n null != name &&\n !nextProps.hasOwnProperty(defaultValue))\n )\n switch (defaultValue) {\n case \"value\":\n break;\n case \"children\":\n break;\n default:\n setProp(domElement, tag, defaultValue, null, nextProps, name);\n }\n for (value in nextProps)\n if (\n ((name = nextProps[value]),\n (type = lastProps[value]),\n nextProps.hasOwnProperty(value) && (null != name || null != type))\n )\n switch (value) {\n case \"value\":\n propKey$201 = name;\n break;\n case \"defaultValue\":\n propKey = name;\n break;\n case \"children\":\n break;\n case \"dangerouslySetInnerHTML\":\n if (null != name) throw Error(formatProdErrorMessage(91));\n break;\n default:\n name !== type &&\n setProp(domElement, tag, value, name, nextProps, type);\n }\n updateTextarea(domElement, propKey$201, propKey);\n return;\n case \"option\":\n for (var propKey$217 in lastProps)\n if (\n ((propKey$201 = lastProps[propKey$217]),\n lastProps.hasOwnProperty(propKey$217) &&\n null != propKey$201 &&\n !nextProps.hasOwnProperty(propKey$217))\n )\n switch (propKey$217) {\n case \"selected\":\n domElement.selected = !1;\n break;\n default:\n setProp(\n domElement,\n tag,\n propKey$217,\n null,\n nextProps,\n propKey$201\n );\n }\n for (lastDefaultValue in nextProps)\n if (\n ((propKey$201 = nextProps[lastDefaultValue]),\n (propKey = lastProps[lastDefaultValue]),\n nextProps.hasOwnProperty(lastDefaultValue) &&\n propKey$201 !== propKey &&\n (null != propKey$201 || null != propKey))\n )\n switch (lastDefaultValue) {\n case \"selected\":\n domElement.selected =\n propKey$201 &&\n \"function\" !== typeof propKey$201 &&\n \"symbol\" !== typeof propKey$201;\n break;\n default:\n setProp(\n domElement,\n tag,\n lastDefaultValue,\n propKey$201,\n nextProps,\n propKey\n );\n }\n return;\n case \"img\":\n case \"link\":\n case \"area\":\n case \"base\":\n case \"br\":\n case \"col\":\n case \"embed\":\n case \"hr\":\n case \"keygen\":\n case \"meta\":\n case \"param\":\n case \"source\":\n case \"track\":\n case \"wbr\":\n case \"menuitem\":\n for (var propKey$222 in lastProps)\n (propKey$201 = lastProps[propKey$222]),\n lastProps.hasOwnProperty(propKey$222) &&\n null != propKey$201 &&\n !nextProps.hasOwnProperty(propKey$222) &&\n setProp(domElement, tag, propKey$222, null, nextProps, propKey$201);\n for (checked in nextProps)\n if (\n ((propKey$201 = nextProps[checked]),\n (propKey = lastProps[checked]),\n nextProps.hasOwnProperty(checked) &&\n propKey$201 !== propKey &&\n (null != propKey$201 || null != propKey))\n )\n switch (checked) {\n case \"children\":\n case \"dangerouslySetInnerHTML\":\n if (null != propKey$201)\n throw Error(formatProdErrorMessage(137, tag));\n break;\n default:\n setProp(\n domElement,\n tag,\n checked,\n propKey$201,\n nextProps,\n propKey\n );\n }\n return;\n default:\n if (isCustomElement(tag)) {\n for (var propKey$227 in lastProps)\n (propKey$201 = lastProps[propKey$227]),\n lastProps.hasOwnProperty(propKey$227) &&\n void 0 !== propKey$201 &&\n !nextProps.hasOwnProperty(propKey$227) &&\n setPropOnCustomElement(\n domElement,\n tag,\n propKey$227,\n void 0,\n nextProps,\n propKey$201\n );\n for (defaultChecked in nextProps)\n (propKey$201 = nextProps[defaultChecked]),\n (propKey = lastProps[defaultChecked]),\n !nextProps.hasOwnProperty(defaultChecked) ||\n propKey$201 === propKey ||\n (void 0 === propKey$201 && void 0 === propKey) ||\n setPropOnCustomElement(\n domElement,\n tag,\n defaultChecked,\n propKey$201,\n nextProps,\n propKey\n );\n return;\n }\n }\n for (var propKey$232 in lastProps)\n (propKey$201 = lastProps[propKey$232]),\n lastProps.hasOwnProperty(propKey$232) &&\n null != propKey$201 &&\n !nextProps.hasOwnProperty(propKey$232) &&\n setProp(domElement, tag, propKey$232, null, nextProps, propKey$201);\n for (lastProp in nextProps)\n (propKey$201 = nextProps[lastProp]),\n (propKey = lastProps[lastProp]),\n !nextProps.hasOwnProperty(lastProp) ||\n propKey$201 === propKey ||\n (null == propKey$201 && null == propKey) ||\n setProp(domElement, tag, lastProp, propKey$201, nextProps, propKey);\n}\nfunction isLikelyStaticResource(initiatorType) {\n switch (initiatorType) {\n case \"css\":\n case \"script\":\n case \"font\":\n case \"img\":\n case \"image\":\n case \"input\":\n case \"link\":\n return !0;\n default:\n return !1;\n }\n}\nfunction estimateBandwidth() {\n if (\"function\" === typeof performance.getEntriesByType) {\n for (\n var count = 0,\n bits = 0,\n resourceEntries = performance.getEntriesByType(\"resource\"),\n i = 0;\n i < resourceEntries.length;\n i++\n ) {\n var entry = resourceEntries[i],\n transferSize = entry.transferSize,\n initiatorType = entry.initiatorType,\n duration = entry.duration;\n if (transferSize && duration && isLikelyStaticResource(initiatorType)) {\n initiatorType = 0;\n duration = entry.responseEnd;\n for (i += 1; i < resourceEntries.length; i++) {\n var overlapEntry = resourceEntries[i],\n overlapStartTime = overlapEntry.startTime;\n if (overlapStartTime > duration) break;\n var overlapTransferSize = overlapEntry.transferSize,\n overlapInitiatorType = overlapEntry.initiatorType;\n overlapTransferSize &&\n isLikelyStaticResource(overlapInitiatorType) &&\n ((overlapEntry = overlapEntry.responseEnd),\n (initiatorType +=\n overlapTransferSize *\n (overlapEntry < duration\n ? 1\n : (duration - overlapStartTime) /\n (overlapEntry - overlapStartTime))));\n }\n --i;\n bits += (8 * (transferSize + initiatorType)) / (entry.duration / 1e3);\n count++;\n if (10 < count) break;\n }\n }\n if (0 < count) return bits / count / 1e6;\n }\n return navigator.connection &&\n ((count = navigator.connection.downlink), \"number\" === typeof count)\n ? count\n : 5;\n}\nvar eventsEnabled = null,\n selectionInformation = null;\nfunction getOwnerDocumentFromRootContainer(rootContainerElement) {\n return 9 === rootContainerElement.nodeType\n ? rootContainerElement\n : rootContainerElement.ownerDocument;\n}\nfunction getOwnHostContext(namespaceURI) {\n switch (namespaceURI) {\n case \"http://www.w3.org/2000/svg\":\n return 1;\n case \"http://www.w3.org/1998/Math/MathML\":\n return 2;\n default:\n return 0;\n }\n}\nfunction getChildHostContextProd(parentNamespace, type) {\n if (0 === parentNamespace)\n switch (type) {\n case \"svg\":\n return 1;\n case \"math\":\n return 2;\n default:\n return 0;\n }\n return 1 === parentNamespace && \"foreignObject\" === type\n ? 0\n : parentNamespace;\n}\nfunction shouldSetTextContent(type, props) {\n return (\n \"textarea\" === type ||\n \"noscript\" === type ||\n \"string\" === typeof props.children ||\n \"number\" === typeof props.children ||\n \"bigint\" === typeof props.children ||\n (\"object\" === typeof props.dangerouslySetInnerHTML &&\n null !== props.dangerouslySetInnerHTML &&\n null != props.dangerouslySetInnerHTML.__html)\n );\n}\nvar currentPopstateTransitionEvent = null;\nfunction shouldAttemptEagerTransition() {\n var event = window.event;\n if (event && \"popstate\" === event.type) {\n if (event === currentPopstateTransitionEvent) return !1;\n currentPopstateTransitionEvent = event;\n return !0;\n }\n currentPopstateTransitionEvent = null;\n return !1;\n}\nvar scheduleTimeout = \"function\" === typeof setTimeout ? setTimeout : void 0,\n cancelTimeout = \"function\" === typeof clearTimeout ? clearTimeout : void 0,\n localPromise = \"function\" === typeof Promise ? Promise : void 0,\n scheduleMicrotask =\n \"function\" === typeof queueMicrotask\n ? queueMicrotask\n : \"undefined\" !== typeof localPromise\n ? function (callback) {\n return localPromise\n .resolve(null)\n .then(callback)\n .catch(handleErrorInNextTick);\n }\n : scheduleTimeout;\nfunction handleErrorInNextTick(error) {\n setTimeout(function () {\n throw error;\n });\n}\nfunction isSingletonScope(type) {\n return \"head\" === type;\n}\nfunction clearHydrationBoundary(parentInstance, hydrationInstance) {\n var node = hydrationInstance,\n depth = 0;\n do {\n var nextNode = node.nextSibling;\n parentInstance.removeChild(node);\n if (nextNode && 8 === nextNode.nodeType)\n if (((node = nextNode.data), \"/$\" === node || \"/&\" === node)) {\n if (0 === depth) {\n parentInstance.removeChild(nextNode);\n retryIfBlockedOn(hydrationInstance);\n return;\n }\n depth--;\n } else if (\n \"$\" === node ||\n \"$?\" === node ||\n \"$~\" === node ||\n \"$!\" === node ||\n \"&\" === node\n )\n depth++;\n else if (\"html\" === node)\n releaseSingletonInstance(parentInstance.ownerDocument.documentElement);\n else if (\"head\" === node) {\n node = parentInstance.ownerDocument.head;\n releaseSingletonInstance(node);\n for (var node$jscomp$0 = node.firstChild; node$jscomp$0; ) {\n var nextNode$jscomp$0 = node$jscomp$0.nextSibling,\n nodeName = node$jscomp$0.nodeName;\n node$jscomp$0[internalHoistableMarker] ||\n \"SCRIPT\" === nodeName ||\n \"STYLE\" === nodeName ||\n (\"LINK\" === nodeName &&\n \"stylesheet\" === node$jscomp$0.rel.toLowerCase()) ||\n node.removeChild(node$jscomp$0);\n node$jscomp$0 = nextNode$jscomp$0;\n }\n } else\n \"body\" === node &&\n releaseSingletonInstance(parentInstance.ownerDocument.body);\n node = nextNode;\n } while (node);\n retryIfBlockedOn(hydrationInstance);\n}\nfunction hideOrUnhideDehydratedBoundary(suspenseInstance, isHidden) {\n var node = suspenseInstance;\n suspenseInstance = 0;\n do {\n var nextNode = node.nextSibling;\n 1 === node.nodeType\n ? isHidden\n ? ((node._stashedDisplay = node.style.display),\n (node.style.display = \"none\"))\n : ((node.style.display = node._stashedDisplay || \"\"),\n \"\" === node.getAttribute(\"style\") && node.removeAttribute(\"style\"))\n : 3 === node.nodeType &&\n (isHidden\n ? ((node._stashedText = node.nodeValue), (node.nodeValue = \"\"))\n : (node.nodeValue = node._stashedText || \"\"));\n if (nextNode && 8 === nextNode.nodeType)\n if (((node = nextNode.data), \"/$\" === node))\n if (0 === suspenseInstance) break;\n else suspenseInstance--;\n else\n (\"$\" !== node && \"$?\" !== node && \"$~\" !== node && \"$!\" !== node) ||\n suspenseInstance++;\n node = nextNode;\n } while (node);\n}\nfunction clearContainerSparingly(container) {\n var nextNode = container.firstChild;\n nextNode && 10 === nextNode.nodeType && (nextNode = nextNode.nextSibling);\n for (; nextNode; ) {\n var node = nextNode;\n nextNode = nextNode.nextSibling;\n switch (node.nodeName) {\n case \"HTML\":\n case \"HEAD\":\n case \"BODY\":\n clearContainerSparingly(node);\n detachDeletedInstance(node);\n continue;\n case \"SCRIPT\":\n case \"STYLE\":\n continue;\n case \"LINK\":\n if (\"stylesheet\" === node.rel.toLowerCase()) continue;\n }\n container.removeChild(node);\n }\n}\nfunction canHydrateInstance(instance, type, props, inRootOrSingleton) {\n for (; 1 === instance.nodeType; ) {\n var anyProps = props;\n if (instance.nodeName.toLowerCase() !== type.toLowerCase()) {\n if (\n !inRootOrSingleton &&\n (\"INPUT\" !== instance.nodeName || \"hidden\" !== instance.type)\n )\n break;\n } else if (!inRootOrSingleton)\n if (\"input\" === type && \"hidden\" === instance.type) {\n var name = null == anyProps.name ? null : \"\" + anyProps.name;\n if (\n \"hidden\" === anyProps.type &&\n instance.getAttribute(\"name\") === name\n )\n return instance;\n } else return instance;\n else if (!instance[internalHoistableMarker])\n switch (type) {\n case \"meta\":\n if (!instance.hasAttribute(\"itemprop\")) break;\n return instance;\n case \"link\":\n name = instance.getAttribute(\"rel\");\n if (\"stylesheet\" === name && instance.hasAttribute(\"data-precedence\"))\n break;\n else if (\n name !== anyProps.rel ||\n instance.getAttribute(\"href\") !==\n (null == anyProps.href || \"\" === anyProps.href\n ? null\n : anyProps.href) ||\n instance.getAttribute(\"crossorigin\") !==\n (null == anyProps.crossOrigin ? null : anyProps.crossOrigin) ||\n instance.getAttribute(\"title\") !==\n (null == anyProps.title ? null : anyProps.title)\n )\n break;\n return instance;\n case \"style\":\n if (instance.hasAttribute(\"data-precedence\")) break;\n return instance;\n case \"script\":\n name = instance.getAttribute(\"src\");\n if (\n (name !== (null == anyProps.src ? null : anyProps.src) ||\n instance.getAttribute(\"type\") !==\n (null == anyProps.type ? null : anyProps.type) ||\n instance.getAttribute(\"crossorigin\") !==\n (null == anyProps.crossOrigin ? null : anyProps.crossOrigin)) &&\n name &&\n instance.hasAttribute(\"async\") &&\n !instance.hasAttribute(\"itemprop\")\n )\n break;\n return instance;\n default:\n return instance;\n }\n instance = getNextHydratable(instance.nextSibling);\n if (null === instance) break;\n }\n return null;\n}\nfunction canHydrateTextInstance(instance, text, inRootOrSingleton) {\n if (\"\" === text) return null;\n for (; 3 !== instance.nodeType; ) {\n if (\n (1 !== instance.nodeType ||\n \"INPUT\" !== instance.nodeName ||\n \"hidden\" !== instance.type) &&\n !inRootOrSingleton\n )\n return null;\n instance = getNextHydratable(instance.nextSibling);\n if (null === instance) return null;\n }\n return instance;\n}\nfunction canHydrateHydrationBoundary(instance, inRootOrSingleton) {\n for (; 8 !== instance.nodeType; ) {\n if (\n (1 !== instance.nodeType ||\n \"INPUT\" !== instance.nodeName ||\n \"hidden\" !== instance.type) &&\n !inRootOrSingleton\n )\n return null;\n instance = getNextHydratable(instance.nextSibling);\n if (null === instance) return null;\n }\n return instance;\n}\nfunction isSuspenseInstancePending(instance) {\n return \"$?\" === instance.data || \"$~\" === instance.data;\n}\nfunction isSuspenseInstanceFallback(instance) {\n return (\n \"$!\" === instance.data ||\n (\"$?\" === instance.data && \"loading\" !== instance.ownerDocument.readyState)\n );\n}\nfunction registerSuspenseInstanceRetry(instance, callback) {\n var ownerDocument = instance.ownerDocument;\n if (\"$~\" === instance.data) instance._reactRetry = callback;\n else if (\"$?\" !== instance.data || \"loading\" !== ownerDocument.readyState)\n callback();\n else {\n var listener = function () {\n callback();\n ownerDocument.removeEventListener(\"DOMContentLoaded\", listener);\n };\n ownerDocument.addEventListener(\"DOMContentLoaded\", listener);\n instance._reactRetry = listener;\n }\n}\nfunction getNextHydratable(node) {\n for (; null != node; node = node.nextSibling) {\n var nodeType = node.nodeType;\n if (1 === nodeType || 3 === nodeType) break;\n if (8 === nodeType) {\n nodeType = node.data;\n if (\n \"$\" === nodeType ||\n \"$!\" === nodeType ||\n \"$?\" === nodeType ||\n \"$~\" === nodeType ||\n \"&\" === nodeType ||\n \"F!\" === nodeType ||\n \"F\" === nodeType\n )\n break;\n if (\"/$\" === nodeType || \"/&\" === nodeType) return null;\n }\n }\n return node;\n}\nvar previousHydratableOnEnteringScopedSingleton = null;\nfunction getNextHydratableInstanceAfterHydrationBoundary(hydrationInstance) {\n hydrationInstance = hydrationInstance.nextSibling;\n for (var depth = 0; hydrationInstance; ) {\n if (8 === hydrationInstance.nodeType) {\n var data = hydrationInstance.data;\n if (\"/$\" === data || \"/&\" === data) {\n if (0 === depth)\n return getNextHydratable(hydrationInstance.nextSibling);\n depth--;\n } else\n (\"$\" !== data &&\n \"$!\" !== data &&\n \"$?\" !== data &&\n \"$~\" !== data &&\n \"&\" !== data) ||\n depth++;\n }\n hydrationInstance = hydrationInstance.nextSibling;\n }\n return null;\n}\nfunction getParentHydrationBoundary(targetInstance) {\n targetInstance = targetInstance.previousSibling;\n for (var depth = 0; targetInstance; ) {\n if (8 === targetInstance.nodeType) {\n var data = targetInstance.data;\n if (\n \"$\" === data ||\n \"$!\" === data ||\n \"$?\" === data ||\n \"$~\" === data ||\n \"&\" === data\n ) {\n if (0 === depth) return targetInstance;\n depth--;\n } else (\"/$\" !== data && \"/&\" !== data) || depth++;\n }\n targetInstance = targetInstance.previousSibling;\n }\n return null;\n}\nfunction resolveSingletonInstance(type, props, rootContainerInstance) {\n props = getOwnerDocumentFromRootContainer(rootContainerInstance);\n switch (type) {\n case \"html\":\n type = props.documentElement;\n if (!type) throw Error(formatProdErrorMessage(452));\n return type;\n case \"head\":\n type = props.head;\n if (!type) throw Error(formatProdErrorMessage(453));\n return type;\n case \"body\":\n type = props.body;\n if (!type) throw Error(formatProdErrorMessage(454));\n return type;\n default:\n throw Error(formatProdErrorMessage(451));\n }\n}\nfunction releaseSingletonInstance(instance) {\n for (var attributes = instance.attributes; attributes.length; )\n instance.removeAttributeNode(attributes[0]);\n detachDeletedInstance(instance);\n}\nvar preloadPropsMap = new Map(),\n preconnectsSet = new Set();\nfunction getHoistableRoot(container) {\n return \"function\" === typeof container.getRootNode\n ? container.getRootNode()\n : 9 === container.nodeType\n ? container\n : container.ownerDocument;\n}\nvar previousDispatcher = ReactDOMSharedInternals.d;\nReactDOMSharedInternals.d = {\n f: flushSyncWork,\n r: requestFormReset,\n D: prefetchDNS,\n C: preconnect,\n L: preload,\n m: preloadModule,\n X: preinitScript,\n S: preinitStyle,\n M: preinitModuleScript\n};\nfunction flushSyncWork() {\n var previousWasRendering = previousDispatcher.f(),\n wasRendering = flushSyncWork$1();\n return previousWasRendering || wasRendering;\n}\nfunction requestFormReset(form) {\n var formInst = getInstanceFromNode(form);\n null !== formInst && 5 === formInst.tag && \"form\" === formInst.type\n ? requestFormReset$1(formInst)\n : previousDispatcher.r(form);\n}\nvar globalDocument = \"undefined\" === typeof document ? null : document;\nfunction preconnectAs(rel, href, crossOrigin) {\n var ownerDocument = globalDocument;\n if (ownerDocument && \"string\" === typeof href && href) {\n var limitedEscapedHref =\n escapeSelectorAttributeValueInsideDoubleQuotes(href);\n limitedEscapedHref =\n 'link[rel=\"' + rel + '\"][href=\"' + limitedEscapedHref + '\"]';\n \"string\" === typeof crossOrigin &&\n (limitedEscapedHref += '[crossorigin=\"' + crossOrigin + '\"]');\n preconnectsSet.has(limitedEscapedHref) ||\n (preconnectsSet.add(limitedEscapedHref),\n (rel = { rel: rel, crossOrigin: crossOrigin, href: href }),\n null === ownerDocument.querySelector(limitedEscapedHref) &&\n ((href = ownerDocument.createElement(\"link\")),\n setInitialProperties(href, \"link\", rel),\n markNodeAsHoistable(href),\n ownerDocument.head.appendChild(href)));\n }\n}\nfunction prefetchDNS(href) {\n previousDispatcher.D(href);\n preconnectAs(\"dns-prefetch\", href, null);\n}\nfunction preconnect(href, crossOrigin) {\n previousDispatcher.C(href, crossOrigin);\n preconnectAs(\"preconnect\", href, crossOrigin);\n}\nfunction preload(href, as, options) {\n previousDispatcher.L(href, as, options);\n var ownerDocument = globalDocument;\n if (ownerDocument && href && as) {\n var preloadSelector =\n 'link[rel=\"preload\"][as=\"' +\n escapeSelectorAttributeValueInsideDoubleQuotes(as) +\n '\"]';\n \"image\" === as\n ? options && options.imageSrcSet\n ? ((preloadSelector +=\n '[imagesrcset=\"' +\n escapeSelectorAttributeValueInsideDoubleQuotes(\n options.imageSrcSet\n ) +\n '\"]'),\n \"string\" === typeof options.imageSizes &&\n (preloadSelector +=\n '[imagesizes=\"' +\n escapeSelectorAttributeValueInsideDoubleQuotes(\n options.imageSizes\n ) +\n '\"]'))\n : (preloadSelector +=\n '[href=\"' +\n escapeSelectorAttributeValueInsideDoubleQuotes(href) +\n '\"]')\n : (preloadSelector +=\n '[href=\"' +\n escapeSelectorAttributeValueInsideDoubleQuotes(href) +\n '\"]');\n var key = preloadSelector;\n switch (as) {\n case \"style\":\n key = getStyleKey(href);\n break;\n case \"script\":\n key = getScriptKey(href);\n }\n preloadPropsMap.has(key) ||\n ((href = assign(\n {\n rel: \"preload\",\n href:\n \"image\" === as && options && options.imageSrcSet ? void 0 : href,\n as: as\n },\n options\n )),\n preloadPropsMap.set(key, href),\n null !== ownerDocument.querySelector(preloadSelector) ||\n (\"style\" === as &&\n ownerDocument.querySelector(getStylesheetSelectorFromKey(key))) ||\n (\"script\" === as &&\n ownerDocument.querySelector(getScriptSelectorFromKey(key))) ||\n ((as = ownerDocument.createElement(\"link\")),\n setInitialProperties(as, \"link\", href),\n markNodeAsHoistable(as),\n ownerDocument.head.appendChild(as)));\n }\n}\nfunction preloadModule(href, options) {\n previousDispatcher.m(href, options);\n var ownerDocument = globalDocument;\n if (ownerDocument && href) {\n var as = options && \"string\" === typeof options.as ? options.as : \"script\",\n preloadSelector =\n 'link[rel=\"modulepreload\"][as=\"' +\n escapeSelectorAttributeValueInsideDoubleQuotes(as) +\n '\"][href=\"' +\n escapeSelectorAttributeValueInsideDoubleQuotes(href) +\n '\"]',\n key = preloadSelector;\n switch (as) {\n case \"audioworklet\":\n case \"paintworklet\":\n case \"serviceworker\":\n case \"sharedworker\":\n case \"worker\":\n case \"script\":\n key = getScriptKey(href);\n }\n if (\n !preloadPropsMap.has(key) &&\n ((href = assign({ rel: \"modulepreload\", href: href }, options)),\n preloadPropsMap.set(key, href),\n null === ownerDocument.querySelector(preloadSelector))\n ) {\n switch (as) {\n case \"audioworklet\":\n case \"paintworklet\":\n case \"serviceworker\":\n case \"sharedworker\":\n case \"worker\":\n case \"script\":\n if (ownerDocument.querySelector(getScriptSelectorFromKey(key)))\n return;\n }\n as = ownerDocument.createElement(\"link\");\n setInitialProperties(as, \"link\", href);\n markNodeAsHoistable(as);\n ownerDocument.head.appendChild(as);\n }\n }\n}\nfunction preinitStyle(href, precedence, options) {\n previousDispatcher.S(href, precedence, options);\n var ownerDocument = globalDocument;\n if (ownerDocument && href) {\n var styles = getResourcesFromRoot(ownerDocument).hoistableStyles,\n key = getStyleKey(href);\n precedence = precedence || \"default\";\n var resource = styles.get(key);\n if (!resource) {\n var state = { loading: 0, preload: null };\n if (\n (resource = ownerDocument.querySelector(\n getStylesheetSelectorFromKey(key)\n ))\n )\n state.loading = 5;\n else {\n href = assign(\n { rel: \"stylesheet\", href: href, \"data-precedence\": precedence },\n options\n );\n (options = preloadPropsMap.get(key)) &&\n adoptPreloadPropsForStylesheet(href, options);\n var link = (resource = ownerDocument.createElement(\"link\"));\n markNodeAsHoistable(link);\n setInitialProperties(link, \"link\", href);\n link._p = new Promise(function (resolve, reject) {\n link.onload = resolve;\n link.onerror = reject;\n });\n link.addEventListener(\"load\", function () {\n state.loading |= 1;\n });\n link.addEventListener(\"error\", function () {\n state.loading |= 2;\n });\n state.loading |= 4;\n insertStylesheet(resource, precedence, ownerDocument);\n }\n resource = {\n type: \"stylesheet\",\n instance: resource,\n count: 1,\n state: state\n };\n styles.set(key, resource);\n }\n }\n}\nfunction preinitScript(src, options) {\n previousDispatcher.X(src, options);\n var ownerDocument = globalDocument;\n if (ownerDocument && src) {\n var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts,\n key = getScriptKey(src),\n resource = scripts.get(key);\n resource ||\n ((resource = ownerDocument.querySelector(getScriptSelectorFromKey(key))),\n resource ||\n ((src = assign({ src: src, async: !0 }, options)),\n (options = preloadPropsMap.get(key)) &&\n adoptPreloadPropsForScript(src, options),\n (resource = ownerDocument.createElement(\"script\")),\n markNodeAsHoistable(resource),\n setInitialProperties(resource, \"link\", src),\n ownerDocument.head.appendChild(resource)),\n (resource = {\n type: \"script\",\n instance: resource,\n count: 1,\n state: null\n }),\n scripts.set(key, resource));\n }\n}\nfunction preinitModuleScript(src, options) {\n previousDispatcher.M(src, options);\n var ownerDocument = globalDocument;\n if (ownerDocument && src) {\n var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts,\n key = getScriptKey(src),\n resource = scripts.get(key);\n resource ||\n ((resource = ownerDocument.querySelector(getScriptSelectorFromKey(key))),\n resource ||\n ((src = assign({ src: src, async: !0, type: \"module\" }, options)),\n (options = preloadPropsMap.get(key)) &&\n adoptPreloadPropsForScript(src, options),\n (resource = ownerDocument.createElement(\"script\")),\n markNodeAsHoistable(resource),\n setInitialProperties(resource, \"link\", src),\n ownerDocument.head.appendChild(resource)),\n (resource = {\n type: \"script\",\n instance: resource,\n count: 1,\n state: null\n }),\n scripts.set(key, resource));\n }\n}\nfunction getResource(type, currentProps, pendingProps, currentResource) {\n var JSCompiler_inline_result = (JSCompiler_inline_result =\n rootInstanceStackCursor.current)\n ? getHoistableRoot(JSCompiler_inline_result)\n : null;\n if (!JSCompiler_inline_result) throw Error(formatProdErrorMessage(446));\n switch (type) {\n case \"meta\":\n case \"title\":\n return null;\n case \"style\":\n return \"string\" === typeof pendingProps.precedence &&\n \"string\" === typeof pendingProps.href\n ? ((currentProps = getStyleKey(pendingProps.href)),\n (pendingProps = getResourcesFromRoot(\n JSCompiler_inline_result\n ).hoistableStyles),\n (currentResource = pendingProps.get(currentProps)),\n currentResource ||\n ((currentResource = {\n type: \"style\",\n instance: null,\n count: 0,\n state: null\n }),\n pendingProps.set(currentProps, currentResource)),\n currentResource)\n : { type: \"void\", instance: null, count: 0, state: null };\n case \"link\":\n if (\n \"stylesheet\" === pendingProps.rel &&\n \"string\" === typeof pendingProps.href &&\n \"string\" === typeof pendingProps.precedence\n ) {\n type = getStyleKey(pendingProps.href);\n var styles$243 = getResourcesFromRoot(\n JSCompiler_inline_result\n ).hoistableStyles,\n resource$244 = styles$243.get(type);\n resource$244 ||\n ((JSCompiler_inline_result =\n JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result),\n (resource$244 = {\n type: \"stylesheet\",\n instance: null,\n count: 0,\n state: { loading: 0, preload: null }\n }),\n styles$243.set(type, resource$244),\n (styles$243 = JSCompiler_inline_result.querySelector(\n getStylesheetSelectorFromKey(type)\n )) &&\n !styles$243._p &&\n ((resource$244.instance = styles$243),\n (resource$244.state.loading = 5)),\n preloadPropsMap.has(type) ||\n ((pendingProps = {\n rel: \"preload\",\n as: \"style\",\n href: pendingProps.href,\n crossOrigin: pendingProps.crossOrigin,\n integrity: pendingProps.integrity,\n media: pendingProps.media,\n hrefLang: pendingProps.hrefLang,\n referrerPolicy: pendingProps.referrerPolicy\n }),\n preloadPropsMap.set(type, pendingProps),\n styles$243 ||\n preloadStylesheet(\n JSCompiler_inline_result,\n type,\n pendingProps,\n resource$244.state\n )));\n if (currentProps && null === currentResource)\n throw Error(formatProdErrorMessage(528, \"\"));\n return resource$244;\n }\n if (currentProps && null !== currentResource)\n throw Error(formatProdErrorMessage(529, \"\"));\n return null;\n case \"script\":\n return (\n (currentProps = pendingProps.async),\n (pendingProps = pendingProps.src),\n \"string\" === typeof pendingProps &&\n currentProps &&\n \"function\" !== typeof currentProps &&\n \"symbol\" !== typeof currentProps\n ? ((currentProps = getScriptKey(pendingProps)),\n (pendingProps = getResourcesFromRoot(\n JSCompiler_inline_result\n ).hoistableScripts),\n (currentResource = pendingProps.get(currentProps)),\n currentResource ||\n ((currentResource = {\n type: \"script\",\n instance: null,\n count: 0,\n state: null\n }),\n pendingProps.set(currentProps, currentResource)),\n currentResource)\n : { type: \"void\", instance: null, count: 0, state: null }\n );\n default:\n throw Error(formatProdErrorMessage(444, type));\n }\n}\nfunction getStyleKey(href) {\n return 'href=\"' + escapeSelectorAttributeValueInsideDoubleQuotes(href) + '\"';\n}\nfunction getStylesheetSelectorFromKey(key) {\n return 'link[rel=\"stylesheet\"][' + key + \"]\";\n}\nfunction stylesheetPropsFromRawProps(rawProps) {\n return assign({}, rawProps, {\n \"data-precedence\": rawProps.precedence,\n precedence: null\n });\n}\nfunction preloadStylesheet(ownerDocument, key, preloadProps, state) {\n ownerDocument.querySelector('link[rel=\"preload\"][as=\"style\"][' + key + \"]\")\n ? (state.loading = 1)\n : ((key = ownerDocument.createElement(\"link\")),\n (state.preload = key),\n key.addEventListener(\"load\", function () {\n return (state.loading |= 1);\n }),\n key.addEventListener(\"error\", function () {\n return (state.loading |= 2);\n }),\n setInitialProperties(key, \"link\", preloadProps),\n markNodeAsHoistable(key),\n ownerDocument.head.appendChild(key));\n}\nfunction getScriptKey(src) {\n return '[src=\"' + escapeSelectorAttributeValueInsideDoubleQuotes(src) + '\"]';\n}\nfunction getScriptSelectorFromKey(key) {\n return \"script[async]\" + key;\n}\nfunction acquireResource(hoistableRoot, resource, props) {\n resource.count++;\n if (null === resource.instance)\n switch (resource.type) {\n case \"style\":\n var instance = hoistableRoot.querySelector(\n 'style[data-href~=\"' +\n escapeSelectorAttributeValueInsideDoubleQuotes(props.href) +\n '\"]'\n );\n if (instance)\n return (\n (resource.instance = instance),\n markNodeAsHoistable(instance),\n instance\n );\n var styleProps = assign({}, props, {\n \"data-href\": props.href,\n \"data-precedence\": props.precedence,\n href: null,\n precedence: null\n });\n instance = (hoistableRoot.ownerDocument || hoistableRoot).createElement(\n \"style\"\n );\n markNodeAsHoistable(instance);\n setInitialProperties(instance, \"style\", styleProps);\n insertStylesheet(instance, props.precedence, hoistableRoot);\n return (resource.instance = instance);\n case \"stylesheet\":\n styleProps = getStyleKey(props.href);\n var instance$249 = hoistableRoot.querySelector(\n getStylesheetSelectorFromKey(styleProps)\n );\n if (instance$249)\n return (\n (resource.state.loading |= 4),\n (resource.instance = instance$249),\n markNodeAsHoistable(instance$249),\n instance$249\n );\n instance = stylesheetPropsFromRawProps(props);\n (styleProps = preloadPropsMap.get(styleProps)) &&\n adoptPreloadPropsForStylesheet(instance, styleProps);\n instance$249 = (\n hoistableRoot.ownerDocument || hoistableRoot\n ).createElement(\"link\");\n markNodeAsHoistable(instance$249);\n var linkInstance = instance$249;\n linkInstance._p = new Promise(function (resolve, reject) {\n linkInstance.onload = resolve;\n linkInstance.onerror = reject;\n });\n setInitialProperties(instance$249, \"link\", instance);\n resource.state.loading |= 4;\n insertStylesheet(instance$249, props.precedence, hoistableRoot);\n return (resource.instance = instance$249);\n case \"script\":\n instance$249 = getScriptKey(props.src);\n if (\n (styleProps = hoistableRoot.querySelector(\n getScriptSelectorFromKey(instance$249)\n ))\n )\n return (\n (resource.instance = styleProps),\n markNodeAsHoistable(styleProps),\n styleProps\n );\n instance = props;\n if ((styleProps = preloadPropsMap.get(instance$249)))\n (instance = assign({}, props)),\n adoptPreloadPropsForScript(instance, styleProps);\n hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;\n styleProps = hoistableRoot.createElement(\"script\");\n markNodeAsHoistable(styleProps);\n setInitialProperties(styleProps, \"link\", instance);\n hoistableRoot.head.appendChild(styleProps);\n return (resource.instance = styleProps);\n case \"void\":\n return null;\n default:\n throw Error(formatProdErrorMessage(443, resource.type));\n }\n else\n \"stylesheet\" === resource.type &&\n 0 === (resource.state.loading & 4) &&\n ((instance = resource.instance),\n (resource.state.loading |= 4),\n insertStylesheet(instance, props.precedence, hoistableRoot));\n return resource.instance;\n}\nfunction insertStylesheet(instance, precedence, root) {\n for (\n var nodes = root.querySelectorAll(\n 'link[rel=\"stylesheet\"][data-precedence],style[data-precedence]'\n ),\n last = nodes.length ? nodes[nodes.length - 1] : null,\n prior = last,\n i = 0;\n i < nodes.length;\n i++\n ) {\n var node = nodes[i];\n if (node.dataset.precedence === precedence) prior = node;\n else if (prior !== last) break;\n }\n prior\n ? prior.parentNode.insertBefore(instance, prior.nextSibling)\n : ((precedence = 9 === root.nodeType ? root.head : root),\n precedence.insertBefore(instance, precedence.firstChild));\n}\nfunction adoptPreloadPropsForStylesheet(stylesheetProps, preloadProps) {\n null == stylesheetProps.crossOrigin &&\n (stylesheetProps.crossOrigin = preloadProps.crossOrigin);\n null == stylesheetProps.referrerPolicy &&\n (stylesheetProps.referrerPolicy = preloadProps.referrerPolicy);\n null == stylesheetProps.title && (stylesheetProps.title = preloadProps.title);\n}\nfunction adoptPreloadPropsForScript(scriptProps, preloadProps) {\n null == scriptProps.crossOrigin &&\n (scriptProps.crossOrigin = preloadProps.crossOrigin);\n null == scriptProps.referrerPolicy &&\n (scriptProps.referrerPolicy = preloadProps.referrerPolicy);\n null == scriptProps.integrity &&\n (scriptProps.integrity = preloadProps.integrity);\n}\nvar tagCaches = null;\nfunction getHydratableHoistableCache(type, keyAttribute, ownerDocument) {\n if (null === tagCaches) {\n var cache = new Map();\n var caches = (tagCaches = new Map());\n caches.set(ownerDocument, cache);\n } else\n (caches = tagCaches),\n (cache = caches.get(ownerDocument)),\n cache || ((cache = new Map()), caches.set(ownerDocument, cache));\n if (cache.has(type)) return cache;\n cache.set(type, null);\n ownerDocument = ownerDocument.getElementsByTagName(type);\n for (caches = 0; caches < ownerDocument.length; caches++) {\n var node = ownerDocument[caches];\n if (\n !(\n node[internalHoistableMarker] ||\n node[internalInstanceKey] ||\n (\"link\" === type && \"stylesheet\" === node.getAttribute(\"rel\"))\n ) &&\n \"http://www.w3.org/2000/svg\" !== node.namespaceURI\n ) {\n var nodeKey = node.getAttribute(keyAttribute) || \"\";\n nodeKey = type + nodeKey;\n var existing = cache.get(nodeKey);\n existing ? existing.push(node) : cache.set(nodeKey, [node]);\n }\n }\n return cache;\n}\nfunction mountHoistable(hoistableRoot, type, instance) {\n hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;\n hoistableRoot.head.insertBefore(\n instance,\n \"title\" === type ? hoistableRoot.querySelector(\"head > title\") : null\n );\n}\nfunction isHostHoistableType(type, props, hostContext) {\n if (1 === hostContext || null != props.itemProp) return !1;\n switch (type) {\n case \"meta\":\n case \"title\":\n return !0;\n case \"style\":\n if (\n \"string\" !== typeof props.precedence ||\n \"string\" !== typeof props.href ||\n \"\" === props.href\n )\n break;\n return !0;\n case \"link\":\n if (\n \"string\" !== typeof props.rel ||\n \"string\" !== typeof props.href ||\n \"\" === props.href ||\n props.onLoad ||\n props.onError\n )\n break;\n switch (props.rel) {\n case \"stylesheet\":\n return (\n (type = props.disabled),\n \"string\" === typeof props.precedence && null == type\n );\n default:\n return !0;\n }\n case \"script\":\n if (\n props.async &&\n \"function\" !== typeof props.async &&\n \"symbol\" !== typeof props.async &&\n !props.onLoad &&\n !props.onError &&\n props.src &&\n \"string\" === typeof props.src\n )\n return !0;\n }\n return !1;\n}\nfunction preloadResource(resource) {\n return \"stylesheet\" === resource.type && 0 === (resource.state.loading & 3)\n ? !1\n : !0;\n}\nfunction suspendResource(state, hoistableRoot, resource, props) {\n if (\n \"stylesheet\" === resource.type &&\n (\"string\" !== typeof props.media ||\n !1 !== matchMedia(props.media).matches) &&\n 0 === (resource.state.loading & 4)\n ) {\n if (null === resource.instance) {\n var key = getStyleKey(props.href),\n instance = hoistableRoot.querySelector(\n getStylesheetSelectorFromKey(key)\n );\n if (instance) {\n hoistableRoot = instance._p;\n null !== hoistableRoot &&\n \"object\" === typeof hoistableRoot &&\n \"function\" === typeof hoistableRoot.then &&\n (state.count++,\n (state = onUnsuspend.bind(state)),\n hoistableRoot.then(state, state));\n resource.state.loading |= 4;\n resource.instance = instance;\n markNodeAsHoistable(instance);\n return;\n }\n instance = hoistableRoot.ownerDocument || hoistableRoot;\n props = stylesheetPropsFromRawProps(props);\n (key = preloadPropsMap.get(key)) &&\n adoptPreloadPropsForStylesheet(props, key);\n instance = instance.createElement(\"link\");\n markNodeAsHoistable(instance);\n var linkInstance = instance;\n linkInstance._p = new Promise(function (resolve, reject) {\n linkInstance.onload = resolve;\n linkInstance.onerror = reject;\n });\n setInitialProperties(instance, \"link\", props);\n resource.instance = instance;\n }\n null === state.stylesheets && (state.stylesheets = new Map());\n state.stylesheets.set(resource, hoistableRoot);\n (hoistableRoot = resource.state.preload) &&\n 0 === (resource.state.loading & 3) &&\n (state.count++,\n (resource = onUnsuspend.bind(state)),\n hoistableRoot.addEventListener(\"load\", resource),\n hoistableRoot.addEventListener(\"error\", resource));\n }\n}\nvar estimatedBytesWithinLimit = 0;\nfunction waitForCommitToBeReady(state, timeoutOffset) {\n state.stylesheets &&\n 0 === state.count &&\n insertSuspendedStylesheets(state, state.stylesheets);\n return 0 < state.count || 0 < state.imgCount\n ? function (commit) {\n var stylesheetTimer = setTimeout(function () {\n state.stylesheets &&\n insertSuspendedStylesheets(state, state.stylesheets);\n if (state.unsuspend) {\n var unsuspend = state.unsuspend;\n state.unsuspend = null;\n unsuspend();\n }\n }, 6e4 + timeoutOffset);\n 0 < state.imgBytes &&\n 0 === estimatedBytesWithinLimit &&\n (estimatedBytesWithinLimit = 62500 * estimateBandwidth());\n var imgTimer = setTimeout(\n function () {\n state.waitingForImages = !1;\n if (\n 0 === state.count &&\n (state.stylesheets &&\n insertSuspendedStylesheets(state, state.stylesheets),\n state.unsuspend)\n ) {\n var unsuspend = state.unsuspend;\n state.unsuspend = null;\n unsuspend();\n }\n },\n (state.imgBytes > estimatedBytesWithinLimit ? 50 : 800) +\n timeoutOffset\n );\n state.unsuspend = commit;\n return function () {\n state.unsuspend = null;\n clearTimeout(stylesheetTimer);\n clearTimeout(imgTimer);\n };\n }\n : null;\n}\nfunction onUnsuspend() {\n this.count--;\n if (0 === this.count && (0 === this.imgCount || !this.waitingForImages))\n if (this.stylesheets) insertSuspendedStylesheets(this, this.stylesheets);\n else if (this.unsuspend) {\n var unsuspend = this.unsuspend;\n this.unsuspend = null;\n unsuspend();\n }\n}\nvar precedencesByRoot = null;\nfunction insertSuspendedStylesheets(state, resources) {\n state.stylesheets = null;\n null !== state.unsuspend &&\n (state.count++,\n (precedencesByRoot = new Map()),\n resources.forEach(insertStylesheetIntoRoot, state),\n (precedencesByRoot = null),\n onUnsuspend.call(state));\n}\nfunction insertStylesheetIntoRoot(root, resource) {\n if (!(resource.state.loading & 4)) {\n var precedences = precedencesByRoot.get(root);\n if (precedences) var last = precedences.get(null);\n else {\n precedences = new Map();\n precedencesByRoot.set(root, precedences);\n for (\n var nodes = root.querySelectorAll(\n \"link[data-precedence],style[data-precedence]\"\n ),\n i = 0;\n i < nodes.length;\n i++\n ) {\n var node = nodes[i];\n if (\n \"LINK\" === node.nodeName ||\n \"not all\" !== node.getAttribute(\"media\")\n )\n precedences.set(node.dataset.precedence, node), (last = node);\n }\n last && precedences.set(null, last);\n }\n nodes = resource.instance;\n node = nodes.getAttribute(\"data-precedence\");\n i = precedences.get(node) || last;\n i === last && precedences.set(null, nodes);\n precedences.set(node, nodes);\n this.count++;\n last = onUnsuspend.bind(this);\n nodes.addEventListener(\"load\", last);\n nodes.addEventListener(\"error\", last);\n i\n ? i.parentNode.insertBefore(nodes, i.nextSibling)\n : ((root = 9 === root.nodeType ? root.head : root),\n root.insertBefore(nodes, root.firstChild));\n resource.state.loading |= 4;\n }\n}\nvar HostTransitionContext = {\n $$typeof: REACT_CONTEXT_TYPE,\n Provider: null,\n Consumer: null,\n _currentValue: sharedNotPendingObject,\n _currentValue2: sharedNotPendingObject,\n _threadCount: 0\n};\nfunction FiberRootNode(\n containerInfo,\n tag,\n hydrate,\n identifierPrefix,\n onUncaughtError,\n onCaughtError,\n onRecoverableError,\n onDefaultTransitionIndicator,\n formState\n) {\n this.tag = 1;\n this.containerInfo = containerInfo;\n this.pingCache = this.current = this.pendingChildren = null;\n this.timeoutHandle = -1;\n this.callbackNode =\n this.next =\n this.pendingContext =\n this.context =\n this.cancelPendingCommit =\n null;\n this.callbackPriority = 0;\n this.expirationTimes = createLaneMap(-1);\n this.entangledLanes =\n this.shellSuspendCounter =\n this.errorRecoveryDisabledLanes =\n this.expiredLanes =\n this.warmLanes =\n this.pingedLanes =\n this.suspendedLanes =\n this.pendingLanes =\n 0;\n this.entanglements = createLaneMap(0);\n this.hiddenUpdates = createLaneMap(null);\n this.identifierPrefix = identifierPrefix;\n this.onUncaughtError = onUncaughtError;\n this.onCaughtError = onCaughtError;\n this.onRecoverableError = onRecoverableError;\n this.pooledCache = null;\n this.pooledCacheLanes = 0;\n this.formState = formState;\n this.incompleteTransitions = new Map();\n}\nfunction createFiberRoot(\n containerInfo,\n tag,\n hydrate,\n initialChildren,\n hydrationCallbacks,\n isStrictMode,\n identifierPrefix,\n formState,\n onUncaughtError,\n onCaughtError,\n onRecoverableError,\n onDefaultTransitionIndicator\n) {\n containerInfo = new FiberRootNode(\n containerInfo,\n tag,\n hydrate,\n identifierPrefix,\n onUncaughtError,\n onCaughtError,\n onRecoverableError,\n onDefaultTransitionIndicator,\n formState\n );\n tag = 1;\n !0 === isStrictMode && (tag |= 24);\n isStrictMode = createFiberImplClass(3, null, null, tag);\n containerInfo.current = isStrictMode;\n isStrictMode.stateNode = containerInfo;\n tag = createCache();\n tag.refCount++;\n containerInfo.pooledCache = tag;\n tag.refCount++;\n isStrictMode.memoizedState = {\n element: initialChildren,\n isDehydrated: hydrate,\n cache: tag\n };\n initializeUpdateQueue(isStrictMode);\n return containerInfo;\n}\nfunction getContextForSubtree(parentComponent) {\n if (!parentComponent) return emptyContextObject;\n parentComponent = emptyContextObject;\n return parentComponent;\n}\nfunction updateContainerImpl(\n rootFiber,\n lane,\n element,\n container,\n parentComponent,\n callback\n) {\n parentComponent = getContextForSubtree(parentComponent);\n null === container.context\n ? (container.context = parentComponent)\n : (container.pendingContext = parentComponent);\n container = createUpdate(lane);\n container.payload = { element: element };\n callback = void 0 === callback ? null : callback;\n null !== callback && (container.callback = callback);\n element = enqueueUpdate(rootFiber, container, lane);\n null !== element &&\n (scheduleUpdateOnFiber(element, rootFiber, lane),\n entangleTransitions(element, rootFiber, lane));\n}\nfunction markRetryLaneImpl(fiber, retryLane) {\n fiber = fiber.memoizedState;\n if (null !== fiber && null !== fiber.dehydrated) {\n var a = fiber.retryLane;\n fiber.retryLane = 0 !== a && a < retryLane ? a : retryLane;\n }\n}\nfunction markRetryLaneIfNotHydrated(fiber, retryLane) {\n markRetryLaneImpl(fiber, retryLane);\n (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane);\n}\nfunction attemptContinuousHydration(fiber) {\n if (13 === fiber.tag || 31 === fiber.tag) {\n var root = enqueueConcurrentRenderForLane(fiber, 67108864);\n null !== root && scheduleUpdateOnFiber(root, fiber, 67108864);\n markRetryLaneIfNotHydrated(fiber, 67108864);\n }\n}\nfunction attemptHydrationAtCurrentPriority(fiber) {\n if (13 === fiber.tag || 31 === fiber.tag) {\n var lane = requestUpdateLane();\n lane = getBumpedLaneForHydrationByLane(lane);\n var root = enqueueConcurrentRenderForLane(fiber, lane);\n null !== root && scheduleUpdateOnFiber(root, fiber, lane);\n markRetryLaneIfNotHydrated(fiber, lane);\n }\n}\nvar _enabled = !0;\nfunction dispatchDiscreteEvent(\n domEventName,\n eventSystemFlags,\n container,\n nativeEvent\n) {\n var prevTransition = ReactSharedInternals.T;\n ReactSharedInternals.T = null;\n var previousPriority = ReactDOMSharedInternals.p;\n try {\n (ReactDOMSharedInternals.p = 2),\n dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);\n } finally {\n (ReactDOMSharedInternals.p = previousPriority),\n (ReactSharedInternals.T = prevTransition);\n }\n}\nfunction dispatchContinuousEvent(\n domEventName,\n eventSystemFlags,\n container,\n nativeEvent\n) {\n var prevTransition = ReactSharedInternals.T;\n ReactSharedInternals.T = null;\n var previousPriority = ReactDOMSharedInternals.p;\n try {\n (ReactDOMSharedInternals.p = 8),\n dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);\n } finally {\n (ReactDOMSharedInternals.p = previousPriority),\n (ReactSharedInternals.T = prevTransition);\n }\n}\nfunction dispatchEvent(\n domEventName,\n eventSystemFlags,\n targetContainer,\n nativeEvent\n) {\n if (_enabled) {\n var blockedOn = findInstanceBlockingEvent(nativeEvent);\n if (null === blockedOn)\n dispatchEventForPluginEventSystem(\n domEventName,\n eventSystemFlags,\n nativeEvent,\n return_targetInst,\n targetContainer\n ),\n clearIfContinuousEvent(domEventName, nativeEvent);\n else if (\n queueIfContinuousEvent(\n blockedOn,\n domEventName,\n eventSystemFlags,\n targetContainer,\n nativeEvent\n )\n )\n nativeEvent.stopPropagation();\n else if (\n (clearIfContinuousEvent(domEventName, nativeEvent),\n eventSystemFlags & 4 &&\n -1 < discreteReplayableEvents.indexOf(domEventName))\n ) {\n for (; null !== blockedOn; ) {\n var fiber = getInstanceFromNode(blockedOn);\n if (null !== fiber)\n switch (fiber.tag) {\n case 3:\n fiber = fiber.stateNode;\n if (fiber.current.memoizedState.isDehydrated) {\n var lanes = getHighestPriorityLanes(fiber.pendingLanes);\n if (0 !== lanes) {\n var root = fiber;\n root.pendingLanes |= 2;\n for (root.entangledLanes |= 2; lanes; ) {\n var lane = 1 << (31 - clz32(lanes));\n root.entanglements[1] |= lane;\n lanes &= ~lane;\n }\n ensureRootIsScheduled(fiber);\n 0 === (executionContext & 6) &&\n ((workInProgressRootRenderTargetTime = now() + 500),\n flushSyncWorkAcrossRoots_impl(0, !1));\n }\n }\n break;\n case 31:\n case 13:\n (root = enqueueConcurrentRenderForLane(fiber, 2)),\n null !== root && scheduleUpdateOnFiber(root, fiber, 2),\n flushSyncWork$1(),\n markRetryLaneIfNotHydrated(fiber, 2);\n }\n fiber = findInstanceBlockingEvent(nativeEvent);\n null === fiber &&\n dispatchEventForPluginEventSystem(\n domEventName,\n eventSystemFlags,\n nativeEvent,\n return_targetInst,\n targetContainer\n );\n if (fiber === blockedOn) break;\n blockedOn = fiber;\n }\n null !== blockedOn && nativeEvent.stopPropagation();\n } else\n dispatchEventForPluginEventSystem(\n domEventName,\n eventSystemFlags,\n nativeEvent,\n null,\n targetContainer\n );\n }\n}\nfunction findInstanceBlockingEvent(nativeEvent) {\n nativeEvent = getEventTarget(nativeEvent);\n return findInstanceBlockingTarget(nativeEvent);\n}\nvar return_targetInst = null;\nfunction findInstanceBlockingTarget(targetNode) {\n return_targetInst = null;\n targetNode = getClosestInstanceFromNode(targetNode);\n if (null !== targetNode) {\n var nearestMounted = getNearestMountedFiber(targetNode);\n if (null === nearestMounted) targetNode = null;\n else {\n var tag = nearestMounted.tag;\n if (13 === tag) {\n targetNode = getSuspenseInstanceFromFiber(nearestMounted);\n if (null !== targetNode) return targetNode;\n targetNode = null;\n } else if (31 === tag) {\n targetNode = getActivityInstanceFromFiber(nearestMounted);\n if (null !== targetNode) return targetNode;\n targetNode = null;\n } else if (3 === tag) {\n if (nearestMounted.stateNode.current.memoizedState.isDehydrated)\n return 3 === nearestMounted.tag\n ? nearestMounted.stateNode.containerInfo\n : null;\n targetNode = null;\n } else nearestMounted !== targetNode && (targetNode = null);\n }\n }\n return_targetInst = targetNode;\n return null;\n}\nfunction getEventPriority(domEventName) {\n switch (domEventName) {\n case \"beforetoggle\":\n case \"cancel\":\n case \"click\":\n case \"close\":\n case \"contextmenu\":\n case \"copy\":\n case \"cut\":\n case \"auxclick\":\n case \"dblclick\":\n case \"dragend\":\n case \"dragstart\":\n case \"drop\":\n case \"focusin\":\n case \"focusout\":\n case \"input\":\n case \"invalid\":\n case \"keydown\":\n case \"keypress\":\n case \"keyup\":\n case \"mousedown\":\n case \"mouseup\":\n case \"paste\":\n case \"pause\":\n case \"play\":\n case \"pointercancel\":\n case \"pointerdown\":\n case \"pointerup\":\n case \"ratechange\":\n case \"reset\":\n case \"resize\":\n case \"seeked\":\n case \"submit\":\n case \"toggle\":\n case \"touchcancel\":\n case \"touchend\":\n case \"touchstart\":\n case \"volumechange\":\n case \"change\":\n case \"selectionchange\":\n case \"textInput\":\n case \"compositionstart\":\n case \"compositionend\":\n case \"compositionupdate\":\n case \"beforeblur\":\n case \"afterblur\":\n case \"beforeinput\":\n case \"blur\":\n case \"fullscreenchange\":\n case \"focus\":\n case \"hashchange\":\n case \"popstate\":\n case \"select\":\n case \"selectstart\":\n return 2;\n case \"drag\":\n case \"dragenter\":\n case \"dragexit\":\n case \"dragleave\":\n case \"dragover\":\n case \"mousemove\":\n case \"mouseout\":\n case \"mouseover\":\n case \"pointermove\":\n case \"pointerout\":\n case \"pointerover\":\n case \"scroll\":\n case \"touchmove\":\n case \"wheel\":\n case \"mouseenter\":\n case \"mouseleave\":\n case \"pointerenter\":\n case \"pointerleave\":\n return 8;\n case \"message\":\n switch (getCurrentPriorityLevel()) {\n case ImmediatePriority:\n return 2;\n case UserBlockingPriority:\n return 8;\n case NormalPriority$1:\n case LowPriority:\n return 32;\n case IdlePriority:\n return 268435456;\n default:\n return 32;\n }\n default:\n return 32;\n }\n}\nvar hasScheduledReplayAttempt = !1,\n queuedFocus = null,\n queuedDrag = null,\n queuedMouse = null,\n queuedPointers = new Map(),\n queuedPointerCaptures = new Map(),\n queuedExplicitHydrationTargets = [],\n discreteReplayableEvents =\n \"mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset\".split(\n \" \"\n );\nfunction clearIfContinuousEvent(domEventName, nativeEvent) {\n switch (domEventName) {\n case \"focusin\":\n case \"focusout\":\n queuedFocus = null;\n break;\n case \"dragenter\":\n case \"dragleave\":\n queuedDrag = null;\n break;\n case \"mouseover\":\n case \"mouseout\":\n queuedMouse = null;\n break;\n case \"pointerover\":\n case \"pointerout\":\n queuedPointers.delete(nativeEvent.pointerId);\n break;\n case \"gotpointercapture\":\n case \"lostpointercapture\":\n queuedPointerCaptures.delete(nativeEvent.pointerId);\n }\n}\nfunction accumulateOrCreateContinuousQueuedReplayableEvent(\n existingQueuedEvent,\n blockedOn,\n domEventName,\n eventSystemFlags,\n targetContainer,\n nativeEvent\n) {\n if (\n null === existingQueuedEvent ||\n existingQueuedEvent.nativeEvent !== nativeEvent\n )\n return (\n (existingQueuedEvent = {\n blockedOn: blockedOn,\n domEventName: domEventName,\n eventSystemFlags: eventSystemFlags,\n nativeEvent: nativeEvent,\n targetContainers: [targetContainer]\n }),\n null !== blockedOn &&\n ((blockedOn = getInstanceFromNode(blockedOn)),\n null !== blockedOn && attemptContinuousHydration(blockedOn)),\n existingQueuedEvent\n );\n existingQueuedEvent.eventSystemFlags |= eventSystemFlags;\n blockedOn = existingQueuedEvent.targetContainers;\n null !== targetContainer &&\n -1 === blockedOn.indexOf(targetContainer) &&\n blockedOn.push(targetContainer);\n return existingQueuedEvent;\n}\nfunction queueIfContinuousEvent(\n blockedOn,\n domEventName,\n eventSystemFlags,\n targetContainer,\n nativeEvent\n) {\n switch (domEventName) {\n case \"focusin\":\n return (\n (queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(\n queuedFocus,\n blockedOn,\n domEventName,\n eventSystemFlags,\n targetContainer,\n nativeEvent\n )),\n !0\n );\n case \"dragenter\":\n return (\n (queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(\n queuedDrag,\n blockedOn,\n domEventName,\n eventSystemFlags,\n targetContainer,\n nativeEvent\n )),\n !0\n );\n case \"mouseover\":\n return (\n (queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(\n queuedMouse,\n blockedOn,\n domEventName,\n eventSystemFlags,\n targetContainer,\n nativeEvent\n )),\n !0\n );\n case \"pointerover\":\n var pointerId = nativeEvent.pointerId;\n queuedPointers.set(\n pointerId,\n accumulateOrCreateContinuousQueuedReplayableEvent(\n queuedPointers.get(pointerId) || null,\n blockedOn,\n domEventName,\n eventSystemFlags,\n targetContainer,\n nativeEvent\n )\n );\n return !0;\n case \"gotpointercapture\":\n return (\n (pointerId = nativeEvent.pointerId),\n queuedPointerCaptures.set(\n pointerId,\n accumulateOrCreateContinuousQueuedReplayableEvent(\n queuedPointerCaptures.get(pointerId) || null,\n blockedOn,\n domEventName,\n eventSystemFlags,\n targetContainer,\n nativeEvent\n )\n ),\n !0\n );\n }\n return !1;\n}\nfunction attemptExplicitHydrationTarget(queuedTarget) {\n var targetInst = getClosestInstanceFromNode(queuedTarget.target);\n if (null !== targetInst) {\n var nearestMounted = getNearestMountedFiber(targetInst);\n if (null !== nearestMounted)\n if (((targetInst = nearestMounted.tag), 13 === targetInst)) {\n if (\n ((targetInst = getSuspenseInstanceFromFiber(nearestMounted)),\n null !== targetInst)\n ) {\n queuedTarget.blockedOn = targetInst;\n runWithPriority(queuedTarget.priority, function () {\n attemptHydrationAtCurrentPriority(nearestMounted);\n });\n return;\n }\n } else if (31 === targetInst) {\n if (\n ((targetInst = getActivityInstanceFromFiber(nearestMounted)),\n null !== targetInst)\n ) {\n queuedTarget.blockedOn = targetInst;\n runWithPriority(queuedTarget.priority, function () {\n attemptHydrationAtCurrentPriority(nearestMounted);\n });\n return;\n }\n } else if (\n 3 === targetInst &&\n nearestMounted.stateNode.current.memoizedState.isDehydrated\n ) {\n queuedTarget.blockedOn =\n 3 === nearestMounted.tag\n ? nearestMounted.stateNode.containerInfo\n : null;\n return;\n }\n }\n queuedTarget.blockedOn = null;\n}\nfunction attemptReplayContinuousQueuedEvent(queuedEvent) {\n if (null !== queuedEvent.blockedOn) return !1;\n for (\n var targetContainers = queuedEvent.targetContainers;\n 0 < targetContainers.length;\n\n ) {\n var nextBlockedOn = findInstanceBlockingEvent(queuedEvent.nativeEvent);\n if (null === nextBlockedOn) {\n nextBlockedOn = queuedEvent.nativeEvent;\n var nativeEventClone = new nextBlockedOn.constructor(\n nextBlockedOn.type,\n nextBlockedOn\n );\n currentReplayingEvent = nativeEventClone;\n nextBlockedOn.target.dispatchEvent(nativeEventClone);\n currentReplayingEvent = null;\n } else\n return (\n (targetContainers = getInstanceFromNode(nextBlockedOn)),\n null !== targetContainers &&\n attemptContinuousHydration(targetContainers),\n (queuedEvent.blockedOn = nextBlockedOn),\n !1\n );\n targetContainers.shift();\n }\n return !0;\n}\nfunction attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {\n attemptReplayContinuousQueuedEvent(queuedEvent) && map.delete(key);\n}\nfunction replayUnblockedEvents() {\n hasScheduledReplayAttempt = !1;\n null !== queuedFocus &&\n attemptReplayContinuousQueuedEvent(queuedFocus) &&\n (queuedFocus = null);\n null !== queuedDrag &&\n attemptReplayContinuousQueuedEvent(queuedDrag) &&\n (queuedDrag = null);\n null !== queuedMouse &&\n attemptReplayContinuousQueuedEvent(queuedMouse) &&\n (queuedMouse = null);\n queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);\n queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);\n}\nfunction scheduleCallbackIfUnblocked(queuedEvent, unblocked) {\n queuedEvent.blockedOn === unblocked &&\n ((queuedEvent.blockedOn = null),\n hasScheduledReplayAttempt ||\n ((hasScheduledReplayAttempt = !0),\n Scheduler.unstable_scheduleCallback(\n Scheduler.unstable_NormalPriority,\n replayUnblockedEvents\n )));\n}\nvar lastScheduledReplayQueue = null;\nfunction scheduleReplayQueueIfNeeded(formReplayingQueue) {\n lastScheduledReplayQueue !== formReplayingQueue &&\n ((lastScheduledReplayQueue = formReplayingQueue),\n Scheduler.unstable_scheduleCallback(\n Scheduler.unstable_NormalPriority,\n function () {\n lastScheduledReplayQueue === formReplayingQueue &&\n (lastScheduledReplayQueue = null);\n for (var i = 0; i < formReplayingQueue.length; i += 3) {\n var form = formReplayingQueue[i],\n submitterOrAction = formReplayingQueue[i + 1],\n formData = formReplayingQueue[i + 2];\n if (\"function\" !== typeof submitterOrAction)\n if (null === findInstanceBlockingTarget(submitterOrAction || form))\n continue;\n else break;\n var formInst = getInstanceFromNode(form);\n null !== formInst &&\n (formReplayingQueue.splice(i, 3),\n (i -= 3),\n startHostTransition(\n formInst,\n {\n pending: !0,\n data: formData,\n method: form.method,\n action: submitterOrAction\n },\n submitterOrAction,\n formData\n ));\n }\n }\n ));\n}\nfunction retryIfBlockedOn(unblocked) {\n function unblock(queuedEvent) {\n return scheduleCallbackIfUnblocked(queuedEvent, unblocked);\n }\n null !== queuedFocus && scheduleCallbackIfUnblocked(queuedFocus, unblocked);\n null !== queuedDrag && scheduleCallbackIfUnblocked(queuedDrag, unblocked);\n null !== queuedMouse && scheduleCallbackIfUnblocked(queuedMouse, unblocked);\n queuedPointers.forEach(unblock);\n queuedPointerCaptures.forEach(unblock);\n for (var i = 0; i < queuedExplicitHydrationTargets.length; i++) {\n var queuedTarget = queuedExplicitHydrationTargets[i];\n queuedTarget.blockedOn === unblocked && (queuedTarget.blockedOn = null);\n }\n for (\n ;\n 0 < queuedExplicitHydrationTargets.length &&\n ((i = queuedExplicitHydrationTargets[0]), null === i.blockedOn);\n\n )\n attemptExplicitHydrationTarget(i),\n null === i.blockedOn && queuedExplicitHydrationTargets.shift();\n i = (unblocked.ownerDocument || unblocked).$$reactFormReplay;\n if (null != i)\n for (queuedTarget = 0; queuedTarget < i.length; queuedTarget += 3) {\n var form = i[queuedTarget],\n submitterOrAction = i[queuedTarget + 1],\n formProps = form[internalPropsKey] || null;\n if (\"function\" === typeof submitterOrAction)\n formProps || scheduleReplayQueueIfNeeded(i);\n else if (formProps) {\n var action = null;\n if (submitterOrAction && submitterOrAction.hasAttribute(\"formAction\"))\n if (\n ((form = submitterOrAction),\n (formProps = submitterOrAction[internalPropsKey] || null))\n )\n action = formProps.formAction;\n else {\n if (null !== findInstanceBlockingTarget(form)) continue;\n }\n else action = formProps.action;\n \"function\" === typeof action\n ? (i[queuedTarget + 1] = action)\n : (i.splice(queuedTarget, 3), (queuedTarget -= 3));\n scheduleReplayQueueIfNeeded(i);\n }\n }\n}\nfunction defaultOnDefaultTransitionIndicator() {\n function handleNavigate(event) {\n event.canIntercept &&\n \"react-transition\" === event.info &&\n event.intercept({\n handler: function () {\n return new Promise(function (resolve) {\n return (pendingResolve = resolve);\n });\n },\n focusReset: \"manual\",\n scroll: \"manual\"\n });\n }\n function handleNavigateComplete() {\n null !== pendingResolve && (pendingResolve(), (pendingResolve = null));\n isCancelled || setTimeout(startFakeNavigation, 20);\n }\n function startFakeNavigation() {\n if (!isCancelled && !navigation.transition) {\n var currentEntry = navigation.currentEntry;\n currentEntry &&\n null != currentEntry.url &&\n navigation.navigate(currentEntry.url, {\n state: currentEntry.getState(),\n info: \"react-transition\",\n history: \"replace\"\n });\n }\n }\n if (\"object\" === typeof navigation) {\n var isCancelled = !1,\n pendingResolve = null;\n navigation.addEventListener(\"navigate\", handleNavigate);\n navigation.addEventListener(\"navigatesuccess\", handleNavigateComplete);\n navigation.addEventListener(\"navigateerror\", handleNavigateComplete);\n setTimeout(startFakeNavigation, 100);\n return function () {\n isCancelled = !0;\n navigation.removeEventListener(\"navigate\", handleNavigate);\n navigation.removeEventListener(\"navigatesuccess\", handleNavigateComplete);\n navigation.removeEventListener(\"navigateerror\", handleNavigateComplete);\n null !== pendingResolve && (pendingResolve(), (pendingResolve = null));\n };\n }\n}\nfunction ReactDOMRoot(internalRoot) {\n this._internalRoot = internalRoot;\n}\nReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render =\n function (children) {\n var root = this._internalRoot;\n if (null === root) throw Error(formatProdErrorMessage(409));\n var current = root.current,\n lane = requestUpdateLane();\n updateContainerImpl(current, lane, children, root, null, null);\n };\nReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount =\n function () {\n var root = this._internalRoot;\n if (null !== root) {\n this._internalRoot = null;\n var container = root.containerInfo;\n updateContainerImpl(root.current, 2, null, root, null, null);\n flushSyncWork$1();\n container[internalContainerInstanceKey] = null;\n }\n };\nfunction ReactDOMHydrationRoot(internalRoot) {\n this._internalRoot = internalRoot;\n}\nReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {\n if (target) {\n var updatePriority = resolveUpdatePriority();\n target = { blockedOn: null, target: target, priority: updatePriority };\n for (\n var i = 0;\n i < queuedExplicitHydrationTargets.length &&\n 0 !== updatePriority &&\n updatePriority < queuedExplicitHydrationTargets[i].priority;\n i++\n );\n queuedExplicitHydrationTargets.splice(i, 0, target);\n 0 === i && attemptExplicitHydrationTarget(target);\n }\n};\nvar isomorphicReactPackageVersion$jscomp$inline_1840 = React.version;\nif (\n \"19.2.8\" !==\n isomorphicReactPackageVersion$jscomp$inline_1840\n)\n throw Error(\n formatProdErrorMessage(\n 527,\n isomorphicReactPackageVersion$jscomp$inline_1840,\n \"19.2.8\"\n )\n );\nReactDOMSharedInternals.findDOMNode = function (componentOrElement) {\n var fiber = componentOrElement._reactInternals;\n if (void 0 === fiber) {\n if (\"function\" === typeof componentOrElement.render)\n throw Error(formatProdErrorMessage(188));\n componentOrElement = Object.keys(componentOrElement).join(\",\");\n throw Error(formatProdErrorMessage(268, componentOrElement));\n }\n componentOrElement = findCurrentFiberUsingSlowPath(fiber);\n componentOrElement =\n null !== componentOrElement\n ? findCurrentHostFiberImpl(componentOrElement)\n : null;\n componentOrElement =\n null === componentOrElement ? null : componentOrElement.stateNode;\n return componentOrElement;\n};\nvar internals$jscomp$inline_2347 = {\n bundleType: 0,\n version: \"19.2.8\",\n rendererPackageName: \"react-dom\",\n currentDispatcherRef: ReactSharedInternals,\n reconcilerVersion: \"19.2.8\"\n};\nif (\"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {\n var hook$jscomp$inline_2348 = __REACT_DEVTOOLS_GLOBAL_HOOK__;\n if (\n !hook$jscomp$inline_2348.isDisabled &&\n hook$jscomp$inline_2348.supportsFiber\n )\n try {\n (rendererID = hook$jscomp$inline_2348.inject(\n internals$jscomp$inline_2347\n )),\n (injectedHook = hook$jscomp$inline_2348);\n } catch (err) {}\n}\nexports.createRoot = function (container, options) {\n if (!isValidContainer(container)) throw Error(formatProdErrorMessage(299));\n var isStrictMode = !1,\n identifierPrefix = \"\",\n onUncaughtError = defaultOnUncaughtError,\n onCaughtError = defaultOnCaughtError,\n onRecoverableError = defaultOnRecoverableError;\n null !== options &&\n void 0 !== options &&\n (!0 === options.unstable_strictMode && (isStrictMode = !0),\n void 0 !== options.identifierPrefix &&\n (identifierPrefix = options.identifierPrefix),\n void 0 !== options.onUncaughtError &&\n (onUncaughtError = options.onUncaughtError),\n void 0 !== options.onCaughtError && (onCaughtError = options.onCaughtError),\n void 0 !== options.onRecoverableError &&\n (onRecoverableError = options.onRecoverableError));\n options = createFiberRoot(\n container,\n 1,\n !1,\n null,\n null,\n isStrictMode,\n identifierPrefix,\n null,\n onUncaughtError,\n onCaughtError,\n onRecoverableError,\n defaultOnDefaultTransitionIndicator\n );\n container[internalContainerInstanceKey] = options.current;\n listenToAllSupportedEvents(container);\n return new ReactDOMRoot(options);\n};\nexports.hydrateRoot = function (container, initialChildren, options) {\n if (!isValidContainer(container)) throw Error(formatProdErrorMessage(299));\n var isStrictMode = !1,\n identifierPrefix = \"\",\n onUncaughtError = defaultOnUncaughtError,\n onCaughtError = defaultOnCaughtError,\n onRecoverableError = defaultOnRecoverableError,\n formState = null;\n null !== options &&\n void 0 !== options &&\n (!0 === options.unstable_strictMode && (isStrictMode = !0),\n void 0 !== options.identifierPrefix &&\n (identifierPrefix = options.identifierPrefix),\n void 0 !== options.onUncaughtError &&\n (onUncaughtError = options.onUncaughtError),\n void 0 !== options.onCaughtError && (onCaughtError = options.onCaughtError),\n void 0 !== options.onRecoverableError &&\n (onRecoverableError = options.onRecoverableError),\n void 0 !== options.formState && (formState = options.formState));\n initialChildren = createFiberRoot(\n container,\n 1,\n !0,\n initialChildren,\n null != options ? options : null,\n isStrictMode,\n identifierPrefix,\n formState,\n onUncaughtError,\n onCaughtError,\n onRecoverableError,\n defaultOnDefaultTransitionIndicator\n );\n initialChildren.context = getContextForSubtree(null);\n options = initialChildren.current;\n isStrictMode = requestUpdateLane();\n isStrictMode = getBumpedLaneForHydrationByLane(isStrictMode);\n identifierPrefix = createUpdate(isStrictMode);\n identifierPrefix.callback = null;\n enqueueUpdate(options, identifierPrefix, isStrictMode);\n options = isStrictMode;\n initialChildren.current.lanes = options;\n markRootUpdated$1(initialChildren, options);\n ensureRootIsScheduled(initialChildren);\n container[internalContainerInstanceKey] = initialChildren.current;\n listenToAllSupportedEvents(container);\n return new ReactDOMHydrationRoot(initialChildren);\n};\nexports.version = \"19.2.8\";\n","/**\n * @license React\n * react-dom.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\");\nfunction formatProdErrorMessage(code) {\n var url = \"https://react.dev/errors/\" + code;\n if (1 < arguments.length) {\n url += \"?args[]=\" + encodeURIComponent(arguments[1]);\n for (var i = 2; i < arguments.length; i++)\n url += \"&args[]=\" + encodeURIComponent(arguments[i]);\n }\n return (\n \"Minified React error #\" +\n code +\n \"; visit \" +\n url +\n \" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"\n );\n}\nfunction noop() {}\nvar Internals = {\n d: {\n f: noop,\n r: function () {\n throw Error(formatProdErrorMessage(522));\n },\n D: noop,\n C: noop,\n L: noop,\n m: noop,\n X: noop,\n S: noop,\n M: noop\n },\n p: 0,\n findDOMNode: null\n },\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\");\nfunction createPortal$1(children, containerInfo, implementation) {\n var key =\n 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;\n return {\n $$typeof: REACT_PORTAL_TYPE,\n key: null == key ? null : \"\" + key,\n children: children,\n containerInfo: containerInfo,\n implementation: implementation\n };\n}\nvar ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;\nfunction getCrossOriginStringAs(as, input) {\n if (\"font\" === as) return \"\";\n if (\"string\" === typeof input)\n return \"use-credentials\" === input ? input : \"\";\n}\nexports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n Internals;\nexports.createPortal = function (children, container) {\n var key =\n 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;\n if (\n !container ||\n (1 !== container.nodeType &&\n 9 !== container.nodeType &&\n 11 !== container.nodeType)\n )\n throw Error(formatProdErrorMessage(299));\n return createPortal$1(children, container, null, key);\n};\nexports.flushSync = function (fn) {\n var previousTransition = ReactSharedInternals.T,\n previousUpdatePriority = Internals.p;\n try {\n if (((ReactSharedInternals.T = null), (Internals.p = 2), fn)) return fn();\n } finally {\n (ReactSharedInternals.T = previousTransition),\n (Internals.p = previousUpdatePriority),\n Internals.d.f();\n }\n};\nexports.preconnect = function (href, options) {\n \"string\" === typeof href &&\n (options\n ? ((options = options.crossOrigin),\n (options =\n \"string\" === typeof options\n ? \"use-credentials\" === options\n ? options\n : \"\"\n : void 0))\n : (options = null),\n Internals.d.C(href, options));\n};\nexports.prefetchDNS = function (href) {\n \"string\" === typeof href && Internals.d.D(href);\n};\nexports.preinit = function (href, options) {\n if (\"string\" === typeof href && options && \"string\" === typeof options.as) {\n var as = options.as,\n crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),\n integrity =\n \"string\" === typeof options.integrity ? options.integrity : void 0,\n fetchPriority =\n \"string\" === typeof options.fetchPriority\n ? options.fetchPriority\n : void 0;\n \"style\" === as\n ? Internals.d.S(\n href,\n \"string\" === typeof options.precedence ? options.precedence : void 0,\n {\n crossOrigin: crossOrigin,\n integrity: integrity,\n fetchPriority: fetchPriority\n }\n )\n : \"script\" === as &&\n Internals.d.X(href, {\n crossOrigin: crossOrigin,\n integrity: integrity,\n fetchPriority: fetchPriority,\n nonce: \"string\" === typeof options.nonce ? options.nonce : void 0\n });\n }\n};\nexports.preinitModule = function (href, options) {\n if (\"string\" === typeof href)\n if (\"object\" === typeof options && null !== options) {\n if (null == options.as || \"script\" === options.as) {\n var crossOrigin = getCrossOriginStringAs(\n options.as,\n options.crossOrigin\n );\n Internals.d.M(href, {\n crossOrigin: crossOrigin,\n integrity:\n \"string\" === typeof options.integrity ? options.integrity : void 0,\n nonce: \"string\" === typeof options.nonce ? options.nonce : void 0\n });\n }\n } else null == options && Internals.d.M(href);\n};\nexports.preload = function (href, options) {\n if (\n \"string\" === typeof href &&\n \"object\" === typeof options &&\n null !== options &&\n \"string\" === typeof options.as\n ) {\n var as = options.as,\n crossOrigin = getCrossOriginStringAs(as, options.crossOrigin);\n Internals.d.L(href, as, {\n crossOrigin: crossOrigin,\n integrity:\n \"string\" === typeof options.integrity ? options.integrity : void 0,\n nonce: \"string\" === typeof options.nonce ? options.nonce : void 0,\n type: \"string\" === typeof options.type ? options.type : void 0,\n fetchPriority:\n \"string\" === typeof options.fetchPriority\n ? options.fetchPriority\n : void 0,\n referrerPolicy:\n \"string\" === typeof options.referrerPolicy\n ? options.referrerPolicy\n : void 0,\n imageSrcSet:\n \"string\" === typeof options.imageSrcSet ? options.imageSrcSet : void 0,\n imageSizes:\n \"string\" === typeof options.imageSizes ? options.imageSizes : void 0,\n media: \"string\" === typeof options.media ? options.media : void 0\n });\n }\n};\nexports.preloadModule = function (href, options) {\n if (\"string\" === typeof href)\n if (options) {\n var crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin);\n Internals.d.m(href, {\n as:\n \"string\" === typeof options.as && \"script\" !== options.as\n ? options.as\n : void 0,\n crossOrigin: crossOrigin,\n integrity:\n \"string\" === typeof options.integrity ? options.integrity : void 0\n });\n } else Internals.d.m(href);\n};\nexports.requestFormReset = function (form) {\n Internals.d.r(form);\n};\nexports.unstable_batchedUpdates = function (fn, a) {\n return fn(a);\n};\nexports.useFormState = function (action, initialState, permalink) {\n return ReactSharedInternals.H.useFormState(action, initialState, permalink);\n};\nexports.useFormStatus = function () {\n return ReactSharedInternals.H.useHostTransitionStatus();\n};\nexports.version = \"19.2.8\";\n","'use strict';\n\nfunction checkDCE() {\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n if (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\n ) {\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n // This branch is unreachable because this function is only called\n // in production, but the condition is true only in development.\n // Therefore if the branch is still here, dead code elimination wasn't\n // properly applied.\n // Don't change the message. React DevTools relies on it. Also make sure\n // this message doesn't occur elsewhere in this function, or it will cause\n // a false positive.\n throw new Error('^_^');\n }\n try {\n // Verify that the code above has been dead code eliminated (DCE'd).\n __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n } catch (err) {\n // DevTools shouldn't crash React, no matter what.\n // We should still report in case we break this code.\n console.error(err);\n }\n}\n\nif (process.env.NODE_ENV === 'production') {\n // DCE check should happen before ReactDOM bundle executes so that\n // DevTools can report bad minification during injection.\n checkDCE();\n module.exports = require('./cjs/react-dom-client.production.js');\n} else {\n module.exports = require('./cjs/react-dom-client.development.js');\n}\n","'use strict';\n\nfunction checkDCE() {\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n if (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\n ) {\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n // This branch is unreachable because this function is only called\n // in production, but the condition is true only in development.\n // Therefore if the branch is still here, dead code elimination wasn't\n // properly applied.\n // Don't change the message. React DevTools relies on it. Also make sure\n // this message doesn't occur elsewhere in this function, or it will cause\n // a false positive.\n throw new Error('^_^');\n }\n try {\n // Verify that the code above has been dead code eliminated (DCE'd).\n __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n } catch (err) {\n // DevTools shouldn't crash React, no matter what.\n // We should still report in case we break this code.\n console.error(err);\n }\n}\n\nif (process.env.NODE_ENV === 'production') {\n // DCE check should happen before ReactDOM bundle executes so that\n // DevTools can report bad minification during injection.\n checkDCE();\n module.exports = require('./cjs/react-dom.production.js');\n} else {\n module.exports = require('./cjs/react-dom.development.js');\n}\n","/**\n * @license React\n * react.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nfunction getIteratorFn(maybeIterable) {\n if (null === maybeIterable || \"object\" !== typeof maybeIterable) return null;\n maybeIterable =\n (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n maybeIterable[\"@@iterator\"];\n return \"function\" === typeof maybeIterable ? maybeIterable : null;\n}\nvar ReactNoopUpdateQueue = {\n isMounted: function () {\n return !1;\n },\n enqueueForceUpdate: function () {},\n enqueueReplaceState: function () {},\n enqueueSetState: function () {}\n },\n assign = Object.assign,\n emptyObject = {};\nfunction Component(props, context, updater) {\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n}\nComponent.prototype.isReactComponent = {};\nComponent.prototype.setState = function (partialState, callback) {\n if (\n \"object\" !== typeof partialState &&\n \"function\" !== typeof partialState &&\n null != partialState\n )\n throw Error(\n \"takes an object of state variables to update or a function which returns an object of state variables.\"\n );\n this.updater.enqueueSetState(this, partialState, callback, \"setState\");\n};\nComponent.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, \"forceUpdate\");\n};\nfunction ComponentDummy() {}\nComponentDummy.prototype = Component.prototype;\nfunction PureComponent(props, context, updater) {\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n}\nvar pureComponentPrototype = (PureComponent.prototype = new ComponentDummy());\npureComponentPrototype.constructor = PureComponent;\nassign(pureComponentPrototype, Component.prototype);\npureComponentPrototype.isPureReactComponent = !0;\nvar isArrayImpl = Array.isArray;\nfunction noop() {}\nvar ReactSharedInternals = { H: null, A: null, T: null, S: null },\n hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction ReactElement(type, key, props) {\n var refProp = props.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== refProp ? refProp : null,\n props: props\n };\n}\nfunction cloneAndReplaceKey(oldElement, newKey) {\n return ReactElement(oldElement.type, newKey, oldElement.props);\n}\nfunction isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n}\nfunction escape(key) {\n var escaperLookup = { \"=\": \"=0\", \":\": \"=2\" };\n return (\n \"$\" +\n key.replace(/[=:]/g, function (match) {\n return escaperLookup[match];\n })\n );\n}\nvar userProvidedKeyEscapeRegex = /\\/+/g;\nfunction getElementKey(element, index) {\n return \"object\" === typeof element && null !== element && null != element.key\n ? escape(\"\" + element.key)\n : index.toString(36);\n}\nfunction resolveThenable(thenable) {\n switch (thenable.status) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n default:\n switch (\n (\"string\" === typeof thenable.status\n ? thenable.then(noop, noop)\n : ((thenable.status = \"pending\"),\n thenable.then(\n function (fulfilledValue) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"fulfilled\"),\n (thenable.value = fulfilledValue));\n },\n function (error) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"rejected\"), (thenable.reason = error));\n }\n )),\n thenable.status)\n ) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n }\n }\n throw thenable;\n}\nfunction mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n var type = typeof children;\n if (\"undefined\" === type || \"boolean\" === type) children = null;\n var invokeCallback = !1;\n if (null === children) invokeCallback = !0;\n else\n switch (type) {\n case \"bigint\":\n case \"string\":\n case \"number\":\n invokeCallback = !0;\n break;\n case \"object\":\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = !0;\n break;\n case REACT_LAZY_TYPE:\n return (\n (invokeCallback = children._init),\n mapIntoArray(\n invokeCallback(children._payload),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n )\n );\n }\n }\n if (invokeCallback)\n return (\n (callback = callback(children)),\n (invokeCallback =\n \"\" === nameSoFar ? \".\" + getElementKey(children, 0) : nameSoFar),\n isArrayImpl(callback)\n ? ((escapedPrefix = \"\"),\n null != invokeCallback &&\n (escapedPrefix =\n invokeCallback.replace(userProvidedKeyEscapeRegex, \"$&/\") + \"/\"),\n mapIntoArray(callback, array, escapedPrefix, \"\", function (c) {\n return c;\n }))\n : null != callback &&\n (isValidElement(callback) &&\n (callback = cloneAndReplaceKey(\n callback,\n escapedPrefix +\n (null == callback.key ||\n (children && children.key === callback.key)\n ? \"\"\n : (\"\" + callback.key).replace(\n userProvidedKeyEscapeRegex,\n \"$&/\"\n ) + \"/\") +\n invokeCallback\n )),\n array.push(callback)),\n 1\n );\n invokeCallback = 0;\n var nextNamePrefix = \"\" === nameSoFar ? \".\" : nameSoFar + \":\";\n if (isArrayImpl(children))\n for (var i = 0; i < children.length; i++)\n (nameSoFar = children[i]),\n (type = nextNamePrefix + getElementKey(nameSoFar, i)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (((i = getIteratorFn(children)), \"function\" === typeof i))\n for (\n children = i.call(children), i = 0;\n !(nameSoFar = children.next()).done;\n\n )\n (nameSoFar = nameSoFar.value),\n (type = nextNamePrefix + getElementKey(nameSoFar, i++)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (\"object\" === type) {\n if (\"function\" === typeof children.then)\n return mapIntoArray(\n resolveThenable(children),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n );\n array = String(children);\n throw Error(\n \"Objects are not valid as a React child (found: \" +\n (\"[object Object]\" === array\n ? \"object with keys {\" + Object.keys(children).join(\", \") + \"}\"\n : array) +\n \"). If you meant to render a collection of children, use an array instead.\"\n );\n }\n return invokeCallback;\n}\nfunction mapChildren(children, func, context) {\n if (null == children) return children;\n var result = [],\n count = 0;\n mapIntoArray(children, result, \"\", \"\", function (child) {\n return func.call(context, child, count++);\n });\n return result;\n}\nfunction lazyInitializer(payload) {\n if (-1 === payload._status) {\n var ctor = payload._result;\n ctor = ctor();\n ctor.then(\n function (moduleObject) {\n if (0 === payload._status || -1 === payload._status)\n (payload._status = 1), (payload._result = moduleObject);\n },\n function (error) {\n if (0 === payload._status || -1 === payload._status)\n (payload._status = 2), (payload._result = error);\n }\n );\n -1 === payload._status && ((payload._status = 0), (payload._result = ctor));\n }\n if (1 === payload._status) return payload._result.default;\n throw payload._result;\n}\nvar reportGlobalError =\n \"function\" === typeof reportError\n ? reportError\n : function (error) {\n if (\n \"object\" === typeof window &&\n \"function\" === typeof window.ErrorEvent\n ) {\n var event = new window.ErrorEvent(\"error\", {\n bubbles: !0,\n cancelable: !0,\n message:\n \"object\" === typeof error &&\n null !== error &&\n \"string\" === typeof error.message\n ? String(error.message)\n : String(error),\n error: error\n });\n if (!window.dispatchEvent(event)) return;\n } else if (\n \"object\" === typeof process &&\n \"function\" === typeof process.emit\n ) {\n process.emit(\"uncaughtException\", error);\n return;\n }\n console.error(error);\n },\n Children = {\n map: mapChildren,\n forEach: function (children, forEachFunc, forEachContext) {\n mapChildren(\n children,\n function () {\n forEachFunc.apply(this, arguments);\n },\n forEachContext\n );\n },\n count: function (children) {\n var n = 0;\n mapChildren(children, function () {\n n++;\n });\n return n;\n },\n toArray: function (children) {\n return (\n mapChildren(children, function (child) {\n return child;\n }) || []\n );\n },\n only: function (children) {\n if (!isValidElement(children))\n throw Error(\n \"React.Children.only expected to receive a single React element child.\"\n );\n return children;\n }\n };\nexports.Activity = REACT_ACTIVITY_TYPE;\nexports.Children = Children;\nexports.Component = Component;\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.Profiler = REACT_PROFILER_TYPE;\nexports.PureComponent = PureComponent;\nexports.StrictMode = REACT_STRICT_MODE_TYPE;\nexports.Suspense = REACT_SUSPENSE_TYPE;\nexports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n ReactSharedInternals;\nexports.__COMPILER_RUNTIME = {\n __proto__: null,\n c: function (size) {\n return ReactSharedInternals.H.useMemoCache(size);\n }\n};\nexports.cache = function (fn) {\n return function () {\n return fn.apply(null, arguments);\n };\n};\nexports.cacheSignal = function () {\n return null;\n};\nexports.cloneElement = function (element, config, children) {\n if (null === element || void 0 === element)\n throw Error(\n \"The argument must be a React element, but you passed \" + element + \".\"\n );\n var props = assign({}, element.props),\n key = element.key;\n if (null != config)\n for (propName in (void 0 !== config.key && (key = \"\" + config.key), config))\n !hasOwnProperty.call(config, propName) ||\n \"key\" === propName ||\n \"__self\" === propName ||\n \"__source\" === propName ||\n (\"ref\" === propName && void 0 === config.ref) ||\n (props[propName] = config[propName]);\n var propName = arguments.length - 2;\n if (1 === propName) props.children = children;\n else if (1 < propName) {\n for (var childArray = Array(propName), i = 0; i < propName; i++)\n childArray[i] = arguments[i + 2];\n props.children = childArray;\n }\n return ReactElement(element.type, key, props);\n};\nexports.createContext = function (defaultValue) {\n defaultValue = {\n $$typeof: REACT_CONTEXT_TYPE,\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n _threadCount: 0,\n Provider: null,\n Consumer: null\n };\n defaultValue.Provider = defaultValue;\n defaultValue.Consumer = {\n $$typeof: REACT_CONSUMER_TYPE,\n _context: defaultValue\n };\n return defaultValue;\n};\nexports.createElement = function (type, config, children) {\n var propName,\n props = {},\n key = null;\n if (null != config)\n for (propName in (void 0 !== config.key && (key = \"\" + config.key), config))\n hasOwnProperty.call(config, propName) &&\n \"key\" !== propName &&\n \"__self\" !== propName &&\n \"__source\" !== propName &&\n (props[propName] = config[propName]);\n var childrenLength = arguments.length - 2;\n if (1 === childrenLength) props.children = children;\n else if (1 < childrenLength) {\n for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)\n childArray[i] = arguments[i + 2];\n props.children = childArray;\n }\n if (type && type.defaultProps)\n for (propName in ((childrenLength = type.defaultProps), childrenLength))\n void 0 === props[propName] &&\n (props[propName] = childrenLength[propName]);\n return ReactElement(type, key, props);\n};\nexports.createRef = function () {\n return { current: null };\n};\nexports.forwardRef = function (render) {\n return { $$typeof: REACT_FORWARD_REF_TYPE, render: render };\n};\nexports.isValidElement = isValidElement;\nexports.lazy = function (ctor) {\n return {\n $$typeof: REACT_LAZY_TYPE,\n _payload: { _status: -1, _result: ctor },\n _init: lazyInitializer\n };\n};\nexports.memo = function (type, compare) {\n return {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: void 0 === compare ? null : compare\n };\n};\nexports.startTransition = function (scope) {\n var prevTransition = ReactSharedInternals.T,\n currentTransition = {};\n ReactSharedInternals.T = currentTransition;\n try {\n var returnValue = scope(),\n onStartTransitionFinish = ReactSharedInternals.S;\n null !== onStartTransitionFinish &&\n onStartTransitionFinish(currentTransition, returnValue);\n \"object\" === typeof returnValue &&\n null !== returnValue &&\n \"function\" === typeof returnValue.then &&\n returnValue.then(noop, reportGlobalError);\n } catch (error) {\n reportGlobalError(error);\n } finally {\n null !== prevTransition &&\n null !== currentTransition.types &&\n (prevTransition.types = currentTransition.types),\n (ReactSharedInternals.T = prevTransition);\n }\n};\nexports.unstable_useCacheRefresh = function () {\n return ReactSharedInternals.H.useCacheRefresh();\n};\nexports.use = function (usable) {\n return ReactSharedInternals.H.use(usable);\n};\nexports.useActionState = function (action, initialState, permalink) {\n return ReactSharedInternals.H.useActionState(action, initialState, permalink);\n};\nexports.useCallback = function (callback, deps) {\n return ReactSharedInternals.H.useCallback(callback, deps);\n};\nexports.useContext = function (Context) {\n return ReactSharedInternals.H.useContext(Context);\n};\nexports.useDebugValue = function () {};\nexports.useDeferredValue = function (value, initialValue) {\n return ReactSharedInternals.H.useDeferredValue(value, initialValue);\n};\nexports.useEffect = function (create, deps) {\n return ReactSharedInternals.H.useEffect(create, deps);\n};\nexports.useEffectEvent = function (callback) {\n return ReactSharedInternals.H.useEffectEvent(callback);\n};\nexports.useId = function () {\n return ReactSharedInternals.H.useId();\n};\nexports.useImperativeHandle = function (ref, create, deps) {\n return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);\n};\nexports.useInsertionEffect = function (create, deps) {\n return ReactSharedInternals.H.useInsertionEffect(create, deps);\n};\nexports.useLayoutEffect = function (create, deps) {\n return ReactSharedInternals.H.useLayoutEffect(create, deps);\n};\nexports.useMemo = function (create, deps) {\n return ReactSharedInternals.H.useMemo(create, deps);\n};\nexports.useOptimistic = function (passthrough, reducer) {\n return ReactSharedInternals.H.useOptimistic(passthrough, reducer);\n};\nexports.useReducer = function (reducer, initialArg, init) {\n return ReactSharedInternals.H.useReducer(reducer, initialArg, init);\n};\nexports.useRef = function (initialValue) {\n return ReactSharedInternals.H.useRef(initialValue);\n};\nexports.useState = function (initialState) {\n return ReactSharedInternals.H.useState(initialState);\n};\nexports.useSyncExternalStore = function (\n subscribe,\n getSnapshot,\n getServerSnapshot\n) {\n return ReactSharedInternals.H.useSyncExternalStore(\n subscribe,\n getSnapshot,\n getServerSnapshot\n );\n};\nexports.useTransition = function () {\n return ReactSharedInternals.H.useTransition();\n};\nexports.version = \"19.2.8\";\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n","/**\n * @license React\n * scheduler.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nfunction push(heap, node) {\n var index = heap.length;\n heap.push(node);\n a: for (; 0 < index; ) {\n var parentIndex = (index - 1) >>> 1,\n parent = heap[parentIndex];\n if (0 < compare(parent, node))\n (heap[parentIndex] = node), (heap[index] = parent), (index = parentIndex);\n else break a;\n }\n}\nfunction peek(heap) {\n return 0 === heap.length ? null : heap[0];\n}\nfunction pop(heap) {\n if (0 === heap.length) return null;\n var first = heap[0],\n last = heap.pop();\n if (last !== first) {\n heap[0] = last;\n a: for (\n var index = 0, length = heap.length, halfLength = length >>> 1;\n index < halfLength;\n\n ) {\n var leftIndex = 2 * (index + 1) - 1,\n left = heap[leftIndex],\n rightIndex = leftIndex + 1,\n right = heap[rightIndex];\n if (0 > compare(left, last))\n rightIndex < length && 0 > compare(right, left)\n ? ((heap[index] = right),\n (heap[rightIndex] = last),\n (index = rightIndex))\n : ((heap[index] = left),\n (heap[leftIndex] = last),\n (index = leftIndex));\n else if (rightIndex < length && 0 > compare(right, last))\n (heap[index] = right), (heap[rightIndex] = last), (index = rightIndex);\n else break a;\n }\n }\n return first;\n}\nfunction compare(a, b) {\n var diff = a.sortIndex - b.sortIndex;\n return 0 !== diff ? diff : a.id - b.id;\n}\nexports.unstable_now = void 0;\nif (\"object\" === typeof performance && \"function\" === typeof performance.now) {\n var localPerformance = performance;\n exports.unstable_now = function () {\n return localPerformance.now();\n };\n} else {\n var localDate = Date,\n initialTime = localDate.now();\n exports.unstable_now = function () {\n return localDate.now() - initialTime;\n };\n}\nvar taskQueue = [],\n timerQueue = [],\n taskIdCounter = 1,\n currentTask = null,\n currentPriorityLevel = 3,\n isPerformingWork = !1,\n isHostCallbackScheduled = !1,\n isHostTimeoutScheduled = !1,\n needsPaint = !1,\n localSetTimeout = \"function\" === typeof setTimeout ? setTimeout : null,\n localClearTimeout = \"function\" === typeof clearTimeout ? clearTimeout : null,\n localSetImmediate = \"undefined\" !== typeof setImmediate ? setImmediate : null;\nfunction advanceTimers(currentTime) {\n for (var timer = peek(timerQueue); null !== timer; ) {\n if (null === timer.callback) pop(timerQueue);\n else if (timer.startTime <= currentTime)\n pop(timerQueue),\n (timer.sortIndex = timer.expirationTime),\n push(taskQueue, timer);\n else break;\n timer = peek(timerQueue);\n }\n}\nfunction handleTimeout(currentTime) {\n isHostTimeoutScheduled = !1;\n advanceTimers(currentTime);\n if (!isHostCallbackScheduled)\n if (null !== peek(taskQueue))\n (isHostCallbackScheduled = !0),\n isMessageLoopRunning ||\n ((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline());\n else {\n var firstTimer = peek(timerQueue);\n null !== firstTimer &&\n requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);\n }\n}\nvar isMessageLoopRunning = !1,\n taskTimeoutID = -1,\n frameInterval = 5,\n startTime = -1;\nfunction shouldYieldToHost() {\n return needsPaint\n ? !0\n : exports.unstable_now() - startTime < frameInterval\n ? !1\n : !0;\n}\nfunction performWorkUntilDeadline() {\n needsPaint = !1;\n if (isMessageLoopRunning) {\n var currentTime = exports.unstable_now();\n startTime = currentTime;\n var hasMoreWork = !0;\n try {\n a: {\n isHostCallbackScheduled = !1;\n isHostTimeoutScheduled &&\n ((isHostTimeoutScheduled = !1),\n localClearTimeout(taskTimeoutID),\n (taskTimeoutID = -1));\n isPerformingWork = !0;\n var previousPriorityLevel = currentPriorityLevel;\n try {\n b: {\n advanceTimers(currentTime);\n for (\n currentTask = peek(taskQueue);\n null !== currentTask &&\n !(\n currentTask.expirationTime > currentTime && shouldYieldToHost()\n );\n\n ) {\n var callback = currentTask.callback;\n if (\"function\" === typeof callback) {\n currentTask.callback = null;\n currentPriorityLevel = currentTask.priorityLevel;\n var continuationCallback = callback(\n currentTask.expirationTime <= currentTime\n );\n currentTime = exports.unstable_now();\n if (\"function\" === typeof continuationCallback) {\n currentTask.callback = continuationCallback;\n advanceTimers(currentTime);\n hasMoreWork = !0;\n break b;\n }\n currentTask === peek(taskQueue) && pop(taskQueue);\n advanceTimers(currentTime);\n } else pop(taskQueue);\n currentTask = peek(taskQueue);\n }\n if (null !== currentTask) hasMoreWork = !0;\n else {\n var firstTimer = peek(timerQueue);\n null !== firstTimer &&\n requestHostTimeout(\n handleTimeout,\n firstTimer.startTime - currentTime\n );\n hasMoreWork = !1;\n }\n }\n break a;\n } finally {\n (currentTask = null),\n (currentPriorityLevel = previousPriorityLevel),\n (isPerformingWork = !1);\n }\n hasMoreWork = void 0;\n }\n } finally {\n hasMoreWork\n ? schedulePerformWorkUntilDeadline()\n : (isMessageLoopRunning = !1);\n }\n }\n}\nvar schedulePerformWorkUntilDeadline;\nif (\"function\" === typeof localSetImmediate)\n schedulePerformWorkUntilDeadline = function () {\n localSetImmediate(performWorkUntilDeadline);\n };\nelse if (\"undefined\" !== typeof MessageChannel) {\n var channel = new MessageChannel(),\n port = channel.port2;\n channel.port1.onmessage = performWorkUntilDeadline;\n schedulePerformWorkUntilDeadline = function () {\n port.postMessage(null);\n };\n} else\n schedulePerformWorkUntilDeadline = function () {\n localSetTimeout(performWorkUntilDeadline, 0);\n };\nfunction requestHostTimeout(callback, ms) {\n taskTimeoutID = localSetTimeout(function () {\n callback(exports.unstable_now());\n }, ms);\n}\nexports.unstable_IdlePriority = 5;\nexports.unstable_ImmediatePriority = 1;\nexports.unstable_LowPriority = 4;\nexports.unstable_NormalPriority = 3;\nexports.unstable_Profiling = null;\nexports.unstable_UserBlockingPriority = 2;\nexports.unstable_cancelCallback = function (task) {\n task.callback = null;\n};\nexports.unstable_forceFrameRate = function (fps) {\n 0 > fps || 125 < fps\n ? console.error(\n \"forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported\"\n )\n : (frameInterval = 0 < fps ? Math.floor(1e3 / fps) : 5);\n};\nexports.unstable_getCurrentPriorityLevel = function () {\n return currentPriorityLevel;\n};\nexports.unstable_next = function (eventHandler) {\n switch (currentPriorityLevel) {\n case 1:\n case 2:\n case 3:\n var priorityLevel = 3;\n break;\n default:\n priorityLevel = currentPriorityLevel;\n }\n var previousPriorityLevel = currentPriorityLevel;\n currentPriorityLevel = priorityLevel;\n try {\n return eventHandler();\n } finally {\n currentPriorityLevel = previousPriorityLevel;\n }\n};\nexports.unstable_requestPaint = function () {\n needsPaint = !0;\n};\nexports.unstable_runWithPriority = function (priorityLevel, eventHandler) {\n switch (priorityLevel) {\n case 1:\n case 2:\n case 3:\n case 4:\n case 5:\n break;\n default:\n priorityLevel = 3;\n }\n var previousPriorityLevel = currentPriorityLevel;\n currentPriorityLevel = priorityLevel;\n try {\n return eventHandler();\n } finally {\n currentPriorityLevel = previousPriorityLevel;\n }\n};\nexports.unstable_scheduleCallback = function (\n priorityLevel,\n callback,\n options\n) {\n var currentTime = exports.unstable_now();\n \"object\" === typeof options && null !== options\n ? ((options = options.delay),\n (options =\n \"number\" === typeof options && 0 < options\n ? currentTime + options\n : currentTime))\n : (options = currentTime);\n switch (priorityLevel) {\n case 1:\n var timeout = -1;\n break;\n case 2:\n timeout = 250;\n break;\n case 5:\n timeout = 1073741823;\n break;\n case 4:\n timeout = 1e4;\n break;\n default:\n timeout = 5e3;\n }\n timeout = options + timeout;\n priorityLevel = {\n id: taskIdCounter++,\n callback: callback,\n priorityLevel: priorityLevel,\n startTime: options,\n expirationTime: timeout,\n sortIndex: -1\n };\n options > currentTime\n ? ((priorityLevel.sortIndex = options),\n push(timerQueue, priorityLevel),\n null === peek(taskQueue) &&\n priorityLevel === peek(timerQueue) &&\n (isHostTimeoutScheduled\n ? (localClearTimeout(taskTimeoutID), (taskTimeoutID = -1))\n : (isHostTimeoutScheduled = !0),\n requestHostTimeout(handleTimeout, options - currentTime)))\n : ((priorityLevel.sortIndex = timeout),\n push(taskQueue, priorityLevel),\n isHostCallbackScheduled ||\n isPerformingWork ||\n ((isHostCallbackScheduled = !0),\n isMessageLoopRunning ||\n ((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline())));\n return priorityLevel;\n};\nexports.unstable_shouldYield = shouldYieldToHost;\nexports.unstable_wrapCallback = function (callback) {\n var parentPriorityLevel = currentPriorityLevel;\n return function () {\n var previousPriorityLevel = currentPriorityLevel;\n currentPriorityLevel = parentPriorityLevel;\n try {\n return callback.apply(this, arguments);\n } finally {\n currentPriorityLevel = previousPriorityLevel;\n }\n };\n};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n","\"use strict\";\n\nconst punycode = require(\"punycode/\");\nconst regexes = require(\"./lib/regexes.js\");\nconst mappingTable = require(\"./lib/mappingTable.json\");\nconst { STATUS_MAPPING } = require(\"./lib/statusMapping.js\");\n\nfunction containsNonASCII(str) {\n return /[^\\x00-\\x7F]/u.test(str);\n}\n\nfunction findStatus(val) {\n let start = 0;\n let end = mappingTable.length - 1;\n\n while (start <= end) {\n const mid = Math.floor((start + end) / 2);\n\n const target = mappingTable[mid];\n const min = Array.isArray(target[0]) ? target[0][0] : target[0];\n const max = Array.isArray(target[0]) ? target[0][1] : target[0];\n\n if (min <= val && max >= val) {\n return target.slice(1);\n } else if (min > val) {\n end = mid - 1;\n } else {\n start = mid + 1;\n }\n }\n\n return null;\n}\n\nfunction mapChars(domainName, { transitionalProcessing }) {\n let processed = \"\";\n\n for (const ch of domainName) {\n const [status, mapping] = findStatus(ch.codePointAt(0));\n\n switch (status) {\n case STATUS_MAPPING.disallowed:\n processed += ch;\n break;\n case STATUS_MAPPING.ignored:\n break;\n case STATUS_MAPPING.mapped:\n if (transitionalProcessing && ch === \"ẞ\") {\n processed += \"ss\";\n } else {\n processed += mapping;\n }\n break;\n case STATUS_MAPPING.deviation:\n if (transitionalProcessing) {\n processed += mapping;\n } else {\n processed += ch;\n }\n break;\n case STATUS_MAPPING.valid:\n processed += ch;\n break;\n }\n }\n\n return processed;\n}\n\nfunction validateLabel(label, {\n checkHyphens,\n checkBidi,\n checkJoiners,\n transitionalProcessing,\n useSTD3ASCIIRules,\n isBidi\n}) {\n // \"must be satisfied for a non-empty label\"\n if (label.length === 0) {\n return true;\n }\n\n // \"1. The label must be in Unicode Normalization Form NFC.\"\n if (label.normalize(\"NFC\") !== label) {\n return false;\n }\n\n const codePoints = Array.from(label);\n\n // \"2. If CheckHyphens, the label must not contain a U+002D HYPHEN-MINUS character in both the\n // third and fourth positions.\"\n //\n // \"3. If CheckHyphens, the label must neither begin nor end with a U+002D HYPHEN-MINUS character.\"\n if (checkHyphens) {\n if ((codePoints[2] === \"-\" && codePoints[3] === \"-\") ||\n (label.startsWith(\"-\") || label.endsWith(\"-\"))) {\n return false;\n }\n }\n\n // \"4. If not CheckHyphens, the label must not begin with “xn--”.\"\n if (!checkHyphens) {\n if (label.startsWith(\"xn--\")) {\n return false;\n }\n }\n\n // \"5. The label must not contain a U+002E ( . ) FULL STOP.\"\n if (label.includes(\".\")) {\n return false;\n }\n\n // \"6. The label must not begin with a combining mark, that is: General_Category=Mark.\"\n if (regexes.combiningMarks.test(codePoints[0])) {\n return false;\n }\n\n // \"7. Each code point in the label must only have certain Status values according to Section 5\"\n for (const ch of codePoints) {\n const codePoint = ch.codePointAt(0);\n const [status] = findStatus(codePoint);\n if (transitionalProcessing) {\n // \"For Transitional Processing (deprecated), each value must be valid.\"\n if (status !== STATUS_MAPPING.valid) {\n return false;\n }\n } else if (status !== STATUS_MAPPING.valid && status !== STATUS_MAPPING.deviation) {\n // \"For Nontransitional Processing, each value must be either valid or deviation.\"\n return false;\n }\n // \"In addition, if UseSTD3ASCIIRules=true and the code point is an ASCII code point (U+0000..U+007F), then it must\n // be a lowercase letter (a-z), a digit (0-9), or a hyphen-minus (U+002D). (Note: This excludes uppercase ASCII\n // A-Z which are mapped in UTS #46 and disallowed in IDNA2008.)\"\n if (useSTD3ASCIIRules && codePoint <= 0x7F) {\n if (!/^(?:[a-z]|[0-9]|-)$/u.test(ch)) {\n return false;\n }\n }\n }\n\n // \"8. If CheckJoiners, the label must satisify the ContextJ rules\"\n // https://tools.ietf.org/html/rfc5892#appendix-A\n if (checkJoiners) {\n let last = 0;\n for (const [i, ch] of codePoints.entries()) {\n if (ch === \"\\u200C\" || ch === \"\\u200D\") {\n if (i > 0) {\n if (regexes.combiningClassVirama.test(codePoints[i - 1])) {\n continue;\n }\n if (ch === \"\\u200C\") {\n // TODO: make this more efficient\n const next = codePoints.indexOf(\"\\u200C\", i + 1);\n const test = next < 0 ? codePoints.slice(last) : codePoints.slice(last, next);\n if (regexes.validZWNJ.test(test.join(\"\"))) {\n last = i + 1;\n continue;\n }\n }\n }\n return false;\n }\n }\n }\n\n // \"9. If CheckBidi, and if the domain name is a Bidi domain name, then the label must satisfy...\"\n // https://tools.ietf.org/html/rfc5893#section-2\n if (checkBidi && isBidi) {\n let rtl;\n\n // 1\n if (regexes.bidiS1LTR.test(codePoints[0])) {\n rtl = false;\n } else if (regexes.bidiS1RTL.test(codePoints[0])) {\n rtl = true;\n } else {\n return false;\n }\n\n if (rtl) {\n // 2-4\n if (!regexes.bidiS2.test(label) ||\n !regexes.bidiS3.test(label) ||\n (regexes.bidiS4EN.test(label) && regexes.bidiS4AN.test(label))) {\n return false;\n }\n } else if (!regexes.bidiS5.test(label) ||\n !regexes.bidiS6.test(label)) { // 5-6\n return false;\n }\n }\n\n return true;\n}\n\nfunction isBidiDomain(labels) {\n const domain = labels.map(label => {\n if (label.startsWith(\"xn--\")) {\n try {\n return punycode.decode(label.substring(4));\n } catch {\n return \"\";\n }\n }\n return label;\n }).join(\".\");\n return regexes.bidiDomain.test(domain);\n}\n\nfunction processing(domainName, options) {\n // 1. Map.\n let string = mapChars(domainName, options);\n\n // 2. Normalize.\n string = string.normalize(\"NFC\");\n\n // 3. Break.\n const labels = string.split(\".\");\n const isBidi = isBidiDomain(labels);\n\n // 4. Convert/Validate.\n let error = false;\n for (const [i, origLabel] of labels.entries()) {\n let label = origLabel;\n let transitionalProcessingForThisLabel = options.transitionalProcessing;\n if (label.startsWith(\"xn--\")) {\n if (containsNonASCII(label)) {\n error = true;\n continue;\n }\n\n try {\n label = punycode.decode(label.substring(4));\n } catch {\n if (!options.ignoreInvalidPunycode) {\n error = true;\n continue;\n }\n }\n labels[i] = label;\n\n if (label === \"\" || !containsNonASCII(label)) {\n error = true;\n }\n\n transitionalProcessingForThisLabel = false;\n }\n\n // No need to validate if we already know there is an error.\n if (error) {\n continue;\n }\n const validation = validateLabel(label, {\n ...options,\n transitionalProcessing: transitionalProcessingForThisLabel,\n isBidi\n });\n if (!validation) {\n error = true;\n }\n }\n\n return {\n string: labels.join(\".\"),\n error\n };\n}\n\nfunction toASCII(domainName, {\n checkHyphens = false,\n checkBidi = false,\n checkJoiners = false,\n useSTD3ASCIIRules = false,\n verifyDNSLength = false,\n transitionalProcessing = false,\n ignoreInvalidPunycode = false\n} = {}) {\n const result = processing(domainName, {\n checkHyphens,\n checkBidi,\n checkJoiners,\n useSTD3ASCIIRules,\n transitionalProcessing,\n ignoreInvalidPunycode\n });\n let labels = result.string.split(\".\");\n labels = labels.map(l => {\n if (containsNonASCII(l)) {\n try {\n return `xn--${punycode.encode(l)}`;\n } catch {\n result.error = true;\n }\n }\n return l;\n });\n\n if (verifyDNSLength) {\n const total = labels.join(\".\").length;\n if (total > 253 || total === 0) {\n result.error = true;\n }\n\n for (let i = 0; i < labels.length; ++i) {\n if (labels[i].length > 63 || labels[i].length === 0) {\n result.error = true;\n break;\n }\n }\n }\n\n if (result.error) {\n return null;\n }\n return labels.join(\".\");\n}\n\nfunction toUnicode(domainName, {\n checkHyphens = false,\n checkBidi = false,\n checkJoiners = false,\n useSTD3ASCIIRules = false,\n transitionalProcessing = false,\n ignoreInvalidPunycode = false\n} = {}) {\n const result = processing(domainName, {\n checkHyphens,\n checkBidi,\n checkJoiners,\n useSTD3ASCIIRules,\n transitionalProcessing,\n ignoreInvalidPunycode\n });\n\n return {\n domain: result.string,\n error: result.error\n };\n}\n\nmodule.exports = {\n toASCII,\n toUnicode\n};\n","\"use strict\";\n\nconst combiningMarks = /[\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u0897-\\u089F\\u08CA-\\u08E1\\u08E3-\\u0903\\u093A-\\u093C\\u093E-\\u094F\\u0951-\\u0957\\u0962\\u0963\\u0981-\\u0983\\u09BC\\u09BE-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CD\\u09D7\\u09E2\\u09E3\\u09FE\\u0A01-\\u0A03\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81-\\u0A83\\u0ABC\\u0ABE-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01-\\u0B03\\u0B3C\\u0B3E-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B55-\\u0B57\\u0B62\\u0B63\\u0B82\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD7\\u0C00-\\u0C04\\u0C3C\\u0C3E-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81-\\u0C83\\u0CBC\\u0CBE-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CE2\\u0CE3\\u0CF3\\u0D00-\\u0D03\\u0D3B\\u0D3C\\u0D3E-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4D\\u0D57\\u0D62\\u0D63\\u0D81-\\u0D83\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EBC\\u0EC8-\\u0ECE\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F3E\\u0F3F\\u0F71-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102B-\\u103E\\u1056-\\u1059\\u105E-\\u1060\\u1062-\\u1064\\u1067-\\u106D\\u1071-\\u1074\\u1082-\\u108D\\u108F\\u109A-\\u109D\\u135D-\\u135F\\u1712-\\u1715\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B4-\\u17D3\\u17DD\\u180B-\\u180D\\u180F\\u1885\\u1886\\u18A9\\u1920-\\u192B\\u1930-\\u193B\\u1A17-\\u1A1B\\u1A55-\\u1A5E\\u1A60-\\u1A7C\\u1A7F\\u1AB0-\\u1ADD\\u1AE0-\\u1AEB\\u1B00-\\u1B04\\u1B34-\\u1B44\\u1B6B-\\u1B73\\u1B80-\\u1B82\\u1BA1-\\u1BAD\\u1BE6-\\u1BF3\\u1C24-\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE8\\u1CED\\u1CF4\\u1CF7-\\u1CF9\\u1DC0-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA823-\\uA827\\uA82C\\uA880\\uA881\\uA8B4-\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA953\\uA980-\\uA983\\uA9B3-\\uA9C0\\uA9E5\\uAA29-\\uAA36\\uAA43\\uAA4C\\uAA4D\\uAA7B-\\uAA7D\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEB-\\uAAEF\\uAAF5\\uAAF6\\uABE3-\\uABEA\\uABEC\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\u{101FD}\\u{102E0}\\u{10376}-\\u{1037A}\\u{10A01}-\\u{10A03}\\u{10A05}\\u{10A06}\\u{10A0C}-\\u{10A0F}\\u{10A38}-\\u{10A3A}\\u{10A3F}\\u{10AE5}\\u{10AE6}\\u{10D24}-\\u{10D27}\\u{10D69}-\\u{10D6D}\\u{10EAB}\\u{10EAC}\\u{10EFA}-\\u{10EFF}\\u{10F46}-\\u{10F50}\\u{10F82}-\\u{10F85}\\u{11000}-\\u{11002}\\u{11038}-\\u{11046}\\u{11070}\\u{11073}\\u{11074}\\u{1107F}-\\u{11082}\\u{110B0}-\\u{110BA}\\u{110C2}\\u{11100}-\\u{11102}\\u{11127}-\\u{11134}\\u{11145}\\u{11146}\\u{11173}\\u{11180}-\\u{11182}\\u{111B3}-\\u{111C0}\\u{111C9}-\\u{111CC}\\u{111CE}\\u{111CF}\\u{1122C}-\\u{11237}\\u{1123E}\\u{11241}\\u{112DF}-\\u{112EA}\\u{11300}-\\u{11303}\\u{1133B}\\u{1133C}\\u{1133E}-\\u{11344}\\u{11347}\\u{11348}\\u{1134B}-\\u{1134D}\\u{11357}\\u{11362}\\u{11363}\\u{11366}-\\u{1136C}\\u{11370}-\\u{11374}\\u{113B8}-\\u{113C0}\\u{113C2}\\u{113C5}\\u{113C7}-\\u{113CA}\\u{113CC}-\\u{113D0}\\u{113D2}\\u{113E1}\\u{113E2}\\u{11435}-\\u{11446}\\u{1145E}\\u{114B0}-\\u{114C3}\\u{115AF}-\\u{115B5}\\u{115B8}-\\u{115C0}\\u{115DC}\\u{115DD}\\u{11630}-\\u{11640}\\u{116AB}-\\u{116B7}\\u{1171D}-\\u{1172B}\\u{1182C}-\\u{1183A}\\u{11930}-\\u{11935}\\u{11937}\\u{11938}\\u{1193B}-\\u{1193E}\\u{11940}\\u{11942}\\u{11943}\\u{119D1}-\\u{119D7}\\u{119DA}-\\u{119E0}\\u{119E4}\\u{11A01}-\\u{11A0A}\\u{11A33}-\\u{11A39}\\u{11A3B}-\\u{11A3E}\\u{11A47}\\u{11A51}-\\u{11A5B}\\u{11A8A}-\\u{11A99}\\u{11B60}-\\u{11B67}\\u{11C2F}-\\u{11C36}\\u{11C38}-\\u{11C3F}\\u{11C92}-\\u{11CA7}\\u{11CA9}-\\u{11CB6}\\u{11D31}-\\u{11D36}\\u{11D3A}\\u{11D3C}\\u{11D3D}\\u{11D3F}-\\u{11D45}\\u{11D47}\\u{11D8A}-\\u{11D8E}\\u{11D90}\\u{11D91}\\u{11D93}-\\u{11D97}\\u{11EF3}-\\u{11EF6}\\u{11F00}\\u{11F01}\\u{11F03}\\u{11F34}-\\u{11F3A}\\u{11F3E}-\\u{11F42}\\u{11F5A}\\u{13440}\\u{13447}-\\u{13455}\\u{1611E}-\\u{1612F}\\u{16AF0}-\\u{16AF4}\\u{16B30}-\\u{16B36}\\u{16F4F}\\u{16F51}-\\u{16F87}\\u{16F8F}-\\u{16F92}\\u{16FE4}\\u{16FF0}\\u{16FF1}\\u{1BC9D}\\u{1BC9E}\\u{1CF00}-\\u{1CF2D}\\u{1CF30}-\\u{1CF46}\\u{1D165}-\\u{1D169}\\u{1D16D}-\\u{1D172}\\u{1D17B}-\\u{1D182}\\u{1D185}-\\u{1D18B}\\u{1D1AA}-\\u{1D1AD}\\u{1D242}-\\u{1D244}\\u{1DA00}-\\u{1DA36}\\u{1DA3B}-\\u{1DA6C}\\u{1DA75}\\u{1DA84}\\u{1DA9B}-\\u{1DA9F}\\u{1DAA1}-\\u{1DAAF}\\u{1E000}-\\u{1E006}\\u{1E008}-\\u{1E018}\\u{1E01B}-\\u{1E021}\\u{1E023}\\u{1E024}\\u{1E026}-\\u{1E02A}\\u{1E08F}\\u{1E130}-\\u{1E136}\\u{1E2AE}\\u{1E2EC}-\\u{1E2EF}\\u{1E4EC}-\\u{1E4EF}\\u{1E5EE}\\u{1E5EF}\\u{1E6E3}\\u{1E6E6}\\u{1E6EE}\\u{1E6EF}\\u{1E6F5}\\u{1E8D0}-\\u{1E8D6}\\u{1E944}-\\u{1E94A}\\u{E0100}-\\u{E01EF}]/u;\nconst combiningClassVirama = /[\\u094D\\u09CD\\u0A4D\\u0ACD\\u0B4D\\u0BCD\\u0C4D\\u0CCD\\u0D3B\\u0D3C\\u0D4D\\u0DCA\\u0E3A\\u0EBA\\u0F84\\u1039\\u103A\\u1714\\u1715\\u1734\\u17D2\\u1A60\\u1B44\\u1BAA\\u1BAB\\u1BF2\\u1BF3\\u2D7F\\uA806\\uA82C\\uA8C4\\uA953\\uA9C0\\uAAF6\\uABED\\u{10A3F}\\u{11046}\\u{11070}\\u{1107F}\\u{110B9}\\u{11133}\\u{11134}\\u{111C0}\\u{11235}\\u{112EA}\\u{1134D}\\u{113CE}-\\u{113D0}\\u{11442}\\u{114C2}\\u{115BF}\\u{1163F}\\u{116B6}\\u{1172B}\\u{11839}\\u{1193D}\\u{1193E}\\u{119E0}\\u{11A34}\\u{11A47}\\u{11A99}\\u{11C3F}\\u{11D44}\\u{11D45}\\u{11D97}\\u{11F41}\\u{11F42}\\u{1612F}]/u;\nconst validZWNJ = /[\\u0620\\u0626\\u0628\\u062A-\\u062E\\u0633-\\u063F\\u0641-\\u0647\\u0649\\u064A\\u066E\\u066F\\u0678-\\u0687\\u069A-\\u06BF\\u06C1\\u06C2\\u06CC\\u06CE\\u06D0\\u06D1\\u06FA-\\u06FC\\u06FF\\u0712-\\u0714\\u071A-\\u071D\\u071F-\\u0727\\u0729\\u072B\\u072D\\u072E\\u074E-\\u0758\\u075C-\\u076A\\u076D-\\u0770\\u0772\\u0775-\\u0777\\u077A-\\u077F\\u07CA-\\u07EA\\u0841-\\u0845\\u0848\\u084A-\\u0853\\u0855\\u0860\\u0862-\\u0865\\u0868\\u0886\\u0889-\\u088D\\u088F\\u08A0-\\u08A9\\u08AF\\u08B0\\u08B3-\\u08B8\\u08BA-\\u08C8\\u1807\\u1820-\\u1878\\u1887-\\u18A8\\u18AA\\uA840-\\uA872\\u{10AC0}-\\u{10AC4}\\u{10ACD}\\u{10AD3}-\\u{10ADC}\\u{10ADE}-\\u{10AE0}\\u{10AEB}-\\u{10AEE}\\u{10B80}\\u{10B82}\\u{10B86}-\\u{10B88}\\u{10B8A}\\u{10B8B}\\u{10B8D}\\u{10B90}\\u{10BAD}\\u{10BAE}\\u{10D00}-\\u{10D21}\\u{10D23}\\u{10EC3}\\u{10EC4}\\u{10EC6}\\u{10EC7}\\u{10F30}-\\u{10F32}\\u{10F34}-\\u{10F44}\\u{10F51}-\\u{10F53}\\u{10F70}-\\u{10F73}\\u{10F76}-\\u{10F81}\\u{10FB0}\\u{10FB2}\\u{10FB3}\\u{10FB8}\\u{10FBB}\\u{10FBC}\\u{10FBE}\\u{10FBF}\\u{10FC1}\\u{10FC4}\\u{10FCA}\\u{10FCB}\\u{1E900}-\\u{1E943}][\\xAD\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u061C\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u070F\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u0897-\\u089F\\u08CA-\\u08E1\\u08E3-\\u0902\\u093A\\u093C\\u0941-\\u0948\\u094D\\u0951-\\u0957\\u0962\\u0963\\u0981\\u09BC\\u09C1-\\u09C4\\u09CD\\u09E2\\u09E3\\u09FE\\u0A01\\u0A02\\u0A3C\\u0A41\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81\\u0A82\\u0ABC\\u0AC1-\\u0AC5\\u0AC7\\u0AC8\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01\\u0B3C\\u0B3F\\u0B41-\\u0B44\\u0B4D\\u0B55\\u0B56\\u0B62\\u0B63\\u0B82\\u0BC0\\u0BCD\\u0C00\\u0C04\\u0C3C\\u0C3E-\\u0C40\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81\\u0CBC\\u0CBF\\u0CC6\\u0CCC\\u0CCD\\u0CE2\\u0CE3\\u0D00\\u0D01\\u0D3B\\u0D3C\\u0D41-\\u0D44\\u0D4D\\u0D62\\u0D63\\u0D81\\u0DCA\\u0DD2-\\u0DD4\\u0DD6\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EBC\\u0EC8-\\u0ECE\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F71-\\u0F7E\\u0F80-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1030\\u1032-\\u1037\\u1039\\u103A\\u103D\\u103E\\u1058\\u1059\\u105E-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108D\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732\\u1733\\u1752\\u1753\\u1772\\u1773\\u17B4\\u17B5\\u17B7-\\u17BD\\u17C6\\u17C9-\\u17D3\\u17DD\\u180B-\\u180D\\u180F\\u1885\\u1886\\u18A9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193B\\u1A17\\u1A18\\u1A1B\\u1A56\\u1A58-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A6C\\u1A73-\\u1A7C\\u1A7F\\u1AB0-\\u1ADD\\u1AE0-\\u1AEB\\u1B00-\\u1B03\\u1B34\\u1B36-\\u1B3A\\u1B3C\\u1B42\\u1B6B-\\u1B73\\u1B80\\u1B81\\u1BA2-\\u1BA5\\u1BA8\\u1BA9\\u1BAB-\\u1BAD\\u1BE6\\u1BE8\\u1BE9\\u1BED\\u1BEF-\\u1BF1\\u1C2C-\\u1C33\\u1C36\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE0\\u1CE2-\\u1CE8\\u1CED\\u1CF4\\u1CF8\\u1CF9\\u1DC0-\\u1DFF\\u200B\\u200E\\u200F\\u202A-\\u202E\\u2060-\\u2064\\u206A-\\u206F\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302D\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA825\\uA826\\uA82C\\uA8C4\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA951\\uA980-\\uA982\\uA9B3\\uA9B6-\\uA9B9\\uA9BC\\uA9BD\\uA9E5\\uAA29-\\uAA2E\\uAA31\\uAA32\\uAA35\\uAA36\\uAA43\\uAA4C\\uAA7C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEC\\uAAED\\uAAF6\\uABE5\\uABE8\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\uFEFF\\uFFF9-\\uFFFB\\u{101FD}\\u{102E0}\\u{10376}-\\u{1037A}\\u{10A01}-\\u{10A03}\\u{10A05}\\u{10A06}\\u{10A0C}-\\u{10A0F}\\u{10A38}-\\u{10A3A}\\u{10A3F}\\u{10AE5}\\u{10AE6}\\u{10D24}-\\u{10D27}\\u{10D69}-\\u{10D6D}\\u{10EAB}\\u{10EAC}\\u{10EFA}-\\u{10EFF}\\u{10F46}-\\u{10F50}\\u{10F82}-\\u{10F85}\\u{11001}\\u{11038}-\\u{11046}\\u{11070}\\u{11073}\\u{11074}\\u{1107F}-\\u{11081}\\u{110B3}-\\u{110B6}\\u{110B9}\\u{110BA}\\u{110C2}\\u{11100}-\\u{11102}\\u{11127}-\\u{1112B}\\u{1112D}-\\u{11134}\\u{11173}\\u{11180}\\u{11181}\\u{111B6}-\\u{111BE}\\u{111C9}-\\u{111CC}\\u{111CF}\\u{1122F}-\\u{11231}\\u{11234}\\u{11236}\\u{11237}\\u{1123E}\\u{11241}\\u{112DF}\\u{112E3}-\\u{112EA}\\u{11300}\\u{11301}\\u{1133B}\\u{1133C}\\u{11340}\\u{11366}-\\u{1136C}\\u{11370}-\\u{11374}\\u{113BB}-\\u{113C0}\\u{113CE}\\u{113D0}\\u{113D2}\\u{113E1}\\u{113E2}\\u{11438}-\\u{1143F}\\u{11442}-\\u{11444}\\u{11446}\\u{1145E}\\u{114B3}-\\u{114B8}\\u{114BA}\\u{114BF}\\u{114C0}\\u{114C2}\\u{114C3}\\u{115B2}-\\u{115B5}\\u{115BC}\\u{115BD}\\u{115BF}\\u{115C0}\\u{115DC}\\u{115DD}\\u{11633}-\\u{1163A}\\u{1163D}\\u{1163F}\\u{11640}\\u{116AB}\\u{116AD}\\u{116B0}-\\u{116B5}\\u{116B7}\\u{1171D}\\u{1171F}\\u{11722}-\\u{11725}\\u{11727}-\\u{1172B}\\u{1182F}-\\u{11837}\\u{11839}\\u{1183A}\\u{1193B}\\u{1193C}\\u{1193E}\\u{11943}\\u{119D4}-\\u{119D7}\\u{119DA}\\u{119DB}\\u{119E0}\\u{11A01}-\\u{11A0A}\\u{11A33}-\\u{11A38}\\u{11A3B}-\\u{11A3E}\\u{11A47}\\u{11A51}-\\u{11A56}\\u{11A59}-\\u{11A5B}\\u{11A8A}-\\u{11A96}\\u{11A98}\\u{11A99}\\u{11B60}\\u{11B62}-\\u{11B64}\\u{11B66}\\u{11C30}-\\u{11C36}\\u{11C38}-\\u{11C3D}\\u{11C3F}\\u{11C92}-\\u{11CA7}\\u{11CAA}-\\u{11CB0}\\u{11CB2}\\u{11CB3}\\u{11CB5}\\u{11CB6}\\u{11D31}-\\u{11D36}\\u{11D3A}\\u{11D3C}\\u{11D3D}\\u{11D3F}-\\u{11D45}\\u{11D47}\\u{11D90}\\u{11D91}\\u{11D95}\\u{11D97}\\u{11EF3}\\u{11EF4}\\u{11F00}\\u{11F01}\\u{11F36}-\\u{11F3A}\\u{11F40}\\u{11F42}\\u{11F5A}\\u{13430}-\\u{13440}\\u{13447}-\\u{13455}\\u{1611E}-\\u{16129}\\u{1612D}-\\u{1612F}\\u{16AF0}-\\u{16AF4}\\u{16B30}-\\u{16B36}\\u{16F4F}\\u{16F8F}-\\u{16F92}\\u{16FE4}\\u{1BC9D}\\u{1BC9E}\\u{1BCA0}-\\u{1BCA3}\\u{1CF00}-\\u{1CF2D}\\u{1CF30}-\\u{1CF46}\\u{1D167}-\\u{1D169}\\u{1D173}-\\u{1D182}\\u{1D185}-\\u{1D18B}\\u{1D1AA}-\\u{1D1AD}\\u{1D242}-\\u{1D244}\\u{1DA00}-\\u{1DA36}\\u{1DA3B}-\\u{1DA6C}\\u{1DA75}\\u{1DA84}\\u{1DA9B}-\\u{1DA9F}\\u{1DAA1}-\\u{1DAAF}\\u{1E000}-\\u{1E006}\\u{1E008}-\\u{1E018}\\u{1E01B}-\\u{1E021}\\u{1E023}\\u{1E024}\\u{1E026}-\\u{1E02A}\\u{1E08F}\\u{1E130}-\\u{1E136}\\u{1E2AE}\\u{1E2EC}-\\u{1E2EF}\\u{1E4EC}-\\u{1E4EF}\\u{1E5EE}\\u{1E5EF}\\u{1E6E3}\\u{1E6E6}\\u{1E6EE}\\u{1E6EF}\\u{1E6F5}\\u{1E8D0}-\\u{1E8D6}\\u{1E944}-\\u{1E94B}\\u{E0001}\\u{E0020}-\\u{E007F}\\u{E0100}-\\u{E01EF}]*\\u200C[\\xAD\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u061C\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u070F\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u0897-\\u089F\\u08CA-\\u08E1\\u08E3-\\u0902\\u093A\\u093C\\u0941-\\u0948\\u094D\\u0951-\\u0957\\u0962\\u0963\\u0981\\u09BC\\u09C1-\\u09C4\\u09CD\\u09E2\\u09E3\\u09FE\\u0A01\\u0A02\\u0A3C\\u0A41\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81\\u0A82\\u0ABC\\u0AC1-\\u0AC5\\u0AC7\\u0AC8\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01\\u0B3C\\u0B3F\\u0B41-\\u0B44\\u0B4D\\u0B55\\u0B56\\u0B62\\u0B63\\u0B82\\u0BC0\\u0BCD\\u0C00\\u0C04\\u0C3C\\u0C3E-\\u0C40\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81\\u0CBC\\u0CBF\\u0CC6\\u0CCC\\u0CCD\\u0CE2\\u0CE3\\u0D00\\u0D01\\u0D3B\\u0D3C\\u0D41-\\u0D44\\u0D4D\\u0D62\\u0D63\\u0D81\\u0DCA\\u0DD2-\\u0DD4\\u0DD6\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EBC\\u0EC8-\\u0ECE\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F71-\\u0F7E\\u0F80-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1030\\u1032-\\u1037\\u1039\\u103A\\u103D\\u103E\\u1058\\u1059\\u105E-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108D\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732\\u1733\\u1752\\u1753\\u1772\\u1773\\u17B4\\u17B5\\u17B7-\\u17BD\\u17C6\\u17C9-\\u17D3\\u17DD\\u180B-\\u180D\\u180F\\u1885\\u1886\\u18A9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193B\\u1A17\\u1A18\\u1A1B\\u1A56\\u1A58-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A6C\\u1A73-\\u1A7C\\u1A7F\\u1AB0-\\u1ADD\\u1AE0-\\u1AEB\\u1B00-\\u1B03\\u1B34\\u1B36-\\u1B3A\\u1B3C\\u1B42\\u1B6B-\\u1B73\\u1B80\\u1B81\\u1BA2-\\u1BA5\\u1BA8\\u1BA9\\u1BAB-\\u1BAD\\u1BE6\\u1BE8\\u1BE9\\u1BED\\u1BEF-\\u1BF1\\u1C2C-\\u1C33\\u1C36\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE0\\u1CE2-\\u1CE8\\u1CED\\u1CF4\\u1CF8\\u1CF9\\u1DC0-\\u1DFF\\u200B\\u200E\\u200F\\u202A-\\u202E\\u2060-\\u2064\\u206A-\\u206F\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302D\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA825\\uA826\\uA82C\\uA8C4\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA951\\uA980-\\uA982\\uA9B3\\uA9B6-\\uA9B9\\uA9BC\\uA9BD\\uA9E5\\uAA29-\\uAA2E\\uAA31\\uAA32\\uAA35\\uAA36\\uAA43\\uAA4C\\uAA7C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEC\\uAAED\\uAAF6\\uABE5\\uABE8\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\uFEFF\\uFFF9-\\uFFFB\\u{101FD}\\u{102E0}\\u{10376}-\\u{1037A}\\u{10A01}-\\u{10A03}\\u{10A05}\\u{10A06}\\u{10A0C}-\\u{10A0F}\\u{10A38}-\\u{10A3A}\\u{10A3F}\\u{10AE5}\\u{10AE6}\\u{10D24}-\\u{10D27}\\u{10D69}-\\u{10D6D}\\u{10EAB}\\u{10EAC}\\u{10EFA}-\\u{10EFF}\\u{10F46}-\\u{10F50}\\u{10F82}-\\u{10F85}\\u{11001}\\u{11038}-\\u{11046}\\u{11070}\\u{11073}\\u{11074}\\u{1107F}-\\u{11081}\\u{110B3}-\\u{110B6}\\u{110B9}\\u{110BA}\\u{110C2}\\u{11100}-\\u{11102}\\u{11127}-\\u{1112B}\\u{1112D}-\\u{11134}\\u{11173}\\u{11180}\\u{11181}\\u{111B6}-\\u{111BE}\\u{111C9}-\\u{111CC}\\u{111CF}\\u{1122F}-\\u{11231}\\u{11234}\\u{11236}\\u{11237}\\u{1123E}\\u{11241}\\u{112DF}\\u{112E3}-\\u{112EA}\\u{11300}\\u{11301}\\u{1133B}\\u{1133C}\\u{11340}\\u{11366}-\\u{1136C}\\u{11370}-\\u{11374}\\u{113BB}-\\u{113C0}\\u{113CE}\\u{113D0}\\u{113D2}\\u{113E1}\\u{113E2}\\u{11438}-\\u{1143F}\\u{11442}-\\u{11444}\\u{11446}\\u{1145E}\\u{114B3}-\\u{114B8}\\u{114BA}\\u{114BF}\\u{114C0}\\u{114C2}\\u{114C3}\\u{115B2}-\\u{115B5}\\u{115BC}\\u{115BD}\\u{115BF}\\u{115C0}\\u{115DC}\\u{115DD}\\u{11633}-\\u{1163A}\\u{1163D}\\u{1163F}\\u{11640}\\u{116AB}\\u{116AD}\\u{116B0}-\\u{116B5}\\u{116B7}\\u{1171D}\\u{1171F}\\u{11722}-\\u{11725}\\u{11727}-\\u{1172B}\\u{1182F}-\\u{11837}\\u{11839}\\u{1183A}\\u{1193B}\\u{1193C}\\u{1193E}\\u{11943}\\u{119D4}-\\u{119D7}\\u{119DA}\\u{119DB}\\u{119E0}\\u{11A01}-\\u{11A0A}\\u{11A33}-\\u{11A38}\\u{11A3B}-\\u{11A3E}\\u{11A47}\\u{11A51}-\\u{11A56}\\u{11A59}-\\u{11A5B}\\u{11A8A}-\\u{11A96}\\u{11A98}\\u{11A99}\\u{11B60}\\u{11B62}-\\u{11B64}\\u{11B66}\\u{11C30}-\\u{11C36}\\u{11C38}-\\u{11C3D}\\u{11C3F}\\u{11C92}-\\u{11CA7}\\u{11CAA}-\\u{11CB0}\\u{11CB2}\\u{11CB3}\\u{11CB5}\\u{11CB6}\\u{11D31}-\\u{11D36}\\u{11D3A}\\u{11D3C}\\u{11D3D}\\u{11D3F}-\\u{11D45}\\u{11D47}\\u{11D90}\\u{11D91}\\u{11D95}\\u{11D97}\\u{11EF3}\\u{11EF4}\\u{11F00}\\u{11F01}\\u{11F36}-\\u{11F3A}\\u{11F40}\\u{11F42}\\u{11F5A}\\u{13430}-\\u{13440}\\u{13447}-\\u{13455}\\u{1611E}-\\u{16129}\\u{1612D}-\\u{1612F}\\u{16AF0}-\\u{16AF4}\\u{16B30}-\\u{16B36}\\u{16F4F}\\u{16F8F}-\\u{16F92}\\u{16FE4}\\u{1BC9D}\\u{1BC9E}\\u{1BCA0}-\\u{1BCA3}\\u{1CF00}-\\u{1CF2D}\\u{1CF30}-\\u{1CF46}\\u{1D167}-\\u{1D169}\\u{1D173}-\\u{1D182}\\u{1D185}-\\u{1D18B}\\u{1D1AA}-\\u{1D1AD}\\u{1D242}-\\u{1D244}\\u{1DA00}-\\u{1DA36}\\u{1DA3B}-\\u{1DA6C}\\u{1DA75}\\u{1DA84}\\u{1DA9B}-\\u{1DA9F}\\u{1DAA1}-\\u{1DAAF}\\u{1E000}-\\u{1E006}\\u{1E008}-\\u{1E018}\\u{1E01B}-\\u{1E021}\\u{1E023}\\u{1E024}\\u{1E026}-\\u{1E02A}\\u{1E08F}\\u{1E130}-\\u{1E136}\\u{1E2AE}\\u{1E2EC}-\\u{1E2EF}\\u{1E4EC}-\\u{1E4EF}\\u{1E5EE}\\u{1E5EF}\\u{1E6E3}\\u{1E6E6}\\u{1E6EE}\\u{1E6EF}\\u{1E6F5}\\u{1E8D0}-\\u{1E8D6}\\u{1E944}-\\u{1E94B}\\u{E0001}\\u{E0020}-\\u{E007F}\\u{E0100}-\\u{E01EF}]*[\\u0620\\u0622-\\u063F\\u0641-\\u064A\\u066E\\u066F\\u0671-\\u0673\\u0675-\\u06D3\\u06D5\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u077F\\u07CA-\\u07EA\\u0840-\\u0858\\u0860\\u0862-\\u0865\\u0867-\\u086A\\u0870-\\u0882\\u0886\\u0889-\\u088F\\u08A0-\\u08AC\\u08AE-\\u08C8\\u1807\\u1820-\\u1878\\u1887-\\u18A8\\u18AA\\uA840-\\uA871\\u{10AC0}-\\u{10AC5}\\u{10AC7}\\u{10AC9}\\u{10ACA}\\u{10ACE}-\\u{10AD6}\\u{10AD8}-\\u{10AE1}\\u{10AE4}\\u{10AEB}-\\u{10AEF}\\u{10B80}-\\u{10B91}\\u{10BA9}-\\u{10BAE}\\u{10D01}-\\u{10D23}\\u{10EC2}-\\u{10EC4}\\u{10EC6}\\u{10EC7}\\u{10F30}-\\u{10F44}\\u{10F51}-\\u{10F54}\\u{10F70}-\\u{10F81}\\u{10FB0}\\u{10FB2}-\\u{10FB6}\\u{10FB8}-\\u{10FBF}\\u{10FC1}-\\u{10FC4}\\u{10FC9}\\u{10FCA}\\u{1E900}-\\u{1E943}]/u;\nconst bidiDomain = /[\\u05BE\\u05C0\\u05C3\\u05C6\\u05D0-\\u05EA\\u05EF-\\u05F4\\u0600-\\u0605\\u0608\\u060B\\u060D\\u061B-\\u064A\\u0660-\\u0669\\u066B-\\u066F\\u0671-\\u06D5\\u06DD\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u070D\\u070F\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07C0-\\u07EA\\u07F4\\u07F5\\u07FA\\u07FE-\\u0815\\u081A\\u0824\\u0828\\u0830-\\u083E\\u0840-\\u0858\\u085E\\u0860-\\u086A\\u0870-\\u0891\\u08A0-\\u08C9\\u08E2\\u200F\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBC2\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFC\\uFE70-\\uFE74\\uFE76-\\uFEFC\\u{10800}-\\u{10805}\\u{10808}\\u{1080A}-\\u{10835}\\u{10837}\\u{10838}\\u{1083C}\\u{1083F}-\\u{10855}\\u{10857}-\\u{1089E}\\u{108A7}-\\u{108AF}\\u{108E0}-\\u{108F2}\\u{108F4}\\u{108F5}\\u{108FB}-\\u{1091B}\\u{10920}-\\u{10939}\\u{1093F}-\\u{10959}\\u{10980}-\\u{109B7}\\u{109BC}-\\u{109CF}\\u{109D2}-\\u{10A00}\\u{10A10}-\\u{10A13}\\u{10A15}-\\u{10A17}\\u{10A19}-\\u{10A35}\\u{10A40}-\\u{10A48}\\u{10A50}-\\u{10A58}\\u{10A60}-\\u{10A9F}\\u{10AC0}-\\u{10AE4}\\u{10AEB}-\\u{10AF6}\\u{10B00}-\\u{10B35}\\u{10B40}-\\u{10B55}\\u{10B58}-\\u{10B72}\\u{10B78}-\\u{10B91}\\u{10B99}-\\u{10B9C}\\u{10BA9}-\\u{10BAF}\\u{10C00}-\\u{10C48}\\u{10C80}-\\u{10CB2}\\u{10CC0}-\\u{10CF2}\\u{10CFA}-\\u{10D23}\\u{10D30}-\\u{10D39}\\u{10D40}-\\u{10D65}\\u{10D6F}-\\u{10D85}\\u{10D8E}\\u{10D8F}\\u{10E60}-\\u{10E7E}\\u{10E80}-\\u{10EA9}\\u{10EAD}\\u{10EB0}\\u{10EB1}\\u{10EC2}-\\u{10EC7}\\u{10F00}-\\u{10F27}\\u{10F30}-\\u{10F45}\\u{10F51}-\\u{10F59}\\u{10F70}-\\u{10F81}\\u{10F86}-\\u{10F89}\\u{10FB0}-\\u{10FCB}\\u{10FE0}-\\u{10FF6}\\u{1E800}-\\u{1E8C4}\\u{1E8C7}-\\u{1E8CF}\\u{1E900}-\\u{1E943}\\u{1E94B}\\u{1E950}-\\u{1E959}\\u{1E95E}\\u{1E95F}\\u{1EC71}-\\u{1ECB4}\\u{1ED01}-\\u{1ED3D}\\u{1EE00}-\\u{1EE03}\\u{1EE05}-\\u{1EE1F}\\u{1EE21}\\u{1EE22}\\u{1EE24}\\u{1EE27}\\u{1EE29}-\\u{1EE32}\\u{1EE34}-\\u{1EE37}\\u{1EE39}\\u{1EE3B}\\u{1EE42}\\u{1EE47}\\u{1EE49}\\u{1EE4B}\\u{1EE4D}-\\u{1EE4F}\\u{1EE51}\\u{1EE52}\\u{1EE54}\\u{1EE57}\\u{1EE59}\\u{1EE5B}\\u{1EE5D}\\u{1EE5F}\\u{1EE61}\\u{1EE62}\\u{1EE64}\\u{1EE67}-\\u{1EE6A}\\u{1EE6C}-\\u{1EE72}\\u{1EE74}-\\u{1EE77}\\u{1EE79}-\\u{1EE7C}\\u{1EE7E}\\u{1EE80}-\\u{1EE89}\\u{1EE8B}-\\u{1EE9B}\\u{1EEA1}-\\u{1EEA3}\\u{1EEA5}-\\u{1EEA9}\\u{1EEAB}-\\u{1EEBB}]/u;\nconst bidiS1LTR = /[A-Za-z\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02B8\\u02BB-\\u02C1\\u02D0\\u02D1\\u02E0-\\u02E4\\u02EE\\u0370-\\u0373\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0482\\u048A-\\u052F\\u0531-\\u0556\\u0559-\\u0589\\u0903-\\u0939\\u093B\\u093D-\\u0940\\u0949-\\u094C\\u094E-\\u0950\\u0958-\\u0961\\u0964-\\u0980\\u0982\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD-\\u09C0\\u09C7\\u09C8\\u09CB\\u09CC\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E1\\u09E6-\\u09F1\\u09F4-\\u09FA\\u09FC\\u09FD\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3E-\\u0A40\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A6F\\u0A72-\\u0A74\\u0A76\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD-\\u0AC0\\u0AC9\\u0ACB\\u0ACC\\u0AD0\\u0AE0\\u0AE1\\u0AE6-\\u0AF0\\u0AF9\\u0B02\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B3E\\u0B40\\u0B47\\u0B48\\u0B4B\\u0B4C\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B66-\\u0B77\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE\\u0BBF\\u0BC1\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCC\\u0BD0\\u0BD7\\u0BE6-\\u0BF2\\u0C01-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C41-\\u0C44\\u0C58-\\u0C5A\\u0C5C\\u0C5D\\u0C60\\u0C61\\u0C66-\\u0C6F\\u0C77\\u0C7F\\u0C80\\u0C82-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA\\u0CCB\\u0CD5\\u0CD6\\u0CDC-\\u0CDE\\u0CE0\\u0CE1\\u0CE6-\\u0CEF\\u0CF1-\\u0CF3\\u0D02-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D40\\u0D46-\\u0D48\\u0D4A-\\u0D4C\\u0D4E\\u0D4F\\u0D54-\\u0D61\\u0D66-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCF-\\u0DD1\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2-\\u0DF4\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E4F-\\u0E5B\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00-\\u0F17\\u0F1A-\\u0F34\\u0F36\\u0F38\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F7F\\u0F85\\u0F88-\\u0F8C\\u0FBE-\\u0FC5\\u0FC7-\\u0FCC\\u0FCE-\\u0FDA\\u1000-\\u102C\\u1031\\u1038\\u103B\\u103C\\u103F-\\u1057\\u105A-\\u105D\\u1061-\\u1070\\u1075-\\u1081\\u1083\\u1084\\u1087-\\u108C\\u108E-\\u109C\\u109E-\\u10C5\\u10C7\\u10CD\\u10D0-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1360-\\u137C\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u167F\\u1681-\\u169A\\u16A0-\\u16F8\\u1700-\\u1711\\u1715\\u171F-\\u1731\\u1734-\\u1736\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17B6\\u17BE-\\u17C5\\u17C7\\u17C8\\u17D4-\\u17DA\\u17DC\\u17E0-\\u17E9\\u1810-\\u1819\\u1820-\\u1878\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1923-\\u1926\\u1929-\\u192B\\u1930\\u1931\\u1933-\\u1938\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19DA\\u1A00-\\u1A16\\u1A19\\u1A1A\\u1A1E-\\u1A55\\u1A57\\u1A61\\u1A63\\u1A64\\u1A6D-\\u1A72\\u1A80-\\u1A89\\u1A90-\\u1A99\\u1AA0-\\u1AAD\\u1B04-\\u1B33\\u1B35\\u1B3B\\u1B3D-\\u1B41\\u1B43-\\u1B4C\\u1B4E-\\u1B6A\\u1B74-\\u1B7F\\u1B82-\\u1BA1\\u1BA6\\u1BA7\\u1BAA\\u1BAE-\\u1BE5\\u1BE7\\u1BEA-\\u1BEC\\u1BEE\\u1BF2\\u1BF3\\u1BFC-\\u1C2B\\u1C34\\u1C35\\u1C3B-\\u1C49\\u1C4D-\\u1C8A\\u1C90-\\u1CBA\\u1CBD-\\u1CC7\\u1CD3\\u1CE1\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5-\\u1CF7\\u1CFA\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200E\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u214F\\u2160-\\u2188\\u2336-\\u237A\\u2395\\u249C-\\u24E9\\u26AC\\u2800-\\u28FF\\u2C00-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D70\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3005-\\u3007\\u3021-\\u3029\\u302E\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u3190-\\u31BF\\u31F0-\\u321C\\u3220-\\u324F\\u3260-\\u327B\\u327F-\\u32B0\\u32C0-\\u32CB\\u32D0-\\u3376\\u337B-\\u33DD\\u33E0-\\u33FE\\u3400-\\u4DBF\\u4E00-\\uA48C\\uA4D0-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66E\\uA680-\\uA69D\\uA6A0-\\uA6EF\\uA6F2-\\uA6F7\\uA722-\\uA787\\uA789-\\uA7DC\\uA7F1-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA824\\uA827\\uA830-\\uA837\\uA840-\\uA873\\uA880-\\uA8C3\\uA8CE-\\uA8D9\\uA8F2-\\uA8FE\\uA900-\\uA925\\uA92E-\\uA946\\uA952\\uA953\\uA95F-\\uA97C\\uA983-\\uA9B2\\uA9B4\\uA9B5\\uA9BA\\uA9BB\\uA9BE-\\uA9CD\\uA9CF-\\uA9D9\\uA9DE-\\uA9E4\\uA9E6-\\uA9FE\\uAA00-\\uAA28\\uAA2F\\uAA30\\uAA33\\uAA34\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA4D\\uAA50-\\uAA59\\uAA5C-\\uAA7B\\uAA7D-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAAEB\\uAAEE-\\uAAF5\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB69\\uAB70-\\uABE4\\uABE6\\uABE7\\uABE9-\\uABEC\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uD800-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC\\u{10000}-\\u{1000B}\\u{1000D}-\\u{10026}\\u{10028}-\\u{1003A}\\u{1003C}\\u{1003D}\\u{1003F}-\\u{1004D}\\u{10050}-\\u{1005D}\\u{10080}-\\u{100FA}\\u{10100}\\u{10102}\\u{10107}-\\u{10133}\\u{10137}-\\u{1013F}\\u{1018D}\\u{1018E}\\u{101D0}-\\u{101FC}\\u{10280}-\\u{1029C}\\u{102A0}-\\u{102D0}\\u{10300}-\\u{10323}\\u{1032D}-\\u{1034A}\\u{10350}-\\u{10375}\\u{10380}-\\u{1039D}\\u{1039F}-\\u{103C3}\\u{103C8}-\\u{103D5}\\u{10400}-\\u{1049D}\\u{104A0}-\\u{104A9}\\u{104B0}-\\u{104D3}\\u{104D8}-\\u{104FB}\\u{10500}-\\u{10527}\\u{10530}-\\u{10563}\\u{1056F}-\\u{1057A}\\u{1057C}-\\u{1058A}\\u{1058C}-\\u{10592}\\u{10594}\\u{10595}\\u{10597}-\\u{105A1}\\u{105A3}-\\u{105B1}\\u{105B3}-\\u{105B9}\\u{105BB}\\u{105BC}\\u{105C0}-\\u{105F3}\\u{10600}-\\u{10736}\\u{10740}-\\u{10755}\\u{10760}-\\u{10767}\\u{10780}-\\u{10785}\\u{10787}-\\u{107B0}\\u{107B2}-\\u{107BA}\\u{11000}\\u{11002}-\\u{11037}\\u{11047}-\\u{1104D}\\u{11066}-\\u{1106F}\\u{11071}\\u{11072}\\u{11075}\\u{11082}-\\u{110B2}\\u{110B7}\\u{110B8}\\u{110BB}-\\u{110C1}\\u{110CD}\\u{110D0}-\\u{110E8}\\u{110F0}-\\u{110F9}\\u{11103}-\\u{11126}\\u{1112C}\\u{11136}-\\u{11147}\\u{11150}-\\u{11172}\\u{11174}-\\u{11176}\\u{11182}-\\u{111B5}\\u{111BF}-\\u{111C8}\\u{111CD}\\u{111CE}\\u{111D0}-\\u{111DF}\\u{111E1}-\\u{111F4}\\u{11200}-\\u{11211}\\u{11213}-\\u{1122E}\\u{11232}\\u{11233}\\u{11235}\\u{11238}-\\u{1123D}\\u{1123F}\\u{11240}\\u{11280}-\\u{11286}\\u{11288}\\u{1128A}-\\u{1128D}\\u{1128F}-\\u{1129D}\\u{1129F}-\\u{112A9}\\u{112B0}-\\u{112DE}\\u{112E0}-\\u{112E2}\\u{112F0}-\\u{112F9}\\u{11302}\\u{11303}\\u{11305}-\\u{1130C}\\u{1130F}\\u{11310}\\u{11313}-\\u{11328}\\u{1132A}-\\u{11330}\\u{11332}\\u{11333}\\u{11335}-\\u{11339}\\u{1133D}-\\u{1133F}\\u{11341}-\\u{11344}\\u{11347}\\u{11348}\\u{1134B}-\\u{1134D}\\u{11350}\\u{11357}\\u{1135D}-\\u{11363}\\u{11380}-\\u{11389}\\u{1138B}\\u{1138E}\\u{11390}-\\u{113B5}\\u{113B7}-\\u{113BA}\\u{113C2}\\u{113C5}\\u{113C7}-\\u{113CA}\\u{113CC}\\u{113CD}\\u{113CF}\\u{113D1}\\u{113D3}-\\u{113D5}\\u{113D7}\\u{113D8}\\u{11400}-\\u{11437}\\u{11440}\\u{11441}\\u{11445}\\u{11447}-\\u{1145B}\\u{1145D}\\u{1145F}-\\u{11461}\\u{11480}-\\u{114B2}\\u{114B9}\\u{114BB}-\\u{114BE}\\u{114C1}\\u{114C4}-\\u{114C7}\\u{114D0}-\\u{114D9}\\u{11580}-\\u{115B1}\\u{115B8}-\\u{115BB}\\u{115BE}\\u{115C1}-\\u{115DB}\\u{11600}-\\u{11632}\\u{1163B}\\u{1163C}\\u{1163E}\\u{11641}-\\u{11644}\\u{11650}-\\u{11659}\\u{11680}-\\u{116AA}\\u{116AC}\\u{116AE}\\u{116AF}\\u{116B6}\\u{116B8}\\u{116B9}\\u{116C0}-\\u{116C9}\\u{116D0}-\\u{116E3}\\u{11700}-\\u{1171A}\\u{1171E}\\u{11720}\\u{11721}\\u{11726}\\u{11730}-\\u{11746}\\u{11800}-\\u{1182E}\\u{11838}\\u{1183B}\\u{118A0}-\\u{118F2}\\u{118FF}-\\u{11906}\\u{11909}\\u{1190C}-\\u{11913}\\u{11915}\\u{11916}\\u{11918}-\\u{11935}\\u{11937}\\u{11938}\\u{1193D}\\u{1193F}-\\u{11942}\\u{11944}-\\u{11946}\\u{11950}-\\u{11959}\\u{119A0}-\\u{119A7}\\u{119AA}-\\u{119D3}\\u{119DC}-\\u{119DF}\\u{119E1}-\\u{119E4}\\u{11A00}\\u{11A07}\\u{11A08}\\u{11A0B}-\\u{11A32}\\u{11A39}\\u{11A3A}\\u{11A3F}-\\u{11A46}\\u{11A50}\\u{11A57}\\u{11A58}\\u{11A5C}-\\u{11A89}\\u{11A97}\\u{11A9A}-\\u{11AA2}\\u{11AB0}-\\u{11AF8}\\u{11B00}-\\u{11B09}\\u{11B61}\\u{11B65}\\u{11B67}\\u{11BC0}-\\u{11BE1}\\u{11BF0}-\\u{11BF9}\\u{11C00}-\\u{11C08}\\u{11C0A}-\\u{11C2F}\\u{11C3E}-\\u{11C45}\\u{11C50}-\\u{11C6C}\\u{11C70}-\\u{11C8F}\\u{11CA9}\\u{11CB1}\\u{11CB4}\\u{11D00}-\\u{11D06}\\u{11D08}\\u{11D09}\\u{11D0B}-\\u{11D30}\\u{11D46}\\u{11D50}-\\u{11D59}\\u{11D60}-\\u{11D65}\\u{11D67}\\u{11D68}\\u{11D6A}-\\u{11D8E}\\u{11D93}\\u{11D94}\\u{11D96}\\u{11D98}\\u{11DA0}-\\u{11DA9}\\u{11DB0}-\\u{11DDB}\\u{11DE0}-\\u{11DE9}\\u{11EE0}-\\u{11EF2}\\u{11EF5}-\\u{11EF8}\\u{11F02}-\\u{11F10}\\u{11F12}-\\u{11F35}\\u{11F3E}\\u{11F3F}\\u{11F41}\\u{11F43}-\\u{11F59}\\u{11FB0}\\u{11FC0}-\\u{11FD4}\\u{11FFF}-\\u{12399}\\u{12400}-\\u{1246E}\\u{12470}-\\u{12474}\\u{12480}-\\u{12543}\\u{12F90}-\\u{12FF2}\\u{13000}-\\u{1343F}\\u{13441}-\\u{13446}\\u{13460}-\\u{143FA}\\u{14400}-\\u{14646}\\u{16100}-\\u{1611D}\\u{1612A}-\\u{1612C}\\u{16130}-\\u{16139}\\u{16800}-\\u{16A38}\\u{16A40}-\\u{16A5E}\\u{16A60}-\\u{16A69}\\u{16A6E}-\\u{16ABE}\\u{16AC0}-\\u{16AC9}\\u{16AD0}-\\u{16AED}\\u{16AF5}\\u{16B00}-\\u{16B2F}\\u{16B37}-\\u{16B45}\\u{16B50}-\\u{16B59}\\u{16B5B}-\\u{16B61}\\u{16B63}-\\u{16B77}\\u{16B7D}-\\u{16B8F}\\u{16D40}-\\u{16D79}\\u{16E40}-\\u{16E9A}\\u{16EA0}-\\u{16EB8}\\u{16EBB}-\\u{16ED3}\\u{16F00}-\\u{16F4A}\\u{16F50}-\\u{16F87}\\u{16F93}-\\u{16F9F}\\u{16FE0}\\u{16FE1}\\u{16FE3}\\u{16FF0}-\\u{16FF6}\\u{17000}-\\u{18CD5}\\u{18CFF}-\\u{18D1E}\\u{18D80}-\\u{18DF2}\\u{1AFF0}-\\u{1AFF3}\\u{1AFF5}-\\u{1AFFB}\\u{1AFFD}\\u{1AFFE}\\u{1B000}-\\u{1B122}\\u{1B132}\\u{1B150}-\\u{1B152}\\u{1B155}\\u{1B164}-\\u{1B167}\\u{1B170}-\\u{1B2FB}\\u{1BC00}-\\u{1BC6A}\\u{1BC70}-\\u{1BC7C}\\u{1BC80}-\\u{1BC88}\\u{1BC90}-\\u{1BC99}\\u{1BC9C}\\u{1BC9F}\\u{1CCD6}-\\u{1CCEF}\\u{1CF50}-\\u{1CFC3}\\u{1D000}-\\u{1D0F5}\\u{1D100}-\\u{1D126}\\u{1D129}-\\u{1D166}\\u{1D16A}-\\u{1D172}\\u{1D183}\\u{1D184}\\u{1D18C}-\\u{1D1A9}\\u{1D1AE}-\\u{1D1E8}\\u{1D2C0}-\\u{1D2D3}\\u{1D2E0}-\\u{1D2F3}\\u{1D360}-\\u{1D378}\\u{1D400}-\\u{1D454}\\u{1D456}-\\u{1D49C}\\u{1D49E}\\u{1D49F}\\u{1D4A2}\\u{1D4A5}\\u{1D4A6}\\u{1D4A9}-\\u{1D4AC}\\u{1D4AE}-\\u{1D4B9}\\u{1D4BB}\\u{1D4BD}-\\u{1D4C3}\\u{1D4C5}-\\u{1D505}\\u{1D507}-\\u{1D50A}\\u{1D50D}-\\u{1D514}\\u{1D516}-\\u{1D51C}\\u{1D51E}-\\u{1D539}\\u{1D53B}-\\u{1D53E}\\u{1D540}-\\u{1D544}\\u{1D546}\\u{1D54A}-\\u{1D550}\\u{1D552}-\\u{1D6A5}\\u{1D6A8}-\\u{1D6C0}\\u{1D6C2}-\\u{1D6DA}\\u{1D6DC}-\\u{1D6FA}\\u{1D6FC}-\\u{1D714}\\u{1D716}-\\u{1D734}\\u{1D736}-\\u{1D74E}\\u{1D750}-\\u{1D76E}\\u{1D770}-\\u{1D788}\\u{1D78A}-\\u{1D7A8}\\u{1D7AA}-\\u{1D7C2}\\u{1D7C4}-\\u{1D7CB}\\u{1D800}-\\u{1D9FF}\\u{1DA37}-\\u{1DA3A}\\u{1DA6D}-\\u{1DA74}\\u{1DA76}-\\u{1DA83}\\u{1DA85}-\\u{1DA8B}\\u{1DF00}-\\u{1DF1E}\\u{1DF25}-\\u{1DF2A}\\u{1E030}-\\u{1E06D}\\u{1E100}-\\u{1E12C}\\u{1E137}-\\u{1E13D}\\u{1E140}-\\u{1E149}\\u{1E14E}\\u{1E14F}\\u{1E290}-\\u{1E2AD}\\u{1E2C0}-\\u{1E2EB}\\u{1E2F0}-\\u{1E2F9}\\u{1E4D0}-\\u{1E4EB}\\u{1E4F0}-\\u{1E4F9}\\u{1E5D0}-\\u{1E5ED}\\u{1E5F0}-\\u{1E5FA}\\u{1E5FF}\\u{1E6C0}-\\u{1E6DE}\\u{1E6E0}-\\u{1E6E2}\\u{1E6E4}\\u{1E6E5}\\u{1E6E7}-\\u{1E6ED}\\u{1E6F0}-\\u{1E6F4}\\u{1E6FE}\\u{1E6FF}\\u{1E7E0}-\\u{1E7E6}\\u{1E7E8}-\\u{1E7EB}\\u{1E7ED}\\u{1E7EE}\\u{1E7F0}-\\u{1E7FE}\\u{1F110}-\\u{1F12E}\\u{1F130}-\\u{1F169}\\u{1F170}-\\u{1F1AC}\\u{1F1E6}-\\u{1F202}\\u{1F210}-\\u{1F23B}\\u{1F240}-\\u{1F248}\\u{1F250}\\u{1F251}\\u{20000}-\\u{2A6DF}\\u{2A700}-\\u{2B81D}\\u{2B820}-\\u{2CEAD}\\u{2CEB0}-\\u{2EBE0}\\u{2EBF0}-\\u{2EE5D}\\u{2F800}-\\u{2FA1D}\\u{30000}-\\u{3134A}\\u{31350}-\\u{33479}\\u{F0000}-\\u{FFFFD}\\u{100000}-\\u{10FFFD}]/u;\nconst bidiS1RTL = /[\\u05BE\\u05C0\\u05C3\\u05C6\\u05D0-\\u05EA\\u05EF-\\u05F4\\u0608\\u060B\\u060D\\u061B-\\u064A\\u066D-\\u066F\\u0671-\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u070D\\u070F\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07C0-\\u07EA\\u07F4\\u07F5\\u07FA\\u07FE-\\u0815\\u081A\\u0824\\u0828\\u0830-\\u083E\\u0840-\\u0858\\u085E\\u0860-\\u086A\\u0870-\\u088F\\u08A0-\\u08C9\\u200F\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBC2\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFC\\uFE70-\\uFE74\\uFE76-\\uFEFC\\u{10800}-\\u{10805}\\u{10808}\\u{1080A}-\\u{10835}\\u{10837}\\u{10838}\\u{1083C}\\u{1083F}-\\u{10855}\\u{10857}-\\u{1089E}\\u{108A7}-\\u{108AF}\\u{108E0}-\\u{108F2}\\u{108F4}\\u{108F5}\\u{108FB}-\\u{1091B}\\u{10920}-\\u{10939}\\u{1093F}-\\u{10959}\\u{10980}-\\u{109B7}\\u{109BC}-\\u{109CF}\\u{109D2}-\\u{10A00}\\u{10A10}-\\u{10A13}\\u{10A15}-\\u{10A17}\\u{10A19}-\\u{10A35}\\u{10A40}-\\u{10A48}\\u{10A50}-\\u{10A58}\\u{10A60}-\\u{10A9F}\\u{10AC0}-\\u{10AE4}\\u{10AEB}-\\u{10AF6}\\u{10B00}-\\u{10B35}\\u{10B40}-\\u{10B55}\\u{10B58}-\\u{10B72}\\u{10B78}-\\u{10B91}\\u{10B99}-\\u{10B9C}\\u{10BA9}-\\u{10BAF}\\u{10C00}-\\u{10C48}\\u{10C80}-\\u{10CB2}\\u{10CC0}-\\u{10CF2}\\u{10CFA}-\\u{10D23}\\u{10D4A}-\\u{10D65}\\u{10D6F}-\\u{10D85}\\u{10D8E}\\u{10D8F}\\u{10E80}-\\u{10EA9}\\u{10EAD}\\u{10EB0}\\u{10EB1}\\u{10EC2}-\\u{10EC7}\\u{10F00}-\\u{10F27}\\u{10F30}-\\u{10F45}\\u{10F51}-\\u{10F59}\\u{10F70}-\\u{10F81}\\u{10F86}-\\u{10F89}\\u{10FB0}-\\u{10FCB}\\u{10FE0}-\\u{10FF6}\\u{1E800}-\\u{1E8C4}\\u{1E8C7}-\\u{1E8CF}\\u{1E900}-\\u{1E943}\\u{1E94B}\\u{1E950}-\\u{1E959}\\u{1E95E}\\u{1E95F}\\u{1EC71}-\\u{1ECB4}\\u{1ED01}-\\u{1ED3D}\\u{1EE00}-\\u{1EE03}\\u{1EE05}-\\u{1EE1F}\\u{1EE21}\\u{1EE22}\\u{1EE24}\\u{1EE27}\\u{1EE29}-\\u{1EE32}\\u{1EE34}-\\u{1EE37}\\u{1EE39}\\u{1EE3B}\\u{1EE42}\\u{1EE47}\\u{1EE49}\\u{1EE4B}\\u{1EE4D}-\\u{1EE4F}\\u{1EE51}\\u{1EE52}\\u{1EE54}\\u{1EE57}\\u{1EE59}\\u{1EE5B}\\u{1EE5D}\\u{1EE5F}\\u{1EE61}\\u{1EE62}\\u{1EE64}\\u{1EE67}-\\u{1EE6A}\\u{1EE6C}-\\u{1EE72}\\u{1EE74}-\\u{1EE77}\\u{1EE79}-\\u{1EE7C}\\u{1EE7E}\\u{1EE80}-\\u{1EE89}\\u{1EE8B}-\\u{1EE9B}\\u{1EEA1}-\\u{1EEA3}\\u{1EEA5}-\\u{1EEA9}\\u{1EEAB}-\\u{1EEBB}]/u;\nconst bidiS2 = /^[\\0-\\x08\\x0E-\\x1B!-@\\[-`\\{-\\x84\\x86-\\xA9\\xAB-\\xB4\\xB6-\\xB9\\xBB-\\xBF\\xD7\\xF7\\u02B9\\u02BA\\u02C2-\\u02CF\\u02D2-\\u02DF\\u02E5-\\u02ED\\u02EF-\\u036F\\u0374\\u0375\\u037E\\u0384\\u0385\\u0387\\u03F6\\u0483-\\u0489\\u058A\\u058D-\\u058F\\u0591-\\u05C7\\u05D0-\\u05EA\\u05EF-\\u05F4\\u0600-\\u070D\\u070F-\\u074A\\u074D-\\u07B1\\u07C0-\\u07FA\\u07FD-\\u082D\\u0830-\\u083E\\u0840-\\u085B\\u085E\\u0860-\\u086A\\u0870-\\u0891\\u0897-\\u0902\\u093A\\u093C\\u0941-\\u0948\\u094D\\u0951-\\u0957\\u0962\\u0963\\u0981\\u09BC\\u09C1-\\u09C4\\u09CD\\u09E2\\u09E3\\u09F2\\u09F3\\u09FB\\u09FE\\u0A01\\u0A02\\u0A3C\\u0A41\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81\\u0A82\\u0ABC\\u0AC1-\\u0AC5\\u0AC7\\u0AC8\\u0ACD\\u0AE2\\u0AE3\\u0AF1\\u0AFA-\\u0AFF\\u0B01\\u0B3C\\u0B3F\\u0B41-\\u0B44\\u0B4D\\u0B55\\u0B56\\u0B62\\u0B63\\u0B82\\u0BC0\\u0BCD\\u0BF3-\\u0BFA\\u0C00\\u0C04\\u0C3C\\u0C3E-\\u0C40\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C78-\\u0C7E\\u0C81\\u0CBC\\u0CCC\\u0CCD\\u0CE2\\u0CE3\\u0D00\\u0D01\\u0D3B\\u0D3C\\u0D41-\\u0D44\\u0D4D\\u0D62\\u0D63\\u0D81\\u0DCA\\u0DD2-\\u0DD4\\u0DD6\\u0E31\\u0E34-\\u0E3A\\u0E3F\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EBC\\u0EC8-\\u0ECE\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39-\\u0F3D\\u0F71-\\u0F7E\\u0F80-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1030\\u1032-\\u1037\\u1039\\u103A\\u103D\\u103E\\u1058\\u1059\\u105E-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108D\\u109D\\u135D-\\u135F\\u1390-\\u1399\\u1400\\u169B\\u169C\\u1712-\\u1714\\u1732\\u1733\\u1752\\u1753\\u1772\\u1773\\u17B4\\u17B5\\u17B7-\\u17BD\\u17C6\\u17C9-\\u17D3\\u17DB\\u17DD\\u17F0-\\u17F9\\u1800-\\u180F\\u1885\\u1886\\u18A9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193B\\u1940\\u1944\\u1945\\u19DE-\\u19FF\\u1A17\\u1A18\\u1A1B\\u1A56\\u1A58-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A6C\\u1A73-\\u1A7C\\u1A7F\\u1AB0-\\u1ADD\\u1AE0-\\u1AEB\\u1B00-\\u1B03\\u1B34\\u1B36-\\u1B3A\\u1B3C\\u1B42\\u1B6B-\\u1B73\\u1B80\\u1B81\\u1BA2-\\u1BA5\\u1BA8\\u1BA9\\u1BAB-\\u1BAD\\u1BE6\\u1BE8\\u1BE9\\u1BED\\u1BEF-\\u1BF1\\u1C2C-\\u1C33\\u1C36\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE0\\u1CE2-\\u1CE8\\u1CED\\u1CF4\\u1CF8\\u1CF9\\u1DC0-\\u1DFF\\u1FBD\\u1FBF-\\u1FC1\\u1FCD-\\u1FCF\\u1FDD-\\u1FDF\\u1FED-\\u1FEF\\u1FFD\\u1FFE\\u200B-\\u200D\\u200F-\\u2027\\u202F-\\u205E\\u2060-\\u2064\\u206A-\\u2070\\u2074-\\u207E\\u2080-\\u208E\\u20A0-\\u20C1\\u20D0-\\u20F0\\u2100\\u2101\\u2103-\\u2106\\u2108\\u2109\\u2114\\u2116-\\u2118\\u211E-\\u2123\\u2125\\u2127\\u2129\\u212E\\u213A\\u213B\\u2140-\\u2144\\u214A-\\u214D\\u2150-\\u215F\\u2189-\\u218B\\u2190-\\u2335\\u237B-\\u2394\\u2396-\\u2429\\u2440-\\u244A\\u2460-\\u249B\\u24EA-\\u26AB\\u26AD-\\u27FF\\u2900-\\u2B73\\u2B76-\\u2BFF\\u2CE5-\\u2CEA\\u2CEF-\\u2CF1\\u2CF9-\\u2CFF\\u2D7F\\u2DE0-\\u2E5D\\u2E80-\\u2E99\\u2E9B-\\u2EF3\\u2F00-\\u2FD5\\u2FF0-\\u2FFF\\u3001-\\u3004\\u3008-\\u3020\\u302A-\\u302D\\u3030\\u3036\\u3037\\u303D-\\u303F\\u3099-\\u309C\\u30A0\\u30FB\\u31C0-\\u31E5\\u31EF\\u321D\\u321E\\u3250-\\u325F\\u327C-\\u327E\\u32B1-\\u32BF\\u32CC-\\u32CF\\u3377-\\u337A\\u33DE\\u33DF\\u33FF\\u4DC0-\\u4DFF\\uA490-\\uA4C6\\uA60D-\\uA60F\\uA66F-\\uA67F\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA700-\\uA721\\uA788\\uA802\\uA806\\uA80B\\uA825\\uA826\\uA828-\\uA82C\\uA838\\uA839\\uA874-\\uA877\\uA8C4\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA951\\uA980-\\uA982\\uA9B3\\uA9B6-\\uA9B9\\uA9BC\\uA9BD\\uA9E5\\uAA29-\\uAA2E\\uAA31\\uAA32\\uAA35\\uAA36\\uAA43\\uAA4C\\uAA7C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEC\\uAAED\\uAAF6\\uAB6A\\uAB6B\\uABE5\\uABE8\\uABED\\uFB1D-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFDCF\\uFDF0-\\uFE19\\uFE20-\\uFE52\\uFE54-\\uFE66\\uFE68-\\uFE6B\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFEFF\\uFF01-\\uFF20\\uFF3B-\\uFF40\\uFF5B-\\uFF65\\uFFE0-\\uFFE6\\uFFE8-\\uFFEE\\uFFF9-\\uFFFD\\u{10101}\\u{10140}-\\u{1018C}\\u{10190}-\\u{1019C}\\u{101A0}\\u{101FD}\\u{102E0}-\\u{102FB}\\u{10376}-\\u{1037A}\\u{10800}-\\u{10805}\\u{10808}\\u{1080A}-\\u{10835}\\u{10837}\\u{10838}\\u{1083C}\\u{1083F}-\\u{10855}\\u{10857}-\\u{1089E}\\u{108A7}-\\u{108AF}\\u{108E0}-\\u{108F2}\\u{108F4}\\u{108F5}\\u{108FB}-\\u{1091B}\\u{1091F}-\\u{10939}\\u{1093F}-\\u{10959}\\u{10980}-\\u{109B7}\\u{109BC}-\\u{109CF}\\u{109D2}-\\u{10A03}\\u{10A05}\\u{10A06}\\u{10A0C}-\\u{10A13}\\u{10A15}-\\u{10A17}\\u{10A19}-\\u{10A35}\\u{10A38}-\\u{10A3A}\\u{10A3F}-\\u{10A48}\\u{10A50}-\\u{10A58}\\u{10A60}-\\u{10A9F}\\u{10AC0}-\\u{10AE6}\\u{10AEB}-\\u{10AF6}\\u{10B00}-\\u{10B35}\\u{10B39}-\\u{10B55}\\u{10B58}-\\u{10B72}\\u{10B78}-\\u{10B91}\\u{10B99}-\\u{10B9C}\\u{10BA9}-\\u{10BAF}\\u{10C00}-\\u{10C48}\\u{10C80}-\\u{10CB2}\\u{10CC0}-\\u{10CF2}\\u{10CFA}-\\u{10D27}\\u{10D30}-\\u{10D39}\\u{10D40}-\\u{10D65}\\u{10D69}-\\u{10D85}\\u{10D8E}\\u{10D8F}\\u{10E60}-\\u{10E7E}\\u{10E80}-\\u{10EA9}\\u{10EAB}-\\u{10EAD}\\u{10EB0}\\u{10EB1}\\u{10EC2}-\\u{10EC7}\\u{10ED0}-\\u{10ED8}\\u{10EFA}-\\u{10F27}\\u{10F30}-\\u{10F59}\\u{10F70}-\\u{10F89}\\u{10FB0}-\\u{10FCB}\\u{10FE0}-\\u{10FF6}\\u{11001}\\u{11038}-\\u{11046}\\u{11052}-\\u{11065}\\u{11070}\\u{11073}\\u{11074}\\u{1107F}-\\u{11081}\\u{110B3}-\\u{110B6}\\u{110B9}\\u{110BA}\\u{110C2}\\u{11100}-\\u{11102}\\u{11127}-\\u{1112B}\\u{1112D}-\\u{11134}\\u{11173}\\u{11180}\\u{11181}\\u{111B6}-\\u{111BE}\\u{111C9}-\\u{111CC}\\u{111CF}\\u{1122F}-\\u{11231}\\u{11234}\\u{11236}\\u{11237}\\u{1123E}\\u{11241}\\u{112DF}\\u{112E3}-\\u{112EA}\\u{11300}\\u{11301}\\u{1133B}\\u{1133C}\\u{11340}\\u{11366}-\\u{1136C}\\u{11370}-\\u{11374}\\u{113BB}-\\u{113C0}\\u{113CE}\\u{113D0}\\u{113D2}\\u{113E1}\\u{113E2}\\u{11438}-\\u{1143F}\\u{11442}-\\u{11444}\\u{11446}\\u{1145E}\\u{114B3}-\\u{114B8}\\u{114BA}\\u{114BF}\\u{114C0}\\u{114C2}\\u{114C3}\\u{115B2}-\\u{115B5}\\u{115BC}\\u{115BD}\\u{115BF}\\u{115C0}\\u{115DC}\\u{115DD}\\u{11633}-\\u{1163A}\\u{1163D}\\u{1163F}\\u{11640}\\u{11660}-\\u{1166C}\\u{116AB}\\u{116AD}\\u{116B0}-\\u{116B5}\\u{116B7}\\u{1171D}\\u{1171F}\\u{11722}-\\u{11725}\\u{11727}-\\u{1172B}\\u{1182F}-\\u{11837}\\u{11839}\\u{1183A}\\u{1193B}\\u{1193C}\\u{1193E}\\u{11943}\\u{119D4}-\\u{119D7}\\u{119DA}\\u{119DB}\\u{119E0}\\u{11A01}-\\u{11A06}\\u{11A09}\\u{11A0A}\\u{11A33}-\\u{11A38}\\u{11A3B}-\\u{11A3E}\\u{11A47}\\u{11A51}-\\u{11A56}\\u{11A59}-\\u{11A5B}\\u{11A8A}-\\u{11A96}\\u{11A98}\\u{11A99}\\u{11B60}\\u{11B62}-\\u{11B64}\\u{11B66}\\u{11C30}-\\u{11C36}\\u{11C38}-\\u{11C3D}\\u{11C92}-\\u{11CA7}\\u{11CAA}-\\u{11CB0}\\u{11CB2}\\u{11CB3}\\u{11CB5}\\u{11CB6}\\u{11D31}-\\u{11D36}\\u{11D3A}\\u{11D3C}\\u{11D3D}\\u{11D3F}-\\u{11D45}\\u{11D47}\\u{11D90}\\u{11D91}\\u{11D95}\\u{11D97}\\u{11EF3}\\u{11EF4}\\u{11F00}\\u{11F01}\\u{11F36}-\\u{11F3A}\\u{11F40}\\u{11F42}\\u{11F5A}\\u{11FD5}-\\u{11FF1}\\u{13440}\\u{13447}-\\u{13455}\\u{1611E}-\\u{16129}\\u{1612D}-\\u{1612F}\\u{16AF0}-\\u{16AF4}\\u{16B30}-\\u{16B36}\\u{16F4F}\\u{16F8F}-\\u{16F92}\\u{16FE2}\\u{16FE4}\\u{1BC9D}\\u{1BC9E}\\u{1BCA0}-\\u{1BCA3}\\u{1CC00}-\\u{1CCD5}\\u{1CCF0}-\\u{1CCFC}\\u{1CD00}-\\u{1CEB3}\\u{1CEBA}-\\u{1CED0}\\u{1CEE0}-\\u{1CEF0}\\u{1CF00}-\\u{1CF2D}\\u{1CF30}-\\u{1CF46}\\u{1D167}-\\u{1D169}\\u{1D173}-\\u{1D182}\\u{1D185}-\\u{1D18B}\\u{1D1AA}-\\u{1D1AD}\\u{1D1E9}\\u{1D1EA}\\u{1D200}-\\u{1D245}\\u{1D300}-\\u{1D356}\\u{1D6C1}\\u{1D6DB}\\u{1D6FB}\\u{1D715}\\u{1D735}\\u{1D74F}\\u{1D76F}\\u{1D789}\\u{1D7A9}\\u{1D7C3}\\u{1D7CE}-\\u{1D7FF}\\u{1DA00}-\\u{1DA36}\\u{1DA3B}-\\u{1DA6C}\\u{1DA75}\\u{1DA84}\\u{1DA9B}-\\u{1DA9F}\\u{1DAA1}-\\u{1DAAF}\\u{1E000}-\\u{1E006}\\u{1E008}-\\u{1E018}\\u{1E01B}-\\u{1E021}\\u{1E023}\\u{1E024}\\u{1E026}-\\u{1E02A}\\u{1E08F}\\u{1E130}-\\u{1E136}\\u{1E2AE}\\u{1E2EC}-\\u{1E2EF}\\u{1E2FF}\\u{1E4EC}-\\u{1E4EF}\\u{1E5EE}\\u{1E5EF}\\u{1E6E3}\\u{1E6E6}\\u{1E6EE}\\u{1E6EF}\\u{1E6F5}\\u{1E800}-\\u{1E8C4}\\u{1E8C7}-\\u{1E8D6}\\u{1E900}-\\u{1E94B}\\u{1E950}-\\u{1E959}\\u{1E95E}\\u{1E95F}\\u{1EC71}-\\u{1ECB4}\\u{1ED01}-\\u{1ED3D}\\u{1EE00}-\\u{1EE03}\\u{1EE05}-\\u{1EE1F}\\u{1EE21}\\u{1EE22}\\u{1EE24}\\u{1EE27}\\u{1EE29}-\\u{1EE32}\\u{1EE34}-\\u{1EE37}\\u{1EE39}\\u{1EE3B}\\u{1EE42}\\u{1EE47}\\u{1EE49}\\u{1EE4B}\\u{1EE4D}-\\u{1EE4F}\\u{1EE51}\\u{1EE52}\\u{1EE54}\\u{1EE57}\\u{1EE59}\\u{1EE5B}\\u{1EE5D}\\u{1EE5F}\\u{1EE61}\\u{1EE62}\\u{1EE64}\\u{1EE67}-\\u{1EE6A}\\u{1EE6C}-\\u{1EE72}\\u{1EE74}-\\u{1EE77}\\u{1EE79}-\\u{1EE7C}\\u{1EE7E}\\u{1EE80}-\\u{1EE89}\\u{1EE8B}-\\u{1EE9B}\\u{1EEA1}-\\u{1EEA3}\\u{1EEA5}-\\u{1EEA9}\\u{1EEAB}-\\u{1EEBB}\\u{1EEF0}\\u{1EEF1}\\u{1F000}-\\u{1F02B}\\u{1F030}-\\u{1F093}\\u{1F0A0}-\\u{1F0AE}\\u{1F0B1}-\\u{1F0BF}\\u{1F0C1}-\\u{1F0CF}\\u{1F0D1}-\\u{1F0F5}\\u{1F100}-\\u{1F10F}\\u{1F12F}\\u{1F16A}-\\u{1F16F}\\u{1F1AD}\\u{1F260}-\\u{1F265}\\u{1F300}-\\u{1F6D8}\\u{1F6DC}-\\u{1F6EC}\\u{1F6F0}-\\u{1F6FC}\\u{1F700}-\\u{1F7D9}\\u{1F7E0}-\\u{1F7EB}\\u{1F7F0}\\u{1F800}-\\u{1F80B}\\u{1F810}-\\u{1F847}\\u{1F850}-\\u{1F859}\\u{1F860}-\\u{1F887}\\u{1F890}-\\u{1F8AD}\\u{1F8B0}-\\u{1F8BB}\\u{1F8C0}\\u{1F8C1}\\u{1F8D0}-\\u{1F8D8}\\u{1F900}-\\u{1FA57}\\u{1FA60}-\\u{1FA6D}\\u{1FA70}-\\u{1FA7C}\\u{1FA80}-\\u{1FA8A}\\u{1FA8E}-\\u{1FAC6}\\u{1FAC8}\\u{1FACD}-\\u{1FADC}\\u{1FADF}-\\u{1FAEA}\\u{1FAEF}-\\u{1FAF8}\\u{1FB00}-\\u{1FB92}\\u{1FB94}-\\u{1FBFA}\\u{E0001}\\u{E0020}-\\u{E007F}\\u{E0100}-\\u{E01EF}]*$/u;\nconst bidiS3 = /[0-9\\xB2\\xB3\\xB9\\u05BE\\u05C0\\u05C3\\u05C6\\u05D0-\\u05EA\\u05EF-\\u05F4\\u0600-\\u0605\\u0608\\u060B\\u060D\\u061B-\\u064A\\u0660-\\u0669\\u066B-\\u066F\\u0671-\\u06D5\\u06DD\\u06E5\\u06E6\\u06EE-\\u070D\\u070F\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07C0-\\u07EA\\u07F4\\u07F5\\u07FA\\u07FE-\\u0815\\u081A\\u0824\\u0828\\u0830-\\u083E\\u0840-\\u0858\\u085E\\u0860-\\u086A\\u0870-\\u0891\\u08A0-\\u08C9\\u08E2\\u200F\\u2070\\u2074-\\u2079\\u2080-\\u2089\\u2488-\\u249B\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBC2\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFC\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\u{102E1}-\\u{102FB}\\u{10800}-\\u{10805}\\u{10808}\\u{1080A}-\\u{10835}\\u{10837}\\u{10838}\\u{1083C}\\u{1083F}-\\u{10855}\\u{10857}-\\u{1089E}\\u{108A7}-\\u{108AF}\\u{108E0}-\\u{108F2}\\u{108F4}\\u{108F5}\\u{108FB}-\\u{1091B}\\u{10920}-\\u{10939}\\u{1093F}-\\u{10959}\\u{10980}-\\u{109B7}\\u{109BC}-\\u{109CF}\\u{109D2}-\\u{10A00}\\u{10A10}-\\u{10A13}\\u{10A15}-\\u{10A17}\\u{10A19}-\\u{10A35}\\u{10A40}-\\u{10A48}\\u{10A50}-\\u{10A58}\\u{10A60}-\\u{10A9F}\\u{10AC0}-\\u{10AE4}\\u{10AEB}-\\u{10AF6}\\u{10B00}-\\u{10B35}\\u{10B40}-\\u{10B55}\\u{10B58}-\\u{10B72}\\u{10B78}-\\u{10B91}\\u{10B99}-\\u{10B9C}\\u{10BA9}-\\u{10BAF}\\u{10C00}-\\u{10C48}\\u{10C80}-\\u{10CB2}\\u{10CC0}-\\u{10CF2}\\u{10CFA}-\\u{10D23}\\u{10D30}-\\u{10D39}\\u{10D40}-\\u{10D65}\\u{10D6F}-\\u{10D85}\\u{10D8E}\\u{10D8F}\\u{10E60}-\\u{10E7E}\\u{10E80}-\\u{10EA9}\\u{10EAD}\\u{10EB0}\\u{10EB1}\\u{10EC2}-\\u{10EC7}\\u{10F00}-\\u{10F27}\\u{10F30}-\\u{10F45}\\u{10F51}-\\u{10F59}\\u{10F70}-\\u{10F81}\\u{10F86}-\\u{10F89}\\u{10FB0}-\\u{10FCB}\\u{10FE0}-\\u{10FF6}\\u{1CCF0}-\\u{1CCF9}\\u{1D7CE}-\\u{1D7FF}\\u{1E800}-\\u{1E8C4}\\u{1E8C7}-\\u{1E8CF}\\u{1E900}-\\u{1E943}\\u{1E94B}\\u{1E950}-\\u{1E959}\\u{1E95E}\\u{1E95F}\\u{1EC71}-\\u{1ECB4}\\u{1ED01}-\\u{1ED3D}\\u{1EE00}-\\u{1EE03}\\u{1EE05}-\\u{1EE1F}\\u{1EE21}\\u{1EE22}\\u{1EE24}\\u{1EE27}\\u{1EE29}-\\u{1EE32}\\u{1EE34}-\\u{1EE37}\\u{1EE39}\\u{1EE3B}\\u{1EE42}\\u{1EE47}\\u{1EE49}\\u{1EE4B}\\u{1EE4D}-\\u{1EE4F}\\u{1EE51}\\u{1EE52}\\u{1EE54}\\u{1EE57}\\u{1EE59}\\u{1EE5B}\\u{1EE5D}\\u{1EE5F}\\u{1EE61}\\u{1EE62}\\u{1EE64}\\u{1EE67}-\\u{1EE6A}\\u{1EE6C}-\\u{1EE72}\\u{1EE74}-\\u{1EE77}\\u{1EE79}-\\u{1EE7C}\\u{1EE7E}\\u{1EE80}-\\u{1EE89}\\u{1EE8B}-\\u{1EE9B}\\u{1EEA1}-\\u{1EEA3}\\u{1EEA5}-\\u{1EEA9}\\u{1EEAB}-\\u{1EEBB}\\u{1F100}-\\u{1F10A}\\u{1FBF0}-\\u{1FBF9}][\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u0897-\\u089F\\u08CA-\\u08E1\\u08E3-\\u0902\\u093A\\u093C\\u0941-\\u0948\\u094D\\u0951-\\u0957\\u0962\\u0963\\u0981\\u09BC\\u09C1-\\u09C4\\u09CD\\u09E2\\u09E3\\u09FE\\u0A01\\u0A02\\u0A3C\\u0A41\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81\\u0A82\\u0ABC\\u0AC1-\\u0AC5\\u0AC7\\u0AC8\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01\\u0B3C\\u0B3F\\u0B41-\\u0B44\\u0B4D\\u0B55\\u0B56\\u0B62\\u0B63\\u0B82\\u0BC0\\u0BCD\\u0C00\\u0C04\\u0C3C\\u0C3E-\\u0C40\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81\\u0CBC\\u0CCC\\u0CCD\\u0CE2\\u0CE3\\u0D00\\u0D01\\u0D3B\\u0D3C\\u0D41-\\u0D44\\u0D4D\\u0D62\\u0D63\\u0D81\\u0DCA\\u0DD2-\\u0DD4\\u0DD6\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EBC\\u0EC8-\\u0ECE\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F71-\\u0F7E\\u0F80-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1030\\u1032-\\u1037\\u1039\\u103A\\u103D\\u103E\\u1058\\u1059\\u105E-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108D\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732\\u1733\\u1752\\u1753\\u1772\\u1773\\u17B4\\u17B5\\u17B7-\\u17BD\\u17C6\\u17C9-\\u17D3\\u17DD\\u180B-\\u180D\\u180F\\u1885\\u1886\\u18A9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193B\\u1A17\\u1A18\\u1A1B\\u1A56\\u1A58-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A6C\\u1A73-\\u1A7C\\u1A7F\\u1AB0-\\u1ADD\\u1AE0-\\u1AEB\\u1B00-\\u1B03\\u1B34\\u1B36-\\u1B3A\\u1B3C\\u1B42\\u1B6B-\\u1B73\\u1B80\\u1B81\\u1BA2-\\u1BA5\\u1BA8\\u1BA9\\u1BAB-\\u1BAD\\u1BE6\\u1BE8\\u1BE9\\u1BED\\u1BEF-\\u1BF1\\u1C2C-\\u1C33\\u1C36\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE0\\u1CE2-\\u1CE8\\u1CED\\u1CF4\\u1CF8\\u1CF9\\u1DC0-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302D\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA825\\uA826\\uA82C\\uA8C4\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA951\\uA980-\\uA982\\uA9B3\\uA9B6-\\uA9B9\\uA9BC\\uA9BD\\uA9E5\\uAA29-\\uAA2E\\uAA31\\uAA32\\uAA35\\uAA36\\uAA43\\uAA4C\\uAA7C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEC\\uAAED\\uAAF6\\uABE5\\uABE8\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\u{101FD}\\u{102E0}\\u{10376}-\\u{1037A}\\u{10A01}-\\u{10A03}\\u{10A05}\\u{10A06}\\u{10A0C}-\\u{10A0F}\\u{10A38}-\\u{10A3A}\\u{10A3F}\\u{10AE5}\\u{10AE6}\\u{10D24}-\\u{10D27}\\u{10D69}-\\u{10D6D}\\u{10EAB}\\u{10EAC}\\u{10EFA}-\\u{10EFF}\\u{10F46}-\\u{10F50}\\u{10F82}-\\u{10F85}\\u{11001}\\u{11038}-\\u{11046}\\u{11070}\\u{11073}\\u{11074}\\u{1107F}-\\u{11081}\\u{110B3}-\\u{110B6}\\u{110B9}\\u{110BA}\\u{110C2}\\u{11100}-\\u{11102}\\u{11127}-\\u{1112B}\\u{1112D}-\\u{11134}\\u{11173}\\u{11180}\\u{11181}\\u{111B6}-\\u{111BE}\\u{111C9}-\\u{111CC}\\u{111CF}\\u{1122F}-\\u{11231}\\u{11234}\\u{11236}\\u{11237}\\u{1123E}\\u{11241}\\u{112DF}\\u{112E3}-\\u{112EA}\\u{11300}\\u{11301}\\u{1133B}\\u{1133C}\\u{11340}\\u{11366}-\\u{1136C}\\u{11370}-\\u{11374}\\u{113BB}-\\u{113C0}\\u{113CE}\\u{113D0}\\u{113D2}\\u{113E1}\\u{113E2}\\u{11438}-\\u{1143F}\\u{11442}-\\u{11444}\\u{11446}\\u{1145E}\\u{114B3}-\\u{114B8}\\u{114BA}\\u{114BF}\\u{114C0}\\u{114C2}\\u{114C3}\\u{115B2}-\\u{115B5}\\u{115BC}\\u{115BD}\\u{115BF}\\u{115C0}\\u{115DC}\\u{115DD}\\u{11633}-\\u{1163A}\\u{1163D}\\u{1163F}\\u{11640}\\u{116AB}\\u{116AD}\\u{116B0}-\\u{116B5}\\u{116B7}\\u{1171D}\\u{1171F}\\u{11722}-\\u{11725}\\u{11727}-\\u{1172B}\\u{1182F}-\\u{11837}\\u{11839}\\u{1183A}\\u{1193B}\\u{1193C}\\u{1193E}\\u{11943}\\u{119D4}-\\u{119D7}\\u{119DA}\\u{119DB}\\u{119E0}\\u{11A01}-\\u{11A06}\\u{11A09}\\u{11A0A}\\u{11A33}-\\u{11A38}\\u{11A3B}-\\u{11A3E}\\u{11A47}\\u{11A51}-\\u{11A56}\\u{11A59}-\\u{11A5B}\\u{11A8A}-\\u{11A96}\\u{11A98}\\u{11A99}\\u{11B60}\\u{11B62}-\\u{11B64}\\u{11B66}\\u{11C30}-\\u{11C36}\\u{11C38}-\\u{11C3D}\\u{11C92}-\\u{11CA7}\\u{11CAA}-\\u{11CB0}\\u{11CB2}\\u{11CB3}\\u{11CB5}\\u{11CB6}\\u{11D31}-\\u{11D36}\\u{11D3A}\\u{11D3C}\\u{11D3D}\\u{11D3F}-\\u{11D45}\\u{11D47}\\u{11D90}\\u{11D91}\\u{11D95}\\u{11D97}\\u{11EF3}\\u{11EF4}\\u{11F00}\\u{11F01}\\u{11F36}-\\u{11F3A}\\u{11F40}\\u{11F42}\\u{11F5A}\\u{13440}\\u{13447}-\\u{13455}\\u{1611E}-\\u{16129}\\u{1612D}-\\u{1612F}\\u{16AF0}-\\u{16AF4}\\u{16B30}-\\u{16B36}\\u{16F4F}\\u{16F8F}-\\u{16F92}\\u{16FE4}\\u{1BC9D}\\u{1BC9E}\\u{1CF00}-\\u{1CF2D}\\u{1CF30}-\\u{1CF46}\\u{1D167}-\\u{1D169}\\u{1D17B}-\\u{1D182}\\u{1D185}-\\u{1D18B}\\u{1D1AA}-\\u{1D1AD}\\u{1D242}-\\u{1D244}\\u{1DA00}-\\u{1DA36}\\u{1DA3B}-\\u{1DA6C}\\u{1DA75}\\u{1DA84}\\u{1DA9B}-\\u{1DA9F}\\u{1DAA1}-\\u{1DAAF}\\u{1E000}-\\u{1E006}\\u{1E008}-\\u{1E018}\\u{1E01B}-\\u{1E021}\\u{1E023}\\u{1E024}\\u{1E026}-\\u{1E02A}\\u{1E08F}\\u{1E130}-\\u{1E136}\\u{1E2AE}\\u{1E2EC}-\\u{1E2EF}\\u{1E4EC}-\\u{1E4EF}\\u{1E5EE}\\u{1E5EF}\\u{1E6E3}\\u{1E6E6}\\u{1E6EE}\\u{1E6EF}\\u{1E6F5}\\u{1E8D0}-\\u{1E8D6}\\u{1E944}-\\u{1E94A}\\u{E0100}-\\u{E01EF}]*$/u;\nconst bidiS4EN = /[0-9\\xB2\\xB3\\xB9\\u06F0-\\u06F9\\u2070\\u2074-\\u2079\\u2080-\\u2089\\u2488-\\u249B\\uFF10-\\uFF19\\u{102E1}-\\u{102FB}\\u{1CCF0}-\\u{1CCF9}\\u{1D7CE}-\\u{1D7FF}\\u{1F100}-\\u{1F10A}\\u{1FBF0}-\\u{1FBF9}]/u;\nconst bidiS4AN = /[\\u0600-\\u0605\\u0660-\\u0669\\u066B\\u066C\\u06DD\\u0890\\u0891\\u08E2\\u{10D30}-\\u{10D39}\\u{10D40}-\\u{10D49}\\u{10E60}-\\u{10E7E}]/u;\nconst bidiS5 = /^[\\0-\\x08\\x0E-\\x1B!-\\x84\\x86-\\u0377\\u037A-\\u037F\\u0384-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u052F\\u0531-\\u0556\\u0559-\\u058A\\u058D-\\u058F\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0606\\u0607\\u0609\\u060A\\u060C\\u060E-\\u061A\\u064B-\\u065F\\u066A\\u0670\\u06D6-\\u06DC\\u06DE-\\u06E4\\u06E7-\\u06ED\\u06F0-\\u06F9\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07F6-\\u07F9\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u0897-\\u089F\\u08CA-\\u08E1\\u08E3-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09FE\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A76\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AF1\\u0AF9-\\u0AFF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B55-\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B77\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BFA\\u0C00-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3C-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58-\\u0C5A\\u0C5C\\u0C5D\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C77-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDC-\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1-\\u0CF3\\u0D00-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4F\\u0D54-\\u0D63\\u0D66-\\u0D7F\\u0D81-\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2-\\u0DF4\\u0E01-\\u0E3A\\u0E3F-\\u0E5B\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECE\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F97\\u0F99-\\u0FBC\\u0FBE-\\u0FCC\\u0FCE-\\u0FDA\\u1000-\\u10C5\\u10C7\\u10CD\\u10D0-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u137C\\u1380-\\u1399\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1400-\\u167F\\u1681-\\u169C\\u16A0-\\u16F8\\u1700-\\u1715\\u171F-\\u1736\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17DD\\u17E0-\\u17E9\\u17F0-\\u17F9\\u1800-\\u1819\\u1820-\\u1878\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1940\\u1944-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19DA\\u19DE-\\u1A1B\\u1A1E-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA0-\\u1AAD\\u1AB0-\\u1ADD\\u1AE0-\\u1AEB\\u1B00-\\u1B4C\\u1B4E-\\u1BF3\\u1BFC-\\u1C37\\u1C3B-\\u1C49\\u1C4D-\\u1C8A\\u1C90-\\u1CBA\\u1CBD-\\u1CC7\\u1CD0-\\u1CFA\\u1D00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FC4\\u1FC6-\\u1FD3\\u1FD6-\\u1FDB\\u1FDD-\\u1FEF\\u1FF2-\\u1FF4\\u1FF6-\\u1FFE\\u200B-\\u200E\\u2010-\\u2027\\u202F-\\u205E\\u2060-\\u2064\\u206A-\\u2071\\u2074-\\u208E\\u2090-\\u209C\\u20A0-\\u20C1\\u20D0-\\u20F0\\u2100-\\u218B\\u2190-\\u2429\\u2440-\\u244A\\u2460-\\u2B73\\u2B76-\\u2CF3\\u2CF9-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D70\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2E5D\\u2E80-\\u2E99\\u2E9B-\\u2EF3\\u2F00-\\u2FD5\\u2FF0-\\u2FFF\\u3001-\\u303F\\u3041-\\u3096\\u3099-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u3190-\\u31E5\\u31EF-\\u321E\\u3220-\\uA48C\\uA490-\\uA4C6\\uA4D0-\\uA62B\\uA640-\\uA6F7\\uA700-\\uA7DC\\uA7F1-\\uA82C\\uA830-\\uA839\\uA840-\\uA877\\uA880-\\uA8C5\\uA8CE-\\uA8D9\\uA8E0-\\uA953\\uA95F-\\uA97C\\uA980-\\uA9CD\\uA9CF-\\uA9D9\\uA9DE-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA5C-\\uAAC2\\uAADB-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB6B\\uAB70-\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uD800-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1E\\uFB29\\uFBC3-\\uFBD2\\uFD3E-\\uFD4F\\uFD90\\uFD91\\uFDC8-\\uFDCF\\uFDFD-\\uFE19\\uFE20-\\uFE52\\uFE54-\\uFE66\\uFE68-\\uFE6B\\uFEFF\\uFF01-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC\\uFFE0-\\uFFE6\\uFFE8-\\uFFEE\\uFFF9-\\uFFFD\\u{10000}-\\u{1000B}\\u{1000D}-\\u{10026}\\u{10028}-\\u{1003A}\\u{1003C}\\u{1003D}\\u{1003F}-\\u{1004D}\\u{10050}-\\u{1005D}\\u{10080}-\\u{100FA}\\u{10100}-\\u{10102}\\u{10107}-\\u{10133}\\u{10137}-\\u{1018E}\\u{10190}-\\u{1019C}\\u{101A0}\\u{101D0}-\\u{101FD}\\u{10280}-\\u{1029C}\\u{102A0}-\\u{102D0}\\u{102E0}-\\u{102FB}\\u{10300}-\\u{10323}\\u{1032D}-\\u{1034A}\\u{10350}-\\u{1037A}\\u{10380}-\\u{1039D}\\u{1039F}-\\u{103C3}\\u{103C8}-\\u{103D5}\\u{10400}-\\u{1049D}\\u{104A0}-\\u{104A9}\\u{104B0}-\\u{104D3}\\u{104D8}-\\u{104FB}\\u{10500}-\\u{10527}\\u{10530}-\\u{10563}\\u{1056F}-\\u{1057A}\\u{1057C}-\\u{1058A}\\u{1058C}-\\u{10592}\\u{10594}\\u{10595}\\u{10597}-\\u{105A1}\\u{105A3}-\\u{105B1}\\u{105B3}-\\u{105B9}\\u{105BB}\\u{105BC}\\u{105C0}-\\u{105F3}\\u{10600}-\\u{10736}\\u{10740}-\\u{10755}\\u{10760}-\\u{10767}\\u{10780}-\\u{10785}\\u{10787}-\\u{107B0}\\u{107B2}-\\u{107BA}\\u{1091F}\\u{10A01}-\\u{10A03}\\u{10A05}\\u{10A06}\\u{10A0C}-\\u{10A0F}\\u{10A38}-\\u{10A3A}\\u{10A3F}\\u{10AE5}\\u{10AE6}\\u{10B39}-\\u{10B3F}\\u{10D24}-\\u{10D27}\\u{10D69}-\\u{10D6E}\\u{10EAB}\\u{10EAC}\\u{10ED0}-\\u{10ED8}\\u{10EFA}-\\u{10EFF}\\u{10F46}-\\u{10F50}\\u{10F82}-\\u{10F85}\\u{11000}-\\u{1104D}\\u{11052}-\\u{11075}\\u{1107F}-\\u{110C2}\\u{110CD}\\u{110D0}-\\u{110E8}\\u{110F0}-\\u{110F9}\\u{11100}-\\u{11134}\\u{11136}-\\u{11147}\\u{11150}-\\u{11176}\\u{11180}-\\u{111DF}\\u{111E1}-\\u{111F4}\\u{11200}-\\u{11211}\\u{11213}-\\u{11241}\\u{11280}-\\u{11286}\\u{11288}\\u{1128A}-\\u{1128D}\\u{1128F}-\\u{1129D}\\u{1129F}-\\u{112A9}\\u{112B0}-\\u{112EA}\\u{112F0}-\\u{112F9}\\u{11300}-\\u{11303}\\u{11305}-\\u{1130C}\\u{1130F}\\u{11310}\\u{11313}-\\u{11328}\\u{1132A}-\\u{11330}\\u{11332}\\u{11333}\\u{11335}-\\u{11339}\\u{1133B}-\\u{11344}\\u{11347}\\u{11348}\\u{1134B}-\\u{1134D}\\u{11350}\\u{11357}\\u{1135D}-\\u{11363}\\u{11366}-\\u{1136C}\\u{11370}-\\u{11374}\\u{11380}-\\u{11389}\\u{1138B}\\u{1138E}\\u{11390}-\\u{113B5}\\u{113B7}-\\u{113C0}\\u{113C2}\\u{113C5}\\u{113C7}-\\u{113CA}\\u{113CC}-\\u{113D5}\\u{113D7}\\u{113D8}\\u{113E1}\\u{113E2}\\u{11400}-\\u{1145B}\\u{1145D}-\\u{11461}\\u{11480}-\\u{114C7}\\u{114D0}-\\u{114D9}\\u{11580}-\\u{115B5}\\u{115B8}-\\u{115DD}\\u{11600}-\\u{11644}\\u{11650}-\\u{11659}\\u{11660}-\\u{1166C}\\u{11680}-\\u{116B9}\\u{116C0}-\\u{116C9}\\u{116D0}-\\u{116E3}\\u{11700}-\\u{1171A}\\u{1171D}-\\u{1172B}\\u{11730}-\\u{11746}\\u{11800}-\\u{1183B}\\u{118A0}-\\u{118F2}\\u{118FF}-\\u{11906}\\u{11909}\\u{1190C}-\\u{11913}\\u{11915}\\u{11916}\\u{11918}-\\u{11935}\\u{11937}\\u{11938}\\u{1193B}-\\u{11946}\\u{11950}-\\u{11959}\\u{119A0}-\\u{119A7}\\u{119AA}-\\u{119D7}\\u{119DA}-\\u{119E4}\\u{11A00}-\\u{11A47}\\u{11A50}-\\u{11AA2}\\u{11AB0}-\\u{11AF8}\\u{11B00}-\\u{11B09}\\u{11B60}-\\u{11B67}\\u{11BC0}-\\u{11BE1}\\u{11BF0}-\\u{11BF9}\\u{11C00}-\\u{11C08}\\u{11C0A}-\\u{11C36}\\u{11C38}-\\u{11C45}\\u{11C50}-\\u{11C6C}\\u{11C70}-\\u{11C8F}\\u{11C92}-\\u{11CA7}\\u{11CA9}-\\u{11CB6}\\u{11D00}-\\u{11D06}\\u{11D08}\\u{11D09}\\u{11D0B}-\\u{11D36}\\u{11D3A}\\u{11D3C}\\u{11D3D}\\u{11D3F}-\\u{11D47}\\u{11D50}-\\u{11D59}\\u{11D60}-\\u{11D65}\\u{11D67}\\u{11D68}\\u{11D6A}-\\u{11D8E}\\u{11D90}\\u{11D91}\\u{11D93}-\\u{11D98}\\u{11DA0}-\\u{11DA9}\\u{11DB0}-\\u{11DDB}\\u{11DE0}-\\u{11DE9}\\u{11EE0}-\\u{11EF8}\\u{11F00}-\\u{11F10}\\u{11F12}-\\u{11F3A}\\u{11F3E}-\\u{11F5A}\\u{11FB0}\\u{11FC0}-\\u{11FF1}\\u{11FFF}-\\u{12399}\\u{12400}-\\u{1246E}\\u{12470}-\\u{12474}\\u{12480}-\\u{12543}\\u{12F90}-\\u{12FF2}\\u{13000}-\\u{13455}\\u{13460}-\\u{143FA}\\u{14400}-\\u{14646}\\u{16100}-\\u{16139}\\u{16800}-\\u{16A38}\\u{16A40}-\\u{16A5E}\\u{16A60}-\\u{16A69}\\u{16A6E}-\\u{16ABE}\\u{16AC0}-\\u{16AC9}\\u{16AD0}-\\u{16AED}\\u{16AF0}-\\u{16AF5}\\u{16B00}-\\u{16B45}\\u{16B50}-\\u{16B59}\\u{16B5B}-\\u{16B61}\\u{16B63}-\\u{16B77}\\u{16B7D}-\\u{16B8F}\\u{16D40}-\\u{16D79}\\u{16E40}-\\u{16E9A}\\u{16EA0}-\\u{16EB8}\\u{16EBB}-\\u{16ED3}\\u{16F00}-\\u{16F4A}\\u{16F4F}-\\u{16F87}\\u{16F8F}-\\u{16F9F}\\u{16FE0}-\\u{16FE4}\\u{16FF0}-\\u{16FF6}\\u{17000}-\\u{18CD5}\\u{18CFF}-\\u{18D1E}\\u{18D80}-\\u{18DF2}\\u{1AFF0}-\\u{1AFF3}\\u{1AFF5}-\\u{1AFFB}\\u{1AFFD}\\u{1AFFE}\\u{1B000}-\\u{1B122}\\u{1B132}\\u{1B150}-\\u{1B152}\\u{1B155}\\u{1B164}-\\u{1B167}\\u{1B170}-\\u{1B2FB}\\u{1BC00}-\\u{1BC6A}\\u{1BC70}-\\u{1BC7C}\\u{1BC80}-\\u{1BC88}\\u{1BC90}-\\u{1BC99}\\u{1BC9C}-\\u{1BCA3}\\u{1CC00}-\\u{1CCFC}\\u{1CD00}-\\u{1CEB3}\\u{1CEBA}-\\u{1CED0}\\u{1CEE0}-\\u{1CEF0}\\u{1CF00}-\\u{1CF2D}\\u{1CF30}-\\u{1CF46}\\u{1CF50}-\\u{1CFC3}\\u{1D000}-\\u{1D0F5}\\u{1D100}-\\u{1D126}\\u{1D129}-\\u{1D1EA}\\u{1D200}-\\u{1D245}\\u{1D2C0}-\\u{1D2D3}\\u{1D2E0}-\\u{1D2F3}\\u{1D300}-\\u{1D356}\\u{1D360}-\\u{1D378}\\u{1D400}-\\u{1D454}\\u{1D456}-\\u{1D49C}\\u{1D49E}\\u{1D49F}\\u{1D4A2}\\u{1D4A5}\\u{1D4A6}\\u{1D4A9}-\\u{1D4AC}\\u{1D4AE}-\\u{1D4B9}\\u{1D4BB}\\u{1D4BD}-\\u{1D4C3}\\u{1D4C5}-\\u{1D505}\\u{1D507}-\\u{1D50A}\\u{1D50D}-\\u{1D514}\\u{1D516}-\\u{1D51C}\\u{1D51E}-\\u{1D539}\\u{1D53B}-\\u{1D53E}\\u{1D540}-\\u{1D544}\\u{1D546}\\u{1D54A}-\\u{1D550}\\u{1D552}-\\u{1D6A5}\\u{1D6A8}-\\u{1D7CB}\\u{1D7CE}-\\u{1DA8B}\\u{1DA9B}-\\u{1DA9F}\\u{1DAA1}-\\u{1DAAF}\\u{1DF00}-\\u{1DF1E}\\u{1DF25}-\\u{1DF2A}\\u{1E000}-\\u{1E006}\\u{1E008}-\\u{1E018}\\u{1E01B}-\\u{1E021}\\u{1E023}\\u{1E024}\\u{1E026}-\\u{1E02A}\\u{1E030}-\\u{1E06D}\\u{1E08F}\\u{1E100}-\\u{1E12C}\\u{1E130}-\\u{1E13D}\\u{1E140}-\\u{1E149}\\u{1E14E}\\u{1E14F}\\u{1E290}-\\u{1E2AE}\\u{1E2C0}-\\u{1E2F9}\\u{1E2FF}\\u{1E4D0}-\\u{1E4F9}\\u{1E5D0}-\\u{1E5FA}\\u{1E5FF}\\u{1E6C0}-\\u{1E6DE}\\u{1E6E0}-\\u{1E6F5}\\u{1E6FE}\\u{1E6FF}\\u{1E7E0}-\\u{1E7E6}\\u{1E7E8}-\\u{1E7EB}\\u{1E7ED}\\u{1E7EE}\\u{1E7F0}-\\u{1E7FE}\\u{1E8D0}-\\u{1E8D6}\\u{1E944}-\\u{1E94A}\\u{1EEF0}\\u{1EEF1}\\u{1F000}-\\u{1F02B}\\u{1F030}-\\u{1F093}\\u{1F0A0}-\\u{1F0AE}\\u{1F0B1}-\\u{1F0BF}\\u{1F0C1}-\\u{1F0CF}\\u{1F0D1}-\\u{1F0F5}\\u{1F100}-\\u{1F1AD}\\u{1F1E6}-\\u{1F202}\\u{1F210}-\\u{1F23B}\\u{1F240}-\\u{1F248}\\u{1F250}\\u{1F251}\\u{1F260}-\\u{1F265}\\u{1F300}-\\u{1F6D8}\\u{1F6DC}-\\u{1F6EC}\\u{1F6F0}-\\u{1F6FC}\\u{1F700}-\\u{1F7D9}\\u{1F7E0}-\\u{1F7EB}\\u{1F7F0}\\u{1F800}-\\u{1F80B}\\u{1F810}-\\u{1F847}\\u{1F850}-\\u{1F859}\\u{1F860}-\\u{1F887}\\u{1F890}-\\u{1F8AD}\\u{1F8B0}-\\u{1F8BB}\\u{1F8C0}\\u{1F8C1}\\u{1F8D0}-\\u{1F8D8}\\u{1F900}-\\u{1FA57}\\u{1FA60}-\\u{1FA6D}\\u{1FA70}-\\u{1FA7C}\\u{1FA80}-\\u{1FA8A}\\u{1FA8E}-\\u{1FAC6}\\u{1FAC8}\\u{1FACD}-\\u{1FADC}\\u{1FADF}-\\u{1FAEA}\\u{1FAEF}-\\u{1FAF8}\\u{1FB00}-\\u{1FB92}\\u{1FB94}-\\u{1FBFA}\\u{20000}-\\u{2A6DF}\\u{2A700}-\\u{2B81D}\\u{2B820}-\\u{2CEAD}\\u{2CEB0}-\\u{2EBE0}\\u{2EBF0}-\\u{2EE5D}\\u{2F800}-\\u{2FA1D}\\u{30000}-\\u{3134A}\\u{31350}-\\u{33479}\\u{E0001}\\u{E0020}-\\u{E007F}\\u{E0100}-\\u{E01EF}\\u{F0000}-\\u{FFFFD}\\u{100000}-\\u{10FFFD}]*$/u;\nconst bidiS6 = /[0-9A-Za-z\\xAA\\xB2\\xB3\\xB5\\xB9\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02B8\\u02BB-\\u02C1\\u02D0\\u02D1\\u02E0-\\u02E4\\u02EE\\u0370-\\u0373\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0482\\u048A-\\u052F\\u0531-\\u0556\\u0559-\\u0589\\u06F0-\\u06F9\\u0903-\\u0939\\u093B\\u093D-\\u0940\\u0949-\\u094C\\u094E-\\u0950\\u0958-\\u0961\\u0964-\\u0980\\u0982\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD-\\u09C0\\u09C7\\u09C8\\u09CB\\u09CC\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E1\\u09E6-\\u09F1\\u09F4-\\u09FA\\u09FC\\u09FD\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3E-\\u0A40\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A6F\\u0A72-\\u0A74\\u0A76\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD-\\u0AC0\\u0AC9\\u0ACB\\u0ACC\\u0AD0\\u0AE0\\u0AE1\\u0AE6-\\u0AF0\\u0AF9\\u0B02\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B3E\\u0B40\\u0B47\\u0B48\\u0B4B\\u0B4C\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B66-\\u0B77\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE\\u0BBF\\u0BC1\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCC\\u0BD0\\u0BD7\\u0BE6-\\u0BF2\\u0C01-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C41-\\u0C44\\u0C58-\\u0C5A\\u0C5C\\u0C5D\\u0C60\\u0C61\\u0C66-\\u0C6F\\u0C77\\u0C7F\\u0C80\\u0C82-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA\\u0CCB\\u0CD5\\u0CD6\\u0CDC-\\u0CDE\\u0CE0\\u0CE1\\u0CE6-\\u0CEF\\u0CF1-\\u0CF3\\u0D02-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D40\\u0D46-\\u0D48\\u0D4A-\\u0D4C\\u0D4E\\u0D4F\\u0D54-\\u0D61\\u0D66-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCF-\\u0DD1\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2-\\u0DF4\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E4F-\\u0E5B\\u0E81\\u0E82\\u0E84\\u0E86-\\u0E8A\\u0E8C-\\u0EA3\\u0EA5\\u0EA7-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00-\\u0F17\\u0F1A-\\u0F34\\u0F36\\u0F38\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F7F\\u0F85\\u0F88-\\u0F8C\\u0FBE-\\u0FC5\\u0FC7-\\u0FCC\\u0FCE-\\u0FDA\\u1000-\\u102C\\u1031\\u1038\\u103B\\u103C\\u103F-\\u1057\\u105A-\\u105D\\u1061-\\u1070\\u1075-\\u1081\\u1083\\u1084\\u1087-\\u108C\\u108E-\\u109C\\u109E-\\u10C5\\u10C7\\u10CD\\u10D0-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1360-\\u137C\\u1380-\\u138F\\u13A0-\\u13F5\\u13F8-\\u13FD\\u1401-\\u167F\\u1681-\\u169A\\u16A0-\\u16F8\\u1700-\\u1711\\u1715\\u171F-\\u1731\\u1734-\\u1736\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17B6\\u17BE-\\u17C5\\u17C7\\u17C8\\u17D4-\\u17DA\\u17DC\\u17E0-\\u17E9\\u1810-\\u1819\\u1820-\\u1878\\u1880-\\u1884\\u1887-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1923-\\u1926\\u1929-\\u192B\\u1930\\u1931\\u1933-\\u1938\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19DA\\u1A00-\\u1A16\\u1A19\\u1A1A\\u1A1E-\\u1A55\\u1A57\\u1A61\\u1A63\\u1A64\\u1A6D-\\u1A72\\u1A80-\\u1A89\\u1A90-\\u1A99\\u1AA0-\\u1AAD\\u1B04-\\u1B33\\u1B35\\u1B3B\\u1B3D-\\u1B41\\u1B43-\\u1B4C\\u1B4E-\\u1B6A\\u1B74-\\u1B7F\\u1B82-\\u1BA1\\u1BA6\\u1BA7\\u1BAA\\u1BAE-\\u1BE5\\u1BE7\\u1BEA-\\u1BEC\\u1BEE\\u1BF2\\u1BF3\\u1BFC-\\u1C2B\\u1C34\\u1C35\\u1C3B-\\u1C49\\u1C4D-\\u1C8A\\u1C90-\\u1CBA\\u1CBD-\\u1CC7\\u1CD3\\u1CE1\\u1CE9-\\u1CEC\\u1CEE-\\u1CF3\\u1CF5-\\u1CF7\\u1CFA\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200E\\u2070\\u2071\\u2074-\\u2079\\u207F-\\u2089\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u214F\\u2160-\\u2188\\u2336-\\u237A\\u2395\\u2488-\\u24E9\\u26AC\\u2800-\\u28FF\\u2C00-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D70\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u3005-\\u3007\\u3021-\\u3029\\u302E\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312F\\u3131-\\u318E\\u3190-\\u31BF\\u31F0-\\u321C\\u3220-\\u324F\\u3260-\\u327B\\u327F-\\u32B0\\u32C0-\\u32CB\\u32D0-\\u3376\\u337B-\\u33DD\\u33E0-\\u33FE\\u3400-\\u4DBF\\u4E00-\\uA48C\\uA4D0-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66E\\uA680-\\uA69D\\uA6A0-\\uA6EF\\uA6F2-\\uA6F7\\uA722-\\uA787\\uA789-\\uA7DC\\uA7F1-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA824\\uA827\\uA830-\\uA837\\uA840-\\uA873\\uA880-\\uA8C3\\uA8CE-\\uA8D9\\uA8F2-\\uA8FE\\uA900-\\uA925\\uA92E-\\uA946\\uA952\\uA953\\uA95F-\\uA97C\\uA983-\\uA9B2\\uA9B4\\uA9B5\\uA9BA\\uA9BB\\uA9BE-\\uA9CD\\uA9CF-\\uA9D9\\uA9DE-\\uA9E4\\uA9E6-\\uA9FE\\uAA00-\\uAA28\\uAA2F\\uAA30\\uAA33\\uAA34\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA4D\\uAA50-\\uAA59\\uAA5C-\\uAA7B\\uAA7D-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAAEB\\uAAEE-\\uAAF5\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB69\\uAB70-\\uABE4\\uABE6\\uABE7\\uABE9-\\uABEC\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uD800-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC\\u{10000}-\\u{1000B}\\u{1000D}-\\u{10026}\\u{10028}-\\u{1003A}\\u{1003C}\\u{1003D}\\u{1003F}-\\u{1004D}\\u{10050}-\\u{1005D}\\u{10080}-\\u{100FA}\\u{10100}\\u{10102}\\u{10107}-\\u{10133}\\u{10137}-\\u{1013F}\\u{1018D}\\u{1018E}\\u{101D0}-\\u{101FC}\\u{10280}-\\u{1029C}\\u{102A0}-\\u{102D0}\\u{102E1}-\\u{102FB}\\u{10300}-\\u{10323}\\u{1032D}-\\u{1034A}\\u{10350}-\\u{10375}\\u{10380}-\\u{1039D}\\u{1039F}-\\u{103C3}\\u{103C8}-\\u{103D5}\\u{10400}-\\u{1049D}\\u{104A0}-\\u{104A9}\\u{104B0}-\\u{104D3}\\u{104D8}-\\u{104FB}\\u{10500}-\\u{10527}\\u{10530}-\\u{10563}\\u{1056F}-\\u{1057A}\\u{1057C}-\\u{1058A}\\u{1058C}-\\u{10592}\\u{10594}\\u{10595}\\u{10597}-\\u{105A1}\\u{105A3}-\\u{105B1}\\u{105B3}-\\u{105B9}\\u{105BB}\\u{105BC}\\u{105C0}-\\u{105F3}\\u{10600}-\\u{10736}\\u{10740}-\\u{10755}\\u{10760}-\\u{10767}\\u{10780}-\\u{10785}\\u{10787}-\\u{107B0}\\u{107B2}-\\u{107BA}\\u{11000}\\u{11002}-\\u{11037}\\u{11047}-\\u{1104D}\\u{11066}-\\u{1106F}\\u{11071}\\u{11072}\\u{11075}\\u{11082}-\\u{110B2}\\u{110B7}\\u{110B8}\\u{110BB}-\\u{110C1}\\u{110CD}\\u{110D0}-\\u{110E8}\\u{110F0}-\\u{110F9}\\u{11103}-\\u{11126}\\u{1112C}\\u{11136}-\\u{11147}\\u{11150}-\\u{11172}\\u{11174}-\\u{11176}\\u{11182}-\\u{111B5}\\u{111BF}-\\u{111C8}\\u{111CD}\\u{111CE}\\u{111D0}-\\u{111DF}\\u{111E1}-\\u{111F4}\\u{11200}-\\u{11211}\\u{11213}-\\u{1122E}\\u{11232}\\u{11233}\\u{11235}\\u{11238}-\\u{1123D}\\u{1123F}\\u{11240}\\u{11280}-\\u{11286}\\u{11288}\\u{1128A}-\\u{1128D}\\u{1128F}-\\u{1129D}\\u{1129F}-\\u{112A9}\\u{112B0}-\\u{112DE}\\u{112E0}-\\u{112E2}\\u{112F0}-\\u{112F9}\\u{11302}\\u{11303}\\u{11305}-\\u{1130C}\\u{1130F}\\u{11310}\\u{11313}-\\u{11328}\\u{1132A}-\\u{11330}\\u{11332}\\u{11333}\\u{11335}-\\u{11339}\\u{1133D}-\\u{1133F}\\u{11341}-\\u{11344}\\u{11347}\\u{11348}\\u{1134B}-\\u{1134D}\\u{11350}\\u{11357}\\u{1135D}-\\u{11363}\\u{11380}-\\u{11389}\\u{1138B}\\u{1138E}\\u{11390}-\\u{113B5}\\u{113B7}-\\u{113BA}\\u{113C2}\\u{113C5}\\u{113C7}-\\u{113CA}\\u{113CC}\\u{113CD}\\u{113CF}\\u{113D1}\\u{113D3}-\\u{113D5}\\u{113D7}\\u{113D8}\\u{11400}-\\u{11437}\\u{11440}\\u{11441}\\u{11445}\\u{11447}-\\u{1145B}\\u{1145D}\\u{1145F}-\\u{11461}\\u{11480}-\\u{114B2}\\u{114B9}\\u{114BB}-\\u{114BE}\\u{114C1}\\u{114C4}-\\u{114C7}\\u{114D0}-\\u{114D9}\\u{11580}-\\u{115B1}\\u{115B8}-\\u{115BB}\\u{115BE}\\u{115C1}-\\u{115DB}\\u{11600}-\\u{11632}\\u{1163B}\\u{1163C}\\u{1163E}\\u{11641}-\\u{11644}\\u{11650}-\\u{11659}\\u{11680}-\\u{116AA}\\u{116AC}\\u{116AE}\\u{116AF}\\u{116B6}\\u{116B8}\\u{116B9}\\u{116C0}-\\u{116C9}\\u{116D0}-\\u{116E3}\\u{11700}-\\u{1171A}\\u{1171E}\\u{11720}\\u{11721}\\u{11726}\\u{11730}-\\u{11746}\\u{11800}-\\u{1182E}\\u{11838}\\u{1183B}\\u{118A0}-\\u{118F2}\\u{118FF}-\\u{11906}\\u{11909}\\u{1190C}-\\u{11913}\\u{11915}\\u{11916}\\u{11918}-\\u{11935}\\u{11937}\\u{11938}\\u{1193D}\\u{1193F}-\\u{11942}\\u{11944}-\\u{11946}\\u{11950}-\\u{11959}\\u{119A0}-\\u{119A7}\\u{119AA}-\\u{119D3}\\u{119DC}-\\u{119DF}\\u{119E1}-\\u{119E4}\\u{11A00}\\u{11A07}\\u{11A08}\\u{11A0B}-\\u{11A32}\\u{11A39}\\u{11A3A}\\u{11A3F}-\\u{11A46}\\u{11A50}\\u{11A57}\\u{11A58}\\u{11A5C}-\\u{11A89}\\u{11A97}\\u{11A9A}-\\u{11AA2}\\u{11AB0}-\\u{11AF8}\\u{11B00}-\\u{11B09}\\u{11B61}\\u{11B65}\\u{11B67}\\u{11BC0}-\\u{11BE1}\\u{11BF0}-\\u{11BF9}\\u{11C00}-\\u{11C08}\\u{11C0A}-\\u{11C2F}\\u{11C3E}-\\u{11C45}\\u{11C50}-\\u{11C6C}\\u{11C70}-\\u{11C8F}\\u{11CA9}\\u{11CB1}\\u{11CB4}\\u{11D00}-\\u{11D06}\\u{11D08}\\u{11D09}\\u{11D0B}-\\u{11D30}\\u{11D46}\\u{11D50}-\\u{11D59}\\u{11D60}-\\u{11D65}\\u{11D67}\\u{11D68}\\u{11D6A}-\\u{11D8E}\\u{11D93}\\u{11D94}\\u{11D96}\\u{11D98}\\u{11DA0}-\\u{11DA9}\\u{11DB0}-\\u{11DDB}\\u{11DE0}-\\u{11DE9}\\u{11EE0}-\\u{11EF2}\\u{11EF5}-\\u{11EF8}\\u{11F02}-\\u{11F10}\\u{11F12}-\\u{11F35}\\u{11F3E}\\u{11F3F}\\u{11F41}\\u{11F43}-\\u{11F59}\\u{11FB0}\\u{11FC0}-\\u{11FD4}\\u{11FFF}-\\u{12399}\\u{12400}-\\u{1246E}\\u{12470}-\\u{12474}\\u{12480}-\\u{12543}\\u{12F90}-\\u{12FF2}\\u{13000}-\\u{1343F}\\u{13441}-\\u{13446}\\u{13460}-\\u{143FA}\\u{14400}-\\u{14646}\\u{16100}-\\u{1611D}\\u{1612A}-\\u{1612C}\\u{16130}-\\u{16139}\\u{16800}-\\u{16A38}\\u{16A40}-\\u{16A5E}\\u{16A60}-\\u{16A69}\\u{16A6E}-\\u{16ABE}\\u{16AC0}-\\u{16AC9}\\u{16AD0}-\\u{16AED}\\u{16AF5}\\u{16B00}-\\u{16B2F}\\u{16B37}-\\u{16B45}\\u{16B50}-\\u{16B59}\\u{16B5B}-\\u{16B61}\\u{16B63}-\\u{16B77}\\u{16B7D}-\\u{16B8F}\\u{16D40}-\\u{16D79}\\u{16E40}-\\u{16E9A}\\u{16EA0}-\\u{16EB8}\\u{16EBB}-\\u{16ED3}\\u{16F00}-\\u{16F4A}\\u{16F50}-\\u{16F87}\\u{16F93}-\\u{16F9F}\\u{16FE0}\\u{16FE1}\\u{16FE3}\\u{16FF0}-\\u{16FF6}\\u{17000}-\\u{18CD5}\\u{18CFF}-\\u{18D1E}\\u{18D80}-\\u{18DF2}\\u{1AFF0}-\\u{1AFF3}\\u{1AFF5}-\\u{1AFFB}\\u{1AFFD}\\u{1AFFE}\\u{1B000}-\\u{1B122}\\u{1B132}\\u{1B150}-\\u{1B152}\\u{1B155}\\u{1B164}-\\u{1B167}\\u{1B170}-\\u{1B2FB}\\u{1BC00}-\\u{1BC6A}\\u{1BC70}-\\u{1BC7C}\\u{1BC80}-\\u{1BC88}\\u{1BC90}-\\u{1BC99}\\u{1BC9C}\\u{1BC9F}\\u{1CCD6}-\\u{1CCF9}\\u{1CF50}-\\u{1CFC3}\\u{1D000}-\\u{1D0F5}\\u{1D100}-\\u{1D126}\\u{1D129}-\\u{1D166}\\u{1D16A}-\\u{1D172}\\u{1D183}\\u{1D184}\\u{1D18C}-\\u{1D1A9}\\u{1D1AE}-\\u{1D1E8}\\u{1D2C0}-\\u{1D2D3}\\u{1D2E0}-\\u{1D2F3}\\u{1D360}-\\u{1D378}\\u{1D400}-\\u{1D454}\\u{1D456}-\\u{1D49C}\\u{1D49E}\\u{1D49F}\\u{1D4A2}\\u{1D4A5}\\u{1D4A6}\\u{1D4A9}-\\u{1D4AC}\\u{1D4AE}-\\u{1D4B9}\\u{1D4BB}\\u{1D4BD}-\\u{1D4C3}\\u{1D4C5}-\\u{1D505}\\u{1D507}-\\u{1D50A}\\u{1D50D}-\\u{1D514}\\u{1D516}-\\u{1D51C}\\u{1D51E}-\\u{1D539}\\u{1D53B}-\\u{1D53E}\\u{1D540}-\\u{1D544}\\u{1D546}\\u{1D54A}-\\u{1D550}\\u{1D552}-\\u{1D6A5}\\u{1D6A8}-\\u{1D6C0}\\u{1D6C2}-\\u{1D6DA}\\u{1D6DC}-\\u{1D6FA}\\u{1D6FC}-\\u{1D714}\\u{1D716}-\\u{1D734}\\u{1D736}-\\u{1D74E}\\u{1D750}-\\u{1D76E}\\u{1D770}-\\u{1D788}\\u{1D78A}-\\u{1D7A8}\\u{1D7AA}-\\u{1D7C2}\\u{1D7C4}-\\u{1D7CB}\\u{1D7CE}-\\u{1D9FF}\\u{1DA37}-\\u{1DA3A}\\u{1DA6D}-\\u{1DA74}\\u{1DA76}-\\u{1DA83}\\u{1DA85}-\\u{1DA8B}\\u{1DF00}-\\u{1DF1E}\\u{1DF25}-\\u{1DF2A}\\u{1E030}-\\u{1E06D}\\u{1E100}-\\u{1E12C}\\u{1E137}-\\u{1E13D}\\u{1E140}-\\u{1E149}\\u{1E14E}\\u{1E14F}\\u{1E290}-\\u{1E2AD}\\u{1E2C0}-\\u{1E2EB}\\u{1E2F0}-\\u{1E2F9}\\u{1E4D0}-\\u{1E4EB}\\u{1E4F0}-\\u{1E4F9}\\u{1E5D0}-\\u{1E5ED}\\u{1E5F0}-\\u{1E5FA}\\u{1E5FF}\\u{1E6C0}-\\u{1E6DE}\\u{1E6E0}-\\u{1E6E2}\\u{1E6E4}\\u{1E6E5}\\u{1E6E7}-\\u{1E6ED}\\u{1E6F0}-\\u{1E6F4}\\u{1E6FE}\\u{1E6FF}\\u{1E7E0}-\\u{1E7E6}\\u{1E7E8}-\\u{1E7EB}\\u{1E7ED}\\u{1E7EE}\\u{1E7F0}-\\u{1E7FE}\\u{1F100}-\\u{1F10A}\\u{1F110}-\\u{1F12E}\\u{1F130}-\\u{1F169}\\u{1F170}-\\u{1F1AC}\\u{1F1E6}-\\u{1F202}\\u{1F210}-\\u{1F23B}\\u{1F240}-\\u{1F248}\\u{1F250}\\u{1F251}\\u{1FBF0}-\\u{1FBF9}\\u{20000}-\\u{2A6DF}\\u{2A700}-\\u{2B81D}\\u{2B820}-\\u{2CEAD}\\u{2CEB0}-\\u{2EBE0}\\u{2EBF0}-\\u{2EE5D}\\u{2F800}-\\u{2FA1D}\\u{30000}-\\u{3134A}\\u{31350}-\\u{33479}\\u{F0000}-\\u{FFFFD}\\u{100000}-\\u{10FFFD}][\\u0300-\\u036F\\u0483-\\u0489\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065F\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u07FD\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0859-\\u085B\\u0897-\\u089F\\u08CA-\\u08E1\\u08E3-\\u0902\\u093A\\u093C\\u0941-\\u0948\\u094D\\u0951-\\u0957\\u0962\\u0963\\u0981\\u09BC\\u09C1-\\u09C4\\u09CD\\u09E2\\u09E3\\u09FE\\u0A01\\u0A02\\u0A3C\\u0A41\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81\\u0A82\\u0ABC\\u0AC1-\\u0AC5\\u0AC7\\u0AC8\\u0ACD\\u0AE2\\u0AE3\\u0AFA-\\u0AFF\\u0B01\\u0B3C\\u0B3F\\u0B41-\\u0B44\\u0B4D\\u0B55\\u0B56\\u0B62\\u0B63\\u0B82\\u0BC0\\u0BCD\\u0C00\\u0C04\\u0C3C\\u0C3E-\\u0C40\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0C81\\u0CBC\\u0CCC\\u0CCD\\u0CE2\\u0CE3\\u0D00\\u0D01\\u0D3B\\u0D3C\\u0D41-\\u0D44\\u0D4D\\u0D62\\u0D63\\u0D81\\u0DCA\\u0DD2-\\u0DD4\\u0DD6\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EBC\\u0EC8-\\u0ECE\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F71-\\u0F7E\\u0F80-\\u0F84\\u0F86\\u0F87\\u0F8D-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1030\\u1032-\\u1037\\u1039\\u103A\\u103D\\u103E\\u1058\\u1059\\u105E-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108D\\u109D\\u135D-\\u135F\\u1712-\\u1714\\u1732\\u1733\\u1752\\u1753\\u1772\\u1773\\u17B4\\u17B5\\u17B7-\\u17BD\\u17C6\\u17C9-\\u17D3\\u17DD\\u180B-\\u180D\\u180F\\u1885\\u1886\\u18A9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193B\\u1A17\\u1A18\\u1A1B\\u1A56\\u1A58-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A6C\\u1A73-\\u1A7C\\u1A7F\\u1AB0-\\u1ADD\\u1AE0-\\u1AEB\\u1B00-\\u1B03\\u1B34\\u1B36-\\u1B3A\\u1B3C\\u1B42\\u1B6B-\\u1B73\\u1B80\\u1B81\\u1BA2-\\u1BA5\\u1BA8\\u1BA9\\u1BAB-\\u1BAD\\u1BE6\\u1BE8\\u1BE9\\u1BED\\u1BEF-\\u1BF1\\u1C2C-\\u1C33\\u1C36\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE0\\u1CE2-\\u1CE8\\u1CED\\u1CF4\\u1CF8\\u1CF9\\u1DC0-\\u1DFF\\u20D0-\\u20F0\\u2CEF-\\u2CF1\\u2D7F\\u2DE0-\\u2DFF\\u302A-\\u302D\\u3099\\u309A\\uA66F-\\uA672\\uA674-\\uA67D\\uA69E\\uA69F\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA825\\uA826\\uA82C\\uA8C4\\uA8C5\\uA8E0-\\uA8F1\\uA8FF\\uA926-\\uA92D\\uA947-\\uA951\\uA980-\\uA982\\uA9B3\\uA9B6-\\uA9B9\\uA9BC\\uA9BD\\uA9E5\\uAA29-\\uAA2E\\uAA31\\uAA32\\uAA35\\uAA36\\uAA43\\uAA4C\\uAA7C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uAAEC\\uAAED\\uAAF6\\uABE5\\uABE8\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE2F\\u{101FD}\\u{102E0}\\u{10376}-\\u{1037A}\\u{10A01}-\\u{10A03}\\u{10A05}\\u{10A06}\\u{10A0C}-\\u{10A0F}\\u{10A38}-\\u{10A3A}\\u{10A3F}\\u{10AE5}\\u{10AE6}\\u{10D24}-\\u{10D27}\\u{10D69}-\\u{10D6D}\\u{10EAB}\\u{10EAC}\\u{10EFA}-\\u{10EFF}\\u{10F46}-\\u{10F50}\\u{10F82}-\\u{10F85}\\u{11001}\\u{11038}-\\u{11046}\\u{11070}\\u{11073}\\u{11074}\\u{1107F}-\\u{11081}\\u{110B3}-\\u{110B6}\\u{110B9}\\u{110BA}\\u{110C2}\\u{11100}-\\u{11102}\\u{11127}-\\u{1112B}\\u{1112D}-\\u{11134}\\u{11173}\\u{11180}\\u{11181}\\u{111B6}-\\u{111BE}\\u{111C9}-\\u{111CC}\\u{111CF}\\u{1122F}-\\u{11231}\\u{11234}\\u{11236}\\u{11237}\\u{1123E}\\u{11241}\\u{112DF}\\u{112E3}-\\u{112EA}\\u{11300}\\u{11301}\\u{1133B}\\u{1133C}\\u{11340}\\u{11366}-\\u{1136C}\\u{11370}-\\u{11374}\\u{113BB}-\\u{113C0}\\u{113CE}\\u{113D0}\\u{113D2}\\u{113E1}\\u{113E2}\\u{11438}-\\u{1143F}\\u{11442}-\\u{11444}\\u{11446}\\u{1145E}\\u{114B3}-\\u{114B8}\\u{114BA}\\u{114BF}\\u{114C0}\\u{114C2}\\u{114C3}\\u{115B2}-\\u{115B5}\\u{115BC}\\u{115BD}\\u{115BF}\\u{115C0}\\u{115DC}\\u{115DD}\\u{11633}-\\u{1163A}\\u{1163D}\\u{1163F}\\u{11640}\\u{116AB}\\u{116AD}\\u{116B0}-\\u{116B5}\\u{116B7}\\u{1171D}\\u{1171F}\\u{11722}-\\u{11725}\\u{11727}-\\u{1172B}\\u{1182F}-\\u{11837}\\u{11839}\\u{1183A}\\u{1193B}\\u{1193C}\\u{1193E}\\u{11943}\\u{119D4}-\\u{119D7}\\u{119DA}\\u{119DB}\\u{119E0}\\u{11A01}-\\u{11A06}\\u{11A09}\\u{11A0A}\\u{11A33}-\\u{11A38}\\u{11A3B}-\\u{11A3E}\\u{11A47}\\u{11A51}-\\u{11A56}\\u{11A59}-\\u{11A5B}\\u{11A8A}-\\u{11A96}\\u{11A98}\\u{11A99}\\u{11B60}\\u{11B62}-\\u{11B64}\\u{11B66}\\u{11C30}-\\u{11C36}\\u{11C38}-\\u{11C3D}\\u{11C92}-\\u{11CA7}\\u{11CAA}-\\u{11CB0}\\u{11CB2}\\u{11CB3}\\u{11CB5}\\u{11CB6}\\u{11D31}-\\u{11D36}\\u{11D3A}\\u{11D3C}\\u{11D3D}\\u{11D3F}-\\u{11D45}\\u{11D47}\\u{11D90}\\u{11D91}\\u{11D95}\\u{11D97}\\u{11EF3}\\u{11EF4}\\u{11F00}\\u{11F01}\\u{11F36}-\\u{11F3A}\\u{11F40}\\u{11F42}\\u{11F5A}\\u{13440}\\u{13447}-\\u{13455}\\u{1611E}-\\u{16129}\\u{1612D}-\\u{1612F}\\u{16AF0}-\\u{16AF4}\\u{16B30}-\\u{16B36}\\u{16F4F}\\u{16F8F}-\\u{16F92}\\u{16FE4}\\u{1BC9D}\\u{1BC9E}\\u{1CF00}-\\u{1CF2D}\\u{1CF30}-\\u{1CF46}\\u{1D167}-\\u{1D169}\\u{1D17B}-\\u{1D182}\\u{1D185}-\\u{1D18B}\\u{1D1AA}-\\u{1D1AD}\\u{1D242}-\\u{1D244}\\u{1DA00}-\\u{1DA36}\\u{1DA3B}-\\u{1DA6C}\\u{1DA75}\\u{1DA84}\\u{1DA9B}-\\u{1DA9F}\\u{1DAA1}-\\u{1DAAF}\\u{1E000}-\\u{1E006}\\u{1E008}-\\u{1E018}\\u{1E01B}-\\u{1E021}\\u{1E023}\\u{1E024}\\u{1E026}-\\u{1E02A}\\u{1E08F}\\u{1E130}-\\u{1E136}\\u{1E2AE}\\u{1E2EC}-\\u{1E2EF}\\u{1E4EC}-\\u{1E4EF}\\u{1E5EE}\\u{1E5EF}\\u{1E6E3}\\u{1E6E6}\\u{1E6EE}\\u{1E6EF}\\u{1E6F5}\\u{1E8D0}-\\u{1E8D6}\\u{1E944}-\\u{1E94A}\\u{E0100}-\\u{E01EF}]*$/u;\n\nmodule.exports = {\n combiningMarks,\n combiningClassVirama,\n validZWNJ,\n bidiDomain,\n bidiS1LTR,\n bidiS1RTL,\n bidiS2,\n bidiS3,\n bidiS4EN,\n bidiS4AN,\n bidiS5,\n bidiS6\n };\n","\"use strict\";\n\nmodule.exports.STATUS_MAPPING = {\n mapped: 1,\n valid: 2,\n disallowed: 3,\n deviation: 6,\n ignored: 7\n};\n","export const LocalFileSystemID = 'file://';\nexport const FileStateAttr = Symbol.for('state');\nexport var FileState;\n(function (FileState) {\n FileState[\"Creating\"] = \"creating\";\n FileState[\"Renaming\"] = \"renaming\";\n})(FileState || (FileState = {}));\nexport const FileAttrsAttr = 'attributes';\nexport var SortOrder;\n(function (SortOrder) {\n SortOrder[\"Asc\"] = \"asc\";\n SortOrder[\"Desc\"] = \"desc\";\n})(SortOrder || (SortOrder = {}));\nexport var QueueType;\n(function (QueueType) {\n QueueType[\"Copy\"] = \"copy\";\n QueueType[\"Move\"] = \"move\";\n QueueType[\"Download\"] = \"download\";\n QueueType[\"Upload\"] = \"upload\";\n QueueType[\"Remove\"] = \"remove\";\n})(QueueType || (QueueType = {}));\nexport var QueueEventType;\n(function (QueueEventType) {\n QueueEventType[\"Start\"] = \"start\";\n QueueEventType[\"Create\"] = \"create\";\n QueueEventType[\"Update\"] = \"update\";\n QueueEventType[\"Ask\"] = \"ask\";\n QueueEventType[\"Complete\"] = \"complete\";\n})(QueueEventType || (QueueEventType = {}));\nexport var QueueActionType;\n(function (QueueActionType) {\n QueueActionType[\"Skip\"] = \"skip\";\n QueueActionType[\"Replace\"] = \"replace\";\n QueueActionType[\"Rename\"] = \"rename\";\n})(QueueActionType || (QueueActionType = {}));\nexport var FailureType;\n(function (FailureType) {\n FailureType[\"Unauthorized\"] = \"unauthorized\";\n FailureType[\"ConfirmDeletion\"] = \"confirm-deletion\";\n FailureType[\"ConfirmClear\"] = \"confirm-clear\";\n FailureType[\"MissingDir\"] = \"missing-dir\";\n FailureType[\"RemoteError\"] = \"remote-error\";\n FailureType[\"APIError\"] = \"api-error\";\n FailureType[\"Warning\"] = \"warning\";\n FailureType[\"Info\"] = \"info\";\n FailureType[\"UpdateAvailable\"] = \"update-available\";\n})(FailureType || (FailureType = {}));\nexport var MirrorEventType;\n(function (MirrorEventType) {\n MirrorEventType[\"Create\"] = \"create\";\n MirrorEventType[\"Syncing\"] = \"syncing\";\n MirrorEventType[\"Complete\"] = \"complete\";\n})(MirrorEventType || (MirrorEventType = {}));\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\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;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\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); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\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\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\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\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n","export function isFunction(value) {\n return typeof value === 'function';\n}\n//# sourceMappingURL=isFunction.js.map","export function createErrorClass(createImpl) {\n var _super = function (instance) {\n Error.call(instance);\n instance.stack = new Error().stack;\n };\n var ctorFunc = createImpl(_super);\n ctorFunc.prototype = Object.create(Error.prototype);\n ctorFunc.prototype.constructor = ctorFunc;\n return ctorFunc;\n}\n//# sourceMappingURL=createErrorClass.js.map","import { createErrorClass } from './createErrorClass';\nexport var UnsubscriptionError = createErrorClass(function (_super) {\n return function UnsubscriptionErrorImpl(errors) {\n _super(this);\n this.message = errors\n ? errors.length + \" errors occurred during unsubscription:\\n\" + errors.map(function (err, i) { return i + 1 + \") \" + err.toString(); }).join('\\n ')\n : '';\n this.name = 'UnsubscriptionError';\n this.errors = errors;\n };\n});\n//# sourceMappingURL=UnsubscriptionError.js.map","export function arrRemove(arr, item) {\n if (arr) {\n var index = arr.indexOf(item);\n 0 <= index && arr.splice(index, 1);\n }\n}\n//# sourceMappingURL=arrRemove.js.map","import { __read, __spreadArray, __values } from \"tslib\";\nimport { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nimport { arrRemove } from './util/arrRemove';\nvar Subscription = (function () {\n function Subscription(initialTeardown) {\n this.initialTeardown = initialTeardown;\n this.closed = false;\n this._parentage = null;\n this._finalizers = null;\n }\n Subscription.prototype.unsubscribe = function () {\n var e_1, _a, e_2, _b;\n var errors;\n if (!this.closed) {\n this.closed = true;\n var _parentage = this._parentage;\n if (_parentage) {\n this._parentage = null;\n if (Array.isArray(_parentage)) {\n try {\n for (var _parentage_1 = __values(_parentage), _parentage_1_1 = _parentage_1.next(); !_parentage_1_1.done; _parentage_1_1 = _parentage_1.next()) {\n var parent_1 = _parentage_1_1.value;\n parent_1.remove(this);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_parentage_1_1 && !_parentage_1_1.done && (_a = _parentage_1.return)) _a.call(_parentage_1);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n else {\n _parentage.remove(this);\n }\n }\n var initialFinalizer = this.initialTeardown;\n if (isFunction(initialFinalizer)) {\n try {\n initialFinalizer();\n }\n catch (e) {\n errors = e instanceof UnsubscriptionError ? e.errors : [e];\n }\n }\n var _finalizers = this._finalizers;\n if (_finalizers) {\n this._finalizers = null;\n try {\n for (var _finalizers_1 = __values(_finalizers), _finalizers_1_1 = _finalizers_1.next(); !_finalizers_1_1.done; _finalizers_1_1 = _finalizers_1.next()) {\n var finalizer = _finalizers_1_1.value;\n try {\n execFinalizer(finalizer);\n }\n catch (err) {\n errors = errors !== null && errors !== void 0 ? errors : [];\n if (err instanceof UnsubscriptionError) {\n errors = __spreadArray(__spreadArray([], __read(errors)), __read(err.errors));\n }\n else {\n errors.push(err);\n }\n }\n }\n }\n catch (e_2_1) { e_2 = { error: e_2_1 }; }\n finally {\n try {\n if (_finalizers_1_1 && !_finalizers_1_1.done && (_b = _finalizers_1.return)) _b.call(_finalizers_1);\n }\n finally { if (e_2) throw e_2.error; }\n }\n }\n if (errors) {\n throw new UnsubscriptionError(errors);\n }\n }\n };\n Subscription.prototype.add = function (teardown) {\n var _a;\n if (teardown && teardown !== this) {\n if (this.closed) {\n execFinalizer(teardown);\n }\n else {\n if (teardown instanceof Subscription) {\n if (teardown.closed || teardown._hasParent(this)) {\n return;\n }\n teardown._addParent(this);\n }\n (this._finalizers = (_a = this._finalizers) !== null && _a !== void 0 ? _a : []).push(teardown);\n }\n }\n };\n Subscription.prototype._hasParent = function (parent) {\n var _parentage = this._parentage;\n return _parentage === parent || (Array.isArray(_parentage) && _parentage.includes(parent));\n };\n Subscription.prototype._addParent = function (parent) {\n var _parentage = this._parentage;\n this._parentage = Array.isArray(_parentage) ? (_parentage.push(parent), _parentage) : _parentage ? [_parentage, parent] : parent;\n };\n Subscription.prototype._removeParent = function (parent) {\n var _parentage = this._parentage;\n if (_parentage === parent) {\n this._parentage = null;\n }\n else if (Array.isArray(_parentage)) {\n arrRemove(_parentage, parent);\n }\n };\n Subscription.prototype.remove = function (teardown) {\n var _finalizers = this._finalizers;\n _finalizers && arrRemove(_finalizers, teardown);\n if (teardown instanceof Subscription) {\n teardown._removeParent(this);\n }\n };\n Subscription.EMPTY = (function () {\n var empty = new Subscription();\n empty.closed = true;\n return empty;\n })();\n return Subscription;\n}());\nexport { Subscription };\nexport var EMPTY_SUBSCRIPTION = Subscription.EMPTY;\nexport function isSubscription(value) {\n return (value instanceof Subscription ||\n (value && 'closed' in value && isFunction(value.remove) && isFunction(value.add) && isFunction(value.unsubscribe)));\n}\nfunction execFinalizer(finalizer) {\n if (isFunction(finalizer)) {\n finalizer();\n }\n else {\n finalizer.unsubscribe();\n }\n}\n//# sourceMappingURL=Subscription.js.map","export var config = {\n onUnhandledError: null,\n onStoppedNotification: null,\n Promise: undefined,\n useDeprecatedSynchronousErrorHandling: false,\n useDeprecatedNextContext: false,\n};\n//# sourceMappingURL=config.js.map","import { __read, __spreadArray } from \"tslib\";\nexport var timeoutProvider = {\n setTimeout: function (handler, timeout) {\n var args = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n args[_i - 2] = arguments[_i];\n }\n var delegate = timeoutProvider.delegate;\n if (delegate === null || delegate === void 0 ? void 0 : delegate.setTimeout) {\n return delegate.setTimeout.apply(delegate, __spreadArray([handler, timeout], __read(args)));\n }\n return setTimeout.apply(void 0, __spreadArray([handler, timeout], __read(args)));\n },\n clearTimeout: function (handle) {\n var delegate = timeoutProvider.delegate;\n return ((delegate === null || delegate === void 0 ? void 0 : delegate.clearTimeout) || clearTimeout)(handle);\n },\n delegate: undefined,\n};\n//# sourceMappingURL=timeoutProvider.js.map","export function noop() { }\n//# sourceMappingURL=noop.js.map","export var COMPLETE_NOTIFICATION = (function () { return createNotification('C', undefined, undefined); })();\nexport function errorNotification(error) {\n return createNotification('E', undefined, error);\n}\nexport function nextNotification(value) {\n return createNotification('N', value, undefined);\n}\nexport function createNotification(kind, value, error) {\n return {\n kind: kind,\n value: value,\n error: error,\n };\n}\n//# sourceMappingURL=NotificationFactories.js.map","import { config } from '../config';\nvar context = null;\nexport function errorContext(cb) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n var isRoot = !context;\n if (isRoot) {\n context = { errorThrown: false, error: null };\n }\n cb();\n if (isRoot) {\n var _a = context, errorThrown = _a.errorThrown, error = _a.error;\n context = null;\n if (errorThrown) {\n throw error;\n }\n }\n }\n else {\n cb();\n }\n}\nexport function captureError(err) {\n if (config.useDeprecatedSynchronousErrorHandling && context) {\n context.errorThrown = true;\n context.error = err;\n }\n}\n//# sourceMappingURL=errorContext.js.map","import { __extends } from \"tslib\";\nimport { isFunction } from './util/isFunction';\nimport { isSubscription, Subscription } from './Subscription';\nimport { config } from './config';\nimport { reportUnhandledError } from './util/reportUnhandledError';\nimport { noop } from './util/noop';\nimport { nextNotification, errorNotification, COMPLETE_NOTIFICATION } from './NotificationFactories';\nimport { timeoutProvider } from './scheduler/timeoutProvider';\nimport { captureError } from './util/errorContext';\nvar Subscriber = (function (_super) {\n __extends(Subscriber, _super);\n function Subscriber(destination) {\n var _this = _super.call(this) || this;\n _this.isStopped = false;\n if (destination) {\n _this.destination = destination;\n if (isSubscription(destination)) {\n destination.add(_this);\n }\n }\n else {\n _this.destination = EMPTY_OBSERVER;\n }\n return _this;\n }\n Subscriber.create = function (next, error, complete) {\n return new SafeSubscriber(next, error, complete);\n };\n Subscriber.prototype.next = function (value) {\n if (this.isStopped) {\n handleStoppedNotification(nextNotification(value), this);\n }\n else {\n this._next(value);\n }\n };\n Subscriber.prototype.error = function (err) {\n if (this.isStopped) {\n handleStoppedNotification(errorNotification(err), this);\n }\n else {\n this.isStopped = true;\n this._error(err);\n }\n };\n Subscriber.prototype.complete = function () {\n if (this.isStopped) {\n handleStoppedNotification(COMPLETE_NOTIFICATION, this);\n }\n else {\n this.isStopped = true;\n this._complete();\n }\n };\n Subscriber.prototype.unsubscribe = function () {\n if (!this.closed) {\n this.isStopped = true;\n _super.prototype.unsubscribe.call(this);\n this.destination = null;\n }\n };\n Subscriber.prototype._next = function (value) {\n this.destination.next(value);\n };\n Subscriber.prototype._error = function (err) {\n try {\n this.destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n };\n Subscriber.prototype._complete = function () {\n try {\n this.destination.complete();\n }\n finally {\n this.unsubscribe();\n }\n };\n return Subscriber;\n}(Subscription));\nexport { Subscriber };\nvar _bind = Function.prototype.bind;\nfunction bind(fn, thisArg) {\n return _bind.call(fn, thisArg);\n}\nvar ConsumerObserver = (function () {\n function ConsumerObserver(partialObserver) {\n this.partialObserver = partialObserver;\n }\n ConsumerObserver.prototype.next = function (value) {\n var partialObserver = this.partialObserver;\n if (partialObserver.next) {\n try {\n partialObserver.next(value);\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n };\n ConsumerObserver.prototype.error = function (err) {\n var partialObserver = this.partialObserver;\n if (partialObserver.error) {\n try {\n partialObserver.error(err);\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n else {\n handleUnhandledError(err);\n }\n };\n ConsumerObserver.prototype.complete = function () {\n var partialObserver = this.partialObserver;\n if (partialObserver.complete) {\n try {\n partialObserver.complete();\n }\n catch (error) {\n handleUnhandledError(error);\n }\n }\n };\n return ConsumerObserver;\n}());\nvar SafeSubscriber = (function (_super) {\n __extends(SafeSubscriber, _super);\n function SafeSubscriber(observerOrNext, error, complete) {\n var _this = _super.call(this) || this;\n var partialObserver;\n if (isFunction(observerOrNext) || !observerOrNext) {\n partialObserver = {\n next: (observerOrNext !== null && observerOrNext !== void 0 ? observerOrNext : undefined),\n error: error !== null && error !== void 0 ? error : undefined,\n complete: complete !== null && complete !== void 0 ? complete : undefined,\n };\n }\n else {\n var context_1;\n if (_this && config.useDeprecatedNextContext) {\n context_1 = Object.create(observerOrNext);\n context_1.unsubscribe = function () { return _this.unsubscribe(); };\n partialObserver = {\n next: observerOrNext.next && bind(observerOrNext.next, context_1),\n error: observerOrNext.error && bind(observerOrNext.error, context_1),\n complete: observerOrNext.complete && bind(observerOrNext.complete, context_1),\n };\n }\n else {\n partialObserver = observerOrNext;\n }\n }\n _this.destination = new ConsumerObserver(partialObserver);\n return _this;\n }\n return SafeSubscriber;\n}(Subscriber));\nexport { SafeSubscriber };\nfunction handleUnhandledError(error) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n captureError(error);\n }\n else {\n reportUnhandledError(error);\n }\n}\nfunction defaultErrorHandler(err) {\n throw err;\n}\nfunction handleStoppedNotification(notification, subscriber) {\n var onStoppedNotification = config.onStoppedNotification;\n onStoppedNotification && timeoutProvider.setTimeout(function () { return onStoppedNotification(notification, subscriber); });\n}\nexport var EMPTY_OBSERVER = {\n closed: true,\n next: noop,\n error: defaultErrorHandler,\n complete: noop,\n};\n//# sourceMappingURL=Subscriber.js.map","import { config } from '../config';\nimport { timeoutProvider } from '../scheduler/timeoutProvider';\nexport function reportUnhandledError(err) {\n timeoutProvider.setTimeout(function () {\n var onUnhandledError = config.onUnhandledError;\n if (onUnhandledError) {\n onUnhandledError(err);\n }\n else {\n throw err;\n }\n });\n}\n//# sourceMappingURL=reportUnhandledError.js.map","export var observable = (function () { return (typeof Symbol === 'function' && Symbol.observable) || '@@observable'; })();\n//# sourceMappingURL=observable.js.map","export function identity(x) {\n return x;\n}\n//# sourceMappingURL=identity.js.map","import { SafeSubscriber, Subscriber } from './Subscriber';\nimport { isSubscription } from './Subscription';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nimport { isFunction } from './util/isFunction';\nimport { errorContext } from './util/errorContext';\nvar Observable = (function () {\n function Observable(subscribe) {\n if (subscribe) {\n this._subscribe = subscribe;\n }\n }\n Observable.prototype.lift = function (operator) {\n var observable = new Observable();\n observable.source = this;\n observable.operator = operator;\n return observable;\n };\n Observable.prototype.subscribe = function (observerOrNext, error, complete) {\n var _this = this;\n var subscriber = isSubscriber(observerOrNext) ? observerOrNext : new SafeSubscriber(observerOrNext, error, complete);\n errorContext(function () {\n var _a = _this, operator = _a.operator, source = _a.source;\n subscriber.add(operator\n ?\n operator.call(subscriber, source)\n : source\n ?\n _this._subscribe(subscriber)\n :\n _this._trySubscribe(subscriber));\n });\n return subscriber;\n };\n Observable.prototype._trySubscribe = function (sink) {\n try {\n return this._subscribe(sink);\n }\n catch (err) {\n sink.error(err);\n }\n };\n Observable.prototype.forEach = function (next, promiseCtor) {\n var _this = this;\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor(function (resolve, reject) {\n var subscriber = new SafeSubscriber({\n next: function (value) {\n try {\n next(value);\n }\n catch (err) {\n reject(err);\n subscriber.unsubscribe();\n }\n },\n error: reject,\n complete: resolve,\n });\n _this.subscribe(subscriber);\n });\n };\n Observable.prototype._subscribe = function (subscriber) {\n var _a;\n return (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber);\n };\n Observable.prototype[Symbol_observable] = function () {\n return this;\n };\n Observable.prototype.pipe = function () {\n var operations = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n operations[_i] = arguments[_i];\n }\n return pipeFromArray(operations)(this);\n };\n Observable.prototype.toPromise = function (promiseCtor) {\n var _this = this;\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor(function (resolve, reject) {\n var value;\n _this.subscribe(function (x) { return (value = x); }, function (err) { return reject(err); }, function () { return resolve(value); });\n });\n };\n Observable.create = function (subscribe) {\n return new Observable(subscribe);\n };\n return Observable;\n}());\nexport { Observable };\nfunction getPromiseCtor(promiseCtor) {\n var _a;\n return (_a = promiseCtor !== null && promiseCtor !== void 0 ? promiseCtor : config.Promise) !== null && _a !== void 0 ? _a : Promise;\n}\nfunction isObserver(value) {\n return value && isFunction(value.next) && isFunction(value.error) && isFunction(value.complete);\n}\nfunction isSubscriber(value) {\n return (value && value instanceof Subscriber) || (isObserver(value) && isSubscription(value));\n}\n//# sourceMappingURL=Observable.js.map","import { identity } from './identity';\nexport function pipe() {\n var fns = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fns[_i] = arguments[_i];\n }\n return pipeFromArray(fns);\n}\nexport function pipeFromArray(fns) {\n if (fns.length === 0) {\n return identity;\n }\n if (fns.length === 1) {\n return fns[0];\n }\n return function piped(input) {\n return fns.reduce(function (prev, fn) { return fn(prev); }, input);\n };\n}\n//# sourceMappingURL=pipe.js.map","import { createErrorClass } from './createErrorClass';\nexport var ObjectUnsubscribedError = createErrorClass(function (_super) {\n return function ObjectUnsubscribedErrorImpl() {\n _super(this);\n this.name = 'ObjectUnsubscribedError';\n this.message = 'object unsubscribed';\n };\n});\n//# sourceMappingURL=ObjectUnsubscribedError.js.map","import { __extends, __values } from \"tslib\";\nimport { Observable } from './Observable';\nimport { Subscription, EMPTY_SUBSCRIPTION } from './Subscription';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { arrRemove } from './util/arrRemove';\nimport { errorContext } from './util/errorContext';\nvar Subject = (function (_super) {\n __extends(Subject, _super);\n function Subject() {\n var _this = _super.call(this) || this;\n _this.closed = false;\n _this.currentObservers = null;\n _this.observers = [];\n _this.isStopped = false;\n _this.hasError = false;\n _this.thrownError = null;\n return _this;\n }\n Subject.prototype.lift = function (operator) {\n var subject = new AnonymousSubject(this, this);\n subject.operator = operator;\n return subject;\n };\n Subject.prototype._throwIfClosed = function () {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n };\n Subject.prototype.next = function (value) {\n var _this = this;\n errorContext(function () {\n var e_1, _a;\n _this._throwIfClosed();\n if (!_this.isStopped) {\n if (!_this.currentObservers) {\n _this.currentObservers = Array.from(_this.observers);\n }\n try {\n for (var _b = __values(_this.currentObservers), _c = _b.next(); !_c.done; _c = _b.next()) {\n var observer = _c.value;\n observer.next(value);\n }\n }\n catch (e_1_1) { e_1 = { error: e_1_1 }; }\n finally {\n try {\n if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\n }\n finally { if (e_1) throw e_1.error; }\n }\n }\n });\n };\n Subject.prototype.error = function (err) {\n var _this = this;\n errorContext(function () {\n _this._throwIfClosed();\n if (!_this.isStopped) {\n _this.hasError = _this.isStopped = true;\n _this.thrownError = err;\n var observers = _this.observers;\n while (observers.length) {\n observers.shift().error(err);\n }\n }\n });\n };\n Subject.prototype.complete = function () {\n var _this = this;\n errorContext(function () {\n _this._throwIfClosed();\n if (!_this.isStopped) {\n _this.isStopped = true;\n var observers = _this.observers;\n while (observers.length) {\n observers.shift().complete();\n }\n }\n });\n };\n Subject.prototype.unsubscribe = function () {\n this.isStopped = this.closed = true;\n this.observers = this.currentObservers = null;\n };\n Object.defineProperty(Subject.prototype, \"observed\", {\n get: function () {\n var _a;\n return ((_a = this.observers) === null || _a === void 0 ? void 0 : _a.length) > 0;\n },\n enumerable: false,\n configurable: true\n });\n Subject.prototype._trySubscribe = function (subscriber) {\n this._throwIfClosed();\n return _super.prototype._trySubscribe.call(this, subscriber);\n };\n Subject.prototype._subscribe = function (subscriber) {\n this._throwIfClosed();\n this._checkFinalizedStatuses(subscriber);\n return this._innerSubscribe(subscriber);\n };\n Subject.prototype._innerSubscribe = function (subscriber) {\n var _this = this;\n var _a = this, hasError = _a.hasError, isStopped = _a.isStopped, observers = _a.observers;\n if (hasError || isStopped) {\n return EMPTY_SUBSCRIPTION;\n }\n this.currentObservers = null;\n observers.push(subscriber);\n return new Subscription(function () {\n _this.currentObservers = null;\n arrRemove(observers, subscriber);\n });\n };\n Subject.prototype._checkFinalizedStatuses = function (subscriber) {\n var _a = this, hasError = _a.hasError, thrownError = _a.thrownError, isStopped = _a.isStopped;\n if (hasError) {\n subscriber.error(thrownError);\n }\n else if (isStopped) {\n subscriber.complete();\n }\n };\n Subject.prototype.asObservable = function () {\n var observable = new Observable();\n observable.source = this;\n return observable;\n };\n Subject.create = function (destination, source) {\n return new AnonymousSubject(destination, source);\n };\n return Subject;\n}(Observable));\nexport { Subject };\nvar AnonymousSubject = (function (_super) {\n __extends(AnonymousSubject, _super);\n function AnonymousSubject(destination, source) {\n var _this = _super.call(this) || this;\n _this.destination = destination;\n _this.source = source;\n return _this;\n }\n AnonymousSubject.prototype.next = function (value) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.next) === null || _b === void 0 ? void 0 : _b.call(_a, value);\n };\n AnonymousSubject.prototype.error = function (err) {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.error) === null || _b === void 0 ? void 0 : _b.call(_a, err);\n };\n AnonymousSubject.prototype.complete = function () {\n var _a, _b;\n (_b = (_a = this.destination) === null || _a === void 0 ? void 0 : _a.complete) === null || _b === void 0 ? void 0 : _b.call(_a);\n };\n AnonymousSubject.prototype._subscribe = function (subscriber) {\n var _a, _b;\n return (_b = (_a = this.source) === null || _a === void 0 ? void 0 : _a.subscribe(subscriber)) !== null && _b !== void 0 ? _b : EMPTY_SUBSCRIPTION;\n };\n return AnonymousSubject;\n}(Subject));\nexport { AnonymousSubject };\n//# sourceMappingURL=Subject.js.map","import { Subject } from 'rxjs';\nexport const error$ = new Subject();\n","import { FailureType } from './shared/types';\nimport { error$ } from './observables/error';\nasync function invoke(method, data = {}, signal) {\n return fetch(`/api/${method}`, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body: JSON.stringify(data),\n ...(signal ? { signal } : {})\n })\n .then(resp => {\n if (!resp.ok) {\n return resp.json().then(error => {\n const message = 'message' in error ? error.message : String(error);\n error$.next({ type: FailureType.APIError, message, method });\n });\n }\n return resp.json();\n })\n .catch(e => {\n process.env.NODE_ENV == 'development' && console.error(`/api/${method}`, e);\n });\n}\nconst channels = new Map;\nconst ws = new WebSocket(`ws://${location.host}/events`);\nws.onmessage = ({ data }) => {\n const event = JSON.parse(data);\n if (event && typeof event == 'object' && 'channel' in event) {\n (channels.get(event['channel']) ?? []).forEach(callback => callback(event));\n }\n};\nlet reload;\nws.onclose = (e) => {\n clearTimeout(reload);\n console.debug('Disconnected. Reloading...');\n reload = setTimeout(() => window.location.reload(), 2000);\n};\nfunction subscribe(channel, callback) {\n const callbacks = channels.get(channel);\n channels.set(channel, callbacks ? [...callbacks, callback] : [callback]);\n}\nwindow.f5 = {\n settings: () => invoke('getapp'),\n saveSettings: (settings) => invoke('saveapp', { settings }),\n onError: listener => subscribe('error', (error) => listener(error)),\n connect: (file, signal) => invoke('connect', { file }, signal),\n login: (id, password, remember) => invoke('login', { id, password, remember }),\n disconnect: (id, sid) => invoke('disconnect', { id, sid }),\n watch: dir => invoke('watch', { dir }),\n unwatch: dir => invoke('unwatch', { dir }),\n refresh: dir => invoke('refresh', { dir }),\n onDirChange: listener => subscribe('dir', ({ uri, files }) => listener(uri, files)),\n onFileChange: listener => subscribe('file', ({ path, stat }) => listener(path, stat)),\n copy: (src, dest, move = false, filter, root, sid) => invoke('copy', { src, dest, move, filter, root, sid }),\n duplicate: (src, filter) => invoke('duplicate', { src, filter }),\n remove: (files) => invoke('remove', { files }),\n clear: (file) => invoke('clear', { file }),\n open: (file, app) => invoke('open', { file, app }),\n mkdir: (name, parent) => invoke('mkdir', { name, parent }),\n read: (file) => invoke('read', { file }),\n write: (path, content) => invoke('write', { path, content }),\n rename: (path, name) => invoke('rename', { path, name }),\n get: (path) => invoke('get', { path }),\n save: (path, settings) => invoke('save', { path, settings }),\n resolve: (id, action, forAll, sid) => invoke('resolve', { id, action, forAll, sid }),\n stop: id => invoke('stop', { id }),\n onQueueUpdate: listener => subscribe('queue', ({ id, event }) => listener(id, event)),\n mirror: (local, remote, sid, recursive, del, filter) => invoke('mirror', { local, remote, sid, recursive, del, filter }),\n unmirror: (id) => invoke('unmirror', { id }),\n onMirrorUpdate: listener => subscribe('mirror', (event) => listener(event)),\n};\nwindow.f5.onError((error) => error$.next(error));\n","\"use strict\";\n\nvar stylesInDOM = [];\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n return result;\n}\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n identifiers.push(identifier);\n }\n return identifiers;\n}\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n return updater;\n}\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n var newLastIdentifiers = modulesToDom(newList, options);\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n var _index = getIndexByIdentifier(_identifier);\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n stylesInDOM.splice(_index, 1);\n }\n }\n lastIdentifiers = newLastIdentifiers;\n };\n};","\"use strict\";\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = \"\";\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n var needLayer = typeof obj.layer !== \"undefined\";\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n css += obj.css;\n if (needLayer) {\n css += \"}\";\n }\n if (obj.media) {\n css += \"}\";\n }\n if (obj.supports) {\n css += \"}\";\n }\n var sourceMap = obj.sourceMap;\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n }\n\n // For old IE\n /* istanbul ignore if */\n options.styleTagTransform(css, styleElement, options.options);\n}\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n styleElement.parentNode.removeChild(styleElement);\n}\n\n/* istanbul ignore next */\nfunction domAPI(options) {\n if (typeof document === \"undefined\") {\n return {\n update: function update() {},\n remove: function remove() {}\n };\n }\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\nmodule.exports = domAPI;","\"use strict\";\n\nvar memo = {};\n\n/* istanbul ignore next */\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target);\n\n // Special case to return head of iframe instead of iframe itself\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n memo[target] = styleTarget;\n }\n return memo[target];\n}\n\n/* istanbul ignore next */\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n target.appendChild(style);\n}\nmodule.exports = insertBySelector;","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\nmodule.exports = insertStyleElement;","\"use strict\";\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n styleElement.appendChild(document.createTextNode(css));\n }\n}\nmodule.exports = styleTagTransform;","\n import API from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../node_modules/css-loader/dist/cjs.js!./styles.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../node_modules/css-loader/dist/cjs.js!./styles.css\";\n export default content && content.locals ? content.locals : undefined;\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../node_modules/less-loader/dist/cjs/index.js!./Button.module.less\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../node_modules/less-loader/dist/cjs/index.js!./Button.module.less\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { forwardRef } from \"react\";\nimport styles from './Button.module.less';\nexport const Button = forwardRef(function ({ children, onClick = () => { }, primary, disabled, hidden, style }, ref) {\n return (React.createElement(\"button\", { type: 'button', ref: ref, className: styles.root, onClick: onClick, \"data-primary\": primary, disabled: disabled ?? false, hidden: hidden, style: style }, children));\n});\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../node_modules/less-loader/dist/cjs/index.js!./Spinner.module.less\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../node_modules/less-loader/dist/cjs/index.js!./Spinner.module.less\";\n export default content && content.locals ? content.locals : undefined;\n","import React from \"react\";\nimport styles from './Spinner.module.less';\nexport function Spinner({ radius = '20px' }) {\n return (React.createElement(\"svg\", { viewBox: \"0 0 50 50\", width: radius, height: radius, className: styles.root },\n React.createElement(\"circle\", { cx: \"25\", cy: \"25\", r: \"20\", fill: \"none\", strokeWidth: \"3\" })));\n}\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../node_modules/less-loader/dist/cjs/index.js!./Progress.module.less\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../node_modules/less-loader/dist/cjs/index.js!./Progress.module.less\";\n export default content && content.locals ? content.locals : undefined;\n","import React from \"react\";\nimport styles from './Progress.module.less';\nexport function Progress({ percent }) {\n return (React.createElement(\"div\", { className: styles.root },\n React.createElement(\"div\", { style: { transform: `scaleX(${percent / 100})` } })));\n}\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../node_modules/less-loader/dist/cjs/index.js!./CircleProgress.module.less\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../node_modules/less-loader/dist/cjs/index.js!./CircleProgress.module.less\";\n export default content && content.locals ? content.locals : undefined;\n","import React from \"react\";\nimport styles from './CircleProgress.module.less';\nexport function CircleProgress({ children, percent }) {\n return (React.createElement(\"div\", { className: styles.root },\n React.createElement(\"svg\", { viewBox: \"0 0 50 50\" },\n React.createElement(\"circle\", { cx: \"25\", cy: \"25\", r: \"20\", fill: \"none\", strokeWidth: \"1\" }),\n React.createElement(\"circle\", { cx: \"25\", cy: \"25\", r: \"20\", fill: \"none\", strokeWidth: \"2\", style: { strokeDashoffset: `-${Math.round(126 / 100 * percent)}` } })),\n React.createElement(\"div\", { className: styles.content }, children)));\n}\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../node_modules/less-loader/dist/cjs/index.js!./Modal.module.less\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../node_modules/less-loader/dist/cjs/index.js!./Modal.module.less\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useEffect, useRef } from \"react\";\nimport { createPortal } from 'react-dom';\nimport styles from './Modal.module.less';\nimport { Button } from '../Button/Button';\nexport var ModalButtonID;\n(function (ModalButtonID) {\n ModalButtonID[\"Cancel\"] = \"cancel\";\n ModalButtonID[\"Ok\"] = \"ok\";\n})(ModalButtonID || (ModalButtonID = {}));\nexport function Modal({ children, buttons = [], onClose = () => { }, show = true, options }) {\n const opts = Object.assign({ cancelOnEsc: true, okOnEnter: true, x: false }, options ?? {});\n const rootRef = useRef(null);\n useEffect(() => {\n const keys = (e) => {\n if (e.key == 'Escape' && buttons.some(({ id }) => id == ModalButtonID.Cancel)) {\n if (opts.cancelOnEsc) {\n e.preventDefault();\n e.stopPropagation();\n onClose(ModalButtonID.Cancel);\n }\n }\n if (e.key == 'Enter' && buttons.some(({ id }) => id == ModalButtonID.Ok)) {\n if (opts.okOnEnter) {\n const b = buttons.find(({ id }) => id == ModalButtonID.Ok);\n if (b?.disabled !== true) {\n e.preventDefault();\n e.stopPropagation();\n onClose(ModalButtonID.Ok);\n }\n }\n }\n };\n document.addEventListener('keydown', keys);\n return () => document.removeEventListener('keydown', keys);\n }, [buttons]);\n useEffect(() => {\n const active = document.activeElement;\n rootRef.current?.focus();\n return () => active?.focus?.();\n }, []);\n return (React.createElement(React.Fragment, null, show && createPortal(React.createElement(\"div\", { ref: rootRef, className: styles.overlay, tabIndex: 1 },\n React.createElement(\"div\", { className: styles.dialog },\n opts.x && buttons.some(({ id }) => id == ModalButtonID.Cancel) &&\n React.createElement(\"button\", { className: styles.close, onClick: () => onClose(ModalButtonID.Cancel) }, \"\\u2715\"),\n children,\n buttons.length > 0 &&\n React.createElement(\"footer\", null, buttons.map(({ id, label, disabled }) => React.createElement(Button, { key: id, onClick: () => onClose(id), primary: id == 'ok', disabled: disabled ?? false }, label))))), document.body)));\n}\n","/**\n *\n * @example <div ref={setRef(rootEl, fwdRef)}></div>\n *\n*/\nexport default function (...refs) {\n return (instance) => {\n refs.forEach(ref => {\n if (typeof ref === 'function') {\n ref(instance);\n }\n else if (ref) {\n ref.current = instance;\n }\n });\n };\n}\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../node_modules/less-loader/dist/cjs/index.js!./Popover.module.less\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../node_modules/less-loader/dist/cjs/index.js!./Popover.module.less\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useState, useEffect, useRef, useLayoutEffect, forwardRef } from \"react\";\nimport { createPortal } from 'react-dom';\nimport setRef from './../../setRef';\nimport styles from './Popover.module.less';\nexport const Popover = forwardRef(function ({ children, position, hideOnClick = true }, ref) {\n const [shown, show] = useState(!!position);\n useEffect(() => show(!!position), [position]);\n useEffect(() => {\n const esc = (e) => {\n if (e.key == 'Escape' && shown) {\n e.stopPropagation();\n show(false);\n }\n };\n document.addEventListener('keydown', esc, { passive: true });\n return () => document.removeEventListener('keydown', esc);\n }, [shown]);\n return (React.createElement(React.Fragment, null, shown && position &&\n createPortal(React.createElement(\"div\", { className: styles.overlay, onMouseDown: e => { e.preventDefault(); show(false); }, onContextMenu: e => { e.preventDefault(); show(false); } },\n React.createElement(PopoverContent, { ref: ref, x: position.x, y: position.y, onClick: () => show(!hideOnClick) }, children)), document.body)));\n});\nexport const PopoverContent = forwardRef(function ({ children, x, y, onClick }, ref) {\n const rootEl = useRef(null);\n const [point, setPoint] = useState({ left: x, top: y });\n const [shown, show] = useState(false);\n useLayoutEffect(() => {\n show(false);\n const tm = setTimeout(() => {\n if (rootEl.current) {\n const { width, height } = rootEl.current.getBoundingClientRect();\n const { clientWidth, clientHeight } = document.documentElement;\n const left = (x + width) > clientWidth ? x - width : x;\n const top = y + Math.min(0, clientHeight - y - height - 10);\n setPoint({ left, top });\n show(true);\n }\n }, 200);\n return () => clearTimeout(tm);\n }, [x, y]);\n return (React.createElement(\"div\", { ref: setRef(rootEl, ref), className: styles.content, style: {\n left: `${point.left}px`,\n top: `${point.top}px`,\n visibility: shown ? 'visible' : 'hidden',\n }, onMouseDown: e => { e.preventDefault(); e.stopPropagation(); onClick(); } }, children));\n});\n","import React, { useState, useEffect } from \"react\";\nimport { Popover } from './Popover/Popover';\nexport function ContextMenu({ children, target = document.documentElement, hideOnClick = true }) {\n const [position, setPosition] = useState();\n useEffect(() => {\n const rightClick = (e) => { e.preventDefault(); setPosition({ x: e.clientX, y: e.clientY }); };\n target?.addEventListener('contextmenu', rightClick);\n return () => target?.removeEventListener('contextmenu', rightClick);\n }, [target]);\n return React.createElement(Popover, { position: position, hideOnClick: hideOnClick }, children);\n}\n","import React, { useState, useEffect, useRef } from \"react\";\nimport { Popover } from './Popover/Popover';\nexport function Popper({ children, target, align, hideOnClick = true }) {\n const [position, setPosition] = useState();\n const contentRef = useRef(null);\n useEffect(() => {\n const click = (e) => {\n e.preventDefault();\n setPosition({ x: 0, y: 0 });\n setTimeout(() => {\n if (!contentRef.current) {\n return;\n }\n const targetRect = target.getBoundingClientRect();\n const contentRect = contentRef.current.getBoundingClientRect();\n if (align == 'bottom-end') {\n setPosition({\n x: targetRect.right - contentRect.width,\n y: targetRect.bottom\n });\n }\n }, 100);\n };\n target.addEventListener('mousedown', click);\n return () => target.removeEventListener('mousedown', click);\n }, [target]);\n return React.createElement(Popover, { position: position, hideOnClick: hideOnClick, ref: contentRef }, children);\n}\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../node_modules/less-loader/dist/cjs/index.js!./Menu.module.less\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../node_modules/less-loader/dist/cjs/index.js!./Menu.module.less\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useState, useEffect } from \"react\";\nimport styles from './Menu.module.less';\nimport classNames from \"classnames\";\nconst keyboardSymbols = {\n alt: '⌥',\n ctrl: '⌃',\n meta: '⌘',\n shift: '⇧',\n delete: '⌦',\n backspace: '⌫',\n escape: '␛',\n equal: '=',\n minus: '−',\n backslash: '\\\\',\n slash: '/',\n comma: ',',\n period: '.',\n quote: '\"',\n backquote: '`',\n semicolon: ';',\n bracketleft: '[',\n bracketright: ']',\n arrowup: '↑',\n arrowright: '→',\n arrowdown: '↓',\n arrowleft: '←'\n};\nexport function findKeyBinding(id, shortcuts) {\n return shortcuts?.find(({ command }) => command === id)?.key\n .split('+')\n .map(key => (keyboardSymbols[key] ?? key).toUpperCase())\n .join(' ');\n}\nexport function Menu({ items, shortcuts, click = (id) => { } }) {\n const [checklist, setCheckList] = useState(false);\n useEffect(() => {\n setCheckList(items.some(({ checked }) => checked !== undefined));\n }, [items]);\n const [menuItems, setMenuItems] = useState([]);\n useEffect(() => {\n setMenuItems(items.map(item => ({ ...item, shortcut: item.shortcut ?? findKeyBinding(item.id, shortcuts ?? []) })));\n }, [items]);\n return React.createElement(\"ul\", { className: classNames('dry-menu', styles.root, { checklist }) }, menuItems.map(item => React.createElement(\"li\", { key: item.id, className: classNames({\n [styles.separator]: item.separator,\n checked: item.checked === true\n }, item.className), onMouseDown: e => {\n const stopPropagation = item.click ? item.click() : click(item.id);\n if (typeof stopPropagation === 'boolean') {\n stopPropagation === true && e.stopPropagation();\n }\n else if (typeof item.checked === 'boolean') {\n e.stopPropagation();\n }\n } },\n React.createElement(\"span\", null,\n item.checked === true &&\n React.createElement(\"svg\", { viewBox: \"0 -960 960 960\" },\n React.createElement(\"path\", { d: \"M382-240 154-468l57-57 171 171 367-367 57 57-424 424Z\" })),\n item.label),\n React.createElement(\"span\", null, item.shortcut))));\n}\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../node_modules/less-loader/dist/cjs/index.js!./Select.module.less\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../node_modules/less-loader/dist/cjs/index.js!./Select.module.less\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useState, useEffect, useRef, forwardRef } from \"react\";\nimport { createPortal } from 'react-dom';\nimport styles from './Select.module.less';\nimport setRef from '../../setRef';\nexport const Select = forwardRef(function ({ options, value, onChange, tabindex = 0 }, ref) {\n const [selected, setSelected] = useState();\n const [shown, show] = useState(false);\n const [pos, setPos] = useState({ x: 0, y: 0, width: 0 });\n const buttonEl = useRef(null);\n useEffect(() => {\n if (options.length) {\n setSelected(value ? options.find(option => option.value == value) : options[0]);\n }\n }, [options, value]);\n useEffect(() => {\n if (shown && buttonEl.current) {\n const { x, bottom: y, width } = buttonEl.current.getBoundingClientRect();\n setPos({ x, y, width });\n }\n }, [shown]);\n const onkey = (e) => {\n switch (e.key) {\n case 'Space':\n case 'Enter':\n case 'ArrowUp':\n case 'ArrowDown':\n show(true);\n e.preventDefault();\n e.stopPropagation();\n break;\n case 'Escape':\n show(false);\n e.preventDefault();\n e.stopPropagation();\n break;\n }\n };\n const onSelect = (option) => {\n setSelected(option);\n onChange(option.value);\n show(false);\n };\n return React.createElement(React.Fragment, null,\n React.createElement(\"button\", { type: \"button\", ref: setRef(buttonEl, ref), tabIndex: tabindex, className: styles.button, onKeyDown: e => onkey(e), onClick: () => show(shown => !shown), onBlur: () => show(false) },\n React.createElement(\"span\", null, selected?.label),\n React.createElement(\"svg\", { height: \"24\", width: \"24\", viewBox: \"0 -960 960 960\" },\n React.createElement(\"path\", { d: \"M480-345 240-585l56-56 184 184 184-184 56 56-240 240Z\" }))),\n shown && createPortal(React.createElement(\"ul\", { className: styles.options, style: { left: pos.x, top: pos.y, width: pos.width } }, options.map(option => React.createElement(\"li\", { key: option.value, className: option.value == selected?.value ? styles.active : '', onMouseDown: e => { e.preventDefault(); onSelect(option); } }, option.label))), document.body));\n});\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../node_modules/less-loader/dist/cjs/index.js!./Switch.module.less\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../node_modules/less-loader/dist/cjs/index.js!./Switch.module.less\";\n export default content && content.locals ? content.locals : undefined;\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../node_modules/less-loader/dist/cjs/index.js!./Password.module.less\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../node_modules/less-loader/dist/cjs/index.js!./Password.module.less\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useState, useEffect, forwardRef } from \"react\";\nimport styles from './Password.module.less';\nexport const Password = forwardRef(function ({ onChange, value: inputValue, name, placeholder = '', tabindex = 0, autoComplete = 'current-password' }, ref) {\n const [value, setValue] = useState('');\n const [type, setType] = useState('password');\n useEffect(() => {\n inputValue && setValue(inputValue);\n }, [inputValue]);\n return React.createElement(\"span\", { className: styles.root },\n React.createElement(\"input\", { type: type, ref: ref, name: name, value: value, className: \"dry\", onChange: e => { setValue(e.target.value); onChange(e.target.value); }, tabIndex: tabindex, placeholder: placeholder, autoComplete: autoComplete }),\n React.createElement(\"svg\", { height: \"24\", width: \"24\", viewBox: \"0 -960 960 960\", onClick: () => setType(tp => tp == 'text' ? 'password' : 'text') }, type == 'password' ?\n React.createElement(\"path\", { d: \"M480-320q75 0 127.5-52.5T660-500q0-75-52.5-127.5T480-680q-75 0-127.5 52.5T300-500q0 75 52.5 127.5T480-320Zm0-72q-45 0-76.5-31.5T372-500q0-45 31.5-76.5T480-608q45 0 76.5 31.5T588-500q0 45-31.5 76.5T480-392Zm0 192q-146 0-266-81.5T40-500q54-137 174-218.5T480-800q146 0 266 81.5T920-500q-54 137-174 218.5T480-200Zm0-300Zm0 220q113 0 207.5-59.5T832-500q-50-101-144.5-160.5T480-720q-113 0-207.5 59.5T128-500q50 101 144.5 160.5T480-280Z\" }) :\n React.createElement(\"path\", { d: \"m644-428-58-58q9-47-27-88t-93-32l-58-58q17-8 34.5-12t37.5-4q75 0 127.5 52.5T660-500q0 20-4 37.5T644-428Zm128 126-58-56q38-29 67.5-63.5T832-500q-50-101-143.5-160.5T480-720q-29 0-57 4t-55 12l-62-62q41-17 84-25.5t90-8.5q151 0 269 83.5T920-500q-23 59-60.5 109.5T772-302Zm20 246L624-222q-35 11-70.5 16.5T480-200q-151 0-269-83.5T40-500q21-53 53-98.5t73-81.5L56-792l56-56 736 736-56 56ZM222-624q-29 26-53 57t-41 67q50 101 143.5 160.5T480-280q20 0 39-2.5t39-5.5l-36-38q-11 3-21 4.5t-21 1.5q-75 0-127.5-52.5T300-500q0-11 1.5-21t4.5-21l-84-82Zm319 93Zm-151 75Z\" })));\n});\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../node_modules/less-loader/dist/cjs/index.js!./Checkbox.module.less\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../node_modules/less-loader/dist/cjs/index.js!./Checkbox.module.less\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useState, useEffect } from \"react\";\nimport styles from './Checkbox.module.less';\nexport function Checkbox({ onChange, value: inputValue = false, labelPlacement = 'left', tabindex = 0, children }) {\n const [checked, check] = useState(inputValue);\n useEffect(() => {\n inputValue && check(inputValue);\n }, [inputValue]);\n return (React.createElement(\"span\", { className: styles.root, \"data-checked\": checked, \"data-placement\": labelPlacement, onClick: () => { onChange(!checked); check(!checked); }, tabIndex: tabindex },\n React.createElement(\"i\", null,\n React.createElement(\"svg\", { width: \"100%\", height: \"100%\", viewBox: \"0 -960 960 960\" }, checked && React.createElement(\"path\", { d: \"M382-253.85 168.62-467.23 211.38-510 382-339.38 748.62-706l42.76 42.77L382-253.85Z\" }))),\n React.createElement(\"span\", null, children)));\n}\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../node_modules/less-loader/dist/cjs/index.js!./Tooltip.module.less\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../node_modules/less-loader/dist/cjs/index.js!./Tooltip.module.less\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useState, useRef, useLayoutEffect } from \"react\";\nimport styles from './Tooltip.module.less';\nexport function Tooltip({ target, content }) {\n const ref = useRef(null);\n const [pos, setPos] = useState({ x: 0, y: 0 });\n useLayoutEffect(() => {\n if (target && ref.current) {\n const rect = target.getBoundingClientRect();\n const { width, height } = ref.current.getBoundingClientRect();\n const { clientWidth, clientHeight } = document.documentElement;\n let x = rect.left - (width - rect.width) / 2;\n if (x + width > clientWidth) {\n x -= x + width - clientWidth;\n }\n x = Math.max(0, x);\n let y = rect.top - height - 2;\n if (y < 0) {\n y = rect.bottom + 2;\n }\n setPos({ x, y });\n }\n }, []);\n return (content.length &&\n React.createElement(\"div\", { ref: ref, className: styles.tooltip, style: { left: pos.x, top: pos.y }, dangerouslySetInnerHTML: { __html: content } }));\n}\n","import React, { useState, useRef, useEffect } from \"react\";\nimport { createPortal } from 'react-dom';\nimport { Tooltip } from './Tooltip';\nimport { findKeyBinding } from '../Menu/Menu';\nexport function getTooltipShortcut(id, bindings) {\n const key = findKeyBinding(id, bindings);\n return key ? `<code>${key}</code>` : '';\n}\nexport function Tooltips({ children, delay, shortcuts }) {\n const ref = useRef(null);\n const [target, setTarget] = useState();\n useEffect(() => {\n setTarget(undefined);\n if (ref.current) {\n const timeouts = new Map();\n const show = (e) => {\n const target = e.target;\n timeouts.set(target, setTimeout(() => { setTarget(target); timeouts.delete(target); }, delay ?? 0));\n };\n const hide = (e) => {\n const target = e.target;\n clearTimeout(timeouts.get(target));\n timeouts.delete(target);\n setTarget(undefined);\n };\n ref.current.querySelectorAll('[data-tooltip]').forEach(el => {\n el.addEventListener('mouseenter', show);\n el.addEventListener('mouseleave', hide);\n });\n return () => {\n ref.current?.querySelectorAll('[data-tooltip]').forEach(el => {\n el.removeEventListener('mouseenter', show);\n el.removeEventListener('mouseleave', hide);\n });\n };\n }\n }, [children]);\n const getText = (target) => {\n let text = target.getAttribute('data-tooltip') ?? '';\n if (text.length && shortcuts && target.hasAttribute('data-command')) {\n text += getTooltipShortcut(target.getAttribute('data-command'), shortcuts);\n }\n return text;\n };\n return (React.createElement(React.Fragment, null,\n React.createElement(\"span\", { ref: ref, style: { display: 'contents' } }, children),\n target && createPortal(React.createElement(Tooltip, { target: target, content: getText(target) }), document.body)));\n}\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../node_modules/less-loader/dist/cjs/index.js!./Split.module.less\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[2].use[1]!../../../../node_modules/less-loader/dist/cjs/index.js!./Split.module.less\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useState, useEffect, useRef } from \"react\";\nimport styles from './Split.module.less';\nexport function Split({ left, right, initial = 50, onResize, vertical = false, className, children }) {\n const root = useRef(null);\n const resizer = useRef(null);\n const leftPane = useRef(null);\n const rightPane = useRef(null);\n const resizing = useRef(false);\n const [width, setWidth] = useState(initial);\n useEffect(() => {\n const onMove = ({ clientX, clientY }) => {\n if (resizing.current && root.current && leftPane.current && resizer.current) {\n const topRc = root.current.getBoundingClientRect();\n const leftRc = leftPane.current.getBoundingClientRect();\n setWidth(Math.max(0, Math.min(100, vertical ?\n Math.min((clientY - leftRc.top), topRc.height - resizer.current.offsetHeight) / topRc.height * 100 :\n Math.min((clientX - leftRc.left), topRc.width - resizer.current.offsetWidth) / topRc.width * 100)));\n }\n };\n const onUp = () => resizing.current = false;\n document.documentElement.addEventListener('mousemove', onMove);\n document.documentElement.addEventListener('mouseup', onUp);\n return () => {\n document.documentElement.removeEventListener('mousemove', onMove);\n document.documentElement.removeEventListener('mouseup', onUp);\n };\n }, []);\n useEffect(() => onResize?.(Math.round(width * 100) / 100), [width]);\n return (React.createElement(\"div\", { className: `${styles.root} ${className ?? ''}`, ref: root, \"data-vertical\": vertical },\n React.createElement(\"div\", { ref: leftPane, className: \"left\", style: { flexBasis: width + '%' } }, left),\n React.createElement(\"i\", { className: \"resizer\", ref: resizer, onMouseDown: e => { e.stopPropagation(); resizing.current = true; }, onClick: e => e.stopPropagation() }, children),\n React.createElement(\"div\", { ref: rightPane, className: \"right\" }, right)));\n}\n","import { createContext } from \"react\";\nexport const AppSettingsContext = createContext(null);\n","\"use strict\";\n\nconst { URL, URLSearchParams } = require(\"./webidl2js-wrapper\");\nconst urlStateMachine = require(\"./lib/url-state-machine\");\nconst percentEncoding = require(\"./lib/percent-encoding\");\nconst urlStringValidator = require(\"./lib/url-string-validator\");\n\nconst sharedGlobalObject = { Array, Object, Promise, String, TypeError };\nURL.install(sharedGlobalObject, [\"Window\"]);\nURLSearchParams.install(sharedGlobalObject, [\"Window\"]);\n\nexports.URL = sharedGlobalObject.URL;\nexports.URLSearchParams = sharedGlobalObject.URLSearchParams;\n\nexports.parseURL = urlStateMachine.parseURL;\nexports.parseURLWithValidationErrors = urlStateMachine.parseURLWithValidationErrors;\nexports.isValidURLString = urlStringValidator.isValidURLString;\nexports.basicURLParse = urlStateMachine.basicURLParse;\nexports.serializeURL = urlStateMachine.serializeURL;\nexports.serializePath = urlStateMachine.serializePath;\nexports.serializeHost = urlStateMachine.serializeHost;\nexports.serializeInteger = urlStateMachine.serializeInteger;\nexports.serializeURLOrigin = urlStateMachine.serializeURLOrigin;\nexports.setTheUsername = urlStateMachine.setTheUsername;\nexports.setThePassword = urlStateMachine.setThePassword;\nexports.cannotHaveAUsernamePasswordPort = urlStateMachine.cannotHaveAUsernamePasswordPort;\nexports.hasAnOpaquePath = urlStateMachine.hasAnOpaquePath;\n\nexports.percentDecodeString = percentEncoding.percentDecodeString;\nexports.percentDecodeBytes = percentEncoding.percentDecodeBytes;\n","import { LocalFileSystemID } from '../types';\nimport { URL, parseURL, serializeURL } from 'whatwg-url';\nexport function isLocal(uri) {\n return uri.startsWith('file:');\n}\nexport function connectionID(scheme, user, host, port) {\n switch (scheme) {\n case 'file':\n return LocalFileSystemID;\n case 's3':\n scheme = host.match(/^https?:\\/\\//)[0].slice(0, -3);\n host = host.substring(scheme.length + 3);\n break;\n }\n return `${scheme}://${user}@${host}:${port}`;\n}\n// https://url.spec.whatwg.org/#special-scheme\n// https://jsdom.github.io/whatwg-url/#url=bmF0czovL2xvY2FsaG9zdDo0MjAwLw==&base=ZmlsZTovLy8=\nexport function parseURI(uri) {\n const { protocol, pathname, username, hostname, port: p } = new URL(uri);\n const port = p ? parseInt(p) : defaultPort(protocol.slice(0, -1)) ?? 0;\n return {\n id: connectionID(protocol.slice(0, -1), username, hostname, port),\n scheme: protocol.slice(0, -1),\n path: decodeURI(pathname),\n user: username,\n host: hostname,\n port\n };\n}\nexport function createURI(id, path) {\n const u = parseURL(id);\n if (!u) {\n throw new Error(`Invalid URL: ${id}`);\n }\n u.path = path;\n if (!u.port) {\n u.port = defaultPort(u.scheme);\n }\n return serializeURL(u);\n}\nfunction defaultPort(protocol) {\n switch (protocol) {\n case 'file': return null;\n case 'ftp': return 21;\n case 'sftp': return 22;\n case 'http': return 80;\n case 'https': return 443;\n }\n throw new Error(`Defaul port for protocol ${protocol} is not defined`);\n}\n","function escapeRegExp(s) {\n let re = s.replace(/[/\\-\\\\^$+.()|[\\]{}]/g, '\\\\$&');\n re = re.replaceAll('*', '.*');\n re = re.replaceAll('?', '.{1}');\n return re;\n}\nexport function filterRegExp(settings) {\n if (!settings?.text.length) {\n return null;\n }\n let source = settings.useRe ? settings.text : escapeRegExp(settings.text);\n if (settings.wholeWord) {\n source = `^${source}$`;\n }\n try {\n return new RegExp(source, settings.matchCase ? '' : 'i');\n }\n catch {\n return null;\n }\n}\nconst tmpRe = new RegExp('^(?:' +\n String.raw `.*~|` +\n String.raw `.*\\.(?:tmp|temp|bak|old|orig|save|swp|swo|swn|part|crdownload|download|dmp|core)|` +\n String.raw `[._].*\\.sw[a-z]|` +\n String.raw `.*\\.un~|` +\n String.raw `\\.#.*|` +\n String.raw `#.*#|` +\n String.raw `\\.~.*#|` +\n String.raw `\\.goutputstream-.*|` +\n String.raw `\\._.*|\\.DS_Store|\\.Trashes|\\.Spotlight-V100|\\.fseventsd|\\.TemporaryItems|\\.DocumentRevisions-V100|Thumbs\\.db|ehthumbs\\.db|` +\n String.raw `core(?:\\..*)?` +\n ')$');\nexport function buildFilterPredicate(settings) {\n const nameRe = filterRegExp(settings);\n return (name) => {\n if (settings.hidden\n && name.startsWith('.')) {\n return false;\n }\n if (settings.temporary\n && tmpRe.test(name)) {\n return false;\n }\n if (!nameRe) {\n return true;\n }\n const matched = nameRe.test(name);\n return settings.invert ? !matched : matched;\n };\n}\n","export default function _isPlaceholder(a) {\n return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true;\n}","import _isPlaceholder from \"./_isPlaceholder.js\";\n\n/**\n * Optimized internal one-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\nexport default function _curry1(fn) {\n return function f1(a) {\n if (arguments.length === 0 || _isPlaceholder(a)) {\n return f1;\n } else {\n return fn.apply(this, arguments);\n }\n };\n}","export default function _arity(n, fn) {\n /* eslint-disable no-unused-vars */\n switch (n) {\n case 0:\n return function () {\n return fn.apply(this, arguments);\n };\n case 1:\n return function (a0) {\n return fn.apply(this, arguments);\n };\n case 2:\n return function (a0, a1) {\n return fn.apply(this, arguments);\n };\n case 3:\n return function (a0, a1, a2) {\n return fn.apply(this, arguments);\n };\n case 4:\n return function (a0, a1, a2, a3) {\n return fn.apply(this, arguments);\n };\n case 5:\n return function (a0, a1, a2, a3, a4) {\n return fn.apply(this, arguments);\n };\n case 6:\n return function (a0, a1, a2, a3, a4, a5) {\n return fn.apply(this, arguments);\n };\n case 7:\n return function (a0, a1, a2, a3, a4, a5, a6) {\n return fn.apply(this, arguments);\n };\n case 8:\n return function (a0, a1, a2, a3, a4, a5, a6, a7) {\n return fn.apply(this, arguments);\n };\n case 9:\n return function (a0, a1, a2, a3, a4, a5, a6, a7, a8) {\n return fn.apply(this, arguments);\n };\n case 10:\n return function (a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) {\n return fn.apply(this, arguments);\n };\n default:\n throw new Error('First argument to _arity must be a non-negative integer no greater than ten');\n }\n}","import _curry1 from \"./_curry1.js\";\nimport _isPlaceholder from \"./_isPlaceholder.js\";\n\n/**\n * Optimized internal two-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\nexport default function _curry2(fn) {\n return function f2(a, b) {\n switch (arguments.length) {\n case 0:\n return f2;\n case 1:\n return _isPlaceholder(a) ? f2 : _curry1(function (_b) {\n return fn(a, _b);\n });\n default:\n return _isPlaceholder(a) && _isPlaceholder(b) ? f2 : _isPlaceholder(a) ? _curry1(function (_a) {\n return fn(_a, b);\n }) : _isPlaceholder(b) ? _curry1(function (_b) {\n return fn(a, _b);\n }) : fn(a, b);\n }\n };\n}","import _arity from \"./_arity.js\";\nimport _isPlaceholder from \"./_isPlaceholder.js\";\n\n/**\n * Internal curryN function.\n *\n * @private\n * @category Function\n * @param {Number} length The arity of the curried function.\n * @param {Array} received An array of arguments received thus far.\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\nexport default function _curryN(length, received, fn) {\n return function () {\n var combined = [];\n var argsIdx = 0;\n var left = length;\n var combinedIdx = 0;\n var hasPlaceholder = false;\n while (combinedIdx < received.length || argsIdx < arguments.length) {\n var result;\n if (combinedIdx < received.length && (!_isPlaceholder(received[combinedIdx]) || argsIdx >= arguments.length)) {\n result = received[combinedIdx];\n } else {\n result = arguments[argsIdx];\n argsIdx += 1;\n }\n combined[combinedIdx] = result;\n if (!_isPlaceholder(result)) {\n left -= 1;\n } else {\n hasPlaceholder = true;\n }\n combinedIdx += 1;\n }\n return !hasPlaceholder && left <= 0 ? fn.apply(this, combined) : _arity(Math.max(0, left), _curryN(length, combined, fn));\n };\n}","import _arity from \"./internal/_arity.js\";\nimport _curry1 from \"./internal/_curry1.js\";\nimport _curry2 from \"./internal/_curry2.js\";\nimport _curryN from \"./internal/_curryN.js\";\n\n/**\n * Returns a curried equivalent of the provided function, with the specified\n * arity. The curried function has two unusual capabilities. First, its\n * arguments needn't be provided one at a time. If `g` is `R.curryN(3, f)`, the\n * following are equivalent:\n *\n * - `g(1)(2)(3)`\n * - `g(1)(2, 3)`\n * - `g(1, 2)(3)`\n * - `g(1, 2, 3)`\n *\n * Secondly, the special placeholder value [`R.__`](#__) may be used to specify\n * \"gaps\", allowing partial application of any combination of arguments,\n * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__),\n * the following are equivalent:\n *\n * - `g(1, 2, 3)`\n * - `g(_, 2, 3)(1)`\n * - `g(_, _, 3)(1)(2)`\n * - `g(_, _, 3)(1, 2)`\n * - `g(_, 2)(1)(3)`\n * - `g(_, 2)(1, 3)`\n * - `g(_, 2)(_, 3)(1)`\n *\n * @func\n * @memberOf R\n * @since v0.5.0\n * @category Function\n * @sig Number -> (* -> a) -> (* -> a)\n * @param {Number} length The arity for the returned function.\n * @param {Function} fn The function to curry.\n * @return {Function} A new, curried function.\n * @see R.curry\n * @example\n *\n * const sumArgs = (...args) => R.sum(args);\n *\n * const curriedAddFourNumbers = R.curryN(4, sumArgs);\n * const f = curriedAddFourNumbers(1, 2);\n * const g = f(3);\n * g(4); //=> 10\n */\nvar curryN = /*#__PURE__*/_curry2(function curryN(length, fn) {\n if (length === 1) {\n return _curry1(fn);\n }\n return _arity(length, _curryN(length, [], fn));\n});\nexport default curryN;","import _curry1 from \"./internal/_curry1.js\";\nimport curryN from \"./curryN.js\";\n\n/**\n * Returns a curried equivalent of the provided function. The curried function\n * has two unusual capabilities. First, its arguments needn't be provided one\n * at a time. If `f` is a ternary function and `g` is `R.curry(f)`, the\n * following are equivalent:\n *\n * - `g(1)(2)(3)`\n * - `g(1)(2, 3)`\n * - `g(1, 2)(3)`\n * - `g(1, 2, 3)`\n *\n * Secondly, the special placeholder value [`R.__`](#__) may be used to specify\n * \"gaps\", allowing partial application of any combination of arguments,\n * regardless of their positions. If `g` is as above and `_` is [`R.__`](#__),\n * the following are equivalent:\n *\n * - `g(1, 2, 3)`\n * - `g(_, 2, 3)(1)`\n * - `g(_, _, 3)(1)(2)`\n * - `g(_, _, 3)(1, 2)`\n * - `g(_, 2)(1)(3)`\n * - `g(_, 2)(1, 3)`\n * - `g(_, 2)(_, 3)(1)`\n *\n * Please note that default parameters don't count towards a [function arity](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/length)\n * and therefore `curry` won't work well with those.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig (* -> a) -> (* -> a)\n * @param {Function} fn The function to curry.\n * @return {Function} A new, curried function.\n * @see R.curryN, R.partial\n * @example\n *\n * const addFourNumbers = (a, b, c, d) => a + b + c + d;\n * const curriedAddFourNumbers = R.curry(addFourNumbers);\n * const f = curriedAddFourNumbers(1, 2);\n * const g = f(3);\n * g(4); //=> 10\n *\n * // R.curry not working well with default parameters\n * const h = R.curry((a, b, c = 2) => a + b + c);\n * h(1)(2)(7); //=> Error! (`3` is not a function!)\n */\nvar curry = /*#__PURE__*/_curry1(function curry(fn) {\n return curryN(fn.length, fn);\n});\nexport default curry;","import { curry } from 'ramda';\nexport let sep = '/';\nexport function basename(path) {\n return segments(path).pop() ?? '';\n}\nexport function dirname(path) {\n return sep + segments(path).slice(0, -1).join(sep);\n}\nexport function depth(path) {\n return segments(path).length;\n}\nexport function join(...paths) {\n return normalize(paths\n .reduce((all, path) => [...all, ...segments(path)], [])\n .join(sep));\n}\nexport function normalize(path) {\n return sep + segments(path).join(sep); // TODO '..' etc\n}\nexport function parse(path) {\n const base = basename(path);\n const dot = base.lastIndexOf('.');\n const name = dot > 0 ? base.substring(0, dot) : base;\n const ext = dot > 0 ? base.substring(dot) : '';\n const parts = segments(path);\n return {\n dir: dirname(path),\n root: (path.length && path[0] == sep) ? sep : '',\n top: parts.length ? parts[0] : '',\n base,\n name,\n ext\n };\n}\nexport function segments(path) {\n return path.split(sep).filter(part => part.length);\n}\nexport const descendantOf = curry((ancestor, path) => normalize(path).startsWith(normalize(ancestor)));\nexport const childOf = curry((parent, path) => path == parent || dirname(path) == parent);\n","export function winToUnix(path) {\n return '/' + path.replace(/\\\\/g, '/');\n}\nexport function unixToWin(path) {\n path = path.replace(/^\\//, '').replace(/\\//g, '\\\\');\n if (!path) {\n path = '\\\\';\n }\n else if (path.match(/^[a-zA-Z]:$/)) {\n path += '\\\\';\n }\n return path;\n}\n","import { basename } from './path';\nimport { curry } from 'ramda';\nfunction getLangId(languages, path, name, ext) {\n let id = languages\n .find(({ filenamePatterns }) => (filenamePatterns ?? [])\n .map(s => new RegExp(s.replace('**', '^.+').replace('*', '[^/]+')))\n .find(p => path.match(p)))?.id\n ?? languages.find(({ filenames }) => (filenames ?? []).includes(name))?.id\n ?? languages.find(({ extensions }) => (extensions ?? []).includes('.' + ext))?.id;\n if (ext && !id) {\n for (const parts = ext.split('.').slice(1); parts.length && !id; parts.shift()) {\n id = languages.find(({ extensions }) => (extensions ?? []).includes('.' + parts.join('.')))?.id;\n }\n }\n return id;\n}\nconst getFileIcon = curry((icons, path, dir) => {\n path = path.toLocaleLowerCase();\n const name = basename(path);\n if (dir != undefined) {\n return ((dir ? icons.folderNamesExpanded?.[name] : null) ??\n icons.folderNames?.[name] ??\n (dir ? icons.folderExpanded ?? icons.folder : icons.folder));\n }\n const ext = name.match(/[^.]?\\.(.+)$/)?.[1];\n const byExt = () => {\n let id;\n for (const parts = ext?.split('.') ?? []; parts.length && !id; parts.shift()) {\n id = icons.fileExtensions?.[parts.join('.')];\n }\n return id;\n };\n const langId = getLangId(icons.languages, path, name, ext);\n return (icons.fileNames?.[name]\n ?? (ext && byExt())\n ?? (langId ? icons.languageIds[langId] : undefined)\n ?? icons.file);\n});\nexport default getFileIcon;\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../node_modules/less-loader/dist/cjs/index.js!./Explorer.less\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../node_modules/less-loader/dist/cjs/index.js!./Explorer.less\";\n export default content && content.locals ? content.locals : undefined;\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../node_modules/less-loader/dist/cjs/index.js!./Breadcrumbs.less\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../node_modules/less-loader/dist/cjs/index.js!./Breadcrumbs.less\";\n export default content && content.locals ? content.locals : undefined;\n","export default function _nth(offset, list) {\n var idx = offset < 0 ? list.length + offset : offset;\n return list[idx];\n}","import _curry1 from \"./internal/_curry1.js\";\nimport _nth from \"./internal/_nth.js\";\n\n/**\n * Returns the last element of the given list or string.\n *\n * @func\n * @memberOf R\n * @since v0.1.4\n * @category List\n * @sig [a] -> a | Undefined\n * @sig String -> String | Undefined\n * @param {*} list\n * @return {*}\n * @see R.init, R.head, R.tail\n * @example\n *\n * R.last([1, 2, 3]); //=> 3\n * R.last([1]); //=> 1\n * R.last([]); //=> undefined\n *\n * R.last('abc'); //=> 'c'\n * R.last('a'); //=> 'a'\n * R.last(''); //=> undefined\n */\nvar last = /*#__PURE__*/_curry1(function (list) {\n return _nth(-1, list);\n});\nexport default last;","export var CommandID;\n(function (CommandID) {\n CommandID[\"Upload\"] = \"upload\";\n CommandID[\"MirrorLocal\"] = \"mirror-local\";\n CommandID[\"Download\"] = \"download\";\n CommandID[\"MirrorRemote\"] = \"mirror-remote\";\n CommandID[\"Delete\"] = \"delete\";\n CommandID[\"SelectAll\"] = \"select-all\";\n CommandID[\"SelectAllFiles\"] = \"select-all-files\";\n CommandID[\"NewDir\"] = \"new-dir\";\n CommandID[\"NewFile\"] = \"new-file\";\n CommandID[\"Settings\"] = \"settings\";\n CommandID[\"Connections\"] = \"connections\";\n CommandID[\"Refresh\"] = \"refresh\";\n CommandID[\"CollapseAll\"] = \"collapse-all\";\n CommandID[\"ShowFilter\"] = \"show-filter\";\n CommandID[\"GoBack\"] = \"go-back\";\n CommandID[\"GoForward\"] = \"go-forward\";\n CommandID[\"GoUp\"] = \"go-up\";\n CommandID[\"SyncBrowsing\"] = \"sync-browsing\";\n CommandID[\"MirrorSync\"] = \"mirror-sync\";\n CommandID[\"Rename\"] = \"rename\";\n CommandID[\"Duplicate\"] = \"duplicate\";\n CommandID[\"ClearContents\"] = \"clear-contents\";\n CommandID[\"Edit\"] = \"edit\";\n CommandID[\"CopyURI\"] = \"copy-uri\";\n CommandID[\"CopyPath\"] = \"copy-path\";\n CommandID[\"CopyRelativePath\"] = \"copy-relative-path\";\n CommandID[\"CopyName\"] = \"copy-name\";\n CommandID[\"CopyNameNoExt\"] = \"copy-name-no-ext\";\n CommandID[\"Paste\"] = \"paste\";\n CommandID[\"Copy\"] = \"copy\";\n CommandID[\"TriggerCopy\"] = \"trigger-copy\";\n CommandID[\"TriggerPaste\"] = \"trigger-paste\";\n})(CommandID || (CommandID = {}));\n","import { Subject } from 'rxjs';\nexport const command$ = new Subject();\n","import React, { useState, useEffect, Fragment, useRef } from \"react\";\nimport styles from './Breadcrumbs.less';\nimport { segments, join, normalize, basename } from '../../utils/path';\nimport { createURI } from '../../shared/utils/URI';\nimport { LocalFileSystemID } from \"../../shared/types\";\nimport { last } from 'ramda';\nimport { CommandID } from '../../commands';\nimport { command$ } from '../../observables/command';\nimport { Menu, ContextMenu } from '../../ui/components';\nfunction createMenu(path, connId) {\n return [\n {\n id: CommandID.CopyPath,\n label: 'Copy Path',\n click: () => command$.next({ id: CommandID.CopyPath, uri: createURI(connId, path) })\n },\n {\n id: CommandID.CopyName,\n label: 'Copy Name',\n click: () => command$.next({ id: CommandID.CopyName, uri: createURI(connId, path) })\n },\n ...(connId == LocalFileSystemID\n ? [\n {\n id: 'vscode',\n label: \"Open in VS Code\",\n click: () => { window.f5.open(createURI(LocalFileSystemID, path), 'code'); }\n },\n {\n id: 'open',\n label: 'Show in Finder',\n click: () => { window.f5.open(createURI(LocalFileSystemID, path)); },\n },\n ]\n : [])\n ];\n}\nexport default function Breadcrumbs({ icon, path, root, go, connection }) {\n const [items, setItems] = useState([]);\n const rootRef = useRef(null);\n const [menu, setMenu] = useState([]);\n useEffect(() => {\n setItems(segments(path.substring(root.length)).reduce((all, segment) => [...all, all.length ? join(last(all), segment) : normalize(segment)], []));\n }, [path, root]);\n const names = items.map((name, i) => {\n const path = normalize(root + name);\n return React.createElement(Fragment, { key: i },\n React.createElement(\"span\", { onClick: () => go(path), \"data-tooltip\": path, onContextMenuCapture: () => setMenu(createMenu(path, connection?.id ?? LocalFileSystemID)) }, basename(name)),\n i < items.length - 1 && React.createElement(\"i\", { className: 'icon' }, \"arrow_forward_ios\"));\n });\n return (React.createElement(React.Fragment, null,\n React.createElement(\"div\", { ref: rootRef, className: 'breadcrumbs ' + styles.root, onContextMenuCapture: () => setMenu([]) },\n connection ?\n React.createElement(\"em\", { onClick: () => go(root), \"data-tooltip\": root },\n React.createElement(\"i\", { className: 'connection icon' }, icon),\n React.createElement(\"span\", null, connection.name)) :\n React.createElement(\"i\", { className: 'connection icon', onClick: () => go(root), \"data-tooltip\": root }, icon),\n items.length > 0 && React.createElement(\"i\", { className: 'icon' }, \"arrow_forward_ios\"),\n names),\n rootRef.current &&\n React.createElement(ContextMenu, { target: rootRef.current }, menu.length > 0\n ? React.createElement(Menu, { items: menu })\n : React.createElement(React.Fragment, null))));\n}\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../node_modules/less-loader/dist/cjs/index.js!./Filter.less\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../node_modules/less-loader/dist/cjs/index.js!./Filter.less\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useState, useEffect, useRef } from \"react\";\nimport { Tooltips } from '../../ui/components';\nimport { filterRegExp } from '../../shared/utils/filter';\nimport styles from './Filter.less';\nexport default function Filter({ show, initial, onChange, onClose }) {\n const [value, setValue] = useState();\n const input = useRef(null);\n const [placeholder, setPlaceholder] = useState('');\n const [error, setError] = useState(false);\n useEffect(() => {\n setValue({\n text: initial?.text ?? '',\n matchCase: initial?.matchCase ?? false,\n wholeWord: initial?.wholeWord ?? false,\n useRe: initial?.useRe ?? false,\n folders: initial?.folders ?? false,\n invert: initial?.invert ?? false,\n hidden: initial?.hidden ?? false,\n temporary: initial?.temporary ?? false,\n uncommited: initial?.uncommited ?? false,\n ignored: initial?.ignored ?? false\n });\n }, [initial]);\n useEffect(() => {\n if (show) {\n input.current?.focus();\n input.current?.select();\n }\n }, [show]);\n useEffect(() => {\n setPlaceholder(value?.useRe ?\n 'Filter with JavaScript RegExp, e.g. \\\\.(png|jpe?g|gif)$ or image\\\\d{1,2}\\\\..*' :\n 'Filter with wildcards * and ?, e.g. *.png or image-?.*');\n }, [value]);\n const update = (settings) => {\n const newValue = { ...value, ...settings };\n setValue(newValue);\n input.current?.focus();\n if (newValue.text.length) {\n const re = filterRegExp(newValue);\n setError(!re);\n }\n else {\n setError(false);\n }\n onChange(newValue);\n };\n return show && value\n ? React.createElement(\"div\", { className: styles.root },\n React.createElement(\"div\", { \"data-error\": error },\n React.createElement(\"i\", { className: 'icon' }, \"filter_alt\"),\n React.createElement(Tooltips, null,\n React.createElement(\"div\", { className: styles.filter },\n React.createElement(\"div\", { className: styles.name },\n React.createElement(\"input\", { ref: input, value: value.text, placeholder: placeholder, onChange: e => update({ text: e.target.value }), onKeyDown: ({ key }) => key == 'Escape' && onClose(), autoComplete: \"off\" }),\n React.createElement(\"button\", { \"data-on\": value.matchCase, \"data-tooltip\": \"Match Case\", onClick: () => update({ matchCase: !value.matchCase }) },\n React.createElement(\"i\", { className: \"icon\" }, \"match_case\")),\n React.createElement(\"button\", { \"data-on\": value.wholeWord, \"data-tooltip\": \"Match Whole Word\", onClick: () => update({ wholeWord: !value.wholeWord }) },\n React.createElement(\"i\", { className: \"icon\" }, \"match_word\")),\n React.createElement(\"button\", { \"data-on\": value.useRe, \"data-tooltip\": \"Use JavaScript Regular Expression\", onClick: () => update({ useRe: !value.useRe }) },\n React.createElement(\"i\", { className: \"icon\" }, \"regular_expression\")),\n React.createElement(\"button\", { \"data-on\": value.folders, \"data-tooltip\": \"Include Folders\", onClick: () => update({ folders: !value.folders }) },\n React.createElement(\"i\", { className: \"icon\" }, \"folder\")),\n React.createElement(\"button\", { \"data-on\": value.invert, \"data-tooltip\": \"Invert (Exclude Matched)\", onClick: () => update({ invert: !value.invert }) },\n React.createElement(\"i\", { className: \"icon\" }, \"block\"))),\n React.createElement(\"div\", { className: styles.other },\n React.createElement(\"i\", { className: \"icon\" }, \"visibility_off\"),\n React.createElement(\"button\", { \"data-tooltip\": \"Exclude filenames beginning with .\", \"data-on\": value.hidden, onClick: () => update({ hidden: !value.hidden }) }, \".hidden\"),\n React.createElement(\"button\", { \"data-tooltip\": \"Exclude temporary, backup, lock, and swap files\", \"data-on\": value.temporary, onClick: () => update({ temporary: !value.temporary }) }, \"Temporary\"),\n React.createElement(\"div\", { className: styles.git },\n React.createElement(\"i\", { className: \"icon\" }, \"graph_1\"),\n React.createElement(\"button\", { className: \"changed\", \"data-on\": value.uncommited, \"data-tooltip\": \"Only Git Uncommitted\", onClick: () => update({ uncommited: !value.uncommited }) }, \"Uncommitted\"),\n React.createElement(\"button\", { className: \"ignored\", \"data-on\": value.ignored, \"data-tooltip\": \"Exclude Files in .gitignore\", onClick: () => update({ ignored: !value.ignored }) },\n React.createElement(\"i\", { className: \"icon\" }, \"visibility_off\"),\n \" Ignored\")))))),\n React.createElement(\"button\", { onClick: e => onClose() }, \"\\u2715\"))\n : React.createElement(React.Fragment, null);\n}\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../node_modules/less-loader/dist/cjs/index.js!./List.less\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../node_modules/less-loader/dist/cjs/index.js!./List.less\";\n export default content && content.locals ? content.locals : undefined;\n","export default function _arrayFromIterator(iter) {\n var list = [];\n var next;\n while (!(next = iter.next()).done) {\n list.push(next.value);\n }\n return list;\n}","export default function _includesWith(pred, x, list) {\n var idx = 0;\n var len = list.length;\n while (idx < len) {\n if (pred(x, list[idx])) {\n return true;\n }\n idx += 1;\n }\n return false;\n}","export default function _has(prop, obj) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}","// Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\nfunction _objectIs(a, b) {\n // SameValue algorithm\n if (a === b) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return a !== 0 || 1 / a === 1 / b;\n } else {\n // Step 6.a: NaN == NaN\n return a !== a && b !== b;\n }\n}\nexport default typeof Object.is === 'function' ? Object.is : _objectIs;","import _has from \"./_has.js\";\nvar toString = Object.prototype.toString;\nvar _isArguments = /*#__PURE__*/function () {\n return toString.call(arguments) === '[object Arguments]' ? function _isArguments(x) {\n return toString.call(x) === '[object Arguments]';\n } : function _isArguments(x) {\n return _has('callee', x);\n };\n}();\nexport default _isArguments;","import _curry1 from \"./internal/_curry1.js\";\nimport _has from \"./internal/_has.js\";\nimport _isArguments from \"./internal/_isArguments.js\";\n\n// cover IE < 9 keys issues\nvar hasEnumBug = ! /*#__PURE__*/{\n toString: null\n}.propertyIsEnumerable('toString');\nvar nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];\n// Safari bug\nvar hasArgsEnumBug = /*#__PURE__*/function () {\n 'use strict';\n\n return arguments.propertyIsEnumerable('length');\n}();\nvar contains = function contains(list, item) {\n var idx = 0;\n while (idx < list.length) {\n if (list[idx] === item) {\n return true;\n }\n idx += 1;\n }\n return false;\n};\n\n/**\n * Returns a list containing the names of all the enumerable own properties of\n * the supplied object.\n * Note that the order of the output array is not guaranteed to be consistent\n * across different JS platforms.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {k: v} -> [k]\n * @param {Object} obj The object to extract properties from\n * @return {Array} An array of the object's own properties.\n * @see R.keysIn, R.values, R.toPairs\n * @example\n *\n * R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c']\n */\nvar keys = typeof Object.keys === 'function' && !hasArgsEnumBug ? /*#__PURE__*/_curry1(function keys(obj) {\n return Object(obj) !== obj ? [] : Object.keys(obj);\n}) : /*#__PURE__*/_curry1(function keys(obj) {\n if (Object(obj) !== obj) {\n return [];\n }\n var prop, nIdx;\n var ks = [];\n var checkArgsLength = hasArgsEnumBug && _isArguments(obj);\n for (prop in obj) {\n if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) {\n ks[ks.length] = prop;\n }\n }\n if (hasEnumBug) {\n nIdx = nonEnumerableProps.length - 1;\n while (nIdx >= 0) {\n prop = nonEnumerableProps[nIdx];\n if (_has(prop, obj) && !contains(ks, prop)) {\n ks[ks.length] = prop;\n }\n nIdx -= 1;\n }\n }\n return ks;\n});\nexport default keys;","import _curry1 from \"./internal/_curry1.js\";\n\n/**\n * Gives a single-word string description of the (native) type of a value,\n * returning such answers as 'Object', 'Number', 'Array', or 'Null'. Does not\n * attempt to distinguish user Object types any further, reporting them all as\n * 'Object'.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Type\n * @sig * -> String\n * @param {*} val The value to test\n * @return {String}\n * @example\n *\n * R.type({}); //=> \"Object\"\n * R.type(new Map); //=> \"Map\"\n * R.type(new Set); //=> \"Set\"\n * R.type(1); //=> \"Number\"\n * R.type(false); //=> \"Boolean\"\n * R.type('s'); //=> \"String\"\n * R.type(null); //=> \"Null\"\n * R.type([]); //=> \"Array\"\n * R.type(/[A-z]/); //=> \"RegExp\"\n * R.type(() => {}); //=> \"Function\"\n * R.type(async () => {}); //=> \"AsyncFunction\"\n * R.type(undefined); //=> \"Undefined\"\n * R.type(BigInt(123)); //=> \"BigInt\"\n */\nvar type = /*#__PURE__*/_curry1(function type(val) {\n return val === null ? 'Null' : val === undefined ? 'Undefined' : Object.prototype.toString.call(val).slice(8, -1);\n});\nexport default type;","import _arrayFromIterator from \"./_arrayFromIterator.js\";\nimport _includesWith from \"./_includesWith.js\";\nimport _functionName from \"./_functionName.js\";\nimport _has from \"./_has.js\";\nimport _objectIs from \"./_objectIs.js\";\nimport keys from \"../keys.js\";\nimport type from \"../type.js\";\n\n/**\n * private _uniqContentEquals function.\n * That function is checking equality of 2 iterator contents with 2 assumptions\n * - iterators lengths are the same\n * - iterators values are unique\n *\n * false-positive result will be returned for comparison of, e.g.\n * - [1,2,3] and [1,2,3,4]\n * - [1,1,1] and [1,2,3]\n * */\n\nfunction _uniqContentEquals(aIterator, bIterator, stackA, stackB) {\n var a = _arrayFromIterator(aIterator);\n var b = _arrayFromIterator(bIterator);\n function eq(_a, _b) {\n return _equals(_a, _b, stackA.slice(), stackB.slice());\n }\n\n // if *a* array contains any element that is not included in *b*\n return !_includesWith(function (b, aItem) {\n return !_includesWith(eq, aItem, b);\n }, b, a);\n}\nexport default function _equals(a, b, stackA, stackB) {\n if (_objectIs(a, b)) {\n return true;\n }\n var typeA = type(a);\n if (typeA !== type(b)) {\n return false;\n }\n if (typeof a['fantasy-land/equals'] === 'function' || typeof b['fantasy-land/equals'] === 'function') {\n return typeof a['fantasy-land/equals'] === 'function' && a['fantasy-land/equals'](b) && typeof b['fantasy-land/equals'] === 'function' && b['fantasy-land/equals'](a);\n }\n if (typeof a.equals === 'function' || typeof b.equals === 'function') {\n return typeof a.equals === 'function' && a.equals(b) && typeof b.equals === 'function' && b.equals(a);\n }\n switch (typeA) {\n case 'Arguments':\n case 'Array':\n case 'Object':\n if (typeof a.constructor === 'function' && _functionName(a.constructor) === 'Promise') {\n return a === b;\n }\n break;\n case 'Boolean':\n case 'Number':\n case 'String':\n if (!(typeof a === typeof b && _objectIs(a.valueOf(), b.valueOf()))) {\n return false;\n }\n break;\n case 'Date':\n if (!_objectIs(a.valueOf(), b.valueOf())) {\n return false;\n }\n break;\n case 'Error':\n return a.name === b.name && a.message === b.message;\n case 'RegExp':\n if (!(a.source === b.source && a.global === b.global && a.ignoreCase === b.ignoreCase && a.multiline === b.multiline && a.sticky === b.sticky && a.unicode === b.unicode)) {\n return false;\n }\n break;\n }\n var idx = stackA.length - 1;\n while (idx >= 0) {\n if (stackA[idx] === a) {\n return stackB[idx] === b;\n }\n idx -= 1;\n }\n switch (typeA) {\n case 'Map':\n if (a.size !== b.size) {\n return false;\n }\n return _uniqContentEquals(a.entries(), b.entries(), stackA.concat([a]), stackB.concat([b]));\n case 'Set':\n if (a.size !== b.size) {\n return false;\n }\n return _uniqContentEquals(a.values(), b.values(), stackA.concat([a]), stackB.concat([b]));\n case 'Arguments':\n case 'Array':\n case 'Object':\n case 'Boolean':\n case 'Number':\n case 'String':\n case 'Date':\n case 'Error':\n case 'RegExp':\n case 'Int8Array':\n case 'Uint8Array':\n case 'Uint8ClampedArray':\n case 'Int16Array':\n case 'Uint16Array':\n case 'Int32Array':\n case 'Uint32Array':\n case 'Float32Array':\n case 'Float64Array':\n case 'ArrayBuffer':\n break;\n default:\n // Values of other types are only equal if identical.\n return false;\n }\n var keysA = keys(a);\n if (keysA.length !== keys(b).length) {\n return false;\n }\n var extendedStackA = stackA.concat([a]);\n var extendedStackB = stackB.concat([b]);\n idx = keysA.length - 1;\n while (idx >= 0) {\n var key = keysA[idx];\n if (!(_has(key, b) && _equals(b[key], a[key], extendedStackA, extendedStackB))) {\n return false;\n }\n idx -= 1;\n }\n return true;\n}","export default function _functionName(f) {\n // String(x => x) evaluates to \"x => x\", so the pattern may not match.\n var match = String(f).match(/^function (\\w*)/);\n return match == null ? '' : match[1];\n}","import _curry2 from \"./internal/_curry2.js\";\nimport _equals from \"./internal/_equals.js\";\n\n/**\n * Returns `true` if its arguments are equivalent, `false` otherwise. Handles\n * cyclical data structures.\n *\n * Dispatches symmetrically to the `equals` methods of both arguments, if\n * present.\n *\n * @func\n * @memberOf R\n * @since v0.15.0\n * @category Relation\n * @sig a -> b -> Boolean\n * @param {*} a\n * @param {*} b\n * @return {Boolean}\n * @example\n *\n * R.equals(1, 1); //=> true\n * R.equals(1, '1'); //=> false\n * R.equals([1, 2, 3], [1, 2, 3]); //=> true\n *\n * const a = {}; a.v = a;\n * const b = {}; b.v = b;\n * R.equals(a, b); //=> true\n */\nvar equals = /*#__PURE__*/_curry2(function equals(a, b) {\n return _equals(a, b, [], []);\n});\nexport default equals;","/**\n * Tests whether or not an object is an array.\n *\n * @private\n * @param {*} val The object to test.\n * @return {Boolean} `true` if `val` is an array, `false` otherwise.\n * @example\n *\n * _isArray([]); //=> true\n * _isArray(null); //=> false\n * _isArray({}); //=> false\n */\nexport default Array.isArray || function _isArray(val) {\n return val != null && val.length >= 0 && Object.prototype.toString.call(val) === '[object Array]';\n};","import _isArray from \"./_isArray.js\";\nimport _isTransformer from \"./_isTransformer.js\";\n\n/**\n * Returns a function that dispatches with different strategies based on the\n * object in list position (last argument). If it is an array, executes [fn].\n * Otherwise, if it has a function with one of the given method names, it will\n * execute that function (functor case). Otherwise, if it is a transformer,\n * uses transducer created by [transducerCreator] to return a new transformer\n * (transducer case).\n * Otherwise, it will default to executing [fn].\n *\n * @private\n * @param {Array} methodNames properties to check for a custom implementation\n * @param {Function} transducerCreator transducer factory if object is transformer\n * @param {Function} fn default ramda implementation\n * @return {Function} A function that dispatches on object in list position\n */\nexport default function _dispatchable(methodNames, transducerCreator, fn) {\n return function () {\n if (arguments.length === 0) {\n return fn();\n }\n var obj = arguments[arguments.length - 1];\n if (!_isArray(obj)) {\n var idx = 0;\n while (idx < methodNames.length) {\n if (typeof obj[methodNames[idx]] === 'function') {\n return obj[methodNames[idx]].apply(obj, Array.prototype.slice.call(arguments, 0, -1));\n }\n idx += 1;\n }\n if (_isTransformer(obj)) {\n var transducer = transducerCreator.apply(null, Array.prototype.slice.call(arguments, 0, -1));\n return transducer(obj);\n }\n }\n return fn.apply(this, arguments);\n };\n}","export default function _isTransformer(obj) {\n return obj != null && typeof obj['@@transducer/step'] === 'function';\n}","export default {\n init: function () {\n return this.xf['@@transducer/init']();\n },\n result: function (result) {\n return this.xf['@@transducer/result'](result);\n }\n};","import _reduced from \"./_reduced.js\";\nimport _xfBase from \"./_xfBase.js\";\nvar XTake = /*#__PURE__*/function () {\n function XTake(n, xf) {\n this.xf = xf;\n this.n = n;\n this.i = 0;\n }\n XTake.prototype['@@transducer/init'] = _xfBase.init;\n XTake.prototype['@@transducer/result'] = _xfBase.result;\n XTake.prototype['@@transducer/step'] = function (result, input) {\n this.i += 1;\n var ret = this.n === 0 ? result : this.xf['@@transducer/step'](result, input);\n return this.n >= 0 && this.i >= this.n ? _reduced(ret) : ret;\n };\n return XTake;\n}();\nexport default function _xtake(n) {\n return function (xf) {\n return new XTake(n, xf);\n };\n}","export default function _reduced(x) {\n return x && x['@@transducer/reduced'] ? x : {\n '@@transducer/value': x,\n '@@transducer/reduced': true\n };\n}","import _isArray from \"./_isArray.js\";\n\n/**\n * This checks whether a function has a [methodname] function. If it isn't an\n * array it will execute that function otherwise it will default to the ramda\n * implementation.\n *\n * @private\n * @param {Function} fn ramda implementation\n * @param {String} methodname property to check for a custom implementation\n * @return {Object} Whatever the return value of the method is.\n */\nexport default function _checkForMethod(methodname, fn) {\n return function () {\n var length = arguments.length;\n if (length === 0) {\n return fn();\n }\n var obj = arguments[length - 1];\n return _isArray(obj) || typeof obj[methodname] !== 'function' ? fn.apply(this, arguments) : obj[methodname].apply(obj, Array.prototype.slice.call(arguments, 0, length - 1));\n };\n}","import _curry1 from \"./_curry1.js\";\nimport _curry2 from \"./_curry2.js\";\nimport _isPlaceholder from \"./_isPlaceholder.js\";\n\n/**\n * Optimized internal three-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\nexport default function _curry3(fn) {\n return function f3(a, b, c) {\n switch (arguments.length) {\n case 0:\n return f3;\n case 1:\n return _isPlaceholder(a) ? f3 : _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n });\n case 2:\n return _isPlaceholder(a) && _isPlaceholder(b) ? f3 : _isPlaceholder(a) ? _curry2(function (_a, _c) {\n return fn(_a, b, _c);\n }) : _isPlaceholder(b) ? _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n }) : _curry1(function (_c) {\n return fn(a, b, _c);\n });\n default:\n return _isPlaceholder(a) && _isPlaceholder(b) && _isPlaceholder(c) ? f3 : _isPlaceholder(a) && _isPlaceholder(b) ? _curry2(function (_a, _b) {\n return fn(_a, _b, c);\n }) : _isPlaceholder(a) && _isPlaceholder(c) ? _curry2(function (_a, _c) {\n return fn(_a, b, _c);\n }) : _isPlaceholder(b) && _isPlaceholder(c) ? _curry2(function (_b, _c) {\n return fn(a, _b, _c);\n }) : _isPlaceholder(a) ? _curry1(function (_a) {\n return fn(_a, b, c);\n }) : _isPlaceholder(b) ? _curry1(function (_b) {\n return fn(a, _b, c);\n }) : _isPlaceholder(c) ? _curry1(function (_c) {\n return fn(a, b, _c);\n }) : fn(a, b, c);\n }\n };\n}","import _checkForMethod from \"./internal/_checkForMethod.js\";\nimport _curry3 from \"./internal/_curry3.js\";\n\n/**\n * Returns the elements of the given list or string (or object with a `slice`\n * method) from `fromIndex` (inclusive) to `toIndex` (exclusive).\n *\n * Dispatches to the `slice` method of the third argument, if present.\n *\n * @func\n * @memberOf R\n * @since v0.1.4\n * @category List\n * @sig Number -> Number -> [a] -> [a]\n * @sig Number -> Number -> String -> String\n * @param {Number} fromIndex The start index (inclusive).\n * @param {Number} toIndex The end index (exclusive).\n * @param {*} list\n * @return {*}\n * @example\n *\n * R.slice(1, 3, ['a', 'b', 'c', 'd']); //=> ['b', 'c']\n * R.slice(1, Infinity, ['a', 'b', 'c', 'd']); //=> ['b', 'c', 'd']\n * R.slice(0, -1, ['a', 'b', 'c', 'd']); //=> ['a', 'b', 'c']\n * R.slice(-3, -1, ['a', 'b', 'c', 'd']); //=> ['b', 'c']\n * R.slice(0, 3, 'ramda'); //=> 'ram'\n */\nvar slice = /*#__PURE__*/_curry3( /*#__PURE__*/_checkForMethod('slice', function slice(fromIndex, toIndex, list) {\n return Array.prototype.slice.call(list, fromIndex, toIndex);\n}));\nexport default slice;","import _curry2 from \"./internal/_curry2.js\";\nimport _dispatchable from \"./internal/_dispatchable.js\";\nimport _xtake from \"./internal/_xtake.js\";\nimport slice from \"./slice.js\";\n\n/**\n * Returns the first `n` elements of the given list, string, or\n * transducer/transformer (or object with a `take` method).\n *\n * Dispatches to the `take` method of the second argument, if present.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Number -> [a] -> [a]\n * @sig Number -> String -> String\n * @param {Number} n\n * @param {*} list\n * @return {*}\n * @see R.drop\n * @example\n *\n * R.take(1, ['foo', 'bar', 'baz']); //=> ['foo']\n * R.take(2, ['foo', 'bar', 'baz']); //=> ['foo', 'bar']\n * R.take(3, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz']\n * R.take(4, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz']\n * R.take(3, 'ramda'); //=> 'ram'\n *\n * const personnel = [\n * 'Dave Brubeck',\n * 'Paul Desmond',\n * 'Eugene Wright',\n * 'Joe Morello',\n * 'Gerry Mulligan',\n * 'Bob Bates',\n * 'Joe Dodge',\n * 'Ron Crotty'\n * ];\n *\n * const takeFive = R.take(5);\n * takeFive(personnel);\n * //=> ['Dave Brubeck', 'Paul Desmond', 'Eugene Wright', 'Joe Morello', 'Gerry Mulligan']\n * @symb R.take(-1, [a, b]) = [a, b]\n * @symb R.take(0, [a, b]) = []\n * @symb R.take(1, [a, b]) = [a]\n * @symb R.take(2, [a, b]) = [a, b]\n */\nvar take = /*#__PURE__*/_curry2( /*#__PURE__*/_dispatchable(['take'], _xtake, function take(n, xs) {\n return slice(0, n < 0 ? Infinity : n, xs);\n}));\nexport default take;","import _curry2 from \"./internal/_curry2.js\";\nimport equals from \"./equals.js\";\nimport take from \"./take.js\";\n\n/**\n * Checks if a list starts with the provided sublist.\n *\n * Similarly, checks if a string starts with the provided substring.\n *\n * @func\n * @memberOf R\n * @since v0.24.0\n * @category List\n * @sig [a] -> [a] -> Boolean\n * @sig String -> String -> Boolean\n * @param {*} prefix\n * @param {*} list\n * @return {Boolean}\n * @see R.endsWith\n * @example\n *\n * R.startsWith('a', 'abc') //=> true\n * R.startsWith('b', 'abc') //=> false\n * R.startsWith(['a'], ['a', 'b', 'c']) //=> true\n * R.startsWith(['b'], ['a', 'b', 'c']) //=> false\n */\nvar startsWith = /*#__PURE__*/_curry2(function (prefix, list) {\n return equals(take(prefix.length, list), prefix);\n});\nexport default startsWith;","export default function _arrayReduce(reducer, acc, list) {\n var index = 0;\n var length = list.length;\n while (index < length) {\n acc = reducer(acc, list[index]);\n index += 1;\n }\n return acc;\n}","export default function _map(fn, functor) {\n var idx = 0;\n var len = functor.length;\n var result = Array(len);\n while (idx < len) {\n result[idx] = fn(functor[idx]);\n idx += 1;\n }\n return result;\n}","import _xfBase from \"./_xfBase.js\";\nvar XMap = /*#__PURE__*/function () {\n function XMap(f, xf) {\n this.xf = xf;\n this.f = f;\n }\n XMap.prototype['@@transducer/init'] = _xfBase.init;\n XMap.prototype['@@transducer/result'] = _xfBase.result;\n XMap.prototype['@@transducer/step'] = function (result, input) {\n return this.xf['@@transducer/step'](result, this.f(input));\n };\n return XMap;\n}();\nvar _xmap = function _xmap(f) {\n return function (xf) {\n return new XMap(f, xf);\n };\n};\nexport default _xmap;","import _arrayReduce from \"./internal/_arrayReduce.js\";\nimport _curry2 from \"./internal/_curry2.js\";\nimport _dispatchable from \"./internal/_dispatchable.js\";\nimport _map from \"./internal/_map.js\";\nimport _xmap from \"./internal/_xmap.js\";\nimport curryN from \"./curryN.js\";\nimport keys from \"./keys.js\";\n\n/**\n * Takes a function and\n * a [functor](https://github.com/fantasyland/fantasy-land#functor),\n * applies the function to each of the functor's values, and returns\n * a functor of the same shape.\n *\n * Ramda provides suitable `map` implementations for `Array` and `Object`,\n * so this function may be applied to `[1, 2, 3]` or `{x: 1, y: 2, z: 3}`.\n *\n * Dispatches to the `map` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * Also treats functions as functors and will compose them together.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Functor f => (a -> b) -> f a -> f b\n * @param {Function} fn The function to be called on every element of the input `list`.\n * @param {Array} list The list to be iterated over.\n * @return {Array} The new list.\n * @see R.transduce, R.addIndex, R.pluck, R.project\n * @example\n *\n * const double = x => x * 2;\n *\n * R.map(double, [1, 2, 3]); //=> [2, 4, 6]\n *\n * R.map(double, {x: 1, y: 2, z: 3}); //=> {x: 2, y: 4, z: 6}\n * @symb R.map(f, [a, b]) = [f(a), f(b)]\n * @symb R.map(f, { x: a, y: b }) = { x: f(a), y: f(b) }\n * @symb R.map(f, functor_o) = functor_o.map(f)\n */\nvar map = /*#__PURE__*/_curry2( /*#__PURE__*/_dispatchable(['fantasy-land/map', 'map'], _xmap, function map(fn, functor) {\n switch (Object.prototype.toString.call(functor)) {\n case '[object Function]':\n return curryN(functor.length, function () {\n return fn.call(this, functor.apply(this, arguments));\n });\n case '[object Object]':\n return _arrayReduce(function (acc, key) {\n acc[key] = fn(functor[key]);\n return acc;\n }, {}, keys(functor));\n default:\n return _map(fn, functor);\n }\n}));\nexport default map;","import _curry2 from \"./internal/_curry2.js\";\nimport _has from \"./internal/_has.js\";\n\n/**\n * Takes a spec object and a test object; returns true if the test satisfies\n * the spec. Each of the spec's own properties must be a predicate function.\n * Each predicate is applied to the value of the corresponding property of the\n * test object. `where` returns true if all the predicates return true, false\n * otherwise.\n *\n * `where` is well suited to declaratively expressing constraints for other\n * functions such as [`filter`](#filter) and [`find`](#find).\n *\n * @func\n * @memberOf R\n * @since v0.1.1\n * @category Object\n * @sig {String: (* -> Boolean)} -> {String: *} -> Boolean\n * @param {Object} spec\n * @param {Object} testObj\n * @return {Boolean}\n * @see R.propSatisfies, R.whereEq\n * @example\n *\n * // pred :: Object -> Boolean\n * const pred = R.where({\n * a: R.equals('foo'),\n * b: R.complement(R.equals('bar')),\n * x: R.gt(R.__, 10),\n * y: R.lt(R.__, 20)\n * });\n *\n * pred({a: 'foo', b: 'xxx', x: 11, y: 19}); //=> true\n * pred({a: 'xxx', b: 'xxx', x: 11, y: 19}); //=> false\n * pred({a: 'foo', b: 'bar', x: 11, y: 19}); //=> false\n * pred({a: 'foo', b: 'xxx', x: 10, y: 19}); //=> false\n * pred({a: 'foo', b: 'xxx', x: 11, y: 20}); //=> false\n */\nvar where = /*#__PURE__*/_curry2(function where(spec, testObj) {\n for (var prop in spec) {\n if (_has(prop, spec) && !spec[prop](testObj[prop])) {\n return false;\n }\n }\n return true;\n});\nexport default where;","import _curry2 from \"./internal/_curry2.js\";\nimport equals from \"./equals.js\";\nimport map from \"./map.js\";\nimport where from \"./where.js\";\n\n/**\n * Takes a spec object and a test object; returns true if the test satisfies\n * the spec, false otherwise. An object satisfies the spec if, for each of the\n * spec's own properties, accessing that property of the object gives the same\n * value (in [`R.equals`](#equals) terms) as accessing that property of the\n * spec.\n *\n * `whereEq` is a specialization of [`where`](#where).\n *\n * @func\n * @memberOf R\n * @since v0.14.0\n * @category Object\n * @sig {String: *} -> {String: *} -> Boolean\n * @param {Object} spec\n * @param {Object} testObj\n * @return {Boolean}\n * @see R.propEq, R.where\n * @example\n *\n * // pred :: Object -> Boolean\n * const pred = R.whereEq({a: 1, b: 2});\n *\n * pred({a: 1}); //=> false\n * pred({a: 1, b: 2}); //=> true\n * pred({a: 1, b: 2, c: 3}); //=> true\n * pred({a: 1, b: 1}); //=> false\n */\nvar whereEq = /*#__PURE__*/_curry2(function whereEq(spec, testObj) {\n return where(map(equals, spec), testObj);\n});\nexport default whereEq;","import _indexOf from \"./_indexOf.js\";\nexport default function _includes(a, list) {\n return _indexOf(list, a, 0) >= 0;\n}","import equals from \"../equals.js\";\nexport default function _indexOf(list, a, idx) {\n var inf, item;\n // Array.prototype.indexOf doesn't exist below IE9\n if (typeof list.indexOf === 'function') {\n switch (typeof a) {\n case 'number':\n if (a === 0) {\n // manually crawl the list to distinguish between +0 and -0\n inf = 1 / a;\n while (idx < list.length) {\n item = list[idx];\n if (item === 0 && 1 / item === inf) {\n return idx;\n }\n idx += 1;\n }\n return -1;\n } else if (a !== a) {\n // NaN\n while (idx < list.length) {\n item = list[idx];\n if (typeof item === 'number' && item !== item) {\n return idx;\n }\n idx += 1;\n }\n return -1;\n }\n // non-zero numbers can utilise Set\n return list.indexOf(a, idx);\n\n // all these types can utilise Set\n case 'string':\n case 'boolean':\n case 'function':\n case 'undefined':\n return list.indexOf(a, idx);\n case 'object':\n if (a === null) {\n // null can utilise Set\n return list.indexOf(a, idx);\n }\n }\n }\n // anything else not covered above, defer to R.equals\n while (idx < list.length) {\n if (equals(list[idx], a)) {\n return idx;\n }\n idx += 1;\n }\n return -1;\n}","import _includes from \"./internal/_includes.js\";\nimport _curry2 from \"./internal/_curry2.js\";\n\n/**\n * Returns `true` if the specified value is equal, in [`R.equals`](#equals)\n * terms, to at least one element of the given list; `false` otherwise.\n * Also works with strings.\n *\n * @func\n * @memberOf R\n * @since v0.26.0\n * @category List\n * @sig a -> [a] -> Boolean\n * @param {Object} a The item to compare against.\n * @param {Array} list The array to consider.\n * @return {Boolean} `true` if an equivalent item is in the list, `false` otherwise.\n * @see R.any\n * @example\n *\n * R.includes(3, [1, 2, 3]); //=> true\n * R.includes(4, [1, 2, 3]); //=> false\n * R.includes({ name: 'Fred' }, [{ name: 'Fred' }]); //=> true\n * R.includes([42], [[42]]); //=> true\n * R.includes('ba', 'banana'); //=>true\n */\nvar includes = /*#__PURE__*/_curry2(_includes);\nexport default includes;","/**\n * A special placeholder value used to specify \"gaps\" within curried functions,\n * allowing partial application of any combination of arguments, regardless of\n * their positions.\n *\n * If `g` is a curried ternary function and `_` is `R.__`, the following are\n * equivalent:\n *\n * - `g(1, 2, 3)`\n * - `g(_, 2, 3)(1)`\n * - `g(_, _, 3)(1)(2)`\n * - `g(_, _, 3)(1, 2)`\n * - `g(_, 2, _)(1, 3)`\n * - `g(_, 2)(1)(3)`\n * - `g(_, 2)(1, 3)`\n * - `g(_, 2)(_, 3)(1)`\n *\n * @name __\n * @constant\n * @memberOf R\n * @since v0.6.0\n * @category Function\n * @example\n *\n * const greet = R.replace('{name}', R.__, 'Hello, {name}!');\n * greet('Alice'); //=> 'Hello, Alice!'\n */\nexport default {\n '@@functional/placeholder': true\n};","/**\n * Determine if the passed argument is an integer.\n *\n * @private\n * @param {*} n\n * @category Type\n * @return {Boolean}\n */\nexport default Number.isInteger || function _isInteger(n) {\n return n << 0 === n;\n};","import _curry2 from \"./internal/_curry2.js\";\nimport _prop from \"./internal/_prop.js\";\n\n/**\n * Returns a function that when supplied an object returns the indicated\n * property of that object, if it exists.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @typedefn Idx = String | Int | Symbol\n * @sig Idx -> {s: a} -> a | Undefined\n * @param {String|Number} p The property name or array index\n * @param {Object} obj The object to query\n * @return {*} The value at `obj.p`.\n * @see R.path, R.props, R.pluck, R.project, R.nth\n * @example\n *\n * R.prop('x', {x: 100}); //=> 100\n * R.prop('x', {}); //=> undefined\n * R.prop(0, [100]); //=> 100\n * R.compose(R.inc, R.prop('x'))({ x: 3 }) //=> 4\n */\n\nvar prop = /*#__PURE__*/_curry2(_prop);\nexport default prop;","import _isInteger from \"./_isInteger.js\";\nimport _nth from \"./_nth.js\";\nfunction _prop(p, obj) {\n if (obj == null) {\n return;\n }\n return _isInteger(p) ? _nth(p, obj) : obj[p];\n}\nexport default _prop;","import _includes from \"./_includes.js\";\nvar _Set = /*#__PURE__*/function () {\n function _Set() {\n /* globals Set */\n this._nativeSet = typeof Set === 'function' ? new Set() : null;\n this._items = {};\n }\n // until we figure out why jsdoc chokes on this\n // @param item The item to add to the Set\n // @returns {boolean} true if the item did not exist prior, otherwise false\n //\n _Set.prototype.add = function (item) {\n return !hasOrAdd(item, true, this);\n };\n\n //\n // @param item The item to check for existence in the Set\n // @returns {boolean} true if the item exists in the Set, otherwise false\n //\n _Set.prototype.has = function (item) {\n return hasOrAdd(item, false, this);\n };\n\n //\n // Combines the logic for checking whether an item is a member of the set and\n // for adding a new item to the set.\n //\n // @param item The item to check or add to the Set instance.\n // @param shouldAdd If true, the item will be added to the set if it doesn't\n // already exist.\n // @param set The set instance to check or add to.\n // @return {boolean} true if the item already existed, otherwise false.\n //\n return _Set;\n}();\nfunction hasOrAdd(item, shouldAdd, set) {\n var type = typeof item;\n var prevSize, newSize;\n switch (type) {\n case 'string':\n case 'number':\n // distinguish between +0 and -0\n if (item === 0 && 1 / item === -Infinity) {\n if (set._items['-0']) {\n return true;\n } else {\n if (shouldAdd) {\n set._items['-0'] = true;\n }\n return false;\n }\n }\n // these types can all utilise the native Set\n if (set._nativeSet !== null) {\n if (shouldAdd) {\n prevSize = set._nativeSet.size;\n set._nativeSet.add(item);\n newSize = set._nativeSet.size;\n return newSize === prevSize;\n } else {\n return set._nativeSet.has(item);\n }\n } else {\n if (!(type in set._items)) {\n if (shouldAdd) {\n set._items[type] = {};\n set._items[type][item] = true;\n }\n return false;\n } else if (item in set._items[type]) {\n return true;\n } else {\n if (shouldAdd) {\n set._items[type][item] = true;\n }\n return false;\n }\n }\n case 'boolean':\n // set._items['boolean'] holds a two element array\n // representing [ falseExists, trueExists ]\n if (type in set._items) {\n var bIdx = item ? 1 : 0;\n if (set._items[type][bIdx]) {\n return true;\n } else {\n if (shouldAdd) {\n set._items[type][bIdx] = true;\n }\n return false;\n }\n } else {\n if (shouldAdd) {\n set._items[type] = item ? [false, true] : [true, false];\n }\n return false;\n }\n case 'function':\n // compare functions for reference equality\n if (set._nativeSet !== null) {\n if (shouldAdd) {\n prevSize = set._nativeSet.size;\n set._nativeSet.add(item);\n newSize = set._nativeSet.size;\n return newSize === prevSize;\n } else {\n return set._nativeSet.has(item);\n }\n } else {\n if (!(type in set._items)) {\n if (shouldAdd) {\n set._items[type] = [item];\n }\n return false;\n }\n if (!_includes(item, set._items[type])) {\n if (shouldAdd) {\n set._items[type].push(item);\n }\n return false;\n }\n return true;\n }\n case 'undefined':\n if (set._items[type]) {\n return true;\n } else {\n if (shouldAdd) {\n set._items[type] = true;\n }\n return false;\n }\n case 'object':\n if (item === null) {\n if (!set._items['null']) {\n if (shouldAdd) {\n set._items['null'] = true;\n }\n return false;\n }\n return true;\n }\n /* falls through */\n default:\n // reduce the search size of heterogeneous sets by creating buckets\n // for each type.\n type = Object.prototype.toString.call(item);\n if (!(type in set._items)) {\n if (shouldAdd) {\n set._items[type] = [item];\n }\n return false;\n }\n // scan through all previously applied items\n if (!_includes(item, set._items[type])) {\n if (shouldAdd) {\n set._items[type].push(item);\n }\n return false;\n }\n return true;\n }\n}\n\n// A simple Set type that honours R.equals semantics\nexport default _Set;","export default function _isObject(x) {\n return Object.prototype.toString.call(x) === '[object Object]';\n}","import _xfBase from \"./_xfBase.js\";\nvar XFilter = /*#__PURE__*/function () {\n function XFilter(f, xf) {\n this.xf = xf;\n this.f = f;\n }\n XFilter.prototype['@@transducer/init'] = _xfBase.init;\n XFilter.prototype['@@transducer/result'] = _xfBase.result;\n XFilter.prototype['@@transducer/step'] = function (result, input) {\n return this.f(input) ? this.xf['@@transducer/step'](result, input) : result;\n };\n return XFilter;\n}();\nexport default function _xfilter(f) {\n return function (xf) {\n return new XFilter(f, xf);\n };\n}","import _arrayReduce from \"./internal/_arrayReduce.js\";\nimport _curry2 from \"./internal/_curry2.js\";\nimport _dispatchable from \"./internal/_dispatchable.js\";\nimport _filter from \"./internal/_filter.js\";\nimport _filterMap from \"./internal/_filterMap.js\";\nimport _isMap from \"./internal/_isMap.js\";\nimport _isObject from \"./internal/_isObject.js\";\nimport _xfilter from \"./internal/_xfilter.js\";\nimport keys from \"./keys.js\";\n\n/**\n * Takes a predicate and a `Filterable`, and returns a new filterable of the\n * same type containing the members of the given filterable which satisfy the\n * given predicate. Filterable objects include plain objects, Maps, or any object\n * that has a filter method such as `Array`.\n *\n * Dispatches to the `filter` method of the second argument, if present.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @category Object\n * @sig Filterable f => (a -> Boolean) -> f a -> f a\n * @param {Function} pred\n * @param {Array} filterable\n * @return {Array} Filterable\n * @see R.reject, R.transduce, R.addIndex\n * @example\n *\n * const isEven = n => n % 2 === 0;\n *\n * R.filter(isEven, [1, 2, 3, 4]); //=> [2, 4]\n *\n * R.filter(isEven, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4}\n */\nvar filter = /*#__PURE__*/_curry2( /*#__PURE__*/_dispatchable(['fantasy-land/filter', 'filter'], _xfilter, function (pred, filterable) {\n return _isObject(filterable) ? _arrayReduce(function (acc, key) {\n if (pred(filterable[key])) {\n acc[key] = filterable[key];\n }\n return acc;\n }, {}, keys(filterable)) : _isMap(filterable) ? _filterMap(pred, filterable) :\n // else\n _filter(pred, filterable);\n}));\nexport default filter;","export default function _isMap(x) {\n return Object.prototype.toString.call(x) === '[object Map]';\n}","export default function _filterMap(fn, map) {\n var result = new Map();\n var iterator = map.entries();\n var current = iterator.next();\n while (!current.done) {\n if (fn(current.value[1])) {\n result.set(current.value[0], current.value[1]);\n }\n current = iterator.next();\n }\n return result;\n}","export default function _filter(fn, list) {\n var idx = 0;\n var len = list.length;\n var result = [];\n while (idx < len) {\n if (fn(list[idx])) {\n result[result.length] = list[idx];\n }\n idx += 1;\n }\n return result;\n}","import _complement from \"./internal/_complement.js\";\nimport _curry2 from \"./internal/_curry2.js\";\nimport filter from \"./filter.js\";\n\n/**\n * The complement of [`filter`](#filter).\n *\n * Acts as a transducer if a transformer is given in list position. Filterable\n * objects include plain objects or any object that has a filter method such\n * as `Array`.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Filterable f => (a -> Boolean) -> f a -> f a\n * @param {Function} pred\n * @param {Array} filterable\n * @return {Array}\n * @see R.filter, R.transduce, R.addIndex\n * @example\n *\n * const isOdd = (n) => n % 2 !== 0;\n *\n * R.reject(isOdd, [1, 2, 3, 4]); //=> [2, 4]\n *\n * R.reject(isOdd, {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, d: 4}\n */\nvar reject = /*#__PURE__*/_curry2(function reject(pred, filterable) {\n return filter(_complement(pred), filterable);\n});\nexport default reject;","export default function _complement(f) {\n return function () {\n return !f.apply(this, arguments);\n };\n}","import _curry2 from \"./internal/_curry2.js\";\nimport _Set from \"./internal/_Set.js\";\nimport reject from \"./reject.js\";\n\n/**\n * Returns a new list without values in the first argument.\n * [`R.equals`](#equals) is used to determine equality.\n *\n * Acts as a transducer if a transformer is given in list position.\n *\n * @func\n * @memberOf R\n * @since v0.19.0\n * @category List\n * @sig [a] -> [a] -> [a]\n * @param {Array} list1 The values to be removed from `list2`.\n * @param {Array} list2 The array to remove values from.\n * @return {Array} The new array without values in `list1`.\n * @see R.transduce, R.difference, R.remove\n * @example\n *\n * R.without([1, 2], [1, 2, 1, 3, 4]); //=> [3, 4]\n */\nvar without = /*#__PURE__*/_curry2(function without(xs, list) {\n var toRemove = new _Set();\n for (var i = 0; i < xs.length; i += 1) {\n toRemove.add(xs[i]);\n }\n return reject(toRemove.has.bind(toRemove), list);\n});\nexport default without;","import _curry3 from \"./internal/_curry3.js\";\nimport prop from \"./prop.js\";\nimport equals from \"./equals.js\";\n\n/**\n * Returns `true` if the specified object property is equal, in\n * [`R.equals`](#equals) terms, to the given value; `false` otherwise.\n * You can test multiple properties with [`R.whereEq`](#whereEq),\n * and test nested path property with [`R.pathEq`](#pathEq).\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig a -> String -> Object -> Boolean\n * @param {*} val The value to compare the property with\n * @param {String} name the specified object property's key\n * @param {*} obj The object to check the property in\n * @return {Boolean} `true` if the value equals the specified object property,\n * `false` otherwise.\n * @see R.whereEq, R.pathEq, R.propSatisfies, R.equals\n * @example\n *\n * const abby = {name: 'Abby', age: 7, hair: 'blond'};\n * const fred = {name: 'Fred', age: 12, hair: 'brown'};\n * const rusty = {name: 'Rusty', age: 10, hair: 'brown'};\n * const alois = {name: 'Alois', age: 15, disposition: 'surly'};\n * const kids = [abby, fred, rusty, alois];\n * const hasBrownHair = R.propEq('brown', 'hair');\n * R.filter(hasBrownHair, kids); //=> [fred, rusty]\n */\nvar propEq = /*#__PURE__*/_curry3(function propEq(val, name, obj) {\n return equals(val, prop(name, obj));\n});\nexport default propEq;","import _curry1 from \"./internal/_curry1.js\";\n\n/**\n * Checks if the input value is `null` or `undefined`.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Type\n * @sig * -> Boolean\n * @param {*} x The value to test.\n * @return {Boolean} `true` if `x` is `undefined` or `null`, otherwise `false`.\n * @example\n *\n * R.isNil(null); //=> true\n * R.isNil(undefined); //=> true\n * R.isNil(0); //=> false\n * R.isNil([]); //=> false\n */\nvar isNil = /*#__PURE__*/_curry1(function isNil(x) {\n return x == null;\n});\nexport default isNil;","import isNil from \"./isNil.js\";\nimport _curry1 from \"./internal/_curry1.js\";\n\n/**\n * Checks if the input value is not `null` and not `undefined`.\n *\n * @func\n * @memberOf R\n * @since v0.29.0\n * @category Type\n * @sig * -> Boolean\n * @param {*} x The value to test.\n * @return {Boolean} `true` if `x` is not `undefined` or not `null`, otherwise `false`.\n * @example\n *\n * R.isNotNil(null); //=> false\n * R.isNotNil(undefined); //=> false\n * R.isNotNil(0); //=> true\n * R.isNotNil([]); //=> true\n */\nvar isNotNil = /*#__PURE__*/_curry1(function isNotNil(x) {\n return !isNil(x);\n});\nexport default isNotNil;","export default function _identity(x) {\n return x;\n}","import _curry1 from \"./internal/_curry1.js\";\nimport _identity from \"./internal/_identity.js\";\n\n/**\n * A function that does nothing but return the parameter supplied to it. Good\n * as a default or placeholder function.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig a -> a\n * @param {*} x The value to return.\n * @return {*} The input value, `x`.\n * @example\n *\n * R.identity(1); //=> 1\n *\n * const obj = {};\n * R.identity(obj) === obj; //=> true\n * @symb R.identity(a) = a\n */\nvar identity = /*#__PURE__*/_curry1(_identity);\nexport default identity;","import _concat from \"./internal/_concat.js\";\nimport _curry3 from \"./internal/_curry3.js\";\n\n/**\n * Applies a function to the value at the given index of an array, returning a\n * new copy of the array with the element at the given index replaced with the\n * result of the function application.\n *\n * When `idx < -list.length || idx >= list.length`, the original list is returned.\n *\n * @func\n * @memberOf R\n * @since v0.14.0\n * @category List\n * @sig Number -> (a -> a) -> [a] -> [a]\n * @param {Number} idx The index.\n * @param {Function} fn The function to apply.\n * @param {Array|Arguments} list An array-like object whose value\n * at the supplied index will be replaced.\n * @return {Array} A copy of the supplied array-like object with\n * the element at index `idx` replaced with the value\n * returned by applying `fn` to the existing element.\n * @see R.update\n * @example\n *\n * R.adjust(1, R.toUpper, ['a', 'b', 'c', 'd']); //=> ['a', 'B', 'c', 'd']\n * R.adjust(-1, R.toUpper, ['a', 'b', 'c', 'd']); //=> ['a', 'b', 'c', 'D']\n *\n * // out-of-range returns original list\n * R.adjust(4, R.toUpper, ['a', 'b', 'c', 'd']); //=> ['a', 'b', 'c', 'd']\n * R.adjust(-5, R.toUpper, ['a', 'b', 'c', 'd']); //=> ['a', 'b', 'c', 'd']\n * @symb R.adjust(-1, f, [a, b]) = [a, f(b)]\n * @symb R.adjust(0, f, [a, b]) = [f(a), b]\n */\nvar adjust = /*#__PURE__*/_curry3(function adjust(idx, fn, list) {\n var len = list.length;\n if (idx >= len || idx < -len) {\n return list;\n }\n var _idx = (len + idx) % len;\n var _list = _concat(list);\n _list[_idx] = fn(list[_idx]);\n return _list;\n});\nexport default adjust;","/**\n * Private `concat` function to merge two array-like objects.\n *\n * @private\n * @param {Array|Arguments} [set1=[]] An array-like object.\n * @param {Array|Arguments} [set2=[]] An array-like object.\n * @return {Array} A new, merged array.\n * @example\n *\n * _concat([4, 5, 6], [1, 2, 3]); //=> [4, 5, 6, 1, 2, 3]\n */\nexport default function _concat(set1, set2) {\n set1 = set1 || [];\n set2 = set2 || [];\n var idx;\n var len1 = set1.length;\n var len2 = set2.length;\n var result = [];\n idx = 0;\n while (idx < len1) {\n result[result.length] = set1[idx];\n idx += 1;\n }\n idx = 0;\n while (idx < len2) {\n result[result.length] = set2[idx];\n idx += 1;\n }\n return result;\n}","import _curry1 from \"./internal/_curry1.js\";\n\n/**\n * Returns a function that always returns the given value. Note that for\n * non-primitives the value returned is a reference to the original value.\n *\n * This function is known as `const`, `constant`, or `K` (for K combinator) in\n * other languages and libraries.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig a -> (* -> a)\n * @param {*} val The value to wrap in a function\n * @return {Function} A Function :: * -> val.\n * @example\n *\n * const t = R.always('Tee');\n * t(); //=> 'Tee'\n */\nvar always = /*#__PURE__*/_curry1(function always(val) {\n return function () {\n return val;\n };\n});\nexport default always;","import _curry3 from \"./internal/_curry3.js\";\nimport adjust from \"./adjust.js\";\nimport always from \"./always.js\";\n\n/**\n * Returns a new copy of the array with the element at the provided index\n * replaced with the given value.\n *\n * When `idx < -list.length || idx >= list.length`, the original list is returned.\n *\n * @func\n * @memberOf R\n * @since v0.14.0\n * @category List\n * @sig Number -> a -> [a] -> [a]\n * @param {Number} idx The index to update.\n * @param {*} x The value to exist at the given index of the returned array.\n * @param {Array|Arguments} list The source array-like object to be updated.\n * @return {Array} A copy of `list` with the value at index `idx` replaced with `x`.\n * @see R.adjust\n * @example\n *\n * R.update(1, '_', ['a', 'b', 'c']); //=> ['a', '_', 'c']\n * R.update(-1, '_', ['a', 'b', 'c']); //=> ['a', 'b', '_']\n *\n * // out-of-range returns original list\n * R.update(3, '_', ['a', 'b', 'c']); //=> ['a', 'b', 'c']\n * R.update(-4, '_', ['a', 'b', 'c']); //=> ['a', 'b', 'c']\n * @symb R.update(-1, a, [b, c]) = [b, a]\n * @symb R.update(0, a, [b, c]) = [a, c]\n * @symb R.update(1, a, [b, c]) = [b, a]\n */\nvar update = /*#__PURE__*/_curry3(function update(idx, x, list) {\n return adjust(idx, always(x), list);\n});\nexport default update;","import _curry3 from \"./internal/_curry3.js\";\n\n/**\n * Move an item, at index `from`, to index `to`, in a list of elements.\n * A new list will be created containing the new elements order.\n *\n * @func\n * @memberOf R\n * @since v0.27.1\n * @category List\n * @sig Number -> Number -> [a] -> [a]\n * @param {Number} from The source index\n * @param {Number} to The destination index\n * @param {Array} list The list which will serve to realise the move\n * @return {Array} The new list reordered\n * @example\n *\n * R.move(0, 2, ['a', 'b', 'c', 'd', 'e', 'f']); //=> ['b', 'c', 'a', 'd', 'e', 'f']\n * R.move(-1, 0, ['a', 'b', 'c', 'd', 'e', 'f']); //=> ['f', 'a', 'b', 'c', 'd', 'e'] list rotation\n */\nvar move = /*#__PURE__*/_curry3(function (from, to, list) {\n var length = list.length;\n var result = list.slice();\n var positiveFrom = from < 0 ? length + from : from;\n var positiveTo = to < 0 ? length + to : to;\n var item = result.splice(positiveFrom, 1);\n return positiveFrom < 0 || positiveFrom >= list.length || positiveTo < 0 || positiveTo >= list.length ? list : [].concat(result.slice(0, positiveTo)).concat(item).concat(result.slice(positiveTo, list.length));\n});\nexport default move;","import { __extends } from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function createOperatorSubscriber(destination, onNext, onComplete, onError, onFinalize) {\n return new OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize);\n}\nvar OperatorSubscriber = (function (_super) {\n __extends(OperatorSubscriber, _super);\n function OperatorSubscriber(destination, onNext, onComplete, onError, onFinalize, shouldUnsubscribe) {\n var _this = _super.call(this, destination) || this;\n _this.onFinalize = onFinalize;\n _this.shouldUnsubscribe = shouldUnsubscribe;\n _this._next = onNext\n ? function (value) {\n try {\n onNext(value);\n }\n catch (err) {\n destination.error(err);\n }\n }\n : _super.prototype._next;\n _this._error = onError\n ? function (err) {\n try {\n onError(err);\n }\n catch (err) {\n destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n }\n : _super.prototype._error;\n _this._complete = onComplete\n ? function () {\n try {\n onComplete();\n }\n catch (err) {\n destination.error(err);\n }\n finally {\n this.unsubscribe();\n }\n }\n : _super.prototype._complete;\n return _this;\n }\n OperatorSubscriber.prototype.unsubscribe = function () {\n var _a;\n if (!this.shouldUnsubscribe || this.shouldUnsubscribe()) {\n var closed_1 = this.closed;\n _super.prototype.unsubscribe.call(this);\n !closed_1 && ((_a = this.onFinalize) === null || _a === void 0 ? void 0 : _a.call(this));\n }\n };\n return OperatorSubscriber;\n}(Subscriber));\nexport { OperatorSubscriber };\n//# sourceMappingURL=OperatorSubscriber.js.map","import { operate } from '../util/lift';\nimport { createOperatorSubscriber } from './OperatorSubscriber';\nexport function filter(predicate, thisArg) {\n return operate(function (source, subscriber) {\n var index = 0;\n source.subscribe(createOperatorSubscriber(subscriber, function (value) { return predicate.call(thisArg, value, index++) && subscriber.next(value); }));\n });\n}\n//# sourceMappingURL=filter.js.map","import { isFunction } from './isFunction';\nexport function hasLift(source) {\n return isFunction(source === null || source === void 0 ? void 0 : source.lift);\n}\nexport function operate(init) {\n return function (source) {\n if (hasLift(source)) {\n return source.lift(function (liftedSource) {\n try {\n return init(liftedSource, this);\n }\n catch (err) {\n this.error(err);\n }\n });\n }\n throw new TypeError('Unable to lift unknown Observable type');\n };\n}\n//# sourceMappingURL=lift.js.map","import { useState } from 'react';\nexport const useSetAsSet = (initial = []) => {\n const [entries, setEntries] = useState(new Set(initial));\n return [entries, {\n has: (v) => entries.has(v),\n add: (v) => setEntries(new Set(entries.add(v))),\n delete: (v) => {\n const has = entries.delete(v);\n setEntries(new Set(entries));\n return has;\n },\n clear: () => setEntries(new Set([])),\n reset: (v) => setEntries(new Set(v)),\n toggle: (v) => {\n entries.has(v) ? entries.delete(v) : entries.add(v);\n setEntries(new Set(entries));\n }\n }];\n};\n","import { useEffect, useRef } from 'react';\nexport const useEffectOnUpdate = (callback, deps) => {\n const first = useRef(true);\n useEffect(() => {\n if (first.current) {\n first.current = false;\n }\n else {\n return callback();\n }\n }, deps);\n};\n/*\nconst useUpdateEffect: typeof useEffect = (effect, deps) => {\n const isFirstMount = useFirstMountState();\n \n useEffect(() => {\n if (!isFirstMount) {\n return effect();\n }\n }, deps);\n };\n \n export default useUpdateEffect;\n\n\n\n export function useFirstMountState(): boolean {\n const isFirst = useRef(true);\n\n if (isFirst.current) {\n isFirst.current = false;\n\n return true;\n }\n\n return isFirst.current;\n}\n*/ \n","import { useEffect } from 'react';\nexport const useEvent = (target, type, listener, deps) => {\n useEffect(() => {\n target.addEventListener(type, listener);\n return () => target.removeEventListener(type, listener);\n }, deps);\n};\n","import { useEffect } from 'react';\nexport const useSubscribe = (listener, deps = []) => {\n useEffect(() => {\n const subscription = listener();\n return () => subscription.unsubscribe();\n }, deps);\n};\n","import { useEffect } from 'react';\nconst codes = [\n 'ArrowUp',\n 'ArrowRight',\n 'ArrowDown',\n 'ArrowLeft',\n 'Delete',\n 'Backspace',\n 'Escape',\n 'Equal',\n 'Minus',\n 'Backslash',\n 'Slash',\n 'intlbackslash',\n 'Comma',\n 'Period',\n 'Quote',\n 'Backquote',\n 'Semicolon',\n 'BracketLeft',\n 'BracketRight',\n 'F1', 'F2', 'F3', 'F4', 'F5', 'F6', 'F7', 'F8', 'F9', 'F10', 'F11', 'F12'\n];\nconst reserved = [\n 'meta+r',\n 'meta+shift+r',\n 'meta+comma',\n 'meta+s',\n 'meta+o',\n 'meta+y',\n 'meta+bracketleft',\n 'meta+bracketleft',\n 'meta+bracketright',\n 'meta+arrowleft',\n 'meta+arrowright'\n];\nfunction cmdFromKey(e, shortcuts) {\n let key = [\n e.altKey ? 'alt' : '',\n e.ctrlKey ? 'ctrl' : '',\n e.metaKey ? 'meta' : '',\n e.shiftKey ? 'shift' : '',\n (codes.find(code => code == e.code) ?? e.code?.replace('Key', '').replace('Digit', ''))?.toLowerCase()\n ].filter(key => !!key).join('+');\n return shortcuts.find(shortcut => shortcut.key == key);\n}\nexport const useShortcuts = (shortcuts, on, deps = []) => {\n useEffect(() => {\n const onKey = (e) => {\n const binding = cmdFromKey(e, shortcuts);\n if (binding) {\n if (reserved.includes(binding.key)) {\n e.preventDefault();\n e.stopPropagation();\n }\n on(binding.command, e);\n }\n };\n document.addEventListener('keydown', onKey);\n return () => document.removeEventListener('keydown', onKey);\n }, deps);\n};\n","import { useEffect, useRef } from 'react';\nexport const useCustomCompareEffect = (callback, deps, isEqual) => {\n const currDeps = useRef(null);\n if (!currDeps.current || !isEqual(currDeps.current, deps)) {\n currDeps.current = deps;\n }\n useEffect(callback, currDeps.current);\n};\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../node_modules/less-loader/dist/cjs/index.js!./EditFileName.less\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../node_modules/less-loader/dist/cjs/index.js!./EditFileName.less\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useRef, useState, useEffect } from \"react\";\nimport styles from './EditFileName.less';\nimport classNames from 'classnames';\nimport { parse } from '../../utils/path';\nexport default function ({ name, sublings, onOk, onCancel }) {\n const inputEl = useRef(null);\n const [newName, setNewName] = useState(name);\n const [error, setError] = useState(false);\n const done = useRef(false);\n useEffect(() => {\n inputEl.current?.focus();\n const woExt = parse(name).name;\n inputEl.current?.setSelectionRange(0, woExt.length);\n }, []);\n const onChange = (name) => {\n setNewName(name);\n setError(sublings.includes(name));\n };\n const onKey = (e) => {\n e.stopPropagation();\n if (e.key == 'Escape') {\n onCancel();\n return;\n }\n if (e.key == 'Enter' && !error) {\n newName.length ? save(newName) : setError(true);\n }\n };\n const save = (name) => {\n done.current = true;\n name = name.replace('/', ''); // TODO\n name.length && onOk(name);\n };\n return React.createElement(\"input\", { ref: inputEl, className: classNames('dry', styles.root, { error }), value: newName, onChange: e => onChange(e.target.value), onBlur: () => !done.current && ((newName.length && !error) ? save(newName) : onCancel()), onKeyDown: onKey });\n}\n","import React, { useRef, useState, useEffect, forwardRef, useCallback } from \"react\";\nimport classNames from 'classnames';\nimport styles from './List.less';\nimport { without, whereEq, prop, propEq, __, includes, identity, startsWith, update, move, isNotNil } from 'ramda';\nimport { FileState, SortOrder, FileAttrsAttr } from '../../shared/types';\nimport { filter } from 'rxjs/operators';\nimport { depth, dirname, parse, childOf, join } from '../../utils/path';\nimport { useSet, useSubscribe, useEvent, useType } from '../../hooks';\nimport setRef from '../../ui/setRef';\nimport { CommandID } from '../../commands';\nimport { command$ } from '../../observables/command';\nimport EditFileName from '../EditFileName/EditFileName';\nimport debounce from '../../utils/debounce';\nimport { Tooltips } from '../../ui/components';\nexport var ColumnType;\n(function (ColumnType) {\n ColumnType[\"String\"] = \"string\";\n ColumnType[\"Number\"] = \"number\";\n})(ColumnType || (ColumnType = {}));\nexport var DropEffect;\n(function (DropEffect) {\n DropEffect[\"Copy\"] = \"copy\";\n DropEffect[\"Move\"] = \"move\";\n})(DropEffect || (DropEffect = {}));\nconst isDescendant = (path, ancestor) => path.startsWith(ancestor + '/') || path == ancestor;\nconst dirOf = (item, all) => item.dir ? item.path : all.find(({ path }) => path == dirname(item.path))?.path;\nconst selectChildren = (parent, list) => list.filter(startsWith(parent + '/'))\n .map(path => path.substring(parent.length + 1))\n .map(path => parse(path)['top']);\nexport default forwardRef(function List({ columns, files, onGo, onToggle, onSelect, onOpen, onDragStart, onDragEnd, onDragOver, onDrop, onMenu, onNew, onRename, onSort, onColumnsMenu, onColumnsChange, root, tabindex, parent, children }, fwdRef) {\n const rootEl = useRef(null);\n const [items, setItems] = useState([]);\n const [expanded, setExpanded] = useState([]);\n const [rootDepth, setRootDepth] = useState(0);\n const [selected, { has: isSelected, reset: setSelected, toggle: toggleSelected }] = useSet([]);\n const [target, setTarget] = useState();\n const isActive = useRef(false);\n const waitForSecondClick = useRef(undefined);\n const [creating, createIn] = useState();\n const [renaming, rename] = useState();\n const [dropTarget, setDropTarget] = useState('');\n const insertNewItem = (items) => {\n if (creating) {\n let i = items.findIndex(({ path }) => path == creating.in);\n if (i < 0 && creating.in == root) {\n i = 0;\n }\n if (i < 0) {\n return items;\n }\n const newItem = {\n URI: '',\n path: items[i]?.path ?? join(root, 'new'),\n name: '',\n dir: creating.dir,\n size: 0,\n modified: new Date(),\n FileStateAttr: FileState.Creating\n };\n items.splice(creating.in == root ? 0 : i + 1, 0, newItem);\n return [...items];\n }\n return items;\n };\n const setRenamingItem = (items) => {\n if (renaming) {\n const item = items.find(whereEq({ URI: renaming }));\n item && (item.FileStateAttr = FileState.Renaming);\n return [...items];\n }\n return items;\n };\n useEffect(() => {\n if (target && !files.find(whereEq({ URI: target.URI }))) {\n setTarget(undefined);\n }\n setItems(setRenamingItem(insertNewItem(files)));\n }, [files]);\n useEffect(() => {\n setItems(items => {\n items = items.filter(({ FileStateAttr }) => FileStateAttr != FileState.Creating);\n if (creating && (expanded.includes(creating.in) || creating.in == root)) {\n return insertNewItem(items);\n }\n return items;\n });\n }, [creating]);\n useEffect(() => {\n setItems(items => items.map(item => ({\n ...item,\n FileStateAttr: item.URI == renaming\n ? FileState.Renaming\n : undefined\n })));\n }, [renaming]);\n useEffect(() => {\n setSelected([]);\n setExpanded([]);\n if (rootEl.current) {\n rootEl.current.scrollTop = rootEl.current.scrollLeft = 0;\n }\n }, [parent]);\n useEffect(() => {\n const first = items?.[0];\n setRootDepth(first ? depth(first.path) : 0);\n }, [items]);\n useEffect(() => {\n onSelect(selected, target?.path);\n }, [selected, target]);\n useEffect(() => setSelected(selected.filter(includes(__, items.map(prop('path'))))), [items]);\n const [widths, setWidths] = useState([]);\n useEffect(() => {\n setWidths(columns.map(prop('width')));\n }, [columns]);\n const toggle = (dir) => {\n setExpanded(expanded.includes(dir) ? without([dir], expanded) : [...expanded, dir]);\n onToggle(dir);\n };\n const click = (item, meta, shift, expand) => {\n select(item.path, meta, shift);\n setTarget(item);\n clearTimeout(waitForSecondClick.current);\n waitForSecondClick.current = setTimeout(() => {\n if (item.dir && !meta && !shift && expand) {\n toggle(item.path);\n }\n }, 400);\n };\n useEffect(() => {\n if (target && rootEl.current) {\n const targetEl = rootEl.current.querySelector(`[data-path='${target.path}']`);\n if (targetEl) {\n targetEl.scrollIntoView({ behavior: 'smooth', block: 'nearest' });\n const { top: snapTop } = rootEl.current.getBoundingClientRect();\n const { top } = targetEl.getBoundingClientRect();\n if (top <= snapTop) {\n rootEl.current.scroll?.({ top: 0, behavior: 'instant' });\n }\n }\n }\n }, [target]);\n const select = (path, meta, shift) => {\n if (shift && selected.length) {\n if (isSelected(path)) {\n // TODO remove selection ?\n }\n else {\n const targetIndex = items.findIndex(propEq(path, 'path'));\n const distances = selected.map(path => Math.abs(targetIndex - items.findIndex(propEq(path, 'path'))));\n const closestIndex = items.findIndex(whereEq({ path: selected[distances.indexOf(Math.min(...distances))] }));\n (targetIndex > closestIndex ?\n items.slice(closestIndex + 1, targetIndex + 1) :\n items.slice(targetIndex, closestIndex)).forEach(({ path }) => toggleSelected(path));\n }\n }\n else if (meta) {\n toggleSelected(path);\n }\n else {\n setSelected([path]);\n }\n };\n const doubleClick = (item) => {\n clearTimeout(waitForSecondClick.current);\n item.dir ? onGo(item.path) : onOpen(item.path);\n };\n useSubscribe(() => command$.pipe(filter(() => isActive.current)).subscribe(cmd => {\n switch (cmd.id) {\n case CommandID.SelectAll: {\n setSelected(items.map(prop('path')));\n cmd.e?.preventDefault();\n cmd.e?.stopPropagation();\n break;\n }\n case CommandID.SelectAllFiles: {\n setSelected(items.filter(({ dir }) => !dir).map(prop('path')));\n cmd.e?.preventDefault();\n cmd.e?.stopPropagation();\n break;\n }\n case CommandID.CollapseAll: {\n expanded.forEach(onToggle);\n setExpanded([]);\n break;\n }\n case CommandID.NewDir:\n case CommandID.NewFile: {\n const inDir = target ? (dirOf(target, items) || root) : root;\n if (inDir) {\n !expanded.includes(inDir) && inDir != root && toggle(inDir);\n createIn({ in: inDir, dir: cmd.id == CommandID.NewDir });\n }\n break;\n }\n case CommandID.Rename: {\n target && rename(cmd.uri ?? target.URI);\n break;\n }\n case CommandID.GoUp: {\n isActive.current && parent && onGo(parent);\n break;\n }\n }\n }), [target, items, expanded]);\n useType(700, search => {\n if (isActive.current) {\n const re = new RegExp('^' + search, 'i');\n const found = files.map(item => item.name.match(re) ? item : null).find(isNotNil);\n found && click(found, false, false, false);\n }\n }, [files]);\n const dragStart = (i, e) => {\n onDragStart?.(selected.includes(items[i].path) ?\n selected.map(path => items.find(whereEq({ path })).URI) :\n [items[i].URI], e);\n };\n const dragCounter = useRef({ path: '', count: 0, timeout: undefined });\n const dragEnter = (item, e) => {\n const path = item.dir ? item.path : dirname(item.path);\n if (dragCounter.current.path == path) {\n dragCounter.current.count++;\n }\n else {\n clearTimeout(dragCounter.current.timeout);\n dragCounter.current = {\n path,\n count: 1,\n timeout: expanded.includes(path)\n ? undefined\n : setTimeout(() => toggle(path), 800)\n };\n setDropTarget(path);\n }\n };\n const dragLeave = (item, e) => {\n const path = item.dir ? item.path : dirname(item.path);\n if (dragCounter.current.path == path) {\n if (dragCounter.current.count > 1) {\n dragCounter.current.count--;\n }\n else {\n clearTimeout(dragCounter.current.timeout);\n dragCounter.current = { path: '', count: 0, timeout: undefined };\n setDropTarget('');\n }\n }\n };\n const dragDrop = (targetDir, e) => {\n e.preventDefault();\n e.stopPropagation();\n let URIs = [];\n const data = e.dataTransfer.getData('URIs');\n if (data && data.length) {\n URIs = JSON.parse(data);\n }\n if (URIs.length) {\n if (!URIs\n .map(URI => items.find(whereEq({ URI })))\n .filter(identity)\n .some(uri => uri && childOf(targetDir, uri.path))) {\n onDrop(URIs, targetDir, e.altKey ? DropEffect.Copy : DropEffect.Move, e);\n }\n }\n else if (e.dataTransfer.items.length) { // dropped from outside\n const files = [];\n for (let i = 0; i < e.dataTransfer.items.length; i++) {\n const item = e.dataTransfer.items[i];\n if (item.kind == 'file') {\n const f = item.getAsFile();\n f && files.push(f);\n }\n }\n files.length && onDrop(files, targetDir, DropEffect.Copy, e);\n }\n clearTimeout(dragCounter.current.timeout);\n dragCounter.current = { path: '', count: 0, timeout: undefined };\n setDropTarget('');\n };\n const dragEnd = (e) => {\n onDragEnd?.(e);\n setDropTarget('');\n };\n const resizing = useRef(null);\n const delayedOnChange = useCallback(onColumnsChange ? debounce(onColumnsChange, 500) : () => { }, [onColumnsChange]);\n useEvent(document, 'mousemove', e => {\n const { pageX } = e;\n if (resizing.current !== null && rootEl.current && columns.length) {\n const target = rootEl.current.querySelector(`th:nth-child(${resizing.current + 1})`);\n if (target) {\n const width = Math.max(50, Math.round(pageX - target.getBoundingClientRect().left));\n if (widths[resizing.current] != width) {\n setWidths(update(resizing.current, width, widths));\n delayedOnChange(columns.map(({ name }, i) => ({ name, width: widths[i] })));\n }\n }\n }\n });\n const draggingColumn = useRef(null);\n const [colDropTarget, setColDropTarget] = useState();\n const onColumnDragOver = (target) => () => {\n if (draggingColumn.current && target != draggingColumn.current) {\n setColDropTarget(target);\n }\n };\n const onColumnDrop = (target) => () => {\n if (draggingColumn.current && target != draggingColumn.current) {\n const newWidths = move(draggingColumn.current, target == widths.length - 1 ? target : target + 1, widths);\n onColumnsChange?.(move(draggingColumn.current, target == columns.length - 1 ? target : target + 1, columns)\n .map(({ name }, i) => ({ name, width: newWidths[i] })));\n }\n setColDropTarget(undefined);\n };\n useEvent(document, 'mouseup', () => {\n resizing.current = draggingColumn.current = null;\n });\n return (React.createElement(\"div\", { className: classNames(styles.root, 'list'), ref: setRef(rootEl, fwdRef), onFocus: () => isActive.current = true, onBlur: () => isActive.current = false, onClick: e => { if (e.target == rootEl.current) {\n setTarget(undefined);\n setSelected([]);\n } }, onContextMenu: () => { setTarget(undefined); onMenu(root, true); }, onDragOver: e => onDragOver?.(e), onDrop: e => dragDrop(root, e), tabIndex: tabindex }, items.length > 0 || !children ?\n React.createElement(Tooltips, { delay: 800 },\n React.createElement(\"table\", null,\n React.createElement(\"thead\", null,\n React.createElement(\"tr\", { onContextMenu: e => { e.stopPropagation(); onColumnsMenu?.(); } },\n columns.map(({ name, title, sort }, i) => React.createElement(\"th\", { key: name, className: classNames({ sorted: !!sort, drop: i === colDropTarget }), style: { width: widths[i] }, \"data-name\": name, onClick: () => onSort?.(name), onMouseDown: () => i && (draggingColumn.current = i), onMouseOver: onColumnDragOver(i), onMouseOut: () => setColDropTarget(undefined), onMouseUp: onColumnDrop(i) },\n title,\n sort &&\n React.createElement(\"span\", { className: \"icon\" }, sort == SortOrder.Asc ? 'arrow_drop_up' : 'arrow_drop_down'),\n React.createElement(\"i\", { onMouseDown: e => { e.stopPropagation(); resizing.current = i; }, onClick: e => e.stopPropagation() }))),\n React.createElement(\"th\", null))),\n React.createElement(\"tbody\", null,\n parent &&\n React.createElement(\"tr\", { key: parent, className: 'up', onClick: () => onGo(parent), onContextMenu: e => { e.stopPropagation(); onMenu(parent, true); }, \"data-tooltip\": 'Go Up', \"data-command\": CommandID.GoUp },\n React.createElement(\"td\", { colSpan: columns.length + 1 },\n React.createElement(\"span\", { className: \"icon\" }, \"keyboard_return\"),\n \"..\")),\n items.map((item, i) => item.FileStateAttr == FileState.Creating || item.FileStateAttr == FileState.Renaming ?\n React.createElement(\"tr\", { key: 'editing' },\n React.createElement(\"td\", { colSpan: columns.length + 1, className: classNames({ d: item.dir }), \"data-depth\": depth(item.path) + 1 - rootDepth },\n React.createElement(EditFileName, { name: item.name, sublings: creating\n ? selectChildren(creating.in, files.map(prop('path')))\n : [], onOk: nm => {\n creating\n ? onNew?.(nm, creating.in, creating.dir)\n : onRename?.(renaming, nm);\n createIn(undefined);\n rename(undefined);\n }, onCancel: () => { createIn(undefined); rename(undefined); } })),\n React.createElement(\"td\", null)) :\n React.createElement(\"tr\", { key: item.path, className: classNames({\n selected: isSelected(item.path),\n dragover: dropTarget && isDescendant(item.path, dropTarget),\n target: target?.path == item.path\n }), \"data-path\": item.path, onClick: ({ metaKey, shiftKey }) => click(item, metaKey, shiftKey, true), onDoubleClick: () => doubleClick(item), onContextMenu: e => { e.stopPropagation(); setTarget(item); onMenu(item.path, item.dir); }, draggable: true, onDragStart: e => dragStart(i, e), onDragEnd: dragEnd, onDragOver: e => onDragOver?.(e), onDragEnter: e => dragEnter(item, e), onDragLeave: e => dragLeave(item, e), onDrop: e => dragDrop(item.dir ? item.path : dirname(item.path), e) },\n columns.map(({ name, type }, i) => i == 0 ?\n React.createElement(\"td\", { key: name, className: classNames({ d: item.dir, i: !!item.icon }), \"data-depth\": depth(item.path) - rootDepth, \"data-f5-attributes\": Object.entries(item[FileAttrsAttr] ?? {}).map(([id]) => id).join(' ') },\n React.createElement(\"div\", { className: classNames({ expanded: expanded.includes(item.path) }) },\n item.dir &&\n React.createElement(\"i\", { className: \"icon\" }, \"arrow_forward_ios\"),\n item.icon &&\n React.createElement(\"i\", { className: \"fileicon\", \"data-code\": item.icon }),\n React.createElement(\"span\", { \"data-tooltip\": item.tooltip ?? item.path }, item[name]),\n React.createElement(\"ul\", null,\n item.target &&\n React.createElement(\"li\", { className: \"icon\", \"data-tooltip\": 'Symbolic Link to ' + item.target }, \"prompt_suggestion\"),\n Object.entries(item[FileAttrsAttr] ?? {}).map(([id, name]) => React.createElement(\"li\", { key: \"id\", \"data-f5-attribute\": id, \"data-tooltip\": name }))))) :\n React.createElement(\"td\", { key: name, className: 'type-' + type }, item[name])),\n React.createElement(\"td\", null)))))) :\n children));\n});\n","import { useState } from 'react';\nexport const useSet = (initial = []) => {\n const [entries, setEntries] = useState(initial);\n return [entries, {\n has: (v) => entries.includes(v),\n add: (v) => setEntries(entries => entries.includes(v) ? entries : [...entries, v]),\n del: (v) => {\n let found = false;\n setEntries(entries => {\n const i = entries.indexOf(v);\n if (i >= 0) {\n entries.splice(i, 1);\n found = true;\n return [...entries];\n }\n return entries;\n });\n return found;\n },\n clear: () => setEntries([]),\n reset: (v) => setEntries(v),\n toggle: (v) => {\n let added = false;\n setEntries(entries => {\n const i = entries.indexOf(v);\n if (i >= 0) {\n entries.splice(i, 1);\n return entries;\n }\n else {\n added = true;\n return [...entries, v];\n }\n });\n return added;\n }\n }];\n};\n","import { useEffect } from 'react';\nexport const useType = (debouncePeriod, on, deps = []) => {\n useEffect(() => {\n const re = /^[a-z0-9.-]$/i;\n let text = '';\n let tm;\n const onKey = (e) => {\n if (!e.altKey && !e.shiftKey && !e.metaKey && re.test(e.key)) {\n clearTimeout(tm);\n tm = setTimeout(() => text = '', debouncePeriod);\n text += e.key.toLocaleLowerCase();\n text.length > 0 && on(text);\n }\n };\n document.addEventListener('keydown', onKey);\n return () => document.removeEventListener('keydown', onKey);\n }, deps);\n};\n","export default function debounce(f, wait) {\n let timeout;\n return async (...args) => {\n clearTimeout(timeout);\n return new Promise((resolve, reject) => {\n timeout = setTimeout(() => {\n try {\n resolve(f(...args));\n }\n catch (e) {\n reject(e);\n }\n }, wait);\n });\n };\n}\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../node_modules/less-loader/dist/cjs/index.js!./Toolbar.less\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../node_modules/less-loader/dist/cjs/index.js!./Toolbar.less\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useContext, Fragment } from \"react\";\nimport { Tooltips, getTooltipShortcut } from '../../ui/components/Tooltips/Tooltips';\nimport styles from './Toolbar.less';\nimport { AppSettingsContext } from '../../context/config';\nexport default function Toolbar({ items, onClick }) {\n const appSettings = useContext(AppSettingsContext);\n if (!appSettings) {\n return React.createElement(React.Fragment, null);\n }\n return (React.createElement(Tooltips, null,\n React.createElement(\"div\", { className: styles.root }, items.map(item => React.createElement(Fragment, { key: item.id },\n React.createElement(\"button\", { className: \"icon\", disabled: item.disabled ?? false, onClick: e => {\n e.preventDefault();\n e.stopPropagation();\n onClick?.(item.id);\n setTimeout(() => item.onClick(), 100);\n }, \"data-tooltip\": item.title + getTooltipShortcut(item.id, appSettings.keybindings) },\n item.icon,\n \" \",\n item.label && React.createElement(\"span\", null, item.label)),\n item.delimiter && React.createElement(\"i\", null))))));\n}\n","import { Subject } from 'rxjs';\nexport const dir$ = new Subject();\nwindow.f5.onDirChange((dir, files) => dir$.next({ dir, files }));\n","import _curry3 from \"./internal/_curry3.js\";\n\n/**\n * Makes a descending comparator function out of a function that returns a value\n * that can be compared with `<` and `>`.\n *\n * @func\n * @memberOf R\n * @since v0.23.0\n * @category Function\n * @sig Ord b => (a -> b) -> a -> a -> Number\n * @param {Function} fn A function of arity one that returns a value that can be compared\n * @param {*} a The first item to be compared.\n * @param {*} b The second item to be compared.\n * @return {Number} `-1` if fn(a) > fn(b), `1` if fn(b) > fn(a), otherwise `0`\n * @see R.ascend, R.descendNatural, R.ascendNatural\n * @example\n *\n * const byAge = R.descend(R.prop('age'));\n * const people = [\n * { name: 'Emma', age: 70 },\n * { name: 'Peter', age: 78 },\n * { name: 'Mikhail', age: 62 },\n * ];\n * const peopleByOldestFirst = R.sort(byAge, people);\n * //=> [{ name: 'Peter', age: 78 }, { name: 'Emma', age: 70 }, { name: 'Mikhail', age: 62 }]\n */\nvar descend = /*#__PURE__*/_curry3(function descend(fn, a, b) {\n var aa = fn(a);\n var bb = fn(b);\n return aa > bb ? -1 : aa < bb ? 1 : 0;\n});\nexport default descend;","export default function _pipe(f, g) {\n return function () {\n return g.call(this, f.apply(this, arguments));\n };\n}","import _curry1 from \"./_curry1.js\";\nimport _isArray from \"./_isArray.js\";\nimport _isString from \"./_isString.js\";\n\n/**\n * Tests whether or not an object is similar to an array.\n *\n * @private\n * @category Type\n * @category List\n * @sig * -> Boolean\n * @param {*} x The object to test.\n * @return {Boolean} `true` if `x` has a numeric length property and extreme indices defined; `false` otherwise.\n * @example\n *\n * _isArrayLike([]); //=> true\n * _isArrayLike(true); //=> false\n * _isArrayLike({}); //=> false\n * _isArrayLike({length: 10}); //=> false\n * _isArrayLike({0: 'zero', 9: 'nine', length: 10}); //=> true\n * _isArrayLike({nodeType: 1, length: 1}) // => false\n */\nvar _isArrayLike = /*#__PURE__*/_curry1(function isArrayLike(x) {\n if (_isArray(x)) {\n return true;\n }\n if (!x) {\n return false;\n }\n if (typeof x !== 'object') {\n return false;\n }\n if (_isString(x)) {\n return false;\n }\n if (x.length === 0) {\n return true;\n }\n if (x.length > 0) {\n return x.hasOwnProperty(0) && x.hasOwnProperty(x.length - 1);\n }\n return false;\n});\nexport default _isArrayLike;","export default function _isString(x) {\n return Object.prototype.toString.call(x) === '[object String]';\n}","import _isArrayLike from \"./_isArrayLike.js\";\nvar symIterator = typeof Symbol !== 'undefined' ? Symbol.iterator : '@@iterator';\nexport default function _createReduce(arrayReduce, methodReduce, iterableReduce) {\n return function _reduce(xf, acc, list) {\n if (_isArrayLike(list)) {\n return arrayReduce(xf, acc, list);\n }\n if (list == null) {\n return acc;\n }\n if (typeof list['fantasy-land/reduce'] === 'function') {\n return methodReduce(xf, acc, list, 'fantasy-land/reduce');\n }\n if (list[symIterator] != null) {\n return iterableReduce(xf, acc, list[symIterator]());\n }\n if (typeof list.next === 'function') {\n return iterableReduce(xf, acc, list);\n }\n if (typeof list.reduce === 'function') {\n return methodReduce(xf, acc, list, 'reduce');\n }\n throw new TypeError('reduce: list must be array or iterable');\n };\n}","export default function _xArrayReduce(xf, acc, list) {\n var idx = 0;\n var len = list.length;\n while (idx < len) {\n acc = xf['@@transducer/step'](acc, list[idx]);\n if (acc && acc['@@transducer/reduced']) {\n acc = acc['@@transducer/value'];\n break;\n }\n idx += 1;\n }\n return xf['@@transducer/result'](acc);\n}","import _arity from \"./internal/_arity.js\";\nimport _curry2 from \"./internal/_curry2.js\";\n\n/**\n * Creates a function that is bound to a context.\n * Note: `R.bind` does not provide the additional argument-binding capabilities of\n * [Function.prototype.bind](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind).\n *\n * @func\n * @memberOf R\n * @since v0.6.0\n * @category Function\n * @category Object\n * @sig (* -> *) -> {*} -> (* -> *)\n * @param {Function} fn The function to bind to context\n * @param {Object} thisObj The context to bind `fn` to\n * @return {Function} A function that will execute in the context of `thisObj`.\n * @see R.partial\n * @example\n *\n * const log = R.bind(console.log, console);\n * R.pipe(R.assoc('a', 2), R.tap(log), R.assoc('a', 3))({a: 1}); //=> {a: 3}\n * // logs {a: 2}\n * @symb R.bind(f, o)(a, b) = f.call(o, a, b)\n */\nvar bind = /*#__PURE__*/_curry2(function bind(fn, thisObj) {\n return _arity(fn.length, function () {\n return fn.apply(thisObj, arguments);\n });\n});\nexport default bind;","import _createReduce from \"./_createReduce.js\";\nimport _xArrayReduce from \"./_xArrayReduce.js\";\nimport bind from \"../bind.js\";\nfunction _xIterableReduce(xf, acc, iter) {\n var step = iter.next();\n while (!step.done) {\n acc = xf['@@transducer/step'](acc, step.value);\n if (acc && acc['@@transducer/reduced']) {\n acc = acc['@@transducer/value'];\n break;\n }\n step = iter.next();\n }\n return xf['@@transducer/result'](acc);\n}\nfunction _xMethodReduce(xf, acc, obj, methodName) {\n return xf['@@transducer/result'](obj[methodName](bind(xf['@@transducer/step'], xf), acc));\n}\nvar _xReduce = /*#__PURE__*/_createReduce(_xArrayReduce, _xMethodReduce, _xIterableReduce);\nexport default _xReduce;","var XWrap = /*#__PURE__*/function () {\n function XWrap(fn) {\n this.f = fn;\n }\n XWrap.prototype['@@transducer/init'] = function () {\n throw new Error('init not implemented on XWrap');\n };\n XWrap.prototype['@@transducer/result'] = function (acc) {\n return acc;\n };\n XWrap.prototype['@@transducer/step'] = function (acc, x) {\n return this.f(acc, x);\n };\n return XWrap;\n}();\nexport default function _xwrap(fn) {\n return new XWrap(fn);\n}","import _curry3 from \"./internal/_curry3.js\";\nimport _xReduce from \"./internal/_xReduce.js\";\nimport _xwrap from \"./internal/_xwrap.js\";\n\n/**\n * Returns a single item by iterating through the list, successively calling\n * the iterator function and passing it an accumulator value and the current\n * value from the array, and then passing the result to the next call.\n *\n * The iterator function receives two values: *(acc, value)*. It may use\n * [`R.reduced`](#reduced) to shortcut the iteration.\n *\n * The arguments' order of [`reduceRight`](#reduceRight)'s iterator function\n * is *(value, acc)*.\n *\n * Note: `R.reduce` does not skip deleted or unassigned indices (sparse\n * arrays), unlike the native `Array.prototype.reduce` method. For more details\n * on this behavior, see:\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce#Description\n *\n * Be cautious of mutating and returning the accumulator. If you reuse it across\n * invocations, it will continue to accumulate onto the same value. The general\n * recommendation is to always return a new value. If you can't do so for\n * performance reasons, then be sure to reinitialize the accumulator on each\n * invocation.\n *\n * Dispatches to the `reduce` method of the third argument, if present. When\n * doing so, it is up to the user to handle the [`R.reduced`](#reduced)\n * shortcuting, as this is not implemented by `reduce`.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig ((a, b) -> a) -> a -> [b] -> a\n * @param {Function} fn The iterator function. Receives two values, the accumulator and the\n * current element from the array.\n * @param {*} acc The accumulator value.\n * @param {Array} list The list to iterate over.\n * @return {*} The final, accumulated value.\n * @see R.reduced, R.addIndex, R.reduceRight\n * @example\n *\n * R.reduce(R.subtract, 0, [1, 2, 3, 4]) // => ((((0 - 1) - 2) - 3) - 4) = -10\n * // - -10\n * // / \\ / \\\n * // - 4 -6 4\n * // / \\ / \\\n * // - 3 ==> -3 3\n * // / \\ / \\\n * // - 2 -1 2\n * // / \\ / \\\n * // 0 1 0 1\n *\n * @symb R.reduce(f, a, [b, c, d]) = f(f(f(a, b), c), d)\n */\nvar reduce = /*#__PURE__*/_curry3(function (xf, acc, list) {\n return _xReduce(typeof xf === 'function' ? _xwrap(xf) : xf, acc, list);\n});\nexport default reduce;","import _checkForMethod from \"./internal/_checkForMethod.js\";\nimport _curry1 from \"./internal/_curry1.js\";\nimport slice from \"./slice.js\";\n\n/**\n * Returns all but the first element of the given list or string (or object\n * with a `tail` method).\n *\n * Dispatches to the `slice` method of the first argument, if present.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> [a]\n * @sig String -> String\n * @param {*} list\n * @return {*}\n * @see R.head, R.init, R.last\n * @example\n *\n * R.tail([1, 2, 3]); //=> [2, 3]\n * R.tail([1, 2]); //=> [2]\n * R.tail([1]); //=> []\n * R.tail([]); //=> []\n *\n * R.tail('abc'); //=> 'bc'\n * R.tail('ab'); //=> 'b'\n * R.tail('a'); //=> ''\n * R.tail(''); //=> ''\n */\nvar tail = /*#__PURE__*/_curry1( /*#__PURE__*/_checkForMethod('tail', /*#__PURE__*/slice(1, Infinity)));\nexport default tail;","import _arity from \"./internal/_arity.js\";\nimport _pipe from \"./internal/_pipe.js\";\nimport reduce from \"./reduce.js\";\nimport tail from \"./tail.js\";\n\n/**\n * Performs left-to-right function composition. The first argument may have\n * any arity; the remaining arguments must be unary.\n *\n * In some libraries this function is named `sequence`.\n *\n * **Note:** The result of pipe is not automatically curried.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig (((a, b, ..., n) -> o), (o -> p), ..., (x -> y), (y -> z)) -> ((a, b, ..., n) -> z)\n * @param {...Function} functions\n * @return {Function}\n * @see R.compose\n * @example\n *\n * const f = R.pipe(Math.pow, R.negate, R.inc);\n *\n * f(3, 4); // -(3^4) + 1\n * @symb R.pipe(f, g, h)(a, b) = h(g(f(a, b)))\n * @symb R.pipe(f, g, h)(a)(b) = h(g(f(a)))(b)\n */\nexport default function pipe() {\n if (arguments.length === 0) {\n throw new Error('pipe requires at least one argument');\n }\n return _arity(arguments[0].length, reduce(_pipe, arguments[0], tail(arguments)));\n}","import _curry3 from \"./internal/_curry3.js\";\n\n/**\n * Makes an ascending comparator function out of a function that returns a value\n * that can be compared with `<` and `>`.\n *\n * @func\n * @memberOf R\n * @since v0.23.0\n * @category Function\n * @sig Ord b => (a -> b) -> a -> a -> Number\n * @param {Function} fn A function of arity one that returns a value that can be compared\n * @param {*} a The first item to be compared.\n * @param {*} b The second item to be compared.\n * @return {Number} `-1` if fn(a) < fn(b), `1` if fn(b) < fn(a), otherwise `0`\n * @see R.descend, R.ascendNatural, R.descendNatural\n * @example\n *\n * const byAge = R.ascend(R.prop('age'));\n * const people = [\n * { name: 'Emma', age: 70 },\n * { name: 'Peter', age: 78 },\n * { name: 'Mikhail', age: 62 },\n * ];\n * const peopleByYoungestFirst = R.sort(byAge, people);\n * //=> [{ name: 'Mikhail', age: 62 },{ name: 'Emma', age: 70 }, { name: 'Peter', age: 78 }]\n */\nvar ascend = /*#__PURE__*/_curry3(function ascend(fn, a, b) {\n var aa = fn(a);\n var bb = fn(b);\n return aa < bb ? -1 : aa > bb ? 1 : 0;\n});\nexport default ascend;","import _curry2 from \"./internal/_curry2.js\";\n\n/**\n * Sorts a list according to a list of comparators.\n *\n * @func\n * @memberOf R\n * @since v0.23.0\n * @category Relation\n * @sig [(a, a) -> Number] -> [a] -> [a]\n * @param {Array} functions A list of comparator functions.\n * @param {Array} list The list to sort.\n * @return {Array} A new list sorted according to the comarator functions.\n * @see R.ascend, R.descend\n * @example\n *\n * const alice = {\n * name: 'alice',\n * age: 40\n * };\n * const bob = {\n * name: 'bob',\n * age: 30\n * };\n * const clara = {\n * name: 'clara',\n * age: 40\n * };\n * const people = [clara, bob, alice];\n * const ageNameSort = R.sortWith([\n * R.descend(R.prop('age')),\n * R.ascend(R.prop('name'))\n * ]);\n * ageNameSort(people); //=> [alice, clara, bob]\n */\nvar sortWith = /*#__PURE__*/_curry2(function sortWith(fns, list) {\n return Array.prototype.slice.call(list, 0).sort(function (a, b) {\n var result = 0;\n var i = 0;\n while (result === 0 && i < fns.length) {\n result = fns[i](a, b);\n i += 1;\n }\n return result;\n });\n});\nexport default sortWith;","import _xfBase from \"./_xfBase.js\";\nvar XDrop = /*#__PURE__*/function () {\n function XDrop(n, xf) {\n this.xf = xf;\n this.n = n;\n }\n XDrop.prototype['@@transducer/init'] = _xfBase.init;\n XDrop.prototype['@@transducer/result'] = _xfBase.result;\n XDrop.prototype['@@transducer/step'] = function (result, input) {\n if (this.n > 0) {\n this.n -= 1;\n return result;\n }\n return this.xf['@@transducer/step'](result, input);\n };\n return XDrop;\n}();\nexport default function _xdrop(n) {\n return function (xf) {\n return new XDrop(n, xf);\n };\n}","import _curry2 from \"./internal/_curry2.js\";\nimport _dispatchable from \"./internal/_dispatchable.js\";\nimport _xdrop from \"./internal/_xdrop.js\";\nimport slice from \"./slice.js\";\n\n/**\n * Returns all but the first `n` elements of the given list, string, or\n * transducer/transformer (or object with a `drop` method).\n *\n * Dispatches to the `drop` method of the second argument, if present.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig Number -> [a] -> [a]\n * @sig Number -> String -> String\n * @param {Number} n\n * @param {*} list\n * @return {*} A copy of list without the first `n` elements\n * @see R.take, R.transduce, R.dropLast, R.dropWhile\n * @example\n *\n * R.drop(1, ['foo', 'bar', 'baz']); //=> ['bar', 'baz']\n * R.drop(2, ['foo', 'bar', 'baz']); //=> ['baz']\n * R.drop(3, ['foo', 'bar', 'baz']); //=> []\n * R.drop(4, ['foo', 'bar', 'baz']); //=> []\n * R.drop(3, 'ramda'); //=> 'da'\n */\nvar drop = /*#__PURE__*/_curry2( /*#__PURE__*/_dispatchable(['drop'], _xdrop, function drop(n, xs) {\n return slice(Math.max(0, n), Infinity, xs);\n}));\nexport default drop;","import _curry2 from \"./internal/_curry2.js\";\nimport drop from \"./drop.js\";\n\n/**\n * Returns a new list containing the last `n` elements of the given list.\n * If `n > list.length`, returns a list of `list.length` elements.\n *\n * @func\n * @memberOf R\n * @since v0.16.0\n * @category List\n * @sig Number -> [a] -> [a]\n * @sig Number -> String -> String\n * @param {Number} n The number of elements to return.\n * @param {Array} xs The collection to consider.\n * @return {Array}\n * @see R.dropLast\n * @example\n *\n * R.takeLast(1, ['foo', 'bar', 'baz']); //=> ['baz']\n * R.takeLast(2, ['foo', 'bar', 'baz']); //=> ['bar', 'baz']\n * R.takeLast(3, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz']\n * R.takeLast(4, ['foo', 'bar', 'baz']); //=> ['foo', 'bar', 'baz']\n * R.takeLast(3, 'ramda'); //=> 'mda'\n */\nvar takeLast = /*#__PURE__*/_curry2(function takeLast(n, xs) {\n return drop(n >= 0 ? xs.length - n : 0, xs);\n});\nexport default takeLast;","import _curry2 from \"./internal/_curry2.js\";\n\n/**\n * Returns a partial copy of an object containing only the keys specified. If\n * the key does not exist, the property is ignored.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig [k] -> {k: v} -> {k: v}\n * @param {Array} names an array of String property names to copy onto a new object\n * @param {Object} obj The object to copy from\n * @return {Object} A new object with only properties from `names` on it.\n * @see R.omit, R.props\n * @example\n *\n * R.pick(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1, d: 4}\n * R.pick(['a', 'e', 'f'], {a: 1, b: 2, c: 3, d: 4}); //=> {a: 1}\n */\nvar pick = /*#__PURE__*/_curry2(function pick(names, obj) {\n var result = {};\n var idx = 0;\n while (idx < names.length) {\n if (names[idx] in obj) {\n result[names[idx]] = obj[names[idx]];\n }\n idx += 1;\n }\n return result;\n});\nexport default pick;","import _curry2 from \"./internal/_curry2.js\";\n\n/**\n * Returns a partial copy of an object omitting the keys specified.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig [String] -> {String: *} -> {String: *}\n * @param {Array} names an array of String property names to omit from the new object\n * @param {Object} obj The object to copy from\n * @return {Object} A new object with properties from `names` not on it.\n * @see R.pick\n * @example\n *\n * R.omit(['a', 'd'], {a: 1, b: 2, c: 3, d: 4}); //=> {b: 2, c: 3}\n */\nvar omit = /*#__PURE__*/_curry2(function omit(names, obj) {\n var result = {};\n var index = {};\n var idx = 0;\n var len = names.length;\n while (idx < len) {\n index[names[idx]] = 1;\n idx += 1;\n }\n for (var prop in obj) {\n if (!index.hasOwnProperty(prop)) {\n result[prop] = obj[prop];\n }\n }\n return result;\n});\nexport default omit;","import _curry2 from \"./internal/_curry2.js\";\n\n/**\n * Sorts the list according to the supplied function.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig Ord b => (a -> b) -> [a] -> [a]\n * @param {Function} fn\n * @param {Array} list The list to sort.\n * @return {Array} A new list sorted by the keys generated by `fn`.\n * @example\n *\n * const sortByFirstItem = R.sortBy(R.prop(0));\n * const pairs = [[-1, 1], [-2, 2], [-3, 3]];\n * sortByFirstItem(pairs); //=> [[-3, 3], [-2, 2], [-1, 1]]\n *\n * const sortByNameCaseInsensitive = R.sortBy(R.compose(R.toLower, R.prop('name')));\n * const alice = {\n * name: 'ALICE',\n * age: 101\n * };\n * const bob = {\n * name: 'Bob',\n * age: -10\n * };\n * const clara = {\n * name: 'clara',\n * age: 314.159\n * };\n * const people = [clara, bob, alice];\n * sortByNameCaseInsensitive(people); //=> [alice, bob, clara]\n */\nvar sortBy = /*#__PURE__*/_curry2(function sortBy(fn, list) {\n return Array.prototype.slice.call(list, 0).sort(function (a, b) {\n var aa = fn(a);\n var bb = fn(b);\n return aa < bb ? -1 : aa > bb ? 1 : 0;\n });\n});\nexport default sortBy;","import _curry1 from \"./internal/_curry1.js\";\nimport _isNumber from \"./internal/_isNumber.js\";\n\n/**\n * Returns the number of elements in the array by returning `list.length`.\n *\n * @func\n * @memberOf R\n * @since v0.3.0\n * @category List\n * @sig [a] -> Number\n * @param {Array} list The array to inspect.\n * @return {Number} The length of the array.\n * @example\n *\n * R.length([]); //=> 0\n * R.length([1, 2, 3]); //=> 3\n */\nvar length = /*#__PURE__*/_curry1(function length(list) {\n return list != null && _isNumber(list.length) ? list.length : NaN;\n});\nexport default length;","export default function _isNumber(x) {\n return Object.prototype.toString.call(x) === '[object Number]';\n}","import _curry3 from \"./internal/_curry3.js\";\n\n/**\n * Inserts the sub-list into the list, at the specified `index`. _Note that this is not\n * destructive_: it returns a copy of the list with the changes.\n * <small>No lists have been harmed in the application of this function.</small>\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category List\n * @sig Number -> [a] -> [a] -> [a]\n * @param {Number} index The position to insert the sub-list\n * @param {Array} elts The sub-list to insert into the Array\n * @param {Array} list The list to insert the sub-list into\n * @return {Array} A new Array with `elts` inserted starting at `index`.\n * @example\n *\n * R.insertAll(2, ['x','y','z'], [1,2,3,4]); //=> [1,2,'x','y','z',3,4]\n */\nvar insertAll = /*#__PURE__*/_curry3(function insertAll(idx, elts, list) {\n idx = idx < list.length && idx >= 0 ? idx : list.length;\n return [].concat(Array.prototype.slice.call(list, 0, idx), elts, Array.prototype.slice.call(list, idx));\n});\nexport default insertAll;","import _curry2 from \"./internal/_curry2.js\";\n\n/**\n * Returns a copy of the list, sorted according to the comparator function,\n * which should accept two values at a time and return a negative number if the\n * first value is smaller, a positive number if it's larger, and zero if they\n * are equal. Please note that this is a **copy** of the list. It does not\n * modify the original.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig ((a, a) -> Number) -> [a] -> [a]\n * @param {Function} comparator A sorting function :: a -> b -> Int\n * @param {Array} list The list to sort\n * @return {Array} a new array with its elements sorted by the comparator function.\n * @see R.ascend, R.descend\n * @example\n *\n * const diff = function(a, b) { return a - b; };\n * R.sort(diff, [4,2,7,5]); //=> [2, 4, 5, 7]\n */\nvar sort = /*#__PURE__*/_curry2(function sort(comparator, list) {\n return Array.prototype.slice.call(list, 0).sort(comparator);\n});\nexport default sort;","const formatDistanceLocale = {\n lessThanXSeconds: {\n one: \"less than a second\",\n other: \"less than {{count}} seconds\",\n },\n\n xSeconds: {\n one: \"1 second\",\n other: \"{{count}} seconds\",\n },\n\n halfAMinute: \"half a minute\",\n\n lessThanXMinutes: {\n one: \"less than a minute\",\n other: \"less than {{count}} minutes\",\n },\n\n xMinutes: {\n one: \"1 minute\",\n other: \"{{count}} minutes\",\n },\n\n aboutXHours: {\n one: \"about 1 hour\",\n other: \"about {{count}} hours\",\n },\n\n xHours: {\n one: \"1 hour\",\n other: \"{{count}} hours\",\n },\n\n xDays: {\n one: \"1 day\",\n other: \"{{count}} days\",\n },\n\n aboutXWeeks: {\n one: \"about 1 week\",\n other: \"about {{count}} weeks\",\n },\n\n xWeeks: {\n one: \"1 week\",\n other: \"{{count}} weeks\",\n },\n\n aboutXMonths: {\n one: \"about 1 month\",\n other: \"about {{count}} months\",\n },\n\n xMonths: {\n one: \"1 month\",\n other: \"{{count}} months\",\n },\n\n aboutXYears: {\n one: \"about 1 year\",\n other: \"about {{count}} years\",\n },\n\n xYears: {\n one: \"1 year\",\n other: \"{{count}} years\",\n },\n\n overXYears: {\n one: \"over 1 year\",\n other: \"over {{count}} years\",\n },\n\n almostXYears: {\n one: \"almost 1 year\",\n other: \"almost {{count}} years\",\n },\n};\n\nexport const formatDistance = (token, count, options) => {\n let result;\n\n const tokenValue = formatDistanceLocale[token];\n if (typeof tokenValue === \"string\") {\n result = tokenValue;\n } else if (count === 1) {\n result = tokenValue.one;\n } else {\n result = tokenValue.other.replace(\"{{count}}\", count.toString());\n }\n\n if (options?.addSuffix) {\n if (options.comparison && options.comparison > 0) {\n return \"in \" + result;\n } else {\n return result + \" ago\";\n }\n }\n\n return result;\n};\n","export function buildFormatLongFn(args) {\n return (options = {}) => {\n // TODO: Remove String()\n const width = options.width ? String(options.width) : args.defaultWidth;\n const format = args.formats[width] || args.formats[args.defaultWidth];\n return format;\n };\n}\n","import { buildFormatLongFn } from \"../../_lib/buildFormatLongFn.js\";\n\nconst dateFormats = {\n full: \"EEEE, MMMM do, y\",\n long: \"MMMM do, y\",\n medium: \"MMM d, y\",\n short: \"MM/dd/yyyy\",\n};\n\nconst timeFormats = {\n full: \"h:mm:ss a zzzz\",\n long: \"h:mm:ss a z\",\n medium: \"h:mm:ss a\",\n short: \"h:mm a\",\n};\n\nconst dateTimeFormats = {\n full: \"{{date}} 'at' {{time}}\",\n long: \"{{date}} 'at' {{time}}\",\n medium: \"{{date}}, {{time}}\",\n short: \"{{date}}, {{time}}\",\n};\n\nexport const formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: \"full\",\n }),\n\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: \"full\",\n }),\n\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: \"full\",\n }),\n};\n","const formatRelativeLocale = {\n lastWeek: \"'last' eeee 'at' p\",\n yesterday: \"'yesterday at' p\",\n today: \"'today at' p\",\n tomorrow: \"'tomorrow at' p\",\n nextWeek: \"eeee 'at' p\",\n other: \"P\",\n};\n\nexport const formatRelative = (token, _date, _baseDate, _options) =>\n formatRelativeLocale[token];\n","/**\n * The localize function argument callback which allows to convert raw value to\n * the actual type.\n *\n * @param value - The value to convert\n *\n * @returns The converted value\n */\n\n/**\n * The map of localized values for each width.\n */\n\n/**\n * The index type of the locale unit value. It types conversion of units of\n * values that don't start at 0 (i.e. quarters).\n */\n\n/**\n * Converts the unit value to the tuple of values.\n */\n\n/**\n * The tuple of localized era values. The first element represents BC,\n * the second element represents AD.\n */\n\n/**\n * The tuple of localized quarter values. The first element represents Q1.\n */\n\n/**\n * The tuple of localized day values. The first element represents Sunday.\n */\n\n/**\n * The tuple of localized month values. The first element represents January.\n */\n\nexport function buildLocalizeFn(args) {\n return (value, options) => {\n const context = options?.context ? String(options.context) : \"standalone\";\n\n let valuesArray;\n if (context === \"formatting\" && args.formattingValues) {\n const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n const width = options?.width ? String(options.width) : defaultWidth;\n\n valuesArray =\n args.formattingValues[width] || args.formattingValues[defaultWidth];\n } else {\n const defaultWidth = args.defaultWidth;\n const width = options?.width ? String(options.width) : args.defaultWidth;\n\n valuesArray = args.values[width] || args.values[defaultWidth];\n }\n const index = args.argumentCallback ? args.argumentCallback(value) : value;\n\n // @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!\n return valuesArray[index];\n };\n}\n","import { buildLocalizeFn } from \"../../_lib/buildLocalizeFn.js\";\n\nconst eraValues = {\n narrow: [\"B\", \"A\"],\n abbreviated: [\"BC\", \"AD\"],\n wide: [\"Before Christ\", \"Anno Domini\"],\n};\n\nconst quarterValues = {\n narrow: [\"1\", \"2\", \"3\", \"4\"],\n abbreviated: [\"Q1\", \"Q2\", \"Q3\", \"Q4\"],\n wide: [\"1st quarter\", \"2nd quarter\", \"3rd quarter\", \"4th quarter\"],\n};\n\n// Note: in English, the names of days of the week and months are capitalized.\n// If you are making a new locale based on this one, check if the same is true for the language you're working on.\n// Generally, formatted dates should look like they are in the middle of a sentence,\n// e.g. in Spanish language the weekdays and months should be in the lowercase.\nconst monthValues = {\n narrow: [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"],\n abbreviated: [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n ],\n\n wide: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n};\n\nconst dayValues = {\n narrow: [\"S\", \"M\", \"T\", \"W\", \"T\", \"F\", \"S\"],\n short: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n abbreviated: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n wide: [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n ],\n};\n\nconst dayPeriodValues = {\n narrow: {\n am: \"a\",\n pm: \"p\",\n midnight: \"mi\",\n noon: \"n\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n abbreviated: {\n am: \"AM\",\n pm: \"PM\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n wide: {\n am: \"a.m.\",\n pm: \"p.m.\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n};\n\nconst formattingDayPeriodValues = {\n narrow: {\n am: \"a\",\n pm: \"p\",\n midnight: \"mi\",\n noon: \"n\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n abbreviated: {\n am: \"AM\",\n pm: \"PM\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n wide: {\n am: \"a.m.\",\n pm: \"p.m.\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n};\n\nconst ordinalNumber = (dirtyNumber, _options) => {\n const number = Number(dirtyNumber);\n\n // If ordinal numbers depend on context, for example,\n // if they are different for different grammatical genders,\n // use `options.unit`.\n //\n // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',\n // 'day', 'hour', 'minute', 'second'.\n\n const rem100 = number % 100;\n if (rem100 > 20 || rem100 < 10) {\n switch (rem100 % 10) {\n case 1:\n return number + \"st\";\n case 2:\n return number + \"nd\";\n case 3:\n return number + \"rd\";\n }\n }\n return number + \"th\";\n};\n\nexport const localize = {\n ordinalNumber,\n\n era: buildLocalizeFn({\n values: eraValues,\n defaultWidth: \"wide\",\n }),\n\n quarter: buildLocalizeFn({\n values: quarterValues,\n defaultWidth: \"wide\",\n argumentCallback: (quarter) => quarter - 1,\n }),\n\n month: buildLocalizeFn({\n values: monthValues,\n defaultWidth: \"wide\",\n }),\n\n day: buildLocalizeFn({\n values: dayValues,\n defaultWidth: \"wide\",\n }),\n\n dayPeriod: buildLocalizeFn({\n values: dayPeriodValues,\n defaultWidth: \"wide\",\n formattingValues: formattingDayPeriodValues,\n defaultFormattingWidth: \"wide\",\n }),\n};\n","export function buildMatchFn(args) {\n return (string, options = {}) => {\n const width = options.width;\n\n const matchPattern =\n (width && args.matchPatterns[width]) ||\n args.matchPatterns[args.defaultMatchWidth];\n const matchResult = string.match(matchPattern);\n\n if (!matchResult) {\n return null;\n }\n const matchedString = matchResult[0];\n\n const parsePatterns =\n (width && args.parsePatterns[width]) ||\n args.parsePatterns[args.defaultParseWidth];\n\n const key = Array.isArray(parsePatterns)\n ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString))\n : // [TODO] -- I challenge you to fix the type\n findKey(parsePatterns, (pattern) => pattern.test(matchedString));\n\n let value;\n\n value = args.valueCallback ? args.valueCallback(key) : key;\n value = options.valueCallback\n ? // [TODO] -- I challenge you to fix the type\n options.valueCallback(value)\n : value;\n\n const rest = string.slice(matchedString.length);\n\n return { value, rest };\n };\n}\n\nfunction findKey(object, predicate) {\n for (const key in object) {\n if (\n Object.prototype.hasOwnProperty.call(object, key) &&\n predicate(object[key])\n ) {\n return key;\n }\n }\n return undefined;\n}\n\nfunction findIndex(array, predicate) {\n for (let key = 0; key < array.length; key++) {\n if (predicate(array[key])) {\n return key;\n }\n }\n return undefined;\n}\n","import { buildMatchFn } from \"../../_lib/buildMatchFn.js\";\nimport { buildMatchPatternFn } from \"../../_lib/buildMatchPatternFn.js\";\n\nconst matchOrdinalNumberPattern = /^(\\d+)(th|st|nd|rd)?/i;\nconst parseOrdinalNumberPattern = /\\d+/i;\n\nconst matchEraPatterns = {\n narrow: /^(b|a)/i,\n abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n wide: /^(before christ|before common era|anno domini|common era)/i,\n};\nconst parseEraPatterns = {\n any: [/^b/i, /^(a|c)/i],\n};\n\nconst matchQuarterPatterns = {\n narrow: /^[1234]/i,\n abbreviated: /^q[1234]/i,\n wide: /^[1234](th|st|nd|rd)? quarter/i,\n};\nconst parseQuarterPatterns = {\n any: [/1/i, /2/i, /3/i, /4/i],\n};\n\nconst matchMonthPatterns = {\n narrow: /^[jfmasond]/i,\n abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i,\n};\nconst parseMonthPatterns = {\n narrow: [\n /^j/i,\n /^f/i,\n /^m/i,\n /^a/i,\n /^m/i,\n /^j/i,\n /^j/i,\n /^a/i,\n /^s/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n\n any: [\n /^ja/i,\n /^f/i,\n /^mar/i,\n /^ap/i,\n /^may/i,\n /^jun/i,\n /^jul/i,\n /^au/i,\n /^s/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n};\n\nconst matchDayPatterns = {\n narrow: /^[smtwf]/i,\n short: /^(su|mo|tu|we|th|fr|sa)/i,\n abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i,\n};\nconst parseDayPatterns = {\n narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],\n any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i],\n};\n\nconst matchDayPeriodPatterns = {\n narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,\n any: /^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i,\n};\nconst parseDayPeriodPatterns = {\n any: {\n am: /^a/i,\n pm: /^p/i,\n midnight: /^mi/i,\n noon: /^no/i,\n morning: /morning/i,\n afternoon: /afternoon/i,\n evening: /evening/i,\n night: /night/i,\n },\n};\n\nexport const match = {\n ordinalNumber: buildMatchPatternFn({\n matchPattern: matchOrdinalNumberPattern,\n parsePattern: parseOrdinalNumberPattern,\n valueCallback: (value) => parseInt(value, 10),\n }),\n\n era: buildMatchFn({\n matchPatterns: matchEraPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseEraPatterns,\n defaultParseWidth: \"any\",\n }),\n\n quarter: buildMatchFn({\n matchPatterns: matchQuarterPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseQuarterPatterns,\n defaultParseWidth: \"any\",\n valueCallback: (index) => index + 1,\n }),\n\n month: buildMatchFn({\n matchPatterns: matchMonthPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseMonthPatterns,\n defaultParseWidth: \"any\",\n }),\n\n day: buildMatchFn({\n matchPatterns: matchDayPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseDayPatterns,\n defaultParseWidth: \"any\",\n }),\n\n dayPeriod: buildMatchFn({\n matchPatterns: matchDayPeriodPatterns,\n defaultMatchWidth: \"any\",\n parsePatterns: parseDayPeriodPatterns,\n defaultParseWidth: \"any\",\n }),\n};\n","export function buildMatchPatternFn(args) {\n return (string, options = {}) => {\n const matchResult = string.match(args.matchPattern);\n if (!matchResult) return null;\n const matchedString = matchResult[0];\n\n const parseResult = string.match(args.parsePattern);\n if (!parseResult) return null;\n let value = args.valueCallback\n ? args.valueCallback(parseResult[0])\n : parseResult[0];\n\n // [TODO] I challenge you to fix the type\n value = options.valueCallback ? options.valueCallback(value) : value;\n\n const rest = string.slice(matchedString.length);\n\n return { value, rest };\n };\n}\n","import { formatDistance } from \"./en-US/_lib/formatDistance.js\";\nimport { formatLong } from \"./en-US/_lib/formatLong.js\";\nimport { formatRelative } from \"./en-US/_lib/formatRelative.js\";\nimport { localize } from \"./en-US/_lib/localize.js\";\nimport { match } from \"./en-US/_lib/match.js\";\n\n/**\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n * @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp)\n * @author Lesha Koss [@leshakoss](https://github.com/leshakoss)\n */\nexport const enUS = {\n code: \"en-US\",\n formatDistance: formatDistance,\n formatLong: formatLong,\n formatRelative: formatRelative,\n localize: localize,\n match: match,\n options: {\n weekStartsOn: 0 /* Sunday */,\n firstWeekContainsDate: 1,\n },\n};\n\n// Fallback for modularized imports:\nexport default enUS;\n","let defaultOptions = {};\n\nexport function getDefaultOptions() {\n return defaultOptions;\n}\n\nexport function setDefaultOptions(newOptions) {\n defaultOptions = newOptions;\n}\n","/**\n * @module constants\n * @summary Useful constants\n * @description\n * Collection of useful date constants.\n *\n * The constants could be imported from `date-fns/constants`:\n *\n * ```ts\n * import { maxTime, minTime } from \"./constants/date-fns/constants\";\n *\n * function isAllowedTime(time) {\n * return time <= maxTime && time >= minTime;\n * }\n * ```\n */\n\n/**\n * @constant\n * @name daysInWeek\n * @summary Days in 1 week.\n */\nexport const daysInWeek = 7;\n\n/**\n * @constant\n * @name daysInYear\n * @summary Days in 1 year.\n *\n * @description\n * How many days in a year.\n *\n * One years equals 365.2425 days according to the formula:\n *\n * > Leap year occurs every 4 years, except for years that are divisible by 100 and not divisible by 400.\n * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days\n */\nexport const daysInYear = 365.2425;\n\n/**\n * @constant\n * @name maxTime\n * @summary Maximum allowed time.\n *\n * @example\n * import { maxTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = 8640000000000001 <= maxTime;\n * //=> false\n *\n * new Date(8640000000000001);\n * //=> Invalid Date\n */\nexport const maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n\n/**\n * @constant\n * @name minTime\n * @summary Minimum allowed time.\n *\n * @example\n * import { minTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = -8640000000000001 >= minTime;\n * //=> false\n *\n * new Date(-8640000000000001)\n * //=> Invalid Date\n */\nexport const minTime = -maxTime;\n\n/**\n * @constant\n * @name millisecondsInWeek\n * @summary Milliseconds in 1 week.\n */\nexport const millisecondsInWeek = 604800000;\n\n/**\n * @constant\n * @name millisecondsInDay\n * @summary Milliseconds in 1 day.\n */\nexport const millisecondsInDay = 86400000;\n\n/**\n * @constant\n * @name millisecondsInMinute\n * @summary Milliseconds in 1 minute\n */\nexport const millisecondsInMinute = 60000;\n\n/**\n * @constant\n * @name millisecondsInHour\n * @summary Milliseconds in 1 hour\n */\nexport const millisecondsInHour = 3600000;\n\n/**\n * @constant\n * @name millisecondsInSecond\n * @summary Milliseconds in 1 second\n */\nexport const millisecondsInSecond = 1000;\n\n/**\n * @constant\n * @name minutesInYear\n * @summary Minutes in 1 year.\n */\nexport const minutesInYear = 525600;\n\n/**\n * @constant\n * @name minutesInMonth\n * @summary Minutes in 1 month.\n */\nexport const minutesInMonth = 43200;\n\n/**\n * @constant\n * @name minutesInDay\n * @summary Minutes in 1 day.\n */\nexport const minutesInDay = 1440;\n\n/**\n * @constant\n * @name minutesInHour\n * @summary Minutes in 1 hour.\n */\nexport const minutesInHour = 60;\n\n/**\n * @constant\n * @name monthsInQuarter\n * @summary Months in 1 quarter.\n */\nexport const monthsInQuarter = 3;\n\n/**\n * @constant\n * @name monthsInYear\n * @summary Months in 1 year.\n */\nexport const monthsInYear = 12;\n\n/**\n * @constant\n * @name quartersInYear\n * @summary Quarters in 1 year\n */\nexport const quartersInYear = 4;\n\n/**\n * @constant\n * @name secondsInHour\n * @summary Seconds in 1 hour.\n */\nexport const secondsInHour = 3600;\n\n/**\n * @constant\n * @name secondsInMinute\n * @summary Seconds in 1 minute.\n */\nexport const secondsInMinute = 60;\n\n/**\n * @constant\n * @name secondsInDay\n * @summary Seconds in 1 day.\n */\nexport const secondsInDay = secondsInHour * 24;\n\n/**\n * @constant\n * @name secondsInWeek\n * @summary Seconds in 1 week.\n */\nexport const secondsInWeek = secondsInDay * 7;\n\n/**\n * @constant\n * @name secondsInYear\n * @summary Seconds in 1 year.\n */\nexport const secondsInYear = secondsInDay * daysInYear;\n\n/**\n * @constant\n * @name secondsInMonth\n * @summary Seconds in 1 month\n */\nexport const secondsInMonth = secondsInYear / 12;\n\n/**\n * @constant\n * @name secondsInQuarter\n * @summary Seconds in 1 quarter.\n */\nexport const secondsInQuarter = secondsInMonth * 3;\n\n/**\n * @constant\n * @name constructFromSymbol\n * @summary Symbol enabling Date extensions to inherit properties from the reference date.\n *\n * The symbol is used to enable the `constructFrom` function to construct a date\n * using a reference date and a value. It allows to transfer extra properties\n * from the reference date to the new date. It's useful for extensions like\n * [`TZDate`](https://github.com/date-fns/tz) that accept a time zone as\n * a constructor argument.\n */\nexport const constructFromSymbol = Symbol.for(\"constructDateFrom\");\n","import { constructFromSymbol } from \"./constants.js\";\n\n/**\n * @name constructFrom\n * @category Generic Helpers\n * @summary Constructs a date using the reference date and the value\n *\n * @description\n * The function constructs a new date using the constructor from the reference\n * date and the given value. It helps to build generic functions that accept\n * date extensions.\n *\n * It defaults to `Date` if the passed reference date is a number or a string.\n *\n * Starting from v3.7.0, it allows to construct a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The reference date to take constructor from\n * @param value - The value to create the date\n *\n * @returns Date initialized using the given date and value\n *\n * @example\n * import { constructFrom } from \"./constructFrom/date-fns\";\n *\n * // A function that clones a date preserving the original type\n * function cloneDate<DateType extends Date>(date: DateType): DateType {\n * return constructFrom(\n * date, // Use constructor from the given date\n * date.getTime() // Use the date value to create a new date\n * );\n * }\n */\nexport function constructFrom(date, value) {\n if (typeof date === \"function\") return date(value);\n\n if (date && typeof date === \"object\" && constructFromSymbol in date)\n return date[constructFromSymbol](value);\n\n if (date instanceof Date) return new date.constructor(value);\n\n return new Date(value);\n}\n\n// Fallback for modularized imports:\nexport default constructFrom;\n","import { constructFrom } from \"./constructFrom.js\";\n\n/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * Starting from v3.7.0, it clones a date using `[Symbol.for(\"constructDateFrom\")]`\n * enabling to transfer extra properties from the reference date to the new date.\n * It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)\n * that accept a time zone as a constructor argument.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param argument - The value to convert\n *\n * @returns The parsed date in the local time zone\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\nexport function toDate(argument, context) {\n // [TODO] Get rid of `toDate` or `constructFrom`?\n return constructFrom(context || argument, argument);\n}\n\n// Fallback for modularized imports:\nexport default toDate;\n","import { toDate } from \"../toDate.js\";\n\n/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nexport function getTimezoneOffsetInMilliseconds(date) {\n const _date = toDate(date);\n const utcDate = new Date(\n Date.UTC(\n _date.getFullYear(),\n _date.getMonth(),\n _date.getDate(),\n _date.getHours(),\n _date.getMinutes(),\n _date.getSeconds(),\n _date.getMilliseconds(),\n ),\n );\n utcDate.setUTCFullYear(_date.getFullYear());\n return +date - +utcDate;\n}\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfDay} function options.\n */\n\n/**\n * @name startOfDay\n * @category Day Helpers\n * @summary Return the start of a day for the given date.\n *\n * @description\n * Return the start of a day for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The start of a day\n *\n * @example\n * // The start of a day for 2 September 2014 11:55:00:\n * const result = startOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 00:00:00\n */\nexport function startOfDay(date, options) {\n const _date = toDate(date, options?.in);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfDay;\n","import { differenceInCalendarDays } from \"./differenceInCalendarDays.js\";\nimport { startOfYear } from \"./startOfYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getDayOfYear} function options.\n */\n\n/**\n * @name getDayOfYear\n * @category Day Helpers\n * @summary Get the day of the year of the given date.\n *\n * @description\n * Get the day of the year of the given date.\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The day of year\n *\n * @example\n * // Which day of the year is 2 July 2014?\n * const result = getDayOfYear(new Date(2014, 6, 2))\n * //=> 183\n */\nexport function getDayOfYear(date, options) {\n const _date = toDate(date, options?.in);\n const diff = differenceInCalendarDays(_date, startOfYear(_date));\n const dayOfYear = diff + 1;\n return dayOfYear;\n}\n\n// Fallback for modularized imports:\nexport default getDayOfYear;\n","import { getTimezoneOffsetInMilliseconds } from \"./_lib/getTimezoneOffsetInMilliseconds.js\";\nimport { normalizeDates } from \"./_lib/normalizeDates.js\";\nimport { millisecondsInDay } from \"./constants.js\";\nimport { startOfDay } from \"./startOfDay.js\";\n\n/**\n * The {@link differenceInCalendarDays} function options.\n */\n\n/**\n * @name differenceInCalendarDays\n * @category Day Helpers\n * @summary Get the number of calendar days between the given dates.\n *\n * @description\n * Get the number of calendar days between the given dates. This means that the times are removed\n * from the dates and then the difference in days is calculated.\n *\n * @param laterDate - The later date\n * @param earlierDate - The earlier date\n * @param options - The options object\n *\n * @returns The number of calendar days\n *\n * @example\n * // How many calendar days are between\n * // 2 July 2011 23:00:00 and 2 July 2012 00:00:00?\n * const result = differenceInCalendarDays(\n * new Date(2012, 6, 2, 0, 0),\n * new Date(2011, 6, 2, 23, 0)\n * )\n * //=> 366\n * // How many calendar days are between\n * // 2 July 2011 23:59:00 and 3 July 2011 00:01:00?\n * const result = differenceInCalendarDays(\n * new Date(2011, 6, 3, 0, 1),\n * new Date(2011, 6, 2, 23, 59)\n * )\n * //=> 1\n */\nexport function differenceInCalendarDays(laterDate, earlierDate, options) {\n const [laterDate_, earlierDate_] = normalizeDates(\n options?.in,\n laterDate,\n earlierDate,\n );\n\n const laterStartOfDay = startOfDay(laterDate_);\n const earlierStartOfDay = startOfDay(earlierDate_);\n\n const laterTimestamp =\n +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);\n const earlierTimestamp =\n +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);\n\n // Round the number of days to the nearest integer because the number of\n // milliseconds in a day is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarDays;\n","import { constructFrom } from \"../constructFrom.js\";\n\nexport function normalizeDates(context, ...dates) {\n const normalize = constructFrom.bind(\n null,\n context || dates.find((date) => typeof date === \"object\"),\n );\n return dates.map(normalize);\n}\n","import { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfYear} function options.\n */\n\n/**\n * @name startOfYear\n * @category Year Helpers\n * @summary Return the start of a year for the given date.\n *\n * @description\n * Return the start of a year for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - The options\n *\n * @returns The start of a year\n *\n * @example\n * // The start of a year for 2 September 2014 11:55:00:\n * const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))\n * //=> Wed Jan 01 2014 00:00:00\n */\nexport function startOfYear(date, options) {\n const date_ = toDate(date, options?.in);\n date_.setFullYear(date_.getFullYear(), 0, 1);\n date_.setHours(0, 0, 0, 0);\n return date_;\n}\n\n// Fallback for modularized imports:\nexport default startOfYear;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link startOfWeek} function options.\n */\n\n/**\n * @name startOfWeek\n * @category Week Helpers\n * @summary Return the start of a week for the given date.\n *\n * @description\n * Return the start of a week for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a week\n *\n * @example\n * // The start of a week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Sun Aug 31 2014 00:00:00\n *\n * @example\n * // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:\n * const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfWeek(date, options) {\n const defaultOptions = getDefaultOptions();\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const _date = toDate(date, options?.in);\n const day = _date.getDay();\n const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;\n\n _date.setDate(_date.getDate() - diff);\n _date.setHours(0, 0, 0, 0);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfWeek;\n","import { startOfWeek } from \"./startOfWeek.js\";\n\n/**\n * The {@link startOfISOWeek} function options.\n */\n\n/**\n * @name startOfISOWeek\n * @category ISO Week Helpers\n * @summary Return the start of an ISO week for the given date.\n *\n * @description\n * Return the start of an ISO week for the given date.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of an ISO week\n *\n * @example\n * // The start of an ISO week for 2 September 2014 11:55:00:\n * const result = startOfISOWeek(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Mon Sep 01 2014 00:00:00\n */\nexport function startOfISOWeek(date, options) {\n return startOfWeek(date, { ...options, weekStartsOn: 1 });\n}\n\n// Fallback for modularized imports:\nexport default startOfISOWeek;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getISOWeekYear} function options.\n */\n\n/**\n * @name getISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Get the ISO week-numbering year of the given date.\n *\n * @description\n * Get the ISO week-numbering year of the given date,\n * which always starts 3 days before the year's first Thursday.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param date - The given date\n *\n * @returns The ISO week-numbering year\n *\n * @example\n * // Which ISO-week numbering year is 2 January 2005?\n * const result = getISOWeekYear(new Date(2005, 0, 2))\n * //=> 2004\n */\nexport function getISOWeekYear(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n\n const fourthOfJanuaryOfNextYear = constructFrom(_date, 0);\n fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);\n fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);\n const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);\n\n const fourthOfJanuaryOfThisYear = constructFrom(_date, 0);\n fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);\n fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);\n const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);\n\n if (_date.getTime() >= startOfNextYear.getTime()) {\n return year + 1;\n } else if (_date.getTime() >= startOfThisYear.getTime()) {\n return year;\n } else {\n return year - 1;\n }\n}\n\n// Fallback for modularized imports:\nexport default getISOWeekYear;\n","import { millisecondsInWeek } from \"./constants.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\nimport { startOfISOWeekYear } from \"./startOfISOWeekYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getISOWeek} function options.\n */\n\n/**\n * @name getISOWeek\n * @category ISO Week Helpers\n * @summary Get the ISO week of the given date.\n *\n * @description\n * Get the ISO week of the given date.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @param date - The given date\n * @param options - The options\n *\n * @returns The ISO week\n *\n * @example\n * // Which week of the ISO-week numbering year is 2 January 2005?\n * const result = getISOWeek(new Date(2005, 0, 2))\n * //=> 53\n */\nexport function getISOWeek(date, options) {\n const _date = toDate(date, options?.in);\n const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);\n\n // Round the number of weeks to the nearest integer because the number of\n // milliseconds in a week is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getISOWeek;\n","import { constructFrom } from \"./constructFrom.js\";\nimport { getISOWeekYear } from \"./getISOWeekYear.js\";\nimport { startOfISOWeek } from \"./startOfISOWeek.js\";\n\n/**\n * The {@link startOfISOWeekYear} function options.\n */\n\n/**\n * @name startOfISOWeekYear\n * @category ISO Week-Numbering Year Helpers\n * @summary Return the start of an ISO week-numbering year for the given date.\n *\n * @description\n * Return the start of an ISO week-numbering year,\n * which always starts 3 days before the year's first Thursday.\n * The result will be in the local timezone.\n *\n * ISO week-numbering year: http://en.wikipedia.org/wiki/ISO_week_date\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of an ISO week-numbering year\n *\n * @example\n * // The start of an ISO week-numbering year for 2 July 2005:\n * const result = startOfISOWeekYear(new Date(2005, 6, 2))\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfISOWeekYear(date, options) {\n const year = getISOWeekYear(date, options);\n const fourthOfJanuary = constructFrom(options?.in || date, 0);\n fourthOfJanuary.setFullYear(year, 0, 4);\n fourthOfJanuary.setHours(0, 0, 0, 0);\n return startOfISOWeek(fourthOfJanuary);\n}\n\n// Fallback for modularized imports:\nexport default startOfISOWeekYear;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getWeekYear} function options.\n */\n\n/**\n * @name getWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Get the local week-numbering year of the given date.\n *\n * @description\n * Get the local week-numbering year of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @param date - The given date\n * @param options - An object with options.\n *\n * @returns The local week-numbering year\n *\n * @example\n * // Which week numbering year is 26 December 2004 with the default settings?\n * const result = getWeekYear(new Date(2004, 11, 26))\n * //=> 2005\n *\n * @example\n * // Which week numbering year is 26 December 2004 if week starts on Saturday?\n * const result = getWeekYear(new Date(2004, 11, 26), { weekStartsOn: 6 })\n * //=> 2004\n *\n * @example\n * // Which week numbering year is 26 December 2004 if the first week contains 4 January?\n * const result = getWeekYear(new Date(2004, 11, 26), { firstWeekContainsDate: 4 })\n * //=> 2004\n */\nexport function getWeekYear(date, options) {\n const _date = toDate(date, options?.in);\n const year = _date.getFullYear();\n\n const defaultOptions = getDefaultOptions();\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const firstWeekOfNextYear = constructFrom(options?.in || date, 0);\n firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);\n firstWeekOfNextYear.setHours(0, 0, 0, 0);\n const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);\n\n const firstWeekOfThisYear = constructFrom(options?.in || date, 0);\n firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);\n firstWeekOfThisYear.setHours(0, 0, 0, 0);\n const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);\n\n if (+_date >= +startOfNextYear) {\n return year + 1;\n } else if (+_date >= +startOfThisYear) {\n return year;\n } else {\n return year - 1;\n }\n}\n\n// Fallback for modularized imports:\nexport default getWeekYear;\n","import { millisecondsInWeek } from \"./constants.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\nimport { startOfWeekYear } from \"./startOfWeekYear.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * The {@link getWeek} function options.\n */\n\n/**\n * @name getWeek\n * @category Week Helpers\n * @summary Get the local week index of the given date.\n *\n * @description\n * Get the local week index of the given date.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @param date - The given date\n * @param options - An object with options\n *\n * @returns The week\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005 with default options?\n * const result = getWeek(new Date(2005, 0, 2))\n * //=> 2\n *\n * @example\n * // Which week of the local week numbering year is 2 January 2005,\n * // if Monday is the first day of the week,\n * // and the first week of the year always contains 4 January?\n * const result = getWeek(new Date(2005, 0, 2), {\n * weekStartsOn: 1,\n * firstWeekContainsDate: 4\n * })\n * //=> 53\n */\nexport function getWeek(date, options) {\n const _date = toDate(date, options?.in);\n const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);\n\n // Round the number of weeks to the nearest integer because the number of\n // milliseconds in a week is not constant (e.g. it's different in the week of\n // the daylight saving time clock shift).\n return Math.round(diff / millisecondsInWeek) + 1;\n}\n\n// Fallback for modularized imports:\nexport default getWeek;\n","import { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { constructFrom } from \"./constructFrom.js\";\nimport { getWeekYear } from \"./getWeekYear.js\";\nimport { startOfWeek } from \"./startOfWeek.js\";\n\n/**\n * The {@link startOfWeekYear} function options.\n */\n\n/**\n * @name startOfWeekYear\n * @category Week-Numbering Year Helpers\n * @summary Return the start of a local week-numbering year for the given date.\n *\n * @description\n * Return the start of a local week-numbering year.\n * The exact calculation depends on the values of\n * `options.weekStartsOn` (which is the index of the first day of the week)\n * and `options.firstWeekContainsDate` (which is the day of January, which is always in\n * the first week of the week-numbering year)\n *\n * Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n * @typeParam ResultDate - The result `Date` type.\n *\n * @param date - The original date\n * @param options - An object with options\n *\n * @returns The start of a week-numbering year\n *\n * @example\n * // The start of an a week-numbering year for 2 July 2005 with default settings:\n * const result = startOfWeekYear(new Date(2005, 6, 2))\n * //=> Sun Dec 26 2004 00:00:00\n *\n * @example\n * // The start of a week-numbering year for 2 July 2005\n * // if Monday is the first day of week\n * // and 4 January is always in the first week of the year:\n * const result = startOfWeekYear(new Date(2005, 6, 2), {\n * weekStartsOn: 1,\n * firstWeekContainsDate: 4\n * })\n * //=> Mon Jan 03 2005 00:00:00\n */\nexport function startOfWeekYear(date, options) {\n const defaultOptions = getDefaultOptions();\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const year = getWeekYear(date, options);\n const firstWeek = constructFrom(options?.in || date, 0);\n firstWeek.setFullYear(year, 0, firstWeekContainsDate);\n firstWeek.setHours(0, 0, 0, 0);\n const _date = startOfWeek(firstWeek, options);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default startOfWeekYear;\n","export function addLeadingZeros(number, targetLength) {\n const sign = number < 0 ? \"-\" : \"\";\n const output = Math.abs(number).toString().padStart(targetLength, \"0\");\n return sign + output;\n}\n","import { addLeadingZeros } from \"../addLeadingZeros.js\";\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | |\n * | d | Day of month | D | |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | m | Minute | M | Month |\n * | s | Second | S | Fraction of second |\n * | y | Year (abs) | Y | |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n */\n\nexport const lightFormatters = {\n // Year\n y(date, token) {\n // From http://www.unicode.org/reports/tr35/tr35-31/tr35-dates.html#Date_Format_tokens\n // | Year | y | yy | yyy | yyyy | yyyyy |\n // |----------|-------|----|-------|-------|-------|\n // | AD 1 | 1 | 01 | 001 | 0001 | 00001 |\n // | AD 12 | 12 | 12 | 012 | 0012 | 00012 |\n // | AD 123 | 123 | 23 | 123 | 0123 | 00123 |\n // | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |\n // | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |\n\n const signedYear = date.getFullYear();\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const year = signedYear > 0 ? signedYear : 1 - signedYear;\n return addLeadingZeros(token === \"yy\" ? year % 100 : year, token.length);\n },\n\n // Month\n M(date, token) {\n const month = date.getMonth();\n return token === \"M\" ? String(month + 1) : addLeadingZeros(month + 1, 2);\n },\n\n // Day of the month\n d(date, token) {\n return addLeadingZeros(date.getDate(), token.length);\n },\n\n // AM or PM\n a(date, token) {\n const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? \"pm\" : \"am\";\n\n switch (token) {\n case \"a\":\n case \"aa\":\n return dayPeriodEnumValue.toUpperCase();\n case \"aaa\":\n return dayPeriodEnumValue;\n case \"aaaaa\":\n return dayPeriodEnumValue[0];\n case \"aaaa\":\n default:\n return dayPeriodEnumValue === \"am\" ? \"a.m.\" : \"p.m.\";\n }\n },\n\n // Hour [1-12]\n h(date, token) {\n return addLeadingZeros(date.getHours() % 12 || 12, token.length);\n },\n\n // Hour [0-23]\n H(date, token) {\n return addLeadingZeros(date.getHours(), token.length);\n },\n\n // Minute\n m(date, token) {\n return addLeadingZeros(date.getMinutes(), token.length);\n },\n\n // Second\n s(date, token) {\n return addLeadingZeros(date.getSeconds(), token.length);\n },\n\n // Fraction of second\n S(date, token) {\n const numberOfDigits = token.length;\n const milliseconds = date.getMilliseconds();\n const fractionalSeconds = Math.trunc(\n milliseconds * Math.pow(10, numberOfDigits - 3),\n );\n return addLeadingZeros(fractionalSeconds, token.length);\n },\n};\n","import { getDayOfYear } from \"../../getDayOfYear.js\";\nimport { getISOWeek } from \"../../getISOWeek.js\";\nimport { getISOWeekYear } from \"../../getISOWeekYear.js\";\nimport { getWeek } from \"../../getWeek.js\";\nimport { getWeekYear } from \"../../getWeekYear.js\";\n\nimport { addLeadingZeros } from \"../addLeadingZeros.js\";\nimport { lightFormatters } from \"./lightFormatters.js\";\n\nconst dayPeriodEnum = {\n am: \"am\",\n pm: \"pm\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n};\n\n/*\n * | | Unit | | Unit |\n * |-----|--------------------------------|-----|--------------------------------|\n * | a | AM, PM | A* | Milliseconds in day |\n * | b | AM, PM, noon, midnight | B | Flexible day period |\n * | c | Stand-alone local day of week | C* | Localized hour w/ day period |\n * | d | Day of month | D | Day of year |\n * | e | Local day of week | E | Day of week |\n * | f | | F* | Day of week in month |\n * | g* | Modified Julian day | G | Era |\n * | h | Hour [1-12] | H | Hour [0-23] |\n * | i! | ISO day of week | I! | ISO week of year |\n * | j* | Localized hour w/ day period | J* | Localized hour w/o day period |\n * | k | Hour [1-24] | K | Hour [0-11] |\n * | l* | (deprecated) | L | Stand-alone month |\n * | m | Minute | M | Month |\n * | n | | N | |\n * | o! | Ordinal number modifier | O | Timezone (GMT) |\n * | p! | Long localized time | P! | Long localized date |\n * | q | Stand-alone quarter | Q | Quarter |\n * | r* | Related Gregorian year | R! | ISO week-numbering year |\n * | s | Second | S | Fraction of second |\n * | t! | Seconds timestamp | T! | Milliseconds timestamp |\n * | u | Extended year | U* | Cyclic year |\n * | v* | Timezone (generic non-locat.) | V* | Timezone (location) |\n * | w | Local week of year | W* | Week of month |\n * | x | Timezone (ISO-8601 w/o Z) | X | Timezone (ISO-8601) |\n * | y | Year (abs) | Y | Local week-numbering year |\n * | z | Timezone (specific non-locat.) | Z* | Timezone (aliases) |\n *\n * Letters marked by * are not implemented but reserved by Unicode standard.\n *\n * Letters marked by ! are non-standard, but implemented by date-fns:\n * - `o` modifies the previous token to turn it into an ordinal (see `format` docs)\n * - `i` is ISO day of week. For `i` and `ii` is returns numeric ISO week days,\n * i.e. 7 for Sunday, 1 for Monday, etc.\n * - `I` is ISO week of year, as opposed to `w` which is local week of year.\n * - `R` is ISO week-numbering year, as opposed to `Y` which is local week-numbering year.\n * `R` is supposed to be used in conjunction with `I` and `i`\n * for universal ISO week-numbering date, whereas\n * `Y` is supposed to be used in conjunction with `w` and `e`\n * for week-numbering date specific to the locale.\n * - `P` is long localized date format\n * - `p` is long localized time format\n */\n\nexport const formatters = {\n // Era\n G: function (date, token, localize) {\n const era = date.getFullYear() > 0 ? 1 : 0;\n switch (token) {\n // AD, BC\n case \"G\":\n case \"GG\":\n case \"GGG\":\n return localize.era(era, { width: \"abbreviated\" });\n // A, B\n case \"GGGGG\":\n return localize.era(era, { width: \"narrow\" });\n // Anno Domini, Before Christ\n case \"GGGG\":\n default:\n return localize.era(era, { width: \"wide\" });\n }\n },\n\n // Year\n y: function (date, token, localize) {\n // Ordinal number\n if (token === \"yo\") {\n const signedYear = date.getFullYear();\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const year = signedYear > 0 ? signedYear : 1 - signedYear;\n return localize.ordinalNumber(year, { unit: \"year\" });\n }\n\n return lightFormatters.y(date, token);\n },\n\n // Local week-numbering year\n Y: function (date, token, localize, options) {\n const signedWeekYear = getWeekYear(date, options);\n // Returns 1 for 1 BC (which is year 0 in JavaScript)\n const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;\n\n // Two digit year\n if (token === \"YY\") {\n const twoDigitYear = weekYear % 100;\n return addLeadingZeros(twoDigitYear, 2);\n }\n\n // Ordinal number\n if (token === \"Yo\") {\n return localize.ordinalNumber(weekYear, { unit: \"year\" });\n }\n\n // Padding\n return addLeadingZeros(weekYear, token.length);\n },\n\n // ISO week-numbering year\n R: function (date, token) {\n const isoWeekYear = getISOWeekYear(date);\n\n // Padding\n return addLeadingZeros(isoWeekYear, token.length);\n },\n\n // Extended year. This is a single number designating the year of this calendar system.\n // The main difference between `y` and `u` localizers are B.C. years:\n // | Year | `y` | `u` |\n // |------|-----|-----|\n // | AC 1 | 1 | 1 |\n // | BC 1 | 1 | 0 |\n // | BC 2 | 2 | -1 |\n // Also `yy` always returns the last two digits of a year,\n // while `uu` pads single digit years to 2 characters and returns other years unchanged.\n u: function (date, token) {\n const year = date.getFullYear();\n return addLeadingZeros(year, token.length);\n },\n\n // Quarter\n Q: function (date, token, localize) {\n const quarter = Math.ceil((date.getMonth() + 1) / 3);\n switch (token) {\n // 1, 2, 3, 4\n case \"Q\":\n return String(quarter);\n // 01, 02, 03, 04\n case \"QQ\":\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n case \"Qo\":\n return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n // Q1, Q2, Q3, Q4\n case \"QQQ\":\n return localize.quarter(quarter, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case \"QQQQQ\":\n return localize.quarter(quarter, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // 1st quarter, 2nd quarter, ...\n case \"QQQQ\":\n default:\n return localize.quarter(quarter, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Stand-alone quarter\n q: function (date, token, localize) {\n const quarter = Math.ceil((date.getMonth() + 1) / 3);\n switch (token) {\n // 1, 2, 3, 4\n case \"q\":\n return String(quarter);\n // 01, 02, 03, 04\n case \"qq\":\n return addLeadingZeros(quarter, 2);\n // 1st, 2nd, 3rd, 4th\n case \"qo\":\n return localize.ordinalNumber(quarter, { unit: \"quarter\" });\n // Q1, Q2, Q3, Q4\n case \"qqq\":\n return localize.quarter(quarter, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // 1, 2, 3, 4 (narrow quarter; could be not numerical)\n case \"qqqqq\":\n return localize.quarter(quarter, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // 1st quarter, 2nd quarter, ...\n case \"qqqq\":\n default:\n return localize.quarter(quarter, {\n width: \"wide\",\n context: \"standalone\",\n });\n }\n },\n\n // Month\n M: function (date, token, localize) {\n const month = date.getMonth();\n switch (token) {\n case \"M\":\n case \"MM\":\n return lightFormatters.M(date, token);\n // 1st, 2nd, ..., 12th\n case \"Mo\":\n return localize.ordinalNumber(month + 1, { unit: \"month\" });\n // Jan, Feb, ..., Dec\n case \"MMM\":\n return localize.month(month, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // J, F, ..., D\n case \"MMMMM\":\n return localize.month(month, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // January, February, ..., December\n case \"MMMM\":\n default:\n return localize.month(month, { width: \"wide\", context: \"formatting\" });\n }\n },\n\n // Stand-alone month\n L: function (date, token, localize) {\n const month = date.getMonth();\n switch (token) {\n // 1, 2, ..., 12\n case \"L\":\n return String(month + 1);\n // 01, 02, ..., 12\n case \"LL\":\n return addLeadingZeros(month + 1, 2);\n // 1st, 2nd, ..., 12th\n case \"Lo\":\n return localize.ordinalNumber(month + 1, { unit: \"month\" });\n // Jan, Feb, ..., Dec\n case \"LLL\":\n return localize.month(month, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // J, F, ..., D\n case \"LLLLL\":\n return localize.month(month, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // January, February, ..., December\n case \"LLLL\":\n default:\n return localize.month(month, { width: \"wide\", context: \"standalone\" });\n }\n },\n\n // Local week of year\n w: function (date, token, localize, options) {\n const week = getWeek(date, options);\n\n if (token === \"wo\") {\n return localize.ordinalNumber(week, { unit: \"week\" });\n }\n\n return addLeadingZeros(week, token.length);\n },\n\n // ISO week of year\n I: function (date, token, localize) {\n const isoWeek = getISOWeek(date);\n\n if (token === \"Io\") {\n return localize.ordinalNumber(isoWeek, { unit: \"week\" });\n }\n\n return addLeadingZeros(isoWeek, token.length);\n },\n\n // Day of the month\n d: function (date, token, localize) {\n if (token === \"do\") {\n return localize.ordinalNumber(date.getDate(), { unit: \"date\" });\n }\n\n return lightFormatters.d(date, token);\n },\n\n // Day of year\n D: function (date, token, localize) {\n const dayOfYear = getDayOfYear(date);\n\n if (token === \"Do\") {\n return localize.ordinalNumber(dayOfYear, { unit: \"dayOfYear\" });\n }\n\n return addLeadingZeros(dayOfYear, token.length);\n },\n\n // Day of week\n E: function (date, token, localize) {\n const dayOfWeek = date.getDay();\n switch (token) {\n // Tue\n case \"E\":\n case \"EE\":\n case \"EEE\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"EEEEE\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"EEEEEE\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"EEEE\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Local day of week\n e: function (date, token, localize, options) {\n const dayOfWeek = date.getDay();\n const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n switch (token) {\n // Numerical value (Nth day of week with current locale or weekStartsOn)\n case \"e\":\n return String(localDayOfWeek);\n // Padded numerical value\n case \"ee\":\n return addLeadingZeros(localDayOfWeek, 2);\n // 1st, 2nd, ..., 7th\n case \"eo\":\n return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n case \"eee\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"eeeee\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"eeeeee\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"eeee\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Stand-alone local day of week\n c: function (date, token, localize, options) {\n const dayOfWeek = date.getDay();\n const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;\n switch (token) {\n // Numerical value (same as in `e`)\n case \"c\":\n return String(localDayOfWeek);\n // Padded numerical value\n case \"cc\":\n return addLeadingZeros(localDayOfWeek, token.length);\n // 1st, 2nd, ..., 7th\n case \"co\":\n return localize.ordinalNumber(localDayOfWeek, { unit: \"day\" });\n case \"ccc\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"standalone\",\n });\n // T\n case \"ccccc\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"standalone\",\n });\n // Tu\n case \"cccccc\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"standalone\",\n });\n // Tuesday\n case \"cccc\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"standalone\",\n });\n }\n },\n\n // ISO day of week\n i: function (date, token, localize) {\n const dayOfWeek = date.getDay();\n const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;\n switch (token) {\n // 2\n case \"i\":\n return String(isoDayOfWeek);\n // 02\n case \"ii\":\n return addLeadingZeros(isoDayOfWeek, token.length);\n // 2nd\n case \"io\":\n return localize.ordinalNumber(isoDayOfWeek, { unit: \"day\" });\n // Tue\n case \"iii\":\n return localize.day(dayOfWeek, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n // T\n case \"iiiii\":\n return localize.day(dayOfWeek, {\n width: \"narrow\",\n context: \"formatting\",\n });\n // Tu\n case \"iiiiii\":\n return localize.day(dayOfWeek, {\n width: \"short\",\n context: \"formatting\",\n });\n // Tuesday\n case \"iiii\":\n default:\n return localize.day(dayOfWeek, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // AM or PM\n a: function (date, token, localize) {\n const hours = date.getHours();\n const dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n\n switch (token) {\n case \"a\":\n case \"aa\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"aaa\":\n return localize\n .dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n })\n .toLowerCase();\n case \"aaaaa\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"aaaa\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // AM, PM, midnight, noon\n b: function (date, token, localize) {\n const hours = date.getHours();\n let dayPeriodEnumValue;\n if (hours === 12) {\n dayPeriodEnumValue = dayPeriodEnum.noon;\n } else if (hours === 0) {\n dayPeriodEnumValue = dayPeriodEnum.midnight;\n } else {\n dayPeriodEnumValue = hours / 12 >= 1 ? \"pm\" : \"am\";\n }\n\n switch (token) {\n case \"b\":\n case \"bb\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"bbb\":\n return localize\n .dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n })\n .toLowerCase();\n case \"bbbbb\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"bbbb\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // in the morning, in the afternoon, in the evening, at night\n B: function (date, token, localize) {\n const hours = date.getHours();\n let dayPeriodEnumValue;\n if (hours >= 17) {\n dayPeriodEnumValue = dayPeriodEnum.evening;\n } else if (hours >= 12) {\n dayPeriodEnumValue = dayPeriodEnum.afternoon;\n } else if (hours >= 4) {\n dayPeriodEnumValue = dayPeriodEnum.morning;\n } else {\n dayPeriodEnumValue = dayPeriodEnum.night;\n }\n\n switch (token) {\n case \"B\":\n case \"BB\":\n case \"BBB\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"abbreviated\",\n context: \"formatting\",\n });\n case \"BBBBB\":\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"narrow\",\n context: \"formatting\",\n });\n case \"BBBB\":\n default:\n return localize.dayPeriod(dayPeriodEnumValue, {\n width: \"wide\",\n context: \"formatting\",\n });\n }\n },\n\n // Hour [1-12]\n h: function (date, token, localize) {\n if (token === \"ho\") {\n let hours = date.getHours() % 12;\n if (hours === 0) hours = 12;\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return lightFormatters.h(date, token);\n },\n\n // Hour [0-23]\n H: function (date, token, localize) {\n if (token === \"Ho\") {\n return localize.ordinalNumber(date.getHours(), { unit: \"hour\" });\n }\n\n return lightFormatters.H(date, token);\n },\n\n // Hour [0-11]\n K: function (date, token, localize) {\n const hours = date.getHours() % 12;\n\n if (token === \"Ko\") {\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n\n // Hour [1-24]\n k: function (date, token, localize) {\n let hours = date.getHours();\n if (hours === 0) hours = 24;\n\n if (token === \"ko\") {\n return localize.ordinalNumber(hours, { unit: \"hour\" });\n }\n\n return addLeadingZeros(hours, token.length);\n },\n\n // Minute\n m: function (date, token, localize) {\n if (token === \"mo\") {\n return localize.ordinalNumber(date.getMinutes(), { unit: \"minute\" });\n }\n\n return lightFormatters.m(date, token);\n },\n\n // Second\n s: function (date, token, localize) {\n if (token === \"so\") {\n return localize.ordinalNumber(date.getSeconds(), { unit: \"second\" });\n }\n\n return lightFormatters.s(date, token);\n },\n\n // Fraction of second\n S: function (date, token) {\n return lightFormatters.S(date, token);\n },\n\n // Timezone (ISO-8601. If offset is 0, output is always `'Z'`)\n X: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n if (timezoneOffset === 0) {\n return \"Z\";\n }\n\n switch (token) {\n // Hours and optional minutes\n case \"X\":\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XX`\n case \"XXXX\":\n case \"XX\": // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `XXX`\n case \"XXXXX\":\n case \"XXX\": // Hours and minutes with `:` delimiter\n default:\n return formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)\n x: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Hours and optional minutes\n case \"x\":\n return formatTimezoneWithOptionalMinutes(timezoneOffset);\n\n // Hours, minutes and optional seconds without `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xx`\n case \"xxxx\":\n case \"xx\": // Hours and minutes without `:` delimiter\n return formatTimezone(timezoneOffset);\n\n // Hours, minutes and optional seconds with `:` delimiter\n // Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets\n // so this token always has the same output as `xxx`\n case \"xxxxx\":\n case \"xxx\": // Hours and minutes with `:` delimiter\n default:\n return formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (GMT)\n O: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Short\n case \"O\":\n case \"OO\":\n case \"OOO\":\n return \"GMT\" + formatTimezoneShort(timezoneOffset, \":\");\n // Long\n case \"OOOO\":\n default:\n return \"GMT\" + formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Timezone (specific non-location)\n z: function (date, token, _localize) {\n const timezoneOffset = date.getTimezoneOffset();\n\n switch (token) {\n // Short\n case \"z\":\n case \"zz\":\n case \"zzz\":\n return \"GMT\" + formatTimezoneShort(timezoneOffset, \":\");\n // Long\n case \"zzzz\":\n default:\n return \"GMT\" + formatTimezone(timezoneOffset, \":\");\n }\n },\n\n // Seconds timestamp\n t: function (date, token, _localize) {\n const timestamp = Math.trunc(+date / 1000);\n return addLeadingZeros(timestamp, token.length);\n },\n\n // Milliseconds timestamp\n T: function (date, token, _localize) {\n return addLeadingZeros(+date, token.length);\n },\n};\n\nfunction formatTimezoneShort(offset, delimiter = \"\") {\n const sign = offset > 0 ? \"-\" : \"+\";\n const absOffset = Math.abs(offset);\n const hours = Math.trunc(absOffset / 60);\n const minutes = absOffset % 60;\n if (minutes === 0) {\n return sign + String(hours);\n }\n return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);\n}\n\nfunction formatTimezoneWithOptionalMinutes(offset, delimiter) {\n if (offset % 60 === 0) {\n const sign = offset > 0 ? \"-\" : \"+\";\n return sign + addLeadingZeros(Math.abs(offset) / 60, 2);\n }\n return formatTimezone(offset, delimiter);\n}\n\nfunction formatTimezone(offset, delimiter = \"\") {\n const sign = offset > 0 ? \"-\" : \"+\";\n const absOffset = Math.abs(offset);\n const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);\n const minutes = addLeadingZeros(absOffset % 60, 2);\n return sign + hours + delimiter + minutes;\n}\n","const dateLongFormatter = (pattern, formatLong) => {\n switch (pattern) {\n case \"P\":\n return formatLong.date({ width: \"short\" });\n case \"PP\":\n return formatLong.date({ width: \"medium\" });\n case \"PPP\":\n return formatLong.date({ width: \"long\" });\n case \"PPPP\":\n default:\n return formatLong.date({ width: \"full\" });\n }\n};\n\nconst timeLongFormatter = (pattern, formatLong) => {\n switch (pattern) {\n case \"p\":\n return formatLong.time({ width: \"short\" });\n case \"pp\":\n return formatLong.time({ width: \"medium\" });\n case \"ppp\":\n return formatLong.time({ width: \"long\" });\n case \"pppp\":\n default:\n return formatLong.time({ width: \"full\" });\n }\n};\n\nconst dateTimeLongFormatter = (pattern, formatLong) => {\n const matchResult = pattern.match(/(P+)(p+)?/) || [];\n const datePattern = matchResult[1];\n const timePattern = matchResult[2];\n\n if (!timePattern) {\n return dateLongFormatter(pattern, formatLong);\n }\n\n let dateTimeFormat;\n\n switch (datePattern) {\n case \"P\":\n dateTimeFormat = formatLong.dateTime({ width: \"short\" });\n break;\n case \"PP\":\n dateTimeFormat = formatLong.dateTime({ width: \"medium\" });\n break;\n case \"PPP\":\n dateTimeFormat = formatLong.dateTime({ width: \"long\" });\n break;\n case \"PPPP\":\n default:\n dateTimeFormat = formatLong.dateTime({ width: \"full\" });\n break;\n }\n\n return dateTimeFormat\n .replace(\"{{date}}\", dateLongFormatter(datePattern, formatLong))\n .replace(\"{{time}}\", timeLongFormatter(timePattern, formatLong));\n};\n\nexport const longFormatters = {\n p: timeLongFormatter,\n P: dateTimeLongFormatter,\n};\n","const dayOfYearTokenRE = /^D+$/;\nconst weekYearTokenRE = /^Y+$/;\n\nconst throwTokens = [\"D\", \"DD\", \"YY\", \"YYYY\"];\n\nexport function isProtectedDayOfYearToken(token) {\n return dayOfYearTokenRE.test(token);\n}\n\nexport function isProtectedWeekYearToken(token) {\n return weekYearTokenRE.test(token);\n}\n\nexport function warnOrThrowProtectedError(token, format, input) {\n const _message = message(token, format, input);\n console.warn(_message);\n if (throwTokens.includes(token)) throw new RangeError(_message);\n}\n\nfunction message(token, format, input) {\n const subject = token[0] === \"Y\" ? \"years\" : \"days of the month\";\n return `Use \\`${token.toLowerCase()}\\` instead of \\`${token}\\` (in \\`${format}\\`) for formatting ${subject} to the input \\`${input}\\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;\n}\n","import { isDate } from \"./isDate.js\";\nimport { toDate } from \"./toDate.js\";\n\n/**\n * @name isValid\n * @category Common Helpers\n * @summary Is the given date valid?\n *\n * @description\n * Returns false if argument is Invalid Date and true otherwise.\n * Argument is converted to Date using `toDate`. See [toDate](https://date-fns.org/docs/toDate)\n * Invalid Date is a Date, whose time value is NaN.\n *\n * Time value of Date: http://es5.github.io/#x15.9.1.1\n *\n * @param date - The date to check\n *\n * @returns The date is valid\n *\n * @example\n * // For the valid date:\n * const result = isValid(new Date(2014, 1, 31))\n * //=> true\n *\n * @example\n * // For the value, convertible into a date:\n * const result = isValid(1393804800000)\n * //=> true\n *\n * @example\n * // For the invalid date:\n * const result = isValid(new Date(''))\n * //=> false\n */\nexport function isValid(date) {\n return !((!isDate(date) && typeof date !== \"number\") || isNaN(+toDate(date)));\n}\n\n// Fallback for modularized imports:\nexport default isValid;\n","/**\n * @name isDate\n * @category Common Helpers\n * @summary Is the given value a date?\n *\n * @description\n * Returns true if the given value is an instance of Date. The function works for dates transferred across iframes.\n *\n * @param value - The value to check\n *\n * @returns True if the given value is a date\n *\n * @example\n * // For a valid date:\n * const result = isDate(new Date())\n * //=> true\n *\n * @example\n * // For an invalid date:\n * const result = isDate(new Date(NaN))\n * //=> true\n *\n * @example\n * // For some value:\n * const result = isDate('2014-02-31')\n * //=> false\n *\n * @example\n * // For an object:\n * const result = isDate({})\n * //=> false\n */\nexport function isDate(value) {\n return (\n value instanceof Date ||\n (typeof value === \"object\" &&\n Object.prototype.toString.call(value) === \"[object Date]\")\n );\n}\n\n// Fallback for modularized imports:\nexport default isDate;\n","import { defaultLocale } from \"./_lib/defaultLocale.js\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.js\";\nimport { formatters } from \"./_lib/format/formatters.js\";\nimport { longFormatters } from \"./_lib/format/longFormatters.js\";\nimport {\n isProtectedDayOfYearToken,\n isProtectedWeekYearToken,\n warnOrThrowProtectedError,\n} from \"./_lib/protectedTokens.js\";\nimport { isValid } from \"./isValid.js\";\nimport { toDate } from \"./toDate.js\";\n\n// Rexports of internal for libraries to use.\n// See: https://github.com/date-fns/date-fns/issues/3638#issuecomment-1877082874\nexport { formatters, longFormatters };\n\n// This RegExp consists of three parts separated by `|`:\n// - [yYQqMLwIdDecihHKkms]o matches any available ordinal number token\n// (one of the certain letters followed by `o`)\n// - (\\w)\\1* matches any sequences of the same letter\n// - '' matches two quote characters in a row\n// - '(''|[^'])+('|$) matches anything surrounded by two quote characters ('),\n// except a single quote symbol, which ends the sequence.\n// Two quote characters do not end the sequence.\n// If there is no matching single quote\n// then the sequence will continue until the end of the string.\n// - . matches any single character unmatched by previous parts of the RegExps\nconst formattingTokensRegExp =\n /[yYQqMLwIdDecihHKkms]o|(\\w)\\1*|''|'(''|[^'])+('|$)|./g;\n\n// This RegExp catches symbols escaped by quotes, and also\n// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`\nconst longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;\n\nconst escapedStringRegExp = /^'([^]*?)'?$/;\nconst doubleQuoteRegExp = /''/g;\nconst unescapedLatinCharacterRegExp = /[a-zA-Z]/;\n\nexport { format as formatDate };\n\n/**\n * The {@link format} function options.\n */\n\n/**\n * @name format\n * @alias formatDate\n * @category Common Helpers\n * @summary Format the date.\n *\n * @description\n * Return the formatted date string in the given format. The result may vary by locale.\n *\n * > ⚠️ Please note that the `format` tokens differ from Moment.js and other libraries.\n * > See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * The characters wrapped between two single quotes characters (') are escaped.\n * Two single quotes in a row, whether inside or outside a quoted sequence, represent a 'real' single quote.\n * (see the last example)\n *\n * Format of the string is based on Unicode Technical Standard #35:\n * https://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table\n * with a few additions (see note 7 below the table).\n *\n * Accepted patterns:\n * | Unit | Pattern | Result examples | Notes |\n * |---------------------------------|---------|-----------------------------------|-------|\n * | Era | G..GGG | AD, BC | |\n * | | GGGG | Anno Domini, Before Christ | 2 |\n * | | GGGGG | A, B | |\n * | Calendar year | y | 44, 1, 1900, 2017 | 5 |\n * | | yo | 44th, 1st, 0th, 17th | 5,7 |\n * | | yy | 44, 01, 00, 17 | 5 |\n * | | yyy | 044, 001, 1900, 2017 | 5 |\n * | | yyyy | 0044, 0001, 1900, 2017 | 5 |\n * | | yyyyy | ... | 3,5 |\n * | Local week-numbering year | Y | 44, 1, 1900, 2017 | 5 |\n * | | Yo | 44th, 1st, 1900th, 2017th | 5,7 |\n * | | YY | 44, 01, 00, 17 | 5,8 |\n * | | YYY | 044, 001, 1900, 2017 | 5 |\n * | | YYYY | 0044, 0001, 1900, 2017 | 5,8 |\n * | | YYYYY | ... | 3,5 |\n * | ISO week-numbering year | R | -43, 0, 1, 1900, 2017 | 5,7 |\n * | | RR | -43, 00, 01, 1900, 2017 | 5,7 |\n * | | RRR | -043, 000, 001, 1900, 2017 | 5,7 |\n * | | RRRR | -0043, 0000, 0001, 1900, 2017 | 5,7 |\n * | | RRRRR | ... | 3,5,7 |\n * | Extended year | u | -43, 0, 1, 1900, 2017 | 5 |\n * | | uu | -43, 01, 1900, 2017 | 5 |\n * | | uuu | -043, 001, 1900, 2017 | 5 |\n * | | uuuu | -0043, 0001, 1900, 2017 | 5 |\n * | | uuuuu | ... | 3,5 |\n * | Quarter (formatting) | Q | 1, 2, 3, 4 | |\n * | | Qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | QQ | 01, 02, 03, 04 | |\n * | | QQQ | Q1, Q2, Q3, Q4 | |\n * | | QQQQ | 1st quarter, 2nd quarter, ... | 2 |\n * | | QQQQQ | 1, 2, 3, 4 | 4 |\n * | Quarter (stand-alone) | q | 1, 2, 3, 4 | |\n * | | qo | 1st, 2nd, 3rd, 4th | 7 |\n * | | qq | 01, 02, 03, 04 | |\n * | | qqq | Q1, Q2, Q3, Q4 | |\n * | | qqqq | 1st quarter, 2nd quarter, ... | 2 |\n * | | qqqqq | 1, 2, 3, 4 | 4 |\n * | Month (formatting) | M | 1, 2, ..., 12 | |\n * | | Mo | 1st, 2nd, ..., 12th | 7 |\n * | | MM | 01, 02, ..., 12 | |\n * | | MMM | Jan, Feb, ..., Dec | |\n * | | MMMM | January, February, ..., December | 2 |\n * | | MMMMM | J, F, ..., D | |\n * | Month (stand-alone) | L | 1, 2, ..., 12 | |\n * | | Lo | 1st, 2nd, ..., 12th | 7 |\n * | | LL | 01, 02, ..., 12 | |\n * | | LLL | Jan, Feb, ..., Dec | |\n * | | LLLL | January, February, ..., December | 2 |\n * | | LLLLL | J, F, ..., D | |\n * | Local week of year | w | 1, 2, ..., 53 | |\n * | | wo | 1st, 2nd, ..., 53th | 7 |\n * | | ww | 01, 02, ..., 53 | |\n * | ISO week of year | I | 1, 2, ..., 53 | 7 |\n * | | Io | 1st, 2nd, ..., 53th | 7 |\n * | | II | 01, 02, ..., 53 | 7 |\n * | Day of month | d | 1, 2, ..., 31 | |\n * | | do | 1st, 2nd, ..., 31st | 7 |\n * | | dd | 01, 02, ..., 31 | |\n * | Day of year | D | 1, 2, ..., 365, 366 | 9 |\n * | | Do | 1st, 2nd, ..., 365th, 366th | 7 |\n * | | DD | 01, 02, ..., 365, 366 | 9 |\n * | | DDD | 001, 002, ..., 365, 366 | |\n * | | DDDD | ... | 3 |\n * | Day of week (formatting) | E..EEE | Mon, Tue, Wed, ..., Sun | |\n * | | EEEE | Monday, Tuesday, ..., Sunday | 2 |\n * | | EEEEE | M, T, W, T, F, S, S | |\n * | | EEEEEE | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | ISO day of week (formatting) | i | 1, 2, 3, ..., 7 | 7 |\n * | | io | 1st, 2nd, ..., 7th | 7 |\n * | | ii | 01, 02, ..., 07 | 7 |\n * | | iii | Mon, Tue, Wed, ..., Sun | 7 |\n * | | iiii | Monday, Tuesday, ..., Sunday | 2,7 |\n * | | iiiii | M, T, W, T, F, S, S | 7 |\n * | | iiiiii | Mo, Tu, We, Th, Fr, Sa, Su | 7 |\n * | Local day of week (formatting) | e | 2, 3, 4, ..., 1 | |\n * | | eo | 2nd, 3rd, ..., 1st | 7 |\n * | | ee | 02, 03, ..., 01 | |\n * | | eee | Mon, Tue, Wed, ..., Sun | |\n * | | eeee | Monday, Tuesday, ..., Sunday | 2 |\n * | | eeeee | M, T, W, T, F, S, S | |\n * | | eeeeee | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | Local day of week (stand-alone) | c | 2, 3, 4, ..., 1 | |\n * | | co | 2nd, 3rd, ..., 1st | 7 |\n * | | cc | 02, 03, ..., 01 | |\n * | | ccc | Mon, Tue, Wed, ..., Sun | |\n * | | cccc | Monday, Tuesday, ..., Sunday | 2 |\n * | | ccccc | M, T, W, T, F, S, S | |\n * | | cccccc | Mo, Tu, We, Th, Fr, Sa, Su | |\n * | AM, PM | a..aa | AM, PM | |\n * | | aaa | am, pm | |\n * | | aaaa | a.m., p.m. | 2 |\n * | | aaaaa | a, p | |\n * | AM, PM, noon, midnight | b..bb | AM, PM, noon, midnight | |\n * | | bbb | am, pm, noon, midnight | |\n * | | bbbb | a.m., p.m., noon, midnight | 2 |\n * | | bbbbb | a, p, n, mi | |\n * | Flexible day period | B..BBB | at night, in the morning, ... | |\n * | | BBBB | at night, in the morning, ... | 2 |\n * | | BBBBB | at night, in the morning, ... | |\n * | Hour [1-12] | h | 1, 2, ..., 11, 12 | |\n * | | ho | 1st, 2nd, ..., 11th, 12th | 7 |\n * | | hh | 01, 02, ..., 11, 12 | |\n * | Hour [0-23] | H | 0, 1, 2, ..., 23 | |\n * | | Ho | 0th, 1st, 2nd, ..., 23rd | 7 |\n * | | HH | 00, 01, 02, ..., 23 | |\n * | Hour [0-11] | K | 1, 2, ..., 11, 0 | |\n * | | Ko | 1st, 2nd, ..., 11th, 0th | 7 |\n * | | KK | 01, 02, ..., 11, 00 | |\n * | Hour [1-24] | k | 24, 1, 2, ..., 23 | |\n * | | ko | 24th, 1st, 2nd, ..., 23rd | 7 |\n * | | kk | 24, 01, 02, ..., 23 | |\n * | Minute | m | 0, 1, ..., 59 | |\n * | | mo | 0th, 1st, ..., 59th | 7 |\n * | | mm | 00, 01, ..., 59 | |\n * | Second | s | 0, 1, ..., 59 | |\n * | | so | 0th, 1st, ..., 59th | 7 |\n * | | ss | 00, 01, ..., 59 | |\n * | Fraction of second | S | 0, 1, ..., 9 | |\n * | | SS | 00, 01, ..., 99 | |\n * | | SSS | 000, 001, ..., 999 | |\n * | | SSSS | ... | 3 |\n * | Timezone (ISO-8601 w/ Z) | X | -08, +0530, Z | |\n * | | XX | -0800, +0530, Z | |\n * | | XXX | -08:00, +05:30, Z | |\n * | | XXXX | -0800, +0530, Z, +123456 | 2 |\n * | | XXXXX | -08:00, +05:30, Z, +12:34:56 | |\n * | Timezone (ISO-8601 w/o Z) | x | -08, +0530, +00 | |\n * | | xx | -0800, +0530, +0000 | |\n * | | xxx | -08:00, +05:30, +00:00 | 2 |\n * | | xxxx | -0800, +0530, +0000, +123456 | |\n * | | xxxxx | -08:00, +05:30, +00:00, +12:34:56 | |\n * | Timezone (GMT) | O...OOO | GMT-8, GMT+5:30, GMT+0 | |\n * | | OOOO | GMT-08:00, GMT+05:30, GMT+00:00 | 2 |\n * | Timezone (specific non-locat.) | z...zzz | GMT-8, GMT+5:30, GMT+0 | 6 |\n * | | zzzz | GMT-08:00, GMT+05:30, GMT+00:00 | 2,6 |\n * | Seconds timestamp | t | 512969520 | 7 |\n * | | tt | ... | 3,7 |\n * | Milliseconds timestamp | T | 512969520900 | 7 |\n * | | TT | ... | 3,7 |\n * | Long localized date | P | 04/29/1453 | 7 |\n * | | PP | Apr 29, 1453 | 7 |\n * | | PPP | April 29th, 1453 | 7 |\n * | | PPPP | Friday, April 29th, 1453 | 2,7 |\n * | Long localized time | p | 12:00 AM | 7 |\n * | | pp | 12:00:00 AM | 7 |\n * | | ppp | 12:00:00 AM GMT+2 | 7 |\n * | | pppp | 12:00:00 AM GMT+02:00 | 2,7 |\n * | Combination of date and time | Pp | 04/29/1453, 12:00 AM | 7 |\n * | | PPpp | Apr 29, 1453, 12:00:00 AM | 7 |\n * | | PPPppp | April 29th, 1453 at ... | 7 |\n * | | PPPPpppp| Friday, April 29th, 1453 at ... | 2,7 |\n * Notes:\n * 1. \"Formatting\" units (e.g. formatting quarter) in the default en-US locale\n * are the same as \"stand-alone\" units, but are different in some languages.\n * \"Formatting\" units are declined according to the rules of the language\n * in the context of a date. \"Stand-alone\" units are always nominative singular:\n *\n * `format(new Date(2017, 10, 6), 'do LLLL', {locale: cs}) //=> '6. listopad'`\n *\n * `format(new Date(2017, 10, 6), 'do MMMM', {locale: cs}) //=> '6. listopadu'`\n *\n * 2. Any sequence of the identical letters is a pattern, unless it is escaped by\n * the single quote characters (see below).\n * If the sequence is longer than listed in table (e.g. `EEEEEEEEEEE`)\n * the output will be the same as default pattern for this unit, usually\n * the longest one (in case of ISO weekdays, `EEEE`). Default patterns for units\n * are marked with \"2\" in the last column of the table.\n *\n * `format(new Date(2017, 10, 6), 'MMM') //=> 'Nov'`\n *\n * `format(new Date(2017, 10, 6), 'MMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMM') //=> 'N'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMM') //=> 'November'`\n *\n * `format(new Date(2017, 10, 6), 'MMMMMMM') //=> 'November'`\n *\n * 3. Some patterns could be unlimited length (such as `yyyyyyyy`).\n * The output will be padded with zeros to match the length of the pattern.\n *\n * `format(new Date(2017, 10, 6), 'yyyyyyyy') //=> '00002017'`\n *\n * 4. `QQQQQ` and `qqqqq` could be not strictly numerical in some locales.\n * These tokens represent the shortest form of the quarter.\n *\n * 5. The main difference between `y` and `u` patterns are B.C. years:\n *\n * | Year | `y` | `u` |\n * |------|-----|-----|\n * | AC 1 | 1 | 1 |\n * | BC 1 | 1 | 0 |\n * | BC 2 | 2 | -1 |\n *\n * Also `yy` always returns the last two digits of a year,\n * while `uu` pads single digit years to 2 characters and returns other years unchanged:\n *\n * | Year | `yy` | `uu` |\n * |------|------|------|\n * | 1 | 01 | 01 |\n * | 14 | 14 | 14 |\n * | 376 | 76 | 376 |\n * | 1453 | 53 | 1453 |\n *\n * The same difference is true for local and ISO week-numbering years (`Y` and `R`),\n * except local week-numbering years are dependent on `options.weekStartsOn`\n * and `options.firstWeekContainsDate` (compare [getISOWeekYear](https://date-fns.org/docs/getISOWeekYear)\n * and [getWeekYear](https://date-fns.org/docs/getWeekYear)).\n *\n * 6. Specific non-location timezones are currently unavailable in `date-fns`,\n * so right now these tokens fall back to GMT timezones.\n *\n * 7. These patterns are not in the Unicode Technical Standard #35:\n * - `i`: ISO day of week\n * - `I`: ISO week of year\n * - `R`: ISO week-numbering year\n * - `t`: seconds timestamp\n * - `T`: milliseconds timestamp\n * - `o`: ordinal number modifier\n * - `P`: long localized date\n * - `p`: long localized time\n *\n * 8. `YY` and `YYYY` tokens represent week-numbering years but they are often confused with years.\n * You should enable `options.useAdditionalWeekYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * 9. `D` and `DD` tokens represent days of the year but they are often confused with days of the month.\n * You should enable `options.useAdditionalDayOfYearTokens` to use them. See: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n *\n * @param date - The original date\n * @param format - The string of tokens\n * @param options - An object with options\n *\n * @returns The formatted date string\n *\n * @throws `date` must not be Invalid Date\n * @throws `options.locale` must contain `localize` property\n * @throws `options.locale` must contain `formatLong` property\n * @throws use `yyyy` instead of `YYYY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `yy` instead of `YY` for formatting years using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `d` instead of `D` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws use `dd` instead of `DD` for formatting days of the month using [format provided] to the input [input provided]; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md\n * @throws format string contains an unescaped latin alphabet character\n *\n * @example\n * // Represent 11 February 2014 in middle-endian format:\n * const result = format(new Date(2014, 1, 11), 'MM/dd/yyyy')\n * //=> '02/11/2014'\n *\n * @example\n * // Represent 2 July 2014 in Esperanto:\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = format(new Date(2014, 6, 2), \"do 'de' MMMM yyyy\", {\n * locale: eoLocale\n * })\n * //=> '2-a de julio 2014'\n *\n * @example\n * // Escape string by single quote characters:\n * const result = format(new Date(2014, 6, 2, 15), \"h 'o''clock'\")\n * //=> \"3 o'clock\"\n */\nexport function format(date, formatStr, options) {\n const defaultOptions = getDefaultOptions();\n const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;\n\n const firstWeekContainsDate =\n options?.firstWeekContainsDate ??\n options?.locale?.options?.firstWeekContainsDate ??\n defaultOptions.firstWeekContainsDate ??\n defaultOptions.locale?.options?.firstWeekContainsDate ??\n 1;\n\n const weekStartsOn =\n options?.weekStartsOn ??\n options?.locale?.options?.weekStartsOn ??\n defaultOptions.weekStartsOn ??\n defaultOptions.locale?.options?.weekStartsOn ??\n 0;\n\n const originalDate = toDate(date, options?.in);\n\n if (!isValid(originalDate)) {\n throw new RangeError(\"Invalid time value\");\n }\n\n let parts = formatStr\n .match(longFormattingTokensRegExp)\n .map((substring) => {\n const firstCharacter = substring[0];\n if (firstCharacter === \"p\" || firstCharacter === \"P\") {\n const longFormatter = longFormatters[firstCharacter];\n return longFormatter(substring, locale.formatLong);\n }\n return substring;\n })\n .join(\"\")\n .match(formattingTokensRegExp)\n .map((substring) => {\n // Replace two single quote characters with one single quote character\n if (substring === \"''\") {\n return { isToken: false, value: \"'\" };\n }\n\n const firstCharacter = substring[0];\n if (firstCharacter === \"'\") {\n return { isToken: false, value: cleanEscapedString(substring) };\n }\n\n if (formatters[firstCharacter]) {\n return { isToken: true, value: substring };\n }\n\n if (firstCharacter.match(unescapedLatinCharacterRegExp)) {\n throw new RangeError(\n \"Format string contains an unescaped latin alphabet character `\" +\n firstCharacter +\n \"`\",\n );\n }\n\n return { isToken: false, value: substring };\n });\n\n // invoke localize preprocessor (only for french locales at the moment)\n if (locale.localize.preprocessor) {\n parts = locale.localize.preprocessor(originalDate, parts);\n }\n\n const formatterOptions = {\n firstWeekContainsDate,\n weekStartsOn,\n locale,\n };\n\n return parts\n .map((part) => {\n if (!part.isToken) return part.value;\n\n const token = part.value;\n\n if (\n (!options?.useAdditionalWeekYearTokens &&\n isProtectedWeekYearToken(token)) ||\n (!options?.useAdditionalDayOfYearTokens &&\n isProtectedDayOfYearToken(token))\n ) {\n warnOrThrowProtectedError(token, formatStr, String(date));\n }\n\n const formatter = formatters[token[0]];\n return formatter(originalDate, token, locale.localize, formatterOptions);\n })\n .join(\"\");\n}\n\nfunction cleanEscapedString(input) {\n const matched = input.match(escapedStringRegExp);\n\n if (!matched) {\n return input;\n }\n\n return matched[1].replace(doubleQuoteRegExp, \"'\");\n}\n\n// Fallback for modularized imports:\nexport default format;\n","const isString = obj => typeof obj === 'string';\nconst defer = () => {\n let res;\n let rej;\n const promise = new Promise((resolve, reject) => {\n res = resolve;\n rej = reject;\n });\n promise.resolve = res;\n promise.reject = rej;\n return promise;\n};\nconst makeString = object => {\n if (object == null) return '';\n return String(object);\n};\nconst copy = (a, s, t) => {\n a.forEach(m => {\n if (s[m]) t[m] = s[m];\n });\n};\nconst lastOfPathSeparatorRegExp = /###/g;\nconst cleanKey = key => key && key.includes('###') ? key.replace(lastOfPathSeparatorRegExp, '.') : key;\nconst canNotTraverseDeeper = object => !object || isString(object);\nconst getLastOfPath = (object, path, Empty) => {\n const stack = !isString(path) ? path : path.split('.');\n let stackIndex = 0;\n while (stackIndex < stack.length - 1) {\n if (canNotTraverseDeeper(object)) return {};\n const key = cleanKey(stack[stackIndex]);\n if (!object[key] && Empty) object[key] = new Empty();\n if (Object.prototype.hasOwnProperty.call(object, key)) {\n object = object[key];\n } else {\n object = {};\n }\n ++stackIndex;\n }\n if (canNotTraverseDeeper(object)) return {};\n return {\n obj: object,\n k: cleanKey(stack[stackIndex])\n };\n};\nconst setPath = (object, path, newValue) => {\n const {\n obj,\n k\n } = getLastOfPath(object, path, Object);\n if (obj !== undefined || path.length === 1) {\n obj[k] = newValue;\n return;\n }\n let e = path[path.length - 1];\n let p = path.slice(0, path.length - 1);\n let last = getLastOfPath(object, p, Object);\n while (last.obj === undefined && p.length) {\n e = `${p[p.length - 1]}.${e}`;\n p = p.slice(0, p.length - 1);\n last = getLastOfPath(object, p, Object);\n if (last?.obj && typeof last.obj[`${last.k}.${e}`] !== 'undefined') {\n last.obj = undefined;\n }\n }\n last.obj[`${last.k}.${e}`] = newValue;\n};\nconst pushPath = (object, path, newValue, concat) => {\n const {\n obj,\n k\n } = getLastOfPath(object, path, Object);\n obj[k] = obj[k] || [];\n obj[k].push(newValue);\n};\nconst getPath = (object, path) => {\n const {\n obj,\n k\n } = getLastOfPath(object, path);\n if (!obj) return undefined;\n if (!Object.prototype.hasOwnProperty.call(obj, k)) return undefined;\n return obj[k];\n};\nconst getPathWithDefaults = (data, defaultData, key) => {\n const value = getPath(data, key);\n if (value !== undefined) {\n return value;\n }\n return getPath(defaultData, key);\n};\nconst deepExtend = (target, source, overwrite) => {\n for (const prop in source) {\n if (prop !== '__proto__' && prop !== 'constructor') {\n if (Object.prototype.hasOwnProperty.call(target, prop)) {\n if (isString(target[prop]) || target[prop] instanceof String || isString(source[prop]) || source[prop] instanceof String) {\n if (overwrite) target[prop] = source[prop];\n } else {\n deepExtend(target[prop], source[prop], overwrite);\n }\n } else {\n target[prop] = source[prop];\n }\n }\n }\n return target;\n};\nconst regexEscape = str => str.replace(/[\\-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]/g, '\\\\$&');\nconst _entityMap = {\n '&': '&',\n '<': '<',\n '>': '>',\n '\"': '"',\n \"'\": ''',\n '/': '/'\n};\nconst escape = data => {\n if (isString(data)) {\n return data.replace(/[&<>\"'\\/]/g, s => _entityMap[s]);\n }\n return data;\n};\nclass RegExpCache {\n constructor(capacity) {\n this.capacity = capacity;\n this.regExpMap = new Map();\n this.regExpQueue = [];\n }\n getRegExp(pattern) {\n const regExpFromCache = this.regExpMap.get(pattern);\n if (regExpFromCache !== undefined) {\n return regExpFromCache;\n }\n const regExpNew = new RegExp(pattern);\n if (this.regExpQueue.length === this.capacity) {\n this.regExpMap.delete(this.regExpQueue.shift());\n }\n this.regExpMap.set(pattern, regExpNew);\n this.regExpQueue.push(pattern);\n return regExpNew;\n }\n}\nconst chars = [' ', ',', '?', '!', ';'];\nconst looksLikeObjectPathRegExpCache = new RegExpCache(20);\nconst looksLikeObjectPath = (key, nsSeparator, keySeparator) => {\n nsSeparator = nsSeparator || '';\n keySeparator = keySeparator || '';\n const possibleChars = chars.filter(c => !nsSeparator.includes(c) && !keySeparator.includes(c));\n if (possibleChars.length === 0) return true;\n const r = looksLikeObjectPathRegExpCache.getRegExp(`(${possibleChars.map(c => c === '?' ? '\\\\?' : c).join('|')})`);\n let matched = !r.test(key);\n if (!matched) {\n const ki = key.indexOf(keySeparator);\n if (ki > 0 && !r.test(key.substring(0, ki))) {\n matched = true;\n }\n }\n return matched;\n};\nconst deepFind = (obj, path, keySeparator = '.') => {\n if (!obj) return undefined;\n if (obj[path]) {\n if (!Object.prototype.hasOwnProperty.call(obj, path)) return undefined;\n return obj[path];\n }\n const tokens = path.split(keySeparator);\n let current = obj;\n for (let i = 0; i < tokens.length;) {\n if (!current || typeof current !== 'object') {\n return undefined;\n }\n let next;\n let nextPath = '';\n for (let j = i; j < tokens.length; ++j) {\n if (j !== i) {\n nextPath += keySeparator;\n }\n nextPath += tokens[j];\n next = current[nextPath];\n if (next !== undefined) {\n if (['string', 'number', 'boolean'].includes(typeof next) && j < tokens.length - 1) {\n continue;\n }\n i += j - i + 1;\n break;\n }\n }\n current = next;\n }\n return current;\n};\nconst getCleanedCode = code => code?.replace(/_/g, '-');\n\nconst consoleLogger = {\n type: 'logger',\n log(args) {\n this.output('log', args);\n },\n warn(args) {\n this.output('warn', args);\n },\n error(args) {\n this.output('error', args);\n },\n output(type, args) {\n console?.[type]?.apply?.(console, args);\n }\n};\nclass Logger {\n constructor(concreteLogger, options = {}) {\n this.init(concreteLogger, options);\n }\n init(concreteLogger, options = {}) {\n this.prefix = options.prefix || 'i18next:';\n this.logger = concreteLogger || consoleLogger;\n this.options = options;\n this.debug = options.debug;\n }\n log(...args) {\n return this.forward(args, 'log', '', true);\n }\n warn(...args) {\n return this.forward(args, 'warn', '', true);\n }\n error(...args) {\n return this.forward(args, 'error', '');\n }\n deprecate(...args) {\n return this.forward(args, 'warn', 'WARNING DEPRECATED: ', true);\n }\n forward(args, lvl, prefix, debugOnly) {\n if (debugOnly && !this.debug) return null;\n args = args.map(a => isString(a) ? a.replace(/[\\r\\n\\x00-\\x1F\\x7F]/g, ' ') : a);\n if (isString(args[0])) args[0] = `${prefix}${this.prefix} ${args[0]}`;\n return this.logger[lvl](args);\n }\n create(moduleName) {\n return new Logger(this.logger, {\n ...{\n prefix: `${this.prefix}:${moduleName}:`\n },\n ...this.options\n });\n }\n clone(options) {\n options = options || this.options;\n options.prefix = options.prefix || this.prefix;\n return new Logger(this.logger, options);\n }\n}\nvar baseLogger = new Logger();\n\nclass EventEmitter {\n constructor() {\n this.observers = {};\n }\n on(events, listener) {\n events.split(' ').forEach(event => {\n if (!this.observers[event]) this.observers[event] = new Map();\n const numListeners = this.observers[event].get(listener) || 0;\n this.observers[event].set(listener, numListeners + 1);\n });\n return this;\n }\n off(event, listener) {\n if (!this.observers[event]) return;\n if (!listener) {\n delete this.observers[event];\n return;\n }\n this.observers[event].delete(listener);\n }\n once(event, listener) {\n const wrapper = (...args) => {\n listener(...args);\n this.off(event, wrapper);\n };\n this.on(event, wrapper);\n return this;\n }\n emit(event, ...args) {\n if (this.observers[event]) {\n const cloned = Array.from(this.observers[event].entries());\n cloned.forEach(([observer, numTimesAdded]) => {\n for (let i = 0; i < numTimesAdded; i++) {\n observer(...args);\n }\n });\n }\n if (this.observers['*']) {\n const cloned = Array.from(this.observers['*'].entries());\n cloned.forEach(([observer, numTimesAdded]) => {\n for (let i = 0; i < numTimesAdded; i++) {\n observer(event, ...args);\n }\n });\n }\n }\n}\n\nclass ResourceStore extends EventEmitter {\n constructor(data, options = {\n ns: ['translation'],\n defaultNS: 'translation'\n }) {\n super();\n this.data = data || {};\n this.options = options;\n if (this.options.keySeparator === undefined) {\n this.options.keySeparator = '.';\n }\n if (this.options.ignoreJSONStructure === undefined) {\n this.options.ignoreJSONStructure = true;\n }\n }\n addNamespaces(ns) {\n if (!this.options.ns.includes(ns)) {\n this.options.ns.push(ns);\n }\n }\n removeNamespaces(ns) {\n const index = this.options.ns.indexOf(ns);\n if (index > -1) {\n this.options.ns.splice(index, 1);\n }\n }\n getResource(lng, ns, key, options = {}) {\n const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n const ignoreJSONStructure = options.ignoreJSONStructure !== undefined ? options.ignoreJSONStructure : this.options.ignoreJSONStructure;\n let path;\n if (lng.includes('.')) {\n path = lng.split('.');\n } else {\n path = [lng, ns];\n if (key) {\n if (Array.isArray(key)) {\n path.push(...key);\n } else if (isString(key) && keySeparator) {\n path.push(...key.split(keySeparator));\n } else {\n path.push(key);\n }\n }\n }\n const result = getPath(this.data, path);\n if (!result && !ns && !key && lng.includes('.')) {\n lng = path[0];\n ns = path[1];\n key = path.slice(2).join('.');\n }\n if (result || !ignoreJSONStructure || !isString(key)) return result;\n return deepFind(this.data?.[lng]?.[ns], key, keySeparator);\n }\n addResource(lng, ns, key, value, options = {\n silent: false\n }) {\n const keySeparator = options.keySeparator !== undefined ? options.keySeparator : this.options.keySeparator;\n let path = [lng, ns];\n if (key) path = path.concat(keySeparator ? key.split(keySeparator) : key);\n if (lng.includes('.')) {\n path = lng.split('.');\n value = ns;\n ns = path[1];\n }\n this.addNamespaces(ns);\n setPath(this.data, path, value);\n if (!options.silent) this.emit('added', lng, ns, key, value);\n }\n addResources(lng, ns, resources, options = {\n silent: false\n }) {\n for (const m in resources) {\n if (isString(resources[m]) || Array.isArray(resources[m])) this.addResource(lng, ns, m, resources[m], {\n silent: true\n });\n }\n if (!options.silent) this.emit('added', lng, ns, resources);\n }\n addResourceBundle(lng, ns, resources, deep, overwrite, options = {\n silent: false,\n skipCopy: false\n }) {\n let path = [lng, ns];\n if (lng.includes('.')) {\n path = lng.split('.');\n deep = resources;\n resources = ns;\n ns = path[1];\n }\n this.addNamespaces(ns);\n let pack = getPath(this.data, path) || {};\n if (!options.skipCopy) resources = JSON.parse(JSON.stringify(resources));\n if (deep) {\n deepExtend(pack, resources, overwrite);\n } else {\n pack = {\n ...pack,\n ...resources\n };\n }\n setPath(this.data, path, pack);\n if (!options.silent) this.emit('added', lng, ns, resources);\n }\n removeResourceBundle(lng, ns) {\n if (this.hasResourceBundle(lng, ns)) {\n delete this.data[lng][ns];\n }\n this.removeNamespaces(ns);\n this.emit('removed', lng, ns);\n }\n hasResourceBundle(lng, ns) {\n return this.getResource(lng, ns) !== undefined;\n }\n getResourceBundle(lng, ns) {\n if (!ns) ns = this.options.defaultNS;\n return this.getResource(lng, ns);\n }\n getDataByLanguage(lng) {\n return this.data[lng];\n }\n hasLanguageSomeTranslations(lng) {\n const data = this.getDataByLanguage(lng);\n const n = data && Object.keys(data) || [];\n return !!n.find(v => data[v] && Object.keys(data[v]).length > 0);\n }\n toJSON() {\n return this.data;\n }\n}\n\nvar postProcessor = {\n processors: {},\n addPostProcessor(module) {\n this.processors[module.name] = module;\n },\n handle(processors, value, key, options, translator) {\n processors.forEach(processor => {\n value = this.processors[processor]?.process(value, key, options, translator) ?? value;\n });\n return value;\n }\n};\n\nconst PATH_KEY = Symbol('i18next/PATH_KEY');\nfunction createProxy() {\n const state = [];\n const handler = Object.create(null);\n let proxy;\n handler.get = (target, key) => {\n proxy?.revoke?.();\n if (key === PATH_KEY) return state;\n state.push(key);\n proxy = Proxy.revocable(target, handler);\n return proxy.proxy;\n };\n return Proxy.revocable(Object.create(null), handler).proxy;\n}\nfunction keysFromSelector(selector, opts) {\n const {\n [PATH_KEY]: path\n } = selector(createProxy());\n const keySeparator = opts?.keySeparator ?? '.';\n const nsSeparator = opts?.nsSeparator ?? ':';\n const strict = opts?.enableSelector === 'strict';\n if (path.length > 1 && nsSeparator) {\n const ns = opts?.ns;\n const nsList = strict ? Array.isArray(ns) ? ns : ns ? [ns] : null : Array.isArray(ns) ? ns : null;\n if (nsList) {\n const candidates = strict ? nsList : nsList.length > 1 ? nsList.slice(1) : [];\n if (candidates.includes(path[0])) {\n return `${path[0]}${nsSeparator}${path.slice(1).join(keySeparator)}`;\n }\n }\n }\n return path.join(keySeparator);\n}\n\nconst shouldHandleAsObject = res => !isString(res) && typeof res !== 'boolean' && typeof res !== 'number';\nclass Translator extends EventEmitter {\n constructor(services, options = {}) {\n super();\n copy(['resourceStore', 'languageUtils', 'pluralResolver', 'interpolator', 'backendConnector', 'i18nFormat', 'utils'], services, this);\n this.options = options;\n if (this.options.keySeparator === undefined) {\n this.options.keySeparator = '.';\n }\n this.logger = baseLogger.create('translator');\n this.checkedLoadedFor = {};\n }\n changeLanguage(lng) {\n if (lng) this.language = lng;\n }\n exists(key, o = {\n interpolation: {}\n }) {\n const opt = {\n ...o\n };\n if (key == null) return false;\n const resolved = this.resolve(key, opt);\n if (resolved?.res === undefined) return false;\n const isObject = shouldHandleAsObject(resolved.res);\n if (opt.returnObjects === false && isObject) {\n return false;\n }\n return true;\n }\n extractFromKey(key, opt) {\n let nsSeparator = opt.nsSeparator !== undefined ? opt.nsSeparator : this.options.nsSeparator;\n if (nsSeparator === undefined) nsSeparator = ':';\n const keySeparator = opt.keySeparator !== undefined ? opt.keySeparator : this.options.keySeparator;\n let namespaces = opt.ns || this.options.defaultNS || [];\n const wouldCheckForNsInKey = nsSeparator && key.includes(nsSeparator);\n const seemsNaturalLanguage = !this.options.userDefinedKeySeparator && !opt.keySeparator && !this.options.userDefinedNsSeparator && !opt.nsSeparator && !looksLikeObjectPath(key, nsSeparator, keySeparator);\n if (wouldCheckForNsInKey && !seemsNaturalLanguage) {\n const m = key.match(this.interpolator.nestingRegexp);\n if (m && m.length > 0) {\n return {\n key,\n namespaces: isString(namespaces) ? [namespaces] : namespaces\n };\n }\n const parts = key.split(nsSeparator);\n if (nsSeparator !== keySeparator || nsSeparator === keySeparator && this.options.ns.includes(parts[0])) namespaces = parts.shift();\n key = parts.join(keySeparator);\n }\n return {\n key,\n namespaces: isString(namespaces) ? [namespaces] : namespaces\n };\n }\n translate(keys, o, lastKey) {\n let opt = typeof o === 'object' ? {\n ...o\n } : o;\n if (typeof opt !== 'object' && this.options.overloadTranslationOptionHandler) {\n opt = this.options.overloadTranslationOptionHandler(arguments);\n }\n if (typeof opt === 'object') opt = {\n ...opt\n };\n if (!opt) opt = {};\n if (keys == null) return '';\n if (typeof keys === 'function') keys = keysFromSelector(keys, {\n ...this.options,\n ...opt\n });\n if (!Array.isArray(keys)) keys = [String(keys)];\n keys = keys.map(k => typeof k === 'function' ? keysFromSelector(k, {\n ...this.options,\n ...opt\n }) : String(k));\n const returnDetails = opt.returnDetails !== undefined ? opt.returnDetails : this.options.returnDetails;\n const keySeparator = opt.keySeparator !== undefined ? opt.keySeparator : this.options.keySeparator;\n const {\n key,\n namespaces\n } = this.extractFromKey(keys[keys.length - 1], opt);\n const namespace = namespaces[namespaces.length - 1];\n let nsSeparator = opt.nsSeparator !== undefined ? opt.nsSeparator : this.options.nsSeparator;\n if (nsSeparator === undefined) nsSeparator = ':';\n const lng = opt.lng || this.language;\n const appendNamespaceToCIMode = opt.appendNamespaceToCIMode || this.options.appendNamespaceToCIMode;\n if (lng?.toLowerCase() === 'cimode') {\n if (appendNamespaceToCIMode) {\n if (returnDetails) {\n return {\n res: `${namespace}${nsSeparator}${key}`,\n usedKey: key,\n exactUsedKey: key,\n usedLng: lng,\n usedNS: namespace,\n usedParams: this.getUsedParamsDetails(opt)\n };\n }\n return `${namespace}${nsSeparator}${key}`;\n }\n if (returnDetails) {\n return {\n res: key,\n usedKey: key,\n exactUsedKey: key,\n usedLng: lng,\n usedNS: namespace,\n usedParams: this.getUsedParamsDetails(opt)\n };\n }\n return key;\n }\n const resolved = this.resolve(keys, opt);\n let res = resolved?.res;\n const resUsedKey = resolved?.usedKey || key;\n const resExactUsedKey = resolved?.exactUsedKey || key;\n const noObject = ['[object Number]', '[object Function]', '[object RegExp]'];\n const joinArrays = opt.joinArrays !== undefined ? opt.joinArrays : this.options.joinArrays;\n const handleAsObjectInI18nFormat = !this.i18nFormat || this.i18nFormat.handleAsObject;\n const needsPluralHandling = opt.count !== undefined && !isString(opt.count);\n const hasDefaultValue = Translator.hasDefaultValue(opt);\n const defaultValueSuffix = needsPluralHandling ? this.pluralResolver.getSuffix(lng, opt.count, opt) : '';\n const defaultValueSuffixOrdinalFallback = opt.ordinal && needsPluralHandling ? this.pluralResolver.getSuffix(lng, opt.count, {\n ordinal: false\n }) : '';\n const needsZeroSuffixLookup = needsPluralHandling && !opt.ordinal && opt.count === 0;\n const defaultValue = needsZeroSuffixLookup && opt[`defaultValue${this.options.pluralSeparator}zero`] || opt[`defaultValue${defaultValueSuffix}`] || opt[`defaultValue${defaultValueSuffixOrdinalFallback}`] || opt.defaultValue;\n let resForObjHndl = res;\n if (handleAsObjectInI18nFormat && !res && hasDefaultValue) {\n resForObjHndl = defaultValue;\n }\n const handleAsObject = shouldHandleAsObject(resForObjHndl);\n const resType = Object.prototype.toString.apply(resForObjHndl);\n if (handleAsObjectInI18nFormat && resForObjHndl && handleAsObject && !noObject.includes(resType) && !(isString(joinArrays) && Array.isArray(resForObjHndl))) {\n if (!opt.returnObjects && !this.options.returnObjects) {\n if (!this.options.returnedObjectHandler) {\n this.logger.warn('accessing an object - but returnObjects options is not enabled!');\n }\n const r = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(resUsedKey, resForObjHndl, {\n ...opt,\n ns: namespaces\n }) : `key '${key} (${this.language})' returned an object instead of string.`;\n if (returnDetails) {\n resolved.res = r;\n resolved.usedParams = this.getUsedParamsDetails(opt);\n return resolved;\n }\n return r;\n }\n if (keySeparator) {\n const resTypeIsArray = Array.isArray(resForObjHndl);\n const copy = resTypeIsArray ? [] : {};\n const newKeyToUse = resTypeIsArray ? resExactUsedKey : resUsedKey;\n for (const m in resForObjHndl) {\n if (Object.prototype.hasOwnProperty.call(resForObjHndl, m)) {\n const deepKey = `${newKeyToUse}${keySeparator}${m}`;\n if (hasDefaultValue && !res) {\n copy[m] = this.translate(deepKey, {\n ...opt,\n defaultValue: shouldHandleAsObject(defaultValue) ? defaultValue[m] : undefined,\n ...{\n joinArrays: false,\n ns: namespaces\n }\n });\n } else {\n copy[m] = this.translate(deepKey, {\n ...opt,\n ...{\n joinArrays: false,\n ns: namespaces\n }\n });\n }\n if (copy[m] === deepKey) copy[m] = resForObjHndl[m];\n }\n }\n res = copy;\n }\n } else if (handleAsObjectInI18nFormat && isString(joinArrays) && Array.isArray(res)) {\n res = res.join(joinArrays);\n if (res) res = this.extendTranslation(res, keys, opt, lastKey);\n } else {\n let usedDefault = false;\n let usedKey = false;\n if (!this.isValidLookup(res) && hasDefaultValue) {\n usedDefault = true;\n res = defaultValue;\n }\n if (!this.isValidLookup(res)) {\n usedKey = true;\n res = key;\n }\n const missingKeyNoValueFallbackToKey = opt.missingKeyNoValueFallbackToKey || this.options.missingKeyNoValueFallbackToKey;\n const resForMissing = missingKeyNoValueFallbackToKey && usedKey ? undefined : res;\n const updateMissing = hasDefaultValue && defaultValue !== res && this.options.updateMissing;\n if (usedKey || usedDefault || updateMissing) {\n this.logger.log(updateMissing ? 'updateKey' : 'missingKey', lng, namespace, needsPluralHandling && !updateMissing ? `${key}${this.pluralResolver.getSuffix(lng, opt.count, opt)}` : key, updateMissing ? defaultValue : res);\n if (keySeparator) {\n const fk = this.resolve(key, {\n ...opt,\n keySeparator: false\n });\n if (fk && fk.res) this.logger.warn('Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.');\n }\n let lngs = [];\n const fallbackLngs = this.languageUtils.getFallbackCodes(this.options.fallbackLng, opt.lng || this.language);\n if (this.options.saveMissingTo === 'fallback' && fallbackLngs && fallbackLngs[0]) {\n for (let i = 0; i < fallbackLngs.length; i++) {\n lngs.push(fallbackLngs[i]);\n }\n } else if (this.options.saveMissingTo === 'all') {\n lngs = this.languageUtils.toResolveHierarchy(opt.lng || this.language);\n } else {\n lngs.push(opt.lng || this.language);\n }\n const send = (l, k, specificDefaultValue) => {\n const defaultForMissing = hasDefaultValue && specificDefaultValue !== res ? specificDefaultValue : resForMissing;\n if (this.options.missingKeyHandler) {\n this.options.missingKeyHandler(l, namespace, k, defaultForMissing, updateMissing, opt);\n } else if (this.backendConnector?.saveMissing) {\n this.backendConnector.saveMissing(l, namespace, k, defaultForMissing, updateMissing, opt);\n }\n this.emit('missingKey', l, namespace, k, res);\n };\n if (this.options.saveMissing) {\n if (this.options.saveMissingPlurals && needsPluralHandling) {\n lngs.forEach(language => {\n const suffixes = this.pluralResolver.getSuffixes(language, opt);\n if (needsZeroSuffixLookup && opt[`defaultValue${this.options.pluralSeparator}zero`] && !suffixes.includes(`${this.options.pluralSeparator}zero`)) {\n suffixes.push(`${this.options.pluralSeparator}zero`);\n }\n suffixes.forEach(suffix => {\n send([language], key + suffix, opt[`defaultValue${suffix}`] || defaultValue);\n });\n });\n } else {\n send(lngs, key, defaultValue);\n }\n }\n }\n res = this.extendTranslation(res, keys, opt, resolved, lastKey);\n if (usedKey && res === key && this.options.appendNamespaceToMissingKey) {\n res = `${namespace}${nsSeparator}${key}`;\n }\n if ((usedKey || usedDefault) && this.options.parseMissingKeyHandler) {\n res = this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey ? `${namespace}${nsSeparator}${key}` : key, usedDefault ? res : undefined, opt);\n }\n }\n if (returnDetails) {\n resolved.res = res;\n resolved.usedParams = this.getUsedParamsDetails(opt);\n return resolved;\n }\n return res;\n }\n extendTranslation(res, key, opt, resolved, lastKey) {\n if (this.i18nFormat?.parse) {\n res = this.i18nFormat.parse(res, {\n ...this.options.interpolation.defaultVariables,\n ...opt\n }, opt.lng || this.language || resolved.usedLng, resolved.usedNS, resolved.usedKey, {\n resolved\n });\n } else if (!opt.skipInterpolation) {\n if (opt.interpolation) this.interpolator.init({\n ...opt,\n ...{\n interpolation: {\n ...this.options.interpolation,\n ...opt.interpolation\n }\n }\n });\n const skipOnVariables = isString(res) && (opt?.interpolation?.skipOnVariables !== undefined ? opt.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);\n let nestBef;\n if (skipOnVariables) {\n const nb = res.match(this.interpolator.nestingRegexp);\n nestBef = nb && nb.length;\n }\n let data = opt.replace && !isString(opt.replace) ? opt.replace : opt;\n if (this.options.interpolation.defaultVariables) data = {\n ...this.options.interpolation.defaultVariables,\n ...data\n };\n res = this.interpolator.interpolate(res, data, opt.lng || this.language || resolved.usedLng, opt);\n if (skipOnVariables) {\n const na = res.match(this.interpolator.nestingRegexp);\n const nestAft = na && na.length;\n if (nestBef < nestAft) opt.nest = false;\n }\n if (!opt.lng && resolved && resolved.res) opt.lng = this.language || resolved.usedLng;\n if (opt.nest !== false) res = this.interpolator.nest(res, (...args) => {\n if (lastKey?.[0] === args[0] && !opt.context) {\n this.logger.warn(`It seems you are nesting recursively key: ${args[0]} in key: ${key[0]}`);\n return null;\n }\n return this.translate(...args, key);\n }, opt);\n if (opt.interpolation) this.interpolator.reset();\n }\n const postProcess = opt.postProcess || this.options.postProcess;\n const postProcessorNames = isString(postProcess) ? [postProcess] : postProcess;\n if (res != null && postProcessorNames?.length && opt.applyPostProcessor !== false) {\n res = postProcessor.handle(postProcessorNames, res, key, this.options && this.options.postProcessPassResolved ? {\n i18nResolved: {\n ...resolved,\n usedParams: this.getUsedParamsDetails(opt)\n },\n ...opt\n } : opt, this);\n }\n return res;\n }\n resolve(keys, opt = {}) {\n let found;\n let usedKey;\n let exactUsedKey;\n let usedLng;\n let usedNS;\n if (isString(keys)) keys = [keys];\n if (Array.isArray(keys)) keys = keys.map(k => typeof k === 'function' ? keysFromSelector(k, {\n ...this.options,\n ...opt\n }) : k);\n keys.forEach(k => {\n if (this.isValidLookup(found)) return;\n const extracted = this.extractFromKey(k, opt);\n const key = extracted.key;\n usedKey = key;\n let namespaces = extracted.namespaces;\n if (this.options.fallbackNS) namespaces = namespaces.concat(this.options.fallbackNS);\n const needsPluralHandling = opt.count !== undefined && !isString(opt.count);\n const needsZeroSuffixLookup = needsPluralHandling && !opt.ordinal && opt.count === 0;\n const needsContextHandling = opt.context !== undefined && (isString(opt.context) || typeof opt.context === 'number') && opt.context !== '';\n const codes = opt.lngs ? opt.lngs : this.languageUtils.toResolveHierarchy(opt.lng || this.language, opt.fallbackLng);\n namespaces.forEach(ns => {\n if (this.isValidLookup(found)) return;\n usedNS = ns;\n if (!this.checkedLoadedFor[`${codes[0]}-${ns}`] && this.utils?.hasLoadedNamespace && !this.utils?.hasLoadedNamespace(usedNS)) {\n this.checkedLoadedFor[`${codes[0]}-${ns}`] = true;\n this.logger.warn(`key \"${usedKey}\" for languages \"${codes.join(', ')}\" won't get resolved as namespace \"${usedNS}\" was not yet loaded`, 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');\n }\n codes.forEach(code => {\n if (this.isValidLookup(found)) return;\n usedLng = code;\n const finalKeys = [key];\n if (this.i18nFormat?.addLookupKeys) {\n this.i18nFormat.addLookupKeys(finalKeys, key, code, ns, opt);\n } else {\n let pluralSuffix;\n if (needsPluralHandling) pluralSuffix = this.pluralResolver.getSuffix(code, opt.count, opt);\n const zeroSuffix = `${this.options.pluralSeparator}zero`;\n const ordinalPrefix = `${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;\n if (needsPluralHandling) {\n if (opt.ordinal && pluralSuffix.startsWith(ordinalPrefix)) {\n finalKeys.push(key + pluralSuffix.replace(ordinalPrefix, this.options.pluralSeparator));\n }\n finalKeys.push(key + pluralSuffix);\n if (needsZeroSuffixLookup) {\n finalKeys.push(key + zeroSuffix);\n }\n }\n if (needsContextHandling) {\n const contextKey = `${key}${this.options.contextSeparator || '_'}${opt.context}`;\n finalKeys.push(contextKey);\n if (needsPluralHandling) {\n if (opt.ordinal && pluralSuffix.startsWith(ordinalPrefix)) {\n finalKeys.push(contextKey + pluralSuffix.replace(ordinalPrefix, this.options.pluralSeparator));\n }\n finalKeys.push(contextKey + pluralSuffix);\n if (needsZeroSuffixLookup) {\n finalKeys.push(contextKey + zeroSuffix);\n }\n }\n }\n }\n let possibleKey;\n while (possibleKey = finalKeys.pop()) {\n if (!this.isValidLookup(found)) {\n exactUsedKey = possibleKey;\n found = this.getResource(code, ns, possibleKey, opt);\n }\n }\n });\n });\n });\n return {\n res: found,\n usedKey,\n exactUsedKey,\n usedLng,\n usedNS\n };\n }\n isValidLookup(res) {\n return res !== undefined && !(!this.options.returnNull && res === null) && !(!this.options.returnEmptyString && res === '');\n }\n getResource(code, ns, key, options = {}) {\n if (this.i18nFormat?.getResource) return this.i18nFormat.getResource(code, ns, key, options);\n return this.resourceStore.getResource(code, ns, key, options);\n }\n getUsedParamsDetails(options = {}) {\n const optionsKeys = ['defaultValue', 'ordinal', 'context', 'replace', 'lng', 'lngs', 'fallbackLng', 'ns', 'keySeparator', 'nsSeparator', 'returnObjects', 'returnDetails', 'joinArrays', 'postProcess', 'interpolation'];\n const useOptionsReplaceForData = options.replace && !isString(options.replace);\n let data = useOptionsReplaceForData ? options.replace : options;\n if (useOptionsReplaceForData && typeof options.count !== 'undefined') {\n data = {\n ...data,\n count: options.count\n };\n }\n if (this.options.interpolation.defaultVariables) {\n data = {\n ...this.options.interpolation.defaultVariables,\n ...data\n };\n }\n if (!useOptionsReplaceForData) {\n data = {\n ...data\n };\n for (const key of optionsKeys) {\n delete data[key];\n }\n }\n return data;\n }\n static hasDefaultValue(options) {\n const prefix = 'defaultValue';\n for (const option in options) {\n if (Object.prototype.hasOwnProperty.call(options, option) && option.startsWith(prefix) && undefined !== options[option]) {\n return true;\n }\n }\n return false;\n }\n}\n\nclass LanguageUtil {\n constructor(options) {\n this.options = options;\n this.supportedLngs = this.options.supportedLngs || false;\n this.logger = baseLogger.create('languageUtils');\n }\n getScriptPartFromCode(code) {\n code = getCleanedCode(code);\n if (!code || !code.includes('-')) return null;\n const p = code.split('-');\n if (p.length === 2) return null;\n p.pop();\n if (p[p.length - 1].toLowerCase() === 'x') return null;\n return this.formatLanguageCode(p.join('-'));\n }\n getLanguagePartFromCode(code) {\n code = getCleanedCode(code);\n if (!code || !code.includes('-')) return code;\n const p = code.split('-');\n return this.formatLanguageCode(p[0]);\n }\n formatLanguageCode(code) {\n if (isString(code) && code.includes('-')) {\n let formattedCode;\n try {\n formattedCode = Intl.getCanonicalLocales(code)[0];\n } catch (e) {}\n if (formattedCode && this.options.lowerCaseLng) {\n formattedCode = formattedCode.toLowerCase();\n }\n if (formattedCode) return formattedCode;\n if (this.options.lowerCaseLng) {\n return code.toLowerCase();\n }\n return code;\n }\n return this.options.cleanCode || this.options.lowerCaseLng ? code.toLowerCase() : code;\n }\n isSupportedCode(code) {\n if (this.options.load === 'languageOnly' || this.options.nonExplicitSupportedLngs) {\n code = this.getLanguagePartFromCode(code);\n }\n return !this.supportedLngs || !this.supportedLngs.length || this.supportedLngs.includes(code);\n }\n getBestMatchFromCodes(codes) {\n if (!codes) return null;\n let found;\n codes.forEach(code => {\n if (found) return;\n const cleanedLng = this.formatLanguageCode(code);\n if (!this.options.supportedLngs || this.isSupportedCode(cleanedLng)) found = cleanedLng;\n });\n if (!found && this.options.supportedLngs) {\n codes.forEach(code => {\n if (found) return;\n const lngScOnly = this.getScriptPartFromCode(code);\n if (this.isSupportedCode(lngScOnly)) return found = lngScOnly;\n const lngOnly = this.getLanguagePartFromCode(code);\n if (this.isSupportedCode(lngOnly)) return found = lngOnly;\n found = this.options.supportedLngs.find(supportedLng => {\n if (supportedLng === lngOnly) return true;\n if (!supportedLng.includes('-') && !lngOnly.includes('-')) return false;\n if (supportedLng.includes('-') && !lngOnly.includes('-') && supportedLng.slice(0, supportedLng.indexOf('-')) === lngOnly) return true;\n if (supportedLng.startsWith(lngOnly) && lngOnly.length > 1) return true;\n return false;\n });\n });\n }\n if (!found) found = this.getFallbackCodes(this.options.fallbackLng)[0];\n return found;\n }\n getFallbackCodes(fallbacks, code) {\n if (!fallbacks) return [];\n if (typeof fallbacks === 'function') fallbacks = fallbacks(code);\n if (isString(fallbacks)) fallbacks = [fallbacks];\n if (Array.isArray(fallbacks)) return fallbacks;\n if (!code) return fallbacks.default || [];\n let found = fallbacks[code];\n if (!found) found = fallbacks[this.getScriptPartFromCode(code)];\n if (!found) found = fallbacks[this.formatLanguageCode(code)];\n if (!found) found = fallbacks[this.getLanguagePartFromCode(code)];\n if (!found) found = fallbacks.default;\n return found || [];\n }\n toResolveHierarchy(code, fallbackCode) {\n const fallbackCodes = this.getFallbackCodes((fallbackCode === false ? [] : fallbackCode) || this.options.fallbackLng || [], code);\n const codes = [];\n const addCode = c => {\n if (!c) return;\n if (this.isSupportedCode(c)) {\n codes.push(c);\n } else {\n this.logger.warn(`rejecting language code not found in supportedLngs: ${c}`);\n }\n };\n if (isString(code) && (code.includes('-') || code.includes('_'))) {\n if (this.options.load !== 'languageOnly') addCode(this.formatLanguageCode(code));\n if (this.options.load !== 'languageOnly' && this.options.load !== 'currentOnly') addCode(this.getScriptPartFromCode(code));\n if (this.options.load !== 'currentOnly') addCode(this.getLanguagePartFromCode(code));\n } else if (isString(code)) {\n addCode(this.formatLanguageCode(code));\n }\n fallbackCodes.forEach(fc => {\n if (!codes.includes(fc)) addCode(this.formatLanguageCode(fc));\n });\n return codes;\n }\n}\n\nconst suffixesOrder = {\n zero: 0,\n one: 1,\n two: 2,\n few: 3,\n many: 4,\n other: 5\n};\nconst dummyRule = {\n select: count => count === 1 ? 'one' : 'other',\n resolvedOptions: () => ({\n pluralCategories: ['one', 'other']\n })\n};\nclass PluralResolver {\n constructor(languageUtils, options = {}) {\n this.languageUtils = languageUtils;\n this.options = options;\n this.logger = baseLogger.create('pluralResolver');\n this.pluralRulesCache = {};\n }\n clearCache() {\n this.pluralRulesCache = {};\n }\n getRule(code, options = {}) {\n const cleanedCode = getCleanedCode(code === 'dev' ? 'en' : code);\n const type = options.ordinal ? 'ordinal' : 'cardinal';\n const cacheKey = JSON.stringify({\n cleanedCode,\n type\n });\n if (cacheKey in this.pluralRulesCache) {\n return this.pluralRulesCache[cacheKey];\n }\n let rule;\n try {\n rule = new Intl.PluralRules(cleanedCode, {\n type\n });\n } catch (err) {\n if (typeof Intl === 'undefined') {\n this.logger.error('No Intl support, please use an Intl polyfill!');\n return dummyRule;\n }\n if (!code.match(/-|_/)) return dummyRule;\n const lngPart = this.languageUtils.getLanguagePartFromCode(code);\n rule = this.getRule(lngPart, options);\n }\n this.pluralRulesCache[cacheKey] = rule;\n return rule;\n }\n needsPlural(code, options = {}) {\n let rule = this.getRule(code, options);\n if (!rule) rule = this.getRule('dev', options);\n return rule?.resolvedOptions().pluralCategories.length > 1;\n }\n getPluralFormsOfKey(code, key, options = {}) {\n return this.getSuffixes(code, options).map(suffix => `${key}${suffix}`);\n }\n getSuffixes(code, options = {}) {\n let rule = this.getRule(code, options);\n if (!rule) rule = this.getRule('dev', options);\n if (!rule) return [];\n return rule.resolvedOptions().pluralCategories.sort((pluralCategory1, pluralCategory2) => suffixesOrder[pluralCategory1] - suffixesOrder[pluralCategory2]).map(pluralCategory => `${this.options.prepend}${options.ordinal ? `ordinal${this.options.prepend}` : ''}${pluralCategory}`);\n }\n getSuffix(code, count, options = {}) {\n const rule = this.getRule(code, options);\n if (rule) {\n return `${this.options.prepend}${options.ordinal ? `ordinal${this.options.prepend}` : ''}${rule.select(count)}`;\n }\n this.logger.warn(`no plural rule found for: ${code}`);\n return this.getSuffix('dev', count, options);\n }\n}\n\nconst deepFindWithDefaults = (data, defaultData, key, keySeparator = '.', ignoreJSONStructure = true) => {\n let path = getPathWithDefaults(data, defaultData, key);\n if (!path && ignoreJSONStructure && isString(key)) {\n path = deepFind(data, key, keySeparator);\n if (path === undefined) path = deepFind(defaultData, key, keySeparator);\n }\n return path;\n};\nconst regexSafe = val => val.replace(/\\$/g, '$$$$');\nclass Interpolator {\n constructor(options = {}) {\n this.logger = baseLogger.create('interpolator');\n this.options = options;\n this.format = options?.interpolation?.format || (value => value);\n this.init(options);\n }\n init(options = {}) {\n if (!options.interpolation) options.interpolation = {\n escapeValue: true\n };\n const {\n escape: escape$1,\n escapeValue,\n useRawValueToEscape,\n prefix,\n prefixEscaped,\n suffix,\n suffixEscaped,\n formatSeparator,\n unescapeSuffix,\n unescapePrefix,\n nestingPrefix,\n nestingPrefixEscaped,\n nestingSuffix,\n nestingSuffixEscaped,\n nestingOptionsSeparator,\n maxReplaces,\n alwaysFormat\n } = options.interpolation;\n this.escape = escape$1 !== undefined ? escape$1 : escape;\n this.escapeValue = escapeValue !== undefined ? escapeValue : true;\n this.useRawValueToEscape = useRawValueToEscape !== undefined ? useRawValueToEscape : false;\n this.prefix = prefix ? regexEscape(prefix) : prefixEscaped || '{{';\n this.suffix = suffix ? regexEscape(suffix) : suffixEscaped || '}}';\n this.formatSeparator = formatSeparator || ',';\n this.unescapePrefix = unescapeSuffix ? '' : unescapePrefix ? regexEscape(unescapePrefix) : '-';\n this.unescapeSuffix = this.unescapePrefix ? '' : unescapeSuffix ? regexEscape(unescapeSuffix) : '';\n this.nestingPrefix = nestingPrefix ? regexEscape(nestingPrefix) : nestingPrefixEscaped || regexEscape('$t(');\n this.nestingSuffix = nestingSuffix ? regexEscape(nestingSuffix) : nestingSuffixEscaped || regexEscape(')');\n this.nestingOptionsSeparator = nestingOptionsSeparator || ',';\n this.maxReplaces = maxReplaces || 1000;\n this.alwaysFormat = alwaysFormat !== undefined ? alwaysFormat : false;\n this.resetRegExp();\n }\n reset() {\n if (this.options) this.init(this.options);\n }\n resetRegExp() {\n const getOrResetRegExp = (existingRegExp, pattern) => {\n if (existingRegExp?.source === pattern) {\n existingRegExp.lastIndex = 0;\n return existingRegExp;\n }\n return new RegExp(pattern, 'g');\n };\n this.regexp = getOrResetRegExp(this.regexp, `${this.prefix}(.+?)${this.suffix}`);\n this.regexpUnescape = getOrResetRegExp(this.regexpUnescape, `${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`);\n this.nestingRegexp = getOrResetRegExp(this.nestingRegexp, `${this.nestingPrefix}((?:[^()\"']+|\"[^\"]*\"|'[^']*'|\\\\((?:[^()]|\"[^\"]*\"|'[^']*')*\\\\))*?)${this.nestingSuffix}`);\n }\n interpolate(str, data, lng, options) {\n let match;\n let value;\n let replaces;\n const defaultData = this.options && this.options.interpolation && this.options.interpolation.defaultVariables || {};\n const handleFormat = key => {\n if (!key.includes(this.formatSeparator)) {\n const path = deepFindWithDefaults(data, defaultData, key, this.options.keySeparator, this.options.ignoreJSONStructure);\n return this.alwaysFormat ? this.format(path, undefined, lng, {\n ...options,\n ...data,\n interpolationkey: key\n }) : path;\n }\n const p = key.split(this.formatSeparator);\n const k = p.shift().trim();\n const f = p.join(this.formatSeparator).trim();\n return this.format(deepFindWithDefaults(data, defaultData, k, this.options.keySeparator, this.options.ignoreJSONStructure), f, lng, {\n ...options,\n ...data,\n interpolationkey: k\n });\n };\n this.resetRegExp();\n if (!this.escapeValue && typeof str === 'string' && /\\$t\\([^)]*\\{[^}]*\\{\\{/.test(str)) {\n this.logger.warn('nesting options string contains interpolated variables with escapeValue: false — ' + 'if any of those values are attacker-controlled they can inject additional ' + 'nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing ' + 'it to t(), or keep escapeValue: true.');\n }\n const missingInterpolationHandler = options?.missingInterpolationHandler || this.options.missingInterpolationHandler;\n const skipOnVariables = options?.interpolation?.skipOnVariables !== undefined ? options.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables;\n const todos = [{\n regex: this.regexpUnescape,\n safeValue: val => val\n }, {\n regex: this.regexp,\n safeValue: val => this.escapeValue ? this.escape(val) : val\n }];\n todos.forEach(todo => {\n replaces = 0;\n while (match = todo.regex.exec(str)) {\n const matchedVar = match[1].trim();\n value = handleFormat(matchedVar);\n if (value === undefined) {\n if (typeof missingInterpolationHandler === 'function') {\n const temp = missingInterpolationHandler(str, match, options);\n value = isString(temp) ? temp : '';\n } else if (options && Object.prototype.hasOwnProperty.call(options, matchedVar)) {\n value = '';\n } else if (skipOnVariables) {\n value = match[0];\n continue;\n } else {\n this.logger.warn(`missed to pass in variable ${matchedVar} for interpolating ${str}`);\n value = '';\n }\n } else if (!isString(value) && !this.useRawValueToEscape) {\n value = makeString(value);\n }\n const safeValue = todo.safeValue(value);\n str = str.replace(match[0], regexSafe(safeValue));\n if (skipOnVariables) {\n todo.regex.lastIndex += safeValue.length;\n todo.regex.lastIndex -= match[0].length;\n } else {\n todo.regex.lastIndex = 0;\n }\n replaces++;\n if (replaces >= this.maxReplaces) {\n break;\n }\n }\n });\n return str;\n }\n nest(str, fc, options = {}) {\n let match;\n let value;\n let clonedOptions;\n const handleHasOptions = (key, inheritedOptions) => {\n const sep = this.nestingOptionsSeparator;\n if (!key.includes(sep)) return key;\n const c = key.split(new RegExp(`${regexEscape(sep)}[ ]*{`));\n let optionsString = `{${c[1]}`;\n key = c[0];\n optionsString = this.interpolate(optionsString, clonedOptions);\n const matchedSingleQuotes = optionsString.match(/'/g);\n const matchedDoubleQuotes = optionsString.match(/\"/g);\n if ((matchedSingleQuotes?.length ?? 0) % 2 === 0 && !matchedDoubleQuotes || (matchedDoubleQuotes?.length ?? 0) % 2 !== 0) {\n optionsString = optionsString.replace(/'/g, '\"');\n }\n try {\n clonedOptions = JSON.parse(optionsString);\n if (inheritedOptions) clonedOptions = {\n ...inheritedOptions,\n ...clonedOptions\n };\n } catch (e) {\n this.logger.warn(`failed parsing options string in nesting for key ${key}`, e);\n return `${key}${sep}${optionsString}`;\n }\n if (clonedOptions.defaultValue && clonedOptions.defaultValue.includes(this.prefix)) delete clonedOptions.defaultValue;\n return key;\n };\n while (match = this.nestingRegexp.exec(str)) {\n let formatters = [];\n clonedOptions = {\n ...options\n };\n clonedOptions = clonedOptions.replace && !isString(clonedOptions.replace) ? clonedOptions.replace : clonedOptions;\n clonedOptions.applyPostProcessor = false;\n delete clonedOptions.defaultValue;\n const keyEndIndex = /{.*}/s.test(match[1]) ? match[1].lastIndexOf('}') + 1 : match[1].indexOf(this.formatSeparator);\n if (keyEndIndex !== -1) {\n formatters = match[1].slice(keyEndIndex).split(this.formatSeparator).map(elem => elem.trim()).filter(Boolean);\n match[1] = match[1].slice(0, keyEndIndex);\n }\n value = fc(handleHasOptions.call(this, match[1].trim(), clonedOptions), clonedOptions);\n if (value && match[0] === str && !isString(value)) return value;\n if (!isString(value)) value = makeString(value);\n if (!value) {\n this.logger.warn(`missed to resolve ${match[1]} for nesting ${str}`);\n value = '';\n }\n if (formatters.length) {\n value = formatters.reduce((v, f) => this.format(v, f, options.lng, {\n ...options,\n interpolationkey: match[1].trim()\n }), value.trim());\n }\n str = str.replace(match[0], value);\n this.regexp.lastIndex = 0;\n }\n return str;\n }\n}\n\nconst parseFormatStr = formatStr => {\n let formatName = formatStr.toLowerCase().trim();\n const formatOptions = {};\n if (formatStr.includes('(')) {\n const p = formatStr.split('(');\n formatName = p[0].toLowerCase().trim();\n const optStr = p[1].slice(0, -1);\n if (formatName === 'currency' && !optStr.includes(':')) {\n if (!formatOptions.currency) formatOptions.currency = optStr.trim();\n } else if (formatName === 'relativetime' && !optStr.includes(':')) {\n if (!formatOptions.range) formatOptions.range = optStr.trim();\n } else {\n const opts = optStr.split(';');\n opts.forEach(opt => {\n if (opt) {\n const [key, ...rest] = opt.split(':');\n const val = rest.join(':').trim().replace(/^'+|'+$/g, '');\n const trimmedKey = key.trim();\n if (!formatOptions[trimmedKey]) formatOptions[trimmedKey] = val;\n if (val === 'false') formatOptions[trimmedKey] = false;\n if (val === 'true') formatOptions[trimmedKey] = true;\n if (!isNaN(val)) formatOptions[trimmedKey] = parseInt(val, 10);\n }\n });\n }\n }\n return {\n formatName,\n formatOptions\n };\n};\nconst createCachedFormatter = fn => {\n const cache = {};\n return (v, l, o) => {\n let optForCache = o;\n if (o && o.interpolationkey && o.formatParams && o.formatParams[o.interpolationkey] && o[o.interpolationkey]) {\n optForCache = {\n ...optForCache,\n [o.interpolationkey]: undefined\n };\n }\n const key = l + JSON.stringify(optForCache);\n let frm = cache[key];\n if (!frm) {\n frm = fn(getCleanedCode(l), o);\n cache[key] = frm;\n }\n return frm(v);\n };\n};\nconst createNonCachedFormatter = fn => (v, l, o) => fn(getCleanedCode(l), o)(v);\nclass Formatter {\n constructor(options = {}) {\n this.logger = baseLogger.create('formatter');\n this.options = options;\n this.init(options);\n }\n init(services, options = {\n interpolation: {}\n }) {\n this.formatSeparator = options.interpolation.formatSeparator || ',';\n const cf = options.cacheInBuiltFormats ? createCachedFormatter : createNonCachedFormatter;\n this.formats = {\n number: cf((lng, opt) => {\n const formatter = new Intl.NumberFormat(lng, {\n ...opt\n });\n return val => formatter.format(val);\n }),\n currency: cf((lng, opt) => {\n const formatter = new Intl.NumberFormat(lng, {\n ...opt,\n style: 'currency'\n });\n return val => formatter.format(val);\n }),\n datetime: cf((lng, opt) => {\n const formatter = new Intl.DateTimeFormat(lng, {\n ...opt\n });\n return val => formatter.format(val);\n }),\n relativetime: cf((lng, opt) => {\n const formatter = new Intl.RelativeTimeFormat(lng, {\n ...opt\n });\n return val => formatter.format(val, opt.range || 'day');\n }),\n list: cf((lng, opt) => {\n const formatter = new Intl.ListFormat(lng, {\n ...opt\n });\n return val => formatter.format(val);\n })\n };\n }\n add(name, fc) {\n this.formats[name.toLowerCase().trim()] = fc;\n }\n addCached(name, fc) {\n this.formats[name.toLowerCase().trim()] = createCachedFormatter(fc);\n }\n format(value, format, lng, options = {}) {\n if (!format) return value;\n if (value == null) return value;\n const rawFormats = format.split(this.formatSeparator);\n const formats = [];\n for (let i = 0; i < rawFormats.length; i++) {\n let f = rawFormats[i];\n while (f.indexOf('(') > -1 && !f.includes(')') && i + 1 < rawFormats.length) {\n f = `${f}${this.formatSeparator}${rawFormats[++i]}`;\n }\n formats.push(f);\n }\n const result = formats.reduce((mem, f) => {\n const {\n formatName,\n formatOptions\n } = parseFormatStr(f);\n if (this.formats[formatName]) {\n let formatted = mem;\n try {\n const valOptions = options?.formatParams?.[options.interpolationkey] || {};\n const l = valOptions.locale || valOptions.lng || options.locale || options.lng || lng;\n formatted = this.formats[formatName](mem, l, {\n ...formatOptions,\n ...options,\n ...valOptions\n });\n } catch (error) {\n this.logger.warn(error);\n }\n return formatted;\n } else {\n this.logger.warn(`there was no format function for ${formatName}`);\n }\n return mem;\n }, value);\n return result;\n }\n}\n\nconst removePending = (q, name) => {\n if (q.pending[name] !== undefined) {\n delete q.pending[name];\n q.pendingCount--;\n }\n};\nclass Connector extends EventEmitter {\n constructor(backend, store, services, options = {}) {\n super();\n this.backend = backend;\n this.store = store;\n this.services = services;\n this.languageUtils = services.languageUtils;\n this.options = options;\n this.logger = baseLogger.create('backendConnector');\n this.waitingReads = [];\n this.maxParallelReads = options.maxParallelReads || 10;\n this.readingCalls = 0;\n this.maxRetries = options.maxRetries >= 0 ? options.maxRetries : 5;\n this.retryTimeout = options.retryTimeout >= 1 ? options.retryTimeout : 350;\n this.state = {};\n this.queue = [];\n this.backend?.init?.(services, options.backend, options);\n }\n queueLoad(languages, namespaces, options, callback) {\n const toLoad = {};\n const pending = {};\n const toLoadLanguages = {};\n const toLoadNamespaces = {};\n languages.forEach(lng => {\n let hasAllNamespaces = true;\n namespaces.forEach(ns => {\n const name = `${lng}|${ns}`;\n if (!options.reload && this.store.hasResourceBundle(lng, ns)) {\n this.state[name] = 2;\n } else if (this.state[name] < 0) ; else if (this.state[name] === 1) {\n if (pending[name] === undefined) pending[name] = true;\n } else {\n this.state[name] = 1;\n hasAllNamespaces = false;\n if (pending[name] === undefined) pending[name] = true;\n if (toLoad[name] === undefined) toLoad[name] = true;\n if (toLoadNamespaces[ns] === undefined) toLoadNamespaces[ns] = true;\n }\n });\n if (!hasAllNamespaces) toLoadLanguages[lng] = true;\n });\n if (Object.keys(toLoad).length || Object.keys(pending).length) {\n this.queue.push({\n pending,\n pendingCount: Object.keys(pending).length,\n loaded: {},\n errors: [],\n callback\n });\n }\n return {\n toLoad: Object.keys(toLoad),\n pending: Object.keys(pending),\n toLoadLanguages: Object.keys(toLoadLanguages),\n toLoadNamespaces: Object.keys(toLoadNamespaces)\n };\n }\n loaded(name, err, data) {\n const s = name.split('|');\n const lng = s[0];\n const ns = s[1];\n if (err) this.emit('failedLoading', lng, ns, err);\n if (!err && data) {\n this.store.addResourceBundle(lng, ns, data, undefined, undefined, {\n skipCopy: true\n });\n }\n this.state[name] = err ? -1 : 2;\n if (err && data) this.state[name] = 0;\n const loaded = {};\n this.queue.forEach(q => {\n pushPath(q.loaded, [lng], ns);\n removePending(q, name);\n if (err) q.errors.push(err);\n if (q.pendingCount === 0 && !q.done) {\n Object.keys(q.loaded).forEach(l => {\n if (!loaded[l]) loaded[l] = {};\n const loadedKeys = q.loaded[l];\n if (loadedKeys.length) {\n loadedKeys.forEach(n => {\n if (loaded[l][n] === undefined) loaded[l][n] = true;\n });\n }\n });\n q.done = true;\n if (q.errors.length) {\n q.callback(q.errors);\n } else {\n q.callback();\n }\n }\n });\n this.emit('loaded', loaded);\n this.queue = this.queue.filter(q => !q.done);\n }\n read(lng, ns, fcName, tried = 0, wait = this.retryTimeout, callback) {\n if (!lng.length) return callback(null, {});\n if (this.readingCalls >= this.maxParallelReads) {\n this.waitingReads.push({\n lng,\n ns,\n fcName,\n tried,\n wait,\n callback\n });\n return;\n }\n this.readingCalls++;\n const resolver = (err, data) => {\n this.readingCalls--;\n if (this.waitingReads.length > 0) {\n const next = this.waitingReads.shift();\n this.read(next.lng, next.ns, next.fcName, next.tried, next.wait, next.callback);\n }\n if (err && data && tried < this.maxRetries) {\n setTimeout(() => {\n this.read(lng, ns, fcName, tried + 1, wait * 2, callback);\n }, wait);\n return;\n }\n callback(err, data);\n };\n const fc = this.backend[fcName].bind(this.backend);\n if (fc.length === 2) {\n try {\n const r = fc(lng, ns);\n if (r && typeof r.then === 'function') {\n r.then(data => resolver(null, data)).catch(resolver);\n } else {\n resolver(null, r);\n }\n } catch (err) {\n resolver(err);\n }\n return;\n }\n return fc(lng, ns, resolver);\n }\n prepareLoading(languages, namespaces, options = {}, callback) {\n if (!this.backend) {\n this.logger.warn('No backend was added via i18next.use. Will not load resources.');\n return callback && callback();\n }\n if (isString(languages)) languages = this.languageUtils.toResolveHierarchy(languages);\n if (isString(namespaces)) namespaces = [namespaces];\n const toLoad = this.queueLoad(languages, namespaces, options, callback);\n if (!toLoad.toLoad.length) {\n if (!toLoad.pending.length) callback();\n return null;\n }\n toLoad.toLoad.forEach(name => {\n this.loadOne(name);\n });\n }\n load(languages, namespaces, callback) {\n this.prepareLoading(languages, namespaces, {}, callback);\n }\n reload(languages, namespaces, callback) {\n this.prepareLoading(languages, namespaces, {\n reload: true\n }, callback);\n }\n loadOne(name, prefix = '') {\n const s = name.split('|');\n const lng = s[0];\n const ns = s[1];\n this.read(lng, ns, 'read', undefined, undefined, (err, data) => {\n if (err) this.logger.warn(`${prefix}loading namespace ${ns} for language ${lng} failed`, err);\n if (!err && data) this.logger.log(`${prefix}loaded namespace ${ns} for language ${lng}`, data);\n this.loaded(name, err, data);\n });\n }\n saveMissing(languages, namespace, key, fallbackValue, isUpdate, options = {}, clb = () => {}) {\n if (this.services?.utils?.hasLoadedNamespace && !this.services?.utils?.hasLoadedNamespace(namespace)) {\n this.logger.warn(`did not save key \"${key}\" as the namespace \"${namespace}\" was not yet loaded`, 'This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!');\n return;\n }\n if (key === undefined || key === null || key === '') return;\n if (this.backend?.create) {\n const opts = {\n ...options,\n isUpdate\n };\n const fc = this.backend.create.bind(this.backend);\n if (fc.length < 6) {\n try {\n let r;\n if (fc.length === 5) {\n r = fc(languages, namespace, key, fallbackValue, opts);\n } else {\n r = fc(languages, namespace, key, fallbackValue);\n }\n if (r && typeof r.then === 'function') {\n r.then(data => clb(null, data)).catch(clb);\n } else {\n clb(null, r);\n }\n } catch (err) {\n clb(err);\n }\n } else {\n fc(languages, namespace, key, fallbackValue, clb, opts);\n }\n }\n if (!languages || !languages[0]) return;\n this.store.addResource(languages[0], namespace, key, fallbackValue);\n }\n}\n\nconst get = () => ({\n debug: false,\n initAsync: true,\n ns: ['translation'],\n defaultNS: ['translation'],\n fallbackLng: ['dev'],\n fallbackNS: false,\n supportedLngs: false,\n nonExplicitSupportedLngs: false,\n load: 'all',\n preload: false,\n keySeparator: '.',\n nsSeparator: ':',\n pluralSeparator: '_',\n contextSeparator: '_',\n enableSelector: false,\n partialBundledLanguages: false,\n saveMissing: false,\n updateMissing: false,\n saveMissingTo: 'fallback',\n saveMissingPlurals: true,\n missingKeyHandler: false,\n missingInterpolationHandler: false,\n postProcess: false,\n postProcessPassResolved: false,\n returnNull: false,\n returnEmptyString: true,\n returnObjects: false,\n joinArrays: false,\n returnedObjectHandler: false,\n parseMissingKeyHandler: false,\n appendNamespaceToMissingKey: false,\n appendNamespaceToCIMode: false,\n overloadTranslationOptionHandler: args => {\n let ret = {};\n if (typeof args[1] === 'object') ret = args[1];\n if (isString(args[1])) ret.defaultValue = args[1];\n if (isString(args[2])) ret.tDescription = args[2];\n if (typeof args[2] === 'object' || typeof args[3] === 'object') {\n const options = args[3] || args[2];\n Object.keys(options).forEach(key => {\n ret[key] = options[key];\n });\n }\n return ret;\n },\n interpolation: {\n escapeValue: true,\n prefix: '{{',\n suffix: '}}',\n formatSeparator: ',',\n unescapePrefix: '-',\n nestingPrefix: '$t(',\n nestingSuffix: ')',\n nestingOptionsSeparator: ',',\n maxReplaces: 1000,\n skipOnVariables: true\n },\n cacheInBuiltFormats: true\n});\nconst transformOptions = options => {\n if (isString(options.ns)) options.ns = [options.ns];\n if (isString(options.fallbackLng)) options.fallbackLng = [options.fallbackLng];\n if (isString(options.fallbackNS)) options.fallbackNS = [options.fallbackNS];\n if (options.supportedLngs && !options.supportedLngs.includes('cimode')) {\n options.supportedLngs = options.supportedLngs.concat(['cimode']);\n }\n return options;\n};\n\nconst noop = () => {};\nconst bindMemberFunctions = inst => {\n const mems = Object.getOwnPropertyNames(Object.getPrototypeOf(inst));\n mems.forEach(mem => {\n if (typeof inst[mem] === 'function') {\n inst[mem] = inst[mem].bind(inst);\n }\n });\n};\nclass I18n extends EventEmitter {\n constructor(options = {}, callback) {\n super();\n this.options = transformOptions(options);\n this.services = {};\n this.logger = baseLogger;\n this.modules = {\n external: []\n };\n bindMemberFunctions(this);\n if (callback && !this.isInitialized && !options.isClone) {\n if (!this.options.initAsync) {\n this.init(options, callback);\n return this;\n }\n setTimeout(() => {\n this.init(options, callback);\n }, 0);\n }\n }\n init(options = {}, callback) {\n this.isInitializing = true;\n if (typeof options === 'function') {\n callback = options;\n options = {};\n }\n if (options.defaultNS == null && options.ns) {\n if (isString(options.ns)) {\n options.defaultNS = options.ns;\n } else if (!options.ns.includes('translation')) {\n options.defaultNS = options.ns[0];\n }\n }\n const defOpts = get();\n this.options = {\n ...defOpts,\n ...this.options,\n ...transformOptions(options)\n };\n this.options.interpolation = {\n ...defOpts.interpolation,\n ...this.options.interpolation\n };\n if (options.keySeparator !== undefined) {\n this.options.userDefinedKeySeparator = options.keySeparator;\n }\n if (options.nsSeparator !== undefined) {\n this.options.userDefinedNsSeparator = options.nsSeparator;\n }\n if (typeof this.options.overloadTranslationOptionHandler !== 'function') {\n this.options.overloadTranslationOptionHandler = defOpts.overloadTranslationOptionHandler;\n }\n const createClassOnDemand = ClassOrObject => {\n if (!ClassOrObject) return null;\n if (typeof ClassOrObject === 'function') return new ClassOrObject();\n return ClassOrObject;\n };\n if (!this.options.isClone) {\n if (this.modules.logger) {\n baseLogger.init(createClassOnDemand(this.modules.logger), this.options);\n } else {\n baseLogger.init(null, this.options);\n }\n let formatter;\n if (this.modules.formatter) {\n formatter = this.modules.formatter;\n } else {\n formatter = Formatter;\n }\n const lu = new LanguageUtil(this.options);\n this.store = new ResourceStore(this.options.resources, this.options);\n const s = this.services;\n s.logger = baseLogger;\n s.resourceStore = this.store;\n s.languageUtils = lu;\n s.pluralResolver = new PluralResolver(lu, {\n prepend: this.options.pluralSeparator\n });\n if (formatter) {\n s.formatter = createClassOnDemand(formatter);\n if (s.formatter.init) s.formatter.init(s, this.options);\n this.options.interpolation.format = s.formatter.format.bind(s.formatter);\n }\n s.interpolator = new Interpolator(this.options);\n s.utils = {\n hasLoadedNamespace: this.hasLoadedNamespace.bind(this)\n };\n s.backendConnector = new Connector(createClassOnDemand(this.modules.backend), s.resourceStore, s, this.options);\n s.backendConnector.on('*', (event, ...args) => {\n this.emit(event, ...args);\n });\n if (this.modules.languageDetector) {\n s.languageDetector = createClassOnDemand(this.modules.languageDetector);\n if (s.languageDetector.init) s.languageDetector.init(s, this.options.detection, this.options);\n }\n if (this.modules.i18nFormat) {\n s.i18nFormat = createClassOnDemand(this.modules.i18nFormat);\n if (s.i18nFormat.init) s.i18nFormat.init(this);\n }\n this.translator = new Translator(this.services, this.options);\n this.translator.on('*', (event, ...args) => {\n this.emit(event, ...args);\n });\n this.modules.external.forEach(m => {\n if (m.init) m.init(this);\n });\n }\n this.format = this.options.interpolation.format;\n if (!callback) callback = noop;\n if (this.options.fallbackLng && !this.services.languageDetector && !this.options.lng) {\n const codes = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);\n if (codes.length > 0 && codes[0] !== 'dev') this.options.lng = codes[0];\n }\n if (!this.services.languageDetector && !this.options.lng) {\n this.logger.warn('init: no languageDetector is used and no lng is defined');\n }\n const storeApi = ['getResource', 'hasResourceBundle', 'getResourceBundle', 'getDataByLanguage'];\n storeApi.forEach(fcName => {\n this[fcName] = (...args) => this.store[fcName](...args);\n });\n const storeApiChained = ['addResource', 'addResources', 'addResourceBundle', 'removeResourceBundle'];\n storeApiChained.forEach(fcName => {\n this[fcName] = (...args) => {\n this.store[fcName](...args);\n return this;\n };\n });\n const deferred = defer();\n const load = () => {\n const finish = (err, t) => {\n this.isInitializing = false;\n if (this.isInitialized && !this.initializedStoreOnce) this.logger.warn('init: i18next is already initialized. You should call init just once!');\n this.isInitialized = true;\n if (!this.options.isClone) this.logger.log('initialized', this.options);\n this.emit('initialized', this.options);\n deferred.resolve(t);\n callback(err, t);\n };\n if ((this.languages || this.isLanguageChangingTo) && !this.isInitialized) return finish(null, this.t.bind(this));\n this.changeLanguage(this.options.lng, finish);\n };\n if (this.options.resources || !this.options.initAsync) {\n load();\n } else {\n setTimeout(load, 0);\n }\n return deferred;\n }\n loadResources(language, callback = noop) {\n let usedCallback = callback;\n const usedLng = isString(language) ? language : this.language;\n if (typeof language === 'function') usedCallback = language;\n if (!this.options.resources || this.options.partialBundledLanguages) {\n if (usedLng?.toLowerCase() === 'cimode' && (!this.options.preload || this.options.preload.length === 0)) return usedCallback();\n const toLoad = [];\n const append = lng => {\n if (!lng) return;\n if (lng === 'cimode') return;\n const lngs = this.services.languageUtils.toResolveHierarchy(lng);\n lngs.forEach(l => {\n if (l === 'cimode') return;\n if (!toLoad.includes(l)) toLoad.push(l);\n });\n };\n if (!usedLng) {\n const fallbacks = this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);\n fallbacks.forEach(l => append(l));\n } else {\n append(usedLng);\n }\n this.options.preload?.forEach?.(l => append(l));\n this.services.backendConnector.load(toLoad, this.options.ns, e => {\n if (!e && !this.resolvedLanguage && this.language) this.setResolvedLanguage(this.language);\n usedCallback(e);\n });\n } else {\n usedCallback(null);\n }\n }\n reloadResources(lngs, ns, callback) {\n const deferred = defer();\n if (typeof lngs === 'function') {\n callback = lngs;\n lngs = undefined;\n }\n if (typeof ns === 'function') {\n callback = ns;\n ns = undefined;\n }\n if (!lngs) lngs = this.languages;\n if (!ns) ns = this.options.ns;\n if (!callback) callback = noop;\n this.services.backendConnector.reload(lngs, ns, err => {\n deferred.resolve();\n callback(err);\n });\n return deferred;\n }\n use(module) {\n if (!module) throw new Error('You are passing an undefined module! Please check the object you are passing to i18next.use()');\n if (!module.type) throw new Error('You are passing a wrong module! Please check the object you are passing to i18next.use()');\n if (module.type === 'backend') {\n this.modules.backend = module;\n }\n if (module.type === 'logger' || module.log && module.warn && module.error) {\n this.modules.logger = module;\n }\n if (module.type === 'languageDetector') {\n this.modules.languageDetector = module;\n }\n if (module.type === 'i18nFormat') {\n this.modules.i18nFormat = module;\n }\n if (module.type === 'postProcessor') {\n postProcessor.addPostProcessor(module);\n }\n if (module.type === 'formatter') {\n this.modules.formatter = module;\n }\n if (module.type === '3rdParty') {\n this.modules.external.push(module);\n }\n return this;\n }\n setResolvedLanguage(l) {\n if (!l || !this.languages) return;\n if (['cimode', 'dev'].includes(l)) return;\n for (let li = 0; li < this.languages.length; li++) {\n const lngInLngs = this.languages[li];\n if (['cimode', 'dev'].includes(lngInLngs)) continue;\n if (this.store.hasLanguageSomeTranslations(lngInLngs)) {\n this.resolvedLanguage = lngInLngs;\n break;\n }\n }\n if (!this.resolvedLanguage && !this.languages.includes(l) && this.store.hasLanguageSomeTranslations(l)) {\n this.resolvedLanguage = l;\n this.languages.unshift(l);\n }\n }\n changeLanguage(lng, callback) {\n this.isLanguageChangingTo = lng;\n const deferred = defer();\n this.emit('languageChanging', lng);\n const setLngProps = l => {\n this.language = l;\n this.languages = this.services.languageUtils.toResolveHierarchy(l);\n this.resolvedLanguage = undefined;\n this.setResolvedLanguage(l);\n };\n const done = (err, l) => {\n if (l) {\n if (this.isLanguageChangingTo === lng) {\n setLngProps(l);\n this.translator.changeLanguage(l);\n this.isLanguageChangingTo = undefined;\n this.emit('languageChanged', l);\n this.logger.log('languageChanged', l);\n }\n } else {\n this.isLanguageChangingTo = undefined;\n }\n deferred.resolve((...args) => this.t(...args));\n if (callback) callback(err, (...args) => this.t(...args));\n };\n const setLng = lngs => {\n if (!lng && !lngs && this.services.languageDetector) lngs = [];\n const fl = isString(lngs) ? lngs : lngs && lngs[0];\n const l = this.store.hasLanguageSomeTranslations(fl) ? fl : this.services.languageUtils.getBestMatchFromCodes(isString(lngs) ? [lngs] : lngs);\n if (l) {\n if (!this.language) {\n setLngProps(l);\n }\n if (!this.translator.language) this.translator.changeLanguage(l);\n this.services.languageDetector?.cacheUserLanguage?.(l);\n }\n this.loadResources(l, err => {\n done(err, l);\n });\n };\n if (!lng && this.services.languageDetector && !this.services.languageDetector.async) {\n setLng(this.services.languageDetector.detect());\n } else if (!lng && this.services.languageDetector && this.services.languageDetector.async) {\n if (this.services.languageDetector.detect.length === 0) {\n this.services.languageDetector.detect().then(setLng);\n } else {\n this.services.languageDetector.detect(setLng);\n }\n } else {\n setLng(lng);\n }\n return deferred;\n }\n getFixedT(lng, ns, keyPrefix, fixedOpts) {\n const scopeNs = fixedOpts?.scopeNs;\n const fixedT = (key, opts, ...rest) => {\n let o;\n if (typeof opts !== 'object') {\n o = this.options.overloadTranslationOptionHandler([key, opts].concat(rest));\n } else {\n o = {\n ...opts\n };\n }\n o.lng = o.lng || fixedT.lng;\n o.lngs = o.lngs || fixedT.lngs;\n const explicitCallNs = o.ns !== undefined && o.ns !== null;\n o.ns = o.ns || fixedT.ns;\n if (o.keyPrefix !== '') o.keyPrefix = o.keyPrefix || keyPrefix || fixedT.keyPrefix;\n const selectorOpts = {\n ...this.options,\n ...o\n };\n if (Array.isArray(scopeNs) && !explicitCallNs) selectorOpts.ns = scopeNs;\n if (typeof o.keyPrefix === 'function') o.keyPrefix = keysFromSelector(o.keyPrefix, selectorOpts);\n const keySeparator = this.options.keySeparator || '.';\n let resultKey;\n if (o.keyPrefix && Array.isArray(key)) {\n resultKey = key.map(k => {\n if (typeof k === 'function') k = keysFromSelector(k, selectorOpts);\n return `${o.keyPrefix}${keySeparator}${k}`;\n });\n } else {\n if (typeof key === 'function') key = keysFromSelector(key, selectorOpts);\n resultKey = o.keyPrefix ? `${o.keyPrefix}${keySeparator}${key}` : key;\n }\n return this.t(resultKey, o);\n };\n if (isString(lng)) {\n fixedT.lng = lng;\n } else {\n fixedT.lngs = lng;\n }\n fixedT.ns = ns;\n fixedT.keyPrefix = keyPrefix;\n return fixedT;\n }\n t(...args) {\n return this.translator?.translate(...args);\n }\n exists(...args) {\n return this.translator?.exists(...args);\n }\n setDefaultNamespace(ns) {\n this.options.defaultNS = ns;\n }\n hasLoadedNamespace(ns, options = {}) {\n if (!this.isInitialized) {\n this.logger.warn('hasLoadedNamespace: i18next was not initialized', this.languages);\n return false;\n }\n if (!this.languages || !this.languages.length) {\n this.logger.warn('hasLoadedNamespace: i18n.languages were undefined or empty', this.languages);\n return false;\n }\n const lng = options.lng || this.resolvedLanguage || this.languages[0];\n const fallbackLng = this.options ? this.options.fallbackLng : false;\n const lastLng = this.languages[this.languages.length - 1];\n if (lng.toLowerCase() === 'cimode') return true;\n const loadNotPending = (l, n) => {\n const loadState = this.services.backendConnector.state[`${l}|${n}`];\n return loadState === -1 || loadState === 0 || loadState === 2;\n };\n if (options.precheck) {\n const preResult = options.precheck(this, loadNotPending);\n if (preResult !== undefined) return preResult;\n }\n if (this.hasResourceBundle(lng, ns)) return true;\n if (!this.services.backendConnector.backend || this.options.resources && !this.options.partialBundledLanguages) return true;\n if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns))) return true;\n return false;\n }\n loadNamespaces(ns, callback) {\n const deferred = defer();\n if (!this.options.ns) {\n if (callback) callback();\n return Promise.resolve();\n }\n if (isString(ns)) ns = [ns];\n ns.forEach(n => {\n if (!this.options.ns.includes(n)) this.options.ns.push(n);\n });\n this.loadResources(err => {\n deferred.resolve();\n if (callback) callback(err);\n });\n return deferred;\n }\n loadLanguages(lngs, callback) {\n const deferred = defer();\n if (isString(lngs)) lngs = [lngs];\n const preloaded = this.options.preload || [];\n const newLngs = lngs.filter(lng => !preloaded.includes(lng) && this.services.languageUtils.isSupportedCode(lng));\n if (!newLngs.length) {\n if (callback) callback();\n return Promise.resolve();\n }\n this.options.preload = preloaded.concat(newLngs);\n this.loadResources(err => {\n deferred.resolve();\n if (callback) callback(err);\n });\n return deferred;\n }\n dir(lng) {\n if (!lng) lng = this.resolvedLanguage || (this.languages?.length > 0 ? this.languages[0] : this.language);\n if (!lng) return 'rtl';\n try {\n const l = new Intl.Locale(lng);\n if (l && l.getTextInfo) {\n const ti = l.getTextInfo();\n if (ti && ti.direction) return ti.direction;\n }\n } catch (e) {}\n const rtlLngs = ['ar', 'shu', 'sqr', 'ssh', 'xaa', 'yhd', 'yud', 'aao', 'abh', 'abv', 'acm', 'acq', 'acw', 'acx', 'acy', 'adf', 'ads', 'aeb', 'aec', 'afb', 'ajp', 'apc', 'apd', 'arb', 'arq', 'ars', 'ary', 'arz', 'auz', 'avl', 'ayh', 'ayl', 'ayn', 'ayp', 'bbz', 'pga', 'he', 'iw', 'ps', 'pbt', 'pbu', 'pst', 'prp', 'prd', 'ug', 'ur', 'ydd', 'yds', 'yih', 'ji', 'yi', 'hbo', 'men', 'xmn', 'fa', 'jpr', 'peo', 'pes', 'prs', 'dv', 'sam', 'ckb'];\n const languageUtils = this.services?.languageUtils || new LanguageUtil(get());\n if (lng.toLowerCase().indexOf('-latn') > 1) return 'ltr';\n return rtlLngs.includes(languageUtils.getLanguagePartFromCode(lng)) || lng.toLowerCase().indexOf('-arab') > 1 ? 'rtl' : 'ltr';\n }\n static createInstance(options = {}, callback) {\n const instance = new I18n(options, callback);\n instance.createInstance = I18n.createInstance;\n return instance;\n }\n cloneInstance(options = {}, callback = noop) {\n const forkResourceStore = options.forkResourceStore;\n if (forkResourceStore) delete options.forkResourceStore;\n const mergedOptions = {\n ...this.options,\n ...options,\n ...{\n isClone: true\n }\n };\n const clone = new I18n(mergedOptions);\n if (options.debug !== undefined || options.prefix !== undefined) {\n clone.logger = clone.logger.clone(options);\n }\n const membersToCopy = ['store', 'services', 'language'];\n membersToCopy.forEach(m => {\n clone[m] = this[m];\n });\n clone.services = {\n ...this.services\n };\n clone.services.utils = {\n hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)\n };\n if (forkResourceStore) {\n const clonedData = Object.keys(this.store.data).reduce((prev, l) => {\n prev[l] = {\n ...this.store.data[l]\n };\n prev[l] = Object.keys(prev[l]).reduce((acc, n) => {\n acc[n] = {\n ...prev[l][n]\n };\n return acc;\n }, prev[l]);\n return prev;\n }, {});\n clone.store = new ResourceStore(clonedData, mergedOptions);\n clone.services.resourceStore = clone.store;\n }\n if (options.interpolation) {\n const defOpts = get();\n const mergedInterpolation = {\n ...defOpts.interpolation,\n ...this.options.interpolation,\n ...options.interpolation\n };\n const mergedForInterpolator = {\n ...mergedOptions,\n interpolation: mergedInterpolation\n };\n clone.services.interpolator = new Interpolator(mergedForInterpolator);\n }\n clone.translator = new Translator(clone.services, mergedOptions);\n clone.translator.on('*', (event, ...args) => {\n clone.emit(event, ...args);\n });\n clone.init(mergedOptions, callback);\n clone.translator.options = mergedOptions;\n clone.translator.backendConnector.services.utils = {\n hasLoadedNamespace: clone.hasLoadedNamespace.bind(clone)\n };\n return clone;\n }\n toJSON() {\n return {\n options: this.options,\n store: this.store,\n language: this.language,\n languages: this.languages,\n resolvedLanguage: this.resolvedLanguage\n };\n }\n}\nconst instance = I18n.createInstance();\n\nconst createInstance = instance.createInstance;\nconst dir = instance.dir;\nconst init = instance.init;\nconst loadResources = instance.loadResources;\nconst reloadResources = instance.reloadResources;\nconst use = instance.use;\nconst changeLanguage = instance.changeLanguage;\nconst getFixedT = instance.getFixedT;\nconst t = instance.t;\nconst exists = instance.exists;\nconst setDefaultNamespace = instance.setDefaultNamespace;\nconst hasLoadedNamespace = instance.hasLoadedNamespace;\nconst loadNamespaces = instance.loadNamespaces;\nconst loadLanguages = instance.loadLanguages;\n\nexport { changeLanguage, createInstance, instance as default, dir, exists, getFixedT, hasLoadedNamespace, init, keysFromSelector as keyFromSelector, loadLanguages, loadNamespaces, loadResources, reloadResources, setDefaultNamespace, t, use };\n","import { Subject } from 'rxjs';\nimport { QueueEventType } from '../shared/types';\nconst queues = new Set();\nexport function createQueue(id) {\n id && queues.add(id);\n}\nexport const queue$ = new Subject();\nwindow.f5.onQueueUpdate((id, event) => {\n if (queues.has(id)) {\n queue$.next({ id, event });\n if (event.type == QueueEventType.Complete) {\n queues.delete(id);\n }\n }\n});\n","import React, { useState, useEffect, useRef, useContext } from \"react\";\nimport classNames from 'classnames';\nimport { AppSettingsContext } from '../../context/config';\nimport { SortOrder, LocalFileSystemID, FailureType } from '../../shared/types';\nimport { parseURI, createURI } from '../../shared/utils/URI';\nimport { buildFilterPredicate } from '../../shared/utils/filter';\nimport { dirname, descendantOf, join, basename } from '../../utils/path';\nimport { unixToWin } from '../../shared/utils/os';\nimport getFileIcon from '../../utils/fileicon';\nimport styles from './Explorer.less';\nimport Breadcrumbs from \"../Breadcrumbs/Breadcrumbs\";\nimport Filter from '../Filter/Filter';\nimport List, { ColumnType } from '../List/List';\nimport Toolbar from '../Toolbar/Toolbar';\nimport { dir$ } from '../../observables/dir';\nimport { filter } from 'rxjs/operators';\nimport { useEffectOnUpdate, useSubscribe, useCustomCompareEffect, useFocus } from '../../hooks';\nimport { sortWith, descend, ascend, prop, without, pick, pipe, omit, keys, reduce, insertAll, sortBy, length, whereEq, takeLast, equals, adjust, sort, identity, map } from 'ramda';\nimport numeral from 'numeral';\nimport { DropEffect } from '../List/List';\nimport { Menu, ContextMenu, Tooltips } from '../../ui/components';\nimport { format } from 'date-fns';\nimport { t } from 'i18next';\nimport { command$ } from '../../observables/command';\nimport { CommandID } from '../../commands';\nimport { error$ } from '../../observables/error';\nimport { createQueue } from '../../observables/queue';\nconst createDragImage = (text) => {\n const dragImage = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n dragImage.setAttribute('class', 'drag-image');\n dragImage.setAttribute('viewBox', `0 0 ${text.length * 15 + 10} 20`);\n dragImage.setAttribute('width', `${text.length * 15 + 10}`);\n dragImage.setAttribute('height', '20');\n dragImage.innerHTML = `<text x=15 y=15>${text}</text>`;\n document.body.appendChild(dragImage);\n return dragImage;\n};\nconst filterFiles = (files, predicate) => {\n return files.filter(predicate);\n};\nconst sortFiles = (files, columns) => {\n const sortings = [descend(prop('dir'))];\n const sortedBy = columns.find(({ sort }) => !!sort);\n if (sortedBy) {\n const getLowerName = pipe(prop(sortedBy.name), v => typeof v === 'string' ? v.toLowerCase() : v);\n sortings.push(sortedBy.sort == SortOrder.Asc ?\n ascend(getLowerName) :\n descend(getLowerName));\n }\n return sortWith(sortings, files);\n};\nconst rightsToStr = (n) => n.toString(8)\n .split('')\n .map(s => parseInt(s))\n .reverse()\n .slice(0, 3)\n .reduce((rights, n) => [...rights, (n & 4 ? 'r' : '-') + (n & 2 ? 'w' : '-') + (n & 1 ? 'x' : '-')], [])\n .reverse()\n .join('');\nconst toColumns = (columns, formatters) => {\n return (files) => files.map(file => ({\n ...file,\n ...{ rawSize: file.size },\n ...columns.reduce((props, { name }) => ({ ...props,\n [name]: new String(name == 'size' && file.dir ? '' : name in formatters ? formatters[name](file[name]) : file[name])\n }), {})\n }));\n};\nconst onlyVisible = (dirs) => {\n const first = dirs.sort(ascend(prop('length'))).shift();\n const visible = new Set(first ? [first] : []);\n dirs.forEach(dir => visible.has(dirname(dir)) && visible.add(dir));\n return Array.from(visible.values());\n};\nconst HISTORY_SIZE = 5;\nexport default function Explorer({ icon, connection, connectionName, homeDir, sid, settings, path, fixedRoot, onChange, onSelect, onOpen, onMenu, onSettingsChange, toolbar, tabindex, onFocus, onBlur, contextMenu = [], onNewFile, children }) {\n const appSettings = useContext(AppSettingsContext);\n const rootRef = useRef(null);\n const [columns, setColumns] = useState([]);\n const [root, setRoot] = useState(path);\n const [parent, setParent] = useState();\n const [files, setFiles] = useState([]);\n const selected = useRef([]);\n const target = useRef(undefined);\n const watched = useRef([]);\n const folders = useRef({});\n const [loadingRoot, setLoadingRoot] = useState(true);\n const [stat, setStat] = useState({ files: 0, dirs: 0, size: 0 });\n const [showFilter, setShowFilter] = useState(false);\n const [initialFilter, setInitialFilter] = useState();\n const filterSettings = useRef(undefined);\n const nameMatchesFilter = useRef(null);\n const userChangedFilter = useRef(false);\n const history = useRef([]);\n const historyIndex = useRef(0);\n const goHistory = useRef(-1);\n const [isFirst, setIsFirst] = useState(true);\n const [isLast, setIsLast] = useState(true);\n const expanded = useRef([]);\n const list = useRef(null);\n const [showColumnsMenu, setShowColumnsMenu] = useState(false);\n const updateColumns = () => {\n setColumns(settings.columns.filter(({ visible, name }) => visible == true || name == 'name').map(c => ({\n name: c.name,\n type: c.type == 'number' ? ColumnType.Number : ColumnType.String,\n title: c.title,\n width: c.width,\n sort: settings.sort[0] == c.name ? settings.sort[1] : undefined\n })));\n };\n useCustomCompareEffect(() => {\n updateColumns();\n }, [settings.columns], equals);\n useCustomCompareEffect(() => {\n if (!userChangedFilter.current) {\n filterSettings.current = settings.filter;\n setInitialFilter(settings.filter);\n setShowFilter(settings.filter != null);\n }\n userChangedFilter.current = false;\n }, [settings.filter], equals);\n useEffectOnUpdate(() => setRoot(path), [path]);\n useEffect(() => {\n setParent(root == fixedRoot ? undefined : dirname(root));\n }, [fixedRoot]);\n useEffect(() => {\n setParent(root == fixedRoot ? undefined : dirname(root));\n watch([root]);\n setLoadingRoot(true);\n return () => {\n setLoadingRoot(false);\n unwatch(watched.current);\n setFiles([]);\n selected.current = [];\n expanded.current = [];\n };\n }, [root]);\n useEffectOnUpdate(() => {\n onChange(root);\n if (goHistory.current >= 0) {\n historyIndex.current = goHistory.current;\n }\n else {\n if (root != history.current[history.current.length - 1]) {\n history.current = takeLast(HISTORY_SIZE, [...history.current, root]);\n }\n historyIndex.current = history.current.length - 1;\n onSettingsChange?.({ history: history.current });\n }\n goHistory.current = -1;\n setIsFirst(historyIndex.current == 0);\n setIsLast(historyIndex.current == history.current.length - 1);\n // console.log(history.current, historyIndex.current)\n }, [root]);\n useCustomCompareEffect(() => {\n history.current = settings.history;\n historyIndex.current = Math.max(history.current.length - 1, 0);\n }, [settings], equals);\n const formatters = {\n modified: (value) => format(value, appSettings.timeFmt),\n size: (value) => numeral(value).format(appSettings.sizeFmt),\n rights: (value) => typeof value == 'number' ? rightsToStr(value) : value\n };\n const filterPredicate = (file) => {\n if (!showFilter) {\n return true;\n }\n if (filterSettings.current) {\n if (filterSettings.current.ignored === true &&\n 'git_i' in file.attributes) {\n return false;\n }\n if (filterSettings.current.uncommited === true &&\n !('git_u' in file.attributes ||\n 'git_m' in file.attributes ||\n 'git_a' in file.attributes ||\n 'git_c' in file.attributes)) {\n return false;\n }\n }\n if (filterSettings.current?.folders !== true && file.dir) {\n return true;\n }\n if (nameMatchesFilter.current) {\n return nameMatchesFilter.current(file.name);\n }\n return true;\n };\n const update = () => {\n folders.current = pick(watched.current, folders.current);\n setFiles(pipe(omit([root]), keys, sortBy(length), reduce((files, dir) => {\n const i = files.findIndex(({ path }) => path == dir);\n return i >= 0\n ? insertAll(i + 1, sortFiles(filterFiles(folders.current[dir], filterPredicate), columns), files)\n : files;\n }, sortFiles(filterFiles(folders.current[root] ?? [], filterPredicate), columns)), appSettings.fileIcons ?\n map(f => ({\n ...f,\n icon: getFileIcon(appSettings.fileIcons, f.path, f.dir ? expanded.current.includes(f.path) : undefined),\n tooltip: LocalFileSystemID && appSettings.isWin ? unixToWin(f.path) : f.path\n })) : identity, toColumns(columns, formatters))(folders.current));\n };\n useSubscribe(() => dir$.pipe(filter(({ dir }) => {\n const { id, path } = parseURI(dir);\n return connection == id && watched.current.includes(path);\n }))\n .subscribe(({ dir, files }) => {\n const { path } = parseURI(dir);\n folders.current[path] = files;\n update();\n if (path == root) {\n setLoadingRoot(false);\n }\n }), [update]);\n useEffectOnUpdate(() => {\n update();\n }, [columns]);\n const setFilterSettings = (filter) => {\n nameMatchesFilter.current = filter\n ? buildFilterPredicate(filter)\n : null;\n update();\n if (!equals(filter, settings.filter)) {\n onSettingsChange?.({ filter });\n }\n };\n useEffectOnUpdate(() => {\n setFilterSettings(showFilter ? filterSettings.current : undefined);\n !showFilter && list.current?.focus();\n }, [showFilter]);\n useEffect(() => {\n const resizeList = new ResizeObserver((entries) => {\n for (const entry of entries) {\n setTimeout(() => {\n entry.target.scrollLeft = 0;\n }, 200);\n }\n });\n list.current && resizeList.observe(list.current);\n return () => { list.current && resizeList.unobserve(list.current); };\n }, []);\n useEffect(() => {\n return () => onBlur?.();\n }, []);\n const focused = useFocus(rootRef);\n useEffect(() => {\n focused ? onFocus?.() : onBlur?.();\n }, [focused]);\n useSubscribe(() => command$.pipe(filter(() => focused)).subscribe(cmd => {\n switch (cmd.id) {\n case CommandID.Refresh: {\n if (connection) {\n window.f5.refresh(createURI(connection, path));\n }\n break;\n }\n case CommandID.Copy: {\n const uris = selected.current?.map(path => createURI(connection, path));\n if (uris.length) {\n cmd.e.preventDefault();\n cmd.e.clipboardData\n && cmd.e.clipboardData.setData('URIs', JSON.stringify(uris));\n }\n break;\n }\n case CommandID.Paste: {\n if (cmd.files) {\n uploadFiles(cmd.files, target.current ?? root);\n }\n else if (cmd.uris) {\n if (!cmd.uris.length) {\n return;\n }\n window.f5.copy(cmd.uris, createURI(connection, target.current ?? root))\n .then(qid => createQueue(qid));\n }\n break;\n }\n case CommandID.CopyURI: {\n const uri = cmd.uri ?? (target.current ? createURI(connection, target.current) : null);\n if (uri) {\n const uris = selected.current?.map(path => createURI(connection, path));\n navigator.clipboard.writeText((uris.includes(uri) ? uris : [uri]).join(' '));\n }\n break;\n }\n case CommandID.CopyPath: {\n const path = cmd.uri ? parseURI(cmd.uri).path : target.current;\n if (path) {\n const paths = selected.current?.includes(path) ? selected.current : [path];\n navigator.clipboard.writeText((connection == LocalFileSystemID && appSettings.isWin ? paths.map(unixToWin) : paths).join(' '));\n }\n break;\n }\n case CommandID.CopyRelativePath: {\n const path = cmd.uri ? parseURI(cmd.uri).path : target.current;\n if (path) {\n const paths = (selected.current?.includes(path) ? selected.current : [path])\n .map(path => path.substring(root.length + 1));\n navigator.clipboard.writeText((connection == LocalFileSystemID && appSettings.isWin ? paths.map(unixToWin) : paths).join(' '));\n }\n break;\n }\n case CommandID.CopyName: {\n const path = cmd.uri ? parseURI(cmd.uri).path : target.current;\n if (path) {\n navigator.clipboard.writeText((selected.current.includes(path) ? selected.current : [path])\n .map(path => basename(path))\n .join(' '));\n }\n break;\n }\n case CommandID.CopyNameNoExt: {\n const path = cmd.uri ? parseURI(cmd.uri).path : target.current;\n if (path) {\n navigator.clipboard.writeText((selected.current.includes(path) ? selected.current : [path])\n .map(path => {\n const name = basename(path);\n const dot = name.lastIndexOf('.');\n return name.substring(0, dot > 0 ? dot : name.length);\n })\n .join(' '));\n }\n break;\n }\n case CommandID.Delete: {\n if (selected.current?.length) {\n error$.next({\n type: FailureType.ConfirmDeletion,\n files: selected.current.map(path => createURI(connection ?? LocalFileSystemID, path))\n });\n }\n break;\n }\n case CommandID.ClearContents: {\n error$.next({ type: FailureType.ConfirmClear, file: cmd.uri });\n break;\n }\n case CommandID.Duplicate: {\n let files = [];\n if (cmd.uri) {\n const { path } = parseURI(cmd.uri);\n files = (selected.current?.length && selected.current?.includes(path)) ? selected.current : [path];\n }\n else {\n files = selected.current ?? [];\n }\n files.length && window.f5.duplicate(files.map(path => createURI(connection ?? LocalFileSystemID, path)), filterSettings.current);\n break;\n }\n case CommandID.ShowFilter: {\n userChangedFilter.current = true;\n setShowFilter(showFilter => !showFilter);\n break;\n }\n case CommandID.GoBack: {\n setRoot(history.current[goHistory.current = Math.max(historyIndex.current - 1, 0)]);\n break;\n }\n case CommandID.GoForward: {\n setRoot(history.current[Math.min(goHistory.current = historyIndex.current + 1, history.current.length - 1)]);\n break;\n }\n }\n }), [focused]);\n const watch = (dirs) => {\n watched.current.push(...dirs);\n dirs.forEach(dir => {\n window.f5.watch(createURI(connection, dir));\n });\n };\n const unwatch = (dirs) => {\n watched.current = without(dirs, watched.current);\n update();\n dirs.forEach(dir => window.f5.unwatch(connection + dir));\n };\n const toggle = (dir) => {\n if (expanded.current.includes(dir)) {\n unwatch(watched.current.filter(descendantOf(dir)));\n expanded.current = without([dir], expanded.current);\n }\n else {\n expanded.current.push(dir);\n const a = expanded.current.filter(descendantOf(dir));\n const b = onlyVisible(a);\n watch(onlyVisible(expanded.current.filter(descendantOf(dir))));\n }\n if (appSettings.fileIcons) {\n setFiles(files => files.map(f => ({\n ...f,\n icon: getFileIcon(appSettings.fileIcons, f.path, f.dir ? expanded.current.includes(f.path) : undefined)\n })));\n }\n };\n const createNew = (name, parent, dir) => {\n if (dir) {\n window.f5.mkdir(name, createURI(connection, parent));\n }\n else {\n const uri = createURI(connection, join(parent, name));\n onNewFile ? onNewFile(uri) : window.f5.write(uri, '');\n }\n };\n const uploadFiles = (files, target) => {\n const data = new FormData();\n data.append('to', createURI(connection, target));\n files.forEach(async (file) => data.append('files', file));\n fetch('/api/upload', { method: 'POST', body: data });\n };\n const onDragStart = (dragged, e) => {\n e.dataTransfer.clearData();\n e.dataTransfer.items.clear();\n e.dataTransfer.effectAllowed = 'copyMove';\n e.dataTransfer.setData('URIs', JSON.stringify(dragged)); //\"text/uri-list\" format only allows one URI\n e.dataTransfer.setData('Filter', JSON.stringify(settings.filter));\n e.dataTransfer.items.add('source', connection);\n const caption = dragged.length == 1 ? basename(parseURI(dragged[0]).path) : '' + dragged.length;\n const dragImage = createDragImage(caption);\n e.dataTransfer.setDragImage(dragImage, 0, 0);\n setTimeout(() => document.body.removeChild(dragImage), 0);\n };\n const onDragEnd = (e) => {\n };\n const onDragOver = (e) => {\n // The data store is in protected mode, hence the dataTransfer is not available for security reasons.\n e.preventDefault();\n const sameSource = e.dataTransfer.types.includes(connection);\n e.dataTransfer.dropEffect = sameSource ? (e.altKey ? 'copy' : 'move') : 'copy';\n };\n const onDrop = (items, target, effect, e) => {\n if (items.length) {\n if (typeof items[0] == 'string') {\n let filter = undefined;\n const data = e.dataTransfer.getData('Filter');\n if (data && data.length) {\n try {\n filter = JSON.parse(data);\n }\n catch (e) { }\n }\n window.f5.copy(items, createURI(connection, target), effect == DropEffect.Move, filter, undefined, sid).then(qid => createQueue(qid));\n }\n else {\n uploadFiles(items, target);\n }\n }\n };\n const sortByColumn = (name) => {\n const toSort = columns.find(whereEq({ name }));\n if (toSort) {\n toSort.sort = toSort.sort === SortOrder.Asc ? SortOrder.Desc : SortOrder.Asc;\n setColumns(columns.map(c => c.name == name ? c : omit(['sort'], c)));\n onSettingsChange?.({ sort: [name, toSort.sort] });\n }\n };\n const columnsMenu = settings.columns.slice(1).map((c, i) => ({\n id: c.name,\n label: c.title,\n checked: c.visible,\n click: () => {\n settings.columns = adjust(i + 1, c => ({ ...c, visible: !c.visible }), settings.columns);\n updateColumns();\n onSettingsChange?.({ columns: settings.columns });\n return false;\n }\n }));\n const onColumnsChange = (columns) => {\n columns.forEach(({ name, width }) => {\n const c = settings.columns.find(whereEq({ name }));\n c && (c.width = width);\n });\n settings.columns = sort(({ name: a }, { name: b }) => columns.findIndex(whereEq({ name: a })) - columns.findIndex(whereEq({ name: b })), settings.columns);\n updateColumns();\n onSettingsChange?.({ columns: settings.columns });\n };\n useEffect(() => {\n setStat(selected.current?.length ?\n selected.current.reduce((stat, selected) => {\n const file = files.find(({ path }) => path == selected);\n if (file) {\n return {\n dirs: Number(stat.dirs + Number(file.dir)),\n files: stat.files + Number(!file.dir),\n size: stat.size + (file.dir ? 0 : file.rawSize)\n };\n }\n return stat;\n }, { files: 0, dirs: 0, size: 0 }) :\n files.reduce((stat, f) => ({\n dirs: stat.dirs + Number(f.dir),\n files: stat.files + Number(!f.dir),\n size: stat.size + (f.dir ? 0 : f.rawSize)\n }), { files: 0, dirs: 0, size: 0 }));\n }, [files, selected.current]);\n return React.createElement(\"div\", { ref: rootRef, className: classNames(styles.root, { focused }), tabIndex: tabindex },\n React.createElement(\"header\", null,\n toolbar.length ?\n React.createElement(Toolbar, { items: toolbar, onClick: () => list.current?.focus() }) : null,\n React.createElement(\"div\", { className: \"path\" },\n React.createElement(Tooltips, { shortcuts: appSettings.keybindings },\n React.createElement(\"button\", { className: \"icon\", disabled: isFirst, \"data-command\": CommandID.GoBack, \"data-tooltip\": \"Go Back\", onClick: () => command$.next({ id: CommandID.GoBack }) }, \"arrow_back\"),\n React.createElement(\"button\", { className: \"icon\", disabled: isLast, \"data-command\": CommandID.GoForward, \"data-tooltip\": \"Go Forward\", onClick: () => command$.next({ id: CommandID.GoForward }) }, \"arrow_forward\"),\n connection != LocalFileSystemID\n ? React.createElement(React.Fragment, null,\n React.createElement(\"button\", { className: \"icon\", \"data-command\": CommandID.Refresh, \"data-tooltip\": \"Refresh\", onClick: () => command$.next({ id: CommandID.Refresh }) }, \"refresh\"),\n homeDir &&\n React.createElement(\"button\", { className: \"icon\", \"data-tooltip\": homeDir, onClick: () => setRoot(homeDir) }, \"home\"))\n : React.createElement(React.Fragment, null),\n React.createElement(Breadcrumbs, { icon: icon, path: root, root: fixedRoot, go: setRoot, connection: connectionName ? { id: connection, name: connectionName } : undefined })))),\n React.createElement(Filter, { show: showFilter, initial: initialFilter, onChange: settings => {\n userChangedFilter.current = true;\n setFilterSettings(filterSettings.current = settings);\n }, onClose: () => {\n userChangedFilter.current = true;\n setShowFilter(false);\n } }),\n React.createElement(List, { ref: list, columns: columns, files: files, onGo: setRoot, onToggle: toggle, onSelect: (paths, t) => { onSelect(selected.current = paths); target.current = t; }, onOpen: onOpen, onDragStart: onDragStart, onDragEnd: onDragEnd, onDragOver: onDragOver, onDrop: onDrop, onMenu: (path, dir) => { setShowColumnsMenu(false); onMenu(createURI(connection, path), dir); }, onNew: createNew, onRename: (path, name) => window.f5.rename(path, name), onSort: sortByColumn, onColumnsMenu: () => setShowColumnsMenu(true), onColumnsChange: onColumnsChange, root: root, tabindex: tabindex + 10, parent: parent }, loadingRoot ? undefined : children),\n React.createElement(\"footer\", null, (stat.files || stat.dirs) ?\n t('selected', { 'count': selected.current?.length ?? 0 }) +\n t('stat', { files: stat.files, dirs: stat.dirs, joinArrays: (stat.files && stat.dirs) ? ', ' : '' }) + '. ' +\n t('size', { size: numeral(stat.size).format('0.0 b') }) : ''),\n list.current &&\n React.createElement(ContextMenu, { target: list.current },\n React.createElement(Menu, { items: showColumnsMenu ? columnsMenu : contextMenu, shortcuts: appSettings.keybindings })));\n}\n","import { useEffect, useState } from 'react';\nexport const useFocus = (ref) => {\n const [focused, setFocused] = useState(false);\n useEffect(() => {\n const onFocus = () => setFocused(true);\n ref.current?.addEventListener('focusin', onFocus);\n const onBlur = (e) => setFocused(ref.current?.contains(e.relatedTarget));\n ref.current?.addEventListener('focusout', onBlur);\n return () => {\n ref.current?.removeEventListener('focusin', onFocus);\n ref.current?.removeEventListener('focusout', onBlur);\n };\n }, []);\n return focused;\n};\n","export var FileAttributeType;\n(function (FileAttributeType) {\n FileAttributeType[\"String\"] = \"string\";\n FileAttributeType[\"Number\"] = \"number\";\n FileAttributeType[\"Date\"] = \"date\";\n FileAttributeType[\"Rights\"] = \"rights\";\n})(FileAttributeType || (FileAttributeType = {}));\nexport class FileSystem {\n}\n","import { LocalFileSystemID, FailureType } from '../shared/types';\nimport { createURI } from '../shared/utils/URI';\nimport { CommandID } from '../commands';\nimport { command$ } from '../observables/command';\nimport { error$ } from '../observables/error';\nexport default function (path, selected, isRoot) {\n return [\n {\n id: 'new-file',\n label: 'New Connection...',\n click: () => command$.next({ id: CommandID.NewFile }),\n },\n {\n id: 'new-dir',\n label: 'New Folder...',\n click: () => command$.next({ id: CommandID.NewDir }),\n separator: !isRoot\n },\n ...(isRoot ? [] : [\n {\n id: 'rename',\n label: 'Rename...',\n click: () => command$.next({ id: CommandID.Rename, uri: createURI(LocalFileSystemID, path) })\n },\n {\n id: CommandID.Duplicate,\n label: 'Duplicate',\n click: () => command$.next({ id: CommandID.Duplicate, uri: createURI(LocalFileSystemID, path) })\n },\n {\n id: 'delete',\n label: 'Delete',\n className: 'attention',\n click: () => {\n error$.next({\n type: FailureType.ConfirmDeletion,\n files: ((selected.length && selected.includes(path)) ? selected : [path]).map(path => createURI(LocalFileSystemID, path))\n });\n }\n }\n ])\n ];\n}\n","import { LocalFileSystemID, FailureType } from '../shared/types';\nimport { createURI } from '../shared/utils/URI';\nimport { CommandID } from '../commands';\nimport { command$ } from '../observables/command';\nimport { error$ } from '../observables/error';\nexport default function (path, selected, connect) {\n return [\n {\n id: 'connect',\n label: 'Connect...',\n click: () => connect()\n },\n {\n id: 'connect-new-tab',\n label: 'Connect in New Tab...',\n click: () => {\n const u = new URL(window.location.origin);\n u.searchParams.append('connect', path);\n window.open(u.toString(), '_blank');\n },\n separator: true\n },\n {\n id: 'edit-connection',\n label: 'Edit...',\n click: () => command$.next({ id: CommandID.Edit, uri: createURI(LocalFileSystemID, path) })\n },\n {\n id: 'rename',\n label: 'Rename...',\n click: () => command$.next({ id: CommandID.Rename, uri: createURI(LocalFileSystemID, path) })\n },\n {\n id: CommandID.Duplicate,\n label: 'Duplicate',\n click: () => command$.next({ id: CommandID.Duplicate, uri: createURI(LocalFileSystemID, path) })\n },\n {\n id: 'delete',\n label: 'Delete',\n className: 'attention',\n click: () => {\n error$.next({\n type: FailureType.ConfirmDeletion,\n files: ((selected.length && selected.includes(path)) ? selected : [path]).map(path => createURI(LocalFileSystemID, path))\n });\n }\n }\n ];\n}\n","import React from 'react';\n\nvar isCheckBoxInput = (element) => element.type === 'checkbox';\n\nvar isFileInput = (element) => element.type === 'file';\n\nvar isDateObject = (value) => value instanceof Date;\n\nvar isNullOrUndefined = (value) => value == null;\n\nconst isObjectType = (value) => typeof value === 'object';\nvar isObject = (value) => !isNullOrUndefined(value) &&\n !Array.isArray(value) &&\n isObjectType(value) &&\n !isDateObject(value);\n\nvar getEventValue = (event) => isObject(event) && event.target\n ? isCheckBoxInput(event.target)\n ? event.target.checked\n : isFileInput(event.target)\n ? event.target.files\n : event.target.value\n : event;\n\nvar isNameInFieldArray = (names, name) => name\n .split('.')\n .some((part, index, arr) => !isNaN(Number(part)) && names.has(arr.slice(0, index).join('.')));\n\nvar isPlainObject = (tempObject) => {\n const prototypeCopy = tempObject.constructor && tempObject.constructor.prototype;\n return (isObject(prototypeCopy) && prototypeCopy.hasOwnProperty('isPrototypeOf'));\n};\n\nvar isWeb = typeof window !== 'undefined' &&\n typeof window.HTMLElement !== 'undefined' &&\n typeof document !== 'undefined';\n\nfunction cloneObject(data) {\n if (data instanceof Date) {\n return new Date(data);\n }\n const isFileListInstance = typeof FileList !== 'undefined' && data instanceof FileList;\n if (isWeb && (data instanceof Blob || isFileListInstance)) {\n return data;\n }\n const isArray = Array.isArray(data);\n if (!isArray && !(isObject(data) && isPlainObject(data))) {\n return data;\n }\n const copy = isArray ? [] : Object.create(Object.getPrototypeOf(data));\n for (const key in data) {\n if (Object.prototype.hasOwnProperty.call(data, key)) {\n copy[key] = cloneObject(data[key]);\n }\n }\n return copy;\n}\n\nconst EVENTS = {\n BLUR: 'blur',\n FOCUS_OUT: 'focusout',\n CHANGE: 'change',\n SUBMIT: 'submit',\n TRIGGER: 'trigger',\n VALID: 'valid',\n};\nconst VALIDATION_MODE = {\n onBlur: 'onBlur',\n onChange: 'onChange',\n onSubmit: 'onSubmit',\n onTouched: 'onTouched',\n all: 'all',\n};\nconst INPUT_VALIDATION_RULES = {\n max: 'max',\n min: 'min',\n maxLength: 'maxLength',\n minLength: 'minLength',\n pattern: 'pattern',\n required: 'required',\n validate: 'validate',\n};\nconst ROOT_ERROR_TYPE = 'root';\nconst PROTOTYPE_KEYWORDS = ['__proto__', 'constructor', 'prototype'];\n\nconst IS_KEY_RE = /^\\w*$/;\nvar isKey = (value) => IS_KEY_RE.test(value);\n\nvar isUndefined = (val) => val === undefined;\n\nconst FIELD_PATH_RE = /[.[\\]'\"]/;\nvar stringToPath = (input) => input.split(FIELD_PATH_RE).filter(Boolean);\n\nvar get = (object, path, defaultValue) => {\n if (!path || !isObject(object)) {\n return defaultValue;\n }\n const paths = isKey(path) ? [path] : stringToPath(path);\n if (paths.some((key) => PROTOTYPE_KEYWORDS.includes(key))) {\n return defaultValue;\n }\n const result = paths.reduce((result, key) => {\n return isNullOrUndefined(result) ? undefined : result[key];\n }, object);\n return isUndefined(result) || result === object\n ? isUndefined(object[path])\n ? defaultValue\n : object[path]\n : result;\n};\n\nvar isBoolean = (value) => typeof value === 'boolean';\n\nvar isFunction = (value) => typeof value === 'function';\n\nvar set = (object, path, value) => {\n let index = -1;\n const tempPath = isKey(path) ? [path] : stringToPath(path);\n const length = tempPath.length;\n const lastIndex = length - 1;\n while (++index < length) {\n const key = tempPath[index];\n let newValue = value;\n if (index !== lastIndex) {\n const objValue = object[key];\n newValue =\n isObject(objValue) || Array.isArray(objValue)\n ? objValue\n : !isNaN(+tempPath[index + 1])\n ? []\n : {};\n }\n if (PROTOTYPE_KEYWORDS.includes(key)) {\n return;\n }\n object[key] = newValue;\n object = object[key];\n }\n};\n\n/**\n * Separate context for `control` to prevent unnecessary rerenders.\n * Internal hooks that only need control use this instead of full form context.\n */\nconst HookFormControlContext = React.createContext(null);\nHookFormControlContext.displayName = 'HookFormControlContext';\n/**\n * @internal Internal hook to access only control from context.\n */\nconst useFormControlContext = () => React.useContext(HookFormControlContext);\n\nvar getProxyFormState = (formState, control, localProxyFormState, isRoot = true) => {\n const result = {};\n for (const key in formState) {\n Object.defineProperty(result, key, {\n get: () => {\n const _key = key;\n if (control._proxyFormState[_key] !== VALIDATION_MODE.all) {\n control._proxyFormState[_key] = !isRoot || VALIDATION_MODE.all;\n }\n localProxyFormState && (localProxyFormState[_key] = true);\n return formState[_key];\n },\n });\n }\n return result;\n};\n\nconst useIsomorphicLayoutEffect = isWeb\n ? React.useLayoutEffect\n : React.useEffect;\n\n/**\n * Subscribes to each form state and isolates re-renders at the custom hook level. It has its own scope for form state subscriptions, so it will not affect other useFormState or useForm instances. Using this hook can reduce the re-render impact on large and complex form applications.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/useformstate) • [Demo](https://codesandbox.io/s/useformstate-75xly)\n *\n * @param props - Include options to specify fields to subscribe to. {@link UseFormStateReturn}\n *\n * @example\n * ```tsx\n * function App() {\n * const { register, handleSubmit, control } = useForm({\n * defaultValues: {\n * firstName: \"firstName\"\n * }});\n * const { dirtyFields } = useFormState({\n * control\n * });\n * const onSubmit = (data) => console.log(data);\n *\n * return (\n * <form onSubmit={handleSubmit(onSubmit)}>\n * <input {...register(\"firstName\")} placeholder=\"First Name\" />\n * {dirtyFields.firstName && <p>Field is dirty.</p>}\n * <input type=\"submit\" />\n * </form>\n * );\n * }\n * ```\n */\nfunction useFormState(props) {\n const formControl = useFormControlContext();\n const { control = formControl, disabled, name, exact } = props || {};\n const [formState, updateFormState] = React.useState(() => ({\n ...control._formState,\n defaultValues: control._defaultValues,\n }));\n const _localProxyFormState = React.useRef({\n isDirty: false,\n isLoading: false,\n dirtyFields: false,\n touchedFields: false,\n validatingFields: false,\n isValidating: false,\n isValid: false,\n errors: false,\n });\n useIsomorphicLayoutEffect(() => control._subscribe({\n name,\n formState: _localProxyFormState.current,\n exact,\n callback: (formState) => {\n !disabled &&\n updateFormState({\n ...control._formState,\n ...formState,\n defaultValues: control._defaultValues,\n });\n },\n }), [name, disabled, exact]);\n React.useEffect(() => {\n _localProxyFormState.current.isValid && control._setValid(true);\n }, [control]);\n return React.useMemo(() => getProxyFormState(formState, control, _localProxyFormState.current, false), [formState, control]);\n}\n\nvar isString = (value) => typeof value === 'string';\n\nvar generateWatchOutput = (names, _names, formValues, isGlobal, defaultValue) => {\n if (isString(names)) {\n isGlobal && _names.watch.add(names);\n return get(formValues, names, defaultValue);\n }\n if (Array.isArray(names)) {\n return names.map((fieldName) => (isGlobal && _names.watch.add(fieldName),\n get(formValues, fieldName)));\n }\n isGlobal && (_names.watchAll = true);\n return formValues;\n};\n\nvar isPrimitive = (value) => isNullOrUndefined(value) || !isObjectType(value);\n\nconst isEmptyObjectWithCustomPrototype = (object, keys) => keys.length === 0 && !Array.isArray(object) && !isPlainObject(object);\nfunction deepEqual(object1, object2, visited = new WeakMap()) {\n if (object1 === object2) {\n return true;\n }\n if (isPrimitive(object1) || isPrimitive(object2)) {\n return Object.is(object1, object2);\n }\n if (isDateObject(object1) && isDateObject(object2)) {\n return Object.is(object1.getTime(), object2.getTime());\n }\n const keys1 = Object.keys(object1);\n const keys2 = Object.keys(object2);\n if (keys1.length !== keys2.length) {\n return false;\n }\n if (isEmptyObjectWithCustomPrototype(object1, keys1) ||\n isEmptyObjectWithCustomPrototype(object2, keys2)) {\n return Object.is(object1, object2);\n }\n if (!keys1.length && Array.isArray(object1) !== Array.isArray(object2)) {\n return false;\n }\n const visitedPairs = visited.get(object1);\n if (visitedPairs && visitedPairs.has(object2)) {\n return true;\n }\n if (visitedPairs) {\n visitedPairs.add(object2);\n }\n else {\n const ws = new WeakSet();\n ws.add(object2);\n visited.set(object1, ws);\n }\n for (const key of keys1) {\n const val1 = object1[key];\n if (!(key in object2)) {\n return false;\n }\n if (key !== 'ref') {\n const val2 = object2[key];\n if ((isDateObject(val1) && isDateObject(val2)) ||\n ((isObject(val1) || Array.isArray(val1)) &&\n (isObject(val2) || Array.isArray(val2)))\n ? !deepEqual(val1, val2, visited)\n : !Object.is(val1, val2)) {\n return false;\n }\n }\n }\n return true;\n}\n\n/**\n * Custom hook to subscribe to field changes and isolate re-rendering at the component level.\n *\n * @remarks\n *\n * [API](https://react-hook-form.com/docs/usewatch) • [Demo](https://codesandbox.io/s/react-hook-form-v7-ts-usewatch-h9i5e)\n *\n * @example\n * ```tsx\n * const { control } = useForm();\n * const values = useWatch({\n * name: \"fieldName\",\n * control,\n * })\n * ```\n */\nfunction useWatch(props) {\n const formControl = useFormControlContext();\n const { control = formControl, name, defaultValue, disabled, exact, compute, } = props || {};\n const _defaultValue = React.useRef(defaultValue);\n const _compute = React.useRef(compute);\n const _computeFormValues = React.useRef(undefined);\n const _prevControl = React.useRef(control);\n const _prevName = React.useRef(name);\n _compute.current = compute;\n const [value, updateValue] = React.useState(() => {\n const defaultValue = control._getWatch(name, _defaultValue.current);\n return _compute.current ? _compute.current(defaultValue) : defaultValue;\n });\n const getCurrentOutput = React.useCallback((values) => {\n const formValues = generateWatchOutput(name, control._names, values || control._formValues, false, _defaultValue.current);\n return _compute.current ? _compute.current(formValues) : formValues;\n }, [control._formValues, control._names, name]);\n const refreshValue = React.useCallback((values) => {\n if (!disabled) {\n const formValues = generateWatchOutput(name, control._names, values || control._formValues, false, _defaultValue.current);\n if (_compute.current) {\n const computedFormValues = _compute.current(formValues);\n if (!deepEqual(computedFormValues, _computeFormValues.current)) {\n updateValue(computedFormValues);\n _computeFormValues.current = computedFormValues;\n }\n }\n else {\n updateValue(formValues);\n }\n }\n }, [control._formValues, control._names, disabled, name]);\n useIsomorphicLayoutEffect(() => {\n if (_prevControl.current !== control ||\n !deepEqual(_prevName.current, name)) {\n _prevControl.current = control;\n _prevName.current = name;\n refreshValue();\n }\n return control._subscribe({\n name,\n formState: {\n values: true,\n },\n exact,\n callback: (formState) => {\n refreshValue(formState.values);\n },\n });\n }, [control, exact, name, refreshValue]);\n React.useEffect(() => control._removeUnmounted());\n // If name or control changed for this render, synchronously reflect the\n // latest value so callers (like useController) see the correct value\n // immediately on the same render.\n // Optimize: Check control reference first before expensive deepEqual\n const controlChanged = _prevControl.current !== control;\n const prevName = _prevName.current;\n // Cache the computed output to avoid duplicate calls within the same render\n // We include shouldReturnImmediate in deps to ensure proper recomputation\n const computedOutput = React.useMemo(() => {\n if (disabled) {\n return null;\n }\n const nameChanged = !controlChanged && !deepEqual(prevName, name);\n const shouldReturnImmediate = controlChanged || nameChanged;\n return shouldReturnImmediate ? getCurrentOutput() : null;\n }, [disabled, controlChanged, name, prevName, getCurrentOutput]);\n return computedOutput !== null ? computedOutput : value;\n}\n\n/**\n * Custom hook to work with controlled component, this function provide you with both form and field level state. Re-render is isolated at the hook level.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/usecontroller) • [Demo](https://codesandbox.io/s/usecontroller-0o8px)\n *\n * @param props - the path name to the form field value, and validation rules.\n *\n * @returns field properties, field and form state. {@link UseControllerReturn}\n *\n * @example\n * ```tsx\n * function Input(props) {\n * const { field, fieldState, formState } = useController(props);\n * return (\n * <div>\n * <input {...field} placeholder={props.name} />\n * <p>{fieldState.isTouched && \"Touched\"}</p>\n * <p>{formState.isSubmitted ? \"submitted\" : \"\"}</p>\n * </div>\n * );\n * }\n * ```\n */\nfunction useController(props) {\n const formControl = useFormControlContext();\n const { name, disabled, control = formControl, shouldUnregister, defaultValue, exact = true, } = props;\n const isArrayField = isNameInFieldArray(control._names.array, name);\n const defaultValueMemo = React.useMemo(() => get(control._formValues, name, get(control._defaultValues, name, defaultValue)), [control, name, defaultValue]);\n const value = useWatch({\n control,\n name,\n defaultValue: defaultValueMemo,\n exact,\n });\n const formState = useFormState({\n control,\n name,\n exact,\n });\n const _props = React.useRef(props);\n const _proxyRef = React.useRef(null);\n const _registerProps = React.useRef(control.register(name, {\n ...props.rules,\n value,\n ...(isBoolean(props.disabled) ? { disabled: props.disabled } : {}),\n }));\n _props.current = props;\n const fieldState = React.useMemo(() => Object.defineProperties({}, {\n invalid: {\n enumerable: true,\n get: () => !!get(formState.errors, name),\n },\n isDirty: {\n enumerable: true,\n get: () => !!get(formState.dirtyFields, name),\n },\n isTouched: {\n enumerable: true,\n get: () => !!get(formState.touchedFields, name),\n },\n isValidating: {\n enumerable: true,\n get: () => !!get(formState.validatingFields, name),\n },\n error: {\n enumerable: true,\n get: () => get(formState.errors, name),\n },\n }), [formState, name]);\n const onChange = React.useCallback((event) => {\n const value = getEventValue(event);\n if (!get(control._fields, name)) {\n _registerProps.current = control.register(name, {\n ..._props.current.rules,\n value,\n });\n }\n return _registerProps.current.onChange({\n target: {\n value: getEventValue(event),\n name: name,\n },\n type: EVENTS.CHANGE,\n });\n }, [name, control]);\n const onBlur = React.useCallback(() => _registerProps.current.onBlur({\n target: {\n value: get(control._formValues, name),\n name: name,\n },\n type: EVENTS.BLUR,\n }), [name, control._formValues]);\n const ref = React.useCallback((elm) => {\n if (elm) {\n _proxyRef.current = {\n focus: () => isFunction(elm.focus) && elm.focus(),\n select: () => isFunction(elm.select) && elm.select(),\n setCustomValidity: (message) => isFunction(elm.setCustomValidity) && elm.setCustomValidity(message),\n reportValidity: () => isFunction(elm.reportValidity) && elm.reportValidity(),\n };\n }\n const field = get(control._fields, name);\n if (field && field._f && elm) {\n field._f.ref = _proxyRef.current;\n }\n }, [control._fields, name]);\n const field = React.useMemo(() => ({\n name,\n value,\n ...(isBoolean(disabled) || formState.disabled\n ? { disabled: formState.disabled || disabled }\n : {}),\n onChange,\n onBlur,\n ref,\n }), [name, disabled, formState.disabled, onChange, onBlur, ref, value]);\n React.useEffect(() => {\n const _shouldUnregisterField = control._options.shouldUnregister || shouldUnregister;\n _registerProps.current = control.register(name, {\n ..._props.current.rules,\n ...(isBoolean(_props.current.disabled)\n ? { disabled: _props.current.disabled }\n : {}),\n });\n const updateMounted = (name, value) => {\n const field = get(control._fields, name);\n if (field && field._f) {\n field._f.mount = value;\n }\n };\n updateMounted(name, true);\n if (_shouldUnregisterField) {\n const value = cloneObject(get(shouldUnregister\n ? control._defaultValues\n : control._options.values || control._defaultValues, name, get(control._options.defaultValues, name, _props.current.defaultValue)));\n set(control._defaultValues, name, value);\n if (isUndefined(get(control._formValues, name))) {\n set(control._formValues, name, value);\n }\n }\n !isArrayField && control.register(name);\n if (_proxyRef.current) {\n const field = get(control._fields, name);\n if (field && field._f) {\n field._f.ref = _proxyRef.current;\n }\n }\n return () => {\n (isArrayField\n ? _shouldUnregisterField && !control._state.action\n : _shouldUnregisterField)\n ? control.unregister(name)\n : updateMounted(name, false);\n };\n }, [name, control, isArrayField, shouldUnregister]);\n React.useEffect(() => {\n control._setDisabledField({\n disabled,\n name,\n });\n }, [disabled, name, control]);\n return React.useMemo(() => ({\n field,\n formState,\n fieldState,\n }), [field, formState, fieldState]);\n}\n\n/**\n * Component based on `useController` hook to work with controlled component.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/usecontroller/controller) • [Demo](https://codesandbox.io/s/react-hook-form-v6-controller-ts-jwyzw) • [Video](https://www.youtube.com/watch?v=N2UNk_UCVyA)\n *\n * @param props - the path name to the form field value, and validation rules.\n *\n * @returns provide field handler functions, field and form state.\n *\n * @example\n * ```tsx\n * function App() {\n * const { control } = useForm<FormValues>({\n * defaultValues: {\n * test: \"\"\n * }\n * });\n *\n * return (\n * <form>\n * <Controller\n * control={control}\n * name=\"test\"\n * render={({ field: { onChange, onBlur, value, ref }, formState, fieldState }) => (\n * <>\n * <input\n * onChange={onChange} // send value to hook form\n * onBlur={onBlur} // notify when input is touched\n * value={value} // return updated value\n * ref={ref} // set ref for focus management\n * />\n * <p>{formState.isSubmitted ? \"submitted\" : \"\"}</p>\n * <p>{fieldState.isTouched ? \"touched\" : \"\"}</p>\n * </>\n * )}\n * />\n * </form>\n * );\n * }\n * ```\n */\nconst Controller = (props) => props.render(useController(props));\n\nvar generateId = () => {\n if (typeof crypto !== 'undefined' && crypto.randomUUID) {\n return crypto.randomUUID();\n }\n const d = typeof performance === 'undefined' ? Date.now() : performance.now() * 1000;\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n const r = ((Math.random() * 16 + d) % 16) | 0;\n return (c == 'x' ? r : (r & 0x3) | 0x8).toString(16);\n });\n};\n\nvar getFocusFieldName = (name, index, options = {}) => options.shouldFocus || isUndefined(options.shouldFocus)\n ? options.focusName ||\n `${name}.${isUndefined(options.focusIndex) ? index : options.focusIndex}.`\n : '';\n\nvar getValidationModes = (mode) => ({\n isOnSubmit: !mode || mode === VALIDATION_MODE.onSubmit,\n isOnBlur: mode === VALIDATION_MODE.onBlur,\n isOnChange: mode === VALIDATION_MODE.onChange,\n isOnAll: mode === VALIDATION_MODE.all,\n isOnTouch: mode === VALIDATION_MODE.onTouched,\n});\n\nvar isWatched = (name, _names, isBlurEvent) => {\n if (isBlurEvent)\n return false;\n if (_names.watchAll || _names.watch.has(name))\n return true;\n for (const watchName of _names.watch) {\n if (name.startsWith(watchName) && name.charAt(watchName.length) === '.')\n return true;\n }\n return false;\n};\n\nconst iterateFieldsByAction = (fields, action, fieldsNames, abortEarly) => {\n for (const key of fieldsNames || Object.keys(fields)) {\n const field = get(fields, key);\n if (field) {\n const { _f, ...currentField } = field;\n if (_f) {\n if (_f.refs && _f.refs[0] && action(_f.refs[0], key) && !abortEarly) {\n return true;\n }\n else if (_f.ref && action(_f.ref, _f.name) && !abortEarly) {\n return true;\n }\n else {\n if (iterateFieldsByAction(currentField, action)) {\n break;\n }\n }\n }\n else if (isObject(currentField)) {\n if (iterateFieldsByAction(currentField, action)) {\n break;\n }\n }\n }\n }\n return;\n};\n\nvar updateFieldArrayRootError = (errors, error, name) => {\n const existingErrors = get(errors, name);\n const fieldArrayErrors = Array.isArray(existingErrors) ? existingErrors : [];\n set(fieldArrayErrors, ROOT_ERROR_TYPE, error[name]);\n set(errors, name, fieldArrayErrors);\n return errors;\n};\n\nvar isEmptyObject = (value) => isObject(value) && !Object.keys(value).length;\n\nvar isHTMLElement = (value) => {\n if (!isWeb) {\n return false;\n }\n const owner = value ? value.ownerDocument : 0;\n return (value instanceof\n (owner && owner.defaultView ? owner.defaultView.HTMLElement : HTMLElement));\n};\n\nvar isRadioInput = (element) => element.type === 'radio';\n\nvar isRegex = (value) => value instanceof RegExp;\n\nvar appendErrors = (name, validateAllFieldCriteria, errors, type, message) => validateAllFieldCriteria\n ? {\n ...errors[name],\n types: {\n ...(errors[name] && errors[name].types ? errors[name].types : {}),\n [type]: message || true,\n },\n }\n : {};\n\nconst defaultResult = {\n value: false,\n isValid: false,\n};\nconst validResult = { value: true, isValid: true };\nvar getCheckboxValue = (options) => {\n if (Array.isArray(options)) {\n if (options.length > 1) {\n const values = options\n .filter((option) => option && option.checked && !option.disabled)\n .map((option) => option.value);\n return { value: values, isValid: !!values.length };\n }\n return options[0].checked && !options[0].disabled\n ? // @ts-expect-error expected to work in the browser\n options[0].attributes && !isUndefined(options[0].attributes.value)\n ? isUndefined(options[0].value) || options[0].value === ''\n ? validResult\n : { value: options[0].value, isValid: true }\n : validResult\n : defaultResult;\n }\n return defaultResult;\n};\n\nconst defaultReturn = {\n isValid: false,\n value: null,\n};\nvar getRadioValue = (options) => Array.isArray(options)\n ? options.reduce((previous, option) => option && option.checked && !option.disabled\n ? {\n isValid: true,\n value: option.value,\n }\n : previous, defaultReturn)\n : defaultReturn;\n\nfunction getValidateError(result, ref, type = 'validate') {\n if (isString(result) ||\n (Array.isArray(result) && result.every(isString)) ||\n (isBoolean(result) && !result)) {\n return {\n type,\n message: isString(result) ? result : '',\n ref,\n };\n }\n}\n\nvar getValueAndMessage = (validationData) => isObject(validationData) && !isRegex(validationData)\n ? validationData\n : {\n value: validationData,\n message: '',\n };\n\nvar validateField = async (field, disabledFieldNames, formValues, validateAllFieldCriteria, shouldUseNativeValidation, isFieldArray) => {\n const { ref, refs, required, maxLength, minLength, min, max, pattern, validate, name, valueAsNumber, mount, } = field._f;\n const inputValue = get(formValues, name);\n if (!mount || disabledFieldNames.has(name)) {\n return {};\n }\n const inputRef = refs ? refs[0] : ref;\n const setCustomValidity = (message) => {\n if (shouldUseNativeValidation && inputRef.reportValidity) {\n const validityMessage = isBoolean(message) ? '' : message || '';\n if (refs) {\n refs.forEach((ref) => ref.setCustomValidity(validityMessage));\n }\n else {\n inputRef.setCustomValidity(validityMessage);\n }\n inputRef.reportValidity();\n }\n };\n const error = {};\n const isRadio = isRadioInput(ref);\n const isCheckBox = isCheckBoxInput(ref);\n const isRadioOrCheckbox = isRadio || isCheckBox;\n const isEmpty = ((valueAsNumber || isFileInput(ref)) &&\n isUndefined(ref.value) &&\n isUndefined(inputValue)) ||\n (isHTMLElement(ref) && ref.value === '') ||\n inputValue === '' ||\n (Array.isArray(inputValue) && !inputValue.length);\n const appendErrorsCurry = appendErrors.bind(null, name, validateAllFieldCriteria, error);\n const getMinMaxMessage = (exceedMax, maxLengthMessage, minLengthMessage, maxType = INPUT_VALIDATION_RULES.maxLength, minType = INPUT_VALIDATION_RULES.minLength) => {\n const message = exceedMax ? maxLengthMessage : minLengthMessage;\n error[name] = {\n type: exceedMax ? maxType : minType,\n message,\n ref,\n ...appendErrorsCurry(exceedMax ? maxType : minType, message),\n };\n };\n if (isFieldArray\n ? !Array.isArray(inputValue) || !inputValue.length\n : required &&\n ((!isRadioOrCheckbox && (isEmpty || isNullOrUndefined(inputValue))) ||\n (isBoolean(inputValue) && !inputValue) ||\n (isCheckBox && !getCheckboxValue(refs).isValid) ||\n (isRadio && !getRadioValue(refs).isValid))) {\n const { value, message } = isString(required)\n ? { value: !!required, message: required }\n : getValueAndMessage(required);\n if (value) {\n error[name] = {\n type: INPUT_VALIDATION_RULES.required,\n message,\n ref: inputRef,\n ...appendErrorsCurry(INPUT_VALIDATION_RULES.required, message),\n };\n if (!validateAllFieldCriteria) {\n setCustomValidity(message);\n return error;\n }\n }\n }\n if (!isEmpty && (!isNullOrUndefined(min) || !isNullOrUndefined(max))) {\n let exceedMax;\n let exceedMin;\n const maxOutput = getValueAndMessage(max);\n const minOutput = getValueAndMessage(min);\n if (!isNullOrUndefined(inputValue) && !isNaN(inputValue)) {\n const valueNumber = ref.valueAsNumber ||\n (inputValue ? +inputValue : inputValue);\n if (!isNullOrUndefined(maxOutput.value)) {\n exceedMax = valueNumber > maxOutput.value;\n }\n if (!isNullOrUndefined(minOutput.value)) {\n exceedMin = valueNumber < minOutput.value;\n }\n }\n else {\n const valueDate = ref.valueAsDate || new Date(inputValue);\n const convertTimeToDate = (time) => new Date(new Date().toDateString() + ' ' + time);\n const isTime = ref.type == 'time';\n const isWeek = ref.type == 'week';\n if (isString(maxOutput.value) && inputValue) {\n exceedMax = isTime\n ? convertTimeToDate(inputValue) > convertTimeToDate(maxOutput.value)\n : isWeek\n ? inputValue > maxOutput.value\n : valueDate > new Date(maxOutput.value);\n }\n if (isString(minOutput.value) && inputValue) {\n exceedMin = isTime\n ? convertTimeToDate(inputValue) < convertTimeToDate(minOutput.value)\n : isWeek\n ? inputValue < minOutput.value\n : valueDate < new Date(minOutput.value);\n }\n }\n if (exceedMax || exceedMin) {\n getMinMaxMessage(!!exceedMax, maxOutput.message, minOutput.message, INPUT_VALIDATION_RULES.max, INPUT_VALIDATION_RULES.min);\n if (!validateAllFieldCriteria) {\n setCustomValidity(error[name].message);\n return error;\n }\n }\n }\n if ((maxLength || minLength) &&\n !isEmpty &&\n (isString(inputValue) || (isFieldArray && Array.isArray(inputValue)))) {\n const maxLengthOutput = getValueAndMessage(maxLength);\n const minLengthOutput = getValueAndMessage(minLength);\n const exceedMax = !isNullOrUndefined(maxLengthOutput.value) &&\n inputValue.length > +maxLengthOutput.value;\n const exceedMin = !isNullOrUndefined(minLengthOutput.value) &&\n inputValue.length < +minLengthOutput.value;\n if (exceedMax || exceedMin) {\n getMinMaxMessage(exceedMax, maxLengthOutput.message, minLengthOutput.message);\n if (!validateAllFieldCriteria) {\n setCustomValidity(error[name].message);\n return error;\n }\n }\n }\n if (pattern && !isEmpty && isString(inputValue)) {\n const { value: patternValue, message } = getValueAndMessage(pattern);\n if (isRegex(patternValue) && !inputValue.match(patternValue)) {\n error[name] = {\n type: INPUT_VALIDATION_RULES.pattern,\n message,\n ref,\n ...appendErrorsCurry(INPUT_VALIDATION_RULES.pattern, message),\n };\n if (!validateAllFieldCriteria) {\n setCustomValidity(message);\n return error;\n }\n }\n }\n if (validate) {\n if (isFunction(validate)) {\n const result = await validate(inputValue, formValues);\n const validateError = getValidateError(result, inputRef);\n if (validateError) {\n error[name] = {\n ...validateError,\n ...appendErrorsCurry(INPUT_VALIDATION_RULES.validate, validateError.message),\n };\n if (!validateAllFieldCriteria) {\n setCustomValidity(validateError.message);\n return error;\n }\n }\n }\n else if (isObject(validate)) {\n let validationResult = {};\n for (const key in validate) {\n if (!isEmptyObject(validationResult) && !validateAllFieldCriteria) {\n break;\n }\n const validateError = getValidateError(await validate[key](inputValue, formValues), inputRef, key);\n if (validateError) {\n validationResult = {\n ...validateError,\n ...appendErrorsCurry(key, validateError.message),\n };\n setCustomValidity(validateError.message);\n if (validateAllFieldCriteria) {\n error[name] = validationResult;\n }\n }\n }\n if (!isEmptyObject(validationResult)) {\n error[name] = {\n ref: inputRef,\n ...validationResult,\n };\n if (!validateAllFieldCriteria) {\n return error;\n }\n }\n }\n }\n setCustomValidity(true);\n return error;\n};\n\nvar convertToArrayPayload = (value) => (Array.isArray(value) ? value : [value]);\n\nvar appendAt = (data, value) => [\n ...data,\n ...convertToArrayPayload(value),\n];\n\nvar fillEmptyArray = (value) => Array.isArray(value) ? value.map(() => undefined) : undefined;\n\nfunction insert(data, index, value) {\n return [\n ...data.slice(0, index),\n ...convertToArrayPayload(value),\n ...data.slice(index),\n ];\n}\n\nvar moveArrayAt = (data, from, to) => {\n if (!Array.isArray(data)) {\n return [];\n }\n if (isUndefined(data[to])) {\n data[to] = undefined;\n }\n data.splice(to, 0, data.splice(from, 1)[0]);\n return data;\n};\n\nvar prependAt = (data, value) => [\n ...convertToArrayPayload(value),\n ...convertToArrayPayload(data),\n];\n\nvar compact = (value) => Array.isArray(value) ? value.filter(Boolean) : [];\n\nfunction removeAtIndexes(data, indexes) {\n let i = 0;\n const temp = [...data];\n for (const index of indexes) {\n temp.splice(index - i, 1);\n i++;\n }\n return compact(temp).length ? temp : [];\n}\nvar removeArrayAt = (data, index) => isUndefined(index)\n ? []\n : removeAtIndexes(data, convertToArrayPayload(index).sort((a, b) => a - b));\n\nvar swapArrayAt = (data, indexA, indexB) => {\n [data[indexA], data[indexB]] = [data[indexB], data[indexA]];\n};\n\nfunction baseGet(object, updatePath) {\n const length = updatePath.slice(0, -1).length;\n let index = 0;\n while (index < length) {\n if (isNullOrUndefined(object)) {\n object = undefined;\n break;\n }\n object = object[updatePath[index]];\n index++;\n }\n return object;\n}\nfunction isEmptyArray(obj) {\n for (const key in obj) {\n if (obj.hasOwnProperty(key) && !isUndefined(obj[key])) {\n return false;\n }\n }\n return true;\n}\nfunction unset(object, path) {\n if (isString(path) && Object.prototype.hasOwnProperty.call(object, path)) {\n delete object[path];\n return object;\n }\n const paths = Array.isArray(path)\n ? path\n : isKey(path)\n ? [path]\n : stringToPath(path);\n if (paths.some((segment) => PROTOTYPE_KEYWORDS.includes(String(segment)))) {\n return object;\n }\n const childObject = paths.length === 1 ? object : baseGet(object, paths);\n const index = paths.length - 1;\n const key = paths[index];\n if (childObject) {\n delete childObject[key];\n }\n if (index !== 0 &&\n ((isObject(childObject) && isEmptyObject(childObject)) ||\n (Array.isArray(childObject) && isEmptyArray(childObject)))) {\n unset(object, paths.slice(0, -1));\n }\n return object;\n}\n\nvar updateAt = (fieldValues, index, value) => {\n fieldValues[index] = value;\n return fieldValues;\n};\n\n/**\n * A custom hook that exposes convenient methods to perform operations with a list of dynamic inputs that need to be appended, updated, removed etc. • [Demo](https://codesandbox.io/s/react-hook-form-usefieldarray-ssugn) • [Video](https://youtu.be/4MrbfGSFY2A)\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/usefieldarray) • [Demo](https://codesandbox.io/s/react-hook-form-usefieldarray-ssugn)\n *\n * @param props - useFieldArray props\n *\n * @returns methods - functions to manipulate with the Field Arrays (dynamic inputs) {@link UseFieldArrayReturn}\n *\n * @example\n * ```tsx\n * function App() {\n * const { register, control, handleSubmit, reset, trigger, setError } = useForm({\n * defaultValues: {\n * test: []\n * }\n * });\n * const { fields, append } = useFieldArray({\n * control,\n * name: \"test\"\n * });\n *\n * return (\n * <form onSubmit={handleSubmit(data => console.log(data))}>\n * {fields.map((item, index) => (\n * <input key={item.id} {...register(`test.${index}.firstName`)} />\n * ))}\n * <button type=\"button\" onClick={() => append({ firstName: \"bill\" })}>\n * append\n * </button>\n * <input type=\"submit\" />\n * </form>\n * );\n * }\n * ```\n */\nfunction useFieldArray(props) {\n const formControl = useFormControlContext();\n const { control = formControl, name, keyName = 'id', disabled, shouldUnregister, rules, } = props;\n const [fields, setFields] = React.useState(control._getFieldArray(name));\n const ids = React.useRef(control._getFieldArray(name).map(generateId));\n const _actioned = React.useRef(false);\n if (!disabled) {\n control._names.array.add(name);\n }\n React.useMemo(() => !disabled &&\n rules &&\n fields.length >= 0 &&\n control.register(name, rules), [control, name, fields.length, rules, disabled]);\n useIsomorphicLayoutEffect(() => {\n if (disabled) {\n return;\n }\n return control._subjects.array.subscribe({\n next: ({ values, name: fieldArrayName, }) => {\n if (fieldArrayName === name || !fieldArrayName) {\n const fieldValues = get(values, name);\n if (Array.isArray(fieldValues)) {\n setFields(fieldValues);\n ids.current = fieldValues.map(generateId);\n }\n else if (!fieldArrayName) {\n setFields([]);\n ids.current = [];\n }\n }\n },\n }).unsubscribe;\n }, [control, name, disabled]);\n const updateValues = React.useCallback((updatedFieldArrayValues) => {\n _actioned.current = true;\n control._setFieldArray(name, updatedFieldArrayValues);\n }, [control, name]);\n const append = (value, options) => {\n if (disabled) {\n return;\n }\n const appendValue = convertToArrayPayload(cloneObject(value));\n const updatedFieldArrayValues = appendAt(control._getFieldArray(name), appendValue);\n control._names.focus = getFocusFieldName(name, updatedFieldArrayValues.length - 1, options);\n ids.current = appendAt(ids.current, appendValue.map(generateId));\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._setFieldArray(name, updatedFieldArrayValues, appendAt, {\n argA: fillEmptyArray(value),\n });\n };\n const prepend = (value, options) => {\n if (disabled) {\n return;\n }\n const prependValue = convertToArrayPayload(cloneObject(value));\n const updatedFieldArrayValues = prependAt(control._getFieldArray(name), prependValue);\n control._names.focus = getFocusFieldName(name, 0, options);\n ids.current = prependAt(ids.current, prependValue.map(generateId));\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._setFieldArray(name, updatedFieldArrayValues, prependAt, {\n argA: fillEmptyArray(value),\n });\n };\n const remove = (index) => {\n if (disabled) {\n return;\n }\n const updatedFieldArrayValues = removeArrayAt(control._getFieldArray(name), index);\n ids.current = removeArrayAt(ids.current, index);\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n !Array.isArray(get(control._fields, name)) &&\n set(control._fields, name, undefined);\n control._setFieldArray(name, updatedFieldArrayValues, removeArrayAt, {\n argA: index,\n });\n };\n const insert$1 = (index, value, options) => {\n if (disabled) {\n return;\n }\n const insertValue = convertToArrayPayload(cloneObject(value));\n const updatedFieldArrayValues = insert(control._getFieldArray(name), index, insertValue);\n control._names.focus = getFocusFieldName(name, index, options);\n ids.current = insert(ids.current, index, insertValue.map(generateId));\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._setFieldArray(name, updatedFieldArrayValues, insert, {\n argA: index,\n argB: fillEmptyArray(value),\n });\n };\n const swap = (indexA, indexB) => {\n if (disabled) {\n return;\n }\n const updatedFieldArrayValues = control._getFieldArray(name);\n swapArrayAt(updatedFieldArrayValues, indexA, indexB);\n swapArrayAt(ids.current, indexA, indexB);\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._setFieldArray(name, updatedFieldArrayValues, swapArrayAt, {\n argA: indexA,\n argB: indexB,\n }, false);\n };\n const move = (from, to) => {\n if (disabled) {\n return;\n }\n const updatedFieldArrayValues = control._getFieldArray(name);\n moveArrayAt(updatedFieldArrayValues, from, to);\n moveArrayAt(ids.current, from, to);\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._setFieldArray(name, updatedFieldArrayValues, moveArrayAt, {\n argA: from,\n argB: to,\n }, false);\n };\n const update = (index, value) => {\n if (disabled) {\n return;\n }\n const updateValue = cloneObject(value);\n const updatedFieldArrayValues = updateAt(control._getFieldArray(name), index, updateValue);\n ids.current = [...updatedFieldArrayValues].map((item, i) => !item || i === index ? generateId() : ids.current[i]);\n updateValues(updatedFieldArrayValues);\n setFields([...updatedFieldArrayValues]);\n control._setFieldArray(name, updatedFieldArrayValues, updateAt, {\n argA: index,\n argB: updateValue,\n }, true, false);\n };\n const replace = (value) => {\n if (disabled) {\n return;\n }\n const updatedFieldArrayValues = convertToArrayPayload(cloneObject(value));\n ids.current = updatedFieldArrayValues.map(generateId);\n updateValues([...updatedFieldArrayValues]);\n setFields([...updatedFieldArrayValues]);\n control._setFieldArray(name, [...updatedFieldArrayValues], (data) => data, {}, true, false);\n };\n React.useEffect(() => {\n if (disabled) {\n return;\n }\n control._state.action = false;\n isWatched(name, control._names) &&\n control._subjects.state.next({\n ...control._formState,\n });\n const validationModes = getValidationModes(control._options.mode);\n if (_actioned.current &&\n (!validationModes.isOnSubmit || control._formState.isSubmitted) &&\n !getValidationModes(control._options.reValidateMode).isOnSubmit &&\n !validationModes.isOnBlur) {\n if (control._options.resolver) {\n control._runSchema([name]).then((result) => {\n var _a, _b;\n control._updateIsValidating([name]);\n const error = get(result.errors, name);\n const existingError = get(control._formState.errors, name);\n const existingErrorType = existingError && (existingError.type || ((_a = existingError.root) === null || _a === void 0 ? void 0 : _a.type));\n const existingErrorMessage = existingError &&\n (existingError.message || ((_b = existingError.root) === null || _b === void 0 ? void 0 : _b.message));\n if (existingError\n ? (!error && existingErrorType) ||\n (error &&\n (existingErrorType !== error.type ||\n existingErrorMessage !== error.message))\n : error && error.type) {\n if (error) {\n isObject(error) &&\n !Object.keys(error).some((key) => !Number.isNaN(+key))\n ? updateFieldArrayRootError(control._formState.errors, { [name]: error }, name)\n : set(control._formState.errors, name, error);\n }\n else {\n unset(control._formState.errors, name);\n }\n control._subjects.state.next({\n errors: control._formState.errors,\n });\n }\n });\n }\n else {\n const field = get(control._fields, name);\n if (field &&\n field._f &&\n !(getValidationModes(control._options.reValidateMode).isOnSubmit &&\n getValidationModes(control._options.mode).isOnSubmit)) {\n validateField(field, control._names.disabled, control._formValues, control._options.criteriaMode === VALIDATION_MODE.all, control._options.shouldUseNativeValidation, true).then((error) => !isEmptyObject(error) &&\n control._subjects.state.next({\n errors: updateFieldArrayRootError(control._formState.errors, error, name),\n }));\n }\n }\n }\n // External updates that change `fields` (e.g. reset() or setValue() on\n // the array) already notify subscribers with the up-to-date values\n // themselves, so only re-broadcast here for genuine array method calls.\n _actioned.current &&\n control._subjects.state.next({\n name,\n values: cloneObject(control._formValues),\n });\n control._names.focus &&\n iterateFieldsByAction(control._fields, (ref, key) => {\n if (control._names.focus &&\n key.startsWith(control._names.focus) &&\n ref.focus) {\n ref.focus();\n return 1;\n }\n return;\n });\n control._names.focus = '';\n control._setValid();\n _actioned.current = false;\n }, [fields, name, control, disabled]);\n React.useEffect(() => {\n if (!disabled) {\n !get(control._formValues, name) && control._setFieldArray(name);\n }\n return () => {\n if (disabled) {\n return;\n }\n const shouldKeepFieldArrayValues = !(control._options.shouldUnregister || shouldUnregister);\n const updateMounted = (name, value) => {\n const field = get(control._fields, name);\n if (field && field._f) {\n field._f.mount = value;\n }\n };\n if (_actioned.current && shouldKeepFieldArrayValues) {\n control._subjects.state.next({\n name,\n values: cloneObject(control._formValues),\n });\n }\n shouldKeepFieldArrayValues\n ? updateMounted(name, false)\n : control.unregister(name);\n };\n }, [name, control, keyName, shouldUnregister, disabled]);\n return {\n swap: React.useCallback(swap, [updateValues, name, control, disabled]),\n move: React.useCallback(move, [updateValues, name, control, disabled]),\n prepend: React.useCallback(prepend, [\n updateValues,\n name,\n control,\n disabled,\n ]),\n append: React.useCallback(append, [updateValues, name, control, disabled]),\n remove: React.useCallback(remove, [updateValues, name, control, disabled]),\n insert: React.useCallback(insert$1, [updateValues, name, control, disabled]),\n update: React.useCallback(update, [updateValues, name, control, disabled]),\n replace: React.useCallback(replace, [\n updateValues,\n name,\n control,\n disabled,\n ]),\n fields: React.useMemo(() => fields.map((field, index) => ({\n ...field,\n ...(isBoolean(disabled) ? { disabled } : {}),\n [keyName]: ids.current[index] || generateId(),\n })), [fields, keyName, disabled]),\n };\n}\n\n/**\n * Component based on `useFieldArray` hook to work with controlled component.\n *\n * @example\n * ```tsx\n * function App() {\n * const { control, register } = useForm<FormValues>({\n * defaultValues: {\n * test: [\n * {\n * value: '',\n * },\n * ],\n * },\n * });\n *\n * return (\n * <form>\n * <FieldArray\n * control={control}\n * name=\"test\"\n * render={({ fields }) =>\n * fields.map((field, index) => (\n * <input key={field.id} {...register(`test.${index}.value`)} />\n * ))\n * }\n * />\n * </form>\n * );\n * }\n * ```\n */\nconst FieldArray = (props) => props.render(useFieldArray(props));\n\nconst flatten = (obj) => {\n const output = {};\n for (const key of Object.keys(obj)) {\n if (isObjectType(obj[key]) &&\n obj[key] !== null &&\n !isDateObject(obj[key])) {\n const nested = flatten(obj[key]);\n for (const nestedKey of Object.keys(nested)) {\n output[`${key}.${nestedKey}`] = nested[nestedKey];\n }\n }\n else {\n output[key] = obj[key];\n }\n }\n return output;\n};\n\nconst HookFormContext = React.createContext(null);\nHookFormContext.displayName = 'HookFormContext';\n/**\n * This custom hook allows you to access the form context. useFormContext is intended to be used in deeply nested structures, where it would become inconvenient to pass the context as a prop. To be used with {@link FormProvider}.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/useformcontext) • [Demo](https://codesandbox.io/s/react-hook-form-v7-form-context-ytudi)\n *\n * @returns return all useForm methods\n *\n * @example\n * ```tsx\n * function App() {\n * const methods = useForm();\n * const onSubmit = data => console.log(data);\n *\n * return (\n * <FormProvider {...methods} >\n * <form onSubmit={methods.handleSubmit(onSubmit)}>\n * <NestedInput />\n * <input type=\"submit\" />\n * </form>\n * </FormProvider>\n * );\n * }\n *\n * function NestedInput() {\n * const { register } = useFormContext(); // retrieve all hook methods\n * return <input {...register(\"test\")} />;\n * }\n * ```\n */\nconst useFormContext = () => React.useContext(HookFormContext);\n/**\n * A provider component that propagates the `useForm` methods to all children components via [React Context](https://react.dev/reference/react/useContext) API. To be used with {@link useFormContext}.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/useformcontext) • [Demo](https://codesandbox.io/s/react-hook-form-v7-form-context-ytudi)\n *\n * @param props - all useForm methods\n *\n * @example\n * ```tsx\n * function App() {\n * const methods = useForm();\n * const onSubmit = data => console.log(data);\n *\n * return (\n * <FormProvider {...methods} >\n * <form onSubmit={methods.handleSubmit(onSubmit)}>\n * <NestedInput />\n * <input type=\"submit\" />\n * </form>\n * </FormProvider>\n * );\n * }\n *\n * function NestedInput() {\n * const { register } = useFormContext(); // retrieve all hook methods\n * return <input {...register(\"test\")} />;\n * }\n * ```\n */\nconst FormProvider = ({ children, watch, getValues, getFieldState, setError, clearErrors, setValue, setValues, trigger, formState, resetField, reset, resetDefaultValues, handleSubmit, unregister, control, register, setFocus, subscribe, }) => {\n const memoizedValue = React.useMemo(() => ({\n watch,\n getValues,\n getFieldState,\n setError,\n clearErrors,\n setValue,\n setValues,\n trigger,\n formState,\n resetField,\n reset,\n resetDefaultValues,\n handleSubmit,\n unregister,\n control,\n register,\n setFocus,\n subscribe,\n }), [\n clearErrors,\n control,\n formState,\n getFieldState,\n getValues,\n handleSubmit,\n register,\n reset,\n resetDefaultValues,\n resetField,\n setError,\n setFocus,\n setValue,\n setValues,\n subscribe,\n trigger,\n unregister,\n watch,\n ]);\n return (React.createElement(HookFormContext.Provider, { value: memoizedValue },\n React.createElement(HookFormControlContext.Provider, { value: memoizedValue.control }, children)));\n};\n\nconst POST_REQUEST = 'post';\n/**\n * Form component to manage submission.\n *\n * @param props - to setup submission detail. {@link FormProps}\n *\n * @returns form component or headless render prop.\n *\n * @example\n * ```tsx\n * function App() {\n * const { control, formState: { errors } } = useForm();\n *\n * return (\n * <Form action=\"/api\" control={control}>\n * <input {...register(\"name\")} />\n * <p>{errors?.root?.server && 'Server error'}</p>\n * <button>Submit</button>\n * </Form>\n * );\n * }\n * ```\n */\nfunction Form(props) {\n const methods = useFormContext();\n const [mounted, setMounted] = React.useState(false);\n const { control = methods.control, onSubmit, children, action, method = POST_REQUEST, headers, encType, onError, render, onSuccess, validateStatus, ...rest } = props;\n const submit = React.useCallback(async (event) => {\n let hasError = false;\n let type = '';\n await control.handleSubmit(async (data) => {\n const formData = new FormData();\n let formDataJson = '';\n try {\n formDataJson = JSON.stringify(data);\n }\n catch (_a) { }\n const flattenFormValues = flatten(data);\n for (const key in flattenFormValues) {\n formData.append(key, flattenFormValues[key]);\n }\n if (onSubmit) {\n await onSubmit({\n data,\n event,\n method,\n formData,\n formDataJson,\n });\n }\n if (action) {\n try {\n const shouldStringifySubmissionData = [\n headers && headers['Content-Type'],\n encType,\n ].some((value) => value && value.includes('json'));\n const response = await fetch(String(action), {\n method,\n headers: {\n ...headers,\n ...(encType && encType !== 'multipart/form-data'\n ? { 'Content-Type': encType }\n : {}),\n },\n body: shouldStringifySubmissionData ? formDataJson : formData,\n });\n if (response &&\n (validateStatus\n ? !validateStatus(response.status)\n : response.status < 200 || response.status >= 300)) {\n hasError = true;\n onError && onError({ response });\n type = String(response.status);\n }\n else {\n onSuccess && onSuccess({ response });\n }\n }\n catch (error) {\n hasError = true;\n onError && onError({ error });\n }\n }\n })(event);\n if (hasError && control) {\n control._subjects.state.next({\n isSubmitSuccessful: false,\n });\n control.setError('root.server', {\n type,\n });\n }\n }, [\n control,\n onSubmit,\n method,\n action,\n headers,\n encType,\n validateStatus,\n onError,\n onSuccess,\n ]);\n React.useEffect(() => {\n setMounted(true);\n }, []);\n return render ? (React.createElement(React.Fragment, null, render({\n submit,\n }))) : (React.createElement(\"form\", { noValidate: mounted, action: action, method: method, encType: encType, onSubmit: submit, ...rest }, children));\n}\n\nconst FormStateSubscribe = ({ control, disabled, exact, name, render, }) => render(useFormState({ control, name, disabled, exact }));\n\nvar createSubject = () => {\n let _observers = [];\n const next = (value) => {\n for (const observer of _observers) {\n observer.next && observer.next(value);\n }\n };\n const subscribe = (observer) => {\n _observers.push(observer);\n return {\n unsubscribe: () => {\n _observers = _observers.filter((o) => o !== observer);\n },\n };\n };\n const unsubscribe = () => {\n _observers = [];\n };\n return {\n get observers() {\n return _observers;\n },\n next,\n subscribe,\n unsubscribe,\n };\n};\n\nfunction extractFormValues(fieldsState, formValues) {\n const values = {};\n for (const key in fieldsState) {\n if (fieldsState.hasOwnProperty(key)) {\n const fieldState = fieldsState[key];\n const fieldValue = formValues[key];\n if (fieldState && isObject(fieldState) && fieldValue) {\n const nestedFieldsState = extractFormValues(fieldState, fieldValue);\n if (isObject(nestedFieldsState)) {\n values[key] = nestedFieldsState;\n }\n }\n else if (fieldsState[key]) {\n values[key] = fieldValue;\n }\n }\n }\n return values;\n}\n\nvar isMultipleSelect = (element) => element.type === `select-multiple`;\n\nvar isRadioOrCheckbox = (ref) => isRadioInput(ref) || isCheckBoxInput(ref);\n\nvar live = (ref) => isHTMLElement(ref) && ref.isConnected;\n\nvar objectHasFunction = (data) => {\n for (const key in data) {\n if (isFunction(data[key])) {\n return true;\n }\n }\n return false;\n};\n\nfunction isTraversable(value) {\n return Array.isArray(value) || (isObject(value) && !objectHasFunction(value));\n}\nfunction isRegisteredLeaf(fieldRef) {\n return !!(fieldRef && '_f' in fieldRef);\n}\nfunction isEmptyDirtyContainer(value) {\n return Array.isArray(value)\n ? !value.some((item) => !isUndefined(item))\n : !Object.keys(value).length;\n}\nfunction clearDirtyField(container, key) {\n if (Array.isArray(container)) {\n container[key] = undefined;\n }\n else {\n delete container[key];\n }\n}\nfunction markFieldsDirty(data, fields = {}, fieldRefs) {\n for (const key in data) {\n const value = data[key];\n const fieldRef = fieldRefs && fieldRefs[key];\n if (isTraversable(value) &&\n (!Array.isArray(value) || !isRegisteredLeaf(fieldRef))) {\n fields[key] = Array.isArray(value) ? [] : {};\n markFieldsDirty(value, fields[key], fieldRef);\n if (isEmptyDirtyContainer(fields[key])) {\n clearDirtyField(fields, key);\n }\n }\n else if (!isUndefined(value)) {\n fields[key] = true;\n }\n }\n return fields;\n}\nfunction getDirtyFields(data, formValues, dirtyFieldsFromValues, fieldRefs) {\n if (!dirtyFieldsFromValues) {\n dirtyFieldsFromValues = markFieldsDirty(formValues, {}, fieldRefs);\n }\n for (const key in data) {\n const value = data[key];\n const fieldRef = fieldRefs && fieldRefs[key];\n if (isTraversable(value) &&\n (!Array.isArray(value) || !isRegisteredLeaf(fieldRef))) {\n if (isUndefined(formValues) || isPrimitive(dirtyFieldsFromValues[key])) {\n dirtyFieldsFromValues[key] = markFieldsDirty(value, Array.isArray(value) ? [] : {}, fieldRef);\n }\n else {\n getDirtyFields(value, isNullOrUndefined(formValues) ? {} : formValues[key], dirtyFieldsFromValues[key], fieldRef);\n }\n if (isEmptyDirtyContainer(dirtyFieldsFromValues[key])) {\n clearDirtyField(dirtyFieldsFromValues, key);\n }\n }\n else if (deepEqual(value, formValues[key])) {\n clearDirtyField(dirtyFieldsFromValues, key);\n }\n else {\n dirtyFieldsFromValues[key] = true;\n }\n }\n return dirtyFieldsFromValues;\n}\n\nvar getFieldValueAs = (value, { valueAsNumber, valueAsDate, setValueAs }) => isUndefined(value)\n ? value\n : valueAsNumber\n ? value === ''\n ? NaN\n : value\n ? +value\n : value\n : valueAsDate && isString(value)\n ? new Date(value)\n : setValueAs\n ? setValueAs(value)\n : value;\n\nfunction getFieldValue(_f) {\n const ref = _f.ref;\n if (isFileInput(ref)) {\n return ref.files;\n }\n if (isRadioInput(ref)) {\n return getRadioValue(_f.refs).value;\n }\n if (isMultipleSelect(ref)) {\n return [...ref.selectedOptions].map(({ value }) => value);\n }\n if (isCheckBoxInput(ref)) {\n return getCheckboxValue(_f.refs).value;\n }\n return getFieldValueAs(isUndefined(ref.value) ? _f.ref.value : ref.value, _f);\n}\n\nvar getResolverOptions = (fieldsNames, _fields, criteriaMode, shouldUseNativeValidation) => {\n const fields = {};\n for (const name of fieldsNames) {\n const field = get(_fields, name);\n field && set(fields, name, field._f);\n }\n return {\n criteriaMode,\n names: [...fieldsNames],\n fields,\n shouldUseNativeValidation,\n };\n};\n\nvar getRuleValue = (rule) => isUndefined(rule)\n ? rule\n : isRegex(rule)\n ? rule.source\n : isObject(rule)\n ? isRegex(rule.value)\n ? rule.value.source\n : rule.value\n : rule;\n\nconst ASYNC_FUNCTION = 'AsyncFunction';\nvar hasPromiseValidation = (fieldReference) => {\n if (!fieldReference || !fieldReference.validate)\n return false;\n if (isFunction(fieldReference.validate)) {\n return fieldReference.validate.constructor.name === ASYNC_FUNCTION;\n }\n if (isObject(fieldReference.validate)) {\n for (const key in fieldReference.validate) {\n if (fieldReference.validate[key].constructor\n .name === ASYNC_FUNCTION) {\n return true;\n }\n }\n }\n return false;\n};\n\nvar hasValidation = (options) => options.mount &&\n (options.required ||\n options.min ||\n options.max ||\n options.maxLength ||\n options.minLength ||\n options.pattern ||\n options.validate);\n\nfunction schemaErrorLookup(errors, _fields, name) {\n const error = get(errors, name);\n if (error || isKey(name)) {\n return {\n error,\n name,\n };\n }\n const names = name.split('.');\n while (names.length) {\n const fieldName = names.join('.');\n const field = get(_fields, fieldName);\n const foundError = get(errors, fieldName);\n if (field && !Array.isArray(field) && name !== fieldName) {\n return { name };\n }\n if (foundError && foundError.type) {\n return {\n name: fieldName,\n error: foundError,\n };\n }\n if (foundError && foundError.root && foundError.root.type) {\n return {\n name: `${fieldName}.root`,\n error: foundError.root,\n };\n }\n names.pop();\n }\n return {\n name,\n };\n}\n\nvar shouldRenderFormState = (formStateData, _proxyFormState, updateFormState, isRoot) => {\n updateFormState(formStateData);\n const { name, ...formState } = formStateData;\n const keys = Object.keys(formState);\n return (!keys.length ||\n (isRoot && keys.length >= Object.keys(_proxyFormState).length) ||\n keys.find((key) => _proxyFormState[key] ===\n (!isRoot || VALIDATION_MODE.all)));\n};\n\nvar shouldSubscribeByName = (name, signalName, exact) => !name ||\n !signalName ||\n name === signalName ||\n convertToArrayPayload(name).some((currentName) => currentName &&\n (exact\n ? currentName === signalName || currentName.startsWith(signalName + '.')\n : currentName.startsWith(signalName) ||\n signalName.startsWith(currentName)));\n\nvar skipValidation = (isBlurEvent, isTouched, isSubmitted, reValidateMode, mode) => {\n if (mode.isOnAll) {\n return false;\n }\n else if (!isSubmitted && mode.isOnTouch) {\n return !(isTouched || isBlurEvent);\n }\n else if (isSubmitted ? reValidateMode.isOnBlur : mode.isOnBlur) {\n return !isBlurEvent;\n }\n else if (isSubmitted ? reValidateMode.isOnChange : mode.isOnChange) {\n return isBlurEvent;\n }\n return true;\n};\n\nvar unsetEmptyArray = (ref, name) => !compact(get(ref, name)).length && unset(ref, name);\n\nconst defaultOptions = {\n mode: VALIDATION_MODE.onSubmit,\n reValidateMode: VALIDATION_MODE.onChange,\n shouldFocusError: true,\n};\nconst FORM_ERROR_TYPE = 'form';\nconst updateDirtyFields = (dirtyFields, nextDirtyFields) => {\n for (const key in dirtyFields) {\n if (!(key in nextDirtyFields)) {\n delete dirtyFields[key];\n }\n }\n Object.assign(dirtyFields, nextDirtyFields);\n};\nconst DEFAULT_FORM_STATE = {\n submitCount: 0,\n isDirty: false,\n isReady: false,\n isValidating: false,\n isSubmitted: false,\n isSubmitting: false,\n isSubmitSuccessful: false,\n isValid: false,\n touchedFields: {},\n dirtyFields: {},\n validatingFields: {},\n};\nfunction createFormControl(props = {}) {\n let _options = {\n ...defaultOptions,\n ...props,\n };\n let _formState = {\n ...cloneObject(DEFAULT_FORM_STATE),\n isLoading: isFunction(_options.defaultValues),\n errors: _options.errors || {},\n disabled: _options.disabled || false,\n };\n let _fields = {};\n let _defaultValues = isObject(_options.defaultValues) || isObject(_options.values)\n ? cloneObject(_options.defaultValues || _options.values) || {}\n : {};\n let _formValues = _options.shouldUnregister\n ? {}\n : cloneObject(_defaultValues);\n let _state = {\n action: false,\n mount: false,\n watch: false,\n keepIsValid: false,\n };\n let _names = {\n mount: new Set(),\n disabled: new Set(),\n unMount: new Set(),\n array: new Set(),\n watch: new Set(),\n registerName: new Set(),\n };\n const delayErrorCallbacks = {};\n const timers = {};\n let _valuesSubscriberCount = 0;\n let _validationModeBeforeSubmit = getValidationModes(_options.mode);\n let _validationModeAfterSubmit = getValidationModes(_options.reValidateMode);\n const defaultProxyFormState = {\n isDirty: false,\n dirtyFields: false,\n validatingFields: false,\n touchedFields: false,\n isValidating: false,\n isValid: false,\n errors: false,\n };\n const _proxyFormState = {\n ...defaultProxyFormState,\n };\n let _proxySubscribeFormState = {\n ..._proxyFormState,\n };\n const _subjects = {\n array: createSubject(),\n state: createSubject(),\n };\n let _setValidCallId = 0;\n const shouldDisplayAllAssociatedErrors = _options.criteriaMode === VALIDATION_MODE.all;\n const debounce = (name, callback) => (wait) => {\n clearTimeout(timers[name]);\n timers[name] = setTimeout(callback, wait);\n };\n const _setValid = async (shouldUpdateValid) => {\n if (_state.keepIsValid) {\n return;\n }\n if (!_options.disabled &&\n (_proxyFormState.isValid ||\n _proxySubscribeFormState.isValid ||\n shouldUpdateValid)) {\n const callId = ++_setValidCallId;\n let isValid;\n if (_options.resolver) {\n isValid = isEmptyObject((await _runSchema()).errors);\n callId === _setValidCallId && _updateIsValidating();\n }\n else {\n isValid = await executeBuiltInValidation({\n fields: _fields,\n onlyCheckValid: true,\n eventType: EVENTS.VALID,\n });\n }\n if (callId === _setValidCallId && isValid !== _formState.isValid) {\n _subjects.state.next({\n isValid,\n });\n }\n }\n };\n const _updateIsValidating = (names, isValidating) => {\n if (!_options.disabled &&\n (_proxyFormState.isValidating ||\n _proxyFormState.validatingFields ||\n _proxySubscribeFormState.isValidating ||\n _proxySubscribeFormState.validatingFields)) {\n (names || Array.from(_names.mount)).forEach((name) => {\n if (name) {\n isValidating\n ? set(_formState.validatingFields, name, isValidating)\n : unset(_formState.validatingFields, name);\n }\n });\n _subjects.state.next({\n validatingFields: _formState.validatingFields,\n isValidating: !isEmptyObject(_formState.validatingFields),\n });\n }\n };\n const _updateDirtyFields = () => {\n _formState.dirtyFields = getDirtyFields(_defaultValues, _formValues, undefined, _fields);\n };\n const _setFieldArray = (name, values = [], method, args, shouldSetValues = true, shouldUpdateFieldsAndState = true) => {\n if (args && method && !_options.disabled) {\n _state.action = true;\n if (shouldUpdateFieldsAndState && Array.isArray(get(_fields, name))) {\n const fieldValues = method(get(_fields, name), args.argA, args.argB);\n shouldSetValues && set(_fields, name, fieldValues);\n }\n if (shouldUpdateFieldsAndState &&\n Array.isArray(get(_formState.errors, name))) {\n const errors = method(get(_formState.errors, name), args.argA, args.argB);\n shouldSetValues && set(_formState.errors, name, errors);\n unsetEmptyArray(_formState.errors, name);\n }\n if ((_proxyFormState.touchedFields ||\n _proxySubscribeFormState.touchedFields) &&\n shouldUpdateFieldsAndState &&\n Array.isArray(get(_formState.touchedFields, name))) {\n const touchedFields = method(get(_formState.touchedFields, name), args.argA, args.argB);\n shouldSetValues && set(_formState.touchedFields, name, touchedFields);\n }\n if (_proxyFormState.dirtyFields || _proxySubscribeFormState.dirtyFields) {\n _updateDirtyFields();\n }\n _subjects.state.next({\n name,\n isDirty: _getDirty(name, values),\n dirtyFields: _formState.dirtyFields,\n errors: _formState.errors,\n isValid: _formState.isValid,\n });\n }\n else {\n set(_formValues, name, values);\n }\n };\n const updateErrors = (name, error) => {\n set(_formState.errors, name, error);\n _formState.errors = { ..._formState.errors };\n _subjects.state.next({\n errors: _formState.errors,\n });\n };\n const _setErrors = (errors) => {\n _formState.errors = errors;\n _subjects.state.next({\n errors: _formState.errors,\n isValid: false,\n });\n };\n const hasExplicitNullIntermediate = (name) => {\n const segments = isKey(name) ? [name] : stringToPath(name);\n let formValues = _formValues;\n let defaultValues = _defaultValues;\n for (let i = 0; i < segments.length - 1; i++) {\n const key = segments[i];\n formValues = isNullOrUndefined(formValues) ? formValues : formValues[key];\n defaultValues = isNullOrUndefined(defaultValues)\n ? defaultValues\n : defaultValues[key];\n if (formValues === null && defaultValues !== null) {\n return true;\n }\n }\n return false;\n };\n const updateValidAndValue = (name, shouldSkipSetValueAs, value, ref) => {\n const field = get(_fields, name);\n if (field) {\n if (hasExplicitNullIntermediate(name)) {\n return;\n }\n const wasUnsetInFormValues = isUndefined(get(_formValues, name));\n const defaultValue = get(_formValues, name, isUndefined(value) ? get(_defaultValues, name) : value);\n isUndefined(defaultValue) ||\n (ref && ref.defaultChecked) ||\n shouldSkipSetValueAs\n ? set(_formValues, name, shouldSkipSetValueAs ? defaultValue : getFieldValue(field._f))\n : setFieldValue(name, defaultValue);\n if (_state.mount && !_state.action) {\n _setValid();\n if (wasUnsetInFormValues &&\n _formState.isDirty &&\n (_proxyFormState.isDirty || _proxySubscribeFormState.isDirty)) {\n const isDirty = _getDirty();\n if (!isDirty) {\n _formState.isDirty = false;\n _subjects.state.next({ ..._formState });\n }\n }\n if (props.shouldUnregister &&\n wasUnsetInFormValues &&\n !isUndefined(get(_formValues, name)) &&\n isWatched(name, _names)) {\n _state.watch = true;\n }\n }\n }\n };\n const updateTouchAndDirty = (name, fieldValue, isBlurEvent, shouldDirty, shouldRender) => {\n let shouldUpdateField = false;\n let isPreviousDirty = false;\n const output = {\n name,\n };\n // an explicit programmatic update (e.g. setValue with shouldDirty: true)\n // opts into dirty tracking even when the form is disabled\n if (!_options.disabled || shouldDirty === true) {\n if (!isBlurEvent || shouldDirty) {\n const isCurrentFieldPristine = deepEqual(get(_defaultValues, name), fieldValue);\n if (_proxyFormState.isDirty || _proxySubscribeFormState.isDirty) {\n isPreviousDirty = _formState.isDirty;\n _formState.isDirty = output.isDirty =\n !isCurrentFieldPristine || _getDirty();\n shouldUpdateField = isPreviousDirty !== output.isDirty;\n }\n isPreviousDirty = !!get(_formState.dirtyFields, name);\n if (isCurrentFieldPristine !== _formState.isDirty) {\n updateDirtyFields(_formState.dirtyFields, getDirtyFields(_defaultValues, _formValues, undefined, _fields));\n }\n else {\n isCurrentFieldPristine\n ? unset(_formState.dirtyFields, name)\n : set(_formState.dirtyFields, name, true);\n }\n output.dirtyFields = _formState.dirtyFields;\n shouldUpdateField =\n shouldUpdateField ||\n ((_proxyFormState.dirtyFields ||\n _proxySubscribeFormState.dirtyFields) &&\n isPreviousDirty !== !isCurrentFieldPristine);\n }\n if (isBlurEvent) {\n const isPreviousFieldTouched = get(_formState.touchedFields, name);\n if (!isPreviousFieldTouched) {\n set(_formState.touchedFields, name, isBlurEvent);\n output.touchedFields = _formState.touchedFields;\n shouldUpdateField =\n shouldUpdateField ||\n ((_proxyFormState.touchedFields ||\n _proxySubscribeFormState.touchedFields) &&\n isPreviousFieldTouched !== isBlurEvent);\n }\n }\n shouldUpdateField && shouldRender && _subjects.state.next(output);\n }\n return shouldUpdateField ? output : {};\n };\n const shouldRenderByError = (name, isValid, error, fieldState) => {\n const previousFieldError = get(_formState.errors, name);\n const shouldUpdateValid = (_proxyFormState.isValid || _proxySubscribeFormState.isValid) &&\n isBoolean(isValid) &&\n _formState.isValid !== isValid;\n if (_options.delayError && error) {\n delayErrorCallbacks[name] = debounce(name, () => updateErrors(name, error));\n delayErrorCallbacks[name](_options.delayError);\n }\n else {\n clearTimeout(timers[name]);\n delete delayErrorCallbacks[name];\n error\n ? set(_formState.errors, name, error)\n : unset(_formState.errors, name);\n _formState.errors = { ..._formState.errors };\n }\n if ((error ? !deepEqual(previousFieldError, error) : previousFieldError) ||\n !isEmptyObject(fieldState) ||\n shouldUpdateValid) {\n const updatedFormState = {\n ...fieldState,\n ...(shouldUpdateValid && isBoolean(isValid) ? { isValid } : {}),\n errors: _formState.errors,\n name,\n };\n _formState = {\n ..._formState,\n ...updatedFormState,\n };\n _subjects.state.next(updatedFormState);\n }\n };\n const _runSchema = async (name) => {\n _updateIsValidating(name, true);\n return await _options.resolver(_formValues, _options.context, getResolverOptions(name || _names.mount, _fields, _options.criteriaMode, _options.shouldUseNativeValidation));\n };\n const executeSchemaAndUpdateState = async (names) => {\n const { errors } = await _runSchema(names);\n _updateIsValidating(names);\n if (names) {\n for (const name of names) {\n const error = get(errors, name);\n error\n ? _names.array.has(name) &&\n isObject(error) &&\n !Object.keys(error).some((key) => !Number.isNaN(Number(key)))\n ? updateFieldArrayRootError(_formState.errors, { [name]: error }, name)\n : set(_formState.errors, name, error)\n : unset(_formState.errors, name);\n }\n _formState.errors = { ..._formState.errors };\n }\n else {\n _formState.errors = errors;\n }\n return errors;\n };\n const validateForm = async ({ name, eventType, }) => {\n if (props.validate) {\n const result = await props.validate({\n formValues: _formValues,\n formState: _formState,\n name,\n eventType,\n });\n if (isObject(result)) {\n for (const key in result) {\n const error = result[key];\n if (error) {\n setError(`${FORM_ERROR_TYPE}.${key}`, {\n message: isString(error.message) ? error.message : '',\n type: error.type || INPUT_VALIDATION_RULES.validate,\n });\n }\n }\n }\n else if (isString(result) || !result) {\n setError(FORM_ERROR_TYPE, {\n message: result || '',\n type: INPUT_VALIDATION_RULES.validate,\n });\n }\n else {\n clearErrors(FORM_ERROR_TYPE);\n }\n return result;\n }\n return true;\n };\n const executeBuiltInValidation = async ({ fields, onlyCheckValid, name, eventType, context = {\n valid: true,\n runRootValidation: false,\n }, }) => {\n if (props.validate) {\n context.runRootValidation = true;\n const result = await validateForm({\n name,\n eventType,\n });\n if (!result) {\n context.valid = false;\n if (onlyCheckValid) {\n return context.valid;\n }\n }\n }\n for (const name in fields) {\n const field = fields[name];\n if (field) {\n const { _f, ...fieldValue } = field;\n if (_f) {\n const isFieldArrayRoot = _names.array.has(_f.name);\n const isPromiseFunction = field._f && hasPromiseValidation(field._f);\n const shouldTrackIsValidatingState = _proxyFormState.validatingFields ||\n _proxyFormState.isValidating ||\n _proxySubscribeFormState.validatingFields ||\n _proxySubscribeFormState.isValidating;\n if (isPromiseFunction && shouldTrackIsValidatingState) {\n _updateIsValidating([_f.name], true);\n }\n const fieldError = await validateField(field, _names.disabled, _formValues, shouldDisplayAllAssociatedErrors, _options.shouldUseNativeValidation && !onlyCheckValid, isFieldArrayRoot);\n if (isPromiseFunction && shouldTrackIsValidatingState) {\n _updateIsValidating([_f.name]);\n }\n if (fieldError[_f.name]) {\n context.valid = false;\n if (onlyCheckValid) {\n break;\n }\n }\n !onlyCheckValid &&\n (get(fieldError, _f.name)\n ? isFieldArrayRoot\n ? updateFieldArrayRootError(_formState.errors, fieldError, _f.name)\n : set(_formState.errors, _f.name, fieldError[_f.name])\n : unset(_formState.errors, _f.name));\n if (props.shouldUseNativeValidation && fieldError[_f.name]) {\n break;\n }\n }\n !isEmptyObject(fieldValue) &&\n (await executeBuiltInValidation({\n context,\n onlyCheckValid,\n fields: fieldValue,\n name: name,\n eventType,\n }));\n }\n }\n return context.valid;\n };\n const _removeUnmounted = () => {\n for (const name of _names.unMount) {\n const field = get(_fields, name);\n field &&\n (field._f.refs\n ? field._f.refs.every((ref) => !live(ref))\n : !live(field._f.ref)) &&\n unregister(name);\n }\n _names.unMount = new Set();\n };\n const _getDirty = (name, data) => (name && data && set(_formValues, name, data),\n !deepEqual(_state.mount ? _formValues : _defaultValues, _defaultValues));\n const _getWatch = (names, defaultValue, isGlobal) => generateWatchOutput(names, _names, {\n ...(_state.mount\n ? _formValues\n : isUndefined(defaultValue)\n ? _defaultValues\n : isString(names)\n ? { [names]: defaultValue }\n : defaultValue),\n }, isGlobal, defaultValue);\n const _getFieldArray = (name) => compact(get(_state.mount ? _formValues : _defaultValues, name, _options.shouldUnregister ? get(_defaultValues, name, []) : []));\n const setFieldValue = (name, value, options = {}, skipClone = false, skipRender = false) => {\n const field = get(_fields, name);\n let fieldValue = value;\n if (field) {\n const fieldReference = field._f;\n if (fieldReference) {\n !fieldReference.disabled &&\n set(_formValues, name, getFieldValueAs(value, fieldReference));\n fieldValue =\n isHTMLElement(fieldReference.ref) && isNullOrUndefined(value)\n ? ''\n : value;\n if (isMultipleSelect(fieldReference.ref)) {\n [...fieldReference.ref.options].forEach((optionRef) => (optionRef.selected = fieldValue.includes(optionRef.value)));\n }\n else if (fieldReference.refs) {\n if (isCheckBoxInput(fieldReference.ref)) {\n fieldReference.refs.forEach((checkboxRef) => {\n if (!checkboxRef.defaultChecked || !checkboxRef.disabled) {\n if (Array.isArray(fieldValue)) {\n checkboxRef.checked = !!fieldValue.find((data) => data === checkboxRef.value);\n }\n else {\n checkboxRef.checked =\n fieldValue === checkboxRef.value || !!fieldValue;\n }\n }\n });\n }\n else {\n fieldReference.refs.forEach((radioRef) => (radioRef.checked = radioRef.value === fieldValue));\n }\n }\n else if (isFileInput(fieldReference.ref)) {\n fieldReference.ref.value = '';\n }\n else {\n fieldReference.ref.value = fieldValue;\n if (!fieldReference.ref.type && !skipRender) {\n _subjects.state.next({\n name,\n values: skipClone ? _formValues : cloneObject(_formValues),\n });\n }\n }\n }\n }\n (options.shouldDirty || options.shouldTouch) &&\n updateTouchAndDirty(name, fieldValue, options.shouldTouch, options.shouldDirty, !skipRender);\n options.shouldValidate &&\n trigger(name, {\n delayError: options.delayError,\n });\n };\n const setFieldValues = (name, value, options, skipClone = false, skipRender = false) => {\n for (const fieldKey in value) {\n if (!value.hasOwnProperty(fieldKey)) {\n return;\n }\n const fieldValue = value[fieldKey];\n const fieldName = name + '.' + fieldKey;\n const field = get(_fields, fieldName);\n (_names.array.has(name) ||\n isObject(fieldValue) ||\n (field && !field._f)) &&\n !isDateObject(fieldValue)\n ? setFieldValues(fieldName, fieldValue, options, skipClone, skipRender)\n : setFieldValue(fieldName, fieldValue, options, skipClone, skipRender);\n }\n };\n const _setValue = (name, value, options, skipClone, skipStateEmit = false) => {\n const field = get(_fields, name);\n const isFieldArray = _names.array.has(name);\n const cloneValue = skipClone ? value : cloneObject(value);\n const previousValue = get(_formValues, name);\n const isValueUnchanged = deepEqual(previousValue, cloneValue);\n if (!isValueUnchanged) {\n set(_formValues, name, cloneValue);\n }\n if (isFieldArray) {\n _subjects.array.next({\n name,\n values: skipClone ? _formValues : cloneObject(_formValues),\n });\n if ((_proxyFormState.isDirty ||\n _proxyFormState.dirtyFields ||\n _proxySubscribeFormState.isDirty ||\n _proxySubscribeFormState.dirtyFields) &&\n options.shouldDirty) {\n _updateDirtyFields();\n if (!skipStateEmit) {\n _subjects.state.next({\n name,\n dirtyFields: _formState.dirtyFields,\n isDirty: _getDirty(name, cloneValue),\n });\n }\n }\n }\n else {\n const isEmpty = (Array.isArray(cloneValue) && !cloneValue.length) ||\n isEmptyObject(cloneValue);\n if (!field || field._f || isNullOrUndefined(cloneValue) || isEmpty) {\n setFieldValue(name, cloneValue, options, skipClone, skipStateEmit);\n }\n else {\n setFieldValues(name, cloneValue, options, skipClone, skipStateEmit);\n }\n }\n if (!isValueUnchanged && !skipStateEmit) {\n const watched = isWatched(name, _names);\n const values = skipClone ? _formValues : cloneObject(_formValues);\n _subjects.state.next({\n ...(watched && _formState),\n name: _state.mount || watched ? name : undefined,\n values,\n });\n }\n };\n const setValue = (name, value, options = {}) => _setValue(name, value, options, false);\n const setValues = (formValues, options = {}) => {\n const updatedFormValues = isFunction(formValues)\n ? formValues(_formValues)\n : formValues;\n if (!deepEqual(_formValues, updatedFormValues)) {\n _formValues = {\n ..._formValues,\n ...updatedFormValues,\n };\n const flattenedUpdates = flatten(updatedFormValues);\n for (const fieldName of _names.mount) {\n if (fieldName in flattenedUpdates) {\n _setValue(fieldName, flattenedUpdates[fieldName], options, true, true);\n }\n }\n _subjects.state.next({\n ..._formState,\n name: undefined,\n type: undefined,\n ...(_valuesSubscriberCount ? { values: _formValues } : {}),\n });\n if (options.shouldValidate) {\n _setValid();\n }\n }\n };\n const onChange = async (event) => {\n _state.mount = true;\n const target = event.target;\n let name = target.name;\n let isFieldValueUpdated = true;\n const field = get(_fields, name);\n const _updateIsFieldValueUpdated = (fieldValue) => {\n isFieldValueUpdated =\n Number.isNaN(fieldValue) ||\n (isDateObject(fieldValue) && isNaN(fieldValue.getTime())) ||\n deepEqual(fieldValue, get(_formValues, name, fieldValue));\n };\n if (field) {\n let error;\n let isValid;\n const fieldValue = target.type\n ? getFieldValue(field._f)\n : getEventValue(event);\n const isBlurEvent = event.type === EVENTS.BLUR || event.type === EVENTS.FOCUS_OUT;\n const hasNoValidationEffect = !hasValidation(field._f) &&\n !props.validate &&\n !_options.resolver &&\n !get(_formState.errors, name) &&\n !field._f.deps;\n const shouldSkipValidation = hasNoValidationEffect ||\n skipValidation(isBlurEvent, get(_formState.touchedFields, name), _formState.isSubmitted, _validationModeAfterSubmit, _validationModeBeforeSubmit);\n const watched = isWatched(name, _names, isBlurEvent);\n set(_formValues, name, fieldValue);\n if (isBlurEvent) {\n if (!target || !target.readOnly) {\n field._f.onBlur && field._f.onBlur(event);\n const pendingDelayError = delayErrorCallbacks[name];\n pendingDelayError && pendingDelayError(0);\n }\n }\n else if (field._f.onChange) {\n field._f.onChange(event);\n }\n const fieldState = updateTouchAndDirty(name, fieldValue, isBlurEvent);\n const shouldRender = !isEmptyObject(fieldState) || watched;\n !isBlurEvent &&\n _subjects.state.next({\n name,\n type: event.type,\n ...(_valuesSubscriberCount\n ? { values: cloneObject(_formValues) }\n : {}),\n });\n if (shouldSkipValidation) {\n if ((!hasNoValidationEffect || !_formState.isValid) &&\n (_proxyFormState.isValid || _proxySubscribeFormState.isValid)) {\n if (_options.mode === 'onBlur') {\n if (isBlurEvent) {\n _setValid();\n }\n }\n else if (!isBlurEvent) {\n _setValid();\n }\n }\n return (shouldRender &&\n _subjects.state.next({ name, ...(watched ? {} : fieldState) }));\n }\n if (!_options.resolver && props.validate) {\n await validateForm({\n name: name,\n eventType: event.type,\n });\n }\n !isBlurEvent && watched && _subjects.state.next({ ..._formState });\n if (_options.resolver) {\n const { errors } = await _runSchema([name]);\n _updateIsValidating([name]);\n _updateIsFieldValueUpdated(fieldValue);\n if (!isFieldValueUpdated) {\n !isEmptyObject(fieldState) && _subjects.state.next(fieldState);\n return;\n }\n const previousErrorLookupResult = schemaErrorLookup(_formState.errors, _fields, name);\n const errorLookupResult = schemaErrorLookup(errors, _fields, previousErrorLookupResult.name || name);\n error = errorLookupResult.error;\n name = errorLookupResult.name;\n isValid = isEmptyObject(errors);\n }\n else {\n _updateIsValidating([name], true);\n error = (await validateField(field, _names.disabled, _formValues, shouldDisplayAllAssociatedErrors, _options.shouldUseNativeValidation))[name];\n _updateIsValidating([name]);\n _updateIsFieldValueUpdated(fieldValue);\n if (isFieldValueUpdated) {\n if (error) {\n isValid = false;\n }\n else if (_proxyFormState.isValid ||\n _proxySubscribeFormState.isValid) {\n isValid = await executeBuiltInValidation({\n fields: _fields,\n onlyCheckValid: true,\n name: name,\n eventType: event.type,\n });\n }\n }\n }\n if (isFieldValueUpdated) {\n field._f.deps &&\n (!Array.isArray(field._f.deps) || field._f.deps.length > 0) &&\n trigger(field._f.deps);\n shouldRenderByError(name, isValid, error, fieldState);\n }\n }\n };\n const _focusInput = (ref, key) => {\n if (get(_formState.errors, key) && ref.focus) {\n ref.focus();\n return 1;\n }\n return;\n };\n const trigger = async (name, options = {}) => {\n let isValid;\n let validationResult;\n const fieldNames = convertToArrayPayload(name);\n if (_options.resolver) {\n const errors = await executeSchemaAndUpdateState(isUndefined(name) ? name : fieldNames);\n isValid = isEmptyObject(errors);\n validationResult = name\n ? !fieldNames.some((name) => get(errors, name))\n : isValid;\n }\n else if (name) {\n validationResult = (await Promise.all(fieldNames.map(async (fieldName) => {\n const field = get(_fields, fieldName);\n return await executeBuiltInValidation({\n fields: field && field._f ? { [fieldName]: field } : field,\n eventType: EVENTS.TRIGGER,\n });\n }))).every(Boolean);\n !(!validationResult && !_formState.isValid) && _setValid();\n }\n else {\n validationResult = isValid = await executeBuiltInValidation({\n fields: _fields,\n name,\n eventType: EVENTS.TRIGGER,\n });\n }\n if (options.delayError && _options.delayError && isString(name)) {\n const error = get(_formState.errors, name);\n if (error) {\n unset(_formState.errors, name);\n delayErrorCallbacks[name] = debounce(name, () => updateErrors(name, error));\n delayErrorCallbacks[name](_options.delayError);\n }\n else {\n clearTimeout(timers[name]);\n delete delayErrorCallbacks[name];\n }\n }\n _subjects.state.next({\n ...(!isString(name) ||\n ((_proxyFormState.isValid || _proxySubscribeFormState.isValid) &&\n isValid !== _formState.isValid)\n ? {}\n : { name }),\n ...(_options.resolver || !name ? { isValid } : {}),\n errors: _formState.errors,\n });\n options.shouldFocus &&\n !validationResult &&\n iterateFieldsByAction(_fields, _focusInput, name ? fieldNames : _names.mount);\n return validationResult;\n };\n const getValues = (fieldNames, config) => {\n let values = {\n ...(_state.mount ? _formValues : _defaultValues),\n };\n if (config) {\n values = extractFormValues(config.dirtyFields ? _formState.dirtyFields : _formState.touchedFields, values);\n }\n return isUndefined(fieldNames)\n ? values\n : isString(fieldNames)\n ? get(values, fieldNames)\n : fieldNames.map((name) => get(values, name));\n };\n const getFieldState = (name, formState) => ({\n invalid: !!get((formState || _formState).errors, name),\n isDirty: !!get((formState || _formState).dirtyFields, name),\n error: get((formState || _formState).errors, name),\n isValidating: !!get(_formState.validatingFields, name),\n isTouched: !!get((formState || _formState).touchedFields, name),\n });\n const clearErrors = (name) => {\n const names = name ? convertToArrayPayload(name) : undefined;\n names === null || names === void 0 ? void 0 : names.forEach((inputName) => unset(_formState.errors, inputName));\n if (names) {\n names.forEach((inputName) => {\n _subjects.state.next({\n name: inputName,\n errors: _formState.errors,\n });\n });\n }\n else {\n _formState.errors = {};\n _subjects.state.next({\n errors: _formState.errors,\n });\n }\n };\n const setError = (name, error, options) => {\n const ref = (get(_fields, name, { _f: {} })._f || {}).ref;\n const currentError = get(_formState.errors, name) || {};\n const { ref: currentRef, message, type, ...restOfErrorTree } = currentError;\n set(_formState.errors, name, {\n ...restOfErrorTree,\n ...error,\n ref,\n });\n _subjects.state.next({\n name,\n errors: _formState.errors,\n isValid: false,\n });\n options && options.shouldFocus && ref && ref.focus && ref.focus();\n };\n const watch = (name, defaultValue) => {\n if (isFunction(name)) {\n _valuesSubscriberCount++;\n const { unsubscribe } = _subjects.state.subscribe({\n next: (payload) => 'values' in payload &&\n name(payload.values || _getWatch(undefined, defaultValue), payload),\n });\n let called = false;\n return {\n unsubscribe: () => {\n if (called) {\n return;\n }\n called = true;\n _valuesSubscriberCount--;\n unsubscribe();\n },\n };\n }\n return _getWatch(name, defaultValue, true);\n };\n const _subscribe = (props) => {\n var _a;\n const needsValues = !!((_a = props.formState) === null || _a === void 0 ? void 0 : _a.values);\n if (needsValues) {\n _valuesSubscriberCount++;\n }\n const { unsubscribe } = _subjects.state.subscribe({\n next: (formState) => {\n if (shouldSubscribeByName(props.name, formState.name, props.exact) &&\n shouldRenderFormState(formState, props.formState || _proxyFormState, _setFormState, props.reRenderRoot)) {\n const snapshot = { ..._formValues };\n props.callback({\n values: snapshot,\n ..._formState,\n ...formState,\n defaultValues: _defaultValues,\n });\n }\n },\n });\n if (!needsValues) {\n return unsubscribe;\n }\n let called = false;\n return () => {\n if (called) {\n return;\n }\n called = true;\n _valuesSubscriberCount--;\n unsubscribe();\n };\n };\n const subscribe = (props) => {\n _state.mount = true;\n _proxySubscribeFormState = {\n ..._proxySubscribeFormState,\n ...props.formState,\n };\n return _subscribe({\n ...props,\n formState: {\n ...defaultProxyFormState,\n ...props.formState,\n },\n });\n };\n const unregister = (name, options = {}) => {\n for (const fieldName of name ? convertToArrayPayload(name) : _names.mount) {\n _names.mount.delete(fieldName);\n _names.array.delete(fieldName);\n if (!options.keepValue) {\n unset(_fields, fieldName);\n unset(_formValues, fieldName);\n }\n !options.keepError && unset(_formState.errors, fieldName);\n !options.keepDirty && unset(_formState.dirtyFields, fieldName);\n !options.keepTouched && unset(_formState.touchedFields, fieldName);\n !options.keepIsValidating &&\n unset(_formState.validatingFields, fieldName);\n !_options.shouldUnregister &&\n !options.keepDefaultValue &&\n unset(_defaultValues, fieldName);\n }\n _subjects.state.next({\n values: cloneObject(_formValues),\n });\n _subjects.state.next({\n ..._formState,\n ...(!options.keepDirty ? {} : { isDirty: _getDirty() }),\n });\n !options.keepIsValid && _setValid();\n };\n const _setDisabledField = ({ disabled, name, }) => {\n if ((isBoolean(disabled) && _state.mount) ||\n !!disabled ||\n _names.disabled.has(name)) {\n const wasDisabled = _names.disabled.has(name);\n const isDisabled = !!disabled;\n const disabledStateChanged = wasDisabled !== isDisabled;\n disabled ? _names.disabled.add(name) : _names.disabled.delete(name);\n disabledStateChanged && _state.mount && !_state.action && _setValid();\n }\n };\n const register = (name, options = {}) => {\n let field = get(_fields, name);\n const disabledIsDefined = isBoolean(options.disabled) || isBoolean(_options.disabled);\n const shouldRevalidateRemount = !_names.registerName.has(name) && field && field._f && !field._f.mount;\n set(_fields, name, {\n ...(field || {}),\n _f: {\n ...(field && field._f ? field._f : { ref: { name } }),\n name,\n mount: true,\n ...options,\n },\n });\n _names.mount.add(name);\n if (field && !shouldRevalidateRemount) {\n _setDisabledField({\n disabled: isBoolean(options.disabled)\n ? options.disabled\n : _options.disabled,\n name,\n });\n }\n else {\n updateValidAndValue(name, true, options.value);\n }\n return {\n ...(disabledIsDefined\n ? { disabled: options.disabled || _options.disabled }\n : {}),\n ...(_options.progressive\n ? {\n required: !!options.required,\n min: getRuleValue(options.min),\n max: getRuleValue(options.max),\n minLength: getRuleValue(options.minLength),\n maxLength: getRuleValue(options.maxLength),\n pattern: getRuleValue(options.pattern),\n }\n : {}),\n name,\n onChange,\n onBlur: onChange,\n ref: (ref) => {\n if (ref) {\n _names.registerName.add(name);\n register(name, options);\n _names.registerName.delete(name);\n field = get(_fields, name);\n const fieldRef = isUndefined(ref.value)\n ? ref.querySelectorAll\n ? ref.querySelectorAll('input,select,textarea')[0] || ref\n : ref\n : ref;\n const radioOrCheckbox = isRadioOrCheckbox(fieldRef);\n const refs = field._f.refs || [];\n if (radioOrCheckbox\n ? refs.find((option) => option === fieldRef)\n : fieldRef === field._f.ref) {\n return;\n }\n const newField = {\n ...field._f,\n };\n if (radioOrCheckbox) {\n newField.refs = [\n ...refs.filter(live),\n fieldRef,\n ...(Array.isArray(get(_defaultValues, name)) ? [{}] : []),\n ];\n newField.ref = { type: fieldRef.type, name };\n }\n else {\n newField.ref = fieldRef;\n delete newField.refs;\n }\n set(_fields, name, {\n _f: newField,\n });\n updateValidAndValue(name, false, undefined, fieldRef);\n }\n else {\n field = get(_fields, name, {});\n if (field._f) {\n field._f.mount = false;\n }\n (_options.shouldUnregister || options.shouldUnregister) &&\n !(isNameInFieldArray(_names.array, name) && _state.action) &&\n _names.unMount.add(name);\n }\n },\n };\n };\n const _focusError = () => _options.shouldFocusError &&\n !_options.shouldUseNativeValidation &&\n iterateFieldsByAction(_fields, _focusInput, _names.mount);\n const _disableForm = (disabled) => {\n if (isBoolean(disabled)) {\n _subjects.state.next({ disabled });\n iterateFieldsByAction(_fields, (ref, name) => {\n const currentField = get(_fields, name);\n if (currentField) {\n ref.disabled = currentField._f.disabled || disabled;\n if (Array.isArray(currentField._f.refs)) {\n currentField._f.refs.forEach((inputRef) => {\n inputRef.disabled = currentField._f.disabled || disabled;\n });\n }\n }\n }, 0, false);\n }\n };\n const handleSubmit = (onValid, onInvalid) => async (e) => {\n let onValidError = undefined;\n if (e) {\n e.preventDefault && e.preventDefault();\n e.persist &&\n e.persist();\n }\n let fieldValues = cloneObject(_formValues);\n _subjects.state.next({\n isSubmitting: true,\n });\n if (_options.resolver) {\n const { errors, values } = await _runSchema();\n _updateIsValidating();\n _formState.errors = errors;\n fieldValues = cloneObject(values);\n }\n else {\n await executeBuiltInValidation({\n fields: _fields,\n eventType: EVENTS.SUBMIT,\n });\n }\n if (_names.disabled.size) {\n for (const name of _names.disabled) {\n unset(fieldValues, name);\n }\n }\n unset(_formState.errors, ROOT_ERROR_TYPE);\n if (isEmptyObject(_formState.errors)) {\n _subjects.state.next({\n errors: {},\n });\n try {\n await onValid(fieldValues, e);\n }\n catch (error) {\n onValidError = error;\n }\n }\n else {\n if (onInvalid) {\n await onInvalid({ ..._formState.errors }, e);\n }\n _focusError();\n setTimeout(_focusError);\n }\n _subjects.state.next({\n isSubmitted: true,\n isSubmitting: false,\n isSubmitSuccessful: isEmptyObject(_formState.errors) && !onValidError,\n submitCount: _formState.submitCount + 1,\n errors: _formState.errors,\n });\n if (onValidError) {\n throw onValidError;\n }\n };\n const resetField = (name, options = {}) => {\n if (get(_fields, name)) {\n if (isUndefined(options.defaultValue)) {\n setValue(name, cloneObject(get(_defaultValues, name)));\n }\n else {\n setValue(name, options.defaultValue);\n set(_defaultValues, name, cloneObject(options.defaultValue));\n }\n if (!options.keepTouched) {\n unset(_formState.touchedFields, name);\n }\n if (!options.keepDirty) {\n unset(_formState.dirtyFields, name);\n _formState.isDirty = options.defaultValue\n ? _getDirty(name, cloneObject(get(_defaultValues, name)))\n : _getDirty();\n }\n if (!options.keepError) {\n unset(_formState.errors, name);\n _proxyFormState.isValid && _setValid();\n }\n _subjects.state.next({ ..._formState });\n }\n };\n const _reset = (formValues, keepStateOptions = {}) => {\n const updatedValues = formValues ? cloneObject(formValues) : _defaultValues;\n const cloneUpdatedValues = cloneObject(updatedValues);\n const isEmptyResetValues = isEmptyObject(formValues);\n const values = cloneUpdatedValues;\n const fieldRefs = _fields;\n if (!keepStateOptions.keepDefaultValues) {\n _defaultValues = updatedValues;\n }\n if (!keepStateOptions.keepValues) {\n if (keepStateOptions.keepDirtyValues) {\n const fieldsToCheck = new Set([\n ..._names.mount,\n ...Object.keys(getDirtyFields(_defaultValues, _formValues, undefined, fieldRefs)),\n ]);\n for (const fieldName of Array.from(fieldsToCheck)) {\n const isDirty = get(_formState.dirtyFields, fieldName);\n const existingValue = get(_formValues, fieldName);\n const newValue = get(values, fieldName);\n if (isDirty && !isUndefined(existingValue)) {\n set(values, fieldName, existingValue);\n }\n else if (!isDirty && !isUndefined(newValue)) {\n setValue(fieldName, newValue);\n }\n }\n }\n else {\n if (isWeb && isUndefined(formValues)) {\n for (const name of _names.mount) {\n const field = get(_fields, name);\n if (field && field._f) {\n const fieldReference = Array.isArray(field._f.refs)\n ? field._f.refs[0]\n : field._f.ref;\n if (isHTMLElement(fieldReference)) {\n const form = fieldReference.closest('form');\n if (form) {\n form.reset();\n break;\n }\n }\n }\n }\n }\n if (keepStateOptions.keepFieldsRef) {\n for (const fieldName of _names.mount) {\n setValue(fieldName, get(values, fieldName));\n }\n }\n else {\n _fields = {};\n }\n }\n if (_options.shouldUnregister) {\n _formValues = keepStateOptions.keepDefaultValues\n ? cloneObject(_defaultValues)\n : {};\n if (keepStateOptions.keepFieldsRef) {\n for (const fieldName of _names.mount) {\n set(_formValues, fieldName, get(values, fieldName));\n }\n }\n }\n else {\n _formValues = cloneObject(values);\n }\n _subjects.array.next({\n values: { ...values },\n });\n _subjects.state.next({\n name: undefined,\n type: undefined,\n values: { ...values },\n });\n }\n _names = {\n mount: keepStateOptions.keepDirtyValues ? _names.mount : new Set(),\n unMount: new Set(),\n array: new Set(),\n registerName: new Set(),\n disabled: new Set(),\n watch: new Set(),\n watchAll: false,\n focus: '',\n };\n _state.mount =\n !_proxyFormState.isValid ||\n !!keepStateOptions.keepIsValid ||\n !!keepStateOptions.keepDirtyValues ||\n (!_options.shouldUnregister && !isEmptyObject(values));\n _state.watch = !!_options.shouldUnregister;\n _state.keepIsValid = !!keepStateOptions.keepIsValid;\n _state.action = false;\n if (!keepStateOptions.keepErrors) {\n _formState.errors = {};\n }\n _subjects.state.next({\n submitCount: keepStateOptions.keepSubmitCount\n ? _formState.submitCount\n : 0,\n isDirty: isEmptyResetValues\n ? false\n : keepStateOptions.keepDirty\n ? _formState.isDirty\n : keepStateOptions.keepValues\n ? _getDirty()\n : !!(keepStateOptions.keepDefaultValues &&\n !deepEqual(formValues, _defaultValues)),\n isSubmitted: keepStateOptions.keepIsSubmitted\n ? _formState.isSubmitted\n : false,\n dirtyFields: isEmptyResetValues\n ? {}\n : keepStateOptions.keepDirtyValues\n ? keepStateOptions.keepDefaultValues && _formValues\n ? getDirtyFields(_defaultValues, _formValues, undefined, fieldRefs)\n : _formState.dirtyFields\n : keepStateOptions.keepDefaultValues && formValues\n ? getDirtyFields(_defaultValues, formValues, undefined, fieldRefs)\n : keepStateOptions.keepDirty\n ? _formState.dirtyFields\n : {},\n touchedFields: keepStateOptions.keepTouched\n ? _formState.touchedFields\n : {},\n errors: keepStateOptions.keepErrors ? _formState.errors : {},\n isSubmitSuccessful: keepStateOptions.keepIsSubmitSuccessful\n ? _formState.isSubmitSuccessful\n : false,\n isSubmitting: false,\n defaultValues: _defaultValues,\n });\n };\n const reset = (formValues, keepStateOptions) => _reset(isFunction(formValues)\n ? formValues(_formValues)\n : formValues, { ..._options.resetOptions, ...keepStateOptions });\n const setFocus = (name, options = {}) => {\n const field = get(_fields, name);\n const fieldReference = field && field._f;\n if (fieldReference) {\n const fieldRef = fieldReference.refs\n ? fieldReference.refs[0]\n : fieldReference.ref;\n if (fieldRef.focus) {\n setTimeout(() => {\n fieldRef.focus();\n options.shouldSelect &&\n isFunction(fieldRef.select) &&\n fieldRef.select();\n });\n }\n }\n };\n const _setFormState = (updatedFormState) => {\n // `name`, `type`, and `values` describe the event that produced this\n // update, not the form's persisted state (they aren't part of\n // `FormState`). Merging them in would leak a stale `name`/`type` from\n // one event into a later, unrelated notification that doesn't specify\n // its own.\n const { name, type, values, ...formState } = updatedFormState;\n _formState = {\n ..._formState,\n ...formState,\n };\n };\n const _resetDefaultValues = () => isFunction(_options.defaultValues) &&\n _options.defaultValues().then((values) => {\n reset(values, _options.resetOptions);\n _subjects.state.next({\n isLoading: false,\n });\n });\n const resetDefaultValues = (values, options = {}) => {\n _defaultValues = cloneObject(values);\n if (!options.keepDirty) {\n const newDirtyFields = getDirtyFields(_defaultValues, _formValues, undefined, _fields);\n _formState.dirtyFields = newDirtyFields;\n _formState.isDirty = !isEmptyObject(newDirtyFields);\n }\n if (!options.keepIsValid) {\n _setValid();\n }\n _subjects.state.next({\n ..._formState,\n defaultValues: _defaultValues,\n });\n };\n const methods = {\n control: {\n register,\n unregister,\n getFieldState,\n handleSubmit,\n setError,\n _subscribe,\n _runSchema,\n _updateIsValidating,\n _focusError,\n _getWatch,\n _getDirty,\n _setValid,\n _setFieldArray,\n _setDisabledField,\n _setErrors,\n _getFieldArray,\n _reset,\n _resetDefaultValues,\n _removeUnmounted,\n _disableForm,\n _subjects,\n _proxyFormState,\n get _fields() {\n return _fields;\n },\n get _formValues() {\n return _formValues;\n },\n get _state() {\n return _state;\n },\n set _state(value) {\n _state = value;\n },\n get _defaultValues() {\n return _defaultValues;\n },\n get _names() {\n return _names;\n },\n set _names(value) {\n _names = value;\n },\n get _formState() {\n return _formState;\n },\n get _options() {\n return _options;\n },\n set _options(value) {\n _options = {\n ..._options,\n ...value,\n };\n _validationModeBeforeSubmit = getValidationModes(_options.mode);\n _validationModeAfterSubmit = getValidationModes(_options.reValidateMode);\n },\n },\n subscribe,\n trigger,\n register,\n handleSubmit,\n watch,\n setValue,\n setValues,\n getValues,\n reset,\n resetField,\n resetDefaultValues,\n clearErrors,\n unregister,\n setError,\n setFocus,\n getFieldState,\n };\n return {\n ...methods,\n formControl: methods,\n };\n}\n\n/**\n * Custom hook to manage the entire form.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/useform) • [Demo](https://codesandbox.io/s/react-hook-form-get-started-ts-5ksmm) • [Video](https://www.youtube.com/watch?v=RkXv4AXXC_4)\n *\n * @param props - form configuration and validation parameters.\n *\n * @returns methods - individual functions to manage the form state. {@link UseFormReturn}\n *\n * @example\n * ```tsx\n * function App() {\n * const { register, handleSubmit, watch, formState: { errors } } = useForm();\n * const onSubmit = data => console.log(data);\n *\n * console.log(watch(\"example\"));\n *\n * return (\n * <form onSubmit={handleSubmit(onSubmit)}>\n * <input defaultValue=\"test\" {...register(\"example\")} />\n * <input {...register(\"exampleRequired\", { required: true })} />\n * {errors.exampleRequired && <span>This field is required</span>}\n * <button>Submit</button>\n * </form>\n * );\n * }\n * ```\n */\nfunction useForm(props = {}) {\n const _formControl = React.useRef(undefined);\n const _values = React.useRef(undefined);\n const _formControlProp = React.useRef(props.formControl);\n const [formState, updateFormState] = React.useState(() => ({\n ...cloneObject(DEFAULT_FORM_STATE),\n isLoading: isFunction(props.defaultValues),\n errors: props.errors || {},\n disabled: props.disabled || false,\n defaultValues: isFunction(props.defaultValues)\n ? undefined\n : props.defaultValues,\n }));\n if (!_formControl.current ||\n (props.formControl && _formControlProp.current !== props.formControl)) {\n _formControlProp.current = props.formControl;\n if (props.formControl) {\n _formControl.current = {\n ...props.formControl,\n formState,\n };\n if (props.defaultValues && !isFunction(props.defaultValues)) {\n props.formControl.reset(props.defaultValues, props.resetOptions);\n }\n }\n else {\n const { formControl, ...rest } = createFormControl(props);\n _formControl.current = {\n ...rest,\n formState,\n };\n }\n }\n const control = _formControl.current.control;\n control._options = props;\n useIsomorphicLayoutEffect(() => {\n const sub = control._subscribe({\n formState: control._proxyFormState,\n callback: () => updateFormState({\n ...control._formState,\n defaultValues: control._defaultValues,\n }),\n reRenderRoot: true,\n });\n updateFormState((data) => ({\n ...data,\n isReady: true,\n }));\n control._formState.isReady = true;\n return sub;\n }, [control]);\n React.useEffect(() => control._disableForm(props.disabled), [control, props.disabled]);\n React.useEffect(() => {\n if (props.mode) {\n control._options.mode = props.mode;\n }\n if (props.reValidateMode) {\n control._options.reValidateMode = props.reValidateMode;\n }\n }, [control, props.mode, props.reValidateMode]);\n React.useEffect(() => {\n if (props.errors) {\n control._setErrors(props.errors);\n control._focusError();\n }\n }, [control, props.errors]);\n React.useEffect(() => {\n props.shouldUnregister &&\n control._subjects.state.next({\n values: control._getWatch(),\n });\n }, [control, props.shouldUnregister]);\n React.useEffect(() => {\n if (control._proxyFormState.isDirty) {\n const isDirty = control._getDirty();\n if (isDirty !== formState.isDirty) {\n control._subjects.state.next({\n isDirty,\n });\n }\n }\n }, [control, formState.isDirty]);\n React.useEffect(() => {\n var _a;\n if (props.values && !deepEqual(props.values, _values.current)) {\n control._reset(props.values, {\n keepFieldsRef: true,\n ...control._options.resetOptions,\n });\n if (!((_a = control._options.resetOptions) === null || _a === void 0 ? void 0 : _a.keepIsValid)) {\n control._setValid();\n }\n _values.current = props.values;\n updateFormState((state) => ({ ...state }));\n }\n else {\n control._resetDefaultValues();\n }\n }, [control, props.values]);\n React.useEffect(() => {\n if (!control._state.mount) {\n control._setValid();\n control._state.mount = true;\n }\n if (control._state.watch) {\n control._state.watch = false;\n control._subjects.state.next({ ...control._formState });\n }\n control._removeUnmounted();\n });\n _formControl.current.formState = React.useMemo(() => getProxyFormState(formState, control), [control, formState]);\n return _formControl.current;\n}\n\n/**\n * Watch component that subscribes to form field changes and re-renders when watched fields update.\n *\n * @param control - The form control object from useForm\n * @param name - Can be field name, array of field names, or undefined to watch the entire form\n * @param disabled - Disable subscription\n * @param exact - Whether to watch exact field names or not\n * @param defaultValue - The default value to use if the field is not yet set\n * @param compute - Function to compute derived values from watched fields\n * @param render - The function that receives watched values and returns ReactNode\n * @returns The result of calling render function with watched values\n *\n * @example\n * The `Watch` component only re-render when the values of `foo`, `bar`, and `baz.qux` change.\n * The types of `foo`, `bar`, and `baz.qux` are precisely inferred.\n *\n * ```tsx\n * const { control } = useForm();\n *\n * <Watch\n * control={control}\n * names={['foo', 'bar', 'baz.qux']}\n * render={([foo, bar, baz_qux]) => <div>{foo}{bar}{baz_qux}</div>}\n * />\n * ```\n */\nconst Watch = (props) => props.render(useWatch({ name: props.names, ...props }));\n\nexport { Controller, FieldArray, Form, FormProvider, FormStateSubscribe, Watch, appendErrors, createFormControl, get, set, useController, useFieldArray, useForm, useFormContext, useFormState, useWatch };\n//# sourceMappingURL=index.esm.mjs.map\n","import _curry2 from \"./internal/_curry2.js\";\nimport _isArray from \"./internal/_isArray.js\";\nimport _isObject from \"./internal/_isObject.js\";\n\n/**\n * Creates a new object by recursively evolving a shallow copy of `object`,\n * according to the `transformation` functions. All non-primitive properties\n * are copied by reference.\n *\n * A `transformation` function will not be invoked if its corresponding key\n * does not exist in the evolved object.\n *\n * @func\n * @memberOf R\n * @since v0.9.0\n * @category Object\n * @sig {k: (v -> v)} -> {k: v} -> {k: v}\n * @param {Object} transformations The object specifying transformation functions to apply\n * to the object.\n * @param {Object} object The object to be transformed.\n * @return {Object} The transformed object.\n * @example\n *\n * const tomato = {firstName: ' Tomato ', data: {elapsed: 100, remaining: 1400}, id:123};\n * const transformations = {\n * firstName: R.trim,\n * lastName: R.trim, // Will not get invoked.\n * data: {elapsed: R.add(1), remaining: R.add(-1)}\n * };\n * R.evolve(transformations, tomato); //=> {firstName: 'Tomato', data: {elapsed: 101, remaining: 1399}, id:123}\n */\nvar evolve = /*#__PURE__*/_curry2(function evolve(transformations, object) {\n if (!_isObject(object) && !_isArray(object)) {\n return object;\n }\n var result = object instanceof Array ? [] : {};\n var transformation, key, type;\n for (key in object) {\n transformation = transformations[key];\n type = typeof transformation;\n result[key] = type === 'function' ? transformation(object[key]) : transformation && type === 'object' ? evolve(transformation, object[key]) : object[key];\n }\n return result;\n});\nexport default evolve;","import _curry1 from \"./internal/_curry1.js\";\nvar ws = '\\x09\\x0A\\x0B\\x0C\\x0D\\x20\\xA0\\u1680\\u2000\\u2001\\u2002\\u2003' + '\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028' + '\\u2029\\uFEFF';\nvar zeroWidth = '\\u200b';\nvar hasProtoTrim = typeof String.prototype.trim === 'function';\n/**\n * Removes (strips) whitespace from both ends of the string.\n *\n * @func\n * @memberOf R\n * @since v0.6.0\n * @category String\n * @sig String -> String\n * @param {String} str The string to trim.\n * @return {String} Trimmed version of `str`.\n * @example\n *\n * R.trim(' xyz '); //=> 'xyz'\n * R.map(R.trim, R.split(',', 'x, y, z')); //=> ['x', 'y', 'z']\n */\nvar trim = !hasProtoTrim || /*#__PURE__*/ws.trim() || ! /*#__PURE__*/zeroWidth.trim() ? /*#__PURE__*/_curry1(function trim(str) {\n var beginRx = new RegExp('^[' + ws + '][' + ws + ']*');\n var endRx = new RegExp('[' + ws + '][' + ws + ']*$');\n return str.replace(beginRx, '').replace(endRx, '');\n}) : /*#__PURE__*/_curry1(function trim(str) {\n return str.trim();\n});\nexport default trim;","import _has from \"./_has.js\";\n\n// Based on https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Object/assign\nfunction _objectAssign(target) {\n if (target == null) {\n throw new TypeError('Cannot convert undefined or null to object');\n }\n var output = Object(target);\n var idx = 1;\n var length = arguments.length;\n while (idx < length) {\n var source = arguments[idx];\n if (source != null) {\n for (var nextKey in source) {\n if (_has(nextKey, source)) {\n output[nextKey] = source[nextKey];\n }\n }\n }\n idx += 1;\n }\n return output;\n}\nexport default typeof Object.assign === 'function' ? Object.assign : _objectAssign;","import _objectAssign from \"./internal/_objectAssign.js\";\nimport _curry2 from \"./internal/_curry2.js\";\n\n/**\n * Create a new object with the own properties of the first object merged with\n * the own properties of the second object. If a key exists in both objects,\n * the value from the second object will be used.\n *\n * @func\n * @memberOf R\n * @since v0.26.0\n * @category Object\n * @sig {k: v} -> {k: v} -> {k: v}\n * @param {Object} l\n * @param {Object} r\n * @return {Object}\n * @see R.mergeLeft, R.mergeDeepRight, R.mergeWith, R.mergeWithKey\n * @example\n *\n * R.mergeRight({ 'name': 'fred', 'age': 10 }, { 'age': 40 });\n * //=> { 'name': 'fred', 'age': 40 }\n *\n * const withDefaults = R.mergeRight({x: 0, y: 0});\n * withDefaults({y: 2}); //=> {x: 0, y: 2}\n * @symb R.mergeRight(a, b) = {...a, ...b}\n */\nvar mergeRight = /*#__PURE__*/_curry2(function mergeRight(l, r) {\n return _objectAssign({}, l, r);\n});\nexport default mergeRight;","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../node_modules/less-loader/dist/cjs/index.js!./Settings.less\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../node_modules/less-loader/dist/cjs/index.js!./Settings.less\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useState, useContext } from \"react\";\nimport { Modal, ModalButtonID, Select } from '../../ui/components';\nimport classNames from \"classnames\";\nimport { useSubscribe } from '../../hooks';\nimport { command$ } from '../../observables/command';\nimport { CommandID } from '../../commands';\nimport { AppSettingsContext } from '../../context/config';\nimport { createURI } from '../../shared/utils/URI';\nimport { mergeRight, omit } from 'ramda';\nimport { LocalFileSystemID } from '../../shared/types';\nimport info from '../../../../package.json';\nimport styles from './Settings.less';\nexport const themes = ['black', 'blue', 'green', 'pink'];\nconst fileIconThemes = [\n { value: '', label: 'None' },\n { value: 'seti', label: 'Seti (Visual Studio Code)' },\n { value: 'material', label: 'Material Icon Theme' },\n { value: 'vsicons', label: 'VSCode Icons' },\n { value: 'ayu', label: 'Ayu' },\n { value: 'vscodegreat', label: 'VSCode Great Icons' },\n { value: 'fileicons', label: 'File Icons' },\n { value: 'nomo', label: 'Nomo Dark' }\n];\nconst buttons = [\n {\n id: ModalButtonID.Cancel,\n label: 'Cancel'\n },\n {\n id: ModalButtonID.Ok,\n label: 'Save'\n }\n];\nexport default function Settings() {\n const appSettings = useContext(AppSettingsContext);\n const [shown, show] = useState(false);\n const [mode, setMode] = useState(appSettings.mode);\n const [theme, setTheme] = useState(appSettings.theme);\n const [fileTheme, setFileTheme] = useState(appSettings.fileTheme ?? '');\n const [timeFmt, setTimeFmt] = useState(appSettings.timeFmt);\n const [sizeFmt, setSizeFmt] = useState(appSettings.sizeFmt);\n useSubscribe(() => command$.subscribe(cmd => {\n switch (cmd.id) {\n case CommandID.Settings: {\n show(true);\n break;\n }\n }\n }));\n const onClose = (id) => {\n show(false);\n if (id == ModalButtonID.Ok) {\n const settings = omit(['fileIcons'], appSettings);\n window.f5.write(createURI(LocalFileSystemID, settings.settings), JSON.stringify(mergeRight(settings, { mode, theme, fileTheme, timeFmt, sizeFmt })));\n }\n };\n return shown && React.createElement(Modal, { buttons: buttons, onClose: onClose, options: { x: true } },\n React.createElement(\"div\", { className: styles.root + ' modal-content' },\n React.createElement(\"header\", null, \"Settings\"),\n React.createElement(\"form\", { className: styles.form, onSubmit: e => e.preventDefault() },\n React.createElement(\"label\", null, \"Mode:\"),\n React.createElement(\"div\", { className: \"dry-buttons\" },\n React.createElement(\"button\", { onClick: () => setMode('light'), \"data-checked\": mode == 'light' }, \"Light\"),\n React.createElement(\"button\", { onClick: () => setMode('system'), \"data-checked\": mode == 'system' }, \"System\"),\n React.createElement(\"button\", { onClick: () => setMode('dark'), \"data-checked\": mode == 'dark' }, \"Dark\")),\n React.createElement(\"label\", null, \"Default Color Theme:\"),\n React.createElement(\"div\", { className: styles.themes }, themes.map(t => React.createElement(\"span\", { key: t, \"data-mode\": \"dark\", \"data-theme\": t, \"data-active\": t == theme, onClick: () => setTheme(t) }))),\n React.createElement(\"label\", null, \"File Icon Theme:\"),\n React.createElement(Select, { value: fileTheme, options: fileIconThemes, onChange: setFileTheme }),\n React.createElement(\"label\", null, \"Date/time format:\"),\n React.createElement(\"input\", { className: classNames('dry'), name: \"date-time-fmt\", value: timeFmt, onChange: e => setTimeFmt(e.target.value), placeholder: \"e.g. yyyy-MM-dd HH:mm\" }),\n React.createElement(\"p\", null,\n React.createElement(\"i\", { className: \"icon\" }, \"info\"),\n React.createElement(\"a\", { href: \"https://date-fns.org/v3.6.0/docs/format\", target: \"_blank\" }, \"Supported formats\")),\n React.createElement(\"label\", null, \"Filesize format:\"),\n React.createElement(\"input\", { className: classNames('dry'), name: \"filesize-fmt\", value: sizeFmt, onChange: e => setSizeFmt(e.target.value), placeholder: \"e.g. 0.0 b\" }),\n React.createElement(\"p\", null,\n React.createElement(\"i\", { className: \"icon\" }, \"info\"),\n React.createElement(\"a\", { href: \"http://numeraljs.com/#format-bytes\", target: \"_blank\" }, \"Supported formats\"))),\n React.createElement(\"small\", null,\n \"Version: \",\n info.version)));\n}\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../node_modules/less-loader/dist/cjs/index.js!./Connection.less\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../node_modules/less-loader/dist/cjs/index.js!./Connection.less\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useState, useEffect, useContext } from \"react\";\nimport { unixToWin, winToUnix } from '../../shared/utils/os';\nimport { Modal, ModalButtonID, Select, Password, Checkbox } from '../../ui/components';\nimport { useForm, Controller } from \"react-hook-form\";\nimport { parse } from '../../utils/path';\nimport classNames from \"classnames\";\nimport { evolve, trim } from 'ramda';\nimport { themes } from '../Settings/Settings';\nimport { AppSettingsContext } from '../../context/config';\nimport styles from './Connection.less';\nimport themesStyle from '../Settings/Settings.less';\nconst protocols = [\n {\n value: 'sftp',\n label: 'SFTP - SSH File Transfer Protocol'\n },\n {\n value: 'ftp',\n label: 'FTP - File Transfer Protocol'\n },\n {\n value: 's3',\n label: 'S3 - Amazon Simple Storage Service'\n }\n];\nexport default function ({ file, onConnect, onClose }) {\n const appSettings = useContext(AppSettingsContext);\n const [name, setName] = useState('');\n const [protocol, setProtocol] = useState('sftp');\n const [values, setValues] = useState({\n scheme: 'sftp',\n host: '',\n port: '',\n user: '',\n password: '',\n privatekey: ''\n });\n const [theme, setTheme] = useState(appSettings.theme);\n const [username, setUsername] = useState('');\n const [pass, setPass] = useState('');\n const [savePassword, setSavePassword] = useState(false);\n const [usePrivateKey, setUsePrivateKey] = useState(false);\n useEffect(() => {\n if (file?.length) {\n setName(parse(file).name);\n window.f5.get(file).then(config => {\n if (config) {\n const { scheme, host, port, user, password, privatekey } = config;\n setValues({\n scheme,\n host,\n port: String(port),\n user,\n password,\n privatekey: appSettings.isWin ? unixToWin(privatekey) : privatekey\n });\n setTheme(config.theme ?? appSettings.theme);\n setSavePassword(password.length > 0);\n setUsePrivateKey(privatekey.length > 0);\n }\n });\n }\n }, [file]);\n useEffect(() => reset(values), [values]);\n const { register, formState: { errors, isValid }, control, getValues, watch, reset, setValue } = useForm({ mode: 'all', values });\n useEffect(() => {\n const { unsubscribe } = watch(({ scheme, user, host, port, password }) => {\n setUsername(`${scheme}://${user}@${host}:${port ? port : (scheme == 'sftp' ? 22 : 21)}`);\n setProtocol(scheme);\n setPass(password);\n });\n return () => unsubscribe();\n }, [watch]);\n const parseHost = (host) => {\n const h = host.trim();\n const scheme = h.match(/^s?ftp:/);\n if (scheme) {\n return h.substring(scheme[0].length + 2);\n }\n if (protocol == 's3' && h.length > 8 && !h.match(/^https?:/)) {\n return `https://${h}`;\n }\n return h;\n };\n const buttons = [\n {\n id: ModalButtonID.Cancel,\n label: 'Cancel'\n },\n {\n id: 'save',\n label: 'Save',\n disabled: !isValid\n },\n {\n id: ModalButtonID.Ok,\n label: 'Connect',\n disabled: !isValid\n }\n ];\n const defaultPort = () => {\n return {\n sftp: '22',\n ftp: '21',\n s3: '443'\n }[protocol] ?? '';\n };\n const defaultKeyFile = '~/.ssh/id_ed25519';\n const onModalClose = async (id) => {\n if (id == 'save' || id == ModalButtonID.Ok) {\n const data = evolve({\n host: parseHost,\n port: p => parseInt(p || defaultPort()),\n user: trim\n }, { ...getValues(), theme });\n if (protocol == 'sftp') {\n if (usePrivateKey) {\n if (data.privatekey) {\n if (appSettings.isWin) {\n data.privatekey = winToUnix(data.privatekey);\n }\n }\n else {\n data.privatekey = defaultKeyFile;\n }\n }\n else {\n data.privatekey = '';\n }\n }\n await window.f5.save(file, { ...data, savePassword });\n if (id == ModalButtonID.Ok) {\n onConnect(file);\n }\n }\n onClose();\n reset({ scheme: 'sftp', host: '', port: '', user: '', password: '', privatekey: '' });\n setTheme(appSettings.theme);\n };\n return React.createElement(React.Fragment, null, (file?.length || 0) > 0 &&\n React.createElement(Modal, { buttons: buttons, onClose: onModalClose, options: { okOnEnter: false, x: true } },\n React.createElement(\"form\", { className: styles.root, onSubmit: e => e.preventDefault() },\n React.createElement(\"h1\", null, name),\n React.createElement(\"label\", null, \"Protocol:\"),\n React.createElement(Controller, { name: \"scheme\", control: control, render: ({ field }) => React.createElement(Select, { ...field, options: protocols }) }),\n React.createElement(\"ul\", null,\n React.createElement(\"li\", null,\n React.createElement(\"label\", null,\n protocol == 's3' ? 'URL' : 'Host',\n \":\"),\n React.createElement(\"input\", { className: classNames('dry', { error: errors.host }), ...register(\"host\", { required: true }), placeholder: protocol == 's3' ? 'https://s3.amazonaws.com' : 'example.com', autoComplete: \"off\", onBlur: () => setValue('host', parseHost(getValues().host)) })),\n React.createElement(\"li\", null,\n React.createElement(\"label\", null, \"Port:\"),\n React.createElement(\"input\", { className: classNames('dry', { error: errors.port }), ...register(\"port\", { pattern: /\\d+/g }), placeholder: defaultPort(), autoComplete: \"off\" }))),\n React.createElement(\"label\", null,\n protocol == 's3' ? 'Access Key Id' : 'User',\n \":\"),\n React.createElement(\"input\", { className: classNames('dry', { error: errors.user }), ...register(\"user\", { required: true }), placeholder: protocol == 's3' ? 'unique identifier' : 'username', autoComplete: \"off\" }),\n React.createElement(\"div\", { className: \"username\" },\n React.createElement(\"input\", { type: \"text\", name: \"username\", placeholder: \"username\", defaultValue: username, autoComplete: \"username\" })),\n (protocol != 'sftp' || !usePrivateKey) && React.createElement(React.Fragment, null,\n React.createElement(\"label\", null,\n protocol == 's3' ? 'Secret Access Key' : 'Password',\n \":\"),\n React.createElement(Controller, { name: \"password\", control: control, render: ({ field }) => React.createElement(Password, { ...field, placeholder: \"Will ask if empty\", autoComplete: 'current-password' }) })),\n (protocol != 'sftp' || !usePrivateKey) && pass && React.createElement(React.Fragment, null,\n React.createElement(\"label\", null),\n React.createElement(Checkbox, { onChange: setSavePassword, value: savePassword }, \"Save password on disk\"),\n React.createElement(\"p\", null, \"Passwords are stored in plain text. Use the browser password manager for a better protection.\")),\n protocol == 'sftp' && React.createElement(React.Fragment, null,\n React.createElement(\"label\", null),\n React.createElement(Checkbox, { onChange: setUsePrivateKey, value: usePrivateKey }, \"Use SSH Private Key\")),\n protocol == 'sftp' && usePrivateKey && React.createElement(React.Fragment, null,\n React.createElement(\"label\", null, \"Key File Path:\"),\n React.createElement(\"input\", { className: 'dry', ...register(\"privatekey\"), placeholder: `${appSettings.isWin ? unixToWin(defaultKeyFile) : defaultKeyFile} (by default)`, autoComplete: \"off\" })),\n React.createElement(\"label\", null, \"Color Theme:\"),\n React.createElement(\"div\", { className: themesStyle.themes }, themes.map(t => React.createElement(\"span\", { key: t, \"data-mode\": \"dark\", \"data-theme\": t, \"data-active\": t == theme, onClick: () => setTheme(t) }))))));\n}\n","import React from \"react\";\nimport { Button } from '../ui/components';\nimport { command$ } from '../observables/command';\nimport { CommandID } from '../commands';\nexport default function NoConnections() {\n return React.createElement(\"div\", { className: \"fill-center\" },\n React.createElement(\"div\", { className: \"center\" },\n React.createElement(\"div\", { className: 'icon' }, \"cloud_upload\"),\n React.createElement(\"p\", null, \"No site connections found.\"),\n React.createElement(\"p\", null,\n React.createElement(Button, { onClick: () => command$.next({ id: CommandID.NewFile }), primary: true }, \"Create New Connection...\"))));\n}\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../node_modules/less-loader/dist/cjs/index.js!./Connections.less\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../node_modules/less-loader/dist/cjs/index.js!./Connections.less\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useState, useContext } from \"react\";\nimport { LocalFileSystemID, SortOrder } from '../../shared/types';\nimport { FileAttributeType } from '../../shared/FileSystem';\nimport { AppSettingsContext } from '../../context/config';\nimport { parseURI } from '../../shared/utils/URI';\nimport Explorer from '../Explorer/Explorer';\nimport dirMenu from '../../menu/connectionsDir';\nimport fileMenu from '../../menu/connection';\nimport ConnectionForm from '../../modals/Connection/Connection';\nimport { useSubscribe } from '../../hooks';\nimport { CommandID } from '../../commands';\nimport { command$ } from '../../observables/command';\nimport NoConnections from '../NoConnections';\nimport classNames from 'classnames';\nimport styles from './Connections.less';\nconst settings = {\n columns: [\n {\n name: \"name\",\n type: FileAttributeType.String,\n title: \"Name\",\n visible: true,\n width: 300\n },\n {\n name: \"modified\",\n type: FileAttributeType.Date,\n title: \"Last Modified\",\n visible: true,\n width: 300\n }\n ],\n sort: ['name', SortOrder.Asc],\n history: [],\n filter: undefined\n};\nexport default function Connections({ path, onChange, onSelect, connect, toolbar, onFocus, onBlur, tabindex }) {\n const appSettings = useContext(AppSettingsContext);\n const [selected, setSelected] = useState([]);\n const [menu, setMenu] = useState([]);\n const [connectionFile, setConnectionFile] = useState('');\n useSubscribe(() => command$.subscribe(cmd => {\n if (cmd.id == CommandID.Edit && cmd.uri) {\n const { id, path } = parseURI(cmd.uri);\n if (id == LocalFileSystemID && path.startsWith(appSettings.connections)) {\n setConnectionFile(path);\n }\n }\n }), []);\n const onContextMenu = (file, dir) => {\n const { path } = parseURI(file);\n setMenu(dir ?\n dirMenu(path, selected, path == appSettings.connections) :\n fileMenu(path, selected, () => connect(path)));\n };\n return React.createElement(\"div\", { className: classNames(styles.root) },\n React.createElement(Explorer, { icon: 'cloud_upload', connection: LocalFileSystemID, settings: settings, path: path, fixedRoot: appSettings.connections, onChange: onChange, onSelect: (paths) => { setSelected(paths); onSelect(paths); }, onOpen: connect, onMenu: onContextMenu, contextMenu: menu, toolbar: toolbar, tabindex: tabindex, onNewFile: uri => setConnectionFile(parseURI(uri).path), onFocus: onFocus, onBlur: onBlur },\n React.createElement(NoConnections, null)),\n React.createElement(ConnectionForm, { file: connectionFile, onConnect: connect, onClose: () => setConnectionFile('') }));\n}\n","import { LocalFileSystemID, FailureType } from '../shared/types';\nimport { createURI, parseURI } from '../shared/utils/URI';\nimport { CommandID } from '../commands';\nimport { command$ } from '../observables/command';\nimport { error$ } from '../observables/error';\nexport default function (path, selected, copyTo) {\n const { id, path: to } = parseURI(copyTo);\n return [\n {\n id: CommandID.Upload,\n label: id == LocalFileSystemID ? 'Copy' : 'Upload',\n click: () => command$.next({ id: CommandID.Upload, uri: createURI(LocalFileSystemID, path) })\n },\n {\n id: CommandID.MirrorLocal,\n label: id == LocalFileSystemID ? `Copy with Relative Path` : 'Upload with Relative Path',\n click: () => command$.next({ id: CommandID.MirrorLocal, uri: createURI(LocalFileSystemID, path) }),\n separator: true\n },\n {\n id: CommandID.TriggerCopy,\n label: 'Copy',\n click: () => command$.next({ id: CommandID.TriggerCopy }),\n },\n {\n id: CommandID.CopyPath,\n label: 'Copy Path',\n click: () => command$.next({ id: CommandID.CopyPath, uri: createURI(LocalFileSystemID, path) })\n },\n {\n id: CommandID.CopyRelativePath,\n label: 'Copy Relative Path',\n click: () => command$.next({ id: CommandID.CopyRelativePath, uri: createURI(LocalFileSystemID, path) })\n },\n {\n id: CommandID.CopyName,\n label: 'Copy Name',\n click: () => command$.next({ id: CommandID.CopyName, uri: createURI(LocalFileSystemID, path) })\n },\n {\n id: CommandID.CopyNameNoExt,\n label: 'Copy Name w/o Extension',\n click: () => command$.next({ id: CommandID.CopyNameNoExt, uri: createURI(LocalFileSystemID, path) }),\n separator: true\n },\n {\n id: 'vscode',\n label: \"Open in VS Code\",\n click: () => { window.f5.open(createURI(LocalFileSystemID, path), 'code'); }\n },\n {\n id: 'open',\n label: 'Open in Default App',\n click: () => { window.f5.open(createURI(LocalFileSystemID, path)); },\n separator: true\n },\n {\n id: CommandID.Rename,\n label: 'Rename...',\n click: () => command$.next({ id: CommandID.Rename, uri: createURI(LocalFileSystemID, path) })\n },\n {\n id: CommandID.Duplicate,\n label: 'Duplicate',\n click: () => command$.next({ id: CommandID.Duplicate, uri: createURI(LocalFileSystemID, path) }),\n separator: true\n },\n {\n id: 'clear',\n label: 'Clear Contents',\n className: 'attention',\n click: () => command$.next({ id: CommandID.ClearContents, uri: createURI(LocalFileSystemID, path) })\n },\n {\n id: CommandID.Delete,\n label: 'Delete',\n className: 'attention',\n click: () => {\n error$.next({\n type: FailureType.ConfirmDeletion,\n files: ((selected.length && selected.includes(path)) ? selected : [path]).map(path => createURI(LocalFileSystemID, path))\n });\n }\n }\n ];\n}\n","import { FailureType } from '../shared/types';\nimport { createURI } from '../shared/utils/URI';\nimport { command$ } from '../observables/command';\nimport { CommandID } from '../commands';\nimport { error$ } from '../observables/error';\nimport { createQueue } from '../observables/queue';\nexport default function (id, path, selected, copyTo) {\n return [\n {\n id: CommandID.Download,\n label: 'Download',\n click: () => command$.next({ id: CommandID.Download, uri: createURI(id, path) })\n },\n {\n id: CommandID.MirrorRemote,\n label: 'Download with Relative Path',\n click: () => command$.next({ id: CommandID.MirrorRemote, uri: createURI(id, path) }),\n separator: true\n },\n {\n id: CommandID.TriggerCopy,\n label: 'Copy',\n click: () => command$.next({ id: CommandID.TriggerCopy }),\n },\n {\n id: CommandID.CopyURI,\n label: 'Copy URL',\n click: () => command$.next({ id: CommandID.CopyURI, uri: createURI(id, path) })\n },\n {\n id: CommandID.CopyPath,\n label: 'Copy Path',\n click: () => command$.next({ id: CommandID.CopyPath, uri: createURI(id, path) })\n },\n {\n id: CommandID.CopyRelativePath,\n label: 'Copy Relative Path',\n click: () => command$.next({ id: CommandID.CopyRelativePath, uri: createURI(id, path) })\n },\n {\n id: CommandID.CopyName,\n label: 'Copy Name',\n click: () => command$.next({ id: CommandID.CopyName, uri: createURI(id, path) })\n },\n {\n id: CommandID.CopyNameNoExt,\n label: 'Copy Name w/o Extension',\n click: () => command$.next({ id: CommandID.CopyNameNoExt, uri: createURI(id, path) }),\n separator: true\n },\n {\n id: 'vscode',\n label: \"Open in VS Code\",\n click: () => window.f5.open(createURI(id, path), 'code').then(createQueue)\n },\n {\n id: 'open',\n label: 'Open in Default App',\n click: () => { window.f5.open(createURI(id, path)).then(createQueue); },\n separator: true\n },\n {\n id: 'rename',\n label: 'Rename...',\n click: () => command$.next({ id: CommandID.Rename, uri: createURI(id, path) })\n },\n {\n id: CommandID.Duplicate,\n label: 'Duplicate',\n click: () => command$.next({ id: CommandID.Duplicate, uri: createURI(id, path) }),\n separator: true\n },\n {\n id: 'clear',\n label: 'Clear Contents',\n className: 'attention',\n click: () => command$.next({ id: CommandID.ClearContents, uri: createURI(id, path) })\n },\n {\n id: 'delete',\n label: 'Delete',\n className: 'attention',\n click: () => {\n error$.next({\n type: FailureType.ConfirmDeletion,\n files: ((selected.length && selected.includes(path)) ? selected : [path]).map(path => createURI(id, path))\n });\n },\n separator: true\n },\n {\n id: 'refresh',\n label: 'Refresh',\n click: () => command$.next({ id: CommandID.Refresh })\n }\n ];\n}\n","import { LocalFileSystemID, FailureType } from '../shared/types';\nimport { createURI, parseURI } from '../shared/utils/URI';\nimport { CommandID } from '../commands';\nimport { command$ } from '../observables/command';\nimport { error$ } from '../observables/error';\nexport default function (path, selected, copyTo, isRoot, isParent) {\n const { id, path: to } = parseURI(copyTo);\n return [\n ...(isParent ? [] : [\n {\n id: CommandID.Upload,\n label: id == LocalFileSystemID ? 'Copy' : 'Upload',\n click: () => command$.next({ id: CommandID.Upload, uri: createURI(LocalFileSystemID, path) }),\n separator: isRoot\n }\n ]),\n ...((isParent || isRoot) ? [] : [\n {\n id: CommandID.MirrorLocal,\n label: (id == LocalFileSystemID ? 'Copy' : 'Upload') + ' with Relative Path',\n click: () => command$.next({ id: CommandID.MirrorLocal, uri: createURI(LocalFileSystemID, path) }),\n separator: true\n },\n ]),\n ...(isParent ? [] : [\n {\n id: 'new-dir',\n label: 'New Folder...',\n click: () => command$.next({ id: CommandID.NewDir })\n },\n {\n id: 'new-file',\n label: 'New File...',\n click: () => command$.next({ id: CommandID.NewFile }),\n separator: true\n },\n ]),\n {\n id: CommandID.TriggerCopy,\n label: 'Copy',\n click: () => command$.next({ id: CommandID.TriggerCopy })\n },\n {\n id: CommandID.CopyPath,\n label: 'Copy Path',\n click: () => command$.next({ id: CommandID.CopyPath, uri: createURI(LocalFileSystemID, path) })\n },\n ...((isParent || isRoot) ? [] : [\n {\n id: CommandID.CopyRelativePath,\n label: 'Copy Relative Path',\n click: () => command$.next({ id: CommandID.CopyRelativePath, uri: createURI(LocalFileSystemID, path) })\n }\n ]),\n {\n id: CommandID.CopyName,\n label: 'Copy Name',\n click: () => command$.next({ id: CommandID.CopyName, uri: createURI(LocalFileSystemID, path) }),\n separator: true\n },\n {\n id: 'vscode',\n label: \"Open in VS Code\",\n click: () => window.f5.open(createURI(LocalFileSystemID, path), 'code')\n },\n {\n id: 'open',\n label: 'Show in Finder',\n click: () => { window.f5.open(createURI(LocalFileSystemID, path)); },\n separator: !isParent && !isRoot\n },\n ...((isParent || isRoot) ? [] : [\n {\n id: 'rename',\n label: 'Rename...',\n click: () => command$.next({ id: CommandID.Rename, uri: createURI(LocalFileSystemID, path) })\n },\n {\n id: CommandID.Duplicate,\n label: 'Duplicate',\n click: () => command$.next({ id: CommandID.Duplicate, uri: createURI(LocalFileSystemID, path) })\n },\n {\n id: 'delete',\n label: 'Delete',\n className: 'attention',\n click: () => {\n error$.next({\n type: FailureType.ConfirmDeletion,\n files: ((selected.length && selected.includes(path)) ? selected : [path]).map(path => createURI(LocalFileSystemID, path))\n });\n }\n }\n ])\n ];\n}\n","import { LocalFileSystemID, FailureType } from '../shared/types';\nimport { createURI } from '../shared/utils/URI';\nimport { CommandID } from '../commands';\nimport { command$ } from '../observables/command';\nimport { error$ } from '../observables/error';\nexport default function (id, path, selected, copyTo, isRoot, isParent) {\n return [\n ...(isParent ? [] : [\n {\n id: CommandID.Download,\n label: 'Download',\n click: () => command$.next({ id: CommandID.Download, uri: createURI(id, path) }),\n separator: isRoot\n }\n ]),\n ...((isParent || isRoot) ? [] : [\n {\n id: CommandID.MirrorRemote,\n label: 'Download with Relative Path',\n click: () => command$.next({ id: CommandID.MirrorRemote, uri: createURI(id, path) }),\n separator: true\n },\n ]),\n ...(isParent ? [] : [\n {\n id: 'new-dir',\n label: 'New Folder...',\n click: () => command$.next({ id: CommandID.NewDir })\n },\n {\n id: 'new-file',\n label: 'New File...',\n click: () => command$.next({ id: CommandID.NewFile }),\n separator: true\n }\n ]),\n {\n id: CommandID.TriggerCopy,\n label: 'Copy',\n click: () => command$.next({ id: CommandID.TriggerCopy }),\n },\n {\n id: CommandID.CopyURI,\n label: 'Copy URL',\n click: () => command$.next({ id: CommandID.CopyURI, uri: createURI(id, path) })\n },\n {\n id: CommandID.CopyPath,\n label: 'Copy Path',\n click: () => command$.next({ id: CommandID.CopyPath, uri: createURI(id, path) })\n },\n ...((isParent || isRoot) ? [] : [\n {\n id: CommandID.CopyRelativePath,\n label: 'Copy Relative Path',\n click: () => command$.next({ id: CommandID.CopyRelativePath, uri: createURI(LocalFileSystemID, path) })\n }\n ]),\n {\n id: CommandID.CopyName,\n label: 'Copy Name',\n click: () => command$.next({ id: CommandID.CopyName, uri: createURI(id, path) }),\n separator: !isParent\n },\n ...((isParent || isRoot) ? [] : [\n {\n id: 'rename',\n label: 'Rename...',\n click: () => command$.next({ id: CommandID.Rename, uri: createURI(id, path) })\n },\n {\n id: CommandID.Duplicate,\n label: 'Duplicate',\n click: () => command$.next({ id: CommandID.Duplicate, uri: createURI(id, path) })\n },\n {\n id: 'delete',\n label: 'Delete',\n className: 'attention',\n click: () => {\n error$.next({\n type: FailureType.ConfirmDeletion,\n files: ((selected.length && selected.includes(path)) ? selected : [path]).map(path => createURI(id, path))\n });\n },\n separator: true\n }\n ]),\n ...(isParent ? [] : [\n {\n id: 'refresh',\n label: 'Refresh',\n click: () => command$.next({ id: CommandID.Refresh })\n }\n ])\n ];\n}\n","import React, { useState } from \"react\";\nimport { Spinner, Button } from '../../ui/components';\nexport default function MissingDir({ path, onClose }) {\n const [creating, setCreating] = useState(false);\n const create = () => {\n setCreating(true);\n onClose(true);\n };\n return React.createElement(\"div\", { className: \"fill-center\" }, creating ?\n React.createElement(Spinner, { radius: \"2em\" }) :\n React.createElement(\"div\", { className: \"center\" },\n React.createElement(\"div\", { className: 'icon' }, \"folder_off\"),\n React.createElement(\"p\", null,\n \"Folder \",\n React.createElement(\"b\", null, path),\n \" doesn't exist.\"),\n React.createElement(\"p\", null, \"Do you want to\"),\n React.createElement(\"p\", null,\n React.createElement(Button, { onClick: () => create(), primary: true }, \"Create Folder\")),\n React.createElement(\"p\", null,\n React.createElement(\"span\", { className: 'link', onClick: () => onClose(false) }, \"turn off synchronized browsing\"))));\n}\n","import _curry3 from \"./internal/_curry3.js\";\n\n/**\n * Removes the sub-list of `list` starting at index `start` and containing\n * `count` elements. _Note that this is not destructive_: it returns a copy of\n * the list with the changes.\n * <small>No lists have been harmed in the application of this function.</small>\n *\n * @func\n * @memberOf R\n * @since v0.2.2\n * @category List\n * @sig Number -> Number -> [a] -> [a]\n * @param {Number} start The position to start removing elements\n * @param {Number} count The number of elements to remove\n * @param {Array} list The list to remove from\n * @return {Array} A new Array with `count` elements from `start` removed.\n * @see R.without\n * @example\n *\n * R.remove(2, 3, [1,2,3,4,5,6,7,8]); //=> [1,2,6,7,8]\n */\nvar remove = /*#__PURE__*/_curry3(function remove(start, count, list) {\n var result = Array.prototype.slice.call(list, 0);\n result.splice(start, count);\n return result;\n});\nexport default remove;","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../node_modules/less-loader/dist/cjs/index.js!./Path.less\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../node_modules/less-loader/dist/cjs/index.js!./Path.less\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useEffect, useState, Fragment } from \"react\";\nimport { segments } from '../../utils/path';\nimport styles from './Path.less';\nexport default function Path({ path, type }) {\n const [items, setItems] = useState([]);\n useEffect(() => setItems(segments(path)), [path]);\n return React.createElement(\"span\", { className: styles.root + ' path-breadcrumbs' },\n type != undefined && React.createElement(React.Fragment, null,\n React.createElement(\"i\", { className: \"icon\" }, type == 'local' ? 'computer' : 'cloud'),\n React.createElement(\"i\", null, \"\\u203A\")),\n items.map((item, i) => React.createElement(Fragment, { key: i },\n item,\n i < items.length - 1 && React.createElement(\"i\", null, \"\\u203A\"))));\n}\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../../node_modules/less-loader/dist/cjs/index.js!./Create.less\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../../node_modules/less-loader/dist/cjs/index.js!./Create.less\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useState } from \"react\";\nimport { Modal, ModalButtonID, Checkbox } from '../../../ui/components';\nimport Path from '../../../components/Path/Path';\nimport styles from './Create.less';\nexport default function Create({ localPath, remotePath, filter, onClose }) {\n const [recursive, setRecursive] = useState(true);\n const [del, setDel] = useState(true);\n const buttons = [\n {\n id: ModalButtonID.Cancel,\n label: 'Cancel'\n },\n {\n id: ModalButtonID.Ok,\n label: 'Start'\n }\n ];\n return React.createElement(Modal, { buttons: buttons, onClose: id => onClose(id == ModalButtonID.Ok ? { recursive, del } : undefined), options: { x: true } },\n React.createElement(\"div\", { className: 'modal-content' },\n React.createElement(\"header\", null, \"Set up synchronization\"),\n React.createElement(\"p\", null,\n \"Watch for changes in the local folder:\",\n React.createElement(\"em\", null,\n React.createElement(Path, { path: localPath, type: 'local' }))),\n React.createElement(\"p\", null,\n \"and synchronize them to the remote folder:\",\n React.createElement(\"em\", null,\n React.createElement(Path, { path: remotePath, type: 'remote' }))),\n React.createElement(\"p\", null,\n React.createElement(Checkbox, { onChange: setRecursive, value: recursive },\n React.createElement(\"span\", { className: styles.flag },\n React.createElement(\"i\", { className: \"icon\" }, \"folder_copy\"),\n React.createElement(\"span\", null,\n \"Include subfolders\",\n React.createElement(\"small\", null, \"Watch for changes in all folders within the chosen root folder\"))))),\n React.createElement(\"p\", null,\n React.createElement(Checkbox, { onChange: setDel, value: del },\n React.createElement(\"span\", { className: styles.flag },\n React.createElement(\"i\", { className: \"icon\" }, \"delete\"),\n React.createElement(\"span\", null,\n \"Delete remote files\",\n React.createElement(\"small\", null, \"Delete remote files when the corresponding local files are deleted\"))))),\n filter &&\n React.createElement(\"div\", { className: \"info\" }, \"Only files matching the current filter will be synced.\")));\n}\n","import { Subject } from 'rxjs';\nconst queues = new Set();\nexport function createQueue(id) {\n id && queues.add(id);\n}\nexport const events$ = new Subject();\nwindow.f5.onMirrorUpdate(e => events$.next(e));\n","\n import API from \"!../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../../node_modules/less-loader/dist/cjs/index.js!./List.less\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../../node_modules/less-loader/dist/cjs/index.js!./List.less\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useEffect, useState } from 'react';\nimport { MirrorEventType } from '../../../shared/types';\nimport { useSubscribe } from '../../../hooks';\nimport Path from '../../../components/Path/Path';\nimport { parseURI } from '../../../shared/utils/URI';\nimport { basename } from '../../../utils/path';\nimport { events$ } from '../events';\nimport styles from './List.less';\nexport default function List({ mirrors, onDelete }) {\n const [items, setItems] = useState([]);\n useEffect(() => setItems(mirrors.map(m => {\n const { path: remote } = parseURI(m.remote);\n const localName = basename(m.local);\n const remoteName = basename(remote);\n return {\n title: localName == remoteName ? localName : localName + ' ⇢ ' + remoteName,\n id: m.id,\n local: m.local,\n remote,\n recursive: m.recursive,\n del: m.del,\n filter: m.filter,\n syncing: false\n };\n })), [mirrors]);\n useSubscribe(() => events$.subscribe(event => {\n let item = items.find(({ id }) => id == event.id);\n if (item) {\n item.syncing = event.type == MirrorEventType.Syncing;\n setItems([...items]);\n }\n }), [items]);\n return React.createElement(\"ul\", { className: styles.list }, items.map(item => React.createElement(\"li\", { key: item.id },\n React.createElement(\"i\", { className: \"icon\" }, \"folder_eye\"),\n React.createElement(\"article\", null,\n React.createElement(\"h1\", null, item.title),\n React.createElement(\"div\", null,\n React.createElement(\"div\", null,\n React.createElement(Path, { path: item.local, type: 'local' }),\n React.createElement(Path, { path: item.remote, type: 'remote' }),\n React.createElement(\"b\", null,\n item.recursive\n && React.createElement(\"span\", null,\n React.createElement(\"i\", { className: \"icon\" }, \"folder_copy\"),\n \"Include subfolders\"),\n item.del &&\n React.createElement(\"span\", null,\n React.createElement(\"i\", { className: \"icon\" }, \"delete\"),\n \"Delete files\"),\n item.filter\n && React.createElement(\"span\", null,\n React.createElement(\"i\", { className: \"icon\", \"data-tooltip\": \"Filter\" }, \"filter_alt\"),\n React.createElement(\"span\", null,\n \"Filter\",\n React.createElement(\"span\", null,\n item.filter?.text.length > 0 &&\n React.createElement(\"em\", null,\n item.filter?.text,\n item.filter.matchCase &&\n React.createElement(\"i\", { className: 'icon' }, \"match_case\"),\n item.filter.wholeWord &&\n React.createElement(\"i\", { className: 'icon' }, \"match_word\"),\n item.filter.useRe &&\n React.createElement(\"i\", { className: 'icon' }, \"regular_expression\"),\n item.filter.folders &&\n React.createElement(\"i\", { className: 'icon' }, \"folder\"),\n item.filter.invert &&\n React.createElement(\"i\", { className: 'icon' }, \"block\")),\n (item.filter?.hidden || item.filter?.temporary) &&\n React.createElement(\"em\", null,\n React.createElement(\"i\", { className: 'icon' }, \"visibility_off\"),\n item.filter?.hidden && '.*',\n item.filter?.temporary && ' Tmp'),\n (item.filter?.uncommited || item.filter?.ignored) &&\n React.createElement(\"em\", null,\n React.createElement(\"i\", { className: 'icon' }, \"graph_1\"),\n item.filter?.uncommited && 'U',\n item.filter?.ignored &&\n React.createElement(\"i\", { className: 'icon' }, \"visibility_off\")))))),\n item.syncing == true\n ? React.createElement(\"mark\", { className: \"syncing\" },\n React.createElement(\"i\", { className: \"icon\" }, \"sync\"),\n \" Syncing...\")\n : React.createElement(\"mark\", { className: \"synced\" },\n React.createElement(\"i\", { className: \"icon\" }, \"check_circle\"),\n \" Synced\")),\n React.createElement(\"div\", null,\n React.createElement(\"button\", { className: \"icon\", onClick: () => onDelete(item.id) }, \"delete\")))))));\n}\n","import React, { useState, useEffect, useRef } from \"react\";\nimport { basename, dirname } from '../../utils/path';\nimport { createURI } from '../../shared/utils/URI';\nimport { LocalFileSystemID, MirrorEventType } from '../../shared/types';\nimport { command$ } from '../../observables/command';\nimport { CommandID } from '../../commands';\nimport { useEffectOnUpdate, useSubscribe } from '../../hooks';\nimport { remove } from 'ramda';\nimport MissingDir from './MissingDir';\nimport { Spinner, Split } from '../../ui/components';\nimport CreateMirrorSync from '../../plugins/mirror/Create/Create';\nimport MirrorsList from '../../plugins/mirror/List/List';\nimport { events$ } from '../../plugins/mirror/events';\nexport default function LocalPane({ localPath, remotePath, connection, onSettingsChange, sid, missingTarget, setMissingTarget, tryDir, setSync, filter, children }) {\n const [showCreateMirrorSync, setShowCreateMirrorSync] = useState(false);\n const [mirrors, setMirrors] = useState([]);\n const mirrorsChanged = useRef(false);\n useSubscribe(() => command$.subscribe(cmd => {\n switch (cmd.id) {\n case CommandID.MirrorSync:\n setShowCreateMirrorSync(true);\n break;\n }\n }), [localPath, remotePath]);\n useEffect(() => {\n setMirrors([]);\n }, [connection?.id]);\n useSubscribe(() => events$\n .subscribe(event => {\n if (event.type == MirrorEventType.Create\n && event.sid == sid) {\n setMirrors(mirrors => [\n ...mirrors,\n {\n id: event.id,\n local: event.setting.local,\n remote: event.setting.remote,\n recursive: event.setting.recursive,\n del: event.setting.del,\n filter: event.setting.filter\n }\n ]);\n }\n }), [sid]);\n useEffectOnUpdate(() => {\n if (mirrorsChanged.current == true) {\n mirrorsChanged.current = false;\n if (sid && connection?.file) {\n onSettingsChange(mirrors);\n }\n }\n }, [mirrors]);\n const createMirror = (conf) => {\n if (!connection?.id || !sid) {\n return;\n }\n const remote = createURI(connection.id, remotePath);\n window.f5.mirror(localPath, remote, sid, conf.recursive, conf.del, (filter\n && (filter.text.trim().length > 0\n || filter.hidden === true\n || filter.temporary === true\n || filter.uncommited === true\n || filter.ignored === true)) ? filter : undefined);\n mirrorsChanged.current = true;\n };\n const onMirrorDelete = (id) => {\n const i = mirrors.findIndex(m => m.id == id);\n if (i >= 0) {\n setMirrors(remove(i, 1, mirrors));\n window.f5.unmirror(id);\n mirrorsChanged.current = true;\n }\n };\n const inner = connection?.id && mirrors.length\n ? React.createElement(Split, { vertical: true, initial: 80, left: children, right: React.createElement(MirrorsList, { mirrors: mirrors, onDelete: onMirrorDelete }) })\n : children;\n return localPath\n ? (missingTarget == 'local'\n ? React.createElement(MissingDir, { path: localPath, onClose: async (create) => {\n if (create) {\n await window.f5.mkdir(basename(tryDir), createURI(LocalFileSystemID, dirname(tryDir)));\n setMissingTarget(undefined);\n }\n else {\n setMissingTarget(undefined);\n setSync(false);\n }\n } })\n : React.createElement(React.Fragment, null,\n inner,\n showCreateMirrorSync &&\n React.createElement(CreateMirrorSync, { localPath: localPath, remotePath: remotePath, filter: filter, onClose: conf => {\n setShowCreateMirrorSync(false);\n conf && createMirror(conf);\n } })))\n : React.createElement(\"div\", { className: \"fill-center\" },\n React.createElement(Spinner, { radius: \"2em\" }));\n}\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../node_modules/less-loader/dist/cjs/index.js!./Workspace.less\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../node_modules/less-loader/dist/cjs/index.js!./Workspace.less\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useState, useEffect, useContext, useRef } from \"react\";\nimport { Split } from '../../ui/components';\nimport Explorer from '../Explorer/Explorer';\nimport Connections from '../Connections/Connections';\nimport { LocalFileSystemID, FailureType } from '../../shared/types';\nimport { createURI, parseURI } from '../../shared/utils/URI';\nimport { AppSettingsContext } from '../../context/config';\nimport { Spinner, Button, Tooltips } from '../../ui/components';\nimport localFileMenu from '../../menu/localFile';\nimport remoteFileMenu from '../../menu/remoteFile';\nimport localDirMenu from '../../menu/localDir';\nimport remoteDirMenu from '../../menu/remoteDir';\nimport { useEffectOnUpdate, useCustomCompareEffect, useSubscribe, useConcatAsyncEffect } from '../../hooks';\nimport { command$ } from '../../observables/command';\nimport { CommandID } from '../../commands';\nimport { error$ } from '../../observables/error';\nimport { basename, dirname, join } from '../../utils/path';\nimport { equals } from 'ramda';\nimport classNames from 'classnames';\nimport MissingDir from './MissingDir';\nimport LocalPane from './LocalPane';\nimport styles from './Workspace.less';\nimport { createQueue } from '../../observables/queue';\nexport default function Workspace({ onChange, onSettingsChange }) {\n const appSettings = useContext(AppSettingsContext);\n const [connection, setConnection] = useState();\n const [localPath, setLocalPath] = useState(appSettings.path?.local ?? appSettings.home);\n const [remotePath, setRemotePath] = useState(appSettings.connections);\n const [localSelected, setLocalSelected] = useState([]);\n const [remoteSelected, setRemoteSelected] = useState([]);\n const [showConnections, setShowConnections] = useState(true);\n const [menu, setMenu] = useState([]);\n const [connecting, setConnecting] = useState('');\n const abortConnecting = useRef(undefined);\n const [sid, setSid] = useState();\n const [sync, setSync] = useState(false);\n const [syncRootLocal, setSyncRootLocal] = useState();\n const [syncRootRemote, setSyncRootRemote] = useState();\n const [tryDir, setTryDir] = useState('');\n const [missingTarget, setMissingTarget] = useState();\n const focused = useRef(null);\n useEffect(() => onChange(connection?.id, connection?.name, localPath, remotePath), [connection?.id, connection, localPath, remotePath]);\n useEffect(() => {\n sessionStorage.removeItem('Connecting');\n const u = new URL(window.location.toString());\n if (u.searchParams.has('connect') && !connecting) {\n connect(u.searchParams.get('connect'));\n }\n }, []);\n useCustomCompareEffect(() => {\n if (connection) {\n const onWindowClose = () => disconnect();\n window.addEventListener('beforeunload', onWindowClose);\n return () => window.removeEventListener('beforeunload', onWindowClose);\n }\n }, [connection], equals);\n useConcatAsyncEffect(async () => {\n if (connection) {\n await window.f5.save(connection.file, {\n ...connection,\n path: {\n local: localPath,\n remote: showConnections ? connection.path.remote : remotePath\n }\n });\n }\n }, [connection, remotePath, localPath]);\n useEffectOnUpdate(() => {\n if (!connection) {\n onSettingsChange({\n path: {\n local: localPath,\n remote: showConnections ? (appSettings.path?.remote ?? appSettings.home) : remotePath\n }\n });\n }\n }, [remotePath, localPath]);\n const openLocal = (path) => {\n command$.next({ id: CommandID.Upload, uri: createURI(LocalFileSystemID, path) });\n };\n const openRemote = (path) => {\n command$.next({ id: CommandID.Download, uri: createURI(connection?.id ?? LocalFileSystemID, path) });\n };\n const connect = (path) => {\n disconnect();\n setConnecting(basename(path));\n sessionStorage.setItem('Connecting', path);\n abortConnecting.current = new AbortController();\n window.f5.connect(path, abortConnecting.current.signal)\n .then(connection => {\n if (connection) {\n setShowConnections(false);\n const { id, settings } = connection;\n setConnection({ ...settings, id, file: path });\n setSid(connection.sid);\n setLocalPath(path => settings.path.local ?? path);\n setRemotePath(settings.path.remote);\n const u = new URL(window.location.toString());\n u.searchParams.set('connect', path);\n history.replaceState(null, '', u.toString());\n }\n })\n .catch(e => { })\n .finally(() => {\n setConnecting('');\n sessionStorage.removeItem('Connecting');\n });\n };\n useEffect(() => {\n document.documentElement.setAttribute('data-theme', connection ? connection.theme : appSettings.theme);\n const syncDirs = connection ? connection.sync : appSettings.sync;\n setSyncRootLocal(syncDirs?.local ?? undefined);\n setSyncRootRemote(syncDirs?.remote ?? undefined);\n setSync(!!syncDirs);\n }, [appSettings, connection]);\n const disconnect = () => {\n setSync(false);\n if (!connection) {\n return;\n }\n window.f5.disconnect(connection.id, sid);\n setSid(undefined);\n abortConnecting.current = undefined;\n setConnection(undefined);\n setLocalPath(appSettings.path?.local ?? appSettings.home);\n setRemotePath(appSettings.connections);\n const u = new URL(window.location.toString());\n u.searchParams.delete('connect');\n history.replaceState(null, '', u.toString());\n setShowConnections(true);\n };\n const cancel = () => {\n if (connection) {\n return;\n }\n abortConnecting.current?.abort();\n abortConnecting.current = undefined;\n const u = new URL(window.location.toString());\n u.searchParams.delete('connect');\n history.replaceState(null, '', u.toString());\n setConnecting('');\n };\n const toolbar = [\n {\n id: CommandID.NewDir,\n icon: 'create_new_folder',\n title: 'New Folder...',\n onClick: () => command$.next({ id: CommandID.NewDir })\n },\n {\n id: CommandID.NewFile,\n icon: 'note_add',\n title: 'New File...',\n onClick: () => command$.next({ id: CommandID.NewFile })\n },\n {\n id: CommandID.ShowFilter,\n icon: 'filter_alt',\n title: 'Toggle Filter...',\n onClick: () => command$.next({ id: CommandID.ShowFilter })\n },\n {\n id: CommandID.SelectAll,\n icon: 'select_all',\n title: 'Select All',\n onClick: () => command$.next({ id: CommandID.SelectAll })\n },\n {\n id: CommandID.SelectAllFiles,\n icon: 'select',\n title: 'Select Only Files',\n onClick: () => command$.next({ id: CommandID.SelectAllFiles })\n },\n {\n id: CommandID.CollapseAll,\n icon: 'unfold_less',\n title: 'Collapse All Folders',\n onClick: () => command$.next({ id: CommandID.CollapseAll })\n }\n ];\n const localToolbar = [\n ...(connection\n ? [\n {\n id: CommandID.MirrorSync,\n icon: 'folder_eye',\n title: 'Watch local and keep remote up to date',\n disabled: false,\n delimiter: true,\n onClick: () => command$.next({ id: CommandID.MirrorSync })\n }\n ]\n : []),\n ...toolbar,\n {\n id: CommandID.Delete,\n icon: 'delete',\n title: 'Delete Selected',\n disabled: !localSelected.length,\n onClick: () => command$.next({ id: CommandID.Delete })\n }\n ];\n const remoteToolbar = [\n ...toolbar,\n {\n id: CommandID.Delete,\n icon: 'delete',\n title: 'Delete',\n disabled: !remoteSelected.length,\n delimiter: !!connection,\n onClick: () => command$.next({ id: CommandID.Delete })\n },\n ...(connection ? [\n {\n id: 'disconnect',\n icon: 'close',\n title: 'Disconnect',\n disabled: false,\n onClick: () => disconnect()\n }\n ] : [])\n ];\n const connectionsToolbar = [\n {\n id: 'connect',\n icon: 'power_settings_new',\n title: 'Connect <code>Double-click on File</code>',\n label: 'Connect',\n disabled: remoteSelected.length != 1,\n onClick: () => connect(remoteSelected[0])\n },\n {\n id: CommandID.NewFile,\n icon: 'add',\n title: 'New Connection...',\n label: 'New',\n delimiter: true,\n onClick: () => command$.next({ id: CommandID.NewFile })\n },\n {\n id: CommandID.NewDir,\n icon: 'create_new_folder',\n title: 'New Folder...',\n onClick: () => command$.next({ id: CommandID.NewDir })\n },\n {\n id: CommandID.ShowFilter,\n icon: 'filter_alt',\n title: 'Toggle Filter...',\n onClick: () => command$.next({ id: CommandID.ShowFilter })\n },\n {\n id: CommandID.SelectAll,\n icon: 'select_all',\n title: 'Select All',\n onClick: () => command$.next({ id: CommandID.SelectAll })\n },\n {\n id: CommandID.SelectAllFiles,\n icon: 'select',\n title: 'Select Only Files',\n onClick: () => command$.next({ id: CommandID.SelectAllFiles })\n },\n {\n id: CommandID.CollapseAll,\n icon: 'unfold_less',\n title: 'Collapse All Folders',\n delimiter: true,\n onClick: () => command$.next({ id: CommandID.CollapseAll })\n },\n {\n id: 'Close',\n icon: 'close',\n title: 'Close Connections',\n disabled: false,\n onClick: () => setShowConnections(false)\n }\n ];\n const fileContextMenu = (remote = true) => (file, dir) => {\n const { id, path } = parseURI(file);\n if (id == LocalFileSystemID) {\n const copyTo = remote\n ? createURI(LocalFileSystemID, localPath)\n : createURI(connection?.id ?? LocalFileSystemID, remotePath);\n setMenu(dir ?\n localDirMenu(path, remote ? remoteSelected : localSelected, copyTo, path == (remote ? remotePath : localPath), remote ? (path.length < remotePath.length) : (path.length < localPath.length)) :\n localFileMenu(path, remote ? remoteSelected : localSelected, copyTo));\n }\n else {\n setMenu(dir\n ? remoteDirMenu(id, path, remoteSelected, localPath, path == remotePath, path.length < remotePath.length)\n : remoteFileMenu(id, path, remoteSelected, localPath));\n }\n };\n useSubscribe(() => command$.subscribe(cmd => {\n switch (cmd.id) {\n case CommandID.Connections: {\n setShowConnections(true);\n break;\n }\n case CommandID.Upload:\n case CommandID.MirrorLocal: {\n let files = localSelected;\n if (cmd.uri) {\n const { path } = parseURI(cmd.uri);\n files = localSelected.includes(path) ? localSelected : [path];\n }\n if (files.length) {\n window.f5.copy(files.map(path => createURI(LocalFileSystemID, path)), connection?.id\n ? createURI(connection.id, remotePath)\n : createURI(LocalFileSystemID, remotePath), false, (connection ?? appSettings).local.filter, cmd.id == CommandID.MirrorLocal ? localPath : undefined, sid).then(createQueue);\n }\n break;\n }\n case CommandID.Download:\n case CommandID.MirrorRemote: {\n let files = remoteSelected;\n if (cmd.uri) {\n const { path } = parseURI(cmd.uri);\n files = remoteSelected.includes(path) ? remoteSelected : [path];\n }\n if (files.length) {\n window.f5.copy(files.map(path => createURI(showConnections ? LocalFileSystemID : connection?.id ?? LocalFileSystemID, path)), createURI(LocalFileSystemID, localPath), false, showConnections ? undefined : (connection ?? appSettings).remote.filter, cmd.id == CommandID.MirrorRemote ? remotePath : undefined, sid).then(createQueue);\n }\n break;\n }\n case CommandID.SyncBrowsing:\n setSync(sync => !sync);\n break;\n }\n }), [appSettings, connection, localSelected, remoteSelected]);\n useSubscribe(() => error$.subscribe(error => {\n if (error.type == FailureType.MissingDir) {\n const { id, path } = parseURI(error.uri);\n if (tryDir === path) {\n setMissingTarget(path == localPath ? 'local' : 'remote');\n return;\n }\n if (id == LocalFileSystemID) {\n if (path == localPath) {\n setLocalPath(dirname(localPath));\n }\n if (!connection && path == remotePath) {\n setRemotePath(dirname(remotePath));\n }\n }\n else if (id == connection?.id && path == remotePath) {\n setRemotePath(dirname(remotePath));\n }\n }\n }), [connection, localPath, remotePath, tryDir]);\n useEffectOnUpdate(() => {\n setSync(false);\n showConnections ?\n setRemotePath(appSettings.connections) :\n setRemotePath(connection\n ? (connection.path?.remote ?? connection.pwd)\n : (appSettings.path?.remote ?? appSettings.home));\n }, [showConnections]);\n useEffectOnUpdate(() => {\n const localRoot = sync ? (syncRootLocal ?? localPath) : undefined;\n setSyncRootLocal(localRoot);\n const remoteRoot = sync ? (syncRootRemote ?? remotePath) : undefined;\n setSyncRootRemote(remoteRoot);\n if (!sync) {\n setTryDir('');\n setMissingTarget(undefined);\n }\n connection\n ? setConnection(c => ({\n ...c,\n sync: sync ? { local: localRoot, remote: remoteRoot } : null\n }))\n : onSettingsChange({ sync: sync ? { local: localRoot, remote: remoteRoot } : null });\n }, [sync]);\n const syncDir = (root, dir, targetRoot, setF) => {\n if (!sync) {\n return;\n }\n const path = join(targetRoot, dir.substring(root.length));\n setMissingTarget(undefined);\n setTryDir(path);\n setF(path);\n };\n useEffectOnUpdate(() => {\n if (syncRootLocal && localPath.length < syncRootLocal.length) {\n setSync(false);\n }\n else if (localPath != tryDir) {\n syncDir(syncRootLocal, localPath, syncRootRemote, setRemotePath);\n }\n }, [localPath]);\n useEffectOnUpdate(() => {\n if (syncRootRemote && remotePath.length < syncRootRemote.length) {\n setSync(false);\n }\n else if (remotePath != tryDir) {\n syncDir(syncRootRemote, remotePath, syncRootLocal, setLocalPath);\n }\n }, [remotePath]);\n return (React.createElement(React.Fragment, null,\n React.createElement(Split, { className: classNames({ sync }), left: React.createElement(LocalPane, { localPath: localPath, remotePath: remotePath, connection: connection, onSettingsChange: mirrors => setConnection(c => ({ ...c, mirrors })), sid: sid, missingTarget: missingTarget, setMissingTarget: setMissingTarget, tryDir: tryDir, filter: (connection ?? appSettings).local?.filter, setSync: setSync },\n React.createElement(Explorer, { icon: 'computer', connection: LocalFileSystemID, settings: (connection ?? appSettings).local, path: localPath, fixedRoot: syncRootLocal ?? '/', onChange: setLocalPath, onSelect: paths => setLocalSelected(paths), onOpen: openLocal, onMenu: fileContextMenu(false), onSettingsChange: changes => connection\n ? setConnection(c => ({ ...c, local: { ...c.local, ...changes } }))\n : onSettingsChange({ local: changes }), contextMenu: menu, toolbar: localToolbar, tabindex: 1, onFocus: () => focused.current = 'local', onBlur: () => focused.current = null })), right: connecting.length ?\n React.createElement(\"div\", { className: \"fill-center\" },\n React.createElement(\"div\", { className: \"center\" },\n React.createElement(Spinner, { radius: \"2em\" }),\n React.createElement(\"p\", null,\n \"Connecting \",\n connecting,\n \"...\"),\n React.createElement(Button, { onClick: () => cancel() }, \"Cancel\"))) : (missingTarget == 'remote' ?\n React.createElement(MissingDir, { path: remotePath, onClose: async (create) => {\n if (create) {\n await window.f5.mkdir(tryDir.substring(syncRootRemote.length), createURI(connection?.id ?? LocalFileSystemID, syncRootRemote));\n setMissingTarget(undefined);\n }\n else {\n setMissingTarget(undefined);\n setSync(false);\n }\n } }) : (showConnections ?\n React.createElement(Connections, { path: remotePath, onChange: setRemotePath, onSelect: paths => setRemoteSelected(paths), connect: connect, toolbar: connectionsToolbar, tabindex: 2, onFocus: () => focused.current = 'remote', onBlur: () => focused.current = null }) :\n connection ?\n React.createElement(Explorer, { icon: 'cloud', connection: connection.id, connectionName: basename(connection.file), homeDir: connection.pwd, sid: sid, settings: connection.remote, path: remotePath, fixedRoot: syncRootRemote ?? '/', onChange: setRemotePath, onSelect: paths => setRemoteSelected(paths), onOpen: openRemote, onMenu: fileContextMenu(), onSettingsChange: changes => setConnection(c => c\n ? ({ ...c, remote: { ...c.remote, ...changes } })\n : c), contextMenu: menu, toolbar: remoteToolbar, tabindex: 2, onFocus: () => focused.current = 'remote', onBlur: () => focused.current = null }) :\n React.createElement(Explorer, { icon: 'computer', connection: LocalFileSystemID, settings: appSettings.remote, path: remotePath, fixedRoot: syncRootRemote ?? '/', onChange: setRemotePath, onSelect: paths => setRemoteSelected(paths), onOpen: openRemote, onMenu: fileContextMenu(), onSettingsChange: changes => onSettingsChange({ remote: changes }), contextMenu: menu, toolbar: remoteToolbar, tabindex: 2, onFocus: () => focused.current = 'remote', onBlur: () => focused.current = null }))) },\n React.createElement(Tooltips, { shortcuts: appSettings.keybindings },\n React.createElement(\"button\", { className: classNames(styles.synctoggle, 'icon', { on: sync }), onClick: () => command$.next({ id: CommandID.SyncBrowsing }), \"data-tooltip\": `Synchronized Browsing is ${sync ? 'On' : 'Off'}`, \"data-command\": CommandID.SyncBrowsing }, sync ? 'sync_lock' : 'sync'),\n React.createElement(\"div\", { className: styles.transfertoolbar },\n React.createElement(\"button\", { className: \"icon\", \"data-command\": CommandID.Upload, \"data-tooltip\": connection ? 'Upload' : 'Copy', disabled: !localSelected.length, onClick: () => command$.next({ id: CommandID.Upload }) }, \"arrow_shape_up\"),\n React.createElement(\"button\", { className: \"icon\", \"data-command\": CommandID.MirrorLocal, \"data-tooltip\": (connection ? 'Upload' : 'Copy') + ' with Relative Path', disabled: !localSelected.length, onClick: () => command$.next({ id: CommandID.MirrorLocal }) }, \"arrow_shape_up_stack\"),\n React.createElement(\"button\", { className: \"icon\", \"data-command\": CommandID.Download, \"data-tooltip\": connection ? 'Download' : 'Copy', disabled: !remoteSelected.length, onClick: () => command$.next({ id: CommandID.Download }) }, \"arrow_shape_up\"),\n React.createElement(\"button\", { className: \"icon\", \"data-command\": CommandID.MirrorRemote, \"data-tooltip\": (connection ? 'Download' : 'Copy') + ' with Relative Path', disabled: !remoteSelected.length, onClick: () => command$.next({ id: CommandID.MirrorRemote }) }, \"arrow_shape_up_stack\"))))));\n}\n","import { useEffect, useRef } from 'react';\nexport const useConcatAsyncEffect = (callback, deps) => {\n const defer = useRef(Promise.resolve(true));\n const f = () => {\n const p = defer.current;\n defer.current = new Promise((resolve) => {\n p.then(() => {\n callback().then(() => resolve(true));\n });\n });\n };\n useEffect(f, deps);\n};\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../node_modules/less-loader/dist/cjs/index.js!./App.less\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../node_modules/less-loader/dist/cjs/index.js!./App.less\";\n export default content && content.locals ? content.locals : undefined;\n","export default function _quote(s) {\n var escaped = s.replace(/\\\\/g, '\\\\\\\\').replace(/[\\b]/g, '\\\\b') // \\b matches word boundary; [\\b] matches backspace\n .replace(/\\f/g, '\\\\f').replace(/\\n/g, '\\\\n').replace(/\\r/g, '\\\\r').replace(/\\t/g, '\\\\t').replace(/\\v/g, '\\\\v').replace(/\\0/g, '\\\\0');\n return '\"' + escaped.replace(/\"/g, '\\\\\"') + '\"';\n}","/**\n * Polyfill from <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString>.\n */\nvar pad = function pad(n) {\n return (n < 10 ? '0' : '') + n;\n};\nvar _toISOString = typeof Date.prototype.toISOString === 'function' ? function _toISOString(d) {\n return d.toISOString();\n} : function _toISOString(d) {\n return d.getUTCFullYear() + '-' + pad(d.getUTCMonth() + 1) + '-' + pad(d.getUTCDate()) + 'T' + pad(d.getUTCHours()) + ':' + pad(d.getUTCMinutes()) + ':' + pad(d.getUTCSeconds()) + '.' + (d.getUTCMilliseconds() / 1000).toFixed(3).slice(2, 5) + 'Z';\n};\nexport default _toISOString;","import _includes from \"./_includes.js\";\nimport _map from \"./_map.js\";\nimport _quote from \"./_quote.js\";\nimport _toISOString from \"./_toISOString.js\";\nimport keys from \"../keys.js\";\nimport reject from \"../reject.js\";\nexport default function _toString(x, seen) {\n var recur = function recur(y) {\n var xs = seen.concat([x]);\n return _includes(y, xs) ? '<Circular>' : _toString(y, xs);\n };\n\n // mapPairs :: (Object, [String]) -> [String]\n var mapPairs = function (obj, keys) {\n return _map(function (k) {\n return _quote(k) + ': ' + recur(obj[k]);\n }, keys.slice().sort());\n };\n switch (Object.prototype.toString.call(x)) {\n case '[object Arguments]':\n return '(function() { return arguments; }(' + _map(recur, x).join(', ') + '))';\n case '[object Array]':\n return '[' + _map(recur, x).concat(mapPairs(x, reject(function (k) {\n return /^\\d+$/.test(k);\n }, keys(x)))).join(', ') + ']';\n case '[object Boolean]':\n return typeof x === 'object' ? 'new Boolean(' + recur(x.valueOf()) + ')' : x.toString();\n case '[object Date]':\n return 'new Date(' + (isNaN(x.valueOf()) ? recur(NaN) : _quote(_toISOString(x))) + ')';\n case '[object Map]':\n return 'new Map(' + recur(Array.from(x)) + ')';\n case '[object Null]':\n return 'null';\n case '[object Number]':\n return typeof x === 'object' ? 'new Number(' + recur(x.valueOf()) + ')' : 1 / x === -Infinity ? '-0' : x.toString(10);\n case '[object Set]':\n return 'new Set(' + recur(Array.from(x).sort()) + ')';\n case '[object String]':\n return typeof x === 'object' ? 'new String(' + recur(x.valueOf()) + ')' : _quote(x);\n case '[object Undefined]':\n return 'undefined';\n default:\n if (typeof x.toString === 'function') {\n var repr = x.toString();\n if (repr !== '[object Object]') {\n return repr;\n }\n }\n return '{' + mapPairs(x, keys(x)).join(', ') + '}';\n }\n}","import _curry1 from \"./internal/_curry1.js\";\nimport _toString from \"./internal/_toString.js\";\n\n/**\n * Returns the string representation of the given value. `eval`'ing the output\n * should result in a value equivalent to the input value. Many of the built-in\n * `toString` methods do not satisfy this requirement.\n *\n * If the given value is an `[object Object]` with a `toString` method other\n * than `Object.prototype.toString`, this method is invoked with no arguments\n * to produce the return value. This means user-defined constructor functions\n * can provide a suitable `toString` method. For example:\n *\n * function Point(x, y) {\n * this.x = x;\n * this.y = y;\n * }\n *\n * Point.prototype.toString = function() {\n * return 'new Point(' + this.x + ', ' + this.y + ')';\n * };\n *\n * R.toString(new Point(1, 2)); //=> 'new Point(1, 2)'\n *\n * @func\n * @memberOf R\n * @since v0.14.0\n * @category String\n * @sig * -> String\n * @param {*} val\n * @return {String}\n * @example\n *\n * R.toString(42); //=> '42'\n * R.toString('abc'); //=> '\"abc\"'\n * R.toString([1, 2, 3]); //=> '[1, 2, 3]'\n * R.toString({foo: 1, bar: 2, baz: 3}); //=> '{\"bar\": 2, \"baz\": 3, \"foo\": 1}'\n * R.toString(new Date('2001-02-03T04:05:06Z')); //=> 'new Date(\"2001-02-03T04:05:06.000Z\")'\n */\nvar toString = /*#__PURE__*/_curry1(function toString(val) {\n return _toString(val, []);\n});\nexport default toString;","import _curry2 from \"./internal/_curry2.js\";\nimport _isFunction from \"./internal/_isFunction.js\";\nimport curryN from \"./curryN.js\";\nimport toString from \"./toString.js\";\n\n/**\n * Given an `arity` (Number) and a `name` (String) the `invoker` function\n * returns a curried function that takes `arity` arguments and a `context`\n * object. It will \"invoke\" the `name`'d function (a method) on the `context`\n * object.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig Number -> String -> (a -> b -> ... -> n -> Object -> *)\n * @param {Number} arity Number of arguments the returned function should take\n * before the target object.\n * @param {String} method Name of any of the target object's methods to call.\n * @return {Function} A new curried function.\n * @see R.construct\n * @example\n * // A function with no arguments\n * const asJson = invoker(0, \"json\")\n * // Just like calling .then((response) => response.json())\n * fetch(\"http://example.com/index.json\").then(asJson)\n *\n * // A function with one argument\n * const sliceFrom = invoker(1, 'slice');\n * sliceFrom(6, 'abcdefghijklm'); //=> 'ghijklm'\n *\n * // A function with two arguments\n * const sliceFrom6 = invoker(2, 'slice')(6);\n * sliceFrom6(8, 'abcdefghijklm'); //=> 'gh'\n *\n * // NOTE: You can't simply pass some of the arguments to the initial invoker function.\n * const firstCreditCardSection = invoker(2, \"slice\", 0, 4)\n * firstCreditCardSection(\"4242 4242 4242 4242\") // => Function<...>\n *\n * // Since invoker returns a curried function, you may partially apply it to create the function you need.\n * const firstCreditCardSection = invoker(2, \"slice\")(0, 4)\n * firstCreditCardSection(\"4242 4242 4242 4242\") // => \"4242\"\n *\n * @symb R.invoker(0, 'method')(o) = o['method']()\n * @symb R.invoker(1, 'method')(a, o) = o['method'](a)\n * @symb R.invoker(2, 'method')(a, b, o) = o['method'](a, b)\n */\nvar invoker = /*#__PURE__*/_curry2(function invoker(arity, method) {\n return curryN(arity + 1, function () {\n var target = arguments[arity];\n if (target != null && _isFunction(target[method])) {\n return target[method].apply(target, Array.prototype.slice.call(arguments, 0, arity));\n }\n throw new TypeError(toString(target) + ' does not have a method named \"' + method + '\"');\n });\n});\nexport default invoker;","export default function _isFunction(x) {\n var type = Object.prototype.toString.call(x);\n return type === '[object Function]' || type === '[object AsyncFunction]' || type === '[object GeneratorFunction]' || type === '[object AsyncGeneratorFunction]';\n}","import invoker from \"./invoker.js\";\n\n/**\n * Splits a string into an array of strings based on the given\n * separator.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category String\n * @sig (String | RegExp) -> String -> [String]\n * @param {String|RegExp} sep The pattern.\n * @param {String} str The string to separate into an array.\n * @return {Array} The array of strings from `str` separated by `sep`.\n * @see R.join\n * @example\n *\n * const pathComponents = R.split('/');\n * R.tail(pathComponents('/usr/local/bin/node')); //=> ['usr', 'local', 'bin', 'node']\n *\n * R.split('.', 'a.b.c.xyz.d'); //=> ['a', 'b', 'c', 'xyz', 'd']\n */\nvar split = /*#__PURE__*/invoker(1, 'split');\nexport default split;","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../node_modules/less-loader/dist/cjs/index.js!./Queue.less\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../node_modules/less-loader/dist/cjs/index.js!./Queue.less\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useState, useMemo } from \"react\";\nimport { useSubscribe } from '../../hooks';\nimport { queue$ } from '../../observables/queue';\nimport { filter } from 'rxjs/operators';\nimport { whereEq, last, pipe, split } from 'ramda';\nimport { QueueEventType, QueueType } from '../../shared/types';\nimport { Progress, CircleProgress, Tooltips } from '../../ui/components';\nimport styles from './Queue.less';\nimport { t } from 'i18next';\nconst captions = {\n [QueueType.Copy]: { msg: 'copying', icon: 'file_copy' },\n [QueueType.Move]: { msg: 'moving', icon: 'file_copy' },\n [QueueType.Download]: { msg: 'downloading', icon: 'download' },\n [QueueType.Upload]: { msg: 'uploading', icon: 'upload' },\n [QueueType.Remove]: { msg: 'deleting', icon: 'delete' }\n};\nexport default function ({ id, type, connection, active }) {\n const [count, setCount] = useState(0);\n const [total, setTotal] = useState(1);\n const [done, setDone] = useState(0);\n useSubscribe(() => queue$\n .pipe(filter(whereEq({ id })))\n .subscribe(({ event }) => {\n if (event.type == QueueEventType.Update) {\n const { totalCnt, doneCnt, totalSize, doneSize } = event.state;\n setCount(totalCnt - doneCnt);\n setTotal(type == QueueType.Remove || QueueType.Move ? totalCnt : totalSize);\n setDone(type == QueueType.Remove || QueueType.Move ? doneCnt : doneSize);\n }\n }), [id]);\n const msg = useMemo(() => {\n const c = localStorage.getItem(connection);\n const conn = c\n ? pipe(split('/'), last)(c)\n : connection;\n return t(captions[type].msg, { count, conn });\n }, [count]);\n return React.createElement(\"div\", { className: active ? styles.active : styles.inactive }, active ?\n React.createElement(React.Fragment, null,\n React.createElement(\"span\", { dangerouslySetInnerHTML: { __html: msg } }),\n React.createElement(\"div\", { className: styles.progress },\n React.createElement(Progress, { percent: Math.round(done / total * 100) }),\n React.createElement(Tooltips, null,\n React.createElement(\"span\", { className: \"icon\", onClick: () => window.f5.stop(id), \"data-tooltip\": \"Stop\" }, \"stop_circle\")))) :\n React.createElement(CircleProgress, { percent: Math.round(done / total * 100) },\n React.createElement(\"i\", { className: 'icon' }, captions[type].icon)));\n}\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../node_modules/less-loader/dist/cjs/index.js!./QueueAction.less\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../node_modules/less-loader/dist/cjs/index.js!./QueueAction.less\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useState, useEffect, useContext } from \"react\";\nimport { queue$ } from '../../observables/queue';\nimport { useSubscribe } from '../../hooks';\nimport { QueueEventType, QueueActionType, QueueType } from '../../shared/types';\nimport { Modal, Checkbox } from '../../ui/components';\nimport { dirname, basename } from '../../utils/path';\nimport Path from '../Path/Path';\nimport styles from './QueueAction.less';\nimport { AppSettingsContext } from '../../context/config';\nimport numeral from 'numeral';\nimport { format } from 'date-fns';\nexport default function QueueAction() {\n const appSettings = useContext(AppSettingsContext);\n const [conflict, setConflict] = useState();\n const [conflicts, setConflicts] = useState([]);\n const [forAll, setForAll] = useState(false);\n const [remember, setRemember] = useState(false);\n useEffect(() => setRemember(false), [forAll]);\n useEffect(() => {\n setForAll(false);\n setRemember(false);\n }, [conflict]);\n const proceed = (id) => {\n if (conflict) {\n if (id == 'ok') {\n window.f5.resolve(conflict.id, { type: QueueActionType.Replace }, forAll, remember ? conflict.sid : undefined);\n }\n else if (id == 'cancel') {\n window.f5.resolve(conflict.id, { type: QueueActionType.Skip }, forAll, remember ? conflict.sid : undefined);\n }\n else {\n window.f5.stop(conflict.id);\n }\n conflicts.length ?\n setConflicts(conflicts => {\n setConflict(conflicts[0]);\n return conflicts.slice(1);\n }) :\n setConflict(undefined);\n }\n };\n useSubscribe(() => queue$.subscribe(({ id, event }) => {\n if (event.type == QueueEventType.Ask) {\n conflict ?\n setConflicts(conflicts => [...conflicts, { id, ...event }]) :\n setConflict({ id, ...event });\n }\n }));\n return React.createElement(React.Fragment, null, conflict &&\n React.createElement(Modal, { onClose: proceed, buttons: [{ id: 'stop', label: 'Stop' }, { id: 'cancel', label: 'Skip' }, { id: 'ok', label: 'Replace' }] },\n React.createElement(\"div\", { className: 'modal-content ' + styles.root },\n React.createElement(\"header\", null, \"Choose action\"),\n React.createElement(\"p\", null,\n \"The destination already contains a \",\n conflict.to.dir ? 'folder' : 'file',\n \" called\",\n React.createElement(\"strong\", null, basename(conflict.to.path))),\n React.createElement(\"p\", null,\n \"Would you like to replace the existing \",\n conflict.to.dir ? 'folder' : 'file',\n \" in\",\n React.createElement(\"strong\", null,\n React.createElement(Path, { path: dirname(conflict.to.path) }))),\n React.createElement(\"div\", { className: styles.file },\n React.createElement(\"i\", { className: 'icon' }, (conflict.queueType == QueueType.Move || conflict.queueType == QueueType.Copy) ?\n (conflict.to.dir ? 'folder' : 'file_copy') :\n (conflict.queueType == QueueType.Download ? 'computer' : 'cloud')),\n React.createElement(\"p\", null,\n conflict.to.dir ? '' : React.createElement(React.Fragment, null,\n 'Size: ' + numeral(conflict.to.size).format('0.0 b'),\n \" \",\n React.createElement(\"br\", null)),\n \"Modified: \",\n format(conflict?.to.modified, appSettings.timeFmt))),\n React.createElement(\"p\", null,\n \"with the new one from\",\n React.createElement(\"strong\", null,\n React.createElement(Path, { path: dirname(conflict.from.path) }))),\n React.createElement(\"div\", { className: styles.file },\n React.createElement(\"i\", { className: 'icon' }, (conflict.queueType == QueueType.Move || conflict.queueType == QueueType.Copy) ?\n (conflict.from.dir ? 'folder' : 'file_copy') :\n (conflict.queueType == QueueType.Download ? 'cloud' : 'computer')),\n React.createElement(\"p\", null,\n conflict.to.dir ? '' : React.createElement(React.Fragment, null,\n 'Size: ' + numeral(conflict.from.size).format('0.0 b'),\n \" \",\n React.createElement(\"br\", null)),\n \"Modified: \",\n format(conflict?.from.modified, appSettings.timeFmt))),\n React.createElement(\"div\", { className: styles.checks },\n React.createElement(Checkbox, { value: forAll, onChange: () => setForAll(v => !v) }, \"Apply the chosen action to the rest of files\"),\n conflict.sid && forAll &&\n React.createElement(Checkbox, { value: remember, onChange: () => setRemember(remember => !remember) }, \"Remember for the current session\")))));\n}\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../node_modules/less-loader/dist/cjs/index.js!./Error.less\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../node_modules/less-loader/dist/cjs/index.js!./Error.less\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useState } from \"react\";\nimport { createPortal } from 'react-dom';\nimport { filter } from 'rxjs/operators';\nimport { useSubscribe } from '../../hooks';\nimport { error$ } from '../../observables/error';\nimport { FailureType, LocalFileSystemID } from '../../shared/types';\nimport { Button } from '../../ui/components';\nimport styles from './Error.less';\nexport default function Error() {\n const [errors, setErrors] = useState([]);\n const [current, setCurrent] = useState(0);\n const [icon, setIcon] = useState('warning');\n useSubscribe(() => error$.pipe(filter(() => !document.hidden)).subscribe(error => {\n process.env.NODE_ENV == 'development' && console.error(error);\n if (error.type == FailureType.RemoteError) {\n setErrors(errors => [...errors, { id: error.id, message: error.message, type: error.type }]);\n }\n else if (error.type == FailureType.APIError) {\n setErrors(errors => [...errors, { origin: error.method, message: error.message, type: error.type }]);\n }\n else if (error.type == FailureType.Warning || error.type == FailureType.Info) {\n setErrors(errors => [...errors, { message: error.message, html: true, type: error.type }]);\n if (error.type == FailureType.Info) {\n setIcon('info');\n }\n }\n }));\n return React.createElement(React.Fragment, null, errors.length > 0 && createPortal(React.createElement(\"div\", { className: styles.root },\n React.createElement(\"button\", { className: \"close\", onClick: () => setErrors([]) }, \"\\u2715\"),\n React.createElement(\"i\", { className: \"icon\", \"data-type\": errors[current].type }, icon),\n React.createElement(\"div\", null,\n errors[current].id && errors[current].id != LocalFileSystemID &&\n React.createElement(\"em\", null, errors[current].id),\n errors[current].html === true ?\n React.createElement(\"div\", { className: \"message\", dangerouslySetInnerHTML: { __html: errors[current].message } }) :\n errors[current].message,\n errors[current].origin &&\n React.createElement(\"p\", null,\n \"Origin: \",\n errors[current].origin)),\n errors.length > 1 &&\n React.createElement(\"footer\", null,\n React.createElement(Button, { onClick: () => setCurrent(Math.max(current - 1, 0)), disabled: current <= 0 }, \"Previous\"),\n current + 1,\n \"/\",\n errors.length,\n React.createElement(Button, { onClick: () => setCurrent(Math.min(current + 1, errors.length - 1)), disabled: current >= errors.length - 1 }, \"Next\"))), document.body));\n}\n","\n import API from \"!../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../../../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../../../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../../../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../../../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../node_modules/less-loader/dist/cjs/index.js!./Password.less\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\noptions.insert = insertFn.bind(null, \"head\");\noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[3].use[1]!../../../node_modules/less-loader/dist/cjs/index.js!./Password.less\";\n export default content && content.locals ? content.locals : undefined;\n","import React, { useState, useRef, useEffect } from \"react\";\nimport { useSubscribe } from '../../hooks';\nimport { error$ } from '../../observables/error';\nimport { FailureType } from '../../shared/types';\nimport { Modal, ModalButtonID, Password, Checkbox } from '../../ui/components';\nimport styles from './Password.less';\nexport default function AskForPassword() {\n const [connectionId, setConnectionId] = useState();\n const [password, setPassword] = useState('');\n const [remember, setRemember] = useState(true);\n const input = useRef(null);\n useSubscribe(() => error$.subscribe(error => {\n if (error.type == FailureType.Unauthorized && sessionStorage.getItem('Connecting')) {\n sessionStorage.removeItem('Connecting');\n setConnectionId(error.id);\n }\n }));\n useEffect(() => {\n connectionId && input.current?.focus();\n }, [connectionId]);\n // useEffect(() => { // TODO: fix auto-login in FireFox\n // if (!connectionId) {\n // return\n // }\n // setTimeout(() => {\n // const filledPassword = document.querySelector('input[name=\"password\"]:autofill')\n // const pass = (filledPassword as HTMLInputElement)?.value\n // pass ?\n // onClose(ModalButtonID.Ok, pass, false) :\n // setShow(true)\n // }, 600)\n // }, [connectionId])\n const buttons = [\n {\n id: ModalButtonID.Cancel,\n label: 'Cancel'\n },\n {\n id: ModalButtonID.Ok,\n label: 'Ok',\n disabled: !password.length\n }\n ];\n const onClose = (id, pass, rem) => {\n window.f5.login(connectionId, id == ModalButtonID.Ok ? (pass ?? password) : false, rem ?? remember);\n if (id != ModalButtonID.Ok) {\n const u = new URL(window.location.toString());\n u.searchParams.delete('connect');\n history.replaceState(null, '', u.toString());\n }\n setConnectionId(undefined);\n };\n return React.createElement(React.Fragment, null, connectionId &&\n React.createElement(Modal, { buttons: buttons, onClose: onClose },\n React.createElement(\"form\", { className: styles.form, autoComplete: \"on\" },\n React.createElement(\"p\", null,\n \"Connecting \",\n React.createElement(\"em\", null, connectionId),\n \"...\"),\n React.createElement(\"div\", { className: \"username\" },\n React.createElement(\"input\", { type: 'text', name: \"username\", value: connectionId, autoComplete: \"username\", readOnly: true })),\n React.createElement(\"p\", null,\n \"Password: \",\n React.createElement(Password, { ref: input, onChange: setPassword, name: 'password', autoComplete: 'current-password' })),\n React.createElement(\"p\", null,\n React.createElement(Checkbox, { onChange: remember => setRemember(remember), value: remember }, \"Remember password for this session\")))));\n}\n","import React, { useState, useEffect } from \"react\";\nimport { Modal, ModalButtonID } from '../ui/components';\nimport { FailureType } from '../shared/types';\nimport { parseURI } from '../shared/utils/URI';\nimport { useSubscribe } from '../hooks';\nimport { error$ } from '../observables/error';\nimport { basename } from '../utils/path';\nimport { createQueue } from '../observables/queue';\nexport default function ConfirmDeletion() {\n const [files, setFiles] = useState([]);\n const [names, setNames] = useState([]);\n const [isLocal, setLocal] = useState(true);\n useEffect(() => {\n setLocal(files.length > 0 && files[0].substring(0, 5) == 'file:');\n setNames(files.map(u => basename(parseURI(u).path)));\n }, [files]);\n useSubscribe(() => error$.subscribe(error => {\n if (error.type == FailureType.ConfirmDeletion) {\n setFiles(error.files);\n }\n }));\n const buttons = [\n {\n id: ModalButtonID.Cancel,\n label: 'Cancel'\n },\n {\n id: ModalButtonID.Ok,\n label: isLocal ? 'Move to Trash' : 'Delete Forever'\n }\n ];\n const onClose = (id) => {\n if (id == ModalButtonID.Ok) {\n window.f5.remove(files).then(id => createQueue(id));\n }\n setFiles([]);\n };\n return React.createElement(React.Fragment, null, files.length > 0 &&\n React.createElement(Modal, { buttons: buttons, onClose: onClose },\n React.createElement(\"div\", { className: 'modal-content', style: { textAlign: 'center' } },\n React.createElement(\"p\", null,\n React.createElement(\"strong\", null, names.length > 1 ?\n `Are you sure you want to delete ${names.length} files/directories and their contents?` :\n React.createElement(\"span\", null,\n \"Are you sure you want to delete \",\n React.createElement(\"br\", null),\n \" '\",\n names[0],\n \"'?\"))),\n React.createElement(\"p\", null,\n React.createElement(\"i\", null, isLocal ?\n `You can restore ${names.length > 1 ? 'them' : 'it'} from the Trash.` :\n 'This action is irreversible!')))));\n}\n","import React, { useState, useEffect } from \"react\";\nimport { Modal, ModalButtonID } from '../ui/components';\nimport { FailureType } from '../shared/types';\nimport { parseURI } from '../shared/utils/URI';\nimport { useSubscribe } from '../hooks';\nimport { error$ } from '../observables/error';\nimport { basename } from '../utils/path';\nexport default function ConfirmDeletion() {\n const [file, setFile] = useState();\n const [name, setName] = useState('');\n useEffect(() => {\n setName(file ? basename(parseURI(file).path) : '');\n }, [file]);\n useSubscribe(() => error$.subscribe(error => {\n if (error.type == FailureType.ConfirmClear) {\n setFile(error.file);\n }\n }));\n const buttons = [\n {\n id: ModalButtonID.Cancel,\n label: 'Cancel'\n },\n {\n id: ModalButtonID.Ok,\n label: 'Clear Contents'\n }\n ];\n const onClose = (id) => {\n if (id == ModalButtonID.Ok) {\n window.f5.clear(file);\n }\n setFile(undefined);\n };\n return React.createElement(React.Fragment, null, file &&\n React.createElement(Modal, { buttons: buttons, onClose: onClose },\n React.createElement(\"div\", { className: 'modal-content', style: { textAlign: 'center' } },\n React.createElement(\"p\", null,\n React.createElement(\"strong\", null,\n React.createElement(\"span\", null,\n \"Are you sure you want to clear contents of \",\n React.createElement(\"br\", null),\n \" '\",\n name,\n \"'?\"))),\n React.createElement(\"p\", null,\n React.createElement(\"i\", null, \"This action is irreversible!\")))));\n}\n","import { Subject } from 'rxjs';\nexport const file$ = new Subject();\nwindow.f5.onFileChange((path, stat) => file$.next({ path, stat }));\n","import _curry3 from \"./internal/_curry3.js\";\nimport _has from \"./internal/_has.js\";\n\n/**\n * Creates a new object with the own properties of the two provided objects. If\n * a key exists in both objects, the provided function is applied to the key\n * and the values associated with the key in each object, with the result being\n * used as the value associated with the key in the returned object.\n *\n * @func\n * @memberOf R\n * @since v0.19.0\n * @category Object\n * @sig ((String, a, a) -> a) -> {a} -> {a} -> {a}\n * @param {Function} fn\n * @param {Object} l\n * @param {Object} r\n * @return {Object}\n * @see R.mergeDeepWithKey, R.mergeWith\n * @example\n *\n * let concatValues = (k, l, r) => k == 'values' ? R.concat(l, r) : r\n * R.mergeWithKey(concatValues,\n * { a: true, thing: 'foo', values: [10, 20] },\n * { b: true, thing: 'bar', values: [15, 35] });\n * //=> { a: true, b: true, thing: 'bar', values: [10, 20, 15, 35] }\n * @symb R.mergeWithKey(f, { x: 1, y: 2 }, { y: 5, z: 3 }) = { x: 1, y: f('y', 2, 5), z: 3 }\n */\nvar mergeWithKey = /*#__PURE__*/_curry3(function mergeWithKey(fn, l, r) {\n var result = {};\n var k;\n l = l || {};\n r = r || {};\n for (k in l) {\n if (_has(k, l)) {\n result[k] = _has(k, r) ? fn(k, l[k], r[k]) : l[k];\n }\n }\n for (k in r) {\n if (_has(k, r) && !_has(k, result)) {\n result[k] = r[k];\n }\n }\n return result;\n});\nexport default mergeWithKey;","import _curry3 from \"./internal/_curry3.js\";\nimport _isObject from \"./internal/_isObject.js\";\nimport mergeWithKey from \"./mergeWithKey.js\";\n\n/**\n * Creates a new object with the own properties of the two provided objects.\n * If a key exists in both objects:\n * - and both associated values are also objects then the values will be\n * recursively merged.\n * - otherwise the provided function is applied to the key and associated values\n * using the resulting value as the new value associated with the key.\n * If a key only exists in one object, the value will be associated with the key\n * of the resulting object.\n *\n * @func\n * @memberOf R\n * @since v0.24.0\n * @category Object\n * @sig ((String, a, a) -> a) -> {a} -> {a} -> {a}\n * @param {Function} fn\n * @param {Object} lObj\n * @param {Object} rObj\n * @return {Object}\n * @see R.mergeWithKey, R.mergeDeepWith\n * @example\n *\n * let concatValues = (k, l, r) => k == 'values' ? R.concat(l, r) : r\n * R.mergeDeepWithKey(concatValues,\n * { a: true, c: { thing: 'foo', values: [10, 20] }},\n * { b: true, c: { thing: 'bar', values: [15, 35] }});\n * //=> { a: true, b: true, c: { thing: 'bar', values: [10, 20, 15, 35] }}\n */\nvar mergeDeepWithKey = /*#__PURE__*/_curry3(function mergeDeepWithKey(fn, lObj, rObj) {\n return mergeWithKey(function (k, lVal, rVal) {\n if (_isObject(lVal) && _isObject(rVal)) {\n return mergeDeepWithKey(fn, lVal, rVal);\n } else {\n return fn(k, lVal, rVal);\n }\n }, lObj, rObj);\n});\nexport default mergeDeepWithKey;","import _curry2 from \"./internal/_curry2.js\";\nimport mergeDeepWithKey from \"./mergeDeepWithKey.js\";\n\n/**\n * Creates a new object with the own properties of the first object merged with\n * the own properties of the second object. If a key exists in both objects:\n * - and both values are objects, the two values will be recursively merged\n * - otherwise the value from the second object will be used.\n *\n * @func\n * @memberOf R\n * @since v0.24.0\n * @category Object\n * @sig {a} -> {a} -> {a}\n * @param {Object} lObj\n * @param {Object} rObj\n * @return {Object}\n * @see R.mergeDeepLeft, R.mergeDeepWith, R.mergeDeepWithKey\n * @example\n *\n * R.mergeDeepRight({ name: 'fred', age: 10, contact: { email: 'moo@example.com' }},\n * { age: 40, contact: { email: 'baa@example.com' }});\n * //=> { name: 'fred', age: 40, contact: { email: 'baa@example.com' }}\n */\nvar mergeDeepRight = /*#__PURE__*/_curry2(function mergeDeepRight(lObj, rObj) {\n return mergeDeepWithKey(function (k, lVal, rVal) {\n return rVal;\n }, lObj, rObj);\n});\nexport default mergeDeepRight;","import React, { useEffect, useState, useRef, useLayoutEffect } from \"react\";\nimport Workspace from '../Workspace/Workspace';\nimport styles from './App.less';\nimport { useMap, useSubscribe, useShortcuts, useMode, useCopyPaste, useEffectOnUpdate } from '../../hooks';\nimport { queue$ } from '../../observables/queue';\nimport Queue from '../Queue/Queue';\nimport { LocalFileSystemID, QueueEventType, FailureType } from '../../shared/types';\nimport { parse } from '../../utils/path';\nimport { createURI } from '../../shared/utils/URI';\nimport classNames from \"classnames\";\nimport QueueAction from \"../QueueAction/QueueAction\";\nimport Error from '../Error/Error';\nimport AskForPassword from '../../modals/Password/Password';\nimport ConfirmDeletion from '../../modals/Deletion';\nimport ConfirmClearance from '../../modals/Clearance';\nimport { command$ } from '../../observables/command';\nimport { file$ } from '../../observables/file';\nimport { error$ } from '../../observables/error';\nimport { CommandID } from '../../commands';\nimport { AppSettingsContext } from '../../context/config';\nimport { Tooltips, Spinner, Button, Popper } from '../../ui/components';\nimport Settings from '../../modals/Settings/Settings';\nimport { equals, mergeDeepRight } from 'ramda';\nfunction setTitle(connectionId, connectionName, localPath, remotePath) {\n let title = (connectionName ? connectionName + ' - ' : '') + parse(remotePath).name;\n document.querySelector('head > title').innerText = title;\n}\nexport default function App() {\n const [appSettings, setAppSettings] = useState();\n const currAppSettings = useRef(null);\n const settingsFile = useRef('');\n const [settingsChanges, setSettingsChanges] = useState({});\n const allSettingsChanges = useRef({});\n useEffect(() => {\n window.f5.settings().then(settings => {\n currAppSettings.current = settings;\n setAppSettings(settings);\n settingsFile.current = settings.settings;\n });\n }, []);\n useEffect(() => {\n if (appSettings) {\n window.f5.watch(createURI(LocalFileSystemID, appSettings.settings));\n }\n }, [appSettings]);\n const defaultMode = useMode();\n useLayoutEffect(() => {\n if (appSettings) {\n document.documentElement.setAttribute('data-mode', appSettings.mode == 'system'\n ? defaultMode\n : appSettings.mode);\n document.documentElement.setAttribute('data-theme', appSettings.theme);\n if (appSettings.fileTheme) {\n const link = document.createElement('link');\n link.rel = 'stylesheet';\n link.href = `icon-themes/${appSettings.fileTheme}.css`;\n document.head.appendChild(link);\n }\n }\n }, [appSettings, defaultMode]);\n useCopyPaste((e) => command$.next({ id: CommandID.Copy, e }), (e) => {\n if (e.clipboardData?.files.length) {\n const files = [];\n for (let i = 0; i < e.clipboardData.files.length; i++) {\n const file = e.clipboardData.files.item(i);\n if (file) {\n files.push(file);\n }\n }\n command$.next({ id: CommandID.Paste, files });\n }\n else if (e.clipboardData) {\n const data = e.clipboardData.getData('URIs');\n if (data && data.length) {\n command$.next({ id: CommandID.Paste, uris: JSON.parse(data) });\n }\n }\n });\n useSubscribe(() => file$.subscribe(({ path }) => {\n if (path == settingsFile.current) {\n window.f5.settings().then(settings => {\n if (currAppSettings.current && !equals(currAppSettings.current, settings)) {\n if (currAppSettings.current.fileTheme != settings.fileTheme) {\n location.reload();\n }\n else {\n currAppSettings.current = settings;\n setAppSettings(settings);\n }\n }\n });\n }\n }), []);\n useEffectOnUpdate(() => {\n if (currAppSettings.current) {\n allSettingsChanges.current = mergeDeepRight(allSettingsChanges.current, settingsChanges);\n currAppSettings.current = mergeDeepRight(currAppSettings.current, allSettingsChanges.current);\n const tm = setTimeout(() => {\n window.f5.saveSettings(allSettingsChanges.current);\n }, 2000);\n return () => clearTimeout(tm);\n }\n }, [settingsChanges]);\n useShortcuts(appSettings?.keybindings ?? [], (id, e) => command$.next({ id: id, e }), [appSettings]);\n useSubscribe(() => command$.subscribe(cmd => {\n switch (cmd.id) {\n case CommandID.TriggerCopy: {\n document.execCommand('copy');\n // document.execCommand('paste') is not supported\n break;\n }\n }\n }));\n const [queues, { set: addQueue, del: delQueue }] = useMap();\n useSubscribe(() => queue$.subscribe(({ id, event }) => {\n if (event.type == QueueEventType.Create) {\n addQueue(id, { type: event.queueType, connection: event.connection });\n }\n else if (event.type == QueueEventType.Complete) {\n delQueue(id);\n }\n }));\n const [active, setActive] = useState(0);\n useEffect(() => setActive(queues.size - 1), [queues]);\n const [updateAvail, setUpdateAvail] = useState(null);\n useSubscribe(() => error$.subscribe(error => {\n if (error.type == FailureType.UpdateAvailable) {\n setUpdateAvail({ ...error });\n }\n }));\n const updateButton = useRef(null);\n return (React.createElement(React.Fragment, null, appSettings ?\n React.createElement(AppSettingsContext.Provider, { value: appSettings },\n React.createElement(\"div\", { className: classNames(styles.root, { hasQueues: queues.size > 0 }) },\n React.createElement(Tooltips, { shortcuts: appSettings.keybindings },\n React.createElement(\"div\", { className: styles.toolbar },\n React.createElement(\"span\", null,\n React.createElement(\"a\", { href: \"https://github.com/miroshnikov/filefive\", target: \"_blank\" },\n React.createElement(\"span\", null, \"F5\"),\n \"FileFive\"),\n React.createElement(\"nav\", null,\n React.createElement(\"svg\", { viewBox: \"0 0 16 16\", width: \"16\", height: \"16\" },\n React.createElement(\"path\", { d: \"M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z\" })),\n React.createElement(\"a\", { href: \"https://github.com/miroshnikov/filefive\", target: \"_blank\" },\n React.createElement(\"svg\", { viewBox: \"0 0 16 16\", width: \"16\", height: \"16\" },\n React.createElement(\"path\", { d: \"M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694Z\" })),\n React.createElement(\"span\", null, \"Star\")),\n React.createElement(\"a\", { href: \"https://github.com/miroshnikov/filefive/discussions\", target: \"_blank\" },\n React.createElement(\"svg\", { viewBox: \"0 0 16 16\", width: \"16\", height: \"16\" },\n React.createElement(\"path\", { d: \"M1.75 1h8.5c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 10.25 10H7.061l-2.574 2.573A1.458 1.458 0 0 1 2 11.543V10h-.25A1.75 1.75 0 0 1 0 8.25v-5.5C0 1.784.784 1 1.75 1ZM1.5 2.75v5.5c0 .138.112.25.25.25h1a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h3.5a.25.25 0 0 0 .25-.25v-5.5a.25.25 0 0 0-.25-.25h-8.5a.25.25 0 0 0-.25.25Zm13 2a.25.25 0 0 0-.25-.25h-.5a.75.75 0 0 1 0-1.5h.5c.966 0 1.75.784 1.75 1.75v5.5A1.75 1.75 0 0 1 14.25 12H14v1.543a1.458 1.458 0 0 1-2.487 1.03L9.22 12.28a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215l2.22 2.22v-2.19a.75.75 0 0 1 .75-.75h1a.25.25 0 0 0 .25-.25Z\" })),\n React.createElement(\"span\", null, \"Discuss\")),\n React.createElement(\"a\", { href: \"https://github.com/miroshnikov/filefive/issues\", target: \"_blank\" },\n React.createElement(\"svg\", { viewBox: \"0 0 16 16\", width: \"16\", height: \"16\" },\n React.createElement(\"path\", { d: \"M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z\" }),\n React.createElement(\"path\", { d: \"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z\" })),\n React.createElement(\"span\", null, \"Issue\")))),\n React.createElement(\"span\", null,\n React.createElement(Button, { ref: updateButton, primary: true, hidden: !updateAvail }, \"Update\"),\n React.createElement(\"button\", { className: \"icon\", \"data-command\": CommandID.Connections, \"data-tooltip\": \"Connections...\", onClick: () => command$.next({ id: CommandID.Connections }) }, \"cloud_upload\"),\n React.createElement(\"button\", { className: \"icon\", \"data-command\": CommandID.Settings, \"data-tooltip\": \"Settings...\", onClick: () => command$.next({ id: CommandID.Settings }) }, \"settings\")))),\n React.createElement(\"div\", { className: styles.workspace },\n React.createElement(Workspace, { onSettingsChange: setSettingsChanges, onChange: setTitle })),\n queues.size > 0 &&\n React.createElement(\"div\", { className: styles.queues }, Array.from(queues.entries()).map(([id, { type, connection }], i) => React.createElement(\"div\", { key: id, onClick: () => setActive(i), className: classNames({ active: i == active }) },\n React.createElement(Queue, { id: id, type: type, connection: connection, active: i == active }))))),\n React.createElement(QueueAction, null),\n React.createElement(Error, null),\n React.createElement(AskForPassword, null),\n React.createElement(ConfirmDeletion, null),\n React.createElement(ConfirmClearance, null),\n React.createElement(Settings, null),\n updateAvail != null &&\n React.createElement(Popper, { target: updateButton.current, align: 'bottom-end', hideOnClick: false },\n React.createElement(\"div\", { className: styles.update },\n React.createElement(\"p\", null,\n \"A new version \",\n React.createElement(\"a\", { href: \"https://www.npmjs.com/package/filefive\", target: \"_blank\" }, \"is available on npm\"),\n \". See \",\n React.createElement(\"a\", { href: \"https://github.com/miroshnikov/filefive/blob/main/CHANGELOG.md\", target: \"_blank\" }, \"what's new.\")),\n React.createElement(\"p\", null,\n \"Current version: \",\n React.createElement(\"em\", null, updateAvail.currVer),\n \" \\u2192 New version: \",\n React.createElement(\"em\", null, updateAvail.newVer)),\n React.createElement(\"p\", null, \"If you installed FileFive with npm, you can update it by running:\"),\n React.createElement(\"pre\", null, \" npm update -g filefive\")))) :\n React.createElement(\"div\", { className: \"fill-center\" },\n React.createElement(\"div\", { className: \"center\" },\n React.createElement(Spinner, { radius: \"3em\" })))));\n}\n","import { useEffect, useState } from 'react';\nexport const useMode = () => {\n const [mode, setMode] = useState(window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light');\n useEffect(() => {\n const listener = (e) => setMode(e.matches ? \"dark\" : \"light\");\n window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', listener);\n return window.matchMedia('(prefers-color-scheme: dark)').removeEventListener('change', listener);\n }, []);\n return mode;\n};\n","import { useEffect } from 'react';\nexport const useCopyPaste = (onCopy, onPaste, deps = []) => {\n useEffect(() => {\n document.documentElement.addEventListener(\"copy\", onCopy);\n document.documentElement.addEventListener(\"paste\", onPaste);\n return () => {\n document.documentElement.removeEventListener(\"copy\", onCopy);\n document.documentElement.removeEventListener(\"paste\", onPaste);\n };\n }, deps);\n};\n","import { useState } from 'react';\nexport const useMap = () => {\n const [map, setMap] = useState(new Map());\n return [map, {\n has: (key) => map.has(key),\n set: (key, value) => setMap(map => new Map(map.set(key, value))),\n get: (key) => map.get(key),\n del: (key) => {\n let existed = false;\n setMap(map => { existed = map.delete(key); return new Map(map); });\n return existed;\n },\n clear: () => setMap(new Map())\n }];\n};\n","import React from \"react\";\nimport { createRoot } from 'react-dom/client';\nimport './api';\nimport './assets/styles.css';\nimport App from './components/App/App';\nimport i18next from 'i18next';\ni18next\n .use({\n type: 'postProcessor',\n name: 'test',\n process: function (value, key, options, translator) {\n return value;\n }\n})\n .init({\n lng: 'en',\n fallbackLng: 'en',\n resources: {\n en: {\n translation: {\n \"file_one\": \"file\",\n \"file_other\": \"files\",\n \"num_of_files_zero\": \"\",\n \"num_of_files_one\": \"{{count}} file\",\n \"num_of_files_other\": \"{{count}} files\",\n \"num_of_dirs_zero\": \"\",\n \"num_of_dirs_one\": \"{{count}} folder\",\n \"num_of_dirs_other\": \"{{count}} folders\",\n \"copying\": \"Copying $t(num_of_files, {'count': {{count}} })\",\n \"moving\": \"Moving $t(num_of_files, {'count': {{count}} })\",\n \"downloading\": \"Downloading $t(num_of_files, {'count': {{count}} }) from <strong>{{- conn}}</strong>\",\n \"uploading\": \"Uploading $t(num_of_files, {'count': {{count}} }) to <strong>{{- conn}}</strong>\",\n \"deleting\": \"Deleting $t(num_of_files, {'count': {{count}} }) in <strong>{{- conn}}</strong>\",\n \"selected_zero\": \"\",\n \"selected_one\": \"Selected \",\n \"selected_other\": \"Selected \",\n \"stat\": [\n \"$t(num_of_files, {'count': {{files}} })\",\n \"$t(num_of_dirs, {'count': {{dirs}} })\"\n ],\n \"size\": \"Files size: {{size}}\"\n }\n }\n }\n});\nwindow.addEventListener('DOMContentLoaded', () => {\n const container = document.getElementById('app');\n const root = createRoot(container);\n root.render(React.createElement(App, null));\n});\n","\"use strict\";\n\nfunction makeException(ErrorType, message, options) {\n if (options.globals) {\n ErrorType = options.globals[ErrorType.name];\n }\n return new ErrorType(`${options.context ? options.context : \"Value\"} ${message}.`);\n}\n\nfunction toNumber(value, options) {\n if (typeof value === \"bigint\") {\n throw makeException(TypeError, \"is a BigInt which cannot be converted to a number\", options);\n }\n if (!options.globals) {\n return Number(value);\n }\n return options.globals.Number(value);\n}\n\n// Round x to the nearest integer, choosing the even integer if it lies halfway between two.\nfunction evenRound(x) {\n // There are four cases for numbers with fractional part being .5:\n //\n // case | x | floor(x) | round(x) | expected | x <> 0 | x % 1 | x & 1 | example\n // 1 | 2n + 0.5 | 2n | 2n + 1 | 2n | > | 0.5 | 0 | 0.5 -> 0\n // 2 | 2n + 1.5 | 2n + 1 | 2n + 2 | 2n + 2 | > | 0.5 | 1 | 1.5 -> 2\n // 3 | -2n - 0.5 | -2n - 1 | -2n | -2n | < | -0.5 | 0 | -0.5 -> 0\n // 4 | -2n - 1.5 | -2n - 2 | -2n - 1 | -2n - 2 | < | -0.5 | 1 | -1.5 -> -2\n // (where n is a non-negative integer)\n //\n // Branch here for cases 1 and 4\n if ((x > 0 && (x % 1) === +0.5 && (x & 1) === 0) ||\n (x < 0 && (x % 1) === -0.5 && (x & 1) === 1)) {\n return censorNegativeZero(Math.floor(x));\n }\n\n return censorNegativeZero(Math.round(x));\n}\n\nfunction integerPart(n) {\n return censorNegativeZero(Math.trunc(n));\n}\n\nfunction sign(x) {\n return x < 0 ? -1 : 1;\n}\n\nfunction modulo(x, y) {\n // https://tc39.github.io/ecma262/#eqn-modulo\n // Note that http://stackoverflow.com/a/4467559/3191 does NOT work for large modulos\n const signMightNotMatch = x % y;\n if (sign(y) !== sign(signMightNotMatch)) {\n return signMightNotMatch + y;\n }\n return signMightNotMatch;\n}\n\nfunction censorNegativeZero(x) {\n return x === 0 ? 0 : x;\n}\n\nfunction createIntegerConversion(bitLength, { unsigned }) {\n let lowerBound, upperBound;\n if (unsigned) {\n lowerBound = 0;\n upperBound = 2 ** bitLength - 1;\n } else {\n lowerBound = -(2 ** (bitLength - 1));\n upperBound = 2 ** (bitLength - 1) - 1;\n }\n\n const twoToTheBitLength = 2 ** bitLength;\n const twoToOneLessThanTheBitLength = 2 ** (bitLength - 1);\n\n return (value, options = {}) => {\n let x = toNumber(value, options);\n x = censorNegativeZero(x);\n\n if (options.enforceRange) {\n if (!Number.isFinite(x)) {\n throw makeException(TypeError, \"is not a finite number\", options);\n }\n\n x = integerPart(x);\n\n if (x < lowerBound || x > upperBound) {\n throw makeException(\n TypeError,\n `is outside the accepted range of ${lowerBound} to ${upperBound}, inclusive`,\n options\n );\n }\n\n return x;\n }\n\n if (!Number.isNaN(x) && options.clamp) {\n x = Math.min(Math.max(x, lowerBound), upperBound);\n x = evenRound(x);\n return x;\n }\n\n if (!Number.isFinite(x) || x === 0) {\n return 0;\n }\n x = integerPart(x);\n\n // Math.pow(2, 64) is not accurately representable in JavaScript, so try to avoid these per-spec operations if\n // possible. Hopefully it's an optimization for the non-64-bitLength cases too.\n if (x >= lowerBound && x <= upperBound) {\n return x;\n }\n\n // These will not work great for bitLength of 64, but oh well. See the README for more details.\n x = modulo(x, twoToTheBitLength);\n if (!unsigned && x >= twoToOneLessThanTheBitLength) {\n return x - twoToTheBitLength;\n }\n return x;\n };\n}\n\nfunction createLongLongConversion(bitLength, { unsigned }) {\n const upperBound = Number.MAX_SAFE_INTEGER;\n const lowerBound = unsigned ? 0 : Number.MIN_SAFE_INTEGER;\n const asBigIntN = unsigned ? BigInt.asUintN : BigInt.asIntN;\n\n return (value, options = {}) => {\n let x = toNumber(value, options);\n x = censorNegativeZero(x);\n\n if (options.enforceRange) {\n if (!Number.isFinite(x)) {\n throw makeException(TypeError, \"is not a finite number\", options);\n }\n\n x = integerPart(x);\n\n if (x < lowerBound || x > upperBound) {\n throw makeException(\n TypeError,\n `is outside the accepted range of ${lowerBound} to ${upperBound}, inclusive`,\n options\n );\n }\n\n return x;\n }\n\n if (!Number.isNaN(x) && options.clamp) {\n x = Math.min(Math.max(x, lowerBound), upperBound);\n x = evenRound(x);\n return x;\n }\n\n if (!Number.isFinite(x) || x === 0) {\n return 0;\n }\n\n let xBigInt = BigInt(integerPart(x));\n xBigInt = asBigIntN(bitLength, xBigInt);\n return Number(xBigInt);\n };\n}\n\nexports.any = value => {\n return value;\n};\n\nexports.undefined = () => {\n return undefined;\n};\n\nexports.boolean = value => {\n return Boolean(value);\n};\n\nexports.byte = createIntegerConversion(8, { unsigned: false });\nexports.octet = createIntegerConversion(8, { unsigned: true });\n\nexports.short = createIntegerConversion(16, { unsigned: false });\nexports[\"unsigned short\"] = createIntegerConversion(16, { unsigned: true });\n\nexports.long = createIntegerConversion(32, { unsigned: false });\nexports[\"unsigned long\"] = createIntegerConversion(32, { unsigned: true });\n\nexports[\"long long\"] = createLongLongConversion(64, { unsigned: false });\nexports[\"unsigned long long\"] = createLongLongConversion(64, { unsigned: true });\n\nexports.double = (value, options = {}) => {\n const x = toNumber(value, options);\n\n if (!Number.isFinite(x)) {\n throw makeException(TypeError, \"is not a finite floating-point value\", options);\n }\n\n return x;\n};\n\nexports[\"unrestricted double\"] = (value, options = {}) => {\n const x = toNumber(value, options);\n\n return x;\n};\n\nexports.float = (value, options = {}) => {\n const x = toNumber(value, options);\n\n if (!Number.isFinite(x)) {\n throw makeException(TypeError, \"is not a finite floating-point value\", options);\n }\n\n if (Object.is(x, -0)) {\n return x;\n }\n\n const y = Math.fround(x);\n\n if (!Number.isFinite(y)) {\n throw makeException(TypeError, \"is outside the range of a single-precision floating-point value\", options);\n }\n\n return y;\n};\n\nexports[\"unrestricted float\"] = (value, options = {}) => {\n const x = toNumber(value, options);\n\n if (isNaN(x)) {\n return x;\n }\n\n if (Object.is(x, -0)) {\n return x;\n }\n\n return Math.fround(x);\n};\n\nexports.DOMString = (value, options = {}) => {\n if (options.treatNullAsEmptyString && value === null) {\n return \"\";\n }\n\n if (typeof value === \"symbol\") {\n throw makeException(TypeError, \"is a symbol, which cannot be converted to a string\", options);\n }\n\n const StringCtor = options.globals ? options.globals.String : String;\n return StringCtor(value);\n};\n\nexports.ByteString = (value, options = {}) => {\n const x = exports.DOMString(value, options);\n\n // A Unicode regexp gives identical results here, but is ~5x slower on 16-bit strings:\n // https://issues.chromium.org/issues/472892241\n // eslint-disable-next-line require-unicode-regexp\n if (/[^\\x00-\\xFF]/.test(x)) {\n throw makeException(TypeError, \"is not a valid ByteString\", options);\n }\n\n return x;\n};\n\nexports.USVString = (value, options = {}) => {\n return exports.DOMString(value, options).toWellFormed();\n};\n\nexports.object = (value, options = {}) => {\n if (value === null || (typeof value !== \"object\" && typeof value !== \"function\")) {\n throw makeException(TypeError, \"is not an object\", options);\n }\n\n return value;\n};\n\nconst abByteLengthGetter = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, \"byteLength\").get;\nconst sabByteLengthGetter = Object.getOwnPropertyDescriptor(SharedArrayBuffer.prototype, \"byteLength\").get;\n\nfunction isNonSharedArrayBuffer(value) {\n try {\n abByteLengthGetter.call(value);\n return true;\n } catch {\n return false;\n }\n}\n\nfunction isSharedArrayBuffer(value) {\n try {\n sabByteLengthGetter.call(value);\n return true;\n } catch {\n return false;\n }\n}\n\nconst abResizableGetter = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, \"resizable\").get;\nconst sabGrowableGetter = Object.getOwnPropertyDescriptor(SharedArrayBuffer.prototype, \"growable\").get;\n\nfunction isNonSharedArrayBufferResizable(value) {\n try {\n return abResizableGetter.call(value);\n } catch {\n return false;\n }\n}\n\nfunction isSharedArrayBufferGrowable(value) {\n try {\n return sabGrowableGetter.call(value);\n } catch {\n return false;\n }\n}\n\nfunction isArrayBufferDetached(value) {\n try {\n // eslint-disable-next-line no-new\n new Uint8Array(value);\n return false;\n } catch {\n return true;\n }\n}\n\nexports.ArrayBuffer = (value, options = {}) => {\n if (!isNonSharedArrayBuffer(value)) {\n throw makeException(TypeError, \"is not an ArrayBuffer\", options);\n }\n if (!options.allowResizable && isNonSharedArrayBufferResizable(value)) {\n throw makeException(TypeError, \"is a resizable ArrayBuffer\", options);\n }\n if (isArrayBufferDetached(value)) {\n throw makeException(TypeError, \"is a detached ArrayBuffer\", options);\n }\n\n return value;\n};\n\nexports.SharedArrayBuffer = (value, options = {}) => {\n if (!isSharedArrayBuffer(value)) {\n throw makeException(TypeError, \"is not a SharedArrayBuffer\", options);\n }\n if (!options.allowResizable && isSharedArrayBufferGrowable(value)) {\n throw makeException(TypeError, \"is a growable SharedArrayBuffer\", options);\n }\n\n return value;\n};\n\nconst dvByteLengthGetter =\n Object.getOwnPropertyDescriptor(DataView.prototype, \"byteLength\").get;\nexports.DataView = (value, options = {}) => {\n try {\n dvByteLengthGetter.call(value);\n } catch {\n throw makeException(TypeError, \"is not a DataView\", options);\n }\n return exports.ArrayBufferView(value, options);\n};\n\n// Returns the unforgeable `TypedArray` constructor name or `undefined`,\n// if the `this` value isn't a valid `TypedArray` object.\n//\n// https://tc39.es/ecma262/#sec-get-%typedarray%.prototype-@@tostringtag\nconst typedArrayNameGetter = Object.getOwnPropertyDescriptor(\n Object.getPrototypeOf(Uint8Array).prototype,\n Symbol.toStringTag\n).get;\n[\n Int8Array,\n Int16Array,\n Int32Array,\n Uint8Array,\n Uint16Array,\n Uint32Array,\n Uint8ClampedArray,\n Float32Array,\n Float64Array\n].forEach(func => {\n const { name } = func;\n const article = /^[AEIOU]/u.test(name) ? \"an\" : \"a\";\n exports[name] = (value, options = {}) => {\n if (!ArrayBuffer.isView(value) || typedArrayNameGetter.call(value) !== name) {\n throw makeException(TypeError, `is not ${article} ${name} object`, options);\n }\n return exports.ArrayBufferView(value, options);\n };\n});\n\n// Common definitions\n\nexports.ArrayBufferView = (value, options = {}) => {\n if (!ArrayBuffer.isView(value)) {\n throw makeException(TypeError, \"is not a view on an ArrayBuffer or SharedArrayBuffer\", options);\n }\n\n if (!options.allowShared && isSharedArrayBuffer(value.buffer)) {\n throw makeException(TypeError, \"is a view on a SharedArrayBuffer, which is not allowed\", options);\n }\n\n if (!options.allowResizable) {\n if (isNonSharedArrayBufferResizable(value.buffer)) {\n throw makeException(TypeError, \"is a view on a resizable ArrayBuffer, which is not allowed\", options);\n } else if (isSharedArrayBufferGrowable(value.buffer)) {\n throw makeException(TypeError, \"is a view on a growable SharedArrayBuffer, which is not allowed\", options);\n }\n }\n\n if (isArrayBufferDetached(value.buffer)) {\n throw makeException(TypeError, \"is a view on a detached ArrayBuffer\", options);\n }\n return value;\n};\n\nexports.BufferSource = (value, options = {}) => {\n if (ArrayBuffer.isView(value)) {\n return exports.ArrayBufferView(value, options);\n }\n\n if (isNonSharedArrayBuffer(value)) {\n return exports.ArrayBuffer(value, options);\n } else if (options.allowShared && isSharedArrayBuffer(value)) {\n return exports.SharedArrayBuffer(value, options);\n }\n\n if (options.allowShared) {\n throw makeException(TypeError, \"is not an ArrayBuffer, SharedArrayBuffer, or a view on one\", options);\n } else {\n throw makeException(TypeError, \"is not an ArrayBuffer or a view on one\", options);\n }\n};\n\nexports.DOMTimeStamp = exports[\"unsigned long long\"];\n","\"use strict\";\n\nconst conversions = require(\"webidl-conversions\");\nconst utils = require(\"./utils.js\");\n\nexports.convert = (globalObject, value, { context = \"The provided value\" } = {}) => {\n if (typeof value !== \"function\") {\n throw new globalObject.TypeError(context + \" is not a function\");\n }\n\n function invokeTheCallbackFunction(...args) {\n const thisArg = utils.tryWrapperForImpl(this);\n let callResult;\n\n for (let i = 0; i < args.length; i++) {\n args[i] = utils.tryWrapperForImpl(args[i]);\n }\n\n callResult = Reflect.apply(value, thisArg, args);\n\n callResult = conversions[\"any\"](callResult, { context: context, globals: globalObject });\n\n return callResult;\n }\n\n invokeTheCallbackFunction.construct = (...args) => {\n for (let i = 0; i < args.length; i++) {\n args[i] = utils.tryWrapperForImpl(args[i]);\n }\n\n let callResult = Reflect.construct(value, args);\n\n callResult = conversions[\"any\"](callResult, { context: context, globals: globalObject });\n\n return callResult;\n };\n\n invokeTheCallbackFunction[utils.wrapperSymbol] = value;\n invokeTheCallbackFunction.objectReference = value;\n\n return invokeTheCallbackFunction;\n};\n","\"use strict\";\nconst usm = require(\"./url-state-machine\");\nconst urlencoded = require(\"./urlencoded\");\nconst URLSearchParams = require(\"./URLSearchParams\");\nconst URL = require(\"./URL\");\n\nexports.implementation = class URLImpl {\n // Unlike the spec, we duplicate some code between the constructor and canParse, because we want to give useful error\n // messages in the constructor that distinguish between the different causes of failure.\n constructor(globalObject, [url, base]) {\n let parsedBase = null;\n if (base !== undefined) {\n parsedBase = usm.basicURLParse(base);\n if (parsedBase === null) {\n throw new TypeError(`Invalid base URL: ${base}`);\n }\n }\n\n const parsedURL = usm.basicURLParse(url, { baseURL: parsedBase });\n if (parsedURL === null) {\n throw new TypeError(`Invalid URL: ${url}`);\n }\n\n const query = parsedURL.query !== null ? parsedURL.query : \"\";\n\n this._url = parsedURL;\n\n // We cannot invoke the \"new URLSearchParams object\" algorithm without going through the constructor, which strips\n // question mark by default. Therefore the doNotStripQMark hack is used.\n this._query = URLSearchParams.createImpl(globalObject, [query], { doNotStripQMark: true });\n this._query._url = this;\n }\n\n static parse(globalObject, input, base) {\n try {\n return URL.createImpl(globalObject, [input, base]);\n } catch {\n return null;\n }\n }\n\n static canParse(url, base) {\n let parsedBase = null;\n if (base !== undefined) {\n parsedBase = usm.basicURLParse(base);\n if (parsedBase === null) {\n return false;\n }\n }\n\n const parsedURL = usm.basicURLParse(url, { baseURL: parsedBase });\n if (parsedURL === null) {\n return false;\n }\n\n return true;\n }\n\n get href() {\n return usm.serializeURL(this._url);\n }\n\n set href(v) {\n const parsedURL = usm.basicURLParse(v);\n if (parsedURL === null) {\n throw new TypeError(`Invalid URL: ${v}`);\n }\n\n this._url = parsedURL;\n\n this._query._list.splice(0);\n const { query } = parsedURL;\n if (query !== null) {\n this._query._list = urlencoded.parseUrlencodedString(query);\n }\n }\n\n get origin() {\n return usm.serializeURLOrigin(this._url);\n }\n\n get protocol() {\n return `${this._url.scheme}:`;\n }\n\n set protocol(v) {\n usm.basicURLParse(`${v}:`, { url: this._url, stateOverride: \"scheme start\" });\n }\n\n get username() {\n return this._url.username;\n }\n\n set username(v) {\n if (usm.cannotHaveAUsernamePasswordPort(this._url)) {\n return;\n }\n\n usm.setTheUsername(this._url, v);\n }\n\n get password() {\n return this._url.password;\n }\n\n set password(v) {\n if (usm.cannotHaveAUsernamePasswordPort(this._url)) {\n return;\n }\n\n usm.setThePassword(this._url, v);\n }\n\n get host() {\n const url = this._url;\n\n if (url.host === null) {\n return \"\";\n }\n\n if (url.port === null) {\n return usm.serializeHost(url.host);\n }\n\n return `${usm.serializeHost(url.host)}:${usm.serializeInteger(url.port)}`;\n }\n\n set host(v) {\n if (usm.hasAnOpaquePath(this._url)) {\n return;\n }\n\n usm.basicURLParse(v, { url: this._url, stateOverride: \"host\" });\n }\n\n get hostname() {\n if (this._url.host === null) {\n return \"\";\n }\n\n return usm.serializeHost(this._url.host);\n }\n\n set hostname(v) {\n if (usm.hasAnOpaquePath(this._url)) {\n return;\n }\n\n usm.basicURLParse(v, { url: this._url, stateOverride: \"hostname\" });\n }\n\n get port() {\n if (this._url.port === null) {\n return \"\";\n }\n\n return usm.serializeInteger(this._url.port);\n }\n\n set port(v) {\n if (usm.cannotHaveAUsernamePasswordPort(this._url)) {\n return;\n }\n\n if (v === \"\") {\n this._url.port = null;\n } else {\n usm.basicURLParse(v, { url: this._url, stateOverride: \"port\" });\n }\n }\n\n get pathname() {\n return usm.serializePath(this._url);\n }\n\n set pathname(v) {\n if (usm.hasAnOpaquePath(this._url)) {\n return;\n }\n\n this._url.path = [];\n usm.basicURLParse(v, { url: this._url, stateOverride: \"path start\" });\n }\n\n get search() {\n if (this._url.query === null || this._url.query === \"\") {\n return \"\";\n }\n\n return `?${this._url.query}`;\n }\n\n set search(v) {\n const url = this._url;\n\n if (v === \"\") {\n url.query = null;\n this._query._list = [];\n return;\n }\n\n const input = v[0] === \"?\" ? v.substring(1) : v;\n url.query = \"\";\n usm.basicURLParse(input, { url, stateOverride: \"query\" });\n this._query._list = urlencoded.parseUrlencodedString(input);\n }\n\n get searchParams() {\n return this._query;\n }\n\n get hash() {\n if (this._url.fragment === null || this._url.fragment === \"\") {\n return \"\";\n }\n\n return `#${this._url.fragment}`;\n }\n\n set hash(v) {\n if (v === \"\") {\n this._url.fragment = null;\n return;\n }\n\n const input = v[0] === \"#\" ? v.substring(1) : v;\n this._url.fragment = \"\";\n usm.basicURLParse(input, { url: this._url, stateOverride: \"fragment\" });\n }\n\n toJSON() {\n return this.href;\n }\n};\n","\"use strict\";\n\nconst conversions = require(\"webidl-conversions\");\nconst utils = require(\"./utils.js\");\n\nconst implSymbol = utils.implSymbol;\nconst ctorRegistrySymbol = utils.ctorRegistrySymbol;\n\nconst interfaceName = \"URL\";\n\nexports.is = value => {\n return utils.isObject(value) && Object.hasOwn(value, implSymbol) && value[implSymbol] instanceof Impl.implementation;\n};\nexports.isImpl = value => {\n return utils.isObject(value) && value instanceof Impl.implementation;\n};\nexports.convert = (globalObject, value, { context = \"The provided value\" } = {}) => {\n if (exports.is(value)) {\n return utils.implForWrapper(value);\n }\n throw new globalObject.TypeError(`${context} is not of type 'URL'.`);\n};\n\nfunction makeWrapper(globalObject, newTarget) {\n let proto;\n if (newTarget !== undefined) {\n proto = newTarget.prototype;\n }\n\n if (!utils.isObject(proto)) {\n proto = globalObject[ctorRegistrySymbol][\"URL\"].prototype;\n }\n\n return Object.create(proto);\n}\n\nexports.create = (globalObject, constructorArgs, privateData) => {\n const wrapper = makeWrapper(globalObject);\n return exports.setup(wrapper, globalObject, constructorArgs, privateData);\n};\n\nexports.createImpl = (globalObject, constructorArgs, privateData) => {\n const wrapper = exports.create(globalObject, constructorArgs, privateData);\n return utils.implForWrapper(wrapper);\n};\n\nexports._internalSetup = (wrapper, globalObject) => {};\n\nexports.setup = (wrapper, globalObject, constructorArgs = [], privateData = {}) => {\n privateData.wrapper = wrapper;\n\n exports._internalSetup(wrapper, globalObject);\n Object.defineProperty(wrapper, implSymbol, {\n value: new Impl.implementation(globalObject, constructorArgs, privateData),\n configurable: true\n });\n\n wrapper[implSymbol][utils.wrapperSymbol] = wrapper;\n if (Impl.init) {\n Impl.init(wrapper[implSymbol]);\n }\n return wrapper;\n};\n\nexports.new = (globalObject, newTarget) => {\n const wrapper = makeWrapper(globalObject, newTarget);\n\n exports._internalSetup(wrapper, globalObject);\n Object.defineProperty(wrapper, implSymbol, {\n value: Object.create(Impl.implementation.prototype),\n configurable: true\n });\n\n wrapper[implSymbol][utils.wrapperSymbol] = wrapper;\n if (Impl.init) {\n Impl.init(wrapper[implSymbol]);\n }\n return wrapper[implSymbol];\n};\n\nconst exposed = new Set([\"Window\", \"Worker\"]);\n\nexports.install = (globalObject, globalNames) => {\n if (!globalNames.some(globalName => exposed.has(globalName))) {\n return;\n }\n\n const ctorRegistry = utils.initCtorRegistry(globalObject);\n class URL {\n constructor(url) {\n if (arguments.length < 1) {\n throw new globalObject.TypeError(\n `Failed to construct 'URL': 1 argument required, but only ${arguments.length} present.`\n );\n }\n const args = [];\n {\n let curArg = arguments[0];\n curArg = conversions[\"USVString\"](curArg, {\n context: \"Failed to construct 'URL': parameter 1\",\n globals: globalObject\n });\n args.push(curArg);\n }\n {\n let curArg = arguments[1];\n if (curArg !== undefined) {\n curArg = conversions[\"USVString\"](curArg, {\n context: \"Failed to construct 'URL': parameter 2\",\n globals: globalObject\n });\n }\n args.push(curArg);\n }\n return exports.setup(Object.create(new.target.prototype), globalObject, args);\n }\n\n toJSON() {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'toJSON' called on an object that is not a valid instance of URL.\");\n }\n\n return esValue[implSymbol].toJSON();\n }\n\n get href() {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'get href' called on an object that is not a valid instance of URL.\");\n }\n\n return esValue[implSymbol][\"href\"];\n }\n\n set href(V) {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'set href' called on an object that is not a valid instance of URL.\");\n }\n\n V = conversions[\"USVString\"](V, {\n context: \"Failed to set the 'href' property on 'URL': The provided value\",\n globals: globalObject\n });\n\n esValue[implSymbol][\"href\"] = V;\n }\n\n toString() {\n const esValue = this;\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'toString' called on an object that is not a valid instance of URL.\");\n }\n\n return esValue[implSymbol][\"href\"];\n }\n\n get origin() {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'get origin' called on an object that is not a valid instance of URL.\");\n }\n\n return esValue[implSymbol][\"origin\"];\n }\n\n get protocol() {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'get protocol' called on an object that is not a valid instance of URL.\");\n }\n\n return esValue[implSymbol][\"protocol\"];\n }\n\n set protocol(V) {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'set protocol' called on an object that is not a valid instance of URL.\");\n }\n\n V = conversions[\"USVString\"](V, {\n context: \"Failed to set the 'protocol' property on 'URL': The provided value\",\n globals: globalObject\n });\n\n esValue[implSymbol][\"protocol\"] = V;\n }\n\n get username() {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'get username' called on an object that is not a valid instance of URL.\");\n }\n\n return esValue[implSymbol][\"username\"];\n }\n\n set username(V) {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'set username' called on an object that is not a valid instance of URL.\");\n }\n\n V = conversions[\"USVString\"](V, {\n context: \"Failed to set the 'username' property on 'URL': The provided value\",\n globals: globalObject\n });\n\n esValue[implSymbol][\"username\"] = V;\n }\n\n get password() {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'get password' called on an object that is not a valid instance of URL.\");\n }\n\n return esValue[implSymbol][\"password\"];\n }\n\n set password(V) {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'set password' called on an object that is not a valid instance of URL.\");\n }\n\n V = conversions[\"USVString\"](V, {\n context: \"Failed to set the 'password' property on 'URL': The provided value\",\n globals: globalObject\n });\n\n esValue[implSymbol][\"password\"] = V;\n }\n\n get host() {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'get host' called on an object that is not a valid instance of URL.\");\n }\n\n return esValue[implSymbol][\"host\"];\n }\n\n set host(V) {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'set host' called on an object that is not a valid instance of URL.\");\n }\n\n V = conversions[\"USVString\"](V, {\n context: \"Failed to set the 'host' property on 'URL': The provided value\",\n globals: globalObject\n });\n\n esValue[implSymbol][\"host\"] = V;\n }\n\n get hostname() {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'get hostname' called on an object that is not a valid instance of URL.\");\n }\n\n return esValue[implSymbol][\"hostname\"];\n }\n\n set hostname(V) {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'set hostname' called on an object that is not a valid instance of URL.\");\n }\n\n V = conversions[\"USVString\"](V, {\n context: \"Failed to set the 'hostname' property on 'URL': The provided value\",\n globals: globalObject\n });\n\n esValue[implSymbol][\"hostname\"] = V;\n }\n\n get port() {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'get port' called on an object that is not a valid instance of URL.\");\n }\n\n return esValue[implSymbol][\"port\"];\n }\n\n set port(V) {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'set port' called on an object that is not a valid instance of URL.\");\n }\n\n V = conversions[\"USVString\"](V, {\n context: \"Failed to set the 'port' property on 'URL': The provided value\",\n globals: globalObject\n });\n\n esValue[implSymbol][\"port\"] = V;\n }\n\n get pathname() {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'get pathname' called on an object that is not a valid instance of URL.\");\n }\n\n return esValue[implSymbol][\"pathname\"];\n }\n\n set pathname(V) {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'set pathname' called on an object that is not a valid instance of URL.\");\n }\n\n V = conversions[\"USVString\"](V, {\n context: \"Failed to set the 'pathname' property on 'URL': The provided value\",\n globals: globalObject\n });\n\n esValue[implSymbol][\"pathname\"] = V;\n }\n\n get search() {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'get search' called on an object that is not a valid instance of URL.\");\n }\n\n return esValue[implSymbol][\"search\"];\n }\n\n set search(V) {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'set search' called on an object that is not a valid instance of URL.\");\n }\n\n V = conversions[\"USVString\"](V, {\n context: \"Failed to set the 'search' property on 'URL': The provided value\",\n globals: globalObject\n });\n\n esValue[implSymbol][\"search\"] = V;\n }\n\n get searchParams() {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'get searchParams' called on an object that is not a valid instance of URL.\");\n }\n\n return utils.getSameObject(this, \"searchParams\", () => {\n return utils.tryWrapperForImpl(esValue[implSymbol][\"searchParams\"]);\n });\n }\n\n get hash() {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'get hash' called on an object that is not a valid instance of URL.\");\n }\n\n return esValue[implSymbol][\"hash\"];\n }\n\n set hash(V) {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'set hash' called on an object that is not a valid instance of URL.\");\n }\n\n V = conversions[\"USVString\"](V, {\n context: \"Failed to set the 'hash' property on 'URL': The provided value\",\n globals: globalObject\n });\n\n esValue[implSymbol][\"hash\"] = V;\n }\n\n static parse(url) {\n if (arguments.length < 1) {\n throw new globalObject.TypeError(\n `Failed to execute 'parse' on 'URL': 1 argument required, but only ${arguments.length} present.`\n );\n }\n const args = [];\n {\n let curArg = arguments[0];\n curArg = conversions[\"USVString\"](curArg, {\n context: \"Failed to execute 'parse' on 'URL': parameter 1\",\n globals: globalObject\n });\n args.push(curArg);\n }\n {\n let curArg = arguments[1];\n if (curArg !== undefined) {\n curArg = conversions[\"USVString\"](curArg, {\n context: \"Failed to execute 'parse' on 'URL': parameter 2\",\n globals: globalObject\n });\n }\n args.push(curArg);\n }\n return utils.tryWrapperForImpl(Impl.implementation.parse(globalObject, ...args));\n }\n\n static canParse(url) {\n if (arguments.length < 1) {\n throw new globalObject.TypeError(\n `Failed to execute 'canParse' on 'URL': 1 argument required, but only ${arguments.length} present.`\n );\n }\n const args = [];\n {\n let curArg = arguments[0];\n curArg = conversions[\"USVString\"](curArg, {\n context: \"Failed to execute 'canParse' on 'URL': parameter 1\",\n globals: globalObject\n });\n args.push(curArg);\n }\n {\n let curArg = arguments[1];\n if (curArg !== undefined) {\n curArg = conversions[\"USVString\"](curArg, {\n context: \"Failed to execute 'canParse' on 'URL': parameter 2\",\n globals: globalObject\n });\n }\n args.push(curArg);\n }\n return Impl.implementation.canParse(...args);\n }\n }\n Object.defineProperties(URL.prototype, {\n toJSON: { enumerable: true },\n href: { enumerable: true },\n toString: { enumerable: true },\n origin: { enumerable: true },\n protocol: { enumerable: true },\n username: { enumerable: true },\n password: { enumerable: true },\n host: { enumerable: true },\n hostname: { enumerable: true },\n port: { enumerable: true },\n pathname: { enumerable: true },\n search: { enumerable: true },\n searchParams: { enumerable: true },\n hash: { enumerable: true },\n [Symbol.toStringTag]: { value: \"URL\", configurable: true }\n });\n Object.defineProperties(URL, { parse: { enumerable: true }, canParse: { enumerable: true } });\n ctorRegistry[interfaceName] = URL;\n\n Object.defineProperty(globalObject, interfaceName, {\n configurable: true,\n writable: true,\n value: URL\n });\n\n if (globalNames.includes(\"Window\")) {\n Object.defineProperty(globalObject, \"webkitURL\", {\n configurable: true,\n writable: true,\n value: URL\n });\n }\n};\n\nconst Impl = require(\"./URL-impl.js\");\n","\"use strict\";\nconst urlencoded = require(\"./urlencoded\");\n\nexports.implementation = class URLSearchParamsImpl {\n constructor(globalObject, constructorArgs, { doNotStripQMark = false }) {\n let init = constructorArgs[0];\n this._list = [];\n this._url = null;\n\n if (!doNotStripQMark && typeof init === \"string\" && init[0] === \"?\") {\n init = init.slice(1);\n }\n\n if (Array.isArray(init)) {\n for (const pair of init) {\n if (pair.length !== 2) {\n throw new TypeError(\"Failed to construct 'URLSearchParams': parameter 1 sequence's element does not \" +\n \"contain exactly two elements.\");\n }\n this._list.push([pair[0], pair[1]]);\n }\n } else if (typeof init === \"object\" && Object.getPrototypeOf(init) === null) {\n for (const name of Object.keys(init)) {\n const value = init[name];\n this._list.push([name, value]);\n }\n } else {\n this._list = urlencoded.parseUrlencodedString(init);\n }\n }\n\n _updateSteps() {\n if (this._url !== null) {\n let serializedQuery = urlencoded.serializeUrlencoded(this._list);\n if (serializedQuery === \"\") {\n serializedQuery = null;\n }\n\n this._url._url.query = serializedQuery;\n }\n }\n\n get size() {\n return this._list.length;\n }\n\n append(name, value) {\n this._list.push([name, value]);\n this._updateSteps();\n }\n\n delete(name, value) {\n let i = 0;\n while (i < this._list.length) {\n if (this._list[i][0] === name && (value === undefined || this._list[i][1] === value)) {\n this._list.splice(i, 1);\n } else {\n i++;\n }\n }\n this._updateSteps();\n }\n\n get(name) {\n for (const tuple of this._list) {\n if (tuple[0] === name) {\n return tuple[1];\n }\n }\n return null;\n }\n\n getAll(name) {\n const output = [];\n for (const tuple of this._list) {\n if (tuple[0] === name) {\n output.push(tuple[1]);\n }\n }\n return output;\n }\n\n has(name, value) {\n for (const tuple of this._list) {\n if (tuple[0] === name && (value === undefined || tuple[1] === value)) {\n return true;\n }\n }\n return false;\n }\n\n set(name, value) {\n let found = false;\n let i = 0;\n while (i < this._list.length) {\n if (this._list[i][0] === name) {\n if (found) {\n this._list.splice(i, 1);\n } else {\n found = true;\n this._list[i][1] = value;\n i++;\n }\n } else {\n i++;\n }\n }\n if (!found) {\n this._list.push([name, value]);\n }\n this._updateSteps();\n }\n\n sort() {\n this._list.sort((a, b) => {\n if (a[0] < b[0]) {\n return -1;\n }\n if (a[0] > b[0]) {\n return 1;\n }\n return 0;\n });\n\n this._updateSteps();\n }\n\n [Symbol.iterator]() {\n return this._list[Symbol.iterator]();\n }\n\n toString() {\n return urlencoded.serializeUrlencoded(this._list);\n }\n};\n","\"use strict\";\n\nconst conversions = require(\"webidl-conversions\");\nconst utils = require(\"./utils.js\");\n\nconst Function = require(\"./Function.js\");\nconst newObjectInRealm = utils.newObjectInRealm;\nconst implSymbol = utils.implSymbol;\nconst ctorRegistrySymbol = utils.ctorRegistrySymbol;\n\nconst interfaceName = \"URLSearchParams\";\n\nexports.is = value => {\n return utils.isObject(value) && Object.hasOwn(value, implSymbol) && value[implSymbol] instanceof Impl.implementation;\n};\nexports.isImpl = value => {\n return utils.isObject(value) && value instanceof Impl.implementation;\n};\nexports.convert = (globalObject, value, { context = \"The provided value\" } = {}) => {\n if (exports.is(value)) {\n return utils.implForWrapper(value);\n }\n throw new globalObject.TypeError(`${context} is not of type 'URLSearchParams'.`);\n};\n\nexports.createDefaultIterator = (globalObject, target, kind) => {\n const ctorRegistry = globalObject[ctorRegistrySymbol];\n const iteratorPrototype = ctorRegistry[\"URLSearchParams Iterator\"];\n const iterator = Object.create(iteratorPrototype);\n Object.defineProperty(iterator, utils.iterInternalSymbol, {\n value: { target, kind, index: 0 },\n configurable: true\n });\n return iterator;\n};\n\nfunction makeWrapper(globalObject, newTarget) {\n let proto;\n if (newTarget !== undefined) {\n proto = newTarget.prototype;\n }\n\n if (!utils.isObject(proto)) {\n proto = globalObject[ctorRegistrySymbol][\"URLSearchParams\"].prototype;\n }\n\n return Object.create(proto);\n}\n\nexports.create = (globalObject, constructorArgs, privateData) => {\n const wrapper = makeWrapper(globalObject);\n return exports.setup(wrapper, globalObject, constructorArgs, privateData);\n};\n\nexports.createImpl = (globalObject, constructorArgs, privateData) => {\n const wrapper = exports.create(globalObject, constructorArgs, privateData);\n return utils.implForWrapper(wrapper);\n};\n\nexports._internalSetup = (wrapper, globalObject) => {};\n\nexports.setup = (wrapper, globalObject, constructorArgs = [], privateData = {}) => {\n privateData.wrapper = wrapper;\n\n exports._internalSetup(wrapper, globalObject);\n Object.defineProperty(wrapper, implSymbol, {\n value: new Impl.implementation(globalObject, constructorArgs, privateData),\n configurable: true\n });\n\n wrapper[implSymbol][utils.wrapperSymbol] = wrapper;\n if (Impl.init) {\n Impl.init(wrapper[implSymbol]);\n }\n return wrapper;\n};\n\nexports.new = (globalObject, newTarget) => {\n const wrapper = makeWrapper(globalObject, newTarget);\n\n exports._internalSetup(wrapper, globalObject);\n Object.defineProperty(wrapper, implSymbol, {\n value: Object.create(Impl.implementation.prototype),\n configurable: true\n });\n\n wrapper[implSymbol][utils.wrapperSymbol] = wrapper;\n if (Impl.init) {\n Impl.init(wrapper[implSymbol]);\n }\n return wrapper[implSymbol];\n};\n\nconst exposed = new Set([\"Window\", \"Worker\"]);\n\nexports.install = (globalObject, globalNames) => {\n if (!globalNames.some(globalName => exposed.has(globalName))) {\n return;\n }\n\n const ctorRegistry = utils.initCtorRegistry(globalObject);\n class URLSearchParams {\n constructor() {\n const args = [];\n {\n let curArg = arguments[0];\n if (curArg !== undefined) {\n if (utils.isObject(curArg)) {\n if (\n utils.getMethod(curArg, Symbol.iterator, \"Failed to construct 'URLSearchParams': parameter 1\") !==\n undefined\n ) {\n if (!utils.isObject(curArg)) {\n throw new globalObject.TypeError(\n \"Failed to construct 'URLSearchParams': parameter 1\" + \" sequence\" + \" is not an iterable object.\"\n );\n } else {\n const V = [];\n const tmp = curArg;\n for (let nextItem of tmp) {\n if (!utils.isObject(nextItem)) {\n throw new globalObject.TypeError(\n \"Failed to construct 'URLSearchParams': parameter 1\" +\n \" sequence\" +\n \"'s element\" +\n \" is not an iterable object.\"\n );\n } else {\n const V = [];\n const tmp = nextItem;\n for (let nextItem of tmp) {\n nextItem = conversions[\"USVString\"](nextItem, {\n context:\n \"Failed to construct 'URLSearchParams': parameter 1\" +\n \" sequence\" +\n \"'s element\" +\n \"'s element\",\n globals: globalObject\n });\n\n V.push(nextItem);\n }\n nextItem = V;\n }\n\n V.push(nextItem);\n }\n curArg = V;\n }\n } else {\n if (!utils.isObject(curArg)) {\n throw new globalObject.TypeError(\n \"Failed to construct 'URLSearchParams': parameter 1\" + \" record\" + \" is not an object.\"\n );\n } else {\n const result = Object.create(null);\n for (const key of Reflect.ownKeys(curArg)) {\n const desc = Object.getOwnPropertyDescriptor(curArg, key);\n if (desc && desc.enumerable) {\n let typedKey = key;\n\n typedKey = conversions[\"USVString\"](typedKey, {\n context: \"Failed to construct 'URLSearchParams': parameter 1\" + \" record\" + \"'s key\",\n globals: globalObject\n });\n\n let typedValue = curArg[key];\n\n typedValue = conversions[\"USVString\"](typedValue, {\n context: \"Failed to construct 'URLSearchParams': parameter 1\" + \" record\" + \"'s value\",\n globals: globalObject\n });\n\n result[typedKey] = typedValue;\n }\n }\n curArg = result;\n }\n }\n } else {\n curArg = conversions[\"USVString\"](curArg, {\n context: \"Failed to construct 'URLSearchParams': parameter 1\",\n globals: globalObject\n });\n }\n } else {\n curArg = \"\";\n }\n args.push(curArg);\n }\n return exports.setup(Object.create(new.target.prototype), globalObject, args);\n }\n\n append(name, value) {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\n \"'append' called on an object that is not a valid instance of URLSearchParams.\"\n );\n }\n\n if (arguments.length < 2) {\n throw new globalObject.TypeError(\n `Failed to execute 'append' on 'URLSearchParams': 2 arguments required, but only ${arguments.length} present.`\n );\n }\n const args = [];\n {\n let curArg = arguments[0];\n curArg = conversions[\"USVString\"](curArg, {\n context: \"Failed to execute 'append' on 'URLSearchParams': parameter 1\",\n globals: globalObject\n });\n args.push(curArg);\n }\n {\n let curArg = arguments[1];\n curArg = conversions[\"USVString\"](curArg, {\n context: \"Failed to execute 'append' on 'URLSearchParams': parameter 2\",\n globals: globalObject\n });\n args.push(curArg);\n }\n return utils.tryWrapperForImpl(esValue[implSymbol].append(...args));\n }\n\n delete(name) {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\n \"'delete' called on an object that is not a valid instance of URLSearchParams.\"\n );\n }\n\n if (arguments.length < 1) {\n throw new globalObject.TypeError(\n `Failed to execute 'delete' on 'URLSearchParams': 1 argument required, but only ${arguments.length} present.`\n );\n }\n const args = [];\n {\n let curArg = arguments[0];\n curArg = conversions[\"USVString\"](curArg, {\n context: \"Failed to execute 'delete' on 'URLSearchParams': parameter 1\",\n globals: globalObject\n });\n args.push(curArg);\n }\n {\n let curArg = arguments[1];\n if (curArg !== undefined) {\n curArg = conversions[\"USVString\"](curArg, {\n context: \"Failed to execute 'delete' on 'URLSearchParams': parameter 2\",\n globals: globalObject\n });\n }\n args.push(curArg);\n }\n return utils.tryWrapperForImpl(esValue[implSymbol].delete(...args));\n }\n\n get(name) {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'get' called on an object that is not a valid instance of URLSearchParams.\");\n }\n\n if (arguments.length < 1) {\n throw new globalObject.TypeError(\n `Failed to execute 'get' on 'URLSearchParams': 1 argument required, but only ${arguments.length} present.`\n );\n }\n const args = [];\n {\n let curArg = arguments[0];\n curArg = conversions[\"USVString\"](curArg, {\n context: \"Failed to execute 'get' on 'URLSearchParams': parameter 1\",\n globals: globalObject\n });\n args.push(curArg);\n }\n return esValue[implSymbol].get(...args);\n }\n\n getAll(name) {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\n \"'getAll' called on an object that is not a valid instance of URLSearchParams.\"\n );\n }\n\n if (arguments.length < 1) {\n throw new globalObject.TypeError(\n `Failed to execute 'getAll' on 'URLSearchParams': 1 argument required, but only ${arguments.length} present.`\n );\n }\n const args = [];\n {\n let curArg = arguments[0];\n curArg = conversions[\"USVString\"](curArg, {\n context: \"Failed to execute 'getAll' on 'URLSearchParams': parameter 1\",\n globals: globalObject\n });\n args.push(curArg);\n }\n return utils.tryWrapperForImpl(esValue[implSymbol].getAll(...args));\n }\n\n has(name) {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'has' called on an object that is not a valid instance of URLSearchParams.\");\n }\n\n if (arguments.length < 1) {\n throw new globalObject.TypeError(\n `Failed to execute 'has' on 'URLSearchParams': 1 argument required, but only ${arguments.length} present.`\n );\n }\n const args = [];\n {\n let curArg = arguments[0];\n curArg = conversions[\"USVString\"](curArg, {\n context: \"Failed to execute 'has' on 'URLSearchParams': parameter 1\",\n globals: globalObject\n });\n args.push(curArg);\n }\n {\n let curArg = arguments[1];\n if (curArg !== undefined) {\n curArg = conversions[\"USVString\"](curArg, {\n context: \"Failed to execute 'has' on 'URLSearchParams': parameter 2\",\n globals: globalObject\n });\n }\n args.push(curArg);\n }\n return esValue[implSymbol].has(...args);\n }\n\n set(name, value) {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'set' called on an object that is not a valid instance of URLSearchParams.\");\n }\n\n if (arguments.length < 2) {\n throw new globalObject.TypeError(\n `Failed to execute 'set' on 'URLSearchParams': 2 arguments required, but only ${arguments.length} present.`\n );\n }\n const args = [];\n {\n let curArg = arguments[0];\n curArg = conversions[\"USVString\"](curArg, {\n context: \"Failed to execute 'set' on 'URLSearchParams': parameter 1\",\n globals: globalObject\n });\n args.push(curArg);\n }\n {\n let curArg = arguments[1];\n curArg = conversions[\"USVString\"](curArg, {\n context: \"Failed to execute 'set' on 'URLSearchParams': parameter 2\",\n globals: globalObject\n });\n args.push(curArg);\n }\n return utils.tryWrapperForImpl(esValue[implSymbol].set(...args));\n }\n\n sort() {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\"'sort' called on an object that is not a valid instance of URLSearchParams.\");\n }\n\n return utils.tryWrapperForImpl(esValue[implSymbol].sort());\n }\n\n toString() {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\n \"'toString' called on an object that is not a valid instance of URLSearchParams.\"\n );\n }\n\n return esValue[implSymbol].toString();\n }\n\n keys() {\n if (!exports.is(this)) {\n throw new globalObject.TypeError(\"'keys' called on an object that is not a valid instance of URLSearchParams.\");\n }\n return exports.createDefaultIterator(globalObject, this, \"key\");\n }\n\n values() {\n if (!exports.is(this)) {\n throw new globalObject.TypeError(\n \"'values' called on an object that is not a valid instance of URLSearchParams.\"\n );\n }\n return exports.createDefaultIterator(globalObject, this, \"value\");\n }\n\n entries() {\n if (!exports.is(this)) {\n throw new globalObject.TypeError(\n \"'entries' called on an object that is not a valid instance of URLSearchParams.\"\n );\n }\n return exports.createDefaultIterator(globalObject, this, \"key+value\");\n }\n\n forEach(callback) {\n if (!exports.is(this)) {\n throw new globalObject.TypeError(\n \"'forEach' called on an object that is not a valid instance of URLSearchParams.\"\n );\n }\n if (arguments.length < 1) {\n throw new globalObject.TypeError(\n \"Failed to execute 'forEach' on 'iterable': 1 argument required, but only 0 present.\"\n );\n }\n callback = Function.convert(globalObject, callback, {\n context: \"Failed to execute 'forEach' on 'iterable': The callback provided as parameter 1\"\n });\n const thisArg = arguments[1];\n let pairs = Array.from(this[implSymbol]);\n let i = 0;\n while (i < pairs.length) {\n const [key, value] = pairs[i].map(utils.tryWrapperForImpl);\n callback.call(thisArg, value, key, this);\n pairs = Array.from(this[implSymbol]);\n i++;\n }\n }\n\n get size() {\n const esValue = this !== null && this !== undefined ? this : globalObject;\n\n if (!exports.is(esValue)) {\n throw new globalObject.TypeError(\n \"'get size' called on an object that is not a valid instance of URLSearchParams.\"\n );\n }\n\n return esValue[implSymbol][\"size\"];\n }\n }\n Object.defineProperties(URLSearchParams.prototype, {\n append: { enumerable: true },\n delete: { enumerable: true },\n get: { enumerable: true },\n getAll: { enumerable: true },\n has: { enumerable: true },\n set: { enumerable: true },\n sort: { enumerable: true },\n toString: { enumerable: true },\n keys: { enumerable: true },\n values: { enumerable: true },\n entries: { enumerable: true },\n forEach: { enumerable: true },\n size: { enumerable: true },\n [Symbol.toStringTag]: { value: \"URLSearchParams\", configurable: true },\n [Symbol.iterator]: { value: URLSearchParams.prototype.entries, configurable: true, writable: true }\n });\n ctorRegistry[interfaceName] = URLSearchParams;\n\n ctorRegistry[\"URLSearchParams Iterator\"] = Object.create(ctorRegistry[\"%IteratorPrototype%\"], {\n [Symbol.toStringTag]: {\n configurable: true,\n value: \"URLSearchParams Iterator\"\n }\n });\n utils.define(ctorRegistry[\"URLSearchParams Iterator\"], {\n next() {\n const internal = this && this[utils.iterInternalSymbol];\n if (!internal) {\n throw new globalObject.TypeError(\"next() called on a value that is not a URLSearchParams iterator object\");\n }\n\n const { target, kind, index } = internal;\n const values = Array.from(target[implSymbol]);\n const len = values.length;\n if (index >= len) {\n return newObjectInRealm(globalObject, { value: undefined, done: true });\n }\n\n const pair = values[index];\n internal.index = index + 1;\n return newObjectInRealm(globalObject, utils.iteratorResult(pair.map(utils.tryWrapperForImpl), kind));\n }\n });\n\n Object.defineProperty(globalObject, interfaceName, {\n configurable: true,\n writable: true,\n value: URLSearchParams\n });\n};\n\nconst Impl = require(\"./URLSearchParams-impl.js\");\n","\"use strict\";\nconst utf8Encoder = new TextEncoder();\nconst utf8Decoder = new TextDecoder(\"utf-8\", { ignoreBOM: true });\n\nfunction utf8Encode(string) {\n return utf8Encoder.encode(string);\n}\n\nfunction utf8DecodeWithoutBOM(bytes) {\n return utf8Decoder.decode(bytes);\n}\n\nmodule.exports = {\n utf8Encode,\n utf8DecodeWithoutBOM\n};\n","\"use strict\";\n\n// Note that we take code points as JS numbers, not JS strings.\n\nfunction isASCIIDigit(c) {\n return c >= 0x30 && c <= 0x39;\n}\n\nfunction isASCIIAlpha(c) {\n return (c >= 0x41 && c <= 0x5A) || (c >= 0x61 && c <= 0x7A);\n}\n\nfunction isASCIIAlphanumeric(c) {\n return isASCIIAlpha(c) || isASCIIDigit(c);\n}\n\nfunction isASCIIHex(c) {\n return isASCIIDigit(c) || (c >= 0x41 && c <= 0x46) || (c >= 0x61 && c <= 0x66);\n}\n\nfunction isASCIIString(string) {\n return !/[^\\u0000-\\u007F]/u.test(string);\n}\n\nfunction isNoncharacter(c) {\n return (c >= 0xFDD0 && c <= 0xFDEF) || (c & 0xFFFE) === 0xFFFE;\n}\n\nmodule.exports = {\n isASCIIDigit,\n isASCIIAlpha,\n isASCIIAlphanumeric,\n isASCIIHex,\n isASCIIString,\n isNoncharacter\n};\n","\"use strict\";\nconst { isASCIIHex } = require(\"./infra\");\nconst { utf8Encode } = require(\"./encoding\");\n\nfunction p(char) {\n return char.codePointAt(0);\n}\n\n// https://url.spec.whatwg.org/#percent-encode\nfunction percentEncode(c) {\n let hex = c.toString(16).toUpperCase();\n if (hex.length === 1) {\n hex = `0${hex}`;\n }\n\n return `%${hex}`;\n}\n\n// https://url.spec.whatwg.org/#percent-decode\nfunction percentDecodeBytes(input) {\n const output = new Uint8Array(input.byteLength);\n let outputIndex = 0;\n for (let i = 0; i < input.byteLength; ++i) {\n const byte = input[i];\n if (byte !== 0x25) {\n output[outputIndex++] = byte;\n } else if (byte === 0x25 && (!isASCIIHex(input[i + 1]) || !isASCIIHex(input[i + 2]))) {\n output[outputIndex++] = byte;\n } else {\n const bytePoint = parseInt(String.fromCodePoint(input[i + 1], input[i + 2]), 16);\n output[outputIndex++] = bytePoint;\n i += 2;\n }\n }\n\n return output.slice(0, outputIndex);\n}\n\n// https://url.spec.whatwg.org/#string-percent-decode\nfunction percentDecodeString(input) {\n const bytes = utf8Encode(input);\n return percentDecodeBytes(bytes);\n}\n\n// https://url.spec.whatwg.org/#c0-control-percent-encode-set\nfunction isC0ControlPercentEncode(c) {\n return c <= 0x1F || c > 0x7E;\n}\n\n// https://url.spec.whatwg.org/#fragment-percent-encode-set\nconst extraFragmentPercentEncodeSet = new Set([p(\" \"), p(\"\\\"\"), p(\"<\"), p(\">\"), p(\"`\")]);\nfunction isFragmentPercentEncode(c) {\n return isC0ControlPercentEncode(c) || extraFragmentPercentEncodeSet.has(c);\n}\n\n// https://url.spec.whatwg.org/#query-percent-encode-set\nconst extraQueryPercentEncodeSet = new Set([p(\" \"), p(\"\\\"\"), p(\"#\"), p(\"<\"), p(\">\")]);\nconst extraQueryPercentEncodeChars = String.fromCodePoint(...[...extraQueryPercentEncodeSet].sort());\nfunction isQueryPercentEncode(c) {\n return isC0ControlPercentEncode(c) || extraQueryPercentEncodeSet.has(c);\n}\n\n// https://url.spec.whatwg.org/#special-query-percent-encode-set\nconst extraSpecialQueryPercentEncodeSet = new Set([...extraQueryPercentEncodeSet, p(\"'\")]);\nconst extraSpecialQueryPercentEncodeChars = String.fromCodePoint(...[...extraSpecialQueryPercentEncodeSet].sort());\nfunction isSpecialQueryPercentEncode(c) {\n return isC0ControlPercentEncode(c) || extraSpecialQueryPercentEncodeSet.has(c);\n}\n\n// https://url.spec.whatwg.org/#path-percent-encode-set\nconst extraPathPercentEncodeSet = new Set([p(\"?\"), p(\"`\"), p(\"{\"), p(\"}\"), p(\"^\")]);\nfunction isPathPercentEncode(c) {\n return isQueryPercentEncode(c) || extraPathPercentEncodeSet.has(c);\n}\n\n// https://url.spec.whatwg.org/#userinfo-percent-encode-set\nconst extraUserinfoPercentEncodeSet =\n new Set([p(\"/\"), p(\":\"), p(\";\"), p(\"=\"), p(\"@\"), p(\"[\"), p(\"\\\\\"), p(\"]\"), p(\"|\")]);\nfunction isUserinfoPercentEncode(c) {\n return isPathPercentEncode(c) || extraUserinfoPercentEncodeSet.has(c);\n}\n\n// https://url.spec.whatwg.org/#component-percent-encode-set\nconst extraComponentPercentEncodeSet = new Set([p(\"$\"), p(\"%\"), p(\"&\"), p(\"+\"), p(\",\")]);\nfunction isComponentPercentEncode(c) {\n return isUserinfoPercentEncode(c) || extraComponentPercentEncodeSet.has(c);\n}\n\n// https://url.spec.whatwg.org/#application-x-www-form-urlencoded-percent-encode-set\nconst extraURLEncodedPercentEncodeSet = new Set([p(\"!\"), p(\"'\"), p(\"(\"), p(\")\"), p(\"~\")]);\nfunction isURLEncodedPercentEncode(c) {\n return isComponentPercentEncode(c) || extraURLEncodedPercentEncodeSet.has(c);\n}\n\n// https://url.spec.whatwg.org/#code-point-percent-encode-after-encoding\n// https://url.spec.whatwg.org/#utf-8-percent-encode\n// Assuming encoding is always utf-8 allows us to trim one of the logic branches. TODO: support encoding.\n// The \"-Internal\" variant here has code points as JS strings. The external version used by other files has code points\n// as JS numbers, like the rest of the codebase.\nfunction utf8PercentEncodeCodePointInternal(codePoint, percentEncodePredicate) {\n const bytes = utf8Encode(codePoint);\n let output = \"\";\n for (const byte of bytes) {\n // Our percentEncodePredicate operates on bytes, not code points, so this is slightly different from the spec.\n if (!percentEncodePredicate(byte)) {\n output += String.fromCharCode(byte);\n } else {\n output += percentEncode(byte);\n }\n }\n\n return output;\n}\n\nfunction utf8PercentEncodeCodePoint(codePoint, percentEncodePredicate) {\n return utf8PercentEncodeCodePointInternal(String.fromCodePoint(codePoint), percentEncodePredicate);\n}\n\n// https://url.spec.whatwg.org/#string-percent-encode-after-encoding\n// https://url.spec.whatwg.org/#string-utf-8-percent-encode\nfunction utf8PercentEncodeString(input, percentEncodePredicate, spaceAsPlus = false) {\n let output = \"\";\n for (const codePoint of input) {\n if (spaceAsPlus && codePoint === \" \") {\n output += \"+\";\n } else {\n output += utf8PercentEncodeCodePointInternal(codePoint, percentEncodePredicate);\n }\n }\n return output;\n}\n\nmodule.exports = {\n isC0ControlPercentEncode,\n isFragmentPercentEncode,\n isQueryPercentEncode,\n isSpecialQueryPercentEncode,\n isPathPercentEncode,\n isUserinfoPercentEncode,\n isURLEncodedPercentEncode,\n extraQueryPercentEncodeChars,\n extraSpecialQueryPercentEncodeChars,\n percentDecodeString,\n percentDecodeBytes,\n utf8PercentEncodeString,\n utf8PercentEncodeCodePoint\n};\n","\"use strict\";\n\nconst tr46 = require(\"tr46\");\n\nconst infra = require(\"./infra\");\n\nfunction p(char) {\n return char.codePointAt(0);\n}\n\nconst failure = Symbol(\"failure\");\n\nconst specialSchemes = {\n ftp: 21,\n file: null,\n http: 80,\n https: 443,\n ws: 80,\n wss: 443\n};\n\nconst urlCodePoints = new Set([\n p(\"!\"), p(\"$\"), p(\"&\"), p(\"'\"), p(\"(\"), p(\")\"), p(\"*\"), p(\"+\"), p(\",\"), p(\"-\"), p(\".\"), p(\"/\"),\n p(\":\"), p(\";\"), p(\"=\"), p(\"?\"), p(\"@\"), p(\"_\"), p(\"~\")\n]);\n\nconst forbiddenHostCodePoints = new Set([\n 0x00, 0x09, 0x0A, 0x0D, 0x20, p(\"#\"), p(\"/\"), p(\":\"), p(\"<\"), p(\">\"), p(\"?\"), p(\"@\"), p(\"[\"),\n p(\"\\\\\"), p(\"]\"), p(\"^\"), p(\"|\")\n]);\n\nfunction isURLCodePoint(c) {\n return infra.isASCIIAlphanumeric(c) ||\n urlCodePoints.has(c) ||\n (c >= 0xA0 && c <= 0x10FFFD && (c < 0xD800 || c > 0xDFFF) && !infra.isNoncharacter(c));\n}\n\nfunction isInvalidURLCodePoint(c) {\n return !isURLCodePoint(c) && c !== p(\"%\");\n}\n\nfunction isPercentEncodedByteAt(input, index) {\n return index + 2 < input.length &&\n input[index] === \"%\" &&\n infra.isASCIIHex(input.charCodeAt(index + 1)) &&\n infra.isASCIIHex(input.charCodeAt(index + 2));\n}\n\nfunction containsPercentEncodedByte(input) {\n return /%[0-9A-Fa-f]{2}/u.test(input);\n}\n\nfunction containsForbiddenHostCodePoint(string) {\n return [...string].some(c => forbiddenHostCodePoints.has(c.codePointAt(0)));\n}\n\nfunction containsForbiddenDomainCodePoint(string) {\n return [...string].some(c => {\n const cp = c.codePointAt(0);\n return forbiddenHostCodePoints.has(cp) || (cp >= 0x00 && cp <= 0x1F) || cp === p(\"%\") || cp === 0x7F;\n });\n}\n\nfunction domainParserToASCII(domain, beStrict) {\n return tr46.toASCII(domain, {\n checkHyphens: beStrict,\n checkBidi: true,\n checkJoiners: true,\n useSTD3ASCIIRules: beStrict,\n transitionalProcessing: false,\n verifyDNSLength: beStrict,\n ignoreInvalidPunycode: false\n });\n}\n\nfunction parseIPv4Number(input, validationErrors = null) {\n if (input === \"\") {\n return failure;\n }\n\n let validationErrorSeen = false;\n let R = 10;\n\n if (input.length >= 2 && input.charAt(0) === \"0\" && input.charAt(1).toLowerCase() === \"x\") {\n validationErrorSeen = true;\n input = input.substring(2);\n R = 16;\n } else if (input.length >= 2 && input.charAt(0) === \"0\") {\n validationErrorSeen = true;\n input = input.substring(1);\n R = 8;\n }\n\n if (input === \"\") {\n validationErrors?.push(\"IPv4-non-decimal-part\");\n return 0;\n }\n\n let regex = /[^0-7]/u;\n if (R === 10) {\n regex = /[^0-9]/u;\n }\n if (R === 16) {\n regex = /[^0-9A-Fa-f]/u;\n }\n\n if (regex.test(input)) {\n return failure;\n }\n\n if (validationErrorSeen) {\n validationErrors?.push(\"IPv4-non-decimal-part\");\n }\n\n return parseInt(input, R);\n}\n\nfunction endsInANumber(input) {\n const parts = input.split(\".\");\n if (parts[parts.length - 1] === \"\") {\n if (parts.length === 1) {\n return false;\n }\n parts.pop();\n }\n\n const last = parts[parts.length - 1];\n if (/^[0-9]+$/u.test(last)) {\n return true;\n }\n\n if (parseIPv4Number(last) !== failure) {\n return true;\n }\n\n return false;\n}\n\nfunction domainParser(domain, validationErrors = null, beStrict = false) {\n // A domain-to-ASCII validation error is reported whenever the strict Unicode ToASCII (CheckHyphens,\n // UseSTD3ASCIIRules, and VerifyDnsLength all true) fails, even when the relaxed parameters used\n // for non-strict parsing succeed. This step does not itself fail the algorithm.\n //\n // Spec divergence (performance): the URL Standard runs this strict pass unconditionally, but when\n // beStrict is false its only effect is that validation error, so we skip it when we are neither\n // being strict nor collecting validation errors.\n if (beStrict || validationErrors) {\n const strictResult = domainParserToASCII(domain, true);\n if (strictResult === null) {\n validationErrors?.push(\"domain-to-ASCII\");\n }\n\n if (beStrict) {\n return strictResult === null ? failure : strictResult;\n }\n }\n\n let result;\n if (infra.isASCIIString(domain)) {\n // For web compatibility an ASCII domain is returned lowercased regardless of ToASCII's outcome.\n result = domain.toLowerCase();\n } else {\n result = domainParserToASCII(domain, false);\n if (result === null) {\n return failure;\n }\n }\n\n if (result === \"\") {\n return failure;\n }\n if (containsForbiddenDomainCodePoint(result)) {\n return failure;\n }\n\n return result;\n}\n\nfunction isSpecialScheme(scheme) {\n return specialSchemes[scheme.toLowerCase()] !== undefined;\n}\n\nfunction isSpecialSchemeExceptFile(scheme) {\n return isSpecialScheme(scheme) && scheme.toLowerCase() !== \"file\";\n}\n\nfunction defaultPort(scheme) {\n return specialSchemes[scheme.toLowerCase()];\n}\n\nfunction isWindowsDriveLetterCodePoints(cp1, cp2) {\n return infra.isASCIIAlpha(cp1) && (cp2 === p(\":\") || cp2 === p(\"|\"));\n}\n\nfunction isWindowsDriveLetterString(string) {\n return string.length === 2 && infra.isASCIIAlpha(string.codePointAt(0)) && (string[1] === \":\" || string[1] === \"|\");\n}\n\nfunction isNormalizedWindowsDriveLetterString(string) {\n return string.length === 2 && infra.isASCIIAlpha(string.codePointAt(0)) && string[1] === \":\";\n}\n\nmodule.exports = {\n containsForbiddenHostCodePoint,\n containsPercentEncodedByte,\n defaultPort,\n domainParser,\n endsInANumber,\n failure,\n forbiddenHostCodePoints,\n isInvalidURLCodePoint,\n isNormalizedWindowsDriveLetterString,\n isPercentEncodedByteAt,\n parseIPv4Number,\n isSpecialScheme,\n isSpecialSchemeExceptFile,\n isURLCodePoint,\n isWindowsDriveLetterCodePoints,\n isWindowsDriveLetterString,\n p\n};\n","\"use strict\";\nrequire(\"@exodus/bytes/encoding.js\"); // for legacy multi-byte encodings\nconst { percentEncodeAfterEncoding } = require(\"@exodus/bytes/whatwg.js\");\n\nconst infra = require(\"./infra\");\nconst { utf8DecodeWithoutBOM } = require(\"./encoding\");\nconst {\n containsForbiddenHostCodePoint,\n containsPercentEncodedByte,\n defaultPort,\n domainParser,\n endsInANumber,\n failure,\n isInvalidURLCodePoint,\n isNormalizedWindowsDriveLetterString,\n isSpecialScheme,\n isWindowsDriveLetterCodePoints,\n isWindowsDriveLetterString,\n parseIPv4Number,\n p\n} = require(\"./url-miscellaneous\");\nconst { percentDecodeString, utf8PercentEncodeCodePoint, utf8PercentEncodeString,\n isC0ControlPercentEncode, isFragmentPercentEncode,\n extraQueryPercentEncodeChars, extraSpecialQueryPercentEncodeChars,\n isPathPercentEncode, isUserinfoPercentEncode } = require(\"./percent-encoding\");\n\nfunction countSymbols(str) {\n return [...str].length;\n}\n\nfunction at(input, idx) {\n const c = input[idx];\n return isNaN(c) ? undefined : String.fromCodePoint(c);\n}\n\nfunction isSingleDot(buffer) {\n return buffer === \".\" || buffer.toLowerCase() === \"%2e\";\n}\n\nfunction isDoubleDot(buffer) {\n buffer = buffer.toLowerCase();\n return buffer === \"..\" || buffer === \"%2e.\" || buffer === \".%2e\" || buffer === \"%2e%2e\";\n}\n\nfunction isInvalidPercentEncoding(input, pointer) {\n return input[pointer] === p(\"%\") &&\n (!infra.isASCIIHex(input[pointer + 1]) || !infra.isASCIIHex(input[pointer + 2]));\n}\n\nfunction validateURLUnits(input, validationErrors = null) {\n if (validationErrors === null) {\n return;\n }\n\n const codePoints = Array.from(input, c => c.codePointAt(0));\n if (codePoints.some(isInvalidURLCodePoint)) {\n validationErrors.push(\"invalid-URL-unit\");\n }\n if (codePoints.some((_, i) => isInvalidPercentEncoding(codePoints, i))) {\n validationErrors.push(\"invalid-URL-unit\");\n }\n}\n\nfunction isSpecial(url) {\n return isSpecialScheme(url.scheme);\n}\n\nfunction isNotSpecial(url) {\n return !isSpecialScheme(url.scheme);\n}\n\nfunction parseIPv4(input, validationErrors = null) {\n const parts = input.split(\".\");\n if (parts[parts.length - 1] === \"\") {\n validationErrors?.push(\"IPv4-empty-part\");\n if (parts.length > 1) {\n parts.pop();\n }\n }\n\n if (parts.length > 4) {\n validationErrors?.push(\"IPv4-too-many-parts\");\n return failure;\n }\n\n if (parts.length < 4) {\n validationErrors?.push(\"IPv4-too-few-parts\");\n }\n\n const numbers = [];\n for (const part of parts) {\n const n = parseIPv4Number(part, validationErrors);\n if (n === failure) {\n validationErrors?.push(\"IPv4-non-numeric-part\");\n return failure;\n }\n\n numbers.push(n);\n }\n\n if (validationErrors !== null && numbers.some(n => n > 255)) {\n validationErrors.push(\"IPv4-out-of-range-part\");\n }\n for (let i = 0; i < numbers.length - 1; ++i) {\n if (numbers[i] > 255) {\n return failure;\n }\n }\n if (numbers[numbers.length - 1] >= 256 ** (5 - numbers.length)) {\n return failure;\n }\n\n let ipv4 = numbers.pop();\n let counter = 0;\n\n for (const n of numbers) {\n ipv4 += n * 256 ** (3 - counter);\n ++counter;\n }\n\n return ipv4;\n}\n\nfunction serializeIPv4(address) {\n let output = \"\";\n let n = address;\n\n for (let i = 1; i <= 4; ++i) {\n output = String(n % 256) + output;\n if (i !== 4) {\n output = `.${output}`;\n }\n n = Math.floor(n / 256);\n }\n\n return output;\n}\n\nfunction parseIPv6(input, validationErrors = null) {\n const address = [0, 0, 0, 0, 0, 0, 0, 0];\n let pieceIndex = 0;\n let compress = null;\n let pointer = 0;\n\n input = Array.from(input, c => c.codePointAt(0));\n\n if (input[pointer] === p(\":\")) {\n if (input[pointer + 1] !== p(\":\")) {\n validationErrors?.push(\"IPv6-invalid-compression\");\n return failure;\n }\n\n pointer += 2;\n ++pieceIndex;\n compress = pieceIndex;\n }\n\n while (pointer < input.length) {\n if (pieceIndex === 8) {\n validationErrors?.push(\"IPv6-too-many-pieces\");\n return failure;\n }\n\n if (input[pointer] === p(\":\")) {\n if (compress !== null) {\n validationErrors?.push(\"IPv6-multiple-compression\");\n return failure;\n }\n ++pointer;\n ++pieceIndex;\n compress = pieceIndex;\n continue;\n }\n\n let value = 0;\n let length = 0;\n\n while (length < 4 && infra.isASCIIHex(input[pointer])) {\n value = value * 0x10 + parseInt(at(input, pointer), 16);\n ++pointer;\n ++length;\n }\n\n if (input[pointer] === p(\".\")) {\n if (length === 0) {\n validationErrors?.push(\"IPv4-in-IPv6-invalid-code-point\");\n return failure;\n }\n\n pointer -= length;\n\n if (pieceIndex > 6) {\n validationErrors?.push(\"IPv4-in-IPv6-too-many-pieces\");\n return failure;\n }\n\n let numbersSeen = 0;\n\n while (input[pointer] !== undefined) {\n let ipv4Piece = null;\n\n if (numbersSeen > 0) {\n if (input[pointer] === p(\".\") && numbersSeen < 4) {\n ++pointer;\n } else {\n validationErrors?.push(\"IPv4-in-IPv6-invalid-code-point\");\n return failure;\n }\n }\n\n if (!infra.isASCIIDigit(input[pointer])) {\n validationErrors?.push(\"IPv4-in-IPv6-invalid-code-point\");\n return failure;\n }\n\n while (infra.isASCIIDigit(input[pointer])) {\n const number = parseInt(at(input, pointer), 10);\n if (ipv4Piece === null) {\n ipv4Piece = number;\n } else if (ipv4Piece === 0) {\n validationErrors?.push(\"IPv4-in-IPv6-invalid-code-point\");\n return failure;\n } else {\n ipv4Piece = ipv4Piece * 10 + number;\n }\n if (ipv4Piece > 255) {\n validationErrors?.push(\"IPv4-in-IPv6-out-of-range-part\");\n return failure;\n }\n ++pointer;\n }\n\n address[pieceIndex] = address[pieceIndex] * 0x100 + ipv4Piece;\n\n ++numbersSeen;\n\n if (numbersSeen === 2 || numbersSeen === 4) {\n ++pieceIndex;\n }\n }\n\n if (numbersSeen !== 4) {\n validationErrors?.push(\"IPv4-in-IPv6-too-few-parts\");\n return failure;\n }\n\n break;\n } else if (input[pointer] === p(\":\")) {\n ++pointer;\n if (input[pointer] === undefined) {\n validationErrors?.push(\"IPv6-invalid-code-point\");\n return failure;\n }\n } else if (input[pointer] !== undefined) {\n validationErrors?.push(\"IPv6-invalid-code-point\");\n return failure;\n }\n\n if (length > 1 && value < 0x10 ** (length - 1)) {\n validationErrors?.push(\"IPv6-piece-leading-zero\");\n }\n\n address[pieceIndex] = value;\n ++pieceIndex;\n }\n\n if (compress !== null) {\n let swaps = pieceIndex - compress;\n pieceIndex = 7;\n while (pieceIndex !== 0 && swaps > 0) {\n const temp = address[compress + swaps - 1];\n address[compress + swaps - 1] = address[pieceIndex];\n address[pieceIndex] = temp;\n --pieceIndex;\n --swaps;\n }\n } else if (compress === null && pieceIndex !== 8) {\n validationErrors?.push(\"IPv6-too-few-pieces\");\n return failure;\n }\n\n return address;\n}\n\nfunction serializeIPv6(address) {\n let output = \"\";\n const compress = findTheIPv6AddressCompressedPieceIndex(address);\n let ignore0 = false;\n\n for (let pieceIndex = 0; pieceIndex <= 7; ++pieceIndex) {\n if (ignore0 && address[pieceIndex] === 0) {\n continue;\n } else if (ignore0) {\n ignore0 = false;\n }\n\n if (compress === pieceIndex) {\n const separator = pieceIndex === 0 ? \"::\" : \":\";\n output += separator;\n ignore0 = true;\n continue;\n }\n\n output += address[pieceIndex].toString(16);\n\n if (pieceIndex !== 7) {\n output += \":\";\n }\n }\n\n return output;\n}\n\nfunction parseHost(input, validationErrors = null, isOpaque = false) {\n if (input[0] === \"[\") {\n if (input[input.length - 1] !== \"]\") {\n validationErrors?.push(\"IPv6-unclosed\");\n return failure;\n }\n\n return parseIPv6(input.substring(1, input.length - 1), validationErrors);\n }\n\n if (isOpaque) {\n return parseOpaqueHost(input, validationErrors);\n }\n\n if (validationErrors && containsPercentEncodedByte(input)) {\n validationErrors.push(\"domain-percent-encoded\");\n }\n\n const domain = utf8DecodeWithoutBOM(percentDecodeString(input));\n const asciiDomain = domainParser(domain, validationErrors);\n if (asciiDomain === failure) {\n return failure;\n }\n\n if (endsInANumber(asciiDomain)) {\n if (!infra.isASCIIString(domain)) {\n validationErrors?.push(\"IPv4-non-ASCII-input\");\n }\n return parseIPv4(asciiDomain, validationErrors);\n }\n\n return asciiDomain;\n}\n\nfunction parseOpaqueHost(input, validationErrors) {\n if (containsForbiddenHostCodePoint(input)) {\n validationErrors?.push(\"host-invalid-code-point\");\n return failure;\n }\n\n validateURLUnits(input, validationErrors);\n\n return utf8PercentEncodeString(input, isC0ControlPercentEncode);\n}\n\nfunction findTheIPv6AddressCompressedPieceIndex(address) {\n let longestIndex = null;\n let longestSize = 1; // only find elements > 1\n let foundIndex = null;\n let foundSize = 0;\n\n for (let pieceIndex = 0; pieceIndex < address.length; ++pieceIndex) {\n if (address[pieceIndex] !== 0) {\n if (foundSize > longestSize) {\n longestIndex = foundIndex;\n longestSize = foundSize;\n }\n\n foundIndex = null;\n foundSize = 0;\n } else {\n if (foundIndex === null) {\n foundIndex = pieceIndex;\n }\n ++foundSize;\n }\n }\n\n if (foundSize > longestSize) {\n return foundIndex;\n }\n\n return longestIndex;\n}\n\nfunction serializeHost(host) {\n if (typeof host === \"number\") {\n return serializeIPv4(host);\n }\n\n // IPv6 serializer\n if (host instanceof Array) {\n return `[${serializeIPv6(host)}]`;\n }\n\n return host;\n}\n\nfunction trimControlChars(string) {\n // Avoid using regexp because of this V8 bug: https://issues.chromium.org/issues/42204424\n\n let start = 0;\n let end = string.length;\n for (; start < end; ++start) {\n if (string.charCodeAt(start) > 0x20) {\n break;\n }\n }\n for (; end > start; --end) {\n if (string.charCodeAt(end - 1) > 0x20) {\n break;\n }\n }\n return string.substring(start, end);\n}\n\nfunction trimTabAndNewline(url) {\n return url.replace(/\\u0009|\\u000A|\\u000D/ug, \"\");\n}\n\nfunction shortenPath(url) {\n const { path } = url;\n if (path.length === 0) {\n return;\n }\n if (url.scheme === \"file\" && path.length === 1 && isNormalizedWindowsDriveLetterString(path[0])) {\n return;\n }\n\n path.pop();\n}\n\nfunction includesCredentials(url) {\n return url.username !== \"\" || url.password !== \"\";\n}\n\nfunction cannotHaveAUsernamePasswordPort(url) {\n return url.host === null || url.host === \"\" || url.scheme === \"file\";\n}\n\nfunction hasAnOpaquePath(url) {\n return typeof url.path === \"string\";\n}\n\nfunction URLStateMachine(input, base, encoding, url, stateOverride, validationErrors = null) {\n this.pointer = 0;\n this.input = input;\n this.base = base || null;\n this.encoding = encoding || \"utf-8\";\n this.stateOverride = stateOverride;\n this.url = url;\n this.failure = false;\n this.validationErrors = validationErrors;\n\n if (!this.url) {\n this.url = {\n scheme: \"\",\n username: \"\",\n password: \"\",\n host: null,\n port: null,\n path: [],\n query: null,\n fragment: null\n };\n\n const res = trimControlChars(this.input);\n if (res !== this.input) {\n this.validationErrors?.push(\"invalid-URL-unit\");\n }\n this.input = res;\n }\n\n const res = trimTabAndNewline(this.input);\n if (res !== this.input) {\n this.validationErrors?.push(\"invalid-URL-unit\");\n }\n this.input = res;\n\n this.state = stateOverride || \"scheme start\";\n\n this.buffer = \"\";\n this.atSignSeen = false;\n this.insideBrackets = false;\n this.passwordTokenSeen = false;\n\n this.input = Array.from(this.input, c => c.codePointAt(0));\n\n for (; this.pointer <= this.input.length; ++this.pointer) {\n const c = this.input[this.pointer];\n const cStr = isNaN(c) ? undefined : String.fromCodePoint(c);\n\n // exec state machine\n const ret = this[`parse ${this.state}`](c, cStr);\n if (!ret) {\n break; // terminate algorithm\n } else if (ret === failure) {\n this.failure = true;\n break;\n }\n }\n}\n\nURLStateMachine.prototype.validateURLUnit = function (c) {\n if (this.validationErrors === null) {\n return;\n }\n\n if (isInvalidURLCodePoint(c)) {\n this.validationErrors.push(\"invalid-URL-unit\");\n }\n if (isInvalidPercentEncoding(this.input, this.pointer)) {\n this.validationErrors.push(\"invalid-URL-unit\");\n }\n};\n\nURLStateMachine.prototype[\"parse scheme start\"] = function parseSchemeStart(c, cStr) {\n if (infra.isASCIIAlpha(c)) {\n this.buffer += cStr.toLowerCase();\n this.state = \"scheme\";\n } else if (!this.stateOverride) {\n this.state = \"no scheme\";\n --this.pointer;\n } else {\n return failure;\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse scheme\"] = function parseScheme(c, cStr) {\n if (infra.isASCIIAlphanumeric(c) || c === p(\"+\") || c === p(\"-\") || c === p(\".\")) {\n this.buffer += cStr.toLowerCase();\n } else if (c === p(\":\")) {\n if (this.stateOverride) {\n if (isSpecial(this.url) && !isSpecialScheme(this.buffer)) {\n return false;\n }\n\n if (!isSpecial(this.url) && isSpecialScheme(this.buffer)) {\n return false;\n }\n\n if ((includesCredentials(this.url) || this.url.port !== null) && this.buffer === \"file\") {\n return false;\n }\n\n if (this.url.scheme === \"file\" && this.url.host === \"\") {\n return false;\n }\n }\n this.url.scheme = this.buffer;\n if (this.stateOverride) {\n if (this.url.port === defaultPort(this.url.scheme)) {\n this.url.port = null;\n }\n return false;\n }\n this.buffer = \"\";\n if (this.url.scheme === \"file\") {\n if (this.input[this.pointer + 1] !== p(\"/\") || this.input[this.pointer + 2] !== p(\"/\")) {\n this.validationErrors?.push(\"special-scheme-missing-following-solidus\");\n }\n this.state = \"file\";\n } else if (isSpecial(this.url) && this.base !== null && this.base.scheme === this.url.scheme) {\n this.state = \"special relative or authority\";\n } else if (isSpecial(this.url)) {\n this.state = \"special authority slashes\";\n } else if (this.input[this.pointer + 1] === p(\"/\")) {\n this.state = \"path or authority\";\n ++this.pointer;\n } else {\n this.url.path = \"\";\n this.state = \"opaque path\";\n }\n } else if (!this.stateOverride) {\n this.buffer = \"\";\n this.state = \"no scheme\";\n this.pointer = -1;\n } else {\n return failure;\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse no scheme\"] = function parseNoScheme(c) {\n if (this.base === null || (hasAnOpaquePath(this.base) && c !== p(\"#\"))) {\n this.validationErrors?.push(\"missing-scheme-non-relative-URL\");\n return failure;\n } else if (hasAnOpaquePath(this.base) && c === p(\"#\")) {\n this.url.scheme = this.base.scheme;\n this.url.path = this.base.path;\n this.url.query = this.base.query;\n this.url.fragment = \"\";\n this.state = \"fragment\";\n } else if (this.base.scheme === \"file\") {\n this.state = \"file\";\n --this.pointer;\n } else {\n this.state = \"relative\";\n --this.pointer;\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse special relative or authority\"] = function parseSpecialRelativeOrAuthority(c) {\n if (c === p(\"/\") && this.input[this.pointer + 1] === p(\"/\")) {\n this.state = \"special authority ignore slashes\";\n ++this.pointer;\n } else {\n this.validationErrors?.push(\"special-scheme-missing-following-solidus\");\n this.state = \"relative\";\n --this.pointer;\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse path or authority\"] = function parsePathOrAuthority(c) {\n if (c === p(\"/\")) {\n this.state = \"authority\";\n } else {\n this.state = \"path\";\n --this.pointer;\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse relative\"] = function parseRelative(c) {\n this.url.scheme = this.base.scheme;\n if (c === p(\"/\")) {\n this.state = \"relative slash\";\n } else if (isSpecial(this.url) && c === p(\"\\\\\")) {\n this.validationErrors?.push(\"invalid-reverse-solidus\");\n this.state = \"relative slash\";\n } else {\n this.url.username = this.base.username;\n this.url.password = this.base.password;\n this.url.host = this.base.host;\n this.url.port = this.base.port;\n this.url.path = this.base.path.slice();\n this.url.query = this.base.query;\n if (c === p(\"?\")) {\n this.url.query = \"\";\n this.state = \"query\";\n } else if (c === p(\"#\")) {\n this.url.fragment = \"\";\n this.state = \"fragment\";\n } else if (!isNaN(c)) {\n this.url.query = null;\n this.url.path.pop();\n this.state = \"path\";\n --this.pointer;\n }\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse relative slash\"] = function parseRelativeSlash(c) {\n if (isSpecial(this.url) && (c === p(\"/\") || c === p(\"\\\\\"))) {\n if (c === p(\"\\\\\")) {\n this.validationErrors?.push(\"invalid-reverse-solidus\");\n }\n this.state = \"special authority ignore slashes\";\n } else if (c === p(\"/\")) {\n this.state = \"authority\";\n } else {\n this.url.username = this.base.username;\n this.url.password = this.base.password;\n this.url.host = this.base.host;\n this.url.port = this.base.port;\n this.state = \"path\";\n --this.pointer;\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse special authority slashes\"] = function parseSpecialAuthoritySlashes(c) {\n if (c === p(\"/\") && this.input[this.pointer + 1] === p(\"/\")) {\n this.state = \"special authority ignore slashes\";\n ++this.pointer;\n } else {\n this.validationErrors?.push(\"special-scheme-missing-following-solidus\");\n this.state = \"special authority ignore slashes\";\n --this.pointer;\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse special authority ignore slashes\"] = function parseSpecialAuthorityIgnoreSlashes(c) {\n if (c !== p(\"/\") && c !== p(\"\\\\\")) {\n this.state = \"authority\";\n --this.pointer;\n } else {\n this.validationErrors?.push(\"special-scheme-missing-following-solidus\");\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse authority\"] = function parseAuthority(c, cStr) {\n if (c === p(\"@\")) {\n this.validationErrors?.push(\"invalid-credentials\");\n if (this.atSignSeen) {\n this.buffer = `%40${this.buffer}`;\n }\n this.atSignSeen = true;\n\n // careful, this iterates over the buffer's code points, independently of this.pointer\n for (const codePointStr of this.buffer) {\n const codePoint = codePointStr.codePointAt(0);\n\n if (codePoint === p(\":\") && !this.passwordTokenSeen) {\n this.passwordTokenSeen = true;\n continue;\n }\n const encodedCodePoints = utf8PercentEncodeCodePoint(codePoint, isUserinfoPercentEncode);\n if (this.passwordTokenSeen) {\n this.url.password += encodedCodePoints;\n } else {\n this.url.username += encodedCodePoints;\n }\n }\n this.buffer = \"\";\n } else if (isNaN(c) || c === p(\"/\") || c === p(\"?\") || c === p(\"#\") ||\n (isSpecial(this.url) && c === p(\"\\\\\"))) {\n if (this.atSignSeen && this.buffer === \"\") {\n this.validationErrors?.push(\"host-missing\");\n return failure;\n }\n this.pointer -= countSymbols(this.buffer) + 1;\n this.buffer = \"\";\n this.state = \"host\";\n } else {\n this.buffer += cStr;\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse hostname\"] =\nURLStateMachine.prototype[\"parse host\"] = function parseHostName(c, cStr) {\n if (this.stateOverride && this.url.scheme === \"file\") {\n --this.pointer;\n this.state = \"file host\";\n } else if (c === p(\":\") && !this.insideBrackets) {\n if (this.buffer === \"\") {\n this.validationErrors?.push(\"host-missing\");\n return failure;\n }\n\n if (this.stateOverride === \"hostname\") {\n return failure;\n }\n\n const host = parseHost(this.buffer, this.validationErrors, isNotSpecial(this.url));\n if (host === failure) {\n return failure;\n }\n\n this.url.host = host;\n this.buffer = \"\";\n this.state = \"port\";\n } else if (isNaN(c) || c === p(\"/\") || c === p(\"?\") || c === p(\"#\") ||\n (isSpecial(this.url) && c === p(\"\\\\\"))) {\n --this.pointer;\n if (isSpecial(this.url) && this.buffer === \"\") {\n this.validationErrors?.push(\"host-missing\");\n return failure;\n } else if (this.stateOverride && this.buffer === \"\" &&\n (includesCredentials(this.url) || this.url.port !== null)) {\n return failure;\n }\n\n const host = parseHost(this.buffer, this.validationErrors, isNotSpecial(this.url));\n if (host === failure) {\n return failure;\n }\n\n this.url.host = host;\n this.buffer = \"\";\n this.state = \"path start\";\n if (this.stateOverride) {\n return false;\n }\n } else {\n if (c === p(\"[\")) {\n this.insideBrackets = true;\n } else if (c === p(\"]\")) {\n this.insideBrackets = false;\n }\n this.buffer += cStr;\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse port\"] = function parsePort(c, cStr) {\n if (infra.isASCIIDigit(c)) {\n this.buffer += cStr;\n } else if (isNaN(c) || c === p(\"/\") || c === p(\"?\") || c === p(\"#\") ||\n (isSpecial(this.url) && c === p(\"\\\\\")) ||\n this.stateOverride) {\n if (this.buffer !== \"\") {\n const port = parseInt(this.buffer, 10);\n if (port > 2 ** 16 - 1) {\n this.validationErrors?.push(\"port-out-of-range\");\n return failure;\n }\n this.url.port = port === defaultPort(this.url.scheme) ? null : port;\n this.buffer = \"\";\n if (this.stateOverride) {\n return false;\n }\n }\n if (this.stateOverride) {\n return failure;\n }\n this.state = \"path start\";\n --this.pointer;\n } else {\n this.validationErrors?.push(\"port-invalid\");\n return failure;\n }\n\n return true;\n};\n\nconst fileOtherwiseCodePoints = new Set([p(\"/\"), p(\"\\\\\"), p(\"?\"), p(\"#\")]);\n\nfunction startsWithWindowsDriveLetter(input, pointer) {\n const length = input.length - pointer;\n return length >= 2 &&\n isWindowsDriveLetterCodePoints(input[pointer], input[pointer + 1]) &&\n (length === 2 || fileOtherwiseCodePoints.has(input[pointer + 2]));\n}\n\nURLStateMachine.prototype[\"parse file\"] = function parseFile(c) {\n this.url.scheme = \"file\";\n this.url.host = \"\";\n\n if (c === p(\"/\") || c === p(\"\\\\\")) {\n if (c === p(\"\\\\\")) {\n this.validationErrors?.push(\"invalid-reverse-solidus\");\n }\n this.state = \"file slash\";\n } else if (this.base !== null && this.base.scheme === \"file\") {\n this.url.host = this.base.host;\n this.url.path = this.base.path.slice();\n this.url.query = this.base.query;\n if (c === p(\"?\")) {\n this.url.query = \"\";\n this.state = \"query\";\n } else if (c === p(\"#\")) {\n this.url.fragment = \"\";\n this.state = \"fragment\";\n } else if (!isNaN(c)) {\n this.url.query = null;\n if (!startsWithWindowsDriveLetter(this.input, this.pointer)) {\n shortenPath(this.url);\n } else {\n this.validationErrors?.push(\"file-invalid-Windows-drive-letter\");\n this.url.path = [];\n }\n\n this.state = \"path\";\n --this.pointer;\n }\n } else {\n this.state = \"path\";\n --this.pointer;\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse file slash\"] = function parseFileSlash(c) {\n if (c === p(\"/\") || c === p(\"\\\\\")) {\n if (c === p(\"\\\\\")) {\n this.validationErrors?.push(\"invalid-reverse-solidus\");\n }\n this.state = \"file host\";\n } else {\n if (this.base !== null && this.base.scheme === \"file\") {\n if (!startsWithWindowsDriveLetter(this.input, this.pointer) &&\n isNormalizedWindowsDriveLetterString(this.base.path[0])) {\n this.url.path.push(this.base.path[0]);\n }\n this.url.host = this.base.host;\n }\n this.state = \"path\";\n --this.pointer;\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse file host\"] = function parseFileHost(c, cStr) {\n if (isNaN(c) || c === p(\"/\") || c === p(\"\\\\\") || c === p(\"?\") || c === p(\"#\")) {\n --this.pointer;\n if (!this.stateOverride && isWindowsDriveLetterString(this.buffer)) {\n this.validationErrors?.push(\"file-invalid-Windows-drive-letter-host\");\n this.state = \"path\";\n } else if (this.buffer === \"\") {\n this.url.host = \"\";\n if (this.stateOverride) {\n return false;\n }\n this.state = \"path start\";\n } else {\n let host = parseHost(this.buffer, this.validationErrors, isNotSpecial(this.url));\n if (host === failure) {\n return failure;\n }\n if (host === \"localhost\") {\n host = \"\";\n }\n this.url.host = host;\n\n if (this.stateOverride) {\n return false;\n }\n\n this.buffer = \"\";\n this.state = \"path start\";\n }\n } else {\n this.buffer += cStr;\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse path start\"] = function parsePathStart(c) {\n if (isSpecial(this.url)) {\n if (c === p(\"\\\\\")) {\n this.validationErrors?.push(\"invalid-reverse-solidus\");\n }\n this.state = \"path\";\n\n if (c !== p(\"/\") && c !== p(\"\\\\\")) {\n --this.pointer;\n }\n } else if (!this.stateOverride && c === p(\"?\")) {\n this.url.query = \"\";\n this.state = \"query\";\n } else if (!this.stateOverride && c === p(\"#\")) {\n this.url.fragment = \"\";\n this.state = \"fragment\";\n } else if (c !== undefined) {\n this.state = \"path\";\n if (c !== p(\"/\")) {\n --this.pointer;\n }\n } else if (this.stateOverride && this.url.host === null) {\n this.url.path.push(\"\");\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse path\"] = function parsePath(c) {\n if (isNaN(c) || c === p(\"/\") || (isSpecial(this.url) && c === p(\"\\\\\")) ||\n (!this.stateOverride && (c === p(\"?\") || c === p(\"#\")))) {\n if (isSpecial(this.url) && c === p(\"\\\\\")) {\n this.validationErrors?.push(\"invalid-reverse-solidus\");\n }\n\n if (isDoubleDot(this.buffer)) {\n shortenPath(this.url);\n if (c !== p(\"/\") && !(isSpecial(this.url) && c === p(\"\\\\\"))) {\n this.url.path.push(\"\");\n }\n } else if (isSingleDot(this.buffer) && c !== p(\"/\") &&\n !(isSpecial(this.url) && c === p(\"\\\\\"))) {\n this.url.path.push(\"\");\n } else if (!isSingleDot(this.buffer)) {\n if (this.url.scheme === \"file\" && this.url.path.length === 0 && isWindowsDriveLetterString(this.buffer)) {\n this.buffer = `${this.buffer[0]}:`;\n }\n this.url.path.push(this.buffer);\n }\n this.buffer = \"\";\n if (c === p(\"?\")) {\n this.url.query = \"\";\n this.state = \"query\";\n }\n if (c === p(\"#\")) {\n this.url.fragment = \"\";\n this.state = \"fragment\";\n }\n } else {\n this.validateURLUnit(c);\n\n this.buffer += utf8PercentEncodeCodePoint(c, isPathPercentEncode);\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse opaque path\"] = function parseOpaquePath(c) {\n if (c === p(\"?\")) {\n this.url.query = \"\";\n this.state = \"query\";\n } else if (c === p(\"#\")) {\n this.url.fragment = \"\";\n this.state = \"fragment\";\n } else if (c === p(\" \")) {\n this.validationErrors?.push(\"invalid-URL-unit\");\n\n const remaining = this.input[this.pointer + 1];\n if (remaining === p(\"?\") || remaining === p(\"#\")) {\n this.url.path += \"%20\";\n } else {\n this.url.path += \" \";\n }\n } else if (!isNaN(c)) {\n this.validateURLUnit(c);\n\n this.url.path += utf8PercentEncodeCodePoint(c, isC0ControlPercentEncode);\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse query\"] = function parseQuery(c, cStr) {\n if (!isSpecial(this.url) || this.url.scheme === \"ws\" || this.url.scheme === \"wss\") {\n this.encoding = \"utf-8\";\n }\n\n if ((!this.stateOverride && c === p(\"#\")) || isNaN(c)) {\n const percentEncodeSet = isSpecial(this.url) ? extraSpecialQueryPercentEncodeChars : extraQueryPercentEncodeChars;\n this.url.query += percentEncodeAfterEncoding(\n this.encoding,\n this.buffer,\n percentEncodeSet\n );\n\n this.buffer = \"\";\n\n if (c === p(\"#\")) {\n this.url.fragment = \"\";\n this.state = \"fragment\";\n }\n } else if (!isNaN(c)) {\n this.validateURLUnit(c);\n\n this.buffer += cStr;\n }\n\n return true;\n};\n\nURLStateMachine.prototype[\"parse fragment\"] = function parseFragment(c) {\n if (!isNaN(c)) {\n this.validateURLUnit(c);\n\n this.url.fragment += utf8PercentEncodeCodePoint(c, isFragmentPercentEncode);\n }\n\n return true;\n};\n\nfunction serializeURL(url, excludeFragment) {\n let output = `${url.scheme}:`;\n if (url.host !== null) {\n output += \"//\";\n\n if (url.username !== \"\" || url.password !== \"\") {\n output += url.username;\n if (url.password !== \"\") {\n output += `:${url.password}`;\n }\n output += \"@\";\n }\n\n output += serializeHost(url.host);\n\n if (url.port !== null) {\n output += `:${url.port}`;\n }\n }\n\n if (url.host === null && !hasAnOpaquePath(url) && url.path.length > 1 && url.path[0] === \"\") {\n output += \"/.\";\n }\n output += serializePath(url);\n\n if (url.query !== null) {\n output += `?${url.query}`;\n }\n\n if (!excludeFragment && url.fragment !== null) {\n output += `#${url.fragment}`;\n }\n\n return output;\n}\n\nfunction serializeOrigin(tuple) {\n let result = `${tuple.scheme}://`;\n result += serializeHost(tuple.host);\n\n if (tuple.port !== null) {\n result += `:${tuple.port}`;\n }\n\n return result;\n}\n\nfunction serializePath(url) {\n if (hasAnOpaquePath(url)) {\n return url.path;\n }\n\n let output = \"\";\n for (const segment of url.path) {\n output += `/${segment}`;\n }\n return output;\n}\n\nmodule.exports.serializeURL = serializeURL;\n\nmodule.exports.serializePath = serializePath;\n\nmodule.exports.serializeURLOrigin = function (url) {\n // https://url.spec.whatwg.org/#concept-url-origin\n switch (url.scheme) {\n case \"blob\": {\n const pathURL = module.exports.parseURL(serializePath(url));\n if (pathURL === null) {\n return \"null\";\n }\n if (pathURL.scheme !== \"http\" && pathURL.scheme !== \"https\") {\n return \"null\";\n }\n return module.exports.serializeURLOrigin(pathURL);\n }\n case \"ftp\":\n case \"http\":\n case \"https\":\n case \"ws\":\n case \"wss\":\n return serializeOrigin({\n scheme: url.scheme,\n host: url.host,\n port: url.port\n });\n case \"file\":\n // The spec says:\n // > Unfortunate as it is, this is left as an exercise to the reader. When in doubt, return a new opaque origin.\n // Browsers tested so far:\n // - Chrome says \"file://\", but treats file: URLs as cross-origin for most (all?) purposes; see e.g.\n // https://bugs.chromium.org/p/chromium/issues/detail?id=37586\n // - Firefox says \"null\", but treats file: URLs as same-origin sometimes based on directory stuff; see\n // https://developer.mozilla.org/en-US/docs/Archive/Misc_top_level/Same-origin_policy_for_file:_URIs\n return \"null\";\n default:\n // serializing an opaque origin returns \"null\"\n return \"null\";\n }\n};\n\nfunction basicURLParse(input, options = {}, validationErrors = null) {\n const usm = new URLStateMachine(\n input,\n options.baseURL,\n options.encoding,\n options.url,\n options.stateOverride,\n validationErrors\n );\n if (usm.failure) {\n return null;\n }\n\n return usm.url;\n}\n\nmodule.exports.basicURLParse = function (input, options = {}) {\n return basicURLParse(input, options);\n};\n\nmodule.exports.setTheUsername = function (url, username) {\n url.username = utf8PercentEncodeString(username, isUserinfoPercentEncode);\n};\n\nmodule.exports.setThePassword = function (url, password) {\n url.password = utf8PercentEncodeString(password, isUserinfoPercentEncode);\n};\n\nmodule.exports.serializeHost = serializeHost;\n\nmodule.exports.cannotHaveAUsernamePasswordPort = cannotHaveAUsernamePasswordPort;\n\nmodule.exports.hasAnOpaquePath = hasAnOpaquePath;\n\nmodule.exports.serializeInteger = function (integer) {\n return String(integer);\n};\n\nmodule.exports.parseURL = function (input, options = {}) {\n // We don't handle blobs, so this just delegates:\n return module.exports.basicURLParse(input, {\n baseURL: options.baseURL,\n encoding: options.encoding\n });\n};\n\nmodule.exports.parseURLWithValidationErrors = function (input, options = {}) {\n const validationErrors = [];\n\n // We don't handle blobs, so this just delegates:\n const url = basicURLParse(input, {\n baseURL: options.baseURL,\n encoding: options.encoding\n }, validationErrors);\n\n return { url, validationErrors };\n};\n","\"use strict\";\n\nconst infra = require(\"./infra\");\nconst {\n domainParser,\n endsInANumber,\n failure,\n forbiddenHostCodePoints,\n isPercentEncodedByteAt,\n isSpecialSchemeExceptFile,\n isURLCodePoint,\n p\n} = require(\"./url-miscellaneous\");\nconst { hasAnOpaquePath } = require(\"./url-state-machine\");\n\nconst pathSegmentExcludedCodePoints = new Set([p(\"/\"), p(\"?\")]);\nconst opaquePathExcludedCodePoints = new Set([p(\"?\")]);\n\nfunction splitOffFragment(input) {\n const fragmentStart = input.indexOf(\"#\");\n\n if (fragmentStart === -1) {\n return { beforeFragment: input, fragment: null };\n }\n\n return {\n beforeFragment: input.substring(0, fragmentStart),\n fragment: input.substring(fragmentStart + 1)\n };\n}\n\nfunction splitOffQuery(input) {\n const queryStart = input.indexOf(\"?\");\n\n if (queryStart === -1) {\n return { beforeQuery: input, query: null };\n }\n\n return {\n beforeQuery: input.substring(0, queryStart),\n query: input.substring(queryStart + 1)\n };\n}\n\nfunction isValidURLString(input, options = {}) {\n const baseURL = options.baseURL ?? null;\n\n return isValidAbsoluteURLWithFragmentString(input) ||\n (baseURL !== null && isValidRelativeURLWithFragmentString(input, baseURL));\n}\n\nfunction isValidAbsoluteURLWithFragmentString(input) {\n const { beforeFragment, fragment } = splitOffFragment(input);\n\n return (fragment === null || isValidURLFragmentString(fragment)) && isValidAbsoluteURLString(beforeFragment);\n}\n\nfunction isValidAbsoluteURLString(input) {\n const { beforeQuery, query } = splitOffQuery(input);\n\n if (query !== null && !isValidURLQueryString(query)) {\n return false;\n }\n\n const schemeMatch = /^([A-Za-z][A-Za-z0-9+.-]*):/u.exec(beforeQuery);\n if (schemeMatch === null) {\n return false;\n }\n\n const scheme = schemeMatch[1].toLowerCase();\n const afterScheme = beforeQuery.substring(schemeMatch[0].length);\n\n if (isSpecialSchemeExceptFile(scheme)) {\n return isValidSchemeRelativeSpecialURLString(afterScheme);\n }\n if (scheme === \"file\") {\n return isValidSchemeRelativeFileURLString(afterScheme);\n }\n\n return isValidSchemeRelativeURLString(afterScheme) ||\n isValidPathAbsoluteNonAuthorityURLString(afterScheme) ||\n isValidOpaquePathURLString(afterScheme);\n}\n\nfunction isValidRelativeURLWithFragmentString(input, baseURL) {\n if (hasAnOpaquePath(baseURL)) {\n return input.startsWith(\"#\") && isValidURLFragmentString(input.substring(1));\n }\n\n const { beforeFragment, fragment } = splitOffFragment(input);\n\n return isValidRelativeURLString(beforeFragment, baseURL) &&\n (fragment === null || isValidURLFragmentString(fragment));\n}\n\nfunction isValidRelativeURLString(input, baseURL) {\n const { beforeQuery, query } = splitOffQuery(input);\n const hasValidQuery = query === null || isValidURLQueryString(query);\n\n if (isValidPathAbsoluteNonAuthorityURLString(beforeQuery)) {\n return hasValidQuery;\n }\n\n if (isValidPathRelativeSchemeLessURLString(beforeQuery)) {\n return hasValidQuery;\n }\n\n if (isSpecialSchemeExceptFile(baseURL.scheme)) {\n return isValidSchemeRelativeSpecialURLString(beforeQuery) && hasValidQuery;\n }\n\n if (baseURL.scheme === \"file\") {\n return isValidSchemeRelativeFileURLString(beforeQuery) && hasValidQuery;\n }\n\n return isValidSchemeRelativeURLString(beforeQuery) && hasValidQuery;\n}\n\nfunction isValidSchemeRelativeSpecialURLString(input) {\n if (!input.startsWith(\"//\")) {\n return false;\n }\n\n const { authority, path } = splitOffPath(input.substring(2));\n\n return isValidHostAndPortString(authority, isValidHostString) &&\n (path === null || isValidPathAbsoluteURLString(path));\n}\n\nfunction isValidSchemeRelativeURLString(input) {\n if (!input.startsWith(\"//\")) {\n return false;\n }\n\n const { authority, path } = splitOffPath(input.substring(2));\n\n return isValidOpaqueHostAndPortString(authority) &&\n (path === null || isValidPathAbsoluteURLString(path));\n}\n\nfunction isValidSchemeRelativeFileURLString(input) {\n if (!input.startsWith(\"//\")) {\n return false;\n }\n\n const afterSlashes = input.substring(2);\n\n return afterSlashes === \"\" ||\n isValidHostAndPathAbsoluteURLString(afterSlashes) ||\n isValidPathAbsoluteURLString(afterSlashes);\n}\n\nfunction isValidHostAndPathAbsoluteURLString(input) {\n const { authority, path } = splitOffPath(input);\n\n return isValidHostString(authority) &&\n (path === null || isValidPathAbsoluteURLString(path));\n}\n\nfunction splitOffPath(input) {\n const pathStart = input.indexOf(\"/\");\n\n if (pathStart === -1) {\n return { authority: input, path: null };\n }\n\n return {\n authority: input.substring(0, pathStart),\n path: input.substring(pathStart)\n };\n}\n\nfunction isValidHostAndPortString(input, isValidHost) {\n const parsed = splitHostAndPort(input);\n\n return parsed !== null &&\n parsed.host !== \"\" &&\n isValidHost(parsed.host) &&\n (parsed.port === null || isValidURLPortString(parsed.port));\n}\n\nfunction isValidOpaqueHostAndPortString(input) {\n if (input === \"\") {\n return true;\n }\n\n const parsed = splitHostAndPort(input);\n\n return parsed !== null &&\n parsed.host !== \"\" &&\n isValidOpaqueHostString(parsed.host) &&\n (parsed.port === null || isValidURLPortString(parsed.port));\n}\n\nfunction splitHostAndPort(input) {\n if (input.startsWith(\"[\")) {\n const hostEnd = input.indexOf(\"]\");\n if (hostEnd === -1) {\n return null;\n }\n\n const rest = input.substring(hostEnd + 1);\n if (rest !== \"\" && !rest.startsWith(\":\")) {\n return null;\n }\n\n return {\n host: input.substring(0, hostEnd + 1),\n port: rest === \"\" ? null : rest.substring(1)\n };\n }\n\n const portStart = input.indexOf(\":\");\n if (portStart === -1) {\n return { host: input, port: null };\n }\n\n return {\n host: input.substring(0, portStart),\n port: input.substring(portStart + 1)\n };\n}\n\nfunction isValidHostString(input) {\n return isValidDomainString(input) ||\n isValidIPv4AddressString(input) ||\n isValidBracketedIPv6AddressString(input);\n}\n\nfunction isValidDomainString(input) {\n const domain = domainParser(input, null, true);\n\n return domain !== failure && !endsInANumber(domain);\n}\n\nfunction isValidIPv4AddressString(input) {\n const pieces = input.split(\".\");\n\n return pieces.length === 4 && pieces.every(isValidIPv4AddressPieceString);\n}\n\nfunction isValidIPv4AddressPieceString(input) {\n if (input === \"\" || input.length > 3) {\n return false;\n }\n\n for (let i = 0; i < input.length; ++i) {\n if (!infra.isASCIIDigit(input.codePointAt(i))) {\n return false;\n }\n }\n\n if (input.length > 1 && input[0] === \"0\") {\n return false;\n }\n\n return Number(input) <= 255;\n}\n\nfunction isValidBracketedIPv6AddressString(input) {\n return input.startsWith(\"[\") &&\n input.endsWith(\"]\") &&\n isValidIPv6AddressString(input.substring(1, input.length - 1));\n}\n\nfunction isValidIPv6AddressString(input) {\n return getIPv6PiecesStringEffectiveLength(input) === 8 ||\n getIPv6PiecesAndIPv4StringEffectiveLength(input) === 8 ||\n isValidCompressedIPv6AddressString(input);\n}\n\nfunction isValidCompressedIPv6AddressString(input) {\n const compressionIndex = input.indexOf(\"::\");\n if (compressionIndex === -1 || compressionIndex !== input.lastIndexOf(\"::\")) {\n return false;\n }\n\n const preceding = input.substring(0, compressionIndex);\n const following = input.substring(compressionIndex + 2);\n\n const precedingLength = getOptionalIPv6PiecesStringEffectiveLength(preceding);\n const followingLength = getOptionalIPv6PiecesOrPiecesAndIPv4StringEffectiveLength(following);\n if (precedingLength === failure || followingLength === failure) {\n return false;\n }\n\n return precedingLength + followingLength <= 7;\n}\n\nfunction getOptionalIPv6PiecesStringEffectiveLength(input) {\n return input === \"\" ? 0 : getIPv6PiecesStringEffectiveLength(input);\n}\n\nfunction getOptionalIPv6PiecesOrPiecesAndIPv4StringEffectiveLength(input) {\n return input === \"\" ? 0 : getIPv6PiecesOrPiecesAndIPv4StringEffectiveLength(input);\n}\n\nfunction getIPv6PiecesOrPiecesAndIPv4StringEffectiveLength(input) {\n if (isValidIPv6PiecesString(input)) {\n return getIPv6PiecesStringEffectiveLength(input);\n }\n\n if (isValidIPv6PiecesAndIPv4String(input)) {\n return getIPv6PiecesAndIPv4StringEffectiveLength(input);\n }\n\n return failure;\n}\n\nfunction isValidIPv6PiecesAndIPv4String(input) {\n if (isValidIPv4AddressString(input)) {\n return true;\n }\n\n const ipv4SeparatorIndex = input.lastIndexOf(\":\");\n if (ipv4SeparatorIndex === -1) {\n return false;\n }\n\n return isValidIPv6PiecesString(input.substring(0, ipv4SeparatorIndex)) &&\n isValidIPv4AddressString(input.substring(ipv4SeparatorIndex + 1));\n}\n\nfunction getIPv6PiecesAndIPv4StringEffectiveLength(input) {\n if (!isValidIPv6PiecesAndIPv4String(input)) {\n return failure;\n }\n\n const ipv4SeparatorIndex = input.lastIndexOf(\":\");\n if (ipv4SeparatorIndex === -1) {\n return 2;\n }\n\n const piecesLength = getIPv6PiecesStringEffectiveLength(input.substring(0, ipv4SeparatorIndex));\n return piecesLength + 2;\n}\n\nfunction isValidIPv6PiecesString(input) {\n if (input === \"\") {\n return false;\n }\n\n const pieces = input.split(\":\");\n return pieces.every(isValidIPv6PieceString);\n}\n\nfunction getIPv6PiecesStringEffectiveLength(input) {\n return isValidIPv6PiecesString(input) ? input.split(\":\").length : failure;\n}\n\nfunction isValidIPv6PieceString(input) {\n if (input === \"\" || input.length > 4) {\n return false;\n }\n\n for (let i = 0; i < input.length; ++i) {\n if (!infra.isASCIIHex(input.codePointAt(i))) {\n return false;\n }\n }\n\n const value = parseInt(input, 16);\n return value <= 0xFFFF && (input.length === 1 || input[0] !== \"0\");\n}\n\nfunction isValidOpaqueHostString(input) {\n return isValidBracketedIPv6AddressString(input) ||\n (input !== \"\" && isValidURLUnits(input, forbiddenHostCodePoints));\n}\n\nfunction isValidURLPortString(input) {\n if (input === \"\") {\n return true;\n }\n if (!/^[0-9]+$/u.test(input)) {\n return false;\n }\n\n return Number(input) <= 65535;\n}\n\nfunction isValidPathAbsoluteURLString(input) {\n return input.startsWith(\"/\") && input.substring(1).split(\"/\").every(isValidURLPathSegmentString);\n}\n\nfunction isValidPathAbsoluteNonAuthorityURLString(input) {\n return isValidPathAbsoluteURLString(input) && !input.startsWith(\"//\");\n}\n\nfunction isValidPathRelativeURLString(input) {\n return !input.startsWith(\"/\") && input.split(\"/\").every(isValidURLPathSegmentString);\n}\n\nfunction isValidURLPathSegmentString(input) {\n return isValidURLUnits(input, pathSegmentExcludedCodePoints);\n}\n\nfunction isValidPathRelativeSchemeLessURLString(input) {\n return isValidPathRelativeURLString(input) && !/^[A-Za-z][A-Za-z0-9+.-]*:/u.test(input);\n}\n\nfunction isValidOpaquePathURLString(input) {\n return (input === \"\" || input[0] !== \"/\") && isValidURLUnits(input, opaquePathExcludedCodePoints);\n}\n\nfunction isValidURLQueryString(input) {\n return isValidURLUnits(input);\n}\n\nfunction isValidURLFragmentString(input) {\n return isValidURLUnits(input);\n}\n\nfunction isValidURLUnits(input, excludedCodePoints = new Set()) {\n for (let i = 0; i < input.length;) {\n if (input[i] === \"%\") {\n if (!isPercentEncodedByteAt(input, i)) {\n return false;\n }\n\n i += 3;\n continue;\n }\n\n const codePoint = input.codePointAt(i);\n if (!isURLCodePoint(codePoint) || excludedCodePoints.has(codePoint)) {\n return false;\n }\n\n i += codePoint > 0xFFFF ? 2 : 1;\n }\n\n return true;\n}\n\nmodule.exports = {\n isValidURLString\n};\n","\"use strict\";\nconst { utf8Encode, utf8DecodeWithoutBOM } = require(\"./encoding\");\nconst { percentDecodeBytes, utf8PercentEncodeString, isURLEncodedPercentEncode } = require(\"./percent-encoding\");\n\nfunction p(char) {\n return char.codePointAt(0);\n}\n\n// https://url.spec.whatwg.org/#concept-urlencoded-parser\nfunction parseUrlencoded(input) {\n const sequences = strictlySplitByteSequence(input, p(\"&\"));\n const output = [];\n for (const bytes of sequences) {\n if (bytes.length === 0) {\n continue;\n }\n\n let name, value;\n const indexOfEqual = bytes.indexOf(p(\"=\"));\n\n if (indexOfEqual >= 0) {\n name = bytes.slice(0, indexOfEqual);\n value = bytes.slice(indexOfEqual + 1);\n } else {\n name = bytes;\n value = new Uint8Array(0);\n }\n\n name = replaceByteInByteSequence(name, 0x2B, 0x20);\n value = replaceByteInByteSequence(value, 0x2B, 0x20);\n\n const nameString = utf8DecodeWithoutBOM(percentDecodeBytes(name));\n const valueString = utf8DecodeWithoutBOM(percentDecodeBytes(value));\n\n output.push([nameString, valueString]);\n }\n return output;\n}\n\n// https://url.spec.whatwg.org/#concept-urlencoded-string-parser\nfunction parseUrlencodedString(input) {\n return parseUrlencoded(utf8Encode(input));\n}\n\n// https://url.spec.whatwg.org/#concept-urlencoded-serializer\nfunction serializeUrlencoded(tuples) {\n // TODO: accept and use encoding argument\n\n let output = \"\";\n for (const [i, tuple] of tuples.entries()) {\n const name = utf8PercentEncodeString(tuple[0], isURLEncodedPercentEncode, true);\n const value = utf8PercentEncodeString(tuple[1], isURLEncodedPercentEncode, true);\n\n if (i !== 0) {\n output += \"&\";\n }\n output += `${name}=${value}`;\n }\n return output;\n}\n\nfunction strictlySplitByteSequence(buf, cp) {\n const list = [];\n let last = 0;\n let i = buf.indexOf(cp);\n while (i >= 0) {\n list.push(buf.slice(last, i));\n last = i + 1;\n i = buf.indexOf(cp, last);\n }\n if (last !== buf.length) {\n list.push(buf.slice(last));\n }\n return list;\n}\n\nfunction replaceByteInByteSequence(buf, from, to) {\n let i = buf.indexOf(from);\n while (i >= 0) {\n buf[i] = to;\n i = buf.indexOf(from, i + 1);\n }\n return buf;\n}\n\nmodule.exports = {\n parseUrlencodedString,\n serializeUrlencoded\n};\n","\"use strict\";\n\n// Returns \"Type(value) is Object\" in ES terminology.\nfunction isObject(value) {\n return (typeof value === \"object\" && value !== null) || typeof value === \"function\";\n}\n\nconst call = Function.call.bind(Function.call);\n\n// Like `Object.assign`, but using `[[GetOwnProperty]]` and `[[DefineOwnProperty]]`\n// instead of `[[Get]]` and `[[Set]]` and only allowing objects\nfunction define(target, source) {\n for (const key of Reflect.ownKeys(source)) {\n const descriptor = Reflect.getOwnPropertyDescriptor(source, key);\n if (descriptor && !Reflect.defineProperty(target, key, descriptor)) {\n throw new TypeError(`Cannot redefine property: ${String(key)}`);\n }\n }\n}\n\nfunction newObjectInRealm(globalObject, object) {\n const ctorRegistry = initCtorRegistry(globalObject);\n return Object.defineProperties(\n Object.create(ctorRegistry[\"%Object.prototype%\"]),\n Object.getOwnPropertyDescriptors(object)\n );\n}\n\nconst wrapperSymbol = Symbol(\"wrapper\");\nconst implSymbol = Symbol(\"impl\");\nconst sameObjectCaches = Symbol(\"SameObject caches\");\nconst ctorRegistrySymbol = Symbol.for(\"[webidl2js] constructor registry\");\n\nconst AsyncIteratorPrototype = Object.getPrototypeOf(Object.getPrototypeOf(async function* () {}).prototype);\n\nfunction initCtorRegistry(globalObject) {\n if (Object.hasOwn(globalObject, ctorRegistrySymbol)) {\n return globalObject[ctorRegistrySymbol];\n }\n\n const ctorRegistry = Object.create(null);\n\n // In addition to registering all the WebIDL2JS-generated types in the constructor registry,\n // we also register a few intrinsics that we make use of in generated code, since they are not\n // easy to grab from the globalObject variable.\n ctorRegistry[\"%Object.prototype%\"] = globalObject.Object.prototype;\n ctorRegistry[\"%IteratorPrototype%\"] = Object.getPrototypeOf(\n Object.getPrototypeOf(new globalObject.Array()[Symbol.iterator]())\n );\n\n try {\n ctorRegistry[\"%AsyncIteratorPrototype%\"] = Object.getPrototypeOf(\n Object.getPrototypeOf(\n globalObject.eval(\"(async function* () {})\").prototype\n )\n );\n } catch {\n ctorRegistry[\"%AsyncIteratorPrototype%\"] = AsyncIteratorPrototype;\n }\n\n globalObject[ctorRegistrySymbol] = ctorRegistry;\n return ctorRegistry;\n}\n\nfunction getSameObject(wrapper, prop, creator) {\n if (!wrapper[sameObjectCaches]) {\n wrapper[sameObjectCaches] = Object.create(null);\n }\n\n if (prop in wrapper[sameObjectCaches]) {\n return wrapper[sameObjectCaches][prop];\n }\n\n wrapper[sameObjectCaches][prop] = creator();\n return wrapper[sameObjectCaches][prop];\n}\n\nfunction wrapperForImpl(impl) {\n return impl ? impl[wrapperSymbol] : null;\n}\n\nfunction implForWrapper(wrapper) {\n return wrapper ? wrapper[implSymbol] : null;\n}\n\nfunction tryWrapperForImpl(impl) {\n const wrapper = wrapperForImpl(impl);\n return wrapper ? wrapper : impl;\n}\n\nfunction tryImplForWrapper(wrapper) {\n const impl = implForWrapper(wrapper);\n return impl ? impl : wrapper;\n}\n\nconst iterInternalSymbol = Symbol(\"internal\");\n\nfunction isArrayIndexPropName(P) {\n if (typeof P !== \"string\") {\n return false;\n }\n const i = P >>> 0;\n if (i === 2 ** 32 - 1) {\n return false;\n }\n const s = `${i}`;\n if (P !== s) {\n return false;\n }\n return true;\n}\n\nconst arrayBufferByteLengthGetter =\n Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, \"byteLength\").get;\nfunction isArrayBuffer(value) {\n try {\n arrayBufferByteLengthGetter.call(value);\n return true;\n } catch {\n return false;\n }\n}\n\nconst sharedArrayBufferByteLengthGetter =\n Object.getOwnPropertyDescriptor(SharedArrayBuffer.prototype, \"byteLength\").get;\nfunction isSharedArrayBuffer(value) {\n try {\n sharedArrayBufferByteLengthGetter.call(value);\n return true;\n } catch {\n return false;\n }\n}\n\nfunction iteratorResult([key, value], kind) {\n let result;\n switch (kind) {\n case \"key\":\n result = key;\n break;\n case \"value\":\n result = value;\n break;\n case \"key+value\":\n result = [key, value];\n break;\n }\n return { value: result, done: false };\n}\n\nfunction ordinarySetWithOwnDescriptor(target, property, value, receiver, ownDesc) {\n if (ownDesc === undefined) {\n const parent = Reflect.getPrototypeOf(target);\n if (parent !== null) {\n return Reflect.set(parent, property, value, receiver);\n }\n ownDesc = { writable: true, enumerable: true, configurable: true, value: undefined };\n }\n if (isDataDescriptor(ownDesc)) {\n if (!ownDesc.writable) {\n return false;\n }\n if (!isObject(receiver)) {\n return false;\n }\n const existingDesc = Reflect.getOwnPropertyDescriptor(receiver, property);\n if (existingDesc !== undefined) {\n if (isAccessorDescriptor(existingDesc)) {\n return false;\n }\n if (existingDesc.writable === false) {\n return false;\n }\n const valueDesc = { value };\n return Reflect.defineProperty(receiver, property, valueDesc);\n }\n\n return Reflect.defineProperty(\n receiver,\n property,\n { value, writable: true, enumerable: true, configurable: true }\n );\n }\n\n const setter = ownDesc.set;\n if (setter === undefined) {\n return false;\n }\n call(setter, receiver, value);\n return true;\n}\n\nfunction isDataDescriptor(desc) {\n return Object.hasOwn(desc, \"value\") || Object.hasOwn(desc, \"writable\");\n}\n\nfunction isAccessorDescriptor(desc) {\n return Object.hasOwn(desc, \"get\") || Object.hasOwn(desc, \"set\");\n}\n\nfunction getMethod(value, property, errPrefix = \"The provided value\") {\n const func = value[property];\n if (func === undefined || func === null) {\n return undefined;\n }\n if (typeof func !== \"function\") {\n throw new TypeError(`${errPrefix}'s ${property} property is not a function.`);\n }\n return func;\n}\n\nfunction createAsyncFromSyncIterator(syncIterator) {\n // Instead of re-implementing CreateAsyncFromSyncIterator and %AsyncFromSyncIteratorPrototype%,\n // we use yield* inside an async generator function to achieve the same result.\n\n // Wrap the sync iterator inside a sync iterable, so we can use it with yield*.\n const syncIterable = {\n [Symbol.iterator]: () => syncIterator\n };\n // Create an async generator function and immediately invoke it.\n const asyncIterator = (async function* () {\n return yield* syncIterable;\n })();\n // Return as an async iterator record.\n return asyncIterator;\n}\n\nfunction convertAsyncSequence(object, itemConverter, errPrefix = \"The provided value\") {\n if (!isObject(object)) {\n throw new TypeError(`${errPrefix} is not an object.`);\n }\n let method = getMethod(object, Symbol.asyncIterator, errPrefix);\n let type = \"async\";\n if (method === undefined) {\n method = getMethod(object, Symbol.iterator, errPrefix);\n if (method === undefined) {\n throw new TypeError(`${errPrefix} is not an async iterable object.`);\n }\n type = \"sync\";\n }\n\n return {\n object,\n method,\n type,\n // The wrapperSymbol ensures that if the async sequence is used as a return value,\n // that it exposes the original JavaScript value.\n // https://webidl.spec.whatwg.org/#js-async-iterable\n [wrapperSymbol]: object,\n // Implement the async iterator protocol, so users can iterate\n // the async sequence directly (e.g. with for await...of)\n // instead of needing to call a separate helper function to open the async sequence.\n // https://webidl.spec.whatwg.org/#async-sequence-open\n [Symbol.asyncIterator]() {\n return openAsyncSequence(object, method, type, itemConverter, `${errPrefix}'s iterator`);\n }\n };\n}\n\nfunction openAsyncSequence(object, method, type, itemConverter, errPrefix = \"The provided value\") {\n let iterator = call(method, object);\n if (!isObject(iterator)) {\n throw new TypeError(`${errPrefix}'s method must return an object`);\n }\n if (type === \"sync\") {\n iterator = createAsyncFromSyncIterator(iterator);\n }\n const nextMethod = iterator.next;\n return {\n async next() {\n const nextResult = await call(nextMethod, iterator);\n if (!isObject(nextResult)) {\n throw new TypeError(`${errPrefix}'s next method must return an object`);\n }\n const { done, value } = nextResult;\n if (done) {\n return { done: true, value: undefined };\n }\n return { done: false, value: itemConverter(value) };\n },\n async return(reason) {\n const returnMethod = getMethod(iterator, \"return\", errPrefix);\n if (returnMethod === undefined) {\n return { done: true, value: undefined };\n }\n const returnResult = await call(returnMethod, iterator, reason);\n if (!isObject(returnResult)) {\n throw new TypeError(`${errPrefix}'s return method must return an object`);\n }\n return { done: true, value: undefined };\n },\n [Symbol.asyncIterator]() {\n return this;\n }\n };\n}\n\nconst supportsPropertyIndex = Symbol(\"supports property index\");\nconst supportedPropertyIndices = Symbol(\"supported property indices\");\nconst supportsPropertyName = Symbol(\"supports property name\");\nconst supportedPropertyNames = Symbol(\"supported property names\");\nconst indexedGet = Symbol(\"indexed property get\");\nconst indexedSetNew = Symbol(\"indexed property set new\");\nconst indexedSetExisting = Symbol(\"indexed property set existing\");\nconst namedGet = Symbol(\"named property get\");\nconst namedSetNew = Symbol(\"named property set new\");\nconst namedSetExisting = Symbol(\"named property set existing\");\nconst namedDelete = Symbol(\"named property delete\");\n\nconst asyncIteratorNext = Symbol(\"async iterator get the next iteration result\");\nconst asyncIteratorReturn = Symbol(\"async iterator return steps\");\nconst asyncIteratorInit = Symbol(\"async iterator initialization steps\");\nconst asyncIteratorEOI = Symbol(\"async iterator end of iteration\");\n\nmodule.exports = exports = {\n isObject,\n define,\n newObjectInRealm,\n wrapperSymbol,\n implSymbol,\n getSameObject,\n ctorRegistrySymbol,\n initCtorRegistry,\n wrapperForImpl,\n implForWrapper,\n tryWrapperForImpl,\n tryImplForWrapper,\n iterInternalSymbol,\n isArrayBuffer,\n isSharedArrayBuffer,\n isArrayIndexPropName,\n getMethod,\n convertAsyncSequence,\n supportsPropertyIndex,\n supportedPropertyIndices,\n supportsPropertyName,\n supportedPropertyNames,\n indexedGet,\n indexedSetNew,\n indexedSetExisting,\n namedGet,\n namedSetNew,\n namedSetExisting,\n namedDelete,\n asyncIteratorNext,\n asyncIteratorReturn,\n asyncIteratorInit,\n asyncIteratorEOI,\n iteratorResult,\n ordinarySetWithOwnDescriptor\n};\n","\"use strict\";\n\nconst URL = require(\"./lib/URL\");\nconst URLSearchParams = require(\"./lib/URLSearchParams\");\n\nexports.URL = URL;\nexports.URLSearchParams = URLSearchParams;\n","module.exports = () => require('./multi-byte.encodings.json') // lazy-load\n","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue(arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(null, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","export function assertEmptyRest(rest) {\n if (Object.keys(rest).length > 0) throw new TypeError('Unexpected extra options')\n}\n\n// eslint-disable-next-line sonarjs/no-nested-template-literals\nconst makeMessage = (name, extra) => `Expected${name ? ` ${name} to be` : ''} an Uint8Array${extra}`\n\nconst TypedArray = Object.getPrototypeOf(Uint8Array)\n\nexport function assertTypedArray(arr) {\n if (arr && arr instanceof TypedArray) return\n throw new TypeError('Expected a TypedArray instance')\n}\n\nexport function assertUint8(arr, options) {\n if (!options) {\n // fast path\n if (arr instanceof Uint8Array) return\n throw new TypeError('Expected an Uint8Array')\n }\n\n const { name, length, ...rest } = options\n assertEmptyRest(rest)\n if (arr instanceof Uint8Array && (length === undefined || arr.length === length)) return\n throw new TypeError(makeMessage(name, length === undefined ? '' : ` of size ${Number(length)}`))\n}\n","import { nativeEncoder, nativeDecoder } from './platform.js'\nimport { encodeAscii, decodeAscii } from './latin1.js'\n\n// See https://datatracker.ietf.org/doc/html/rfc4648\n\nconst BASE64 = [...'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/']\nconst BASE64URL = [...'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_']\nconst BASE64_HELPERS = {}\nconst BASE64URL_HELPERS = {}\n\nexport const E_CHAR = 'Invalid character in base64 input'\nexport const E_PADDING = 'Invalid base64 padding'\nexport const E_LENGTH = 'Invalid base64 length'\nexport const E_LAST = 'Invalid last chunk'\n\n// We construct output by concatenating chars, this seems to be fine enough on modern JS engines\n// Expects a checked Uint8Array\nexport function toBase64(arr, isURL, padding) {\n const fullChunks = (arr.length / 3) | 0\n const fullChunksBytes = fullChunks * 3\n let o = ''\n let i = 0\n\n const alphabet = isURL ? BASE64URL : BASE64\n const helpers = isURL ? BASE64URL_HELPERS : BASE64_HELPERS\n if (!helpers.pairs) {\n helpers.pairs = []\n if (nativeDecoder) {\n // Lazy to save memory in case if this is not needed\n helpers.codepairs = new Uint16Array(64 * 64)\n const u16 = helpers.codepairs\n const u8 = new Uint8Array(u16.buffer, u16.byteOffset, u16.byteLength) // write as 1-byte to ignore BE/LE difference\n for (let i = 0; i < 64; i++) {\n const ic = alphabet[i].charCodeAt(0)\n for (let j = 0; j < 64; j++) u8[(i << 7) | (j << 1)] = u8[(j << 7) | ((i << 1) + 1)] = ic\n }\n } else {\n const p = helpers.pairs\n for (let i = 0; i < 64; i++) {\n for (let j = 0; j < 64; j++) p.push(`${alphabet[i]}${alphabet[j]}`)\n }\n }\n }\n\n const { pairs, codepairs } = helpers\n\n // Fast path for complete blocks\n // This whole loop can be commented out, the algorithm won't change, it's just an optimization of the next loop\n if (nativeDecoder) {\n const oa = new Uint16Array(fullChunks * 2)\n let j = 0\n for (const last = arr.length - 11; i < last; i += 12, j += 8) {\n const x0 = arr[i]\n const x1 = arr[i + 1]\n const x2 = arr[i + 2]\n const x3 = arr[i + 3]\n const x4 = arr[i + 4]\n const x5 = arr[i + 5]\n const x6 = arr[i + 6]\n const x7 = arr[i + 7]\n const x8 = arr[i + 8]\n const x9 = arr[i + 9]\n const x10 = arr[i + 10]\n const x11 = arr[i + 11]\n oa[j] = codepairs[(x0 << 4) | (x1 >> 4)]\n oa[j + 1] = codepairs[((x1 & 0x0f) << 8) | x2]\n oa[j + 2] = codepairs[(x3 << 4) | (x4 >> 4)]\n oa[j + 3] = codepairs[((x4 & 0x0f) << 8) | x5]\n oa[j + 4] = codepairs[(x6 << 4) | (x7 >> 4)]\n oa[j + 5] = codepairs[((x7 & 0x0f) << 8) | x8]\n oa[j + 6] = codepairs[(x9 << 4) | (x10 >> 4)]\n oa[j + 7] = codepairs[((x10 & 0x0f) << 8) | x11]\n }\n\n // i < last here is equivalent to i < fullChunksBytes\n for (const last = arr.length - 2; i < last; i += 3, j += 2) {\n const a = arr[i]\n const b = arr[i + 1]\n const c = arr[i + 2]\n oa[j] = codepairs[(a << 4) | (b >> 4)]\n oa[j + 1] = codepairs[((b & 0x0f) << 8) | c]\n }\n\n o = decodeAscii(oa)\n } else {\n // This can be optimized by ~25% with templates on Hermes, but this codepath is not called on Hermes, it uses btoa\n // Check git history for templates version\n for (; i < fullChunksBytes; i += 3) {\n const a = arr[i]\n const b = arr[i + 1]\n const c = arr[i + 2]\n o += pairs[(a << 4) | (b >> 4)]\n o += pairs[((b & 0x0f) << 8) | c]\n }\n }\n\n // If we have something left, process it with a full algo\n let carry = 0\n let shift = 2 // First byte needs to be shifted by 2 to get 6 bits\n const length = arr.length\n for (; i < length; i++) {\n const x = arr[i]\n o += alphabet[carry | (x >> shift)] // shift >= 2, so this fits\n if (shift === 6) {\n shift = 0\n o += alphabet[x & 0x3f]\n }\n\n carry = (x << (6 - shift)) & 0x3f\n shift += 2 // Each byte prints 6 bits and leaves 2 bits\n }\n\n if (shift !== 2) o += alphabet[carry] // shift 2 means we have no carry left\n if (padding) o += ['', '==', '='][length - fullChunksBytes]\n\n return o\n}\n\n// TODO: can this be optimized? This only affects non-Hermes barebone engines though\nconst mapSize = nativeEncoder ? 128 : 65_536 // we have to store 64 KiB map or recheck everything if we can't decode to byte array\n\nexport function fromBase64(str, isURL) {\n let inputLength = str.length\n while (str[inputLength - 1] === '=') inputLength--\n const paddingLength = str.length - inputLength\n const tailLength = inputLength % 4\n const mainLength = inputLength - tailLength // multiples of 4\n if (tailLength === 1) throw new SyntaxError(E_LENGTH)\n if (paddingLength > 3 || (paddingLength !== 0 && str.length % 4 !== 0)) {\n throw new SyntaxError(E_PADDING)\n }\n\n const alphabet = isURL ? BASE64URL : BASE64\n const helpers = isURL ? BASE64URL_HELPERS : BASE64_HELPERS\n\n if (!helpers.fromMap) {\n helpers.fromMap = new Int8Array(mapSize).fill(-1) // no regex input validation here, so we map all other bytes to -1 and recheck sign\n alphabet.forEach((c, i) => (helpers.fromMap[c.charCodeAt(0)] = i))\n }\n\n const m = helpers.fromMap\n\n const arr = new Uint8Array(Math.floor((inputLength * 3) / 4))\n let at = 0\n let i = 0\n\n if (nativeEncoder) {\n const codes = encodeAscii(str, E_CHAR)\n for (; i < mainLength; i += 4) {\n const c0 = codes[i]\n const c1 = codes[i + 1]\n const c2 = codes[i + 2]\n const c3 = codes[i + 3]\n const a = (m[c0] << 18) | (m[c1] << 12) | (m[c2] << 6) | m[c3]\n if (a < 0) throw new SyntaxError(E_CHAR)\n arr[at] = a >> 16\n arr[at + 1] = (a >> 8) & 0xff\n arr[at + 2] = a & 0xff\n at += 3\n }\n } else {\n for (; i < mainLength; i += 4) {\n const c0 = str.charCodeAt(i)\n const c1 = str.charCodeAt(i + 1)\n const c2 = str.charCodeAt(i + 2)\n const c3 = str.charCodeAt(i + 3)\n const a = (m[c0] << 18) | (m[c1] << 12) | (m[c2] << 6) | m[c3]\n if (a < 0) throw new SyntaxError(E_CHAR)\n arr[at] = a >> 16\n arr[at + 1] = (a >> 8) & 0xff\n arr[at + 2] = a & 0xff\n at += 3\n }\n }\n\n // Can be 0, 2 or 3, verified by padding checks already\n if (tailLength < 2) return arr // 0\n const ab = (m[str.charCodeAt(i++)] << 6) | m[str.charCodeAt(i++)]\n if (ab < 0) throw new SyntaxError(E_CHAR)\n arr[at++] = ab >> 4\n if (tailLength < 3) {\n if (ab & 0xf) throw new SyntaxError(E_LAST)\n return arr // 2\n }\n\n const c = m[str.charCodeAt(i++)]\n if (c < 0) throw new SyntaxError(E_CHAR)\n arr[at++] = ((ab << 4) & 0xff) | (c >> 2)\n if (c & 0x3) throw new SyntaxError(E_LAST)\n return arr // 3\n}\n","import { assertEmptyRest } from './assert.js'\nimport { assertU8, fromUint8, fromBuffer, E_STRING } from './fallback/_utils.js'\nimport { isHermes } from './fallback/platform.js'\nimport { decodeLatin1, encodeLatin1 } from './fallback/latin1.js'\nimport * as js from './fallback/base64.js'\n\n// See https://datatracker.ietf.org/doc/html/rfc4648\n\n// base64: A-Za-z0-9+/ and = if padding not disabled\n// base64url: A-Za-z0-9_- and = if padding enabled\n\nconst { Buffer, atob, btoa } = globalThis // Buffer is optional, only used when native\nconst haveNativeBuffer = Buffer && !Buffer.TYPED_ARRAY_SUPPORT\nconst { toBase64: web64 } = Uint8Array.prototype // Modern engines have this\n\nconst { E_CHAR, E_PADDING, E_LENGTH, E_LAST } = js\n\n// faster only on Hermes (and a little in old Chrome), js path beats it on normal engines\nconst shouldUseBtoa = btoa && isHermes\nconst shouldUseAtob = atob && isHermes\n\n// For native Buffer codepaths only\nconst isBuffer = (x) => x.constructor === Buffer && Buffer.isBuffer(x)\nconst toBuffer = (x) => (isBuffer(x) ? x : Buffer.from(x.buffer, x.byteOffset, x.byteLength))\n\nfunction maybeUnpad(res, padding) {\n if (padding) return res\n const at = res.indexOf('=', res.length - 3)\n return at === -1 ? res : res.slice(0, at)\n}\n\nfunction maybePad(res, padding) {\n return padding && res.length % 4 !== 0 ? res + '='.repeat(4 - (res.length % 4)) : res\n}\n\nconst toUrl = (x) => x.replaceAll('+', '-').replaceAll('/', '_')\nconst haveWeb = (x) => web64 && x.toBase64 === web64\n\nexport function toBase64(x, { padding = true } = {}) {\n assertU8(x)\n if (haveWeb(x)) return padding ? x.toBase64() : x.toBase64({ omitPadding: !padding }) // Modern, optionless is slightly faster\n if (haveNativeBuffer) return maybeUnpad(toBuffer(x).base64Slice(0, x.byteLength), padding) // Older Node.js\n if (shouldUseBtoa) return maybeUnpad(btoa(decodeLatin1(x)), padding)\n return js.toBase64(x, false, padding) // Fallback\n}\n\n// NOTE: base64url omits padding by default\nexport function toBase64url(x, { padding = false } = {}) {\n assertU8(x)\n if (haveWeb(x)) return x.toBase64({ alphabet: 'base64url', omitPadding: !padding }) // Modern\n if (haveNativeBuffer) return maybePad(toBuffer(x).base64urlSlice(0, x.byteLength), padding) // Older Node.js\n if (shouldUseBtoa) return maybeUnpad(toUrl(btoa(decodeLatin1(x))), padding)\n return js.toBase64(x, true, padding) // Fallback\n}\n\n// Unlike Buffer.from(), throws on invalid input (non-base64 symbols and incomplete chunks)\n// Unlike Buffer.from() and Uint8Array.fromBase64(), does not allow spaces\n// NOTE: Always operates in strict mode for last chunk\n\n// By default accepts both padded and non-padded variants, only strict base64\nexport function fromBase64(str, options) {\n if (typeof options === 'string') options = { format: options } // Compat due to usage, TODO: remove\n if (!options) return fromBase64common(str, false, 'both', 'uint8', null)\n const { format = 'uint8', padding = 'both', ...rest } = options\n return fromBase64common(str, false, padding, format, rest)\n}\n\n// By default accepts only non-padded strict base64url\nexport function fromBase64url(str, options) {\n if (!options) return fromBase64common(str, true, false, 'uint8', null)\n const { format = 'uint8', padding = false, ...rest } = options\n return fromBase64common(str, true, padding, format, rest)\n}\n\n// By default accepts both padded and non-padded variants, base64 or base64url\nexport function fromBase64any(str, { format = 'uint8', padding = 'both', ...rest } = {}) {\n if (typeof str !== 'string') throw new TypeError(E_STRING)\n const isBase64url = !str.includes('+') && !str.includes('/') // likely to fail fast, as most input is non-url, also double scan is faster than regex\n return fromBase64common(str, isBase64url, padding, format, rest)\n}\n\nfunction fromBase64common(str, isBase64url, padding, format, rest) {\n if (typeof str !== 'string') throw new TypeError(E_STRING)\n if (rest !== null) assertEmptyRest(rest)\n const auto = padding === 'both' ? str.endsWith('=') : undefined\n // Older JSC supporting Uint8Array.fromBase64 lacks proper checks\n if (padding === true || auto === true) {\n if (str.length % 4 !== 0) throw new SyntaxError(E_PADDING) // JSC misses this\n if (str[str.length - 3] === '=') throw new SyntaxError(E_PADDING) // no more than two = at the end\n } else if (padding === false || auto === false) {\n if (str.length % 4 === 1) throw new SyntaxError(E_LENGTH) // JSC misses this in fromBase64\n if (padding === false && str.endsWith('=')) {\n throw new SyntaxError('Did not expect padding in base64 input') // inclusion is checked separately\n }\n } else {\n throw new TypeError('Invalid padding option')\n }\n\n return fromBase64impl(str, isBase64url, padding, format)\n}\n\n// ASCII whitespace is U+0009 TAB, U+000A LF, U+000C FF, U+000D CR, or U+0020 SPACE\nconst ASCII_WHITESPACE = /[\\t\\n\\f\\r ]/ // non-u for JSC perf\n\nfunction noWhitespaceSeen(str, arr) {\n const at = str.indexOf('=', str.length - 3)\n const paddingLength = at >= 0 ? str.length - at : 0\n const chars = str.length - paddingLength\n const e = chars % 4 // extra chars past blocks of 4\n const b = arr.length - ((chars - e) / 4) * 3 // remaining bytes not covered by full blocks of chars\n return (e === 0 && b === 0) || (e === 2 && b === 1) || (e === 3 && b === 2)\n}\n\nlet fromBase64impl\nif (Uint8Array.fromBase64) {\n // NOTICE: this is actually slower than our JS impl in older JavaScriptCore and (slightly) in SpiderMonkey, but faster on V8 and new JavaScriptCore\n fromBase64impl = (str, isBase64url, padding, format) => {\n const alphabet = isBase64url ? 'base64url' : 'base64'\n\n let arr\n if (padding === true) {\n // Padding is required from user, and we already checked that string length is divisible by 4\n // Padding might still be wrong due to whitespace, but in that case native impl throws expected error\n arr = Uint8Array.fromBase64(str, { alphabet, lastChunkHandling: 'strict' })\n } else {\n try {\n const padded = str.length % 4 > 0 ? `${str}${'='.repeat(4 - (str.length % 4))}` : str\n arr = Uint8Array.fromBase64(padded, { alphabet, lastChunkHandling: 'strict' })\n } catch (err) {\n // Normalize error: whitespace in input could have caused added padding to be invalid\n // But reporting that as a padding error would be confusing\n throw ASCII_WHITESPACE.test(str) ? new SyntaxError(E_CHAR) : err\n }\n }\n\n // We don't allow whitespace in input, but that can be rechecked based on output length\n // All other chars are checked natively\n if (!noWhitespaceSeen(str, arr)) throw new SyntaxError(E_CHAR)\n return fromUint8(arr, format)\n }\n} else if (haveNativeBuffer) {\n fromBase64impl = (str, isBase64url, padding, format) => {\n const size = Buffer.byteLength(str, 'base64')\n const arr = Buffer.allocUnsafeSlow(size) // non-pooled\n if (arr.base64Write(str) !== size) throw new SyntaxError(E_PADDING)\n // Rechecking by re-encoding is cheaper than regexes on Node.js\n const got = isBase64url ? maybeUnpad(str, padding === false) : maybePad(str, padding !== true)\n const valid = isBase64url ? arr.base64urlSlice(0, arr.length) : arr.base64Slice(0, arr.length)\n if (got !== valid) throw new SyntaxError(E_PADDING)\n return fromBuffer(arr, format) // fully checked\n }\n} else if (shouldUseAtob) {\n // atob is faster than manual parsing on Hermes\n fromBase64impl = (str, isBase64url, padding, format) => {\n let arr\n if (isBase64url) {\n if (/[\\t\\n\\f\\r +/]/.test(str)) throw new SyntaxError(E_CHAR) // atob verifies other invalid input\n str = str.replaceAll('-', '+').replaceAll('_', '/') // from url to normal\n }\n\n try {\n arr = encodeLatin1(atob(str))\n } catch {\n throw new SyntaxError(E_CHAR) // convert atob errors\n }\n\n if (!isBase64url && !noWhitespaceSeen(str, arr)) throw new SyntaxError(E_CHAR) // base64url checks input above\n\n if (arr.length % 3 !== 0) {\n // Check last chunk to be strict if it was incomplete\n const expected = toBase64(arr.subarray(-(arr.length % 3))) // str is normalized to non-url already\n const end = str.length % 4 === 0 ? str.slice(-4) : str.slice(-(str.length % 4)).padEnd(4, '=')\n if (expected !== end) throw new SyntaxError(E_LAST)\n }\n\n return fromUint8(arr, format)\n }\n} else {\n fromBase64impl = (str, isBase64url, padding, format) =>\n fromUint8(js.fromBase64(str, isBase64url), format) // validated in js\n}\n","import { fromBase64url } from '@exodus/bytes/base64.js'\nimport { utf16toString } from '@exodus/bytes/utf16.js'\nimport loadEncodings from './multi-byte.encodings.cjs'\n\nexport const sizes = {\n jis0208: 11_104,\n jis0212: 7211,\n 'euc-kr': 23_750,\n gb18030: 23_940,\n big5: 19_782,\n}\n\n// This is huge. It's _much_ smaller than https://npmjs.com/text-encoding though\n// Exactly as mapped by the index table\n// 0,x - hole of x empty elements\n// n,c - continious [c, ...] of length n\n// $.. - references to common chunks\n// -{x} - same as 1,{x}\n\n// See tests/multi-byte.test.js to verify that this data decodes exactly into the encoding spec tables\n\nlet indices\nconst tables = new Map()\n/* eslint-disable @exodus/mutable/no-param-reassign-prop-only */\n\nfunction loadBase64(str) {\n const x = fromBase64url(str)\n const len = x.length\n const len2 = len >> 1\n const y = new Uint8Array(len)\n let a = -1, b = 0 // prettier-ignore\n for (let i = 0, j = 0; i < len; i += 2, j++) {\n a = (a + x[j] + 1) & 0xff\n b = (b + x[len2 + j]) & 0xff\n y[i] = a\n y[i + 1] = b\n }\n\n return y\n}\n\nfunction unwrap(res, t, pos) {\n let code = 0\n for (let i = 0; i < t.length; i++) {\n let x = t[i]\n if (typeof x === 'number') {\n if (x === 0) {\n pos += t[++i]\n } else {\n if (x < 0) {\n code -= x\n x = 1\n } else {\n code += t[++i]\n }\n\n for (let k = 0; k < x; k++, pos++, code++) {\n if (code <= 0xff_ff) {\n res[pos] = code\n } else {\n const c = String.fromCodePoint(code)\n res[pos] = (c.charCodeAt(0) << 16) | c.charCodeAt(1)\n }\n }\n }\n } else if (x[0] === '$' && Object.hasOwn(indices, x)) {\n pos = unwrap(res, indices[x], pos) // self-reference using shared chunks\n } else {\n let last\n // splits by codepoints\n for (const c of utf16toString(loadBase64(x), 'uint8-le')) {\n last = c\n res[pos++] = c.length === 1 ? c.charCodeAt(0) : (c.charCodeAt(0) << 16) | c.charCodeAt(1)\n }\n\n code = last.codePointAt(0) + 1\n }\n }\n\n return pos\n}\n\nexport function getTable(id) {\n const cached = tables.get(id)\n if (cached) return cached\n\n if (!indices) indices = loadEncodings() // lazy-load\n if (!Object.hasOwn(indices, id)) throw new Error('Unknown encoding')\n if (!indices[id]) throw new Error('Table already used (likely incorrect bundler dedupe)')\n\n let res\n if (id.endsWith('-ranges')) {\n res = []\n let a = 0, b = 0 // prettier-ignore\n const idx = indices[id]\n while (idx.length > 0) res.push([(a += idx.shift()), (b += idx.shift())]) // destroying, we remove it later anyway\n } else if (id.endsWith('-katakana')) {\n let a = -1\n res = new Uint16Array(indices[id].map((x) => (a += x + 1)))\n } else if (id === 'big5') {\n res = new Uint32Array(sizes[id]) // single or double charcodes\n unwrap(res, indices[id], 0)\n // Pointer code updates are embedded into the table\n // These are skipped in encoder as encoder uses only pointers >= (0xA1 - 0x81) * 157\n res[1133] = 0xca_03_04\n res[1135] = 0xca_03_0c\n res[1164] = 0xea_03_04\n res[1166] = 0xea_03_0c\n } else {\n if (!Object.hasOwn(sizes, id)) throw new Error('Unknown encoding')\n res = new Uint16Array(sizes[id])\n unwrap(res, indices[id], 0)\n }\n\n indices[id] = null // gc\n tables.set(id, res)\n return res\n}\n","import { E_STRING } from './_utils.js'\nimport { nativeEncoder } from './platform.js'\nimport { asciiPrefix, decodeAscii, decodeLatin1, decodeUCS2 } from './latin1.js'\nimport { getTable } from './multi-byte.table.js'\n\nexport const E_STRICT = 'Input is not well-formed for this encoding'\n\n/* Decoders */\n\n// If the decoder is not cleared properly, state can be preserved between non-streaming calls!\n// See comment about fatal stream\n\n// All except iso-2022-jp are ASCII supersets\n// When adding something that is not an ASCII superset, ajust the ASCII fast path\nconst mappers = {\n // https://encoding.spec.whatwg.org/#euc-kr-decoder\n 'euc-kr': (err) => {\n const euc = getTable('euc-kr')\n let lead = 0\n let oi = 0\n let o16\n\n const decodeLead = (b) => {\n if (b < 0x41 || b > 0xfe) {\n lead = 0\n o16[oi++] = err()\n if (b < 128) o16[oi++] = b\n } else {\n const p = euc[(lead - 0x81) * 190 + b - 0x41]\n lead = 0\n if (p) {\n o16[oi++] = p\n } else {\n o16[oi++] = err()\n if (b < 128) o16[oi++] = b\n }\n }\n }\n\n const decode = (arr, start, end, stream) => {\n let i = start\n o16 = new Uint16Array(end - start + (lead ? 1 : 0)) // there are pairs but they consume more than one byte\n oi = 0\n\n // Fast path\n if (!lead) {\n for (const last1 = end - 1; i < last1; ) {\n const l = arr[i]\n if (l < 128) {\n o16[oi++] = l\n i++\n } else {\n if (l === 0x80 || l === 0xff) break\n const b = arr[i + 1]\n if (b < 0x41 || b === 0xff) break\n const p = euc[(l - 0x81) * 190 + b - 0x41]\n if (!p) break\n o16[oi++] = p\n i += 2\n }\n }\n }\n\n if (lead && i < end) decodeLead(arr[i++])\n while (i < end) {\n const b = arr[i++]\n if (b < 128) {\n o16[oi++] = b\n } else if (b === 0x80 || b === 0xff) {\n o16[oi++] = err()\n } else {\n lead = b\n if (i < end) decodeLead(arr[i++])\n }\n }\n\n if (lead && !stream) {\n lead = 0\n o16[oi++] = err()\n }\n\n const res = decodeUCS2(o16, oi)\n o16 = null\n return res\n }\n\n return { decode, isAscii: () => lead === 0 }\n },\n // https://encoding.spec.whatwg.org/#euc-jp-decoder\n 'euc-jp': (err) => {\n const jis0208 = getTable('jis0208')\n const jis0212 = getTable('jis0212')\n let j12 = false\n let lead = 0\n let oi = 0\n let o16\n\n const decodeLead = (b) => {\n if (lead === 0x8e && b >= 0xa1 && b <= 0xdf) {\n lead = 0\n o16[oi++] = 0xfe_c0 + b\n } else if (lead === 0x8f && b >= 0xa1 && b <= 0xfe) {\n j12 = true\n lead = b\n } else {\n let cp\n if (lead >= 0xa1 && lead <= 0xfe && b >= 0xa1 && b <= 0xfe) {\n cp = (j12 ? jis0212 : jis0208)[(lead - 0xa1) * 94 + b - 0xa1]\n }\n\n lead = 0\n j12 = false\n if (cp) {\n o16[oi++] = cp\n } else {\n o16[oi++] = err()\n if (b < 128) o16[oi++] = b\n }\n }\n }\n\n const decode = (arr, start, end, stream) => {\n let i = start\n o16 = new Uint16Array(end - start + (lead ? 1 : 0))\n oi = 0\n\n // Fast path, non-j12\n // lead = 0 means j12 = 0\n if (!lead) {\n for (const last1 = end - 1; i < last1; ) {\n const l = arr[i]\n if (l < 128) {\n o16[oi++] = l\n i++\n } else {\n const b = arr[i + 1]\n if (l === 0x8e && b >= 0xa1 && b <= 0xdf) {\n o16[oi++] = 0xfe_c0 + b\n i += 2\n } else {\n if (l < 0xa1 || l === 0xff || b < 0xa1 || b === 0xff) break\n const cp = jis0208[(l - 0xa1) * 94 + b - 0xa1]\n if (!cp) break\n o16[oi++] = cp\n i += 2\n }\n }\n }\n }\n\n if (lead && i < end) decodeLead(arr[i++])\n if (lead && i < end) decodeLead(arr[i++]) // could be two leads, but no more\n while (i < end) {\n const b = arr[i++]\n if (b < 128) {\n o16[oi++] = b\n } else if ((b < 0xa1 && b !== 0x8e && b !== 0x8f) || b === 0xff) {\n o16[oi++] = err()\n } else {\n lead = b\n if (i < end) decodeLead(arr[i++])\n if (lead && i < end) decodeLead(arr[i++]) // could be two leads\n }\n }\n\n if (lead && !stream) {\n lead = 0\n j12 = false // can be true only when lead is non-zero\n o16[oi++] = err()\n }\n\n const res = decodeUCS2(o16, oi)\n o16 = null\n return res\n }\n\n return { decode, isAscii: () => lead === 0 } // j12 can be true only when lead is non-zero\n },\n // https://encoding.spec.whatwg.org/#iso-2022-jp-decoder\n 'iso-2022-jp': (err) => {\n const jis0208 = getTable('jis0208')\n let dState = 1\n let oState = 1\n let lead = 0 // 0 or 0x21-0x7e\n let out = false\n\n const bytes = (pushback, b) => {\n if (dState < 5 && b === 0x1b) {\n dState = 6 // escape start\n return\n }\n\n switch (dState) {\n case 1:\n case 2:\n // ASCII, Roman (common)\n out = false\n if (dState === 2) {\n if (b === 0x5c) return 0xa5\n if (b === 0x7e) return 0x20_3e\n }\n\n if (b <= 0x7f && b !== 0x0e && b !== 0x0f) return b\n return err()\n case 3:\n // Katakana\n out = false\n if (b >= 0x21 && b <= 0x5f) return 0xff_40 + b\n return err()\n case 4:\n // Leading byte\n out = false\n if (b < 0x21 || b > 0x7e) return err()\n lead = b\n dState = 5\n return\n case 5:\n // Trailing byte\n out = false\n if (b === 0x1b) {\n dState = 6 // escape start\n return err()\n }\n\n dState = 4\n if (b >= 0x21 && b <= 0x7e) {\n const cp = jis0208[(lead - 0x21) * 94 + b - 0x21]\n if (cp) return cp\n }\n\n return err()\n case 6:\n // Escape start\n if (b === 0x24 || b === 0x28) {\n lead = b\n dState = 7\n return\n }\n\n out = false\n dState = oState\n pushback.push(b)\n return err()\n case 7: {\n // Escape\n const l = lead\n lead = 0\n let s\n if (l === 0x28) {\n // eslint-disable-next-line unicorn/prefer-switch\n if (b === 0x42) {\n s = 1\n } else if (b === 0x4a) {\n s = 2\n } else if (b === 0x49) {\n s = 3\n }\n } else if (l === 0x24 && (b === 0x40 || b === 0x42)) {\n s = 4\n }\n\n if (s) {\n dState = oState = s\n const output = out\n out = true\n return output ? err() : undefined\n }\n\n out = false\n dState = oState\n pushback.push(b, l)\n return err()\n }\n }\n }\n\n const eof = (pushback) => {\n if (dState < 5) return null\n out = false\n switch (dState) {\n case 5:\n dState = 4\n return err()\n case 6:\n dState = oState\n return err()\n case 7: {\n dState = oState\n pushback.push(lead)\n lead = 0\n return err()\n }\n }\n }\n\n const decode = (arr, start, end, stream) => {\n const o16 = new Uint16Array(end - start + 2) // err in eof + lead from state\n let oi = 0\n let i = start\n const pushback = [] // local and auto-cleared\n\n // First, dump everything until EOF\n // Same as the full loop, but without EOF handling\n while (i < end || pushback.length > 0) {\n const c = bytes(pushback, pushback.length > 0 ? pushback.pop() : arr[i++])\n if (c !== undefined) o16[oi++] = c // 16-bit\n }\n\n // Then, dump EOF. This needs the same loop as the characters can be pushed back\n if (!stream) {\n while (i <= end || pushback.length > 0) {\n if (i < end || pushback.length > 0) {\n const c = bytes(pushback, pushback.length > 0 ? pushback.pop() : arr[i++])\n if (c !== undefined) o16[oi++] = c // 16-bit\n } else {\n const c = eof(pushback)\n if (c === null) break // clean exit\n o16[oi++] = c\n }\n }\n }\n\n // Chrome and WebKit fail on this, we don't: completely destroy the old decoder state when finished streaming\n // > If this’s do not flush is false, then set this’s decoder to a new instance of this’s encoding’s decoder,\n // > Set this’s do not flush to options[\"stream\"]\n if (!stream) {\n dState = oState = 1\n lead = 0\n out = false\n }\n\n return decodeUCS2(o16, oi)\n }\n\n return { decode, isAscii: () => false }\n },\n // https://encoding.spec.whatwg.org/#shift_jis-decoder\n shift_jis: (err) => {\n const jis0208 = getTable('jis0208')\n let lead = 0\n let oi = 0\n let o16\n\n const decodeLead = (b) => {\n const l = lead\n lead = 0\n if (b >= 0x40 && b <= 0xfc && b !== 0x7f) {\n const p = (l - (l < 0xa0 ? 0x81 : 0xc1)) * 188 + b - (b < 0x7f ? 0x40 : 0x41)\n if (p >= 8836 && p <= 10_715) {\n o16[oi++] = 0xe0_00 - 8836 + p\n return\n }\n\n const cp = jis0208[p]\n if (cp) {\n o16[oi++] = cp\n return\n }\n }\n\n o16[oi++] = err()\n if (b < 128) o16[oi++] = b\n }\n\n const decode = (arr, start, end, stream) => {\n o16 = new Uint16Array(end - start + (lead ? 1 : 0))\n oi = 0\n let i = start\n\n // Fast path\n if (!lead) {\n for (const last1 = end - 1; i < last1; ) {\n const l = arr[i]\n if (l <= 0x80) {\n o16[oi++] = l\n i++\n } else if (l >= 0xa1 && l <= 0xdf) {\n o16[oi++] = 0xfe_c0 + l\n i++\n } else {\n if (l === 0xa0 || l > 0xfc) break\n const b = arr[i + 1]\n if (b < 0x40 || b > 0xfc || b === 0x7f) break\n const p = (l - (l < 0xa0 ? 0x81 : 0xc1)) * 188 + b - (b < 0x7f ? 0x40 : 0x41)\n if (p >= 8836 && p <= 10_715) {\n o16[oi++] = 0xe0_00 - 8836 + p\n i += 2\n } else {\n const cp = jis0208[p]\n if (!cp) break\n o16[oi++] = cp\n i += 2\n }\n }\n }\n }\n\n if (lead && i < end) decodeLead(arr[i++])\n while (i < end) {\n const b = arr[i++]\n if (b <= 0x80) {\n o16[oi++] = b // 0x80 is allowed\n } else if (b >= 0xa1 && b <= 0xdf) {\n o16[oi++] = 0xfe_c0 + b\n } else if (b === 0xa0 || b > 0xfc) {\n o16[oi++] = err()\n } else {\n lead = b\n if (i < end) decodeLead(arr[i++])\n }\n }\n\n if (lead && !stream) {\n lead = 0\n o16[oi++] = err()\n }\n\n const res = decodeUCS2(o16, oi)\n o16 = null\n return res\n }\n\n return { decode, isAscii: () => lead === 0 }\n },\n // https://encoding.spec.whatwg.org/#gbk-decoder\n gbk: (err) => mappers.gb18030(err), // 10.1.1. GBK’s decoder is gb18030’s decoder\n // https://encoding.spec.whatwg.org/#gb18030-decoder\n gb18030: (err) => {\n const gb18030 = getTable('gb18030')\n const gb18030r = getTable('gb18030-ranges')\n let g1 = 0, g2 = 0, g3 = 0 // prettier-ignore\n const index = (p) => {\n if ((p > 39_419 && p < 189_000) || p > 1_237_575) return\n if (p === 7457) return 0xe7_c7\n let a = 0, b = 0 // prettier-ignore\n for (const [c, d] of gb18030r) {\n if (c > p) break\n a = c\n b = d\n }\n\n return b + p - a\n }\n\n // g1 is 0 or 0x81-0xfe\n // g2 is 0 or 0x30-0x39\n // g3 is 0 or 0x81-0xfe\n\n const decode = (arr, start, end, stream) => {\n const o16 = new Uint16Array(end - start + (g1 ? 3 : 0)) // even with pushback it's at most 1 char per byte\n let oi = 0\n let i = start\n const pushback = [] // local and auto-cleared\n\n // Fast path for 2-byte only\n // pushback is always empty ad start, and g1 = 0 means g2 = g3 = 0\n if (g1 === 0) {\n for (const last1 = end - 1; i < last1; ) {\n const b = arr[i]\n if (b < 128) {\n o16[oi++] = b\n i++\n } else if (b === 0x80) {\n o16[oi++] = 0x20_ac\n i++\n } else {\n if (b === 0xff) break\n const n = arr[i + 1]\n let cp\n if (n < 0x7f) {\n if (n < 0x40) break\n cp = gb18030[(b - 0x81) * 190 + n - 0x40]\n } else {\n if (n === 0xff || n === 0x7f) break\n cp = gb18030[(b - 0x81) * 190 + n - 0x41]\n }\n\n if (!cp) break\n o16[oi++] = cp // 16-bit\n i += 2\n }\n }\n }\n\n // First, dump everything until EOF\n // Same as the full loop, but without EOF handling\n while (i < end || pushback.length > 0) {\n const b = pushback.length > 0 ? pushback.pop() : arr[i++]\n if (g1) {\n // g2 can be set only when g1 is set, g3 can be set only when g2 is set\n // hence, 3 checks for g3 is faster than 3 checks for g1\n if (g2) {\n if (g3) {\n if (b <= 0x39 && b >= 0x30) {\n const p = index(\n (g1 - 0x81) * 12_600 + (g2 - 0x30) * 1260 + (g3 - 0x81) * 10 + b - 0x30\n )\n g1 = g2 = g3 = 0\n if (p === undefined) {\n o16[oi++] = err()\n } else if (p <= 0xff_ff) {\n o16[oi++] = p // Can validly return replacement\n } else {\n const d = p - 0x1_00_00\n o16[oi++] = 0xd8_00 | (d >> 10)\n o16[oi++] = 0xdc_00 | (d & 0x3_ff)\n }\n } else {\n pushback.push(b, g3, g2)\n g1 = g2 = g3 = 0\n o16[oi++] = err()\n }\n } else if (b >= 0x81 && b <= 0xfe) {\n g3 = b\n } else {\n pushback.push(b, g2)\n g1 = g2 = 0\n o16[oi++] = err()\n }\n } else if (b <= 0x39 && b >= 0x30) {\n g2 = b\n } else {\n let cp\n if (b >= 0x40 && b <= 0xfe && b !== 0x7f) {\n cp = gb18030[(g1 - 0x81) * 190 + b - (b < 0x7f ? 0x40 : 0x41)]\n }\n\n g1 = 0\n if (cp) {\n o16[oi++] = cp // 16-bit\n } else {\n o16[oi++] = err()\n if (b < 128) o16[oi++] = b // can be processed immediately\n }\n }\n } else if (b < 128) {\n o16[oi++] = b\n } else if (b === 0x80) {\n o16[oi++] = 0x20_ac\n } else if (b === 0xff) {\n o16[oi++] = err()\n } else {\n g1 = b\n }\n }\n\n // if g1 = 0 then g2 = g3 = 0\n if (g1 && !stream) {\n g1 = g2 = g3 = 0\n o16[oi++] = err()\n }\n\n return decodeUCS2(o16, oi)\n }\n\n return { decode, isAscii: () => g1 === 0 } // if g1 = 0 then g2 = g3 = 0\n },\n // https://encoding.spec.whatwg.org/#big5\n big5: (err) => {\n // The only decoder which returns multiple codepoints per byte, also has non-charcode codepoints\n // We store that as strings\n const big5 = getTable('big5')\n let lead = 0\n let oi = 0\n let o16\n\n const decodeLead = (b) => {\n if (b < 0x40 || (b > 0x7e && b < 0xa1) || b === 0xff) {\n lead = 0\n o16[oi++] = err()\n if (b < 128) o16[oi++] = b\n } else {\n const p = big5[(lead - 0x81) * 157 + b - (b < 0x7f ? 0x40 : 0x62)]\n lead = 0\n if (p > 0x1_00_00) {\n o16[oi++] = p >> 16\n o16[oi++] = p & 0xff_ff\n } else if (p) {\n o16[oi++] = p\n } else {\n o16[oi++] = err()\n if (b < 128) o16[oi++] = b\n }\n }\n }\n\n // eslint-disable-next-line sonarjs/no-identical-functions\n const decode = (arr, start, end, stream) => {\n let i = start\n o16 = new Uint16Array(end - start + (lead ? 1 : 0)) // there are pairs but they consume more than one byte\n oi = 0\n\n // Fast path\n if (!lead) {\n for (const last1 = end - 1; i < last1; ) {\n const l = arr[i]\n if (l < 128) {\n o16[oi++] = l\n i++\n } else {\n if (l === 0x80 || l === 0xff) break\n const b = arr[i + 1]\n if (b < 0x40 || (b > 0x7e && b < 0xa1) || b === 0xff) break\n const p = big5[(l - 0x81) * 157 + b - (b < 0x7f ? 0x40 : 0x62)]\n if (p > 0x1_00_00) {\n o16[oi++] = p >> 16\n o16[oi++] = p & 0xff_ff\n } else {\n if (!p) break\n o16[oi++] = p\n }\n\n i += 2\n }\n }\n }\n\n if (lead && i < end) decodeLead(arr[i++])\n while (i < end) {\n const b = arr[i++]\n if (b < 128) {\n o16[oi++] = b\n } else if (b === 0x80 || b === 0xff) {\n o16[oi++] = err()\n } else {\n lead = b\n if (i < end) decodeLead(arr[i++])\n }\n }\n\n if (lead && !stream) {\n lead = 0\n o16[oi++] = err()\n }\n\n const res = decodeUCS2(o16, oi)\n o16 = null\n return res\n }\n\n return { decode, isAscii: () => lead === 0 }\n },\n}\n\nexport const isAsciiSuperset = (enc) => enc !== 'iso-2022-jp' // all others are ASCII supersets and can use fast path\n\nexport function multibyteDecoder(enc, loose = false) {\n if (typeof loose !== 'boolean') throw new TypeError('loose option should be boolean')\n if (!Object.hasOwn(mappers, enc)) throw new RangeError('Unsupported encoding')\n\n // Input is assumed to be typechecked already\n let mapper\n const asciiSuperset = isAsciiSuperset(enc)\n let streaming // because onErr is cached in mapper\n const onErr = loose\n ? () => 0xff_fd\n : () => {\n // The correct way per spec seems to be not destoying the decoder state in stream mode, even when fatal\n // Decoders big5, euc-jp, euc-kr, shift_jis, gb18030 / gbk - all clear state before throwing unless EOF, so not affected\n // iso-2022-jp is the only tricky one one where this !stream check matters in non-stream mode\n if (!streaming) mapper = null // destroy state, effectively the same as 'do not flush' = false, but early\n throw new TypeError(E_STRICT)\n }\n\n return (arr, stream = false) => {\n let res = ''\n if (asciiSuperset && (!mapper || mapper.isAscii?.())) {\n const prefixLen = asciiPrefix(arr)\n if (prefixLen === arr.length) return decodeAscii(arr) // ascii\n res = decodeLatin1(arr, 0, prefixLen) // TODO: check if decodeAscii with subarray is faster for small prefixes too\n }\n\n streaming = stream // affects onErr\n if (!mapper) mapper = mappers[enc](onErr)\n return res + mapper.decode(arr, res.length, arr.length, stream)\n }\n}\n\n/* Encoders */\n\nconst maps = new Map()\nconst e7 = [[148, 236], [149, 237], [150, 243]] // prettier-ignore\nconst e8 = [[30, 89], [38, 97], [43, 102], [44, 103], [50, 109], [67, 126], [84, 144], [100, 160]] // prettier-ignore\nconst preencoders = {\n __proto__: null,\n big5: (p) => ((((p / 157) | 0) + 0x81) << 8) | ((p % 157 < 0x3f ? 0x40 : 0x62) + (p % 157)),\n shift_jis: (p) => {\n const l = (p / 188) | 0\n const t = p % 188\n return ((l + (l < 0x1f ? 0x81 : 0xc1)) << 8) | ((t < 0x3f ? 0x40 : 0x41) + t)\n },\n 'iso-2022-jp': (p) => ((((p / 94) | 0) + 0x21) << 8) | ((p % 94) + 0x21),\n 'euc-jp': (p) => ((((p / 94) | 0) + 0xa1) << 8) | ((p % 94) + 0xa1),\n 'euc-kr': (p) => ((((p / 190) | 0) + 0x81) << 8) | ((p % 190) + 0x41),\n gb18030: (p) => ((((p / 190) | 0) + 0x81) << 8) | ((p % 190 < 0x3f ? 0x40 : 0x41) + (p % 190)),\n}\n\npreencoders.gbk = preencoders.gb18030\n\n// We accept that encoders use non-trivial amount of mem, for perf\n// most are are 128 KiB mem, big5 is 380 KiB, lazy-loaded at first use\nfunction getMap(id, size, ascii) {\n const cached = maps.get(id)\n if (cached) return cached\n let tname = id\n const sjis = id === 'shift_jis'\n const iso2022jp = id === 'iso-2022-jp'\n if (iso2022jp) tname = 'jis0208'\n if (id === 'gbk') tname = 'gb18030'\n if (id === 'euc-jp' || sjis) tname = 'jis0208'\n const table = getTable(tname)\n const map = new Uint16Array(size)\n const enc = preencoders[id] || ((p) => p + 1)\n for (let i = 0; i < table.length; i++) {\n const c = table[i]\n if (!c) continue\n if (id === 'big5') {\n if (i < 5024) continue // this also skips multi-codepoint strings\n // In big5, all return first entries except for these\n if (\n map[c] &&\n c !== 0x25_50 &&\n c !== 0x25_5e &&\n c !== 0x25_61 &&\n c !== 0x25_6a &&\n c !== 0x53_41 &&\n c !== 0x53_45\n ) {\n continue\n }\n } else {\n if (sjis && i >= 8272 && i <= 8835) continue\n if (map[c]) continue\n }\n\n if (c > 0xff_ff) {\n // always a single codepoint here\n const s = String.fromCharCode(c >> 16, c & 0xff_ff)\n map[s.codePointAt(0)] = enc(i)\n } else {\n map[c] = enc(i)\n }\n }\n\n if (ascii) for (let i = 0; i < 0x80; i++) map[i] = i\n if (sjis || id === 'euc-jp') {\n if (sjis) map[0x80] = 0x80\n const d = sjis ? 0xfe_c0 : 0x70_c0\n for (let i = 0xff_61; i <= 0xff_9f; i++) map[i] = i - d\n map[0x22_12] = map[0xff_0d]\n map[0xa5] = 0x5c\n map[0x20_3e] = 0x7e\n } else if (tname === 'gb18030') {\n if (id === 'gbk') map[0x20_ac] = 0x80\n for (let i = 0xe7_8d; i <= 0xe7_93; i++) map[i] = i - 0x40_b4\n for (const [a, b] of e7) map[0xe7_00 | a] = 0xa6_00 | b\n for (const [a, b] of e8) map[0xe8_00 | a] = 0xfe_00 | b\n }\n\n maps.set(id, map)\n return map\n}\n\nconst NON_LATIN = /[^\\x00-\\xFF]/ // eslint-disable-line no-control-regex\nlet gb18030r, katakana\n\nexport function multibyteEncoder(enc, onError) {\n if (!Object.hasOwn(mappers, enc)) throw new RangeError('Unsupported encoding')\n const size = enc === 'big5' ? 0x2_f8_a7 : 0x1_00_00 // for big5, max codepoint in table + 1\n const iso2022jp = enc === 'iso-2022-jp'\n const gb18030 = enc === 'gb18030'\n const ascii = isAsciiSuperset(enc)\n const width = iso2022jp ? 5 : gb18030 ? 4 : 2\n const tailsize = iso2022jp ? 3 : 0\n const map = getMap(enc, size, ascii)\n if (gb18030 && !gb18030r) gb18030r = getTable('gb18030-ranges')\n if (iso2022jp && !katakana) katakana = getTable('iso-2022-jp-katakana')\n return (str) => {\n if (typeof str !== 'string') throw new TypeError(E_STRING)\n if (ascii && nativeEncoder && !NON_LATIN.test(str)) {\n const u8 = nativeEncoder.encode(str)\n if (u8.length === str.length) return u8\n }\n\n const length = str.length\n const u8 = new Uint8Array(length * width + tailsize)\n let i = 0\n\n if (ascii) {\n while (i < length) {\n const x = str.charCodeAt(i)\n if (x >= 128) break\n u8[i++] = x\n }\n }\n\n // eslint-disable-next-line unicorn/consistent-function-scoping\n const err = (code) => {\n if (onError) return onError(code, u8, i)\n throw new TypeError(E_STRICT)\n }\n\n if (!map || map.length < size) /* c8 ignore next */ throw new Error('Unreachable') // Important for perf\n\n if (iso2022jp) {\n let state = 0 // 0 = ASCII, 1 = Roman, 2 = jis0208\n const restore = () => {\n state = 0\n u8[i++] = 0x1b\n u8[i++] = 0x28\n u8[i++] = 0x42\n }\n\n for (let j = 0; j < length; j++) {\n let x = str.charCodeAt(j)\n if (x >= 0xd8_00 && x < 0xe0_00) {\n if (state === 2) restore()\n if (x >= 0xdc_00 || j + 1 === length) {\n i += err(x) // lone\n } else {\n const x1 = str.charCodeAt(j + 1)\n if (x1 < 0xdc_00 || x1 >= 0xe0_00) {\n i += err(x) // lone\n } else {\n j++ // consume x1\n i += err(0x1_00_00 + ((x1 & 0x3_ff) | ((x & 0x3_ff) << 10)))\n }\n }\n } else if (x < 0x80) {\n if (state === 2 || (state === 1 && (x === 0x5c || x === 0x7e))) restore()\n if (x === 0xe || x === 0xf || x === 0x1b) {\n i += err(0xff_fd) // 12.2.2. step 3: This returns U+FFFD rather than codePoint to prevent attacks\n } else {\n u8[i++] = x\n }\n } else if (x === 0xa5 || x === 0x20_3e) {\n if (state !== 1) {\n state = 1\n u8[i++] = 0x1b\n u8[i++] = 0x28\n u8[i++] = 0x4a\n }\n\n u8[i++] = x === 0xa5 ? 0x5c : 0x7e\n } else {\n if (x === 0x22_12) x = 0xff_0d\n if (x >= 0xff_61 && x <= 0xff_9f) x = katakana[x - 0xff_61]\n const e = map[x]\n if (e) {\n if (state !== 2) {\n state = 2\n u8[i++] = 0x1b\n u8[i++] = 0x24\n u8[i++] = 0x42\n }\n\n u8[i++] = e >> 8\n u8[i++] = e & 0xff\n } else {\n if (state === 2) restore()\n i += err(x)\n }\n }\n }\n\n if (state) restore()\n } else if (gb18030) {\n // Deduping this branch hurts other encoders perf\n const encode = (cp) => {\n let a = 0, b = 0 // prettier-ignore\n for (const [c, d] of gb18030r) {\n if (d > cp) break\n a = c\n b = d\n }\n\n let rp = cp === 0xe7_c7 ? 7457 : a + cp - b\n u8[i++] = 0x81 + ((rp / 12_600) | 0)\n rp %= 12_600\n u8[i++] = 0x30 + ((rp / 1260) | 0)\n rp %= 1260\n u8[i++] = 0x81 + ((rp / 10) | 0)\n u8[i++] = 0x30 + (rp % 10)\n }\n\n for (let j = i; j < length; j++) {\n const x = str.charCodeAt(j)\n if (x >= 0xd8_00 && x < 0xe0_00) {\n if (x >= 0xdc_00 || j + 1 === length) {\n i += err(x) // lone\n } else {\n const x1 = str.charCodeAt(j + 1)\n if (x1 < 0xdc_00 || x1 >= 0xe0_00) {\n i += err(x) // lone\n } else {\n j++ // consume x1\n encode(0x1_00_00 + ((x1 & 0x3_ff) | ((x & 0x3_ff) << 10)))\n }\n }\n } else {\n const e = map[x]\n if (e & 0xff_00) {\n u8[i++] = e >> 8\n u8[i++] = e & 0xff\n } else if (e || x === 0) {\n u8[i++] = e\n } else if (x === 0xe5_e5) {\n i += err(x)\n } else {\n encode(x)\n }\n }\n }\n } else {\n const long =\n enc === 'big5'\n ? (x) => {\n const e = map[x]\n if (e & 0xff_00) {\n u8[i++] = e >> 8\n u8[i++] = e & 0xff\n } else if (e || x === 0) {\n u8[i++] = e\n } else {\n i += err(x)\n }\n }\n : (x) => {\n i += err(x)\n }\n\n for (let j = i; j < length; j++) {\n const x = str.charCodeAt(j)\n if (x >= 0xd8_00 && x < 0xe0_00) {\n if (x >= 0xdc_00 || j + 1 === length) {\n i += err(x) // lone\n } else {\n const x1 = str.charCodeAt(j + 1)\n if (x1 < 0xdc_00 || x1 >= 0xe0_00) {\n i += err(x) // lone\n } else {\n j++ // consume x1\n long(0x1_00_00 + ((x1 & 0x3_ff) | ((x & 0x3_ff) << 10)))\n }\n }\n } else {\n const e = map[x]\n if (e & 0xff_00) {\n u8[i++] = e >> 8\n u8[i++] = e & 0xff\n } else if (e || x === 0) {\n u8[i++] = e\n } else {\n i += err(x)\n }\n }\n }\n }\n\n return i === u8.length ? u8 : u8.slice(0, i)\n }\n}\n","import { createMultibyteDecoder } from '@exodus/bytes/multi-byte.js'\nimport { multibyteEncoder } from './fallback/multi-byte.js'\nimport { setMultibyte } from './fallback/encoding.js'\n\nsetMultibyte(createMultibyteDecoder, multibyteEncoder)\n\nexport {\n TextDecoder,\n TextEncoder,\n TextDecoderStream,\n TextEncoderStream,\n normalizeEncoding,\n getBOMEncoding,\n labelToName,\n legacyHookDecode,\n isomorphicDecode,\n isomorphicEncode,\n} from './fallback/encoding.js'\n","import { assertU8 } from './fallback/_utils.js'\nimport { multibyteDecoder, multibyteEncoder } from './fallback/multi-byte.js'\n\nexport function createMultibyteDecoder(encoding, loose = false) {\n const jsDecoder = multibyteDecoder(encoding, loose) // asserts\n let streaming = false\n return (arr, stream = false) => {\n assertU8(arr)\n if (!streaming && arr.byteLength === 0) return ''\n streaming = stream\n return jsDecoder(arr, stream)\n }\n}\n\nexport function createMultibyteEncoder(encoding, { mode = 'fatal' } = {}) {\n // TODO: replacement, truncate (replacement will need varying length)\n if (mode !== 'fatal') throw new Error('Unsupported mode')\n return multibyteEncoder(encoding) // asserts\n}\n","export * from './platform.js'\n\nconst Buffer = /* @__PURE__ */ (() => globalThis.Buffer)()\n\nexport function assert(condition, msg) {\n if (!condition) throw new Error(msg)\n}\n\nexport function assertU8(arg) {\n if (arg && arg instanceof Uint8Array) return\n throw new TypeError('Expected an Uint8Array')\n}\n\n// On arrays in heap (<= 64) it's cheaper to copy into a pooled buffer than lazy-create the ArrayBuffer storage\nexport const toBuf = (x) =>\n x.byteLength <= 64 && x.BYTES_PER_ELEMENT === 1\n ? Buffer.from(x)\n : Buffer.from(x.buffer, x.byteOffset, x.byteLength)\n\nexport const E_STRING = 'Input is not a string'\nexport const E_STRICT_UNICODE = 'Input is not well-formed Unicode'\n\n// Input is never pooled\nexport function fromUint8(arr, format) {\n switch (format) {\n case 'uint8':\n if (arr.constructor !== Uint8Array) throw new Error('Unexpected')\n return arr\n case 'arraybuffer':\n if (arr.byteLength !== arr.buffer.byteLength) throw new Error('Unexpected')\n return arr.buffer\n case 'buffer':\n if (arr.length <= 64) return Buffer.from(arr)\n return Buffer.from(arr.buffer, arr.byteOffset, arr.byteLength)\n }\n\n throw new TypeError('Unexpected format')\n}\n\n// Input can be pooled\nexport function fromBuffer(arr, format) {\n switch (format) {\n case 'uint8':\n // byteOffset check is slightly faster and covers most pooling, so it comes first\n if (arr.length <= 64 || arr.byteOffset !== 0 || arr.byteLength !== arr.buffer.byteLength) {\n return new Uint8Array(arr)\n }\n\n return new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength)\n case 'arraybuffer':\n return arr.buffer.byteLength === arr.byteLength\n ? arr.buffer\n : arr.buffer.slice(arr.byteOffset, arr.byteOffset + arr.byteLength)\n case 'buffer':\n if (arr.constructor !== Buffer) throw new Error('Unexpected')\n return arr\n }\n\n throw new TypeError('Unexpected format')\n}\n","// TODO: make this more strict against Symbol.toStringTag\n// Is not very significant though, anything faking Symbol.toStringTag could as well override\n// prototypes, which is not something we protect against\n\nfunction isAnyArrayBuffer(x) {\n if (x instanceof ArrayBuffer) return true\n if (globalThis.SharedArrayBuffer && x instanceof SharedArrayBuffer) return true\n if (!x || typeof x.byteLength !== 'number') return false\n const s = Object.prototype.toString.call(x)\n return s === '[object ArrayBuffer]' || s === '[object SharedArrayBuffer]'\n}\n\nexport function fromSource(x) {\n if (x instanceof Uint8Array) return x\n if (ArrayBuffer.isView(x)) return new Uint8Array(x.buffer, x.byteOffset, x.byteLength)\n if (isAnyArrayBuffer(x)) {\n if ('detached' in x) return x.detached === true ? new Uint8Array() : new Uint8Array(x)\n // Old engines without .detached, try-catch\n try {\n return new Uint8Array(x)\n } catch {\n return new Uint8Array()\n }\n }\n\n throw new TypeError('Argument must be a SharedArrayBuffer, ArrayBuffer or ArrayBufferView')\n}\n\n// Warning: unlike whatwg-encoding, returns lowercased labels\n// Those are case-insensitive and that's how TextDecoder encoding getter normalizes them\nexport function getBOMEncoding(input) {\n const u8 = fromSource(input) // asserts\n if (u8.length >= 3 && u8[0] === 0xef && u8[1] === 0xbb && u8[2] === 0xbf) return 'utf-8'\n if (u8.length < 2) return null\n if (u8[0] === 0xff && u8[1] === 0xfe) return 'utf-16le'\n if (u8[0] === 0xfe && u8[1] === 0xff) return 'utf-16be'\n return null\n}\n","// See https://encoding.spec.whatwg.org/#names-and-labels\n\n/* eslint-disable @exodus/export-default/named */\n// prettier-ignore\nconst labels = {\n 'utf-8': ['unicode-1-1-utf-8', 'unicode11utf8', 'unicode20utf8', 'utf8', 'x-unicode20utf8'],\n 'utf-16be': ['unicodefffe'],\n 'utf-16le': ['csunicode', 'iso-10646-ucs-2', 'ucs-2', 'unicode', 'unicodefeff', 'utf-16'],\n 'iso-8859-2': ['iso-ir-101'],\n 'iso-8859-3': ['iso-ir-109'],\n 'iso-8859-4': ['iso-ir-110'],\n 'iso-8859-5': ['csisolatincyrillic', 'cyrillic', 'iso-ir-144'],\n 'iso-8859-6': ['arabic', 'asmo-708', 'csiso88596e', 'csiso88596i', 'csisolatinarabic', 'ecma-114', 'iso-8859-6-e', 'iso-8859-6-i', 'iso-ir-127'],\n 'iso-8859-7': ['csisolatingreek', 'ecma-118', 'elot_928', 'greek', 'greek8', 'iso-ir-126', 'sun_eu_greek'],\n 'iso-8859-8': ['csiso88598e', 'csisolatinhebrew', 'hebrew', 'iso-8859-8-e', 'iso-ir-138', 'visual'],\n 'iso-8859-8-i': ['csiso88598i', 'logical'],\n 'iso-8859-16': [],\n 'koi8-r': ['cskoi8r', 'koi', 'koi8', 'koi8_r'],\n 'koi8-u': ['koi8-ru'],\n 'windows-874': ['dos-874', 'iso-8859-11', 'iso8859-11', 'iso885911', 'tis-620'],\n ibm866: ['866', 'cp866', 'csibm866'],\n 'x-mac-cyrillic': ['x-mac-ukrainian'],\n macintosh: ['csmacintosh', 'mac', 'x-mac-roman'],\n gbk: ['chinese', 'csgb2312', 'csiso58gb231280', 'gb2312', 'gb_2312', 'gb_2312-80', 'iso-ir-58', 'x-gbk'],\n gb18030: [],\n big5: ['big5-hkscs', 'cn-big5', 'csbig5', 'x-x-big5'],\n 'euc-jp': ['cseucpkdfmtjapanese', 'x-euc-jp'],\n shift_jis: ['csshiftjis', 'ms932', 'ms_kanji', 'shift-jis', 'sjis', 'windows-31j', 'x-sjis'],\n 'euc-kr': ['cseuckr', 'csksc56011987', 'iso-ir-149', 'korean', 'ks_c_5601-1987', 'ks_c_5601-1989', 'ksc5601', 'ksc_5601', 'windows-949'],\n 'iso-2022-jp': ['csiso2022jp'],\n replacement: ['csiso2022kr', 'hz-gb-2312', 'iso-2022-cn', 'iso-2022-cn-ext', 'iso-2022-kr'],\n 'x-user-defined': [],\n}\n\nfor (const i of [10, 13, 14, 15]) labels[`iso-8859-${i}`] = [`iso8859-${i}`, `iso8859${i}`]\nfor (const i of [2, 6, 7]) labels[`iso-8859-${i}`].push(`iso_8859-${i}:1987`)\nfor (const i of [3, 4, 5, 8]) labels[`iso-8859-${i}`].push(`iso_8859-${i}:1988`)\n// prettier-ignore\nfor (let i = 2; i < 9; i++) labels[`iso-8859-${i}`].push(`iso8859-${i}`, `iso8859${i}`, `iso_8859-${i}`)\nfor (let i = 2; i < 5; i++) labels[`iso-8859-${i}`].push(`csisolatin${i}`, `l${i}`, `latin${i}`)\nfor (let i = 0; i < 9; i++) labels[`windows-125${i}`] = [`cp125${i}`, `x-cp125${i}`]\n\n// prettier-ignore\nlabels['windows-1252'].push('ansi_x3.4-1968', 'ascii', 'cp819', 'csisolatin1', 'ibm819', 'iso-8859-1', 'iso-ir-100', 'iso8859-1', 'iso88591', 'iso_8859-1', 'iso_8859-1:1987', 'l1', 'latin1', 'us-ascii')\n// prettier-ignore\nlabels['windows-1254'].push('csisolatin5', 'iso-8859-9', 'iso-ir-148', 'iso8859-9', 'iso88599', 'iso_8859-9', 'iso_8859-9:1989', 'l5', 'latin5')\nlabels['iso-8859-10'].push('csisolatin6', 'iso-ir-157', 'l6', 'latin6')\nlabels['iso-8859-15'].push('csisolatin9', 'iso_8859-15', 'l9')\n\nexport default labels\n","// Get a number of last bytes in an Uint8Array `u` ending at `len` that don't\n// form a codepoint yet, but can be a part of a single codepoint on more data\nexport function unfinishedBytes(u, len, enc) {\n switch (enc) {\n case 'utf-8': {\n // 0-3\n let p = 0\n while (p < 2 && p < len && (u[len - p - 1] & 0xc0) === 0x80) p++ // go back 0-2 trailing bytes\n if (p === len) return 0 // no space for lead\n const l = u[len - p - 1]\n if (l < 0xc2 || l > 0xf4) return 0 // not a lead\n if (p === 0) return 1 // nothing to recheck, we have only lead, return it. 2-byte must return here\n if (l < 0xe0 || (l < 0xf0 && p >= 2)) return 0 // 2-byte, or 3-byte or less and we already have 2 trailing\n const lower = l === 0xf0 ? 0x90 : l === 0xe0 ? 0xa0 : 0x80\n const upper = l === 0xf4 ? 0x8f : l === 0xed ? 0x9f : 0xbf\n const n = u[len - p]\n return n >= lower && n <= upper ? p + 1 : 0\n }\n\n case 'utf-16le':\n case 'utf-16be': {\n // 0-3\n const p = len % 2 // uneven byte length adds 1\n if (len < 2) return p\n const l = len - p - 1\n const last = enc === 'utf-16le' ? (u[l] << 8) ^ u[l - 1] : (u[l - 1] << 8) ^ u[l]\n return last >= 0xd8_00 && last < 0xdc_00 ? p + 2 : p // lone lead adds 2\n }\n }\n\n throw new Error('Unsupported encoding')\n}\n\n// Merge prefix `chunk` with `u` and return new combined prefix\n// For u.length < 3, fully consumes u and can return unfinished data,\n// otherwise returns a prefix with no unfinished bytes\nexport function mergePrefix(u, chunk, enc) {\n if (u.length === 0) return chunk\n const cl = chunk.length\n if (u.length < 3) {\n // No reason to bruteforce offsets, also it's possible this doesn't yet end the sequence\n const a = new Uint8Array(cl + u.length)\n a.set(chunk)\n a.set(u, cl)\n return a\n }\n\n // Slice off a small portion of u into prefix chunk so we can decode them separately without extending array size\n const t = new Uint8Array(cl + 3) // We have 1-3 bytes and need 1-3 more bytes\n t.set(chunk)\n t.set(u.subarray(0, 3), cl)\n\n // Stop at the first offset where unfinished bytes reaches 0 or fits into u\n // If that doesn't happen (u too short), just concat chunk and u completely (above)\n for (let i = 1; i <= 3; i++) {\n const unfinished = unfinishedBytes(t, cl + i, enc) // 0-3\n if (unfinished <= i) {\n // Always reachable at 3, but we still need 'unfinished' value for it\n const add = i - unfinished // 0-3\n return add > 0 ? t.subarray(0, cl + add) : chunk\n }\n }\n\n // Unreachable\n}\n","// We can't return native TextDecoder if it's present, as Node.js one is broken on windows-1252 and we fix that\n// We are also faster than Node.js built-in on both TextEncoder and TextDecoder\n\nimport { utf16toString, utf16toStringLoose } from '@exodus/bytes/utf16.js'\nimport { utf8fromStringLoose, utf8toString, utf8toStringLoose } from '@exodus/bytes/utf8.js'\nimport {\n createSinglebyteDecoder,\n latin1toString,\n latin1fromString,\n} from '@exodus/bytes/single-byte.js'\nimport labels from './encoding.labels.js'\nimport { fromSource, getBOMEncoding } from './encoding.api.js'\nimport { unfinishedBytes, mergePrefix } from './encoding.util.js'\n\nexport { getBOMEncoding } from './encoding.api.js'\n\nexport const E_ENCODING = 'Unknown encoding'\nconst E_MULTI = \"import '@exodus/bytes/encoding.js' for legacy multi-byte encodings support\"\nconst E_OPTIONS = 'The \"options\" argument must be of type object'\nconst replacementChar = '\\uFFFD'\nconst multibyteSet = new Set(['big5', 'euc-kr', 'euc-jp', 'iso-2022-jp', 'shift_jis', 'gbk', 'gb18030']) // prettier-ignore\nlet createMultibyteDecoder, multibyteEncoder\n\nlet labelsMap\n// Warning: unlike whatwg-encoding, returns lowercased labels\n// Those are case-insensitive and that's how TextDecoder encoding getter normalizes them\n// https://encoding.spec.whatwg.org/#names-and-labels\nexport function normalizeEncoding(label) {\n // fast path\n if (label === 'utf-8' || label === 'utf8' || label === 'UTF-8' || label === 'UTF8') return 'utf-8'\n if (label === 'windows-1252' || label === 'ascii' || label === 'latin1') return 'windows-1252'\n // full map\n if (/[^\\w\\t\\n\\f\\r .:-]/i.test(label)) return null // must be ASCII (with ASCII whitespace)\n const low = `${label}`.trim().toLowerCase()\n if (Object.hasOwn(labels, low)) return low\n if (!labelsMap) {\n labelsMap = new Map()\n for (const [name, aliases] of Object.entries(labels)) {\n for (const alias of aliases) labelsMap.set(alias, name)\n }\n }\n\n const mapped = labelsMap.get(low)\n if (mapped) return mapped\n return null\n}\n\nconst uppercasePrefixes = new Set(['utf', 'iso', 'koi', 'euc', 'ibm', 'gbk'])\n\n// Unlike normalizeEncoding, case-sensitive\n// https://encoding.spec.whatwg.org/#names-and-labels\nexport function labelToName(label) {\n const enc = normalizeEncoding(label)\n if (enc === 'utf-8') return 'UTF-8' // fast path\n if (!enc) return enc\n if (uppercasePrefixes.has(enc.slice(0, 3))) return enc.toUpperCase()\n if (enc === 'big5') return 'Big5'\n if (enc === 'shift_jis') return 'Shift_JIS'\n return enc\n}\n\nexport const isMultibyte = (enc) => multibyteSet.has(enc)\nexport function setMultibyte(createDecoder, createEncoder) {\n createMultibyteDecoder = createDecoder\n multibyteEncoder = createEncoder\n}\n\nexport function getMultibyteEncoder() {\n if (!multibyteEncoder) throw new Error(E_MULTI)\n return multibyteEncoder\n}\n\nconst define = (obj, key, value) => Object.defineProperty(obj, key, { value, writable: false })\n\nfunction isAnyUint8Array(x) {\n if (x instanceof Uint8Array) return true\n if (!x || !ArrayBuffer.isView(x) || x.BYTES_PER_ELEMENT !== 1) return false\n return Object.prototype.toString.call(x) === '[object Uint8Array]'\n}\n\nfunction unicodeDecoder(encoding, loose) {\n if (encoding === 'utf-8') return loose ? utf8toStringLoose : utf8toString // likely\n const form = encoding === 'utf-16le' ? 'uint8-le' : 'uint8-be'\n return loose ? (u) => utf16toStringLoose(u, form) : (u) => utf16toString(u, form)\n}\n\nexport class TextDecoder {\n #decode\n #unicode\n #multibyte\n #chunk\n #canBOM\n\n constructor(encoding = 'utf-8', options = {}) {\n if (typeof options !== 'object') throw new TypeError(E_OPTIONS)\n const enc = normalizeEncoding(encoding)\n if (!enc || enc === 'replacement') throw new RangeError(E_ENCODING)\n define(this, 'encoding', enc)\n define(this, 'fatal', !!options.fatal)\n define(this, 'ignoreBOM', !!options.ignoreBOM)\n this.#unicode = enc === 'utf-8' || enc === 'utf-16le' || enc === 'utf-16be'\n this.#multibyte = !this.#unicode && isMultibyte(enc)\n this.#canBOM = this.#unicode && !this.ignoreBOM\n }\n\n get [Symbol.toStringTag]() {\n return 'TextDecoder'\n }\n\n decode(input, options = {}) {\n if (typeof options !== 'object') throw new TypeError(E_OPTIONS)\n const stream = !!options.stream\n let u = input === undefined ? new Uint8Array() : fromSource(input)\n const empty = u.length === 0 // also can't be streaming after next line\n if (empty && stream) return '' // no state change\n\n if (this.#unicode) {\n let prefix\n if (this.#chunk) {\n const merged = mergePrefix(u, this.#chunk, this.encoding)\n if (u.length < 3) {\n u = merged // might be unfinished, but fully consumed old u\n } else {\n prefix = merged // stops at complete chunk\n const add = prefix.length - this.#chunk.length\n if (add > 0) u = u.subarray(add)\n }\n\n this.#chunk = null\n } else if (empty) {\n this.#canBOM = !this.ignoreBOM // not streaming\n return ''\n }\n\n // For non-stream utf-8 we don't have to do this as it matches utf8toStringLoose already\n // For non-stream loose utf-16 we still have to do this as this API supports uneven byteLength unlike utf16toStringLoose\n let suffix = ''\n if (stream || (!this.fatal && this.encoding !== 'utf-8')) {\n const trail = unfinishedBytes(u, u.byteLength, this.encoding)\n if (trail > 0) {\n if (stream) {\n this.#chunk = Uint8Array.from(u.subarray(-trail)) // copy\n } else {\n // non-fatal mode as already checked\n suffix = replacementChar\n }\n\n u = u.subarray(0, -trail)\n }\n }\n\n let seenBOM = false\n if (this.#canBOM) {\n const bom = this.#findBom(prefix ?? u)\n if (bom) {\n seenBOM = true\n if (prefix) {\n prefix = prefix.subarray(bom)\n } else {\n u = u.subarray(bom)\n }\n }\n } else if (!stream && !this.ignoreBOM) {\n this.#canBOM = true\n }\n\n if (!this.#decode) this.#decode = unicodeDecoder(this.encoding, !this.fatal)\n try {\n const res = (prefix ? this.#decode(prefix) : '') + this.#decode(u) + suffix\n // \"BOM seen\" is set on the current decode call only if it did not error, in \"serialize I/O queue\" after decoding\n if (stream && (seenBOM || res.length > 0)) this.#canBOM = false\n return res\n } catch (err) {\n this.#chunk = null // reset unfinished chunk on errors\n // The correct way per spec seems to be not destroying the decoder state (aka BOM here) in stream mode\n // See also multi-byte.js\n throw err\n }\n\n // eslint-disable-next-line no-else-return\n } else if (this.#multibyte) {\n if (!createMultibyteDecoder) throw new Error(E_MULTI)\n if (!this.#decode) this.#decode = createMultibyteDecoder(this.encoding, !this.fatal) // can contain state!\n return this.#decode(u, stream)\n } else {\n if (!this.#decode) this.#decode = createSinglebyteDecoder(this.encoding, !this.fatal)\n return this.#decode(u)\n }\n }\n\n #findBom(u) {\n switch (this.encoding) {\n case 'utf-8':\n return u.byteLength >= 3 && u[0] === 0xef && u[1] === 0xbb && u[2] === 0xbf ? 3 : 0\n case 'utf-16le':\n return u.byteLength >= 2 && u[0] === 0xff && u[1] === 0xfe ? 2 : 0\n case 'utf-16be':\n return u.byteLength >= 2 && u[0] === 0xfe && u[1] === 0xff ? 2 : 0\n }\n\n /* c8 ignore next */\n throw new Error('Unreachable')\n }\n}\n\nexport class TextEncoder {\n constructor() {\n define(this, 'encoding', 'utf-8')\n }\n\n get [Symbol.toStringTag]() {\n return 'TextEncoder'\n }\n\n encode(str = '') {\n if (typeof str !== 'string') str = `${str}`\n return utf8fromStringLoose(str) // non-pooled\n }\n\n encodeInto(str, target) {\n if (typeof str !== 'string') str = `${str}`\n if (!isAnyUint8Array(target)) throw new TypeError('Target must be an Uint8Array')\n if (target.buffer.detached) return { read: 0, written: 0 } // Until https://github.com/whatwg/encoding/issues/324 is resolved\n\n const tlen = target.length\n if (tlen < str.length) str = str.slice(0, tlen)\n let u8 = utf8fromStringLoose(str)\n let read\n if (tlen >= u8.length) {\n read = str.length\n } else if (u8.length === str.length) {\n if (u8.length > tlen) u8 = u8.subarray(0, tlen) // ascii can be truncated\n read = u8.length\n } else {\n u8 = u8.subarray(0, tlen)\n const unfinished = unfinishedBytes(u8, u8.length, 'utf-8')\n if (unfinished > 0) u8 = u8.subarray(0, u8.length - unfinished)\n\n // We can do this because loose str -> u8 -> str preserves length, unlike loose u8 -> str -> u8\n // Each unpaired surrogate (1 charcode) is replaced with a single charcode\n read = utf8toStringLoose(u8).length // FIXME: Converting back is very inefficient\n }\n\n try {\n target.set(u8)\n } catch {\n return { read: 0, written: 0 } // see above, likely detached but no .detached property support\n }\n\n return { read, written: u8.length }\n }\n}\n\nconst E_NO_STREAMS = 'TransformStream global not present in the environment'\n\n// https://encoding.spec.whatwg.org/#interface-textdecoderstream\nexport class TextDecoderStream {\n constructor(encoding = 'utf-8', options = {}) {\n if (!globalThis.TransformStream) throw new Error(E_NO_STREAMS)\n const decoder = new TextDecoder(encoding, options)\n const transform = new TransformStream({\n transform: (chunk, controller) => {\n const value = decoder.decode(fromSource(chunk), { stream: true })\n if (value) controller.enqueue(value)\n },\n flush: (controller) => {\n // https://streams.spec.whatwg.org/#dom-transformer-flush\n const value = decoder.decode()\n if (value) controller.enqueue(value)\n // No need to call .terminate() (Node.js is wrong)\n },\n })\n\n define(this, 'encoding', decoder.encoding)\n define(this, 'fatal', decoder.fatal)\n define(this, 'ignoreBOM', decoder.ignoreBOM)\n define(this, 'readable', transform.readable)\n define(this, 'writable', transform.writable)\n }\n\n get [Symbol.toStringTag]() {\n return 'TextDecoderStream'\n }\n}\n\n// https://encoding.spec.whatwg.org/#interface-textencoderstream\n// Only UTF-8 per spec\nexport class TextEncoderStream {\n constructor() {\n if (!globalThis.TransformStream) throw new Error(E_NO_STREAMS)\n let lead\n const transform = new TransformStream({\n // https://encoding.spec.whatwg.org/#encode-and-enqueue-a-chunk\n // Not identical in code, but reuses loose mode to have identical behavior\n transform: (chunk, controller) => {\n let s = String(chunk) // DOMString, might contain unpaired surrogates\n if (s.length === 0) return\n if (lead) {\n s = lead + s\n lead = null\n }\n\n const last = s.charCodeAt(s.length - 1) // Can't come from previous lead due to length check\n if ((last & 0xfc_00) === 0xd8_00) {\n lead = s[s.length - 1]\n s = s.slice(0, -1)\n }\n\n if (s) controller.enqueue(utf8fromStringLoose(s))\n },\n // https://encoding.spec.whatwg.org/#encode-and-flush\n flush: (controller) => {\n if (lead) controller.enqueue(Uint8Array.of(0xef, 0xbf, 0xbd))\n },\n })\n\n define(this, 'encoding', 'utf-8')\n define(this, 'readable', transform.readable)\n define(this, 'writable', transform.writable)\n }\n\n get [Symbol.toStringTag]() {\n return 'TextEncoderStream'\n }\n}\n\n// https://encoding.spec.whatwg.org/#decode\n// Warning: encoding sniffed from BOM takes preference over the supplied one\n// Warning: lossy, performs replacement, no option of throwing\n// Completely ignores encoding and even skips validation when BOM is found\n// Unlike TextDecoder public API, additionally supports 'replacement' encoding\nexport function legacyHookDecode(input, fallbackEncoding = 'utf-8') {\n let u8 = fromSource(input)\n const bomEncoding = getBOMEncoding(u8)\n if (bomEncoding) u8 = u8.subarray(bomEncoding === 'utf-8' ? 3 : 2)\n const enc = bomEncoding ?? normalizeEncoding(fallbackEncoding) // \"the byte order mark is more authoritative than anything else\"\n\n if (enc === 'utf-8') return utf8toStringLoose(u8)\n if (enc === 'utf-16le' || enc === 'utf-16be') {\n let suffix = ''\n if (u8.byteLength % 2 !== 0) {\n suffix = replacementChar\n u8 = u8.subarray(0, -unfinishedBytes(u8, u8.byteLength, enc))\n }\n\n return utf16toStringLoose(u8, enc === 'utf-16le' ? 'uint8-le' : 'uint8-be') + suffix\n }\n\n if (!Object.hasOwn(labels, enc)) throw new RangeError(E_ENCODING)\n\n if (isMultibyte(enc)) {\n if (!createMultibyteDecoder) throw new Error(E_MULTI)\n return createMultibyteDecoder(enc, true)(u8)\n }\n\n // https://encoding.spec.whatwg.org/#replacement-decoder\n // On non-streaming non-fatal case, it just replaces any non-empty input with a single replacement char\n if (enc === 'replacement') return input.byteLength > 0 ? replacementChar : ''\n\n return createSinglebyteDecoder(enc, true)(u8)\n}\n\nexport function isomorphicDecode(input) {\n return latin1toString(fromSource(input))\n}\n\nexport function isomorphicEncode(str) {\n return latin1fromString(str)\n}\n","import {\n nativeEncoder,\n nativeDecoder,\n nativeDecoderLatin1,\n nativeBuffer,\n encodeCharcodes,\n isHermes,\n isDeno,\n isLE,\n} from './platform.js'\n\nconst atob = /* @__PURE__ */ (() => globalThis.atob)()\nconst web64 = /* @__PURE__ */ (() => Uint8Array.prototype.toBase64)()\n\n// See http://stackoverflow.com/a/22747272/680742, which says that lowest limit is in Chrome, with 0xffff args\n// On Hermes, actual max is 0x20_000 minus current stack depth, 1/16 of that should be safe\nconst maxFunctionArgs = 0x20_00\n\n// toBase64+atob path is faster on everything where fromBase64 is fast\nconst useLatin1atob = web64 && atob\n\nexport function asciiPrefix(arr) {\n let p = 0 // verified ascii bytes\n const length = arr.length\n // Threshold tested on Hermes (worse on <=48, better on >=52)\n // Also on v8 arrs of size <=64 might be on heap and using Uint32Array on them is unoptimal\n if (length > 64) {\n // Speedup with u32\n const u32start = (4 - (arr.byteOffset & 3)) % 4 // offset start by this many bytes for alignment\n for (; p < u32start; p++) if (arr[p] >= 0x80) return p\n const u32length = ((arr.byteLength - u32start) / 4) | 0\n const u32 = new Uint32Array(arr.buffer, arr.byteOffset + u32start, u32length)\n let i = 0\n for (const last3 = u32length - 3; ; p += 16, i += 4) {\n if (i >= last3) break // loop is fast enough for moving this here to be _very_ useful, likely due to array access checks\n const a = u32[i]\n const b = u32[i + 1]\n const c = u32[i + 2]\n const d = u32[i + 3]\n // \"(a | b | c | d) & mask\" is slower on Hermes though faster on v8\n if (a & 0x80_80_80_80 || b & 0x80_80_80_80 || c & 0x80_80_80_80 || d & 0x80_80_80_80) break\n }\n\n for (; i < u32length; p += 4, i++) if (u32[i] & 0x80_80_80_80) break\n }\n\n for (; p < length; p++) if (arr[p] >= 0x80) return p\n return length\n}\n\n// Capable of decoding Uint16Array to UTF-16 as well as Uint8Array to Latin-1\nexport function decodeLatin1(arr, start = 0, stop = arr.length) {\n start |= 0\n stop |= 0\n const total = stop - start\n if (total === 0) return ''\n\n if (\n useLatin1atob &&\n total >= 256 &&\n total < 1e8 &&\n arr.toBase64 === web64 &&\n arr.BYTES_PER_ELEMENT === 1\n ) {\n const sliced = start === 0 && stop === arr.length ? arr : arr.subarray(start, stop)\n return atob(sliced.toBase64())\n }\n\n if (total > maxFunctionArgs) {\n let prefix = ''\n for (let i = start; i < stop; ) {\n const i1 = Math.min(stop, i + maxFunctionArgs)\n prefix += String.fromCharCode.apply(String, arr.subarray(i, i1))\n i = i1\n }\n\n return prefix\n }\n\n const sliced = start === 0 && stop === arr.length ? arr : arr.subarray(start, stop)\n return String.fromCharCode.apply(String, sliced)\n}\n\n// Unchecked for well-formedness, raw. Expects Uint16Array input\nexport const decodeUCS2 =\n nativeBuffer && isLE && !isDeno\n ? (u16, stop = u16.length) => {\n // TODO: fast path for BE, perhaps faster path for Deno. Note that decoder replaces, this function doesn't\n if (stop > 32) return nativeBuffer.from(u16.buffer, u16.byteOffset, stop * 2).ucs2Slice() // from 64 bytes, below are in heap\n return decodeLatin1(u16, 0, stop)\n }\n : (u16, stop = u16.length) => decodeLatin1(u16, 0, stop)\n\n// Does not check input, uses best available method\n// Building an array for this is only faster than proper string concatenation when TextDecoder or native Buffer are available\nexport const decodeAscii = nativeBuffer\n ? (a) =>\n // Buffer is faster on Node.js (but only for long enough data), if we know that output is ascii\n a.byteLength >= 0x3_00 && !isDeno\n ? nativeBuffer.from(a.buffer, a.byteOffset, a.byteLength).latin1Slice(0, a.byteLength) // .latin1Slice is faster than .asciiSlice\n : nativeDecoder.decode(a) // On Node.js, utf8 decoder is faster than latin1\n : nativeDecoderLatin1\n ? (a) => nativeDecoderLatin1.decode(a) // On browsers (specifically WebKit), latin1 decoder is faster than utf8\n : (a) =>\n decodeLatin1(\n a instanceof Uint8Array ? a : new Uint8Array(a.buffer, a.byteOffset, a.byteLength)\n )\n\n/* eslint-disable @exodus/mutable/no-param-reassign-prop-only */\n\nexport function encodeAsciiPrefix(x, s) {\n let i = 0\n for (const len3 = s.length - 3; i < len3; i += 4) {\n const x0 = s.charCodeAt(i), x1 = s.charCodeAt(i + 1), x2 = s.charCodeAt(i + 2), x3 = s.charCodeAt(i + 3) // prettier-ignore\n if ((x0 | x1 | x2 | x3) >= 128) break\n x[i] = x0\n x[i + 1] = x1\n x[i + 2] = x2\n x[i + 3] = x3\n }\n\n return i\n}\n\n/* eslint-enable @exodus/mutable/no-param-reassign-prop-only */\n\n// Warning: can be used only on checked strings, converts strings to 8-bit\nexport const encodeLatin1 = (str) => encodeCharcodes(str, new Uint8Array(str.length))\n\n// Expects nativeEncoder to be present\nconst useEncodeInto = /* @__PURE__ */ (() => isHermes && nativeEncoder?.encodeInto)()\nexport const encodeAscii = useEncodeInto\n ? (str, ERR) => {\n // Much faster in Hermes\n const codes = new Uint8Array(str.length + 4) // overshoot by a full utf8 char\n const info = nativeEncoder.encodeInto(str, codes)\n if (info.read !== str.length || info.written !== str.length) throw new SyntaxError(ERR) // non-ascii\n return codes.subarray(0, str.length)\n }\n : nativeBuffer\n ? (str, ERR) => {\n // TextEncoder is slow on Node.js 24 / 25 (was ok on 22)\n // Node.js Buffer.from always returns 8-byte aligned allocations, this is safe for e.g. conversion to Uint32Array\n const codes = nativeBuffer.from(str, 'utf8') // ascii/latin1 coerces, we need to check\n if (codes.length !== str.length) throw new SyntaxError(ERR) // non-ascii\n return new Uint8Array(codes.buffer, codes.byteOffset, codes.byteLength)\n }\n : (str, ERR) => {\n const codes = nativeEncoder.encode(str)\n if (codes.length !== str.length) throw new SyntaxError(ERR) // non-ascii\n return codes\n }\n","import { decodePartAddition as decodePart } from './platform.native.js'\n\nexport { isLE, encodeCharcodesPure as encodeCharcodes } from './platform.native.js'\n\nexport const nativeBuffer = null\nexport const isHermes = false\nexport const isDeno = false\nexport const nativeEncoder = /* @__PURE__ */ (() => new TextEncoder())()\nexport const nativeDecoder = /* @__PURE__ */ (() => new TextDecoder('utf-8', { ignoreBOM: true }))()\nexport const nativeDecoderLatin1 = /* @__PURE__ */ (() =>\n new TextDecoder('latin1', { ignoreBOM: true }))()\n\nexport function decode2string(arr, start, end, m) {\n if (end - start > 30_000) {\n // Limit concatenation to avoid excessive GC\n // Thresholds checked on Hermes for toHex\n const concat = []\n for (let i = start; i < end; ) {\n const step = i + 500\n const iNext = step > end ? end : step\n concat.push(decodePart(arr, i, iNext, m))\n i = iNext\n }\n\n const res = concat.join('')\n concat.length = 0\n return res\n }\n\n return decodePart(arr, start, end, m)\n}\n","const { Buffer } = globalThis\nconst haveNativeBuffer = Buffer && !Buffer.TYPED_ARRAY_SUPPORT\nexport const nativeBuffer = haveNativeBuffer ? Buffer : null\nexport const isHermes = /* @__PURE__ */ (() => !!globalThis.HermesInternal)()\nexport const isDeno = /* @__PURE__ */ (() => !!globalThis.Deno)()\nexport const isLE = /* @__PURE__ */ (() => new Uint8Array(Uint16Array.of(258).buffer)[0] === 2)()\n\n// We consider Node.js TextDecoder/TextEncoder native\n// Still needed in platform.native.js as this is re-exported to platform.js\nlet isNative = (x) => x && (haveNativeBuffer || `${x}`.includes('[native code]'))\nif (!haveNativeBuffer && isNative(() => {})) isNative = () => false // e.g. XS, we don't want false positives\n\nexport const nativeEncoder = /* @__PURE__ */ (() =>\n isNative(globalThis.TextEncoder) ? new TextEncoder() : null)()\nexport const nativeDecoder = /* @__PURE__ */ (() =>\n isNative(globalThis.TextDecoder) ? new TextDecoder('utf-8', { ignoreBOM: true }) : null)()\n\n// Actually windows-1252, compatible with ascii and latin1 decoding\n// Beware that on non-latin1, i.e. on windows-1252, this is broken in ~all Node.js versions released\n// in 2025 due to a regression, so we call it Latin1 as it's usable only for that\nexport const nativeDecoderLatin1 = /* @__PURE__ */ (() => {\n // Not all barebone engines with TextDecoder support something except utf-8, detect\n if (nativeDecoder) {\n try {\n return new TextDecoder('latin1', { ignoreBOM: true })\n } catch {}\n }\n\n return null\n})()\n\nexport function decodePartAddition(a, start, end, m) {\n let o = ''\n let i = start\n for (const last3 = end - 3; i < last3; i += 4) {\n const x0 = a[i]\n const x1 = a[i + 1]\n const x2 = a[i + 2]\n const x3 = a[i + 3]\n o += m[x0]\n o += m[x1]\n o += m[x2]\n o += m[x3]\n }\n\n while (i < end) o += m[a[i++]]\n return o\n}\n\n// Decoding with templates is faster on Hermes\nexport function decodePartTemplates(a, start, end, m) {\n let o = ''\n let i = start\n for (const last15 = end - 15; i < last15; i += 16) {\n const x0 = a[i]\n const x1 = a[i + 1]\n const x2 = a[i + 2]\n const x3 = a[i + 3]\n const x4 = a[i + 4]\n const x5 = a[i + 5]\n const x6 = a[i + 6]\n const x7 = a[i + 7]\n const x8 = a[i + 8]\n const x9 = a[i + 9]\n const x10 = a[i + 10]\n const x11 = a[i + 11]\n const x12 = a[i + 12]\n const x13 = a[i + 13]\n const x14 = a[i + 14]\n const x15 = a[i + 15]\n o += `${m[x0]}${m[x1]}${m[x2]}${m[x3]}${m[x4]}${m[x5]}${m[x6]}${m[x7]}${m[x8]}${m[x9]}${m[x10]}${m[x11]}${m[x12]}${m[x13]}${m[x14]}${m[x15]}`\n }\n\n while (i < end) o += m[a[i++]]\n return o\n}\n\nconst decodePart = isHermes ? decodePartTemplates : decodePartAddition\nexport function decode2string(arr, start, end, m) {\n if (end - start > 30_000) {\n // Limit concatenation to avoid excessive GC\n // Thresholds checked on Hermes for toHex\n const concat = []\n for (let i = start; i < end; ) {\n const step = i + 500\n const iNext = step > end ? end : step\n concat.push(decodePart(arr, i, iNext, m))\n i = iNext\n }\n\n const res = concat.join('')\n concat.length = 0\n return res\n }\n\n return decodePart(arr, start, end, m)\n}\n\n/* eslint-disable @exodus/mutable/no-param-reassign-prop-only */\n\nfunction encodeCharcodesHermes(str, arr) {\n const length = str.length\n if (length > 64) {\n const at = str.charCodeAt.bind(str) // faster on strings from ~64 chars on Hermes, but can be 10x slower on e.g. JSC\n for (let i = 0; i < length; i++) arr[i] = at(i)\n } else {\n for (let i = 0; i < length; i++) arr[i] = str.charCodeAt(i)\n }\n\n return arr\n}\n\nexport function encodeCharcodesPure(str, arr) {\n const length = str.length\n // Can be optimized with unrolling, but this is not used on non-Hermes atm\n for (let i = 0; i < length; i++) arr[i] = str.charCodeAt(i)\n return arr\n}\n\n/* eslint-enable @exodus/mutable/no-param-reassign-prop-only */\n\nexport const encodeCharcodes = isHermes ? encodeCharcodesHermes : encodeCharcodesPure\n","// See tests/encoding/fixtures/single-byte/dump.js for generator\n\nconst r = 0xff_fd\n\n/* eslint-disable unicorn/numeric-separators-style, @exodus/export-default/named */\n\n// Common ranges\n\n// prettier-ignore\nconst i2 = [189,148,0,0,63,0,116,64,0,68,0,78,0,78,0,0,63,64,114,117,0,0,123,0,0,128,149,0,149,0,0,132,0,117,0,0,32,0,85,33,0,37,0,47,0,47,0,0,32,33,83,86,0,0,92,0,0,97,118,0,118,0,0,101,474]\n// prettier-ignore\nconst iB = [[58,3424],[4,r],[29,3424],[4,r]]\nconst i9 = [[47], 78, [12], 83, 128, [17], 47, [12], 52, 97]\nconst w1 = [8236, 0, 8088, 0, 8090, 8097, 8090, 8090, 0, 8103]\nconst w2 = [8236, 0, 8088, 271, 8090, 8097, 8090, 8090, 574, 8103]\n// prettier-ignore\nconst w7 = [64,0,157,[4],39,68,109,62,67,0,0,82,75,68,0,175,75,86,105,92,108,144,114,115,0,120,[3],154,104,128,143,0,158,159,0,37,78,31,36,0,0,51,44,37,0,144,44,55,74,61,77,113,83,84,0,89,[3],123,73,97,112,0,127,128]\nconst w8 = [8071, 8071, 8073, 8073, 8077, 8061, 8061]\n// prettier-ignore\nconst k8b = [-22,910,879,879,899,880,880,894,876,893,[8,879],894,[4,878],864,859,884,882,861,877,881,876,873,875,846,815,815,835,816,816,830,812,829,[8,815],830,[4,814],800,795,820,818,797,813,817,812,809,811]\n// prettier-ignore\nconst k8a = [9344,9345,9354,9357,9360,9363,9366,9373,9380,9387,9394,9461,9464,9467,9470,[4,9473],8845,9484,8580,8580,8625,8652,8652,6,8838,20,21,25,88,[3,9392],942]\n\n// prettier-ignore\nconst maps = {\n ibm866: [[48,912],[3,9441],...[29,62,122,122,109,107,120,101,106,111,109,107,31,34,65,56,39,10,69,102,102,96,89,109,105,98,81,108,102,102,97,97,84,82,75,75,98,96,13,0,123,118,125,128,111].map(x=>x+9266),[16,864],785,864,786,865,787,866,792,871,-72,8480,-67,8479,8218,-89,9378,-95],\n 'koi8-u': [...k8a,944,9391,944,944,[5,9391],996,944,[4,9391],846,848,9390,848,848,[5,9390],979,848,...k8b],\n 'koi8-r': [...k8a,[15,9391],846,[11,9390],...k8b],\n macintosh: [68,68,69,70,77,81,86,90,88,89,90,88,89,90,91,89,90,90,91,89,90,90,91,92,90,91,92,90,94,92,93,93,8064,15,0,0,3,8061,16,56,6,0,8312,9,-4,8627,24,41,8558,0,8626,8626,-15,0,8524,8538,8535,775,8561,-17,-2,748,40,57,-1,-32,-22,8535,206,8579,8512,-28,-13,8029,-42,-11,-9,8,132,132,8003,8003,8010,8010,8004,8004,33,9459,39,159,8042,8145,8029,8029,64035,64035,8001,-42,7992,7995,8012,-35,-28,-38,-29,-33,[3,-29],-33,-27,-27,63503,-31,-24,-24,-27,60,464,485,-73,[3,479],-68,480,477,456],\n 'x-mac-cyrillic': [[32,912],8064,15,1006,0,3,8061,16,863,6,0,8312,855,934,8627,853,932,8558,0,8626,8626,930,0,987,849,844,923,845,924,845,924,844,923,920,836,-22,8535,206,8579,8512,-28,-13,8029,-42,832,911,831,910,902,8003,8003,8010,8010,8004,8004,33,8007,822,901,821,900,8250,804,883,880,[31,848],8109],\n 'windows-874': [8236,[4],8097,[11],...w8,[9],...iB],\n}\n\n// windows-1250 - windows-1258\n// prettier-ignore\n;[\n [...w1,214,8110,206,215,239,234,0,...w8,0,8329,199,8095,191,200,224,219,0,550,566,158,0,95,[4],180,[4],204,0,0,553,143,[5],76,165,0,129,544,128,...i2],\n [898,898,8088,976,8090,8097,8090,8090,8228,8103,895,8110,894,895,893,896,962,...w8,0,8329,959,8095,958,959,957,960,0,877,956,869,0,1003,0,0,857,0,858,[4],856,0,0,852,931,989,[3],921,8285,922,0,924,840,919,920,[64,848]],\n [...w2,214,8110,198,0,239,0,0,...w8,580,8329,199,8095,183,0,224,217],\n [8236,0,8088,271,8090,8097,8090,8090,0,8103,0,8110,[5],...w8,0,8329,0,8095,[5],740,740,[7],r,[4],8038,[4],720,[3],[3,720],0,720,0,[20,720],r,[44,720],r],\n [...w2,214,8110,198,[4],...w8,580,8329,199,8095,183,0,0,217,0,...i9],\n [...w2,0,8110,[5],...w8,580,8329,0,8095,[8],8198,[5],45,[15],61,[5],[20,1264],[5,1308],[7,r],[27,1264],r,r,7953,7953,r],\n [8236,1533,8088,271,8090,8097,8090,8090,574,8103,1519,8110,198,1529,1546,1529,1567,...w8,1553,8329,1527,8095,183,8047,8047,1563,0,1387,[8],1556,[15],1377,[4],1376,1537,[22,1376],0,[4,1375],[4,1380],0,1379,0,[4,1378],[5],1373,1373,0,0,[4,1371],0,1370,1370,0,1369,0,1368,0,0,7953,7953,1491],\n [...w1,0,8110,0,27,569,41,0,...w8,0,8329,0,8095,0,18,573,0,0,r,[3],r,0,0,48,0,172,[4],23,[8],...w7,474],\n [...w2,0,8110,198,[4],...w8,580,8329,0,8095,183,0,0,217,[35],63,[8],564,[3],64,0,567,0,0,203,[7],210,549,[4],32,[8],533,[3],33,0,561,0,0,172,[7],179,8109],\n].forEach((m, i) => {\n maps[`windows-${i + 1250}`] = m\n});\n\n// iso-8859-1 - iso-8859-16\n// prettier-ignore\n;[\n [], // Actual Latin1 / Unicode subset, non-WHATWG, which maps iso-8859-1 to windows-1252\n [99,566,158,0,152,180,0,0,183,180,185,205,0,207,204,0,84,553,143,0,137,165,528,0,168,165,170,190,544,192,...i2],\n [133,566,0,0,r,126,0,0,135,180,115,136,0,r,204,0,118,[4],111,0,0,120,165,100,121,0,r,189,[3],r,0,69,66,[9],r,[4],75,0,0,68,[4],143,126,[4],r,0,38,35,[9],r,[4],44,0,0,37,[4],112,95,474],\n [99,150,179,0,131,149,0,0,183,104,119,186,0,207,0,0,84,553,164,0,116,134,528,0,168,89,104,171,141,192,140,64,[6],103,68,0,78,0,74,0,0,91,64,116,122,99,[5],153,[3],139,140,0,33,[6],72,37,0,47,0,43,0,0,60,33,85,91,68,[5],122,[3],108,109,474],\n [[12,864],0,[66,864],8230,[12,864],-86,864,864],\n [[3,r],0,[7,r],1376,0,[13,r],1376,[3,r],1376,r,[26,1376],[5,r],[19,1376],[13,r]],\n [8055,8055,0,8200,8202,[4],720,[3],r,8038,[4],[3,720],0,[3,720],0,720,0,[20,720],r,[44,720],r],\n [r,[8],45,[15],61,[4],[32,r],7992,[27,1264],r,r,7953,7953,r],\n i9, // non-WHATWG, which maps iso-8859-9 to windows-1254\n [99,112,127,134,131,144,0,147,103,182,187,209,0,188,155,0,84,97,112,119,116,129,0,132,88,167,172,194,8024,173,140,64,[6],103,68,0,78,0,74,[4],116,122,[4],145,0,153,[6],33,[6],72,37,0,47,0,43,[4],85,91,[4],114,0,122,[5],57],\n iB, // non-WHATWG, which maps iso-8859-11 to windows-874\n null, // no 12\n [8060,[3],8057,0,0,48,0,172,[4],23,[4],8040,[3],...w7,7962],\n [7521,7521,0,102,102,7524,0,7640,0,7640,7520,7750,0,0,201,7534,7534,110,110,7564,7564,0,7583,7625,7582,7625,7589,7735,7623,7623,7586,[16],164,[6],7571,[6],152,[17],133,[6],7540,[6],121],\n [[3],8200,0,186,0,185,[11],201,[3],198,[3],150,150,186],\n [99,99,158,8200,8057,186,0,185,0,366,0,205,0,204,204,0,0,90,143,201,8040,0,0,198,84,351,0,150,150,186,189,[3],63,0,65,[10],64,114,[3],123,0,131,152,[4],59,316,[4],32,0,34,[10],33,83,[3],92,0,100,121,[4],28,285],\n].forEach((m, i) => {\n if (m) maps[`iso-8859-${i + 1}`] = [[33], ...m]\n});\n\nexport default maps\n","import { asciiPrefix, decodeAscii, decodeLatin1 } from './latin1.js'\nimport encodings from './single-byte.encodings.js'\nimport { decode2string, nativeDecoder } from './platform.js'\n\nexport const E_STRICT = 'Input is not well-formed for this encoding'\nconst xUserDefined = 'x-user-defined'\nconst iso8i = 'iso-8859-8-i'\n\nexport const assertEncoding = (encoding) => {\n if (Object.hasOwn(encodings, encoding) || encoding === xUserDefined || encoding === iso8i) return\n throw new RangeError('Unsupported encoding')\n}\n\nconst r = 0xff_fd\n\nexport function getEncoding(encoding) {\n assertEncoding(encoding)\n if (encoding === xUserDefined) return Array.from({ length: 128 }, (_, i) => 0xf7_80 + i)\n if (encoding === iso8i) encoding = 'iso-8859-8'\n const enc = encodings[encoding]\n const deltas = enc.flatMap((x) => (Array.isArray(x) ? new Array(x[0]).fill(x[1] ?? 0) : x))\n return deltas.map((x, i) => (x === r ? x : x + 128 + i))\n}\n\nconst mappers = new Map()\nconst decoders = new Map()\nconst encmaps = new Map()\n\n// Used only on Node.js, no reason to optimize for anything else\n// E.g. avoiding .from and filling zero-initialized arr manually is faster on Hermes, but we avoid this codepath on Hermes completely\nexport function encodingMapper(encoding) {\n const cached = mappers.get(encoding)\n if (cached) return cached\n\n const codes = getEncoding(encoding)\n const incomplete = codes.includes(r)\n let map\n const mapper = (arr, start = 0) => {\n if (!map) {\n map = new Uint16Array(256).map((_, i) => i) // Unicode subset\n map.set(Uint16Array.from(codes), 128)\n }\n\n const o = Uint16Array.from(start === 0 ? arr : arr.subarray(start)) // copy to modify in-place, also those are 16-bit now\n let i = 0\n for (const end7 = o.length - 7; i < end7; i += 8) {\n o[i] = map[o[i]]\n o[i + 1] = map[o[i + 1]]\n o[i + 2] = map[o[i + 2]]\n o[i + 3] = map[o[i + 3]]\n o[i + 4] = map[o[i + 4]]\n o[i + 5] = map[o[i + 5]]\n o[i + 6] = map[o[i + 6]]\n o[i + 7] = map[o[i + 7]]\n }\n\n for (const end = o.length; i < end; i++) o[i] = map[o[i]]\n return o\n }\n\n mappers.set(encoding, { mapper, incomplete })\n return { mapper, incomplete }\n}\n\nexport function encodingDecoder(encoding) {\n const cached = decoders.get(encoding)\n if (cached) return cached\n const isLatin1 = encoding === 'iso-8859-1'\n if (isLatin1 && !nativeDecoder) return (arr, loose = false) => decodeLatin1(arr) // native decoder is faster for ascii below\n\n let strings\n const codes = getEncoding(encoding)\n const incomplete = codes.includes(r)\n const decoder = (arr, loose = false) => {\n if (!strings) {\n const allCodes = Array.from({ length: 128 }, (_, i) => i).concat(codes)\n while (allCodes.length < 256) allCodes.push(allCodes.length)\n strings = allCodes.map((c) => String.fromCharCode(c))\n }\n\n const prefixLen = asciiPrefix(arr)\n if (prefixLen === arr.length) return decodeAscii(arr)\n if (isLatin1) return decodeLatin1(arr) // TODO: check if decodeAscii with subarray is faster for small prefixes too\n const prefix = decodeLatin1(arr, 0, prefixLen) // TODO: check if decodeAscii with subarray is faster for small prefixes too\n const suffix = decode2string(arr, prefix.length, arr.length, strings)\n if (!loose && incomplete && suffix.includes('\\uFFFD')) throw new TypeError(E_STRICT)\n return prefix + suffix\n }\n\n decoders.set(encoding, decoder)\n return decoder\n}\n\nexport function encodeMap(encoding) {\n const cached = encmaps.get(encoding)\n if (cached) return cached\n\n const codes = getEncoding(encoding)\n let max = 128\n while (codes.length < 128) codes.push(128 + codes.length)\n for (const code of codes) if (code > max && code !== r) max = code\n const map = new Uint8Array(max + 1) // < 10 KiB for all except macintosh, 63 KiB for macintosh\n for (let i = 0; i < 128; i++) {\n map[i] = i\n if (codes[i] !== r) map[codes[i]] = 128 + i\n }\n\n encmaps.set(encoding, map)\n return map\n}\n","import { assertU8, E_STRING } from './fallback/_utils.js'\nimport { nativeDecoderLatin1, nativeEncoder } from './fallback/platform.js'\nimport { encodeAsciiPrefix, encodeLatin1 } from './fallback/latin1.js'\nimport { assertEncoding, encodingDecoder, encodeMap, E_STRICT } from './fallback/single-byte.js'\n\nconst { TextDecoder, btoa } = globalThis\n\nlet windows1252works\n\n// prettier-ignore\nconst skipNative = new Set([\n 'iso-8859-1', 'iso-8859-9', 'iso-8859-11', // non-WHATWG\n 'iso-8859-6', 'iso-8859-8', 'iso-8859-8-i', // slow in all 3 engines\n 'iso-8859-16', // iso-8859-16 is somehow broken in WebKit, at least on CI\n])\n\nfunction shouldUseNative(enc) {\n // https://issues.chromium.org/issues/468458388\n // Also might be incorrectly imlemented on platforms as Latin1 (e.g. in Node.js) or regress\n // This is the most significant single-byte encoding, 'ascii' and 'latin1' alias to this\n // Even after Chrome bug is fixed, this should serve as a quick correctness check that it's actually windows-1252\n if (enc === 'windows-1252') {\n if (windows1252works === undefined) {\n windows1252works = false\n try {\n const u = new Uint8Array(9) // using 9 bytes is significant to catch the bug\n u[8] = 128\n windows1252works = new TextDecoder(enc).decode(u).codePointAt(8) === 0x20_ac\n } catch {}\n }\n\n return windows1252works\n }\n\n return !skipNative.has(enc)\n}\n\nexport function createSinglebyteDecoder(encoding, loose = false) {\n if (typeof loose !== 'boolean') throw new TypeError('loose option should be boolean')\n assertEncoding(encoding)\n\n if (nativeDecoderLatin1 && shouldUseNative(encoding)) {\n // In try, as not all encodings might be implemented in all engines which have native TextDecoder\n try {\n const decoder = new TextDecoder(encoding, { fatal: !loose })\n return (arr) => {\n assertU8(arr)\n if (arr.byteLength === 0) return ''\n return decoder.decode(arr)\n }\n } catch {}\n }\n\n const jsDecoder = encodingDecoder(encoding)\n return (arr) => {\n assertU8(arr)\n if (arr.byteLength === 0) return ''\n return jsDecoder(arr, loose)\n }\n}\n\nconst NON_LATIN = /[^\\x00-\\xFF]/ // eslint-disable-line no-control-regex\n\nfunction encode(s, m) {\n const len = s.length\n const x = new Uint8Array(len)\n let i = nativeEncoder ? 0 : encodeAsciiPrefix(x, s)\n\n for (const len3 = len - 3; i < len3; i += 4) {\n const x0 = s.charCodeAt(i), x1 = s.charCodeAt(i + 1), x2 = s.charCodeAt(i + 2), x3 = s.charCodeAt(i + 3) // prettier-ignore\n const c0 = m[x0], c1 = m[x1], c2 = m[x2], c3 = m[x3] // prettier-ignore\n if ((!c0 && x0) || (!c1 && x1) || (!c2 && x2) || (!c3 && x3)) return null\n\n x[i] = c0\n x[i + 1] = c1\n x[i + 2] = c2\n x[i + 3] = c3\n }\n\n for (; i < len; i++) {\n const x0 = s.charCodeAt(i)\n const c0 = m[x0]\n if (!c0 && x0) return null\n x[i] = c0\n }\n\n return x\n}\n\n// fromBase64+btoa path is faster on everything where fromBase64 is fast\nconst useLatin1btoa = Uint8Array.fromBase64 && btoa\n\nexport function latin1fromString(s) {\n if (typeof s !== 'string') throw new TypeError(E_STRING)\n // max limit is to not produce base64 strings that are too long\n if (useLatin1btoa && s.length >= 1024 && s.length < 1e8) {\n try {\n return Uint8Array.fromBase64(btoa(s)) // fails on non-latin1\n } catch {\n throw new TypeError(E_STRICT)\n }\n }\n\n if (NON_LATIN.test(s)) throw new TypeError(E_STRICT)\n return encodeLatin1(s)\n}\n\nexport function createSinglebyteEncoder(encoding, { mode = 'fatal' } = {}) {\n // TODO: replacement, truncate (replacement will need varying length)\n if (mode !== 'fatal') throw new Error('Unsupported mode')\n if (encoding === 'iso-8859-1') return latin1fromString\n const m = encodeMap(encoding) // asserts\n\n // No single-byte encoder produces surrogate pairs, so any surrogate is invalid\n // This needs special treatment only to decide how many replacement chars to output, one or two\n // Not much use in running isWellFormed, most likely cause of error is unmapped chars, not surrogate pairs\n return (s) => {\n if (typeof s !== 'string') throw new TypeError(E_STRING)\n\n // Instead of an ASCII regex check, encode optimistically - this is faster\n // Check for 8-bit string with a regex though, this is instant on 8-bit strings so doesn't hurt the ASCII fast path\n if (nativeEncoder && !NON_LATIN.test(s)) {\n const u8 = nativeEncoder.encode(s)\n if (u8.length === s.length) return u8\n }\n\n const res = encode(s, m)\n if (!res) throw new TypeError(E_STRICT)\n return res\n }\n}\n\nexport const latin1toString = /* @__PURE__ */ createSinglebyteDecoder('iso-8859-1')\nexport const windows1252toString = /* @__PURE__ */ createSinglebyteDecoder('windows-1252')\nexport const windows1252fromString = /* @__PURE__ */ createSinglebyteEncoder('windows-1252')\n","import { decodeUCS2 } from './latin1.js'\nimport { assertU8, E_STRING, E_STRICT_UNICODE } from './_utils.js'\nimport { nativeDecoder, isLE, encodeCharcodes } from './platform.js'\n\nexport const E_STRICT = 'Input is not well-formed utf16'\nconst isWellFormedStr = /* @__PURE__ */ (() => String.prototype.isWellFormed)()\nconst toWellFormedStr = /* @__PURE__ */ (() => String.prototype.toWellFormed)()\n\nconst replacementCodepoint = 0xff_fd\nconst replacementCodepointSwapped = 0xfd_ff\n\nconst to16 = (a) => new Uint16Array(a.buffer, a.byteOffset, a.byteLength / 2) // Requires checked length and alignment!\n\nexport function encodeApi(str, loose, format) {\n if (typeof str !== 'string') throw new TypeError(E_STRING)\n if (format !== 'uint16' && format !== 'uint8-le' && format !== 'uint8-be') {\n throw new TypeError('Unknown format')\n }\n\n // On v8 and SpiderMonkey, check via isWellFormed is faster than js\n // On JSC, check during loop is faster than isWellFormed\n // If isWellFormed is available, we skip check during decoding and recheck after\n // If isWellFormed is unavailable, we check in js during decoding\n if (!loose && isWellFormedStr && !isWellFormedStr.call(str)) throw new TypeError(E_STRICT_UNICODE)\n const shouldSwap = (isLE && format === 'uint8-be') || (!isLE && format === 'uint8-le')\n const u16 = encode(str, loose, !loose && isWellFormedStr, shouldSwap)\n\n // Bytes are already swapped and format is already checked, we need to just cast the view\n return format === 'uint16' ? u16 : new Uint8Array(u16.buffer, u16.byteOffset, u16.byteLength)\n}\n\nconst fatalLE = nativeDecoder ? new TextDecoder('utf-16le', { ignoreBOM: true, fatal: true }) : null\nconst looseLE = nativeDecoder ? new TextDecoder('utf-16le', { ignoreBOM: true }) : null\nconst fatalBE = nativeDecoder ? new TextDecoder('utf-16be', { ignoreBOM: true, fatal: true }) : null\nconst looseBE = nativeDecoder ? new TextDecoder('utf-16be', { ignoreBOM: true }) : null\n\nexport function decodeApiDecoders(input, loose, format) {\n if (format === 'uint16') {\n if (!(input instanceof Uint16Array)) throw new TypeError('Expected an Uint16Array')\n } else if (format === 'uint8-le' || format === 'uint8-be') {\n assertU8(input)\n if (input.byteLength % 2 !== 0) throw new TypeError('Expected even number of bytes')\n } else {\n throw new TypeError('Unknown format')\n }\n\n const le = format === 'uint8-le' || (format === 'uint16' && isLE)\n return (le ? (loose ? looseLE : fatalLE) : loose ? looseBE : fatalBE).decode(input)\n}\n\nexport function decodeApiJS(input, loose, format) {\n let u16\n switch (format) {\n case 'uint16':\n if (!(input instanceof Uint16Array)) throw new TypeError('Expected an Uint16Array')\n u16 = input\n break\n case 'uint8-le':\n assertU8(input)\n if (input.byteLength % 2 !== 0) throw new TypeError('Expected even number of bytes')\n u16 = to16input(input, true)\n break\n case 'uint8-be':\n assertU8(input)\n if (input.byteLength % 2 !== 0) throw new TypeError('Expected even number of bytes')\n u16 = to16input(input, false)\n break\n default:\n throw new TypeError('Unknown format')\n }\n\n const str = decode(u16, loose, (!loose && isWellFormedStr) || (loose && toWellFormedStr))\n if (!loose && isWellFormedStr && !isWellFormedStr.call(str)) throw new TypeError(E_STRICT)\n if (loose && toWellFormedStr) return toWellFormedStr.call(str)\n\n return str\n}\n\nexport function to16input(u8, le) {\n // Assume even number of bytes\n if (le === isLE) return to16(u8.byteOffset % 2 === 0 ? u8 : Uint8Array.from(u8))\n return to16(swap16(Uint8Array.from(u8)))\n}\n\nexport const decode = (u16, loose = false, checked = false) => {\n if (checked || isWellFormed(u16)) return decodeUCS2(u16)\n if (!loose) throw new TypeError(E_STRICT)\n return decodeUCS2(toWellFormed(Uint16Array.from(u16))) // cloned for replacement\n}\n\nexport function encode(str, loose = false, checked = false, swapped = false) {\n const arr = new Uint16Array(str.length)\n if (checked) return swapped ? encodeCheckedSwapped(str, arr) : encodeChecked(str, arr)\n return swapped ? encodeUncheckedSwapped(str, arr, loose) : encodeUnchecked(str, arr, loose)\n}\n\n/* eslint-disable @exodus/mutable/no-param-reassign-prop-only */\n\n// Assumes checked length % 2 === 0, otherwise does not swap tail\nfunction swap16(u8) {\n let i = 0\n for (const last3 = u8.length - 3; i < last3; i += 4) {\n const x0 = u8[i]\n const x1 = u8[i + 1]\n const x2 = u8[i + 2]\n const x3 = u8[i + 3]\n u8[i] = x1\n u8[i + 1] = x0\n u8[i + 2] = x3\n u8[i + 3] = x2\n }\n\n for (const last = u8.length - 1; i < last; i += 2) {\n const x0 = u8[i]\n const x1 = u8[i + 1]\n u8[i] = x1\n u8[i + 1] = x0\n }\n\n return u8\n}\n\n// Splitting paths into small functions helps (at least on SpiderMonkey)\n\nconst encodeChecked = (str, arr) => encodeCharcodes(str, arr) // Same as encodeLatin1, but with Uint16Array\n\nfunction encodeCheckedSwapped(str, arr) {\n // TODO: faster path for Hermes? See encodeCharcodes\n const length = str.length\n for (let i = 0; i < length; i++) {\n const x = str.charCodeAt(i)\n arr[i] = ((x & 0xff) << 8) | (x >> 8)\n }\n\n return arr\n}\n\n// lead: d800 - dbff, trail: dc00 - dfff\n\nfunction encodeUnchecked(str, arr, loose = false) {\n // TODO: faster path for Hermes? See encodeCharcodes\n const length = str.length\n for (let i = 0; i < length; i++) {\n const code = str.charCodeAt(i)\n arr[i] = code\n if (code >= 0xd8_00 && code < 0xe0_00) {\n // An unexpected trail or a lead at the very end of input\n if (code > 0xdb_ff || i + 1 >= length) {\n if (!loose) throw new TypeError(E_STRICT_UNICODE)\n arr[i] = replacementCodepoint\n } else {\n const next = str.charCodeAt(i + 1) // Process valid pairs immediately\n if (next < 0xdc_00 || next >= 0xe0_00) {\n if (!loose) throw new TypeError(E_STRICT_UNICODE)\n arr[i] = replacementCodepoint\n } else {\n i++ // consume next\n arr[i] = next\n }\n }\n }\n }\n\n return arr\n}\n\nfunction encodeUncheckedSwapped(str, arr, loose = false) {\n // TODO: faster path for Hermes? See encodeCharcodes\n const length = str.length\n for (let i = 0; i < length; i++) {\n const code = str.charCodeAt(i)\n arr[i] = ((code & 0xff) << 8) | (code >> 8)\n if (code >= 0xd8_00 && code < 0xe0_00) {\n // An unexpected trail or a lead at the very end of input\n if (code > 0xdb_ff || i + 1 >= length) {\n if (!loose) throw new TypeError(E_STRICT_UNICODE)\n arr[i] = replacementCodepointSwapped\n } else {\n const next = str.charCodeAt(i + 1) // Process valid pairs immediately\n if (next < 0xdc_00 || next >= 0xe0_00) {\n if (!loose) throw new TypeError(E_STRICT_UNICODE)\n arr[i] = replacementCodepointSwapped\n } else {\n i++ // consume next\n arr[i] = ((next & 0xff) << 8) | (next >> 8)\n }\n }\n }\n }\n\n return arr\n}\n\n// Only needed on Hermes, everything else has native impl\nexport function toWellFormed(u16) {\n const length = u16.length\n for (let i = 0; i < length; i++) {\n const code = u16[i]\n if (code >= 0xd8_00 && code < 0xe0_00) {\n // An unexpected trail or a lead at the very end of input\n if (code > 0xdb_ff || i + 1 >= length) {\n u16[i] = replacementCodepoint\n } else {\n const next = u16[i + 1] // Process valid pairs immediately\n if (next < 0xdc_00 || next >= 0xe0_00) {\n u16[i] = replacementCodepoint\n } else {\n i++ // consume next\n }\n }\n }\n }\n\n return u16\n}\n\n// Only needed on Hermes, everything else has native impl\nexport function isWellFormed(u16) {\n const length = u16.length\n let i = 0\n\n const m = 0x80_00_80_00\n const l = 0xd8_00\n const h = 0xe0_00\n\n // Speedup with u32, by skipping to the first surrogate\n // Only implemented for aligned input for now, but almost all input is aligned (pooled Buffer or 0 offset)\n if (length > 32 && u16.byteOffset % 4 === 0) {\n const u32length = (u16.byteLength / 4) | 0\n const u32 = new Uint32Array(u16.buffer, u16.byteOffset, u32length)\n for (const last3 = u32length - 3; ; i += 4) {\n if (i >= last3) break // loop is fast enough for moving this here to be _very_ useful, likely due to array access checks\n const a = u32[i]\n const b = u32[i + 1]\n const c = u32[i + 2]\n const d = u32[i + 3]\n if (a & m || b & m || c & m || d & m) break // bitwise OR does not make this faster on Hermes\n }\n\n for (; i < u32length; i++) if (u32[i] & m) break\n i *= 2\n }\n\n // An extra loop gives ~30-40% speedup e.g. on English text without surrogates but with other symbols above 0x80_00\n for (const last3 = length - 3; ; i += 4) {\n if (i >= last3) break\n const a = u16[i]\n const b = u16[i + 1]\n const c = u16[i + 2]\n const d = u16[i + 3]\n if ((a >= l && a < h) || (b >= l && b < h) || (c >= l && c < h) || (d >= l && d < h)) break\n }\n\n for (; i < length; i++) {\n const code = u16[i]\n if (code >= l && code < h) {\n // An unexpected trail or a lead at the very end of input\n if (code >= 0xdc_00 || i + 1 >= length) return false\n i++ // consume next\n const next = u16[i] // Process valid pairs immediately\n if (next < 0xdc_00 || next >= h) return false\n }\n }\n\n return true\n}\n","// We trust browsers to always have correct TextDecoder for utf-16le/utf-16be with ignoreBOM without streaming\n\nimport { encodeApi, decodeApiDecoders } from './fallback/utf16.js'\n\nexport const utf16fromString = (str, format = 'uint16') => encodeApi(str, false, format)\nexport const utf16fromStringLoose = (str, format = 'uint16') => encodeApi(str, true, format)\nexport const utf16toString = (arr, format = 'uint16') => decodeApiDecoders(arr, false, format)\nexport const utf16toStringLoose = (arr, format = 'uint16') => decodeApiDecoders(arr, true, format)\n","import { assertU8, fromUint8, E_STRING, E_STRICT_UNICODE } from './fallback/_utils.js'\nimport { nativeDecoder, nativeEncoder } from './fallback/platform.js'\nimport * as js from './fallback/utf8.auto.js'\n\n// ignoreBOM: true means that BOM will be left as-is, i.e. will be present in the output\n// We don't want to strip anything unexpectedly\nconst decoderLoose = nativeDecoder\nconst decoderFatal = nativeDecoder\n ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true })\n : null\nconst { isWellFormed } = String.prototype\n\nfunction deLoose(str, loose, res) {\n if (loose || str.length === res.length) return res // length is equal only for ascii, which is automatically fine\n if (isWellFormed) {\n // We have a fast native method\n if (isWellFormed.call(str)) return res\n throw new TypeError(E_STRICT_UNICODE)\n }\n\n // Recheck if the string was encoded correctly\n let start = 0\n const last = res.length - 3\n // Search for EFBFBD (3-byte sequence)\n while (start <= last) {\n const pos = res.indexOf(0xef, start)\n if (pos === -1 || pos > last) break\n start = pos + 1\n if (res[pos + 1] === 0xbf && res[pos + 2] === 0xbd) {\n // Found a replacement char in output, need to recheck if we encoded the input correctly\n if (js.decodeFast && !nativeDecoder && str.length < 1e7) {\n // This is ~2x faster than decode in Hermes\n try {\n if (encodeURI(str) !== null) return res // guard against optimizing out\n } catch {}\n } else if (str === decode(res)) return res\n throw new TypeError(E_STRICT_UNICODE)\n }\n }\n\n return res\n}\n\nfunction encode(str, loose = false) {\n if (typeof str !== 'string') throw new TypeError(E_STRING)\n if (str.length === 0) return new Uint8Array() // faster than Uint8Array.of\n if (nativeEncoder || !js.encode) return deLoose(str, loose, nativeEncoder.encode(str))\n // No reason to use unescape + encodeURIComponent: it's slower than JS on normal engines, and modern Hermes already has TextEncoder\n return js.encode(str, loose)\n}\n\nfunction decode(arr, loose = false) {\n assertU8(arr)\n if (arr.byteLength === 0) return ''\n if (nativeDecoder || !js.decodeFast) {\n return loose ? decoderLoose.decode(arr) : decoderFatal.decode(arr) // Node.js and browsers\n }\n\n return js.decodeFast(arr, loose)\n}\n\nexport const utf8fromString = (str, format = 'uint8') => fromUint8(encode(str, false), format)\nexport const utf8fromStringLoose = (str, format = 'uint8') => fromUint8(encode(str, true), format)\nexport const utf8toString = (arr) => decode(arr, false)\nexport const utf8toStringLoose = (arr) => decode(arr, true)\n","import { decodeAscii, encodeLatin1 } from './latin1.js'\nimport { decode2string } from './platform.js'\n\nconst ERR = 'percentEncodeSet must be a string of unique increasing codepoints in range 0x20 - 0x7e'\nconst percentMap = new Map()\nlet hex, base\n\nexport function percentEncoder(set, spaceAsPlus = false) {\n if (typeof set !== 'string' || /[^\\x20-\\x7E]/.test(set)) throw new TypeError(ERR)\n if (typeof spaceAsPlus !== 'boolean') throw new TypeError('spaceAsPlus must be boolean')\n const id = set + +spaceAsPlus\n const cached = percentMap.get(id)\n if (cached) return cached\n\n const n = encodeLatin1(set).sort() // string checked above to be ascii\n if (decodeAscii(n) !== set || new Set(n).size !== n.length) throw new TypeError(ERR)\n\n if (!base) {\n hex = Array.from({ length: 256 }, (_, i) => `%${i.toString(16).padStart(2, '0').toUpperCase()}`)\n base = hex.map((h, i) => (i < 0x20 || i > 0x7e ? h : String.fromCharCode(i)))\n }\n\n const map = base.slice() // copy\n for (const c of n) map[c] = hex[c]\n if (spaceAsPlus) map[0x20] = '+' // overrides whatever percentEncodeSet thinks about it\n\n // Input is not typechecked, for internal use only\n const percentEncode = (u8, start = 0, end = u8.length) => decode2string(u8, start, end, map)\n percentMap.set(id, percentEncode)\n return percentEncode\n}\n","import { utf8fromStringLoose } from '@exodus/bytes/utf8.js'\nimport { createSinglebyteEncoder } from '@exodus/bytes/single-byte.js'\nimport {\n isMultibyte,\n getMultibyteEncoder,\n normalizeEncoding,\n E_ENCODING,\n} from './fallback/encoding.js'\nimport { percentEncoder } from './fallback/percent.js'\nimport { encodeMap } from './fallback/single-byte.js'\nimport { E_STRING } from './fallback/_utils.js'\n\n// https://url.spec.whatwg.org/#string-percent-encode-after-encoding\n// Codepoints below 0x20, 0x7F specifically, and above 0x7F (non-ASCII) are always encoded\n// > A C0 control is a code point in the range U+0000 NULL to U+001F INFORMATION SEPARATOR ONE, inclusive.\n// > The C0 control percent-encode set are the C0 controls and all code points greater than U+007E (~).\nexport function percentEncodeAfterEncoding(encoding, input, percentEncodeSet, spaceAsPlus = false) {\n const enc = normalizeEncoding(encoding)\n // Ref: https://encoding.spec.whatwg.org/#get-an-encoder\n if (!enc || enc === 'replacement' || enc === 'utf-16le' || enc === 'utf-16be') {\n throw new RangeError(E_ENCODING)\n }\n\n const percent = percentEncoder(percentEncodeSet, spaceAsPlus)\n if (enc === 'utf-8') return percent(utf8fromStringLoose(input))\n\n const multi = isMultibyte(enc)\n const encoder = multi ? getMultibyteEncoder() : createSinglebyteEncoder\n const fatal = encoder(enc)\n try {\n return percent(fatal(input))\n } catch {}\n\n let res = ''\n let last = 0\n if (multi) {\n const rep = enc === 'gb18030' ? percent(fatal('\\uFFFD')) : `%26%23${0xff_fd}%3B` // only gb18030 can encode it\n const escaping = encoder(enc, (cp, u, i) => {\n res += percent(u, last, i)\n res += cp >= 0xd8_00 && cp < 0xe0_00 ? rep : `%26%23${cp}%3B` // &#cp;\n last = i\n return 0 // no bytes emitted\n })\n\n const u = escaping(input) // has side effects on res\n res += percent(u, last)\n } else {\n if (typeof input !== 'string') throw new TypeError(E_STRING) // all other paths have their own validation\n const m = encodeMap(enc)\n const len = input.length\n const u = new Uint8Array(len)\n for (let i = 0; i < len; i++) {\n const x = input.charCodeAt(i)\n const b = m[x]\n if (!b && x) {\n let cp = x\n const i0 = i\n if (x >= 0xd8_00 && x < 0xe0_00) {\n cp = 0xff_fd\n if (x < 0xdc_00 && i + 1 < len) {\n const x1 = input.charCodeAt(i + 1)\n if (x1 >= 0xdc_00 && x1 < 0xe0_00) {\n cp = 0x1_00_00 + ((x1 & 0x3_ff) | ((x & 0x3_ff) << 10))\n i++\n }\n }\n }\n\n res += `${percent(u, last, i0)}%26%23${cp}%3B` // &#cp;\n last = i + 1 // skip current\n } else {\n u[i] = b\n }\n }\n\n res += percent(u, last)\n }\n\n return res\n}\n","// The module cache\nconst __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tconst cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tconst module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tconst getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter/value functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tif(Array.isArray(definition)) {\n\t\tvar i = 0;\n\t\twhile(i < definition.length) {\n\t\t\tvar key = definition[i++];\n\t\t\tvar binding = definition[i++];\n\t\t\tif(!__webpack_require__.o(exports, key)) {\n\t\t\t\tif(binding === 0) {\n\t\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, value: definition[i++] });\n\t\t\t\t} else {\n\t\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: binding });\n\t\t\t\t}\n\t\t\t} else if(binding === 0) { i++; }\n\t\t}\n\t} else {\n\t\tfor(var key in definition) {\n\t\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t\t}\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// set .name for anonymous default exports per ES spec\n// skipped when the property is non-configurable (pre-ES2015 engines),\n// where Object.defineProperty would throw\n__webpack_require__.dn = (x) => {\n\tvar descriptor = Object.getOwnPropertyDescriptor(x, \"name\");\n\tif (!descriptor || (!descriptor.writable && descriptor.configurable)) Object.defineProperty(x, \"name\", { value: \"default\", configurable: true });\n};","// execute a CommonJS module body with real module/exports objects, returning the final exports\n__webpack_require__.cjs = (body) => {\n\tconst mod = { exports: {} };\n\tbody.call(mod.exports, mod, mod.exports);\n\treturn mod.exports;\n};","let scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nconst document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript?.tagName.toUpperCase() === 'SCRIPT')\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tconst scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tlet i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/^blob:/, \"\").replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","__webpack_require__.b = (typeof document !== 'undefined' && document.baseURI) || self.location.href;\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nconst installedChunks = {\n\t792: 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// no jsonp function","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module used 'module' so it can't be inlined\nlet __webpack_exports__ = __webpack_require__(370);\n"],"names":[],"sourceRoot":""}
|