{"version":3,"file":"static/js/main.5821b92c.js","sources":["_metronic/assets/ts/_utils/_ElementStyleUtil.ts","_metronic/assets/ts/_utils/_DataUtil.ts","_metronic/assets/ts/_utils/_TypesHelpers.ts","_metronic/assets/ts/_utils/_DOMEventHandlerUtil.ts","_metronic/assets/ts/_utils/ElementAnimateUtil.ts","_metronic/assets/ts/_utils/DomHelpers.ts","_metronic/assets/ts/_utils/EventHandlerUtil.ts","_metronic/assets/ts/components/_DrawerComponent.ts","_metronic/assets/ts/components/_ImageInputComponent.ts","_metronic/assets/ts/components/_CookieComponent.ts","_metronic/assets/ts/components/_ScrollComponent.ts","_metronic/assets/ts/components/_ScrollTopComponent.ts","_metronic/assets/ts/components/_StepperComponent.ts","_metronic/assets/ts/components/_StickyComponent.ts","_metronic/assets/ts/components/_ToggleComponent.ts","_metronic/assets/ts/components/_PasswordMeterComponent.ts","_metronic/assets/ts/components/_SwapperComponent.ts","_metronic/assets/ts/components/MenuComponent.ts","_metronic/assets/ts/components/SearchComponent.ts","_metronic/helpers/AssetHelpers.ts","_metronic/helpers/RouterHelpers.ts","../node_modules/react-from-dom/src/helpers.ts","../node_modules/react-from-dom/src/index.ts","../node_modules/react-inlinesvg/src/helpers.ts","../node_modules/react-inlinesvg/src/index.tsx","_metronic/helpers/components/KTSVG.tsx","_metronic/helpers/react18MigrationHelpers.ts","app/apiClient/apiClient.tsx","app/apiClient/enums.ts","app/components/common/messages/FormInputErrorMessage.tsx","app/components/common/title/NormalTitle.tsx","app/components/common/translate/Translator.tsx","app/components/common/translate/TranslatorText.tsx","../node_modules/preact/src/util.js","../node_modules/preact/src/options.js","../node_modules/preact/src/create-element.js","../node_modules/preact/src/diff/props.js","../node_modules/preact/src/component.js","../node_modules/preact/src/create-context.js","../node_modules/preact/src/constants.js","../node_modules/preact/src/diff/children.js","../node_modules/preact/src/diff/index.js","../node_modules/preact/src/render.js","../node_modules/preact/src/diff/catch-error.js","../node_modules/preact/hooks/src/index.js","../node_modules/preact/compat/src/util.js","../node_modules/preact/compat/src/PureComponent.js","../node_modules/preact/compat/src/forwardRef.js","../node_modules/preact/compat/src/Children.js","../node_modules/preact/compat/src/suspense.js","../node_modules/preact/compat/src/suspense-list.js","../node_modules/preact/compat/src/portals.js","../node_modules/preact/compat/src/render.js","../node_modules/@fullcalendar/core/internal-common.js","../node_modules/@fullcalendar/core/index.js","../node_modules/@fullcalendar/react/src/index.tsx","../node_modules/@fullcalendar/daygrid/internal.js","../node_modules/@fullcalendar/daygrid/index.js","../node_modules/@fullcalendar/list/internal.js","../node_modules/@fullcalendar/list/index.js","../node_modules/@fullcalendar/moment-timezone/index.js","app/components/customer/home/CustomerCalendar.tsx","app/components/form/FormInput.tsx","app/components/form/FormLogger.tsx","app/components/form/FormikForm.tsx","app/components/form/dropdown/CustomDropdown.tsx","../node_modules/@restart/hooks/esm/useUpdateEffect.js","../node_modules/@restart/hooks/esm/useTimeout.js","../node_modules/@restart/hooks/esm/useResizeObserver.js","../node_modules/@restart/ui/esm/Anchor.js","../node_modules/uncontrollable/lib/esm/utils.js","../node_modules/uncontrollable/lib/esm/hook.js","../node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js","../node_modules/react-bootstrap/esm/CarouselCaption.js","../node_modules/react-bootstrap/esm/CarouselItem.js","../node_modules/react-bootstrap/esm/Carousel.js","app/pages/customer/home/HomeBanner.tsx","app/redux/adminSlice.ts","app/redux/commonSlice.ts","app/redux/userSlice.ts","app/types/FormStatus.ts","app/utils/utilities.ts","../node_modules/@emotion/unitless/dist/emotion-unitless.esm.js","../node_modules/@formatjs/ecma402-abstract/lib/CanonicalizeLocaleList.js","../node_modules/@formatjs/ecma402-abstract/lib/CanonicalizeTimeZoneName.js","../node_modules/@formatjs/ecma402-abstract/lib/262.js","../node_modules/@formatjs/ecma402-abstract/lib/CoerceOptionsToObject.js","../node_modules/@formatjs/ecma402-abstract/lib/DefaultNumberOption.js","../node_modules/@formatjs/ecma402-abstract/lib/GetNumberOption.js","../node_modules/@formatjs/ecma402-abstract/lib/GetOption.js","../node_modules/@formatjs/ecma402-abstract/lib/GetOptionsObject.js","../node_modules/@formatjs/ecma402-abstract/lib/IsSanctionedSimpleUnitIdentifier.js","../node_modules/@formatjs/ecma402-abstract/lib/IsValidTimeZoneName.js","../node_modules/@formatjs/ecma402-abstract/lib/IsWellFormedCurrencyCode.js","../node_modules/@formatjs/ecma402-abstract/lib/IsWellFormedUnitIdentifier.js","../node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/ComputeExponentForMagnitude.js","../node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/ToRawPrecision.js","../node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/ToRawFixed.js","../node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/FormatNumericToString.js","../node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/ComputeExponent.js","../node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/CurrencyDigits.js","../node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/digit-mapping.generated.js","../node_modules/@formatjs/ecma402-abstract/lib/regex.generated.js","../node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/format_to_parts.js","../node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/PartitionNumberPattern.js","../node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/FormatNumericToParts.js","../node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/SetNumberFormatUnitOptions.js","../node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/SetNumberFormatDigitOptions.js","../node_modules/@formatjs/ecma402-abstract/lib/NumberFormat/InitializeNumberFormat.js","../node_modules/@formatjs/ecma402-abstract/lib/PartitionPattern.js","../node_modules/@formatjs/ecma402-abstract/lib/SupportedLocales.js","../node_modules/@formatjs/ecma402-abstract/lib/types/date-time.js","../node_modules/@formatjs/ecma402-abstract/lib/data.js","../node_modules/@formatjs/ecma402-abstract/lib/utils.js","../node_modules/@formatjs/fast-memoize/lib/index.js","../node_modules/@formatjs/icu-messageformat-parser/lib/error.js","../node_modules/@formatjs/icu-messageformat-parser/lib/types.js","../node_modules/@formatjs/icu-messageformat-parser/lib/regex.generated.js","../node_modules/@formatjs/icu-skeleton-parser/lib/date-time.js","../node_modules/@formatjs/icu-skeleton-parser/lib/regex.generated.js","../node_modules/@formatjs/icu-skeleton-parser/lib/number.js","../node_modules/@formatjs/icu-messageformat-parser/lib/parser.js","../node_modules/@formatjs/icu-messageformat-parser/lib/index.js","../node_modules/@formatjs/intl-localematcher/lib/abstract/BestAvailableLocale.js","../node_modules/@formatjs/intl-localematcher/lib/abstract/LookupSupportedLocales.js","../node_modules/@formatjs/intl-localematcher/lib/abstract/UnicodeExtensionValue.js","../node_modules/@formatjs/intl-localematcher/lib/abstract/ResolveLocale.js","../node_modules/@formatjs/intl-localematcher/lib/abstract/LookupMatcher.js","../node_modules/@formatjs/intl-localematcher/lib/abstract/BestFitMatcher.js","../node_modules/@formatjs/intl-localematcher/lib/abstract/utils.js","../node_modules/@formatjs/intl-localematcher/lib/index.js","../node_modules/@formatjs/intl-localematcher/lib/abstract/CanonicalizeLocaleList.js","../node_modules/@formatjs/intl-relativetimeformat/abstract/InitializeRelativeTimeFormat.js","../node_modules/@formatjs/intl-relativetimeformat/abstract/MakePartsList.js","../node_modules/@formatjs/intl-relativetimeformat/abstract/PartitionRelativeTimePattern.js","../node_modules/@formatjs/intl-relativetimeformat/abstract/SingularRelativeTimeUnit.js","../node_modules/@formatjs/intl-relativetimeformat/get_internal_slots.js","../node_modules/@formatjs/intl-relativetimeformat/index.js","../node_modules/@formatjs/intl-relativetimeformat/locale-data/de.js","../node_modules/@formatjs/intl-relativetimeformat/locale-data/en.js","../node_modules/@formatjs/intl-relativetimeformat/locale-data/es.js","../node_modules/@formatjs/intl-relativetimeformat/locale-data/fr.js","../node_modules/@formatjs/intl-relativetimeformat/locale-data/ja.js","../node_modules/@formatjs/intl-relativetimeformat/locale-data/tr.js","../node_modules/@formatjs/intl-relativetimeformat/locale-data/zh.js","../node_modules/@formatjs/intl-relativetimeformat/polyfill.js","../node_modules/@formatjs/intl-relativetimeformat/should-polyfill.js","../node_modules/@formatjs/intl-relativetimeformat/supported-locales.js","../node_modules/@formatjs/intl/lib/src/error.js","../node_modules/@formatjs/intl/lib/src/utils.js","../node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","../node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","../node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","../node_modules/@popperjs/core/lib/utils/orderModifiers.js","../node_modules/@popperjs/core/lib/utils/debounce.js","../node_modules/@popperjs/core/lib/createPopper.js","../node_modules/@popperjs/core/lib/utils/mergeByName.js","../node_modules/@popperjs/core/lib/dom-utils/contains.js","../node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","../node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","../node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","../node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","../node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","../node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","../node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","../node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","../node_modules/@popperjs/core/lib/dom-utils/getWindow.js","../node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js","../node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js","../node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","../node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js","../node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js","../node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js","../node_modules/@popperjs/core/lib/enums.js","../node_modules/@popperjs/core/lib/modifiers/applyStyles.js","../node_modules/@popperjs/core/lib/modifiers/arrow.js","../node_modules/@popperjs/core/lib/modifiers/computeStyles.js","../node_modules/@popperjs/core/lib/modifiers/eventListeners.js","../node_modules/@popperjs/core/lib/utils/getOppositePlacement.js","../node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js","../node_modules/@popperjs/core/lib/modifiers/flip.js","../node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","../node_modules/@popperjs/core/lib/modifiers/hide.js","../node_modules/@popperjs/core/lib/modifiers/offset.js","../node_modules/@popperjs/core/lib/modifiers/popperOffsets.js","../node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","../node_modules/@popperjs/core/lib/utils/getAltAxis.js","../node_modules/@popperjs/core/lib/popper.js","../node_modules/@popperjs/core/lib/utils/computeOffsets.js","../node_modules/@popperjs/core/lib/utils/rectToClientRect.js","../node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","../node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","../node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js","../node_modules/@popperjs/core/lib/utils/detectOverflow.js","../node_modules/@popperjs/core/lib/utils/expandToHashMap.js","../node_modules/@popperjs/core/lib/utils/getBasePlacement.js","../node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","../node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","../node_modules/@popperjs/core/lib/utils/getVariation.js","../node_modules/@popperjs/core/lib/utils/math.js","../node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","../node_modules/@popperjs/core/lib/utils/within.js","../node_modules/immer/src/utils/errors.ts","../node_modules/immer/src/utils/common.ts","../node_modules/immer/src/utils/plugins.ts","../node_modules/immer/src/core/scope.ts","../node_modules/immer/src/core/finalize.ts","../node_modules/immer/src/core/proxy.ts","../node_modules/immer/src/core/immerClass.ts","../node_modules/immer/src/core/current.ts","../node_modules/immer/src/plugins/es5.ts","../node_modules/immer/src/immer.ts","../node_modules/immer/src/utils/env.ts","../node_modules/redux-thunk/es/index.js","../node_modules/@reduxjs/toolkit/src/devtoolsExtension.ts","../node_modules/@reduxjs/toolkit/src/isPlainObject.ts","../node_modules/@reduxjs/toolkit/src/createAction.ts","../node_modules/@reduxjs/toolkit/src/utils.ts","../node_modules/@reduxjs/toolkit/src/getDefaultMiddleware.ts","../node_modules/@reduxjs/toolkit/src/configureStore.ts","../node_modules/@reduxjs/toolkit/src/mapBuilders.ts","../node_modules/@reduxjs/toolkit/src/createSlice.ts","../node_modules/@reduxjs/toolkit/src/createReducer.ts","../node_modules/@reduxjs/toolkit/src/nanoid.ts","../node_modules/@reduxjs/toolkit/src/createAsyncThunk.ts","../node_modules/@reduxjs/toolkit/src/listenerMiddleware/index.ts","../node_modules/@reduxjs/toolkit/src/listenerMiddleware/task.ts","../node_modules/@reduxjs/toolkit/src/autoBatchEnhancer.ts","../node_modules/@reduxjs/toolkit/src/index.ts","../node_modules/@restart/hooks/esm/useCallbackRef.js","../node_modules/@restart/hooks/esm/useCommittedRef.js","../node_modules/@restart/hooks/esm/useEventCallback.js","../node_modules/@restart/hooks/esm/useIsomorphicEffect.js","../node_modules/@restart/hooks/esm/useMergedRefs.js","../node_modules/@restart/hooks/esm/useMounted.js","../node_modules/@restart/hooks/esm/usePrevious.js","../node_modules/@restart/hooks/esm/useWillUnmount.js","../node_modules/@restart/hooks/esm/useUpdatedRef.js","../node_modules/@restart/ui/esm/Button.js","../node_modules/axios/index.js","../node_modules/axios/lib/adapters/xhr.js","../node_modules/axios/lib/axios.js","../node_modules/axios/lib/cancel/Cancel.js","../node_modules/axios/lib/cancel/CancelToken.js","../node_modules/axios/lib/cancel/isCancel.js","../node_modules/axios/lib/core/Axios.js","../node_modules/axios/lib/core/InterceptorManager.js","../node_modules/axios/lib/core/buildFullPath.js","../node_modules/axios/lib/core/createError.js","../node_modules/axios/lib/core/dispatchRequest.js","../node_modules/axios/lib/core/enhanceError.js","../node_modules/axios/lib/core/mergeConfig.js","../node_modules/axios/lib/core/settle.js","../node_modules/axios/lib/core/transformData.js","../node_modules/axios/lib/defaults/index.js","../node_modules/axios/lib/defaults/transitional.js","../node_modules/axios/lib/env/data.js","../node_modules/axios/lib/helpers/bind.js","../node_modules/axios/lib/helpers/buildURL.js","../node_modules/axios/lib/helpers/combineURLs.js","../node_modules/axios/lib/helpers/cookies.js","../node_modules/axios/lib/helpers/isAbsoluteURL.js","../node_modules/axios/lib/helpers/isAxiosError.js","../node_modules/axios/lib/helpers/isURLSameOrigin.js","../node_modules/axios/lib/helpers/normalizeHeaderName.js","../node_modules/axios/lib/helpers/parseHeaders.js","../node_modules/axios/lib/helpers/spread.js","../node_modules/axios/lib/helpers/validator.js","../node_modules/axios/lib/utils.js","../node_modules/call-bind/callBound.js","../node_modules/call-bind/index.js","../node_modules/card-validator/dist/card-number.js","../node_modules/card-validator/dist/cardholder-name.js","../node_modules/card-validator/dist/cvv.js","../node_modules/card-validator/dist/expiration-date.js","../node_modules/card-validator/dist/expiration-month.js","../node_modules/card-validator/dist/expiration-year.js","../node_modules/card-validator/dist/index.js","../node_modules/card-validator/dist/lib/is-array.js","../node_modules/card-validator/dist/lib/parse-date.js","../node_modules/card-validator/dist/luhn-10.js","../node_modules/card-validator/dist/postal-code.js","../node_modules/clsx/dist/clsx.m.js","../node_modules/cookie/index.js","../node_modules/copy-to-clipboard/index.js","../node_modules/credit-card-type/dist/index.js","../node_modules/credit-card-type/dist/lib/add-matching-cards-to-results.js","../node_modules/credit-card-type/dist/lib/card-types.js","../node_modules/credit-card-type/dist/lib/clone.js","../node_modules/credit-card-type/dist/lib/find-best-match.js","../node_modules/credit-card-type/dist/lib/is-valid-input-type.js","../node_modules/credit-card-type/dist/lib/matches.js","../node_modules/define-data-property/index.js","../node_modules/dom-helpers/esm/addClass.js","../node_modules/dom-helpers/esm/hasClass.js","../node_modules/dom-helpers/esm/addEventListener.js","../node_modules/dom-helpers/esm/canUseDOM.js","../node_modules/dom-helpers/esm/getComputedStyle.js","../node_modules/dom-helpers/esm/ownerWindow.js","../node_modules/dom-helpers/esm/hyphenate.js","../node_modules/dom-helpers/esm/hyphenateStyle.js","../node_modules/dom-helpers/esm/isTransform.js","../node_modules/dom-helpers/esm/css.js","../node_modules/dom-helpers/esm/listen.js","../node_modules/dom-helpers/esm/ownerDocument.js","../node_modules/dom-helpers/esm/removeClass.js","../node_modules/dom-helpers/esm/removeEventListener.js","../node_modules/dom-helpers/esm/transitionEnd.js","../node_modules/dom-helpers/esm/triggerEvent.js","../node_modules/es-define-property/index.js","../node_modules/es-errors/eval.js","../node_modules/es-errors/index.js","../node_modules/es-errors/range.js","../node_modules/es-errors/ref.js","../node_modules/es-errors/syntax.js","../node_modules/es-errors/type.js","../node_modules/es-errors/uri.js","../node_modules/events/events.js","../node_modules/exenv/index.js","../node_modules/file-saver/src/FileSaver.js","../node_modules/formik/node_modules/deepmerge/dist/es.js","../node_modules/lodash-es/_freeGlobal.js","../node_modules/lodash-es/_root.js","../node_modules/lodash-es/_Symbol.js","../node_modules/lodash-es/_getRawTag.js","../node_modules/lodash-es/_objectToString.js","../node_modules/lodash-es/_baseGetTag.js","../node_modules/lodash-es/_overArg.js","../node_modules/lodash-es/_getPrototype.js","../node_modules/lodash-es/isObjectLike.js","../node_modules/lodash-es/isPlainObject.js","../node_modules/lodash-es/_listCacheClear.js","../node_modules/lodash-es/eq.js","../node_modules/lodash-es/_assocIndexOf.js","../node_modules/lodash-es/_listCacheDelete.js","../node_modules/lodash-es/_listCacheGet.js","../node_modules/lodash-es/_listCacheHas.js","../node_modules/lodash-es/_listCacheSet.js","../node_modules/lodash-es/_ListCache.js","../node_modules/lodash-es/_stackClear.js","../node_modules/lodash-es/_stackDelete.js","../node_modules/lodash-es/_stackGet.js","../node_modules/lodash-es/_stackHas.js","../node_modules/lodash-es/isObject.js","../node_modules/lodash-es/isFunction.js","../node_modules/lodash-es/_coreJsData.js","../node_modules/lodash-es/_isMasked.js","../node_modules/lodash-es/_toSource.js","../node_modules/lodash-es/_baseIsNative.js","../node_modules/lodash-es/_getValue.js","../node_modules/lodash-es/_getNative.js","../node_modules/lodash-es/_Map.js","../node_modules/lodash-es/_nativeCreate.js","../node_modules/lodash-es/_hashClear.js","../node_modules/lodash-es/_hashDelete.js","../node_modules/lodash-es/_hashGet.js","../node_modules/lodash-es/_hashHas.js","../node_modules/lodash-es/_hashSet.js","../node_modules/lodash-es/_Hash.js","../node_modules/lodash-es/_mapCacheClear.js","../node_modules/lodash-es/_isKeyable.js","../node_modules/lodash-es/_getMapData.js","../node_modules/lodash-es/_mapCacheDelete.js","../node_modules/lodash-es/_mapCacheGet.js","../node_modules/lodash-es/_mapCacheHas.js","../node_modules/lodash-es/_mapCacheSet.js","../node_modules/lodash-es/_MapCache.js","../node_modules/lodash-es/_stackSet.js","../node_modules/lodash-es/_Stack.js","../node_modules/lodash-es/_arrayEach.js","../node_modules/lodash-es/_defineProperty.js","../node_modules/lodash-es/_baseAssignValue.js","../node_modules/lodash-es/_assignValue.js","../node_modules/lodash-es/_copyObject.js","../node_modules/lodash-es/_baseTimes.js","../node_modules/lodash-es/_baseIsArguments.js","../node_modules/lodash-es/isArguments.js","../node_modules/lodash-es/isArray.js","../node_modules/lodash-es/stubFalse.js","../node_modules/lodash-es/isBuffer.js","../node_modules/lodash-es/_isIndex.js","../node_modules/lodash-es/isLength.js","../node_modules/lodash-es/_baseIsTypedArray.js","../node_modules/lodash-es/_baseUnary.js","../node_modules/lodash-es/_nodeUtil.js","../node_modules/lodash-es/isTypedArray.js","../node_modules/lodash-es/_arrayLikeKeys.js","../node_modules/lodash-es/_isPrototype.js","../node_modules/lodash-es/_nativeKeys.js","../node_modules/lodash-es/_baseKeys.js","../node_modules/lodash-es/isArrayLike.js","../node_modules/lodash-es/keys.js","../node_modules/lodash-es/_baseAssign.js","../node_modules/lodash-es/_nativeKeysIn.js","../node_modules/lodash-es/_baseKeysIn.js","../node_modules/lodash-es/keysIn.js","../node_modules/lodash-es/_baseAssignIn.js","../node_modules/lodash-es/_cloneBuffer.js","../node_modules/lodash-es/_copyArray.js","../node_modules/lodash-es/_arrayFilter.js","../node_modules/lodash-es/stubArray.js","../node_modules/lodash-es/_getSymbols.js","../node_modules/lodash-es/_copySymbols.js","../node_modules/lodash-es/_arrayPush.js","../node_modules/lodash-es/_getSymbolsIn.js","../node_modules/lodash-es/_copySymbolsIn.js","../node_modules/lodash-es/_baseGetAllKeys.js","../node_modules/lodash-es/_getAllKeys.js","../node_modules/lodash-es/_getAllKeysIn.js","../node_modules/lodash-es/_DataView.js","../node_modules/lodash-es/_Promise.js","../node_modules/lodash-es/_Set.js","../node_modules/lodash-es/_WeakMap.js","../node_modules/lodash-es/_getTag.js","../node_modules/lodash-es/_initCloneArray.js","../node_modules/lodash-es/_Uint8Array.js","../node_modules/lodash-es/_cloneArrayBuffer.js","../node_modules/lodash-es/_cloneDataView.js","../node_modules/lodash-es/_cloneRegExp.js","../node_modules/lodash-es/_cloneSymbol.js","../node_modules/lodash-es/_cloneTypedArray.js","../node_modules/lodash-es/_initCloneByTag.js","../node_modules/lodash-es/_baseCreate.js","../node_modules/lodash-es/_initCloneObject.js","../node_modules/lodash-es/_baseIsMap.js","../node_modules/lodash-es/isMap.js","../node_modules/lodash-es/_baseIsSet.js","../node_modules/lodash-es/isSet.js","../node_modules/lodash-es/_baseClone.js","../node_modules/lodash-es/clone.js","../node_modules/lodash-es/_arrayMap.js","../node_modules/lodash-es/isSymbol.js","../node_modules/lodash-es/memoize.js","../node_modules/lodash-es/_stringToPath.js","../node_modules/lodash-es/_memoizeCapped.js","../node_modules/lodash-es/_toKey.js","../node_modules/lodash-es/_baseToString.js","../node_modules/lodash-es/toString.js","../node_modules/lodash-es/toPath.js","../node_modules/lodash-es/cloneDeep.js","../node_modules/formik/src/utils.ts","../node_modules/formik/src/FormikContext.tsx","../node_modules/formik/src/Formik.tsx","../node_modules/formik/src/Field.tsx","../node_modules/formik/src/Form.tsx","../node_modules/formik/src/connect.tsx","../node_modules/formik/src/FieldArray.tsx","../node_modules/formik/src/ErrorMessage.tsx","../node_modules/function-bind/implementation.js","../node_modules/function-bind/index.js","../node_modules/get-intrinsic/index.js","../node_modules/gopd/index.js","../node_modules/guid-typescript/dist/guid.js","../node_modules/has-property-descriptors/index.js","../node_modules/has-proto/index.js","../node_modules/has-symbols/index.js","../node_modules/has-symbols/shams.js","../node_modules/hasown/index.js","../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","../node_modules/intl-messageformat/lib/src/core.js","../node_modules/intl-messageformat/lib/src/error.js","../node_modules/intl-messageformat/lib/src/formatters.js","../node_modules/invariant/browser.js","../node_modules/lodash/_DataView.js","../node_modules/lodash/_Hash.js","../node_modules/lodash/_ListCache.js","../node_modules/lodash/_Map.js","../node_modules/lodash/_MapCache.js","../node_modules/lodash/_Promise.js","../node_modules/lodash/_Set.js","../node_modules/lodash/_SetCache.js","../node_modules/lodash/_Stack.js","../node_modules/lodash/_Symbol.js","../node_modules/lodash/_Uint8Array.js","../node_modules/lodash/_WeakMap.js","../node_modules/lodash/_arrayFilter.js","../node_modules/lodash/_arrayLikeKeys.js","../node_modules/lodash/_arrayMap.js","../node_modules/lodash/_arrayPush.js","../node_modules/lodash/_arrayReduce.js","../node_modules/lodash/_arraySome.js","../node_modules/lodash/_asciiToArray.js","../node_modules/lodash/_asciiWords.js","../node_modules/lodash/_assocIndexOf.js","../node_modules/lodash/_baseAssignValue.js","../node_modules/lodash/_baseFor.js","../node_modules/lodash/_baseForOwn.js","../node_modules/lodash/_baseGet.js","../node_modules/lodash/_baseGetAllKeys.js","../node_modules/lodash/_baseGetTag.js","../node_modules/lodash/_baseHas.js","../node_modules/lodash/_baseHasIn.js","../node_modules/lodash/_baseIsArguments.js","../node_modules/lodash/_baseIsEqual.js","../node_modules/lodash/_baseIsEqualDeep.js","../node_modules/lodash/_baseIsMatch.js","../node_modules/lodash/_baseIsNative.js","../node_modules/lodash/_baseIsTypedArray.js","../node_modules/lodash/_baseIteratee.js","../node_modules/lodash/_baseKeys.js","../node_modules/lodash/_baseMatches.js","../node_modules/lodash/_baseMatchesProperty.js","../node_modules/lodash/_baseProperty.js","../node_modules/lodash/_basePropertyDeep.js","../node_modules/lodash/_basePropertyOf.js","../node_modules/lodash/_baseSlice.js","../node_modules/lodash/_baseTimes.js","../node_modules/lodash/_baseToString.js","../node_modules/lodash/_baseUnary.js","../node_modules/lodash/_cacheHas.js","../node_modules/lodash/_castPath.js","../node_modules/lodash/_castSlice.js","../node_modules/lodash/_coreJsData.js","../node_modules/lodash/_createBaseFor.js","../node_modules/lodash/_createCaseFirst.js","../node_modules/lodash/_createCompounder.js","../node_modules/lodash/_deburrLetter.js","../node_modules/lodash/_defineProperty.js","../node_modules/lodash/_equalArrays.js","../node_modules/lodash/_equalByTag.js","../node_modules/lodash/_equalObjects.js","../node_modules/lodash/_freeGlobal.js","../node_modules/lodash/_getAllKeys.js","../node_modules/lodash/_getMapData.js","../node_modules/lodash/_getMatchData.js","../node_modules/lodash/_getNative.js","../node_modules/lodash/_getRawTag.js","../node_modules/lodash/_getSymbols.js","../node_modules/lodash/_getTag.js","../node_modules/lodash/_getValue.js","../node_modules/lodash/_hasPath.js","../node_modules/lodash/_hasUnicode.js","../node_modules/lodash/_hasUnicodeWord.js","../node_modules/lodash/_hashClear.js","../node_modules/lodash/_hashDelete.js","../node_modules/lodash/_hashGet.js","../node_modules/lodash/_hashHas.js","../node_modules/lodash/_hashSet.js","../node_modules/lodash/_isIndex.js","../node_modules/lodash/_isKey.js","../node_modules/lodash/_isKeyable.js","../node_modules/lodash/_isMasked.js","../node_modules/lodash/_isPrototype.js","../node_modules/lodash/_isStrictComparable.js","../node_modules/lodash/_listCacheClear.js","../node_modules/lodash/_listCacheDelete.js","../node_modules/lodash/_listCacheGet.js","../node_modules/lodash/_listCacheHas.js","../node_modules/lodash/_listCacheSet.js","../node_modules/lodash/_mapCacheClear.js","../node_modules/lodash/_mapCacheDelete.js","../node_modules/lodash/_mapCacheGet.js","../node_modules/lodash/_mapCacheHas.js","../node_modules/lodash/_mapCacheSet.js","../node_modules/lodash/_mapToArray.js","../node_modules/lodash/_matchesStrictComparable.js","../node_modules/lodash/_memoizeCapped.js","../node_modules/lodash/_nativeCreate.js","../node_modules/lodash/_nativeKeys.js","../node_modules/lodash/_nodeUtil.js","../node_modules/lodash/_objectToString.js","../node_modules/lodash/_overArg.js","../node_modules/lodash/_root.js","../node_modules/lodash/_setCacheAdd.js","../node_modules/lodash/_setCacheHas.js","../node_modules/lodash/_setToArray.js","../node_modules/lodash/_stackClear.js","../node_modules/lodash/_stackDelete.js","../node_modules/lodash/_stackGet.js","../node_modules/lodash/_stackHas.js","../node_modules/lodash/_stackSet.js","../node_modules/lodash/_stringToArray.js","../node_modules/lodash/_stringToPath.js","../node_modules/lodash/_toKey.js","../node_modules/lodash/_toSource.js","../node_modules/lodash/_unicodeToArray.js","../node_modules/lodash/_unicodeWords.js","../node_modules/lodash/camelCase.js","../node_modules/lodash/capitalize.js","../node_modules/lodash/deburr.js","../node_modules/lodash/eq.js","../node_modules/lodash/get.js","../node_modules/lodash/has.js","../node_modules/lodash/hasIn.js","../node_modules/lodash/identity.js","../node_modules/lodash/isArguments.js","../node_modules/lodash/isArray.js","../node_modules/lodash/isArrayLike.js","../node_modules/lodash/isBuffer.js","../node_modules/lodash/isFunction.js","../node_modules/lodash/isLength.js","../node_modules/lodash/isObject.js","../node_modules/lodash/isObjectLike.js","../node_modules/lodash/isSymbol.js","../node_modules/lodash/isTypedArray.js","../node_modules/lodash/keys.js","../node_modules/lodash/lodash.js","../node_modules/lodash/mapKeys.js","../node_modules/lodash/mapValues.js","../node_modules/lodash/memoize.js","../node_modules/lodash/property.js","../node_modules/lodash/snakeCase.js","../node_modules/lodash/stubArray.js","../node_modules/lodash/stubFalse.js","../node_modules/lodash/toString.js","../node_modules/lodash/upperFirst.js","../node_modules/lodash/words.js","../node_modules/moment-timezone/index.js","../node_modules/moment-timezone/moment-timezone.js","../node_modules/moment/moment.js","../node_modules/object-inspect/index.js","../node_modules/prop-types/factoryWithThrowingShims.js","../node_modules/prop-types/index.js","../node_modules/prop-types/lib/ReactPropTypesSecret.js","../node_modules/property-expr/index.js","../node_modules/qs/lib/formats.js","../node_modules/qs/lib/index.js","../node_modules/qs/lib/parse.js","../node_modules/qs/lib/stringify.js","../node_modules/qs/lib/utils.js","../node_modules/react-bootstrap-table-next/lib/index.js","../node_modules/react-bootstrap-table-next/lib/src/body.js","../node_modules/react-bootstrap-table-next/lib/src/bootstrap-table.js","../node_modules/react-bootstrap-table-next/lib/src/caption.js","../node_modules/react-bootstrap-table-next/lib/src/cell-event-delegater.js","../node_modules/react-bootstrap-table-next/lib/src/cell.js","../node_modules/react-bootstrap-table-next/lib/src/const.js","../node_modules/react-bootstrap-table-next/lib/src/contexts/bootstrap.js","../node_modules/react-bootstrap-table-next/lib/src/contexts/column-context.js","../node_modules/react-bootstrap-table-next/lib/src/contexts/data-context.js","../node_modules/react-bootstrap-table-next/lib/src/contexts/index.js","../node_modules/react-bootstrap-table-next/lib/src/contexts/row-expand-context.js","../node_modules/react-bootstrap-table-next/lib/src/contexts/selection-context.js","../node_modules/react-bootstrap-table-next/lib/src/contexts/sort-context.js","../node_modules/react-bootstrap-table-next/lib/src/filters-cell.js","../node_modules/react-bootstrap-table-next/lib/src/filters.js","../node_modules/react-bootstrap-table-next/lib/src/footer-cell.js","../node_modules/react-bootstrap-table-next/lib/src/footer.js","../node_modules/react-bootstrap-table-next/lib/src/header-cell.js","../node_modules/react-bootstrap-table-next/lib/src/header.js","../node_modules/react-bootstrap-table-next/lib/src/props-resolver/column-resolver.js","../node_modules/react-bootstrap-table-next/lib/src/props-resolver/index.js","../node_modules/react-bootstrap-table-next/lib/src/props-resolver/remote-resolver.js","../node_modules/react-bootstrap-table-next/lib/src/row-expand/expand-cell.js","../node_modules/react-bootstrap-table-next/lib/src/row-expand/expand-header-cell-consumer.js","../node_modules/react-bootstrap-table-next/lib/src/row-expand/expand-header-cell.js","../node_modules/react-bootstrap-table-next/lib/src/row-expand/expand-row.js","../node_modules/react-bootstrap-table-next/lib/src/row-expand/row-consumer.js","../node_modules/react-bootstrap-table-next/lib/src/row-selection/row-consumer.js","../node_modules/react-bootstrap-table-next/lib/src/row-selection/selection-cell.js","../node_modules/react-bootstrap-table-next/lib/src/row-selection/selection-header-cell-consumer.js","../node_modules/react-bootstrap-table-next/lib/src/row-selection/selection-header-cell.js","../node_modules/react-bootstrap-table-next/lib/src/row/aggregate-row.js","../node_modules/react-bootstrap-table-next/lib/src/row/event-delegater.js","../node_modules/react-bootstrap-table-next/lib/src/row/row-pure-content.js","../node_modules/react-bootstrap-table-next/lib/src/row/row-section.js","../node_modules/react-bootstrap-table-next/lib/src/row/row-template.js","../node_modules/react-bootstrap-table-next/lib/src/row/should-updater.js","../node_modules/react-bootstrap-table-next/lib/src/row/simple-row.js","../node_modules/react-bootstrap-table-next/lib/src/sort/caret.js","../node_modules/react-bootstrap-table-next/lib/src/sort/symbol.js","../node_modules/react-bootstrap-table-next/lib/src/store/expand.js","../node_modules/react-bootstrap-table-next/lib/src/store/mutate.js","../node_modules/react-bootstrap-table-next/lib/src/store/operators.js","../node_modules/react-bootstrap-table-next/lib/src/store/rows.js","../node_modules/react-bootstrap-table-next/lib/src/store/selection.js","../node_modules/react-bootstrap-table-next/lib/src/store/sort.js","../node_modules/react-bootstrap-table-next/lib/src/store/type.js","../node_modules/react-bootstrap-table-next/lib/src/utils.js","../node_modules/react-bootstrap-table2-filter/lib/index.js","../node_modules/react-bootstrap-table2-filter/lib/src/comparison.js","../node_modules/react-bootstrap-table2-filter/lib/src/components/date.js","../node_modules/react-bootstrap-table2-filter/lib/src/components/multiselect.js","../node_modules/react-bootstrap-table2-filter/lib/src/components/number.js","../node_modules/react-bootstrap-table2-filter/lib/src/components/select.js","../node_modules/react-bootstrap-table2-filter/lib/src/components/text.js","../node_modules/react-bootstrap-table2-filter/lib/src/const.js","../node_modules/react-bootstrap-table2-filter/lib/src/context.js","../node_modules/react-bootstrap-table2-filter/lib/src/filter.js","../node_modules/react-bootstrap-table2-paginator/lib/index.js","../node_modules/react-bootstrap-table2-paginator/lib/src/const.js","../node_modules/react-bootstrap-table2-paginator/lib/src/data-context.js","../node_modules/react-bootstrap-table2-paginator/lib/src/page-button.js","../node_modules/react-bootstrap-table2-paginator/lib/src/page-resolver.js","../node_modules/react-bootstrap-table2-paginator/lib/src/page.js","../node_modules/react-bootstrap-table2-paginator/lib/src/pagination-handler.js","../node_modules/react-bootstrap-table2-paginator/lib/src/pagination-list-adapter.js","../node_modules/react-bootstrap-table2-paginator/lib/src/pagination-list-standalone.js","../node_modules/react-bootstrap-table2-paginator/lib/src/pagination-list.js","../node_modules/react-bootstrap-table2-paginator/lib/src/pagination-total-adapter.js","../node_modules/react-bootstrap-table2-paginator/lib/src/pagination-total-standalone.js","../node_modules/react-bootstrap-table2-paginator/lib/src/pagination-total.js","../node_modules/react-bootstrap-table2-paginator/lib/src/pagination.js","../node_modules/react-bootstrap-table2-paginator/lib/src/size-per-page-dropdown-adapter.js","../node_modules/react-bootstrap-table2-paginator/lib/src/size-per-page-dropdown-standalone.js","../node_modules/react-bootstrap-table2-paginator/lib/src/size-per-page-dropdown.js","../node_modules/react-bootstrap-table2-paginator/lib/src/size-per-page-option.js","../node_modules/react-bootstrap-table2-paginator/lib/src/standalone-adapter.js","../node_modules/react-bootstrap-table2-paginator/lib/src/state-context.js","../node_modules/react-bootstrap/esm/ElementChildren.js","../node_modules/react-bootstrap/esm/ThemeProvider.js","../node_modules/react-bootstrap/esm/TransitionWrapper.js","../node_modules/react-bootstrap/esm/safeFindDOMNode.js","../node_modules/dom-helpers/esm/camelize.js","../node_modules/react-bootstrap/esm/createWithBsPrefix.js","../node_modules/react-bootstrap/esm/transitionEndListener.js","../node_modules/react-bootstrap/esm/triggerBrowserReflow.js","../node_modules/react-copy-to-clipboard/lib/Component.js","../node_modules/react-copy-to-clipboard/lib/index.js","../node_modules/react-dom/cjs/react-dom.production.min.js","../node_modules/react-dom/client.js","../node_modules/react-dom/index.js","../node_modules/react-fast-compare/index.js","../node_modules/react-intl/lib/src/components/injectIntl.js","../node_modules/react-intl/lib/src/components/useIntl.js","../node_modules/react-intl/lib/src/utils.js","../node_modules/react-is/cjs/react-is.production.min.js","../node_modules/react-is/index.js","../node_modules/react-query/devtools/index.js","../node_modules/react-query/es/core/logger.js","../node_modules/react-query/es/core/notifyManager.js","../node_modules/react-query/es/core/subscribable.js","../node_modules/react-query/es/core/focusManager.js","../node_modules/react-query/es/core/onlineManager.js","../node_modules/react-query/es/core/retryer.js","../node_modules/react-query/es/core/query.js","../node_modules/react-query/es/core/queryCache.js","../node_modules/react-query/es/core/mutation.js","../node_modules/react-query/es/core/mutationCache.js","../node_modules/react-query/es/core/infiniteQueryBehavior.js","../node_modules/react-query/es/core/queryClient.js","../node_modules/react-query/es/core/utils.js","../node_modules/react-query/es/react/reactBatchedUpdates.js","../node_modules/react-query/es/react/setBatchUpdatesFn.js","../node_modules/react-query/es/react/logger.js","../node_modules/react-query/es/react/setLogger.js","../node_modules/react-query/es/react/QueryClientProvider.js","../node_modules/react-redux/es/utils/batch.js","../node_modules/react-redux/es/components/Context.js","../node_modules/react-redux/es/hooks/useReduxContext.js","../node_modules/react-redux/es/hooks/useSelector.js","../node_modules/react-redux/es/utils/useSyncExternalStore.js","../node_modules/react-redux/es/utils/Subscription.js","../node_modules/react-redux/es/utils/useIsomorphicLayoutEffect.js","../node_modules/react-redux/es/components/connect.js","../node_modules/react-redux/es/components/Provider.js","../node_modules/react-redux/es/hooks/useStore.js","../node_modules/react-redux/es/hooks/useDispatch.js","../node_modules/react-redux/es/index.js","../node_modules/react-redux/node_modules/react-is/cjs/react-is.production.min.js","../node_modules/react-redux/node_modules/react-is/index.js","../MediaQuery/webpack/universalModuleDefinition","../MediaQuery/node_modules/css-mediaquery/index.js","../MediaQuery/node_modules/hyphenate-style-name/index.js","../MediaQuery/node_modules/matchmediaquery/index.js","../MediaQuery/node_modules/object-assign/index.js","../MediaQuery/node_modules/prop-types/checkPropTypes.js","../MediaQuery/node_modules/prop-types/factoryWithTypeCheckers.js","../MediaQuery/node_modules/prop-types/index.js","../MediaQuery/node_modules/prop-types/lib/ReactPropTypesSecret.js","../MediaQuery/node_modules/prop-types/lib/has.js","../MediaQuery/node_modules/react-is/cjs/react-is.development.js","../MediaQuery/node_modules/react-is/index.js","../MediaQuery/node_modules/shallow-equal/dist/index.esm.js","../MediaQuery/src/Component.ts","../MediaQuery/src/Context.ts","../MediaQuery/src/index.ts","../MediaQuery/src/mediaQuery.ts","../MediaQuery/src/toQuery.ts","../MediaQuery/src/useMediaQuery.ts","../MediaQuery/external umd {\"commonjs\":\"react\",\"commonjs2\":\"react\",\"amd\":\"react\",\"root\":\"React\"}","../MediaQuery/webpack/bootstrap","../MediaQuery/webpack/runtime/define property getters","../MediaQuery/webpack/runtime/hasOwnProperty shorthand","../MediaQuery/webpack/runtime/make namespace object","../MediaQuery/webpack/startup","../node_modules/react-topbar-progress-indicator/src/index.js","../node_modules/react-transition-group/esm/Transition.js","../node_modules/react-transition-group/esm/TransitionGroupContext.js","../node_modules/react-transition-group/esm/config.js","../node_modules/react-transition-group/esm/CSSTransition.js","../node_modules/react-transition-group/esm/utils/ChildMapping.js","../node_modules/react-transition-group/esm/TransitionGroup.js","../node_modules/react-transition-group/esm/ReplaceTransition.js","../node_modules/react-transition-group/esm/SwitchTransition.js","../node_modules/react-transition-group/esm/utils/reflow.js","../node_modules/react/cjs/react-jsx-runtime.production.min.js","../node_modules/react/cjs/react.production.min.js","../node_modules/react/index.js","../node_modules/react/jsx-runtime.js","../node_modules/redux/es/redux.js","../node_modules/scheduler/cjs/scheduler.production.min.js","../node_modules/scheduler/index.js","../node_modules/set-function-length/index.js","../node_modules/side-channel/index.js","../node_modules/tiny-warning/dist/tiny-warning.esm.js","../node_modules/toggle-selection/index.js","../node_modules/topbar/topbar.js","../node_modules/toposort/index.js","../node_modules/underscore/underscore.js","../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js","../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js","../node_modules/use-sync-external-store/shim/index.js","../node_modules/use-sync-external-store/shim/with-selector.js","../node_modules/yup-password/index.js","../node_modules/yup-phone/node_modules/google-libphonenumber/dist/libphonenumber.js","../node_modules/yup-phone/src/yup-phone.ts","../node_modules/nanoclone/src/index.js","../node_modules/yup/es/util/printValue.js","../node_modules/yup/es/locale.js","../node_modules/yup/es/util/isSchema.js","../node_modules/yup/es/Condition.js","../node_modules/yup/es/util/toArray.js","../node_modules/yup/es/ValidationError.js","../node_modules/yup/es/util/runTests.js","../node_modules/yup/es/Reference.js","../node_modules/yup/es/util/createValidation.js","../node_modules/yup/es/util/reach.js","../node_modules/yup/es/util/ReferenceSet.js","../node_modules/yup/es/schema.js","../node_modules/yup/es/mixed.js","../node_modules/yup/es/util/isAbsent.js","../node_modules/yup/es/boolean.js","../node_modules/yup/es/string.js","../node_modules/yup/es/number.js","../node_modules/yup/es/util/isodate.js","../node_modules/yup/es/date.js","../node_modules/yup/es/util/sortByKeyOrder.js","../node_modules/yup/es/object.js","../node_modules/yup/es/util/sortFields.js","../node_modules/yup/es/array.js","../node_modules/yup/es/Lazy.js","../node_modules/yup/es/setLocale.js","../node_modules/yup/es/index.js","../node_modules/classnames/index.js","../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../node_modules/@babel/runtime/helpers/esm/extends.js","../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","../node_modules/@babel/runtime/helpers/esm/objectSpread2.js","../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../node_modules/@babel/runtime/helpers/esm/typeof.js","../node_modules/tslib/tslib.es6.mjs","../webpack/bootstrap","../webpack/runtime/compat get default export","../webpack/runtime/create fake namespace object","../webpack/runtime/define property getters","../webpack/runtime/ensure chunk","../webpack/runtime/get javascript chunk filename","../webpack/runtime/get mini-css chunk filename","../webpack/runtime/global","../webpack/runtime/hasOwnProperty shorthand","../webpack/runtime/load script","../webpack/runtime/make namespace object","../webpack/runtime/node module decorator","../webpack/runtime/publicPath","../webpack/runtime/css loading","../webpack/runtime/jsonp chunk loading","../webpack/runtime/nonce","../node_modules/chart.js/dist/chunks/helpers.segment.js","../node_modules/chart.js/dist/chart.esm.js","_metronic/i18n/Metronici18n.tsx","../../packages/react-router/lib/context.ts","../../packages/react-router/lib/router.ts","../../packages/react-router/lib/hooks.tsx","../../packages/react-router/lib/components.tsx","../../packages/react-router-dom/index.tsx","_metronic/layout/core/_LayoutConfig.ts","_metronic/layout/core/_LayoutSetup.ts","_metronic/layout/core/_LayoutProvider.tsx","_metronic/layout/core/PageData.tsx","_metronic/layout/core/MetronicSplashScreen.tsx","app/components/layout/header/HeaderMenuItem.tsx","app/redux/companySlice.ts","app/redux/productSlice.ts","_metronic/layout/components/header/header-menus/MenuInner.tsx","_metronic/layout/components/header/Header.tsx","_metronic/layout/components/header/HeaderWrapper.tsx","_metronic/layout/components/scroll-top/ScrollTop.tsx","_metronic/layout/components/content/Content.tsx","_metronic/layout/components/footer/FooterWrapper.tsx","app/components/layout/sidebar/SidebarMenuItem.tsx","app/components/layout/sidebar/customer/SidebarCustomerMenu.tsx","app/components/layout/sidebar/SidebarName.tsx","app/redux/eInvoiceSlice.ts","app/redux/store.ts","../node_modules/universal-cookie/es6/utils.js","../node_modules/universal-cookie/es6/Cookies.js","../node_modules/universal-cookie/es6/index.js","../node_modules/react-cookie/es6/Cookies.js","../node_modules/react-cookie/es6/CookiesContext.js","../node_modules/react-cookie/es6/useCookies.js","../node_modules/react-cookie/es6/utils.js","app/components/layout/sidebar/SidebarLogoutButton.tsx","app/components/layout/sidebar/SidebarEmail.tsx","app/utils/CanIDoThat.ts","app/components/common/auth/AuthorizedComponent.tsx","app/components/layout/sidebar/admin/AdminSiderBarMenu.tsx","app/components/layout/sidebar/SidebarMenuMain.tsx","_metronic/layout/components/sidebar/sidebar-menu/SidebarMenu.tsx","app/components/layout/sidebar/SidebarLogo.tsx","_metronic/layout/components/sidebar/Sidebar.tsx","_metronic/partials/layout/header-menus/Languages.tsx","_metronic/assets/ts/layout/ThemeMode.ts","_metronic/partials/layout/theme-mode/ThemeModeProvider.tsx","app/pages/loading/LoadingPage.tsx","_metronic/layout/MasterLayout.tsx","app/pages/customer/turkey/parasut/ParasutPage.tsx","app/components/other/NotificationTest.tsx","../node_modules/dom-helpers/esm/scrollbarSize.js","../node_modules/dom-helpers/esm/activeElement.js","../node_modules/dom-helpers/esm/contains.js","../node_modules/@restart/ui/esm/ModalManager.js","../node_modules/@restart/ui/esm/DataKey.js","../node_modules/@restart/ui/esm/getScrollbarWidth.js","../node_modules/@restart/ui/esm/useWindow.js","../node_modules/@restart/ui/esm/useWaitForDOMRef.js","../node_modules/@restart/ui/esm/NoopTransition.js","../node_modules/@restart/ui/esm/ImperativeTransition.js","../node_modules/@restart/ui/esm/Modal.js","../node_modules/@restart/ui/esm/utils.js","../node_modules/dom-helpers/esm/querySelectorAll.js","../node_modules/react-bootstrap/esm/BootstrapModalManager.js","../node_modules/react-bootstrap/esm/Fade.js","../node_modules/react-bootstrap/esm/ModalBody.js","../node_modules/react-bootstrap/esm/ModalContext.js","../node_modules/react-bootstrap/esm/ModalDialog.js","../node_modules/react-bootstrap/esm/ModalFooter.js","../node_modules/react-bootstrap/esm/CloseButton.js","../node_modules/react-bootstrap/esm/AbstractModalHeader.js","../node_modules/react-bootstrap/esm/ModalHeader.js","../node_modules/react-bootstrap/esm/ModalTitle.js","../node_modules/react-bootstrap/esm/divWithClassName.js","../node_modules/react-bootstrap/esm/Modal.js","app/pages/customer/turkey/foriba/ForibaProductFormPopup.tsx","app/pages/customer/turkey/foriba/ForibaProduct.tsx","app/pages/customer/turkey/foriba/ForibaProducts.tsx","app/pages/customer/turkey/foriba/ForibaCustomerFormPopup.tsx","app/pages/customer/turkey/foriba/ForibaCustomer.tsx","app/pages/customer/turkey/foriba/ForibaCustomers.tsx","../node_modules/@babel/runtime/helpers/esm/createClass.js","../node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","../node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js","../node_modules/@babel/runtime/helpers/esm/createSuper.js","../node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js","../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","../node_modules/@babel/runtime/helpers/esm/iterableToArray.js","../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","../node_modules/@emotion/sheet/dist/emotion-sheet.browser.esm.js","../node_modules/stylis/src/Utility.js","../node_modules/stylis/src/Tokenizer.js","../node_modules/stylis/src/Enum.js","../node_modules/stylis/src/Serializer.js","../node_modules/stylis/src/Middleware.js","../node_modules/stylis/src/Parser.js","../node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js","../node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js","../node_modules/@emotion/memoize/dist/emotion-memoize.esm.js","../node_modules/@emotion/serialize/dist/emotion-serialize.browser.esm.js","../node_modules/@emotion/hash/dist/emotion-hash.esm.js","../node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.js","../node_modules/@emotion/react/dist/emotion-element-c39617d8.browser.esm.js","../node_modules/@emotion/react/dist/emotion-react.browser.esm.js","../node_modules/@babel/runtime/helpers/esm/slicedToArray.js","../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","../node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs","../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs","../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs","../node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.js","../node_modules/@babel/runtime/helpers/esm/taggedTemplateLiteral.js","../node_modules/memoize-one/dist/memoize-one.esm.js","../node_modules/@babel/runtime/helpers/esm/inherits.js","../node_modules/@babel/runtime/helpers/esm/classCallCheck.js","../node_modules/react-select/dist/useStateManager-7e1e8489.esm.js","../node_modules/react-select/dist/useAsync-ba7c6b77.esm.js","../node_modules/react-select/async/dist/react-select-async.esm.js","app/pages/customer/turkey/foriba/ForibaInvoiceLinePriceDetail.tsx","app/pages/customer/turkey/foriba/ForibaUtils.ts","app/pages/customer/turkey/foriba/ForibaInvoiceLinePrices.tsx","app/pages/customer/turkey/foriba/ForibaInvoicePrices.tsx","app/pages/customer/turkey/foriba/ForibaInvoice.tsx","app/pages/customer/turkey/foriba/ForibaParameters.tsx","app/pages/customer/turkey/foriba/ForibaInvoices.tsx","app/pages/customer/turkey/foriba/ForibaPage.tsx","app/pages/customer/PaymentResultPage.tsx","app/components/common/popup/BasePopup.tsx","app/components/form/button/NormalButton.tsx","app/components/form/button/CancelButton.tsx","app/components/common/popup/AreYouSurePopup.tsx","app/pages/document/DocumentsPage.tsx","app/components/other/LanguageSelector.tsx","app/components/common/messages/FormErrorMessage.tsx","app/components/form/button/SubmitButton.tsx","app/pages/customer/profile/ProfilePage.tsx","app/pages/wizard/models/WizardModels.ts","app/components/wizard/AsideItem.tsx","app/components/purchase/PaymentDetailRow.tsx","app/components/common/title/WarningMessage.tsx","app/components/purchase/CartDetails.tsx","app/pages/wizard/BaseWizardPage.tsx","app/components/form/radio/RadioButtonWrapper.tsx","app/components/form/radio/BigRadioButton.tsx","app/components/common/messages/FormSuccessMessage.tsx","app/components/common/messages/FormMessage.tsx","app/components/wizard/WizardStepButtons.tsx","app/components/form/radio/SmallRadioButton.tsx","app/pages/wizard/customWizards/turkey/steps/AdvisorCompanyAssignmentStep.tsx","app/pages/wizard/customWizards/turkey/steps/CompanyInfoStep.tsx","app/components/form/radio/MediumRadioButton.tsx","app/components/wizard/CompanyTypeRadioButton.tsx","app/components/common/title/SmallTitle.tsx","app/pages/wizard/customWizards/turkey/steps/CompanyStep.tsx","app/components/common/title/TinyTitle.tsx","app/pages/wizard/customWizards/turkey/steps/PersonalInfoStep.tsx","app/components/common/translate/DynamicValueTranslator.tsx","app/components/product/Product.tsx","app/components/product/ExtraProductsWizard.tsx","app/components/product/ExtraProductsTab.tsx","app/components/product/ExtraProducts.tsx","app/pages/wizard/customWizards/turkey/steps/ExtrasStep.tsx","app/pages/wizard/customWizards/turkey/TurkeyWizardPage.tsx","app/pages/wizard/WizardPage.tsx","app/pages/wizard/PreWizardPage.tsx","app/pages/customer/turkey/ExtrasPage.tsx","app/components/customer/finance/PaymentsTable.tsx","app/components/customer/finance/SuspensionForm.tsx","app/components/customer/finance/ActiveProducts.tsx","app/components/customer/finance/FinanceSummary.tsx","app/components/customer/finance/RegisteredCard.tsx","app/utils/cardUtilities.ts","app/utils/FormikErrorMessage.tsx","app/components/customer/finance/card/CardForm.tsx","app/components/customer/finance/card/CardRegisterWarningPopup.tsx","app/components/customer/finance/card/AddNewCard.tsx","app/components/customer/finance/card/AddNewCardItem.tsx","app/components/customer/finance/RegisteredCards.tsx","app/pages/customer/finance/FinancePage.tsx","app/components/purchase/PaymentContractPopup.tsx","app/components/purchase/Discount.tsx","app/components/customer/finance/card/CardSelection.tsx","app/components/customer/finance/card/CardSelectionNew.tsx","app/pages/purchase/CartPaymentPage.tsx","app/components/customer/home/SubscriptionInfo.tsx","app/components/customer/home/TimelineEvent.tsx","app/components/customer/home/Timeline.tsx","app/pages/customer/home/HomeBanners.tsx","app/pages/customer/home/HomePage.tsx","app/pages/customer/SubscriptionCancelledPage.tsx","app/routing/CustomerRoutes.tsx","../node_modules/react-bootstrap/esm/ProgressBar.js","app/components/admin/company/CompanyStateProgressBar.tsx","../node_modules/react-bootstrap/esm/Button.js","../node_modules/xlsx/xlsx.mjs","app/components/admin/common/ExportCSV.tsx","app/components/other/TextWithClipBoard.tsx","app/components/admin/company/CompaniesTable.tsx","../node_modules/react-select/dist/react-select.esm.js","app/components/form/dropdown/DateRangeSelectorHorizontal.tsx","app/components/admin/company/CompanyFilter.tsx","app/pages/admin/Companies/AdminCompaniesPage.tsx","app/pages/admin/Invoice/PaymentInvoiceTable.tsx","app/pages/admin/Invoice/PaymentInvoiceFilter.tsx","app/pages/admin/Invoice/PaymentInvoiceSummaryCard.tsx","app/pages/admin/Invoice/PaymentInvoiceSummary.tsx","app/pages/admin/Invoice/PaymentInvoicesPage.tsx","app/pages/admin/PotentialCustomers/AdminPotentialsPage.tsx","app/pages/admin/dashboard/components/DashboardCardItem.tsx","app/pages/admin/dashboard/components/DashboardCard.tsx","app/pages/admin/dashboard/AdminDashboardPage.tsx","app/components/form/FormCheckboxInput.tsx","app/components/admin/product/AdminProductDetailsForm.tsx","app/components/admin/product/AdminProductPricesForm.tsx","app/pages/admin/Products/AdminProductDetailPopup.tsx","app/pages/admin/Products/AdminProductsPage.tsx","app/pages/admin/Settings/FaarPage.tsx","app/pages/admin/Settings/AdminSettingsPage.tsx","app/types/ReportEnum.ts","app/pages/admin/Report/components/AdminSaleReport.tsx","app/pages/admin/Report/components/CommissionReport.tsx","app/components/layout/sidebar/admin/components/ReportButton.tsx","app/pages/admin/Report/components/PaymentReportComponent.tsx","app/pages/admin/Report/AdminReportsPage.tsx","app/pages/admin/References/AdminReferenceDetailPage.tsx","app/pages/admin/References/AdminReferencesPage.tsx","app/components/admin/company/CompanyStatusComponent.tsx","app/components/admin/company/CompanyStatusHeader.tsx","app/components/form/PhoneNumberInput.tsx","app/components/admin/company/CompanyDetailFormInputLabel.tsx","app/components/admin/company/CompanyDetailFormDataLabel.tsx","app/components/admin/company/CompanySetSuspensionStatus.tsx","app/components/admin/company/CompanyDetailForm.tsx","app/components/admin/company/payment/AdminPurchasePriceUpdate.tsx","app/components/admin/company/payment/AdminPaymentPriceUpdate.tsx","app/components/admin/company/payment/AdminCompanyPurchases.tsx","app/pages/admin/Companies/AdminCompanyDetailPage.tsx","app/pages/admin/Discount/AdminDiscountDetailPopup.tsx","app/pages/admin/Discount/AdminDiscountPage.tsx","app/routing/AdminRoutes.tsx","app/routing/PrivateRoutes.tsx","app/components/errors/Error500.tsx","app/components/errors/Error404.tsx","app/pages/errors/ErrorsLayout.tsx","app/pages/errors/ErrorsPage.tsx","../node_modules/@formatjs/intl/lib/src/message.js","../node_modules/@formatjs/intl/lib/src/number.js","../node_modules/@formatjs/intl/lib/src/relativeTime.js","../node_modules/@formatjs/intl/lib/src/dateTime.js","../node_modules/@formatjs/intl/lib/src/plural.js","../node_modules/@formatjs/intl/lib/src/list.js","../node_modules/@formatjs/intl/lib/src/displayName.js","../node_modules/@formatjs/intl/lib/src/create-intl.js","../node_modules/react-intl/lib/src/components/provider.js","_metronic/i18n/i18nProvider.tsx","../node_modules/@popperjs/core/lib/popper-lite.js","../node_modules/bootstrap/js/src/util/index.js","../node_modules/bootstrap/js/src/dom/event-handler.js","../node_modules/bootstrap/js/src/dom/data.js","../node_modules/bootstrap/js/src/dom/manipulator.js","../node_modules/bootstrap/js/src/util/config.js","../node_modules/bootstrap/js/src/base-component.js","../node_modules/bootstrap/js/src/util/component-functions.js","../node_modules/bootstrap/js/src/alert.js","../node_modules/bootstrap/js/src/button.js","../node_modules/bootstrap/js/src/dom/selector-engine.js","../node_modules/bootstrap/js/src/util/swipe.js","../node_modules/bootstrap/js/src/carousel.js","../node_modules/bootstrap/js/src/collapse.js","../node_modules/bootstrap/js/src/dropdown.js","../node_modules/bootstrap/js/src/util/scrollbar.js","../node_modules/bootstrap/js/src/util/backdrop.js","../node_modules/bootstrap/js/src/util/focustrap.js","../node_modules/bootstrap/js/src/modal.js","../node_modules/bootstrap/js/src/offcanvas.js","../node_modules/bootstrap/js/src/util/sanitizer.js","../node_modules/bootstrap/js/src/util/template-factory.js","../node_modules/bootstrap/js/src/tooltip.js","../node_modules/bootstrap/js/src/popover.js","../node_modules/bootstrap/js/src/scrollspy.js","../node_modules/bootstrap/js/src/tab.js","../node_modules/bootstrap/js/src/toast.js","_metronic/layout/MasterInit.tsx","app/App.tsx","app/components/other/CountdownTimer.tsx","app/pages/auth/subPages/Registration.tsx","app/pages/auth/subPages/ForgotPassword.tsx","app/pages/auth/subPages/Login.tsx","app/pages/auth/AuthLayout.tsx","app/pages/auth/subPages/SetNewPassword.tsx","app/pages/auth/subPages/AdvisorInviteRegister.tsx","app/pages/auth/AuthPage.tsx","app/routing/AppRoutes.tsx","../node_modules/react-cookie/es6/CookiesProvider.js","../node_modules/react-toastify/node_modules/clsx/dist/clsx.m.js","../node_modules/@sentry/utils/src/version.ts","../node_modules/@sentry/utils/src/worldwide.ts","../node_modules/@sentry/core/src/constants.ts","../node_modules/@sentry/core/src/carrier.ts","../node_modules/@sentry/utils/src/is.ts","../node_modules/@sentry/utils/src/browser.ts","../node_modules/@sentry/utils/src/debug-build.ts","../node_modules/@sentry/utils/src/logger.ts","../node_modules/@sentry/utils/src/string.ts","../node_modules/@sentry/utils/src/object.ts","../node_modules/@sentry/utils/src/misc.ts","../node_modules/@sentry/utils/src/propagationContext.ts","../node_modules/@sentry/utils/src/time.ts","../node_modules/@sentry/core/src/session.ts","../node_modules/@sentry/core/src/utils/spanOnScope.ts","../node_modules/@sentry/core/src/scope.ts","../node_modules/@sentry/core/src/asyncContext/stackStrategy.ts","../node_modules/@sentry/core/src/defaultScopes.ts","../node_modules/@sentry/core/src/asyncContext/index.ts","../node_modules/@sentry/core/src/currentScopes.ts","../node_modules/@sentry/utils/src/stacktrace.ts","../node_modules/@sentry/utils/src/normalize.ts","../node_modules/@sentry/utils/src/memo.ts","../node_modules/@sentry/utils/src/syncpromise.ts","../node_modules/@sentry/core/src/debug-build.ts","../node_modules/@sentry/core/src/eventProcessors.ts","../node_modules/@sentry/utils/src/baggage.ts","../node_modules/@sentry/core/src/semanticAttributes.ts","../node_modules/@sentry/utils/src/tracing.ts","../node_modules/@sentry/core/src/metrics/metric-summary.ts","../node_modules/@sentry/core/src/tracing/spanstatus.ts","../node_modules/@sentry/core/src/utils/spanUtils.ts","../node_modules/@sentry/core/src/tracing/dynamicSamplingContext.ts","../node_modules/@sentry/core/src/utils/applyScopeDataToEvent.ts","../node_modules/@sentry/core/src/utils/prepareEvent.ts","../node_modules/@sentry/core/src/exports.ts","../node_modules/@sentry/core/src/integration.ts","../node_modules/@sentry/core/src/integrations/inboundfilters.ts","../node_modules/@sentry/core/src/integrations/functiontostring.ts","../node_modules/@sentry/core/src/integrations/dedupe.ts","../node_modules/@sentry/core/src/sdk.ts","../node_modules/@sentry/utils/src/supports.ts","../node_modules/@sentry/utils/src/instrument/handlers.ts","../node_modules/@sentry/utils/src/vendor/supportsHistory.ts","../node_modules/@sentry-internal/browser-utils/src/types.ts","../node_modules/@sentry-internal/browser-utils/src/instrument/history.ts","../node_modules/@sentry/utils/src/dsn.ts","../node_modules/@sentry/utils/src/envelope.ts","../node_modules/@sentry/utils/src/error.ts","../node_modules/@sentry/core/src/api.ts","../node_modules/@sentry/core/src/utils/parseSampleRate.ts","../node_modules/@sentry/core/src/baseclient.ts","../node_modules/@sentry/core/src/envelope.ts","../node_modules/@sentry/utils/src/clientreport.ts","../node_modules/@sentry/core/src/utils/sdkMetadata.ts","../node_modules/@sentry/browser/src/debug-build.ts","../node_modules/@sentry/browser/src/eventbuilder.ts","../node_modules/@sentry/browser/src/helpers.ts","../node_modules/@sentry/browser/src/client.ts","../node_modules/@sentry/utils/src/env.ts","../node_modules/@sentry/browser/src/userfeedback.ts","../node_modules/@sentry-internal/browser-utils/src/instrument/dom.ts","../node_modules/@sentry-internal/browser-utils/src/instrument/xhr.ts","../node_modules/@sentry/core/src/breadcrumbs.ts","../node_modules/@sentry/utils/src/instrument/console.ts","../node_modules/@sentry/utils/src/instrument/fetch.ts","../node_modules/@sentry/utils/src/severity.ts","../node_modules/@sentry/utils/src/url.ts","../node_modules/@sentry/browser/src/integrations/breadcrumbs.ts","../node_modules/@sentry/browser/src/integrations/browserapierrors.ts","../node_modules/@sentry/utils/src/instrument/globalError.ts","../node_modules/@sentry/utils/src/instrument/globalUnhandledRejection.ts","../node_modules/@sentry/browser/src/integrations/globalhandlers.ts","../node_modules/@sentry/browser/src/integrations/httpcontext.ts","../node_modules/@sentry/utils/src/aggregate-errors.ts","../node_modules/@sentry/browser/src/integrations/linkederrors.ts","../node_modules/@sentry/browser/src/stack-parsers.ts","../node_modules/@sentry-internal/browser-utils/src/debug-build.ts","../node_modules/@sentry-internal/browser-utils/src/getNativeImplementation.ts","../node_modules/@sentry/utils/src/promisebuffer.ts","../node_modules/@sentry/utils/src/ratelimit.ts","../node_modules/@sentry/core/src/transports/base.ts","../node_modules/@sentry/browser/src/transports/fetch.ts","../node_modules/@sentry/browser/src/sdk.ts","../node_modules/@sentry/core/src/utils/hasTracingEnabled.ts","../node_modules/@sentry/core/src/tracing/sentryNonRecordingSpan.ts","../node_modules/@sentry/core/src/tracing/measurement.ts","../node_modules/@sentry/core/src/tracing/utils.ts","../node_modules/@sentry/core/src/tracing/sentrySpan.ts","../node_modules/@sentry/core/src/tracing/logSpans.ts","../node_modules/@sentry/core/src/tracing/trace.ts","../node_modules/@sentry/core/src/tracing/sampling.ts","../node_modules/@sentry/utils/src/buildPolyfills/_optionalChain.ts","../node_modules/@sentry-internal/browser-utils/src/metrics/web-vitals/lib/bindReporter.ts","../node_modules/@sentry-internal/browser-utils/src/metrics/web-vitals/lib/getNavigationEntry.ts","../node_modules/@sentry-internal/browser-utils/src/metrics/web-vitals/lib/getActivationStart.ts","../node_modules/@sentry-internal/browser-utils/src/metrics/web-vitals/lib/initMetric.ts","../node_modules/@sentry-internal/browser-utils/src/metrics/web-vitals/lib/generateUniqueID.ts","../node_modules/@sentry-internal/browser-utils/src/metrics/web-vitals/lib/observe.ts","../node_modules/@sentry-internal/browser-utils/src/metrics/web-vitals/lib/onHidden.ts","../node_modules/@sentry-internal/browser-utils/src/metrics/web-vitals/lib/runOnce.ts","../node_modules/@sentry-internal/browser-utils/src/metrics/web-vitals/lib/getVisibilityWatcher.ts","../node_modules/@sentry-internal/browser-utils/src/metrics/web-vitals/lib/whenActivated.ts","../node_modules/@sentry-internal/browser-utils/src/metrics/web-vitals/onFCP.ts","../node_modules/@sentry-internal/browser-utils/src/metrics/web-vitals/getCLS.ts","../node_modules/@sentry-internal/browser-utils/src/metrics/web-vitals/getFID.ts","../node_modules/@sentry-internal/browser-utils/src/metrics/web-vitals/lib/polyfills/interactionCountPolyfill.ts","../node_modules/@sentry-internal/browser-utils/src/metrics/web-vitals/getINP.ts","../node_modules/@sentry-internal/browser-utils/src/metrics/web-vitals/getLCP.ts","../node_modules/@sentry-internal/browser-utils/src/metrics/web-vitals/onTTFB.ts","../node_modules/@sentry-internal/browser-utils/src/metrics/instrument.ts","../node_modules/@sentry-internal/browser-utils/src/metrics/utils.ts","../node_modules/@sentry-internal/browser-utils/src/metrics/cls.ts","../node_modules/@sentry-internal/browser-utils/src/metrics/browserMetrics.ts","../node_modules/@sentry-internal/browser-utils/src/metrics/inp.ts","../node_modules/@sentry/core/src/tracing/idleSpan.ts","../node_modules/@sentry/core/src/tracing/errors.ts","../node_modules/@sentry/core/src/fetch.ts","../node_modules/@sentry/browser/src/tracing/request.ts","../node_modules/@sentry/browser/src/tracing/browserTracingIntegration.ts","../node_modules/@sentry/browser/src/tracing/backgroundtab.ts","../node_modules/@sentry/browser/src/profiling/utils.ts","../node_modules/@sentry/browser/src/profiling/startProfileForSpan.ts","../node_modules/@sentry/browser/src/profiling/integration.ts","../node_modules/@sentry/core/src/utils/isSentryRequestUrl.ts","../node_modules/@sentry/utils/src/node.ts","../node_modules/@sentry/utils/src/isBrowser.ts","../node_modules/@sentry-internal/replay/src/constants.ts","../node_modules/node_modules/@sentry-internal/rrweb/es/rrweb/packages/rrweb-snapshot/es/rrweb-snapshot.js","../node_modules/node_modules/@sentry-internal/rrweb/es/rrweb/packages/rrweb/src/utils.js","../node_modules/@sentry/utils/src/buildPolyfills/_nullishCoalesce.ts","../node_modules/node_modules/@sentry-internal/rrweb/es/rrweb/packages/types/dist/rrweb-types.js","../node_modules/node_modules/@sentry-internal/rrweb/es/rrweb/packages/rrweb/src/record/mutation.js","../node_modules/node_modules/@sentry-internal/rrweb/es/rrweb/packages/rrweb/src/record/error-handler.js","../node_modules/node_modules/@sentry-internal/rrweb/es/rrweb/packages/rrweb/src/record/observer.js","../node_modules/node_modules/@sentry-internal/rrweb/es/rrweb/packages/rrweb/src/record/cross-origin-iframe-mirror.js","../node_modules/node_modules/@sentry-internal/rrweb/es/rrweb/packages/rrweb/src/record/iframe-manager.js","../node_modules/node_modules/@sentry-internal/rrweb/es/rrweb/packages/rrweb/src/record/shadow-dom-manager.js","../node_modules/node_modules/@sentry-internal/rrweb/es/rrweb/packages/rrweb/src/record/observers/canvas/canvas-manager.js","../node_modules/node_modules/@sentry-internal/rrweb/es/rrweb/packages/rrweb/src/record/stylesheet-manager.js","../node_modules/node_modules/@sentry-internal/rrweb/es/rrweb/packages/rrweb/src/record/processed-node-manager.js","../node_modules/node_modules/@sentry-internal/rrweb/es/rrweb/packages/rrweb/src/record/index.js","../node_modules/@sentry-internal/replay/src/debug-build.ts","../node_modules/@sentry-internal/replay/src/util/logger.ts","../node_modules/@sentry-internal/replay/src/types/rrweb.ts","../node_modules/@sentry-internal/replay/src/util/timestamp.ts","../node_modules/@sentry-internal/replay/src/coreHandlers/util/addBreadcrumbEvent.ts","../node_modules/@sentry-internal/replay/src/coreHandlers/util/domUtils.ts","../node_modules/@sentry-internal/replay/src/coreHandlers/util/onWindowOpen.ts","../node_modules/@sentry-internal/replay/src/coreHandlers/handleClick.ts","../node_modules/@sentry-internal/replay/src/util/createBreadcrumb.ts","../node_modules/node_modules/@sentry-internal/rrweb-snapshot/es/rrweb-snapshot.js","../node_modules/@sentry-internal/replay/src/coreHandlers/util/getAttributesToRecord.ts","../node_modules/@sentry-internal/replay/src/coreHandlers/handleDom.ts","../node_modules/@sentry-internal/replay/src/coreHandlers/handleKeyboardEvent.ts","../node_modules/@sentry-internal/replay/src/util/createPerformanceEntries.ts","../node_modules/@sentry-internal/replay-worker/build/esm/worker.ts","../node_modules/@sentry-internal/replay/src/eventBuffer/error.ts","../node_modules/@sentry-internal/replay/src/eventBuffer/EventBufferArray.ts","../node_modules/@sentry-internal/replay/src/eventBuffer/WorkerHandler.ts","../node_modules/@sentry-internal/replay/src/eventBuffer/EventBufferCompressionWorker.ts","../node_modules/@sentry-internal/replay/src/eventBuffer/EventBufferProxy.ts","../node_modules/@sentry-internal/replay/src/eventBuffer/index.ts","../node_modules/@sentry-internal/replay-worker/build/esm/index.js","../node_modules/@sentry-internal/replay/src/util/hasSessionStorage.ts","../node_modules/@sentry-internal/replay/src/session/clearSession.ts","../node_modules/@sentry-internal/replay/src/util/isSampled.ts","../node_modules/@sentry-internal/replay/src/session/Session.ts","../node_modules/@sentry-internal/replay/src/session/saveSession.ts","../node_modules/@sentry-internal/replay/src/session/createSession.ts","../node_modules/@sentry-internal/replay/src/util/isExpired.ts","../node_modules/@sentry-internal/replay/src/util/isSessionExpired.ts","../node_modules/@sentry-internal/replay/src/session/shouldRefreshSession.ts","../node_modules/@sentry-internal/replay/src/session/loadOrCreateSession.ts","../node_modules/@sentry-internal/replay/src/session/fetchSession.ts","../node_modules/@sentry-internal/replay/src/util/addEvent.ts","../node_modules/@sentry-internal/replay/src/util/eventUtils.ts","../node_modules/@sentry-internal/replay/src/coreHandlers/handleAfterSendEvent.ts","../node_modules/@sentry-internal/replay/src/coreHandlers/handleBeforeSendEvent.ts","../node_modules/@sentry-internal/replay/src/coreHandlers/handleBreadcrumbs.ts","../node_modules/@sentry-internal/replay/src/coreHandlers/handleGlobalEvent.ts","../node_modules/@sentry-internal/replay/src/coreHandlers/util/addFeedbackBreadcrumb.ts","../node_modules/@sentry-internal/replay/src/util/isRrwebError.ts","../node_modules/@sentry-internal/replay/src/coreHandlers/util/shouldSampleForBufferEvent.ts","../node_modules/@sentry-internal/replay/src/util/createPerformanceSpans.ts","../node_modules/@sentry-internal/replay/src/coreHandlers/handleHistory.ts","../node_modules/@sentry-internal/replay/src/coreHandlers/util/addNetworkBreadcrumb.ts","../node_modules/@sentry-internal/replay/src/util/shouldFilterRequest.ts","../node_modules/@sentry-internal/replay/src/coreHandlers/util/networkUtils.ts","../node_modules/@sentry-internal/replay/src/coreHandlers/util/fetchUtils.ts","../node_modules/@sentry-internal/replay/src/coreHandlers/util/xhrUtils.ts","../node_modules/@sentry-internal/replay/src/coreHandlers/handleNetworkBreadcrumbs.ts","../node_modules/@sentry-internal/replay/src/util/addGlobalListeners.ts","../node_modules/@sentry-internal/replay/src/util/addMemoryEntry.ts","../node_modules/@sentry-internal/replay/src/util/handleRecordingEmit.ts","../node_modules/@sentry-internal/replay/src/util/sendReplayRequest.ts","../node_modules/@sentry-internal/replay/src/util/prepareRecordingData.ts","../node_modules/@sentry-internal/replay/src/util/prepareReplayEvent.ts","../node_modules/@sentry-internal/replay/src/util/createReplayEnvelope.ts","../node_modules/@sentry-internal/replay/src/util/sendReplay.ts","../node_modules/@sentry-internal/replay/src/util/throttle.ts","../node_modules/@sentry-internal/replay/src/replay.ts","../node_modules/@sentry-internal/replay/src/util/debounce.ts","../node_modules/@sentry-internal/replay/src/coreHandlers/performanceObserver.ts","../node_modules/@sentry-internal/replay/src/util/getPrivacyOptions.ts","../node_modules/@sentry-internal/replay/src/integration.ts","../node_modules/@sentry-internal/replay/src/util/maskAttribute.ts","index.tsx","../node_modules/@sentry/react/src/sdk.ts"],"sourceRoot":"","sourcesContent":["export class ElementStyleUtil {\n public static set(element: HTMLElement, property: string, value?: any, important?: boolean) {\n if (important) {\n element.style.setProperty(property, value, 'important')\n } else {\n element.style.setProperty(property, value)\n }\n }\n\n public static get(element: HTMLElement, attributeName: string) {\n return element.style.getPropertyValue(attributeName)\n }\n\n public static remove(element: HTMLElement, attibuteName: string) {\n element.style.removeProperty(attibuteName)\n }\n}\n","export class DataUtil {\n static store: Map> = new Map()\n\n public static set(instance: HTMLElement | undefined, key: string, data: unknown): void {\n if (!instance) {\n return\n }\n\n const instanceData = DataUtil.store.get(instance)\n if (!instanceData) {\n const newMap = new Map().set(key, data)\n DataUtil.store.set(instance, newMap)\n return\n }\n\n instanceData.set(key, data)\n }\n\n public static get(instance: HTMLElement, key: string): unknown | undefined {\n const instanceData = DataUtil.store.get(instance)\n if (!instanceData) {\n return\n }\n\n return instanceData.get(key)\n }\n\n public static remove(instance: HTMLElement, key: string): void {\n const instanceData = DataUtil.store.get(instance)\n if (!instanceData) {\n return\n }\n\n instanceData.delete(key)\n }\n\n public static removeOne(instance: HTMLElement, key: string, eventId: string) {\n const instanceData = DataUtil.store.get(instance)\n if (!instanceData) {\n return\n }\n\n const eventsIds = instanceData.get(key)\n if (!eventsIds) {\n return\n }\n\n const updateEventsIds = (eventsIds as string[]).filter((f) => f !== eventId)\n DataUtil.set(instance, key, updateEventsIds)\n }\n\n public static has(instance: HTMLElement, key: string): boolean {\n const instanceData = DataUtil.store.get(instance)\n if (instanceData) {\n return instanceData.has(key)\n }\n\n return false\n }\n\n public static getAllInstancesByKey(key: string) {\n const result: any[] = []\n DataUtil.store.forEach((val) => {\n val.forEach((v, k) => {\n if (k === key) {\n result.push(v)\n }\n })\n })\n return result\n }\n}\n","function getObjectPropertyValueByKey(obj: any, key: string): any | undefined {\n const map = new Map(Object.entries(obj))\n if (obj.hasOwnProperty(key) && map) {\n return map.get(key)\n }\n}\n\n/**\n * Generates unique ID for give prefix.\n * @param {string} prefix Prefix for generated ID\n * @returns {boolean}\n */\nfunction getUniqueIdWithPrefix(prefix: string | undefined): string {\n const result = Math.floor(Math.random() * new Date().getTime()).toString()\n if (!prefix) {\n return result\n }\n\n return `${prefix}${result}`\n}\n\n/* eslint-disable no-useless-escape */\nfunction stringSnakeToCamel(str: string): string {\n return str.replace(/(\\-\\w)/g, function (m) {\n return m[1].toUpperCase()\n })\n}\n\nfunction toJSON(value: string | JSON): JSON | undefined {\n if (typeof value !== 'string') {\n return value\n }\n\n if (!value) {\n return undefined\n }\n\n // (\"'\" => \"\\\"\");\n const result = value\n .toString()\n .split('')\n .map((el) => (el !== \"'\" ? el : '\"'))\n .join('')\n var jsonStr = result.replace(/(\\w+:)|(\\w+ :)/g, function (matched) {\n return '\"' + matched.substring(0, matched.length - 1) + '\":'\n })\n try {\n return JSON.parse(jsonStr)\n } catch {\n return undefined\n }\n}\n\nexport {getObjectPropertyValueByKey, getUniqueIdWithPrefix, stringSnakeToCamel, toJSON}\n","import {getUniqueIdWithPrefix} from './_TypesHelpers'\n\nexport class DOMEventHandlerUtil {\n public static store = new Map()\n\n public static on(\n element: HTMLElement,\n selector: string,\n eventName: string,\n callBack: any\n ): string {\n const eventId = getUniqueIdWithPrefix('DOMEvent')\n DOMEventHandlerUtil.store.set(eventId, (e: Event) => {\n const targets = element.querySelectorAll(selector)\n let target: HTMLElement | null = e.target as HTMLElement\n while (target && target !== element) {\n for (let i = 0; i < targets.length; i++) {\n if (target === targets[i]) {\n callBack.call(target, e)\n }\n }\n\n if (target.parentElement) {\n target = target.parentElement\n } else {\n target = null\n }\n }\n })\n element.addEventListener(eventName, DOMEventHandlerUtil.store.get(eventId))\n return eventId\n }\n\n public static off(element: HTMLElement, eventName: string, eventId: string): void {\n const funcFromStore = DOMEventHandlerUtil.store.get(eventId)\n if (!funcFromStore) {\n return\n }\n\n element.removeEventListener(eventName, funcFromStore)\n DOMEventHandlerUtil.store.delete(eventId)\n }\n\n public static one(element: HTMLElement, eventName: string, callBack: Function): void {\n element.addEventListener(eventName, function calee(e) {\n // remove event\n if (e.target && e.target.removeEventListener) {\n e.target.removeEventListener(e.type, calee)\n }\n\n if (element && e && e.currentTarget) {\n // if (element && element.removeEventListener && e && e.currentTarget) {\n e.currentTarget.removeEventListener(e.type, calee)\n }\n\n // call hander\n return callBack(e)\n })\n }\n}\n","import {DOMEventHandlerUtil} from './_DOMEventHandlerUtil'\nimport {ElementStyleUtil} from './_ElementStyleUtil'\nimport {getElementOffset} from './DomHelpers'\n\nexport class ElementAnimateUtil {\n public static animate(\n from: number,\n to: number,\n duration: number,\n update: Function,\n complete?: Function\n ) {\n /**\n * TinyAnimate.easings\n * Adapted from jQuery Easing\n */\n const easings = {\n linear: function (t: number, b: number, c: number, d: number) {\n return (c * t) / d + b\n },\n }\n\n // Create mock done() function if necessary\n if (!complete) {\n complete = function () {}\n }\n\n // Animation loop\n // let canceled = false;\n const change = to - from\n\n function loop(timestamp: number) {\n var time = (timestamp || +new Date()) - start\n\n if (time >= 0) {\n update(easings.linear(time, from, change, duration))\n }\n if (time >= 0 && time >= duration) {\n update(to)\n if (complete) {\n complete()\n }\n } else {\n window.requestAnimationFrame(loop)\n }\n }\n\n update(from)\n\n // Start animation loop\n const start =\n window.performance && window.performance.now ? window.performance.now() : +new Date()\n\n window.requestAnimationFrame(loop)\n }\n\n public static animateClass(\n element: HTMLElement,\n animationName: string,\n callBack?: Function\n ): void {\n const animateClasses = animationName.split(' ')\n animateClasses.forEach((cssClass) => element.classList.add(cssClass))\n DOMEventHandlerUtil.one(element, 'animationend', function () {\n animateClasses.forEach((cssClass) => element.classList.remove(cssClass))\n })\n\n if (callBack) {\n DOMEventHandlerUtil.one(element, 'animationend', callBack)\n }\n }\n\n public static transitionEnd(element: HTMLElement, callBack: Function) {\n DOMEventHandlerUtil.one(element, 'transitionend', callBack)\n }\n\n public static animationEnd(element: HTMLElement, callBack: Function) {\n DOMEventHandlerUtil.one(element, 'animationend', callBack)\n }\n\n public static animationDelay(element: HTMLElement, value: string) {\n ElementStyleUtil.set(element, 'animation-delay', value)\n }\n\n public static animationDuration(element: HTMLElement, value: string) {\n ElementStyleUtil.set(element, 'animation-duration', value)\n }\n\n public static scrollTo(element: HTMLElement | null, offset: number, duration: number = 500) {\n let targetPos = element ? getElementOffset(element).top : 0\n let scrollPos =\n window.pageYOffset || document.documentElement.scrollTop || document.body.scrollTop || 0\n\n if (offset) {\n scrollPos += offset\n targetPos = targetPos - offset\n }\n\n const from = scrollPos\n const to = targetPos\n\n ElementAnimateUtil.animate(from, to, duration, function (value: number) {\n document.documentElement.scrollTop = value\n // document.body.parentNode.scrollTop = value;\n document.body.scrollTop = value\n }) //, easing, done\n }\n public static scrollTop(offset: number, duration: number) {\n ElementAnimateUtil.scrollTo(null, offset, duration)\n }\n}\n","import {OffsetModel} from './models/OffsetModel'\nimport {ViewPortModel} from './models/ViewPortModel'\nimport {ElementStyleUtil} from './_ElementStyleUtil'\nimport {DataUtil} from './_DataUtil'\nimport {ElementAnimateUtil} from './ElementAnimateUtil'\nimport {getObjectPropertyValueByKey, toJSON} from './_TypesHelpers'\n\nfunction getCSS(el: HTMLElement, styleProp: string) {\n const defaultView = (el.ownerDocument || document).defaultView\n\n if (!defaultView) {\n return ''\n }\n\n // sanitize property name to css notation\n // (hyphen separated words eg. font-Size)\n styleProp = styleProp.replace(/([A-Z])/g, '-$1').toLowerCase()\n\n return defaultView.getComputedStyle(el, null).getPropertyValue(styleProp)\n}\n\nfunction getCSSVariableValue(variableName: string) {\n let hex = getComputedStyle(document.documentElement).getPropertyValue(variableName)\n if (hex && hex.length > 0) {\n hex = hex.trim()\n }\n\n return hex\n}\n\nfunction getElementActualCss(el: HTMLElement, prop: any, cache: boolean) {\n let css = ''\n\n if (!el.getAttribute('kt-hidden-' + prop) || cache === false) {\n let value\n\n // the element is hidden so:\n // making the el block so we can meassure its height but still be hidden\n css = el.style.cssText\n el.style.cssText = 'position: absolute; visibility: hidden; display: block;'\n\n if (prop === 'width') {\n value = el.offsetWidth\n } else if (prop === 'height') {\n value = el.offsetHeight\n }\n\n el.style.cssText = css\n\n // store it in cache\n if (value !== undefined) {\n el.setAttribute('kt-hidden-' + prop, value.toString())\n return parseFloat(value.toString())\n }\n return 0\n } else {\n // store it in cache\n const attributeValue = el.getAttribute('kt-hidden-' + prop)\n if (attributeValue || attributeValue === '0') {\n return parseFloat(attributeValue)\n }\n }\n}\n\nfunction getElementActualHeight(el: HTMLElement) {\n return getElementActualCss(el, 'height', false)\n}\n\nfunction getElementActualWidth(el: HTMLElement, cache?: boolean) {\n return getElementActualCss(el, 'width', false)\n}\n\nfunction getElementIndex(element: HTMLElement) {\n if (element.parentNode) {\n const c = element.parentNode.children\n for (let i = 0; i < c.length; i++) {\n if (c[i] === element) return i\n }\n }\n return -1\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/API/Element/matches\nfunction getElementMatches(element: HTMLElement, selector: string) {\n const p = Element.prototype\n const f = p.matches || p.webkitMatchesSelector\n\n if (element && element.tagName) {\n return f.call(element, selector)\n } else {\n return false\n }\n}\n\nfunction getElementOffset(el: HTMLElement): OffsetModel {\n // Return zeros for disconnected and hidden (display: none) elements (gh-2310)\n // Support: IE <=11 only\n // Running getBoundingClientRect on a\n // disconnected node in IE throws an error\n if (!el.getClientRects().length) {\n return {top: 0, left: 0}\n }\n\n // Get document-relative position by adding viewport scroll to viewport-relative gBCR\n const rect = el.getBoundingClientRect()\n const win = el.ownerDocument.defaultView\n if (win) {\n return {\n top: rect.top + win.pageYOffset,\n left: rect.left + win.pageXOffset,\n }\n }\n\n return rect\n}\n\nfunction getElementParents(element: Element, selector: string) {\n // Element.matches() polyfill\n if (!Element.prototype.matches) {\n Element.prototype.matches = function (s) {\n const matches = (document || this.ownerDocument).querySelectorAll(s)\n let i = matches.length\n while (--i >= 0 && matches.item(i) !== this) {}\n return i > -1\n }\n }\n\n // Set up a parent array\n const parents: Array = []\n\n let el: Element | null = element\n\n // Push each parent element to the array\n for (; el && el !== document.body; el = el.parentElement) {\n if (selector) {\n if (el.matches(selector)) {\n parents.push(el)\n }\n continue\n }\n parents.push(el)\n }\n\n // Return our parent array\n return parents\n}\n\nfunction getHighestZindex(el: HTMLElement) {\n let bufferNode: Node | null = el as Node\n let buffer = el\n while (bufferNode && bufferNode !== document) {\n // Ignore z-index if position is set to a value where z-index is ignored by the browser\n // This makes behavior of this function consistent across browsers\n // WebKit always returns auto if the element is positioned\n const position = buffer.style.getPropertyValue('position')\n if (position === 'absolute' || position === 'relative' || position === 'fixed') {\n // IE returns 0 when zIndex is not specified\n // other browsers return a string\n // we ignore the case of nested elements with an explicit value of 0\n //
\n const value = parseInt(buffer.style.getPropertyValue('z-index'))\n if (!isNaN(value) && value !== 0) {\n return value\n }\n }\n\n bufferNode = bufferNode.parentNode\n buffer = bufferNode as HTMLElement\n }\n return null\n}\n\nfunction getScrollTop(): number {\n return (document.scrollingElement || document.documentElement).scrollTop\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth\nfunction getViewPort(): ViewPortModel {\n return {\n width: window.innerWidth,\n height: window.innerHeight,\n }\n}\n\nfunction insertAfterElement(el: HTMLElement, referenceNode: HTMLElement) {\n return referenceNode.parentNode?.insertBefore(el, referenceNode.nextSibling)\n}\n\nfunction isElementHasClasses(element: HTMLElement, classesStr: string): boolean {\n const classes = classesStr.split(' ')\n for (let i = 0; i < classes.length; i++) {\n if (!element.classList.contains(classes[i])) {\n return false\n }\n }\n\n return true\n}\n\nfunction isVisibleElement(element: HTMLElement): boolean {\n return !(element.offsetWidth === 0 && element.offsetHeight === 0)\n}\n\n// Throttle function: Input as function which needs to be throttled and delay is the time interval in milliseconds\nfunction throttle(timer: number | undefined, func: Function, delay?: number) {\n // If setTimeout is already scheduled, no need to do anything\n if (timer) {\n return\n }\n\n // Schedule a setTimeout after delay seconds\n timer = window.setTimeout(function () {\n func()\n\n // Once setTimeout function execution is finished, timerId = undefined so that in
\n // the next scroll event function execution can be scheduled by the setTimeout\n timer = undefined\n }, delay)\n}\n\nfunction getElementChildren(element: HTMLElement, selector: string): Array | null {\n if (!element || !element.childNodes) {\n return null\n }\n\n const result: Array = []\n for (let i = 0; i < element.childNodes.length; i++) {\n const child = element.childNodes[i]\n // child.nodeType == 1 => Element, Text, Comment, ProcessingInstruction, CDATASection, EntityReference\n if (child.nodeType === 1 && getElementMatches(child as HTMLElement, selector)) {\n result.push(child as HTMLElement)\n }\n }\n\n return result\n}\n\nfunction getElementChild(element: HTMLElement, selector: string): HTMLElement | null {\n const children = getElementChildren(element, selector)\n return children ? children[0] : null\n}\n\nfunction isMobileDevice(): boolean {\n let test = getViewPort().width < +getBreakpoint('lg') ? true : false\n\n if (test === false) {\n // For use within normal web clients\n test = navigator.userAgent.match(/iPad/i) != null\n }\n\n return test\n}\n\nfunction slide(el: HTMLElement, dir: string, speed: number, callback: any) {\n if (\n !el ||\n (dir === 'up' && isVisibleElement(el) === false) ||\n (dir === 'down' && isVisibleElement(el) === true)\n ) {\n return\n }\n\n speed = speed ? speed : 600\n let calcHeight = getElementActualHeight(el)\n let calcPaddingTop: number = 0\n let calcPaddingBottom: number = 0\n\n if (ElementStyleUtil.get(el, 'padding-top') && DataUtil.get(el, 'slide-padding-top') !== true) {\n DataUtil.set(el, 'slide-padding-top', ElementStyleUtil.get(el, 'padding-top'))\n }\n\n if (\n ElementStyleUtil.get(el, 'padding-bottom') &&\n DataUtil.has(el, 'slide-padding-bottom') !== true\n ) {\n DataUtil.set(el, 'slide-padding-bottom', ElementStyleUtil.get(el, 'padding-bottom'))\n }\n\n if (DataUtil.has(el, 'slide-padding-top')) {\n const data = DataUtil.get(el, 'slide-padding-top') as string\n calcPaddingTop = parseInt(data as string)\n }\n\n if (DataUtil.has(el, 'slide-padding-bottom')) {\n const data = DataUtil.get(el, 'slide-padding-bottom') as string\n calcPaddingBottom = parseInt(data)\n }\n\n if (dir === 'up') {\n // up\n el.style.cssText = 'display: block; overflow: hidden;'\n\n if (calcPaddingTop) {\n ElementAnimateUtil.animate(0, calcPaddingTop, speed, function (value: number) {\n el.style.paddingTop = calcPaddingTop - value + 'px'\n })\n }\n\n if (calcPaddingBottom) {\n ElementAnimateUtil.animate(0, calcPaddingBottom, speed, function (value: number) {\n el.style.paddingBottom = calcPaddingBottom - value + 'px'\n })\n }\n\n ElementAnimateUtil.animate(\n 0,\n calcHeight || 0,\n speed,\n function (value: number) {\n el.style.height = (calcHeight || 0) - value + 'px'\n },\n function () {\n el.style.height = ''\n el.style.display = 'none'\n\n if (typeof callback === 'function') {\n callback()\n }\n }\n )\n } else if (dir === 'down') {\n // down\n el.style.cssText = 'display: block; overflow: hidden;'\n\n if (calcPaddingTop) {\n ElementAnimateUtil.animate(\n 0,\n calcPaddingTop,\n speed,\n function (value: number) {\n //\n el.style.paddingTop = value + 'px'\n },\n function () {\n el.style.paddingTop = ''\n }\n )\n }\n\n if (calcPaddingBottom) {\n ElementAnimateUtil.animate(\n 0,\n calcPaddingBottom,\n speed,\n function (value: number) {\n el.style.paddingBottom = value + 'px'\n },\n function () {\n el.style.paddingBottom = ''\n }\n )\n }\n\n ElementAnimateUtil.animate(\n 0,\n calcHeight || 0,\n speed,\n function (value: number) {\n el.style.height = value + 'px'\n },\n function () {\n el.style.height = ''\n el.style.display = ''\n el.style.overflow = ''\n\n if (typeof callback === 'function') {\n callback()\n }\n }\n )\n }\n}\n\nfunction slideUp(el: HTMLElement, speed: number, callback: any) {\n slide(el, 'up', speed, callback)\n}\n\nfunction slideDown(el: HTMLElement, speed: number, callback: any) {\n slide(el, 'down', speed, callback)\n}\n\nfunction getBreakpoint(breakpoint: string) {\n let value: number | string = getCSSVariableValue('--kt-' + breakpoint)\n if (value) {\n value = parseInt(value.trim())\n }\n\n return value\n}\n\nfunction getAttributeValueByBreakpoint(incomingAttr: string): string | JSON {\n let value = toJSON(incomingAttr)\n if (typeof value !== 'object') {\n return incomingAttr\n }\n\n const width = getViewPort().width\n let resultKey\n let resultBreakpoint = -1\n let breakpoint\n\n for (let key in value) {\n if (key === 'default') {\n breakpoint = 0\n } else {\n breakpoint = getBreakpoint(key) ? +getBreakpoint(key) : parseInt(key)\n }\n\n if (breakpoint <= width && breakpoint > resultBreakpoint) {\n resultKey = key\n resultBreakpoint = breakpoint\n }\n }\n\n return resultKey ? getObjectPropertyValueByKey(value, resultKey) : value\n}\n\nfunction colorLighten(color: string, amount: number) {\n const addLight = (_color: string, _amount: number) => {\n const cc = parseInt(_color, 16) + _amount\n const cNum = cc > 255 ? 255 : cc\n const c = cNum.toString(16).length > 1 ? cNum.toString(16) : `0${cNum.toString(16)}`\n return c\n }\n\n color = color.indexOf('#') >= 0 ? color.substring(1, color.length) : color\n amount = parseInt(((255 * amount) / 100).toString())\n return (color = `#${addLight(color.substring(0, 2), amount)}${addLight(\n color.substring(2, 4),\n amount\n )}${addLight(color.substring(4, 6), amount)}`)\n}\n\nfunction colorDarken(color: string, amount: number) {\n const subtractLight = (_color: string, _amount: number) => {\n const cc = parseInt(color, 16) - amount\n const cNum = cc < 0 ? 0 : cc\n const c = cNum.toString(16).length > 1 ? cNum.toString(16) : `0${cNum.toString(16)}`\n return c\n }\n\n color = color.indexOf('#') >= 0 ? color.substring(1, color.length) : color\n amount = parseInt(((255 * amount) / 100).toString())\n\n return (color = `#${subtractLight(color.substring(0, 2), amount)}${subtractLight(\n color.substring(2, 4),\n amount\n )}${subtractLight(color.substring(4, 6), amount)}`)\n}\n\nexport {\n getBreakpoint,\n getCSS,\n getCSSVariableValue,\n getElementActualCss,\n getElementActualHeight,\n getElementActualWidth,\n getElementIndex,\n getElementMatches,\n getElementOffset,\n getElementParents,\n getHighestZindex,\n getScrollTop,\n getViewPort,\n insertAfterElement,\n isElementHasClasses,\n isVisibleElement,\n throttle,\n getElementChildren,\n getElementChild,\n isMobileDevice,\n slide,\n slideUp,\n slideDown,\n getAttributeValueByBreakpoint,\n colorLighten,\n colorDarken,\n}\n","import {DataUtil} from './_DataUtil'\nimport {getUniqueIdWithPrefix} from './_TypesHelpers'\n\nexport interface EventMeta {\n name: string\n callback: Function\n one: boolean\n fired: boolean\n}\n\nexport class EventHandlerUtil {\n static store: {\n [name: string]: {\n [handlerId: string]: EventMeta\n }\n } = {}\n\n private static setEventMetasByName(\n name: string,\n handlers: {\n [handlerId: string]: EventMeta\n }\n ): void {\n EventHandlerUtil.store[name] = handlers\n }\n\n private static getEventMetaByName(name: string):\n | {\n [handlerId: string]: EventMeta\n }\n | undefined {\n return EventHandlerUtil.store[name]\n }\n\n private static setEventMetaByNameAndHandlerId(\n name: string,\n handlerId: string,\n meta: EventMeta\n ): void {\n if (EventHandlerUtil.store[name]) {\n EventHandlerUtil.store[name][handlerId] = meta\n return\n }\n EventHandlerUtil.store[name] = {}\n EventHandlerUtil.store[name][handlerId] = meta\n }\n\n private static getEventMetaByHandlerId(name: string, handlerId: string): EventMeta | undefined {\n const handlersIds = EventHandlerUtil.store[name]\n if (!handlersIds) {\n return\n }\n return handlersIds[handlerId]\n }\n\n private static setFiredByNameAndHandlerId(name: string, handerId: string, fired: boolean): void {\n const meta = EventHandlerUtil.getEventMetaByHandlerId(name, handerId)\n if (!meta) {\n return\n }\n\n meta.fired = fired\n EventHandlerUtil.setEventMetaByNameAndHandlerId(name, handerId, meta)\n }\n\n private static addEvent(\n element: HTMLElement,\n name: string,\n callback: Function,\n one: boolean = false\n ): string {\n const handlerId = getUniqueIdWithPrefix('event')\n const data = DataUtil.get(element, name)\n const handlersIds = data ? (data as string[]) : []\n handlersIds.push(handlerId)\n\n DataUtil.set(element, name, handlersIds)\n\n const meta: EventMeta = {\n name: name,\n callback: callback,\n one: one,\n fired: false,\n }\n\n EventHandlerUtil.setEventMetaByNameAndHandlerId(name, handlerId, meta)\n return handlerId\n }\n\n private static removeEvent(element: HTMLElement, name: string, handerId: string) {\n DataUtil.removeOne(element, name, handerId)\n const handlersIds = EventHandlerUtil.store[name]\n if (handlersIds) {\n return\n }\n\n delete EventHandlerUtil.store[name][handerId]\n }\n\n public static trigger(element: HTMLElement, name: string, target?: any, e?: Event): boolean {\n let returnValue = true\n if (!DataUtil.has(element, name)) {\n return returnValue\n }\n\n let eventValue\n let handlerId\n const data = DataUtil.get(element, name)\n const handlersIds = data ? (data as string[]) : []\n for (let i = 0; i < handlersIds.length; i++) {\n handlerId = handlersIds[i]\n if (EventHandlerUtil.store[name] && EventHandlerUtil.store[name][handlerId]) {\n const handler = EventHandlerUtil.store[name][handlerId]\n if (handler.name === name) {\n if (handler.one) {\n if (handler.fired) {\n EventHandlerUtil.store[name][handlerId].fired = true\n eventValue = handler.callback.call(this, target)\n }\n } else {\n eventValue = handler.callback.call(this, target)\n }\n\n if (eventValue === false) {\n returnValue = false\n }\n }\n }\n }\n return returnValue\n }\n\n public static on = function (element: HTMLElement, name: string, callBack: Function): void {\n EventHandlerUtil.addEvent(element, name, callBack, false)\n }\n\n public static one(element: HTMLElement, name: string, callBack: Function): void {\n EventHandlerUtil.addEvent(element, name, callBack, true)\n }\n\n public static off(element: HTMLElement, name: string, handerId: string): void {\n EventHandlerUtil.removeEvent(element, name, handerId)\n }\n}\n","import {\n EventHandlerUtil,\n getUniqueIdWithPrefix,\n getObjectPropertyValueByKey,\n stringSnakeToCamel,\n getAttributeValueByBreakpoint,\n throttle,\n getCSS,\n DOMEventHandlerUtil,\n ElementStyleUtil,\n} from '../_utils/index'\n\nexport class DrawerStore {\n static store: Map = new Map()\n\n public static set(instanceId: string, drawerComponentObj: DrawerComponent): void {\n if (DrawerStore.has(instanceId)) {\n return\n }\n\n DrawerStore.store.set(instanceId, drawerComponentObj)\n }\n\n public static get(instanceId: string): DrawerComponent | undefined {\n if (!DrawerStore.has(instanceId)) {\n return\n }\n return DrawerStore.store.get(instanceId)\n }\n\n public static remove(instanceId: string): void {\n if (!DrawerStore.has(instanceId)) {\n return\n }\n\n DrawerStore.store.delete(instanceId)\n }\n\n public static has(instanceId: string): boolean {\n return DrawerStore.store.has(instanceId)\n }\n\n public static getAllInstances() {\n return DrawerStore.store\n }\n}\n\nexport interface DrawerOptions {\n overlay: boolean\n baseClass: string\n overlayClass: string\n direction: string\n}\n\nconst defaultDrawerOptions: DrawerOptions = {\n overlay: true,\n baseClass: 'drawer',\n overlayClass: 'drawer-overlay',\n direction: 'end',\n}\n\nclass DrawerComponent {\n element: HTMLElement\n overlayElement: HTMLElement | null = null\n toggleElement: HTMLElement | null = null\n options: DrawerOptions\n instanceUid: string\n name: string = ''\n shown: boolean = false\n lastWidth: number = 0\n closeElement: HTMLElement | null = null\n\n constructor(_element: HTMLElement, options: DrawerOptions) {\n this.element = _element\n this.options = Object.assign(defaultDrawerOptions, options)\n this.instanceUid = getUniqueIdWithPrefix('drawer')\n this.overlayElement = null\n this.name = this.element.getAttribute('data-kt-drawer-name') || ''\n this.shown = false\n this.toggleElement = null\n // Event Handlers\n this._handlers()\n // Update Instance\n this._update()\n // Bind Instance\n DrawerStore.set(this.element.id, this)\n }\n\n private _handlers = () => {\n const togglers = this._getOption('toggle') as string\n const closers = this._getOption('close') as string\n\n if (togglers !== null && togglers.length > 0) {\n DOMEventHandlerUtil.on(document.body, togglers, 'click', (e: Event) => {\n e.preventDefault()\n this.toggleElement = document.getElementById(togglers)\n this._toggle()\n })\n }\n\n if (closers !== null && closers.length > 0) {\n DOMEventHandlerUtil.on(document.body, closers, 'click', (e: Event) => {\n e.preventDefault()\n this.closeElement = document.getElementById(closers)\n\n this._hide()\n })\n }\n }\n\n private _update = () => {\n const width = String(this._getOption('width'))\n const direction = String(this._getOption('direction'))\n\n // Reset state\n const hasBaseClass = this.element.classList.contains(`${this.options.baseClass}-on`)\n const bodyCanvasAttr = String(document.body.getAttribute(`data-kt-drawer-${this.name}-`))\n\n if (hasBaseClass === true && bodyCanvasAttr === 'on') {\n this.shown = true\n } else {\n this.shown = false\n }\n\n // Activate/deactivate\n if (this._getOption('activate') === true) {\n this.element.classList.add(this.options.baseClass)\n this.element.classList.add(`${this.options.baseClass}-${direction}`)\n ElementStyleUtil.set(this.element, 'width', width, true)\n\n this.lastWidth = parseInt(width)\n } else {\n ElementStyleUtil.set(this.element, 'width', '')\n this.element.classList.remove(this.options.baseClass)\n this.element.classList.remove(`${this.options.baseClass}-${direction}`)\n this._hide()\n }\n }\n\n private _getOption = (name: string) => {\n const attr = this.element.getAttribute(`data-kt-drawer-${name}`)\n if (attr) {\n let value = getAttributeValueByBreakpoint(attr)\n if (value !== null && String(value) === 'true') {\n return true\n } else {\n if (value !== null && String(value) === 'false') {\n return false\n }\n }\n\n return value\n } else {\n const optionName = stringSnakeToCamel(name)\n const option = getObjectPropertyValueByKey(this.options, optionName)\n if (option) {\n return getAttributeValueByBreakpoint(option)\n } else {\n return null\n }\n }\n }\n\n private _toggle = () => {\n if (EventHandlerUtil.trigger(this.element, 'kt.drawer.toggle') === false) {\n return\n }\n\n if (this.shown) {\n this._hide()\n } else {\n this._show()\n }\n\n EventHandlerUtil.trigger(this.element, 'kt.drawer.toggled')\n }\n\n private _hide = () => {\n if (EventHandlerUtil.trigger(this.element, 'kt.drawer.hide') === false) {\n return\n }\n\n this.shown = false\n this._deleteOverlay()\n document.body.removeAttribute(`data-kt-drawer-${this.name}`)\n document.body.removeAttribute(`data-kt-drawer`)\n this.element.classList.remove(`${this.options.baseClass}-on`)\n if (this.toggleElement != null) {\n this.toggleElement.classList.remove('active')\n }\n\n EventHandlerUtil.trigger(this.element, 'kt.drawer.after.hidden')\n }\n\n private _show = () => {\n if (EventHandlerUtil.trigger(this.element, 'kt.drawer.show') === false) {\n return\n }\n\n this.shown = true\n this._createOverlay()\n document.body.setAttribute(`data-kt-drawer-${this.name}`, 'on')\n document.body.setAttribute('data-kt-drawer', 'on')\n this.element.classList.add(`${this.options.baseClass}-on`)\n if (this.toggleElement !== null) {\n this.toggleElement.classList.add('active')\n }\n\n EventHandlerUtil.trigger(this.element, 'kt.drawer.shown')\n }\n\n private _createOverlay = () => {\n if (this._getOption('overlay') === true) {\n this.overlayElement = document.createElement('DIV')\n const elementZIndex = getCSS(this.element, 'z-index')\n if (elementZIndex) {\n const overlayZindex = parseInt(elementZIndex) - 1\n ElementStyleUtil.set(this.overlayElement, 'z-index', overlayZindex) // update\n }\n document.body.append(this.overlayElement)\n const overlayClassOption = this._getOption('overlay-class')\n if (overlayClassOption) {\n this.overlayElement.classList.add(overlayClassOption.toString())\n }\n this.overlayElement.addEventListener('click', (e) => {\n e.preventDefault()\n this._hide()\n })\n }\n }\n\n private _deleteOverlay = () => {\n if (this.overlayElement !== null && this.overlayElement.parentNode) {\n this.overlayElement.parentNode.removeChild(this.overlayElement)\n }\n }\n\n private _getDirection = () => {\n return String(this._getOption('direction')) === 'left' ? 'left' : 'right'\n }\n\n private _getWidth = () => {\n let width = this._getOption('width')\n if (width && width === 'auto') {\n width = getCSS(this.element, 'width')\n }\n\n return width\n }\n\n ///////////////////////\n // ** Public API ** //\n ///////////////////////\n public toggle = () => {\n this._toggle()\n }\n\n public show = () => {\n this._show()\n }\n\n public hide = () => {\n this._hide()\n }\n\n public isShown = () => {\n return this.shown\n }\n\n public update = () => {\n this._update()\n }\n\n public goElement = () => {\n return this.element\n }\n\n // Event API\n public on = (name: string, handler: Function) => {\n return EventHandlerUtil.on(this.element, name, handler)\n }\n\n public one = (name: string, handler: Function) => {\n return EventHandlerUtil.one(this.element, name, handler)\n }\n\n public off = (name: string, handerId: string) => {\n return EventHandlerUtil.off(this.element, name, handerId)\n }\n\n public trigger = (name: string, event: Event) => {\n return EventHandlerUtil.trigger(this.element, name, event)\n }\n\n // Static methods\n public static hasInstace = (elementId: string): boolean => {\n return DrawerStore.has(elementId)\n }\n\n public static getInstance = (elementId: string) => {\n return DrawerStore.get(elementId)\n }\n\n public static hideAll = () => {\n const oldInstances = DrawerStore.getAllInstances()\n oldInstances.forEach((dr) => {\n dr.hide()\n })\n }\n\n public static updateAll = () => {\n const oldInstances = DrawerStore.getAllInstances()\n oldInstances.forEach((dr) => {\n dr.update()\n })\n }\n\n // Create Instances\n public static createInstances(selector: string): void {\n const elements = document.body.querySelectorAll(selector)\n elements.forEach((element) => {\n const item = element as HTMLElement\n let drawer = DrawerComponent.getInstance(item.id)\n if (!drawer) {\n drawer = new DrawerComponent(item, defaultDrawerOptions)\n }\n drawer.element = item\n drawer.hide()\n })\n }\n\n // Dismiss instances\n public static handleDismiss = () => {\n // External drawer toggle handler\n DOMEventHandlerUtil.on(document.body, '[data-kt-drawer-dismiss=\"true\"]', 'click', () => {\n /* @ts-ignore */\n const element = this.closest('[data-kt-drawer=\"true\"]')\n if (element) {\n const drawer = DrawerComponent.getInstance(element)\n if (drawer && drawer.isShown()) {\n drawer.hide()\n }\n }\n })\n }\n\n // Global Initialization\n public static initGlobalHandlers(): void {\n // Window Resize Handling\n window.addEventListener('resize', function () {\n let timer: number | undefined\n throttle(\n timer,\n () => {\n // Locate and update Drawer instances on window resize\n const elements = document.body.querySelectorAll('[data-kt-drawer=\"true\"]')\n elements.forEach((el) => {\n const item = el as HTMLElement\n const instance = DrawerComponent.getInstance(item.id)\n if (instance) {\n instance.element = item\n instance.update()\n }\n })\n },\n 200\n )\n })\n }\n\n public static bootstrap = () => {\n DrawerComponent.createInstances('[data-kt-drawer=\"true\"]')\n DrawerComponent.initGlobalHandlers()\n DrawerComponent.handleDismiss()\n }\n\n public static reinitialization = () => {\n DrawerComponent.createInstances('[data-kt-drawer=\"true\"]')\n DrawerComponent.hideAll()\n DrawerComponent.updateAll()\n DrawerComponent.handleDismiss()\n }\n}\n\nexport {DrawerComponent, defaultDrawerOptions}\n","import {EventHandlerUtil, DataUtil, getUniqueIdWithPrefix, getCSS} from '../_utils/index'\n\nexport interface IImageInputOptions {}\n\nexport interface IImageInputQueries {\n componentName: string\n instanseQuery: string\n inputQuery: string\n wrapperQuery: string\n cancelQuery: string\n removeQuery: string\n hiddenQuery: string\n}\n\nconst defaultImageInputOptions = {}\n\nconst defaultImageInputQueires: IImageInputQueries = {\n componentName: 'image-input',\n instanseQuery: '[data-kt-image-input]',\n inputQuery: 'input[type=\"file\"]',\n wrapperQuery: '.image-input-wrapper',\n cancelQuery: '[data-kt-image-input-action=\"cancel\"]',\n removeQuery: '[data-kt-image-input-action=\"remove\"]',\n hiddenQuery: 'input[type=\"hidden\"]',\n}\n\nclass ImageInputComponent {\n element: HTMLElement\n inputElement: HTMLInputElement | null\n wrapperElement: HTMLElement | null\n cancelElement: HTMLElement | null\n removeElement: HTMLElement | null\n hiddenElement: HTMLInputElement | null\n src: string = ''\n options: IImageInputOptions\n queries: IImageInputQueries\n uid: string\n value: string = ''\n\n constructor(_element: HTMLElement, _options: IImageInputOptions, _queries: IImageInputQueries) {\n // Variables\n this.options = Object.assign(defaultImageInputOptions, _options)\n this.queries = _queries\n this.uid = getUniqueIdWithPrefix(this.queries.componentName)\n\n // Elements\n this.element = _element\n this.inputElement = this.element.querySelector(this.queries.inputQuery)\n this.wrapperElement = this.element.querySelector(this.queries.wrapperQuery)\n this.cancelElement = this.element.querySelector(this.queries.cancelQuery)\n this.removeElement = this.element.querySelector(this.queries.removeQuery)\n this.hiddenElement = this.element.querySelector(this.queries.hiddenQuery)\n if (this.wrapperElement) {\n this.src = getCSS(this.wrapperElement, 'backgroundImage')\n }\n\n // Event Handlers\n this.handlers()\n\n DataUtil.set(this.element, this.queries.componentName, this)\n }\n\n private handlers(): void {\n this.element.addEventListener('change', this._change)\n if (this.cancelElement) {\n this.cancelElement.addEventListener('click', this._cancel)\n }\n\n if (this.removeElement) {\n this.removeElement.addEventListener('click', this._cancel)\n }\n }\n\n // Event Handlers\n private _change = (e: Event) => {\n e.preventDefault()\n\n if (this.inputElement !== null && this.inputElement.files && this.inputElement.files[0]) {\n // Fire change event\n if (EventHandlerUtil.trigger(this.element, 'kt.imageinput.change', e) === false) {\n return\n }\n\n const reader = new FileReader()\n\n reader.onload = (e: ProgressEvent) => {\n if (this.wrapperElement && e.target) {\n this.wrapperElement.style.setProperty('background-image', `url('${e.target.result}')`)\n }\n }\n\n reader.readAsDataURL(this.inputElement.files[0])\n this.element.classList.add('image-input-changed')\n this.element.classList.remove('image-input-empty')\n\n // Fire removed event\n EventHandlerUtil.trigger(this.element, 'kt.imageinput.changed', e)\n }\n }\n\n private _cancel = (e: Event) => {\n e.preventDefault()\n\n // Fire cancel event\n if (EventHandlerUtil.trigger(this.element, 'kt.imageinput.cancel', e) === false) {\n return\n }\n\n this.element.classList.remove('image-input-changed')\n this.element.classList.remove('image-input-empty')\n this.element.style.setProperty('background-image', this.src)\n if (this.inputElement) {\n this.inputElement.value = ''\n }\n\n if (this.hiddenElement !== null) {\n this.hiddenElement.value = '0'\n }\n\n // Fire canceled event\n EventHandlerUtil.trigger(this.element, 'kt.imageinput.canceled', e)\n }\n\n private _remove = (e: Event) => {\n e.preventDefault()\n\n // Fire remove event\n if (EventHandlerUtil.trigger(this.element, 'kt.imageinput.remove', e) === false) {\n return\n }\n\n this.element.classList.remove('image-input-changed')\n this.element.classList.add('image-input-empty')\n if (this.wrapperElement) {\n this.wrapperElement.style.setProperty('background-image', 'none')\n }\n\n if (this.inputElement) {\n this.inputElement.value = ''\n }\n\n if (this.hiddenElement !== null) {\n this.hiddenElement.value = '1'\n }\n\n // Fire removed event\n EventHandlerUtil.trigger(this.element, 'kt.imageinput.removed', e)\n }\n\n ///////////////////////\n // ** Public API ** //\n ///////////////////////\n public getInputElement(): HTMLInputElement | null {\n return this.inputElement\n }\n\n public getElement(): HTMLElement {\n return this.element\n }\n\n // Event API\n public on = (name: string, handler: Function) => {\n return EventHandlerUtil.on(this.element, name, handler)\n }\n\n public one = (name: string, handler: Function) => {\n return EventHandlerUtil.one(this.element, name, handler)\n }\n\n public off = (name: string, handlerId: string) => {\n return EventHandlerUtil.off(this.element, name, handlerId)\n }\n\n public trigger = (name: string, event: Event) => {\n return EventHandlerUtil.trigger(this.element, name, event)\n }\n\n // Static methods\n public static getInstance = (\n el: HTMLElement,\n componentName: string = defaultImageInputQueires.componentName\n ): ImageInputComponent | undefined => {\n const ImageInput = DataUtil.get(el, componentName)\n if (ImageInput) {\n return ImageInput as ImageInputComponent\n }\n }\n\n public static createInstances = (\n selector: string = defaultImageInputQueires.instanseQuery,\n options: IImageInputOptions = defaultImageInputOptions,\n queries: IImageInputQueries = defaultImageInputQueires\n ) => {\n const elements = document.body.querySelectorAll(selector)\n elements.forEach((el) => {\n const item = el as HTMLElement\n let ImageInput = ImageInputComponent.getInstance(item)\n if (!ImageInput) {\n ImageInput = new ImageInputComponent(item, options, queries)\n }\n })\n }\n\n public static createInsance = (\n selector: string = defaultImageInputQueires.instanseQuery,\n options: IImageInputOptions = defaultImageInputOptions,\n queries: IImageInputQueries = defaultImageInputQueires\n ): ImageInputComponent | undefined => {\n const element = document.body.querySelector(selector)\n if (!element) {\n return\n }\n const item = element as HTMLElement\n let ImageInput = ImageInputComponent.getInstance(item)\n if (!ImageInput) {\n ImageInput = new ImageInputComponent(item, options, queries)\n }\n return ImageInput\n }\n\n public static bootstrap = (selector: string = defaultImageInputQueires.instanseQuery) => {\n ImageInputComponent.createInstances(selector)\n }\n\n public static reinitialization = (selector: string = defaultImageInputQueires.instanseQuery) => {\n ImageInputComponent.createInstances(selector)\n }\n}\nexport {ImageInputComponent, defaultImageInputOptions, defaultImageInputQueires}\n","/* eslint-disable no-useless-escape */\n// DOCS: https://javascript.info/cookie\nexport class CookieComponent {\n /**\n * Returns the cookie with the given name, or undefined if not found\n *\n * @param {string} name - cookie name\n * @returns string | null\n */\n public static get(name: string): string | undefined {\n let matches = document.cookie.match(\n new RegExp('(?:^|; )' + name.replace(/([\\.$?*|{}\\(\\)\\[\\]\\\\\\/\\+^])/g, '\\\\$1') + '=([^;]*)')\n )\n return matches ? decodeURIComponent(matches[1]) : undefined\n }\n\n /**\n * Please note that a cookie value is encoded,\n * so getCookie uses a built-in decodeURIComponent function to decode it.\n *\n * @param {string} name - cookie name\n * @param {string | number | boolean} value - cookie value\n * @param {any} cookieOptions - cookie options\n * @returns void\n */\n public static set(name: string, value: string | number | boolean, cookieOptions: any): void {\n const options = {\n path: '/',\n // add other defaults here if necessary\n ...cookieOptions,\n }\n\n if (options.expires instanceof Date) {\n options.expires = options.expires.toUTCString()\n }\n\n let updatedCookie = encodeURIComponent(name) + '=' + encodeURIComponent(value)\n\n for (let optionKey in options) {\n updatedCookie += '; ' + optionKey\n let optionValue = options[optionKey]\n if (optionValue !== true) {\n updatedCookie += '=' + optionValue\n }\n }\n\n document.cookie = updatedCookie\n }\n\n /**\n * To delete a cookie, we can call it with a negative expiration date\n *\n * @param {string} name\n */\n public static delete(name: string): void {\n CookieComponent.set(name, '', {\n 'max-age': -1,\n })\n }\n}\n","import {\n DataUtil,\n getObjectPropertyValueByKey,\n stringSnakeToCamel,\n getAttributeValueByBreakpoint,\n getViewPort,\n isVisibleElement,\n throttle,\n getCSS,\n ElementStyleUtil,\n} from '../_utils/index'\nimport {CookieComponent} from './_CookieComponent'\n\nexport interface ScrollOptions {\n saveState?: boolean\n}\n\nconst defaultScrollOptions: ScrollOptions = {\n saveState: true,\n}\n\nclass ScrollComponent {\n element: HTMLElement\n options: ScrollOptions\n id: string\n\n constructor(_element: HTMLElement, options: ScrollOptions) {\n this.element = _element\n this.options = Object.assign(defaultScrollOptions, options)\n this.id = this.element.getAttribute('id') || ''\n this.update()\n // this.element.setAttribute('data-kt-scrolltop', 'true')\n DataUtil.set(this.element, 'scroll', this)\n }\n\n private getOption = (name: string) => {\n if (this.element.hasAttribute('data-kt-scroll-' + name) === true) {\n const attr = this.element.getAttribute('data-kt-scroll-' + name) || ''\n let value: string | JSON | boolean = getAttributeValueByBreakpoint(attr)\n if (value !== null && String(value) === 'true') {\n value = true\n } else if (value !== null && String(value) === 'false') {\n value = false\n }\n\n return value\n } else {\n const optionName = stringSnakeToCamel(name)\n const option = getObjectPropertyValueByKey(this.options, optionName)\n if (option) {\n return getAttributeValueByBreakpoint(option)\n } else {\n return null\n }\n }\n }\n\n private getHeightType = () => {\n if (this.getOption('height')) {\n return 'height'\n }\n if (this.getOption('min-height')) {\n return 'min-height'\n }\n if (this.getOption('max-height')) {\n return 'max-height'\n }\n }\n\n private getAutoHeight = () => {\n let height: number | string = getViewPort().height\n const dependencies = this.getOption('dependencies')\n const wrappers = this.getOption('wrappers')\n const offset = this.getOption('offset')\n\n // Height dependencies\n if (dependencies !== null) {\n const elements = document.querySelectorAll(dependencies as string)\n if (elements && elements.length > 0) {\n for (let i = 0, len = elements.length; i < len; i++) {\n const element = elements[i] as HTMLElement\n if (isVisibleElement(element) === false) {\n continue\n }\n\n height = height - parseInt(getCSS(element, 'height'))\n height = height - parseInt(getCSS(element, 'margin-top'))\n height = height - parseInt(getCSS(element, 'margin-bottom'))\n\n const borderTop = getCSS(element, 'border-top')\n if (borderTop) {\n height = height - parseInt(borderTop)\n }\n\n const borderBottom = getCSS(element, 'border-bottom')\n if (borderBottom) {\n height = height - parseInt(borderBottom)\n }\n }\n }\n }\n\n // Wrappers\n if (wrappers !== null) {\n var elements = document.querySelectorAll(wrappers as string)\n if (elements && elements.length > 0) {\n for (let i = 0, len = elements.length; i < len; i++) {\n const element = elements[i] as HTMLElement\n\n if (!isVisibleElement(element)) {\n continue\n }\n\n height = height - parseInt(getCSS(element, 'margin-top'))\n height = height - parseInt(getCSS(element, 'margin-bottom'))\n height = height - parseInt(getCSS(element, 'padding-top'))\n height = height - parseInt(getCSS(element, 'padding-bottom'))\n\n const borderTop = getCSS(element, 'border-top')\n if (borderTop) {\n height = height - parseInt(borderTop)\n }\n\n const borderBottom = getCSS(element, 'border-bottom')\n if (borderBottom) {\n height = height - parseInt(borderBottom)\n }\n }\n }\n }\n\n // Custom offset\n if (offset !== null) {\n height = height - parseInt(offset as string)\n }\n\n height = height - parseInt(getCSS(this.element, 'margin-top'))\n height = height - parseInt(getCSS(this.element, 'margin-bottom'))\n\n const borderTop = getCSS(this.element, 'border-top')\n if (borderTop) {\n height = height - parseInt(borderTop)\n }\n\n const borderBottom = getCSS(this.element, 'border-bottom')\n if (borderBottom) {\n height = height - parseInt(borderBottom)\n }\n\n height = String(height) + 'px'\n\n return height\n }\n\n private setupHeight = () => {\n let height = this.getHeight()\n let heightType = this.getHeightType() as string\n\n // Set height\n if (height !== null && height.length > 0) {\n ElementStyleUtil.set(this.element, heightType, height)\n } else {\n ElementStyleUtil.set(this.element, heightType, '')\n }\n }\n\n private setupState = () => {\n if (this.getOption('save-state') === true && this.id) {\n const cookie = CookieComponent.get(this.id + 'st')\n if (cookie) {\n var pos = parseInt(cookie)\n\n if (pos > 0) {\n this.element.scrollTop = pos\n }\n }\n }\n }\n\n private setupScrollHandler = () => {\n if (this.getOption('save-state') === true && this.id) {\n this.element.addEventListener('scroll', this.scrollHandler)\n } else {\n this.element.removeEventListener('scroll', this.scrollHandler)\n }\n }\n\n private scrollHandler = () => {\n const cookieId = this.id + 'st'\n CookieComponent.set(cookieId, this.element.scrollTop, {})\n }\n\n private destroyScrollHandler = () => {\n this.element.removeEventListener('scroll', this.scrollHandler)\n }\n\n private resetHeight = () => {\n const heghtType = this.getHeightType()\n if (heghtType) {\n ElementStyleUtil.set(this.element, heghtType, '')\n }\n }\n\n ///////////////////////\n // ** Public API ** //\n ///////////////////////\n public update = () => {\n // Activate/deactivate\n if (\n this.getOption('activate') === true ||\n !this.element.hasAttribute('data-kt-scroll-activate')\n ) {\n this.setupHeight()\n this.setupScrollHandler()\n this.setupState()\n } else {\n this.resetHeight()\n this.destroyScrollHandler()\n }\n }\n\n public getHeight = () => {\n const heightType = this.getHeightType()\n const height = this.getOption(heightType || '')\n if (height instanceof Function) {\n return height.call(height)\n } else if (height !== null && typeof height === 'string' && height.toLowerCase() === 'auto') {\n return this.getAutoHeight()\n } else {\n return height\n }\n }\n\n public getElement = () => {\n return this.element\n }\n\n // Static methods\n public static hasInstace(element: HTMLElement) {\n return DataUtil.has(element, 'scroll')\n }\n\n public static getInstance(element: HTMLElement): ScrollComponent | undefined {\n if (element !== null && ScrollComponent.hasInstace(element)) {\n const data = DataUtil.get(element, 'scroll')\n if (data) {\n return data as ScrollComponent\n }\n }\n }\n\n // Create Instances\n public static createInstances(selector: string) {\n const elements = document.body.querySelectorAll(selector)\n elements.forEach((element: Element) => {\n const item = element as HTMLElement\n let scroll = ScrollComponent.getInstance(item)\n if (!scroll) {\n scroll = new ScrollComponent(item, defaultScrollOptions)\n }\n })\n }\n\n public static destroyAll(attr: string = '[data-kt-scroll=\"true\"]') {}\n\n public static bootstrap(attr: string = '[data-kt-scroll=\"true\"]') {\n ScrollComponent.createInstances(attr)\n ScrollComponent.resize()\n }\n\n public static createInstance = (\n element: HTMLElement,\n options: ScrollOptions = defaultScrollOptions\n ): ScrollComponent | undefined => {\n let scroll = ScrollComponent.getInstance(element)\n if (!scroll) {\n scroll = new ScrollComponent(element, options)\n }\n return scroll\n }\n\n public static reinitialization(attr: string = '[data-kt-scroll=\"true\"]') {\n ScrollComponent.createInstances(attr)\n }\n\n public static updateAll() {\n const elements = document.body.querySelectorAll('[data-kt-scroll=\"true\"]')\n elements.forEach((element: Element) => {\n const instance = ScrollComponent.getInstance(element as HTMLElement)\n if (instance) {\n instance.update()\n }\n })\n }\n\n public static resize() {\n // Window Resize Handling\n window.addEventListener('resize', function () {\n let timer\n throttle(\n timer,\n () => {\n // Locate and update Drawer instances on window resize\n ScrollComponent.updateAll()\n },\n 200\n )\n })\n }\n}\n\nexport {ScrollComponent, defaultScrollOptions}\n","import {\n getScrollTop,\n getAttributeValueByBreakpoint,\n throttle,\n getObjectPropertyValueByKey,\n stringSnakeToCamel,\n getUniqueIdWithPrefix,\n DataUtil,\n ElementAnimateUtil,\n} from '../_utils/index'\n\nexport interface IScrollTopOptions {\n offset: number\n speed: number\n}\n\nconst defaultScrollTopOptions: IScrollTopOptions = {\n offset: 200,\n speed: 600,\n}\n\nclass ScrollTopComponent {\n element: HTMLElement\n options: IScrollTopOptions\n instanceUid: string\n\n constructor(_element: HTMLElement, options: IScrollTopOptions) {\n this.element = _element\n this.options = Object.assign(defaultScrollTopOptions, options)\n this.instanceUid = getUniqueIdWithPrefix('scrolltop')\n\n // Event Handlers\n this._handlers()\n\n // Bind Instance\n DataUtil.set(this.element, 'scrolltop', this)\n }\n\n private _handlers = () => {\n let timer: number\n window.addEventListener('scroll', () => {\n throttle(timer, () => {\n this._scroll()\n })\n })\n\n this.element.addEventListener('click', (e: Event) => {\n e.preventDefault()\n this._go()\n })\n }\n\n private _scroll = () => {\n const offset = parseInt(this._getOption('offset') as string)\n const pos = getScrollTop() // current vertical position\n if (pos > offset) {\n if (!document.body.hasAttribute('data-kt-scrolltop')) {\n document.body.setAttribute('data-kt-scrolltop', 'on')\n }\n } else {\n if (document.body.hasAttribute('data-kt-scrolltop')) {\n document.body.removeAttribute('data-kt-scrolltop')\n }\n }\n }\n\n private _go = () => {\n const speed = parseInt(this._getOption('speed') as string)\n ElementAnimateUtil.scrollTop(0, speed)\n }\n\n private _getOption = (name: string) => {\n const attr = this.element.getAttribute(`data-kt-scrolltop-${name}`)\n if (attr) {\n const value = getAttributeValueByBreakpoint(attr)\n return value !== null && String(value) === 'true'\n }\n\n const optionName = stringSnakeToCamel(name)\n const option = getObjectPropertyValueByKey(this.options, optionName)\n if (option) {\n return getAttributeValueByBreakpoint(option)\n }\n\n return null\n }\n\n ///////////////////////\n // ** Public API ** //\n ///////////////////////\n\n // Plugin API\n public go = () => {\n return this._go()\n }\n\n public getElement = () => {\n return this.element\n }\n\n // Static methods\n public static getInstance = (el: HTMLElement): ScrollTopComponent | undefined => {\n const scrollTop = DataUtil.get(el, 'scrolltop')\n if (scrollTop) {\n return scrollTop as ScrollTopComponent\n }\n }\n\n public static createInstances = (selector: string) => {\n const elements = document.body.querySelectorAll(selector)\n elements.forEach((el) => {\n const item = el as HTMLElement\n let scrollTop = ScrollTopComponent.getInstance(item)\n if (!scrollTop) {\n scrollTop = new ScrollTopComponent(item, defaultScrollTopOptions)\n }\n })\n }\n\n public static createInsance = (\n selector: string,\n options: IScrollTopOptions = defaultScrollTopOptions\n ): ScrollTopComponent | undefined => {\n const element = document.body.querySelector(selector)\n if (!element) {\n return\n }\n const item = element as HTMLElement\n let scrollTop = ScrollTopComponent.getInstance(item)\n if (!scrollTop) {\n scrollTop = new ScrollTopComponent(item, options)\n }\n return scrollTop\n }\n\n public static bootstrap = () => {\n ScrollTopComponent.createInstances('[data-kt-scrolltop=\"true\"]')\n }\n\n public static reinitialization = () => {\n ScrollTopComponent.createInstances('[data-kt-scrolltop=\"true\"]')\n }\n\n public static goTop = () => {\n ElementAnimateUtil.scrollTop(0, defaultScrollTopOptions.speed)\n }\n}\nexport {ScrollTopComponent, defaultScrollTopOptions}\n","import {defterdar_log} from '../../../../app/utils/utilities'\nimport {\n getElementIndex,\n getUniqueIdWithPrefix,\n ElementAnimateUtil,\n EventHandlerUtil,\n DataUtil,\n DOMEventHandlerUtil,\n ElementStyleUtil,\n} from '../_utils/index'\n\nexport interface IStepperOptions {\n startIndex: number\n animation: boolean\n animationSpeed: string\n animationNextClass: string\n animationPreviousClass: string\n}\n\nconst defaultStepperOptions: IStepperOptions = {\n startIndex: 1,\n animation: false,\n animationSpeed: '0.3s',\n animationNextClass: 'animate__animated animate__slideInRight animate__fast',\n animationPreviousClass: 'animate__animated animate__slideInLeft animate__fast',\n}\n\nclass StepperComponent {\n element: HTMLElement\n options: IStepperOptions\n instanceUid: string\n steps: NodeListOf\n btnNext: HTMLElement | null\n btnPrev: HTMLElement | null\n btnSubmit: HTMLElement | null\n totatStepsNumber: number = 0\n passedStepIndex: number = 0\n currentStepIndex: number = 1\n\n constructor(_element: HTMLElement, options: IStepperOptions) {\n this.element = _element\n this.options = Object.assign(defaultStepperOptions, options)\n this.instanceUid = getUniqueIdWithPrefix('stepper')\n\n // Elements\n this.steps = this.element.querySelectorAll('[data-kt-stepper-element=\"nav\"]')\n this.btnNext = this.element.querySelector('[data-kt-stepper-action=\"next\"]')\n this.btnPrev = this.element.querySelector('[data-kt-stepper-action=\"previous\"]')\n this.btnSubmit = this.element.querySelector('[data-kt-stepper-action=\"submit\"]')\n\n // Variables\n this.totatStepsNumber = this.steps?.length | 0\n this.passedStepIndex = 0\n this.currentStepIndex = 1\n\n // Set Current Step\n if (this.options.startIndex > 1) {\n this._goTo(this.options.startIndex)\n }\n\n // Event Handlers\n this.initHandlers()\n\n // Bind Instance\n DataUtil.set(this.element, 'stepper', this)\n }\n\n private _goTo = (index: number) => {\n EventHandlerUtil.trigger(this.element, 'kt.stepper.change')\n // Skip if this step is already shown\n if (index === this.currentStepIndex || index > this.totatStepsNumber || index < 0) {\n return\n }\n\n // Validate step number\n index = parseInt(index.toString())\n // Set current step\n this.passedStepIndex = this.currentStepIndex\n this.currentStepIndex = index\n\n // Refresh elements\n this.refreshUI()\n\n EventHandlerUtil.trigger(this.element, 'kt.stepper.changed')\n }\n\n private initHandlers = () => {\n this.btnNext?.addEventListener('click', (e: Event) => {\n e.preventDefault()\n\n EventHandlerUtil.trigger(this.element, 'kt.stepper.next', e)\n })\n\n this.btnPrev?.addEventListener('click', (e: Event) => {\n e.preventDefault()\n\n EventHandlerUtil.trigger(this.element, 'kt.stepper.previous', e)\n })\n\n DOMEventHandlerUtil.on(this.element, '[data-kt-stepper-action=\"step\"]', 'click', (e: Event) => {\n e.preventDefault()\n\n if (this.steps && this.steps.length > 0) {\n for (let i = 0; i < this.steps.length; i++) {\n if ((this.steps[i] as HTMLElement) === this.element) {\n let index = i + 1\n\n const stepDirection = this._getStepDirection(index)\n EventHandlerUtil.trigger(this.element, `stepper.${stepDirection}`, e)\n return\n }\n }\n }\n })\n }\n\n private _getStepDirection = (index: number) => {\n return index > this.currentStepIndex ? 'next' : 'previous'\n }\n\n private getStepContent = (index: number) => {\n const content = this.element.querySelectorAll('[data-kt-stepper-element=\"content\"]')\n if (!content) {\n return false\n }\n\n if (content[index - 1]) {\n return content[index - 1]\n }\n\n return false\n }\n\n private getLastStepIndex = () => {\n return this.totatStepsNumber\n }\n\n private getTotalStepsNumber = () => {\n return this.totatStepsNumber\n }\n\n private refreshUI = () => {\n let state = ''\n\n if (this.isLastStep()) {\n state = 'last'\n } else if (this.isFirstStep()) {\n state = 'first'\n } else {\n state = 'between'\n }\n\n // Set state class\n this.element.classList.remove('last')\n this.element.classList.remove('first')\n this.element.classList.remove('between')\n\n this.element.classList.add(state)\n\n // Step Items\n const elements = this.element.querySelectorAll(\n '[data-kt-stepper-element=\"nav\"], [data-kt-stepper-element=\"content\"], [data-kt-stepper-element=\"info\"]'\n )\n\n if (!elements || elements.length <= 0) {\n return\n }\n\n for (var i = 0, len = elements.length; i < len; i++) {\n var element = elements[i] as HTMLElement\n var index = getElementIndex(element) + 1\n\n element.classList.remove('current')\n element.classList.remove('completed')\n element.classList.remove('pending')\n\n element.classList.add('w-100')\n element.classList.add('justify-content-center')\n if (index === this.currentStepIndex) {\n element.classList.add('current')\n\n if (\n this.options.animation !== false &&\n element.getAttribute('data-kt-stepper-element') === 'content'\n ) {\n ElementStyleUtil.set(element, 'animationDuration', this.options.animationSpeed)\n\n const animation =\n this._getStepDirection(this.passedStepIndex) === 'previous'\n ? this.options.animationPreviousClass\n : this.options.animationNextClass\n ElementAnimateUtil.animateClass(element, animation)\n }\n } else {\n if (index < this.currentStepIndex) {\n element.classList.add('completed')\n } else {\n element.classList.add('pending')\n }\n }\n }\n }\n\n private isLastStep = () => {\n return this.currentStepIndex === this.totatStepsNumber\n }\n\n private isFirstStep = () => {\n return this.currentStepIndex === 1\n }\n\n private isBetweenStep = () => {\n return this.isLastStep() === false && this.isFirstStep() === false\n }\n\n // ///////////////////////\n // // ** Public API ** //\n // ///////////////////////\n\n // // Plugin API\n public goto = (index: number) => {\n return this._goTo(index)\n }\n\n public goNext = () => {\n return this.goto(this.getNextStepIndex())\n }\n\n public goPrev = () => {\n return this.goto(this.getPrevStepIndex())\n }\n\n public goFirst = () => {\n return this.goto(1)\n }\n\n public goLast = () => {\n return this.goto(this.getLastStepIndex())\n }\n\n public getCurrentStepIndex = () => {\n return this.currentStepIndex\n }\n\n public getNextStepIndex = () => {\n if (this.totatStepsNumber >= this.currentStepIndex + 1) {\n return this.currentStepIndex + 1\n } else {\n return this.totatStepsNumber\n }\n }\n\n public getPassedStepIndex = () => {\n return this.passedStepIndex\n }\n\n public getPrevStepIndex = () => {\n if (this.currentStepIndex - 1 > 1) {\n return this.currentStepIndex - 1\n } else {\n return 1\n }\n }\n\n public getElement = (index: number) => {\n return this.element\n }\n\n // Event API\n public on = (name: string, handler: Function) => {\n return EventHandlerUtil.on(this.element, name, handler)\n }\n\n public one = (name: string, handler: Function) => {\n return EventHandlerUtil.one(this.element, name, handler)\n }\n\n public off = (name: string, handlerId: string) => {\n return EventHandlerUtil.off(this.element, name, handlerId)\n }\n\n public destroy = () => {\n defterdar_log('destroy stepper')\n }\n\n public trigger = (name: string, event: Event) => {\n return EventHandlerUtil.trigger(this.element, name, event)\n }\n\n // Static methods\n public static hasInstace(element: HTMLElement): boolean {\n return DataUtil.has(element, 'stepper')\n }\n\n public static getInstance(element: HTMLElement): StepperComponent | undefined {\n if (element !== null && StepperComponent.hasInstace(element)) {\n const data = DataUtil.get(element, 'stepper')\n if (data) {\n return data as StepperComponent\n }\n }\n }\n\n // Create Instances\n public static createInstances(selector: string): void {\n const elements = document.body.querySelectorAll(selector)\n elements.forEach((element) => {\n const item = element as HTMLElement\n let stepper = StepperComponent.getInstance(item)\n if (!stepper) {\n stepper = new StepperComponent(item, defaultStepperOptions)\n }\n })\n }\n\n public static createInsance = (\n element: HTMLElement,\n options: IStepperOptions = defaultStepperOptions\n ): StepperComponent | null => {\n if (!element) {\n return null\n }\n\n return new StepperComponent(element, options)\n // let stepper = StepperComponent.getInstance(element)\n // if (!stepper) {\n // stepper = new StepperComponent(element, options)\n // }\n // return stepper\n }\n\n public static bootstrap(attr: string = '[data-kt-stepper]') {\n StepperComponent.createInstances(attr)\n }\n}\n\nexport {StepperComponent, defaultStepperOptions}\n","import {\n getElementOffset,\n getScrollTop,\n getAttributeValueByBreakpoint,\n getUniqueIdWithPrefix,\n getObjectPropertyValueByKey,\n stringSnakeToCamel,\n getCSS,\n DataUtil,\n ElementAnimateUtil,\n ElementStyleUtil,\n EventHandlerUtil,\n} from '../_utils/index'\n\nexport interface StickyOptions {\n offset: number\n reverse: boolean\n animation: boolean\n animationSpeed: string\n animationClass: string\n}\n\nconst defaultStickyOptions: StickyOptions = {\n offset: 200,\n reverse: false,\n animation: true,\n animationSpeed: '0.3s',\n animationClass: 'animation-slide-in-down',\n}\n\nclass StickyComponent {\n element: HTMLElement\n options: StickyOptions\n instanceUid: string\n instanceName: string | null = ''\n attributeName: string\n eventTriggerState: boolean\n lastScrollTop: number\n\n constructor(_element: HTMLElement, options: StickyOptions) {\n this.element = _element\n this.options = Object.assign(defaultStickyOptions, options)\n this.instanceUid = getUniqueIdWithPrefix('sticky')\n this.instanceName = this.element.getAttribute('data-kt-sticky-name')\n this.attributeName = 'data-kt-sticky-' + this.instanceName\n this.eventTriggerState = true\n this.lastScrollTop = 0\n\n // Event Handlers\n window.addEventListener('scroll', this.scroll)\n\n // Initial Launch\n this.scroll()\n\n DataUtil.set(this.element, 'sticky', this)\n }\n\n private scroll = () => {\n let offset = this.getOption('offset')\n let reverse = this.getOption('reverse')\n\n // Exit if false\n if (offset === false) {\n return\n }\n\n let offsetNum = 0\n if (typeof offset === 'string') {\n offsetNum = parseInt(offset)\n }\n\n const st = getScrollTop()\n\n // Reverse scroll mode\n if (reverse === true) {\n // Release on reverse scroll mode\n if (st > offsetNum && this.lastScrollTop < st) {\n if (document.body.hasAttribute(this.attributeName) === false) {\n this.enable()\n document.body.setAttribute(this.attributeName, 'on')\n }\n\n if (this.eventTriggerState === true) {\n EventHandlerUtil.trigger(this.element, 'kt.sticky.on')\n EventHandlerUtil.trigger(this.element, 'kt.sticky.change')\n\n this.eventTriggerState = false\n }\n } else {\n // Back scroll mode\n if (document.body.hasAttribute(this.attributeName)) {\n this.disable()\n document.body.removeAttribute(this.attributeName)\n }\n\n if (this.eventTriggerState === false) {\n EventHandlerUtil.trigger(this.element, 'kt.sticky.off')\n EventHandlerUtil.trigger(this.element, 'kt.sticky.change')\n\n this.eventTriggerState = true\n }\n }\n\n this.lastScrollTop = st\n return\n }\n\n // Classic scroll mode\n if (st > offsetNum) {\n if (document.body.hasAttribute(this.attributeName) === false) {\n this.enable()\n document.body.setAttribute(this.attributeName, 'on')\n }\n\n if (this.eventTriggerState === true) {\n EventHandlerUtil.trigger(this.element, 'kt.sticky.on')\n EventHandlerUtil.trigger(this.element, 'kt.sticky.change')\n this.eventTriggerState = false\n }\n } else {\n // back scroll mode\n if (document.body.hasAttribute(this.attributeName) === true) {\n this.disable()\n document.body.removeAttribute(this.attributeName)\n }\n\n if (this.eventTriggerState === false) {\n EventHandlerUtil.trigger(this.element, 'kt.sticky.off')\n EventHandlerUtil.trigger(this.element, 'kt.sticky.change')\n this.eventTriggerState = true\n }\n }\n }\n\n private getOption = (name: string) => {\n const dataStickyAttr = 'data-kt-sticky-' + name\n if (this.element.hasAttribute(dataStickyAttr) === true) {\n const attrValueInStr = this.element.getAttribute(dataStickyAttr)\n const attrValue = getAttributeValueByBreakpoint(attrValueInStr || '')\n if (attrValue !== null && String(attrValue) === 'true') {\n return true\n } else if (attrValue !== null && String(attrValue) === 'false') {\n return false\n }\n\n return attrValue\n } else {\n const optionName = stringSnakeToCamel(name)\n const option = getObjectPropertyValueByKey(this.options, optionName)\n if (option) {\n return getAttributeValueByBreakpoint(option)\n }\n }\n }\n\n private disable = () => {\n ElementStyleUtil.remove(this.element, 'top')\n ElementStyleUtil.remove(this.element, 'width')\n ElementStyleUtil.remove(this.element, 'left')\n ElementStyleUtil.remove(this.element, 'right')\n ElementStyleUtil.remove(this.element, 'z-index')\n ElementStyleUtil.remove(this.element, 'position')\n }\n\n private enable = (update: boolean = false) => {\n const top = this.getOption('top')\n const left = this.getOption('left')\n // const right = this.getOption(\"right\");\n let width = this.getOption('width')\n const zindex = this.getOption('zindex')\n\n if (update !== true && this.getOption('animation') === true) {\n ElementStyleUtil.set(this.element, 'animationDuration', this.getOption('animationSpeed'))\n ElementAnimateUtil.animateClass(this.element, 'animation ' + this.getOption('animationClass'))\n }\n\n if (zindex !== null) {\n ElementStyleUtil.set(this.element, 'z-index', zindex)\n ElementStyleUtil.set(this.element, 'position', 'fixed')\n }\n\n if (top !== null) {\n ElementStyleUtil.set(this.element, 'top', top)\n }\n\n if (width !== null && width !== undefined) {\n const widthTarget = getObjectPropertyValueByKey(width, 'target')\n if (widthTarget) {\n const targetElement = document.querySelector(widthTarget)\n if (targetElement) {\n width = getCSS(targetElement, 'width')\n }\n }\n ElementStyleUtil.set(this.element, 'width', width)\n }\n\n if (left !== null) {\n if (String(left).toLowerCase() === 'auto') {\n var offsetLeft = getElementOffset(this.element).left\n\n if (offsetLeft > 0) {\n ElementStyleUtil.set(this.element, 'left', String(offsetLeft) + 'px')\n }\n }\n }\n }\n\n public update = () => {\n if (document.body.hasAttribute(this.attributeName) === true) {\n this.disable()\n document.body.removeAttribute(this.attributeName)\n this.enable(true)\n document.body.setAttribute(this.attributeName, 'on')\n }\n }\n\n // Event API\n public on = (name: string, callBack: Function) => {\n return EventHandlerUtil.on(this.element, name, callBack)\n }\n\n public one = (name: string, callback: Function) => {\n return EventHandlerUtil.one(this.element, name, callback)\n }\n\n public off = (name: string, handlerId: string) => {\n return EventHandlerUtil.off(this.element, name, handlerId)\n }\n\n public trigger = (name: string) => {\n return EventHandlerUtil.trigger(this.element, name)\n }\n\n // Static methods\n public static hasInstace(element: HTMLElement) {\n return DataUtil.has(element, 'sticky')\n }\n\n public static getInstance(element: HTMLElement): StickyComponent | undefined {\n if (element !== null && StickyComponent.hasInstace(element)) {\n const data = DataUtil.get(element, 'sticky')\n if (data) {\n return data as StickyComponent\n }\n }\n }\n\n // Create Instances\n public static createInstances(selector: string) {\n const elements = document.body.querySelectorAll(selector)\n elements.forEach((element) => {\n const item = element as HTMLElement\n let sticky = StickyComponent.getInstance(item)\n if (!sticky) {\n sticky = new StickyComponent(item, defaultStickyOptions)\n }\n })\n }\n\n public static createInsance = (\n selector: string,\n options: StickyOptions = defaultStickyOptions\n ): StickyComponent | undefined => {\n const element = document.body.querySelector(selector)\n if (!element) {\n return\n }\n const item = element as HTMLElement\n let sticky = StickyComponent.getInstance(item)\n if (!sticky) {\n sticky = new StickyComponent(item, options)\n }\n return sticky\n }\n\n public static bootstrap(attr: string = '[data-kt-sticky=\"true\"]') {\n StickyComponent.createInstances(attr)\n }\n\n public static reInitialization(attr: string = '[data-kt-sticky=\"true\"]') {\n StickyComponent.createInstances(attr)\n }\n}\n\nexport {StickyComponent, defaultStickyOptions}\n","import {DataUtil, getUniqueIdWithPrefix, EventHandlerUtil} from '../_utils/index'\n// Helpers\nimport {CookieComponent} from './_CookieComponent'\n\nexport interface ToggleOptions {\n saveState: boolean\n targetState?: string\n toggleState?: string\n targetToggleMode?: string\n}\n\nconst defaultToggleOptions: ToggleOptions = {\n saveState: false,\n}\n\nclass ToggleComponent {\n element: HTMLElement\n instanceUid: string\n options: ToggleOptions\n state: string = ''\n mode: string = ''\n target: HTMLElement | null = null\n attribute: string = ''\n\n constructor(_element: HTMLElement, options: ToggleOptions) {\n this.options = Object.assign(defaultToggleOptions, options)\n this.instanceUid = getUniqueIdWithPrefix('toggle')\n this.element = _element\n\n const elementTargetAttr = this.element.getAttribute('data-kt-toggle-target')\n if (elementTargetAttr) {\n this.target = document.querySelector(elementTargetAttr)\n }\n const elementToggleAttr = this.element.getAttribute('data-kt-toggle-state')\n this.state = elementToggleAttr || ''\n const elementModeAttr = this.element.getAttribute('data-kt-toggle-mode')\n this.mode = elementModeAttr || ''\n this.attribute = 'data-kt-' + this.element.getAttribute('data-kt-toggle-name')\n\n // Event Handlers\n this._handlers()\n\n // Update Instance\n // Bind Instance\n DataUtil.set(this.element, 'toggle', this)\n }\n\n private _handlers = () => {\n this.element.addEventListener('click', (e: Event) => {\n e.preventDefault()\n\n if (this.mode === '') {\n this._toggle()\n return\n }\n\n if (this.mode === 'off' && !this._isEnabled()) {\n this._toggle()\n } else if (this.mode === 'on' && this._isEnabled()) {\n this._toggle()\n }\n })\n }\n\n // Event handlers\n private _toggle = () => {\n // Trigger \"after.toggle\" event\n EventHandlerUtil.trigger(this.element, 'kt.toggle.change')\n\n if (this._isEnabled()) {\n this._disable()\n } else {\n this._enable()\n }\n\n // Trigger \"before.toggle\" event\n EventHandlerUtil.trigger(this.element, 'kt.toggle.changed')\n return this\n }\n\n private _enable = () => {\n if (this._isEnabled()) {\n return\n }\n\n EventHandlerUtil.trigger(this.element, 'kt.toggle.enable')\n this.target?.setAttribute(this.attribute, 'on')\n if (this.state.length > 0) {\n this.element.classList.add(this.state)\n }\n\n if (this.options.saveState) {\n CookieComponent.set(this.attribute, 'on', {})\n }\n\n EventHandlerUtil.trigger(this.element, 'kt.toggle.enabled')\n return this\n }\n\n private _disable = () => {\n if (!this._isEnabled()) {\n return false\n }\n\n EventHandlerUtil.trigger(this.element, 'kt.toggle.disable')\n this.target?.removeAttribute(this.attribute)\n\n if (this.state.length > 0) {\n this.element.classList.remove(this.state)\n }\n\n if (this.options.saveState) {\n CookieComponent.delete(this.attribute)\n }\n\n EventHandlerUtil.trigger(this.element, 'kt.toggle.disabled')\n return this\n }\n\n private _isEnabled = () => {\n if (!this.target) {\n return false\n }\n\n return String(this.target.getAttribute(this.attribute)).toLowerCase() === 'on'\n }\n\n ///////////////////////\n // ** Public API ** //\n ///////////////////////\n\n // Plugin API\n // Plugin API\n public toggle = () => {\n return this._toggle()\n }\n\n public enable = () => {\n return this._enable()\n }\n\n public disable = () => {\n return this._disable()\n }\n\n public isEnabled = () => {\n return this._isEnabled()\n }\n\n public goElement = () => {\n return this.element\n }\n\n // Event API\n public on = (name: string, handler: Function) => {\n return EventHandlerUtil.on(this.element, name, handler)\n }\n\n public one = (name: string, handler: Function) => {\n return EventHandlerUtil.one(this.element, name, handler)\n }\n\n public off = (name: string, handlerId: string) => {\n return EventHandlerUtil.off(this.element, name, handlerId)\n }\n\n public trigger = (name: string, event?: Event) => {\n return EventHandlerUtil.trigger(this.element, name, event)\n }\n\n // Static methods\n public static getInstance = (el: HTMLElement) => {\n const toggleElement = DataUtil.get(el, 'toggle')\n if (toggleElement) {\n return toggleElement\n }\n\n return null\n }\n\n public static createInstances = (selector: string) => {\n const elements = document.body.querySelectorAll(selector)\n elements.forEach((el) => {\n let toggle = ToggleComponent.getInstance(el)\n if (!toggle) {\n toggle = new ToggleComponent(el, defaultToggleOptions)\n }\n })\n }\n\n public static reinitialization = () => {\n ToggleComponent.createInstances('[data-kt-toggle]')\n }\n\n public static bootstrap = () => {\n ToggleComponent.createInstances('[data-kt-toggle]')\n }\n\n public static IsEnabled = () => {\n const elements = document.body.querySelectorAll('[data-kt-toggle]')\n\n const toggle = new ToggleComponent(elements[0], defaultToggleOptions)\n\n return toggle.isEnabled()\n }\n}\n\nexport {ToggleComponent, defaultToggleOptions}\n","/* eslint-disable array-callback-return */\n/* eslint-disable no-useless-escape */\nimport {DataUtil} from '../_utils/index'\n\nexport interface IPasswordMeterOptions {\n minLength: number\n checkUppercase: boolean\n checkLowercase: boolean\n checkDigit: boolean\n checkChar: boolean\n scoreHighlightClass: string\n}\n\nexport interface IPasswordMeterQueries {\n componentName: string\n instanseQuery: string\n inputQuery: string\n visibilityQuery: string\n highlightQuery: string\n}\n\nconst defaultPasswordMeterOptions = {\n minLength: 8,\n checkUppercase: true,\n checkLowercase: true,\n checkDigit: true,\n checkChar: true,\n scoreHighlightClass: 'active',\n}\n\nconst defaultPasswordMeterQueires: IPasswordMeterQueries = {\n componentName: 'password-meter',\n instanseQuery: '[data-kt-password-meter]',\n inputQuery: 'input[type]',\n visibilityQuery: '[data-kt-password-meter-control=\"visibility\"]',\n highlightQuery: '[data-kt-password-meter-control=\"highlight\"]',\n}\n\nclass PasswordMeterComponent {\n element: HTMLElement\n inputElement: HTMLInputElement | null\n visibilityElement: HTMLElement | null\n highlightElement: HTMLElement | null\n options: IPasswordMeterOptions\n queries: IPasswordMeterQueries\n score: number\n checkSteps: number\n\n constructor(\n _element: HTMLElement,\n _options: IPasswordMeterOptions,\n _queries: IPasswordMeterQueries\n ) {\n this.element = _element\n this.options = Object.assign(defaultPasswordMeterOptions, _options)\n this.queries = _queries\n this.score = 0\n this.checkSteps = 5\n\n // Elements\n this.inputElement = this.element.querySelector(this.queries.inputQuery)\n this.visibilityElement = this.element.querySelector(this.queries.visibilityQuery)\n this.highlightElement = this.element.querySelector(this.queries.highlightQuery)\n\n // Event Handlers\n this.handlers()\n\n DataUtil.set(this.element, this.queries.componentName, this)\n }\n\n private handlers(): void {\n if (this.inputElement) {\n this.inputElement.addEventListener('input', () => {\n this.check()\n })\n }\n\n if (this.visibilityElement) {\n this.visibilityElement.addEventListener('click', () => {\n this.visitbility()\n })\n }\n }\n\n private visitbility() {\n if (this.visibilityElement && this.inputElement) {\n const visibleIcon = this.visibilityElement.querySelector(\n 'i:not(.d-none), .svg-icon:not(.d-none)'\n )\n\n const hiddenIcon = this.visibilityElement.querySelector('i.d-none, .svg-icon.d-none')\n\n const typeAttr = this.inputElement.getAttribute('type') || ''\n\n if (typeAttr === 'password') {\n this.inputElement.setAttribute('type', 'text')\n } else {\n this.inputElement.setAttribute('type', 'password')\n }\n\n visibleIcon?.classList.add('d-none')\n hiddenIcon?.classList.remove('d-none')\n\n this.inputElement.focus()\n }\n }\n\n private checkScore(): number {\n return 0\n }\n\n private checkLength(): boolean {\n if (this.inputElement) {\n return this.inputElement.value.length >= this.options.minLength // 20 score\n }\n\n return false\n }\n\n private checkLowerCase(): boolean {\n const val = this.inputElement ? this.inputElement.value : ''\n return /[a-z]/.test(val) // 20 score\n }\n\n private checkUppercase(): boolean {\n const val = this.inputElement ? this.inputElement.value : ''\n return /[A-Z]/.test(val) // 20 score\n }\n\n private checkDigit(): boolean {\n const val = this.inputElement ? this.inputElement.value : ''\n return /[0-9]/.test(val) // 20 score\n }\n\n private checkChar(): boolean {\n const val = this.inputElement ? this.inputElement.value : ''\n return /[~`!#$%\\^&*+=\\-\\[\\]\\\\';,/{}|\\\\\":<>\\?]/g.test(val) // 20 score\n }\n\n private getCheckScore(): number {\n let count = 1\n if (this.options.checkUppercase) {\n count++\n }\n\n if (this.options.checkLowercase) {\n count++\n }\n\n if (this.options.checkDigit) {\n count++\n }\n\n if (this.options.checkChar) {\n count++\n }\n\n this.checkSteps = count\n return 100 / this.checkSteps\n }\n\n private highlight() {\n const items = this.highlightElement\n ? [].slice.call(this.highlightElement.querySelectorAll('div'))\n : []\n const total = items.length\n let index = 0\n const checkScore = this.getCheckScore()\n const score = this.getScore()\n\n items.map((item: HTMLElement) => {\n index++\n if (checkScore * index * (this.checkSteps / total) <= score) {\n item.classList.add('active')\n } else {\n item.classList.remove('active')\n }\n })\n }\n\n ///////////////////////\n // ** Public API ** //\n ///////////////////////\n public reset = () => {\n this.score = 0\n this.highlight()\n }\n\n public getScore() {\n return this.score\n }\n\n public check() {\n let score = 0\n const checkScore = this.getCheckScore()\n if (this.checkLength()) {\n score = score + checkScore\n }\n\n if (this.options.checkUppercase && this.checkLowerCase()) {\n score = score + checkScore\n }\n\n if (this.options.checkLowercase && this.checkUppercase()) {\n score = score + checkScore\n }\n\n if (this.options.checkDigit && this.checkDigit()) {\n score = score + checkScore\n }\n\n if (this.options.checkChar && this.checkChar()) {\n score = score + checkScore\n }\n\n this.score = score\n this.highlight()\n }\n\n // Static methods\n public static getInstance = (\n el: HTMLElement,\n componentName: string = defaultPasswordMeterQueires.componentName\n ): PasswordMeterComponent | undefined => {\n const passwordMeter = DataUtil.get(el, componentName)\n if (passwordMeter) {\n return passwordMeter as PasswordMeterComponent\n }\n }\n\n public static createInstances = (\n selector: string = defaultPasswordMeterQueires.instanseQuery,\n options: IPasswordMeterOptions = defaultPasswordMeterOptions,\n queries: IPasswordMeterQueries = defaultPasswordMeterQueires\n ) => {\n const elements = document.body.querySelectorAll(selector)\n elements.forEach((el) => {\n const item = el as HTMLElement\n let passwordMeter = PasswordMeterComponent.getInstance(item)\n if (!passwordMeter) {\n passwordMeter = new PasswordMeterComponent(item, options, queries)\n }\n })\n }\n\n public static createInsance = (\n selector: string = defaultPasswordMeterQueires.instanseQuery,\n options: IPasswordMeterOptions = defaultPasswordMeterOptions,\n queries: IPasswordMeterQueries = defaultPasswordMeterQueires\n ): PasswordMeterComponent | undefined => {\n const element = document.body.querySelector(selector)\n if (!element) {\n return\n }\n const item = element as HTMLElement\n let passwordMeter = PasswordMeterComponent.getInstance(item)\n if (!passwordMeter) {\n passwordMeter = new PasswordMeterComponent(item, options, queries)\n }\n return passwordMeter\n }\n\n public static bootstrap = (selector: string = defaultPasswordMeterQueires.instanseQuery) => {\n PasswordMeterComponent.createInstances(selector)\n }\n\n public static reinitialization = (\n selector: string = defaultPasswordMeterQueires.instanseQuery\n ) => {\n PasswordMeterComponent.createInstances(selector)\n }\n}\nexport {PasswordMeterComponent, defaultPasswordMeterOptions, defaultPasswordMeterQueires}\n","import {\n getAttributeValueByBreakpoint,\n stringSnakeToCamel,\n getObjectPropertyValueByKey,\n EventHandlerUtil,\n throttle,\n} from '../_utils/index'\n\nexport class SwapperStore {\n static store: Map = new Map()\n\n public static set(instanceId: string, drawerComponentObj: SwapperComponent): void {\n if (SwapperStore.has(instanceId)) {\n return\n }\n\n SwapperStore.store.set(instanceId, drawerComponentObj)\n }\n\n public static get(instanceId: string): SwapperComponent | undefined {\n if (!SwapperStore.has(instanceId)) {\n return\n }\n return SwapperStore.store.get(instanceId)\n }\n\n public static remove(instanceId: string): void {\n if (!SwapperStore.has(instanceId)) {\n return\n }\n\n SwapperStore.store.delete(instanceId)\n }\n\n public static has(instanceId: string): boolean {\n return SwapperStore.store.has(instanceId)\n }\n\n public static getAllInstances() {\n return SwapperStore.store\n }\n}\n\nexport interface ISwapperOptions {\n mode: string\n}\n\nexport interface ISwapperQueries {\n componentName: string\n instanseQuery: string\n attrQuery: string\n}\n\nconst defaultSwapperOptions: ISwapperOptions = {\n mode: 'append',\n}\n\nconst defaultSwapperQueires: ISwapperQueries = {\n componentName: 'swapper',\n instanseQuery: '[data-kt-swapper=\"true\"]',\n attrQuery: 'data-kt-swapper-',\n}\n\nclass SwapperComponent {\n element: HTMLElement\n options: ISwapperOptions\n queries: ISwapperQueries\n\n constructor(_element: HTMLElement, _options: ISwapperOptions, _queries: ISwapperQueries) {\n this.element = _element\n this.options = Object.assign(defaultSwapperOptions, _options)\n this.queries = _queries\n\n // Initial update\n this.update()\n\n SwapperStore.set(this.element.id, this)\n }\n\n private getOption(name: string) {\n const attr = this.element.getAttribute(`${this.queries.attrQuery}${name}`)\n if (attr) {\n let value = getAttributeValueByBreakpoint(attr)\n if (attr != null && String(value) === 'true') {\n return true\n } else if (value !== null && String(value) === 'false') {\n return false\n }\n return value\n } else {\n const optionName = stringSnakeToCamel(name)\n const option = getObjectPropertyValueByKey(this.options, optionName)\n if (option) {\n return getAttributeValueByBreakpoint(option)\n } else {\n return null\n }\n }\n }\n\n ///////////////////////\n // ** Public API ** //\n ///////////////////////\n public update = () => {\n const parentSelector = this.getOption('parent')?.toString()\n const mode = this.getOption('mode')\n const parentElement = parentSelector ? document.querySelector(parentSelector) : null\n if (parentElement && this.element.parentNode !== parentElement) {\n const alreadyPended = document.getElementById('kt_header_menu') !== null\n if (!alreadyPended) {\n if (mode === 'prepend') {\n parentElement.prepend(this.element)\n } else if (mode === 'append') {\n parentElement.append(this.element)\n }\n }\n }\n }\n\n // Event API\n public on = (name: string, handler: Function) => {\n return EventHandlerUtil.on(this.element, name, handler)\n }\n\n public one = (name: string, handler: Function) => {\n return EventHandlerUtil.one(this.element, name, handler)\n }\n\n public off = (name: string, handlerId: string) => {\n return EventHandlerUtil.off(this.element, name, handlerId)\n }\n\n public trigger = (name: string, event: Event) => {\n return EventHandlerUtil.trigger(this.element, name, event)\n }\n\n // Static methods\n public static getInstance = (\n el: HTMLElement,\n componentName: string = defaultSwapperQueires.componentName\n ): SwapperComponent | null => {\n const place = SwapperStore.get(el.id)\n if (place) {\n return place as SwapperComponent\n }\n\n return null\n }\n\n public static createInstances = (\n selector: string = defaultSwapperQueires.instanseQuery,\n options: ISwapperOptions = defaultSwapperOptions,\n queries: ISwapperQueries = defaultSwapperQueires\n ) => {\n const elements = document.body.querySelectorAll(selector)\n elements.forEach((el) => {\n const item = el as HTMLElement\n let place = SwapperComponent.getInstance(item)\n if (!place) {\n place = new SwapperComponent(item, options, queries)\n }\n })\n }\n\n public static createInsance = (\n selector: string = defaultSwapperQueires.instanseQuery,\n options: ISwapperOptions = defaultSwapperOptions,\n queries: ISwapperQueries = defaultSwapperQueires\n ): SwapperComponent | undefined => {\n const element = document.body.querySelector(selector)\n if (!element) {\n return\n }\n const item = element as HTMLElement\n let place = SwapperComponent.getInstance(item)\n if (!place) {\n place = new SwapperComponent(item, options, queries)\n }\n return place\n }\n\n public static bootstrap = (selector: string = defaultSwapperQueires.instanseQuery) => {\n SwapperComponent.createInstances(selector)\n }\n\n public static reinitialization = (selector: string = defaultSwapperQueires.instanseQuery) => {\n SwapperComponent.createInstances(selector)\n }\n}\n\n// Window resize handler\nwindow.addEventListener('resize', function () {\n let timer\n throttle(\n timer,\n () => {\n // Locate and update Offcanvas instances on window resize\n const elements = document.querySelectorAll(defaultSwapperQueires.instanseQuery)\n elements.forEach((el) => {\n const place = SwapperComponent.getInstance(el as HTMLElement)\n if (place) {\n place.update()\n }\n })\n },\n 200\n )\n})\n\nexport {SwapperComponent, defaultSwapperOptions, defaultSwapperQueires}\n","import {createPopper, VirtualElement} from '@popperjs/core'\nimport {\n getElementChild,\n getElementParents,\n getAttributeValueByBreakpoint,\n getUniqueIdWithPrefix,\n DataUtil,\n ElementStyleUtil,\n EventHandlerUtil,\n insertAfterElement,\n slideUp,\n slideDown,\n DOMEventHandlerUtil,\n throttle,\n getHighestZindex,\n} from '../_utils/index'\n\nexport interface MenuOptions {\n dropdown: {\n hoverTimeout: number\n zindex: number\n }\n accordion: {\n slideSpeed: number\n expand: boolean\n }\n}\n\nconst defaultMenuOptions: MenuOptions = {\n dropdown: {\n hoverTimeout: 200,\n zindex: 105,\n },\n accordion: {\n slideSpeed: 250,\n expand: false,\n },\n}\n\ntype PopperPlacement =\n | 'right'\n | 'auto'\n | 'auto-start'\n | 'auto-end'\n | 'top'\n | 'bottom'\n | 'left'\n | 'top-start'\n | 'top-end'\n | 'bottom-start'\n | 'bottom-end'\n | 'right-start'\n | 'right-end'\n | 'left-start'\n | 'left-end'\n | undefined\n\nclass MenuComponent {\n element: HTMLElement\n options: MenuOptions\n instanceUid: string\n triggerElement: HTMLElement | null = null\n\n constructor(_element: HTMLElement, options: MenuOptions) {\n this.element = _element\n this.options = Object.assign(defaultMenuOptions, options)\n this.instanceUid = getUniqueIdWithPrefix('menu')\n // this.element.setAttribute('data-kt-menu', 'true')\n this._setTriggerElement()\n this._update()\n DataUtil.set(this.element, 'menu', this)\n return this\n }\n\n // Set external trigger element\n private _setTriggerElement = () => {\n const target = document.querySelector(\n `[data-kt-menu-target=\"#${this.element.getAttribute('id')}\"`\n )\n\n if (target) {\n this.triggerElement = target as HTMLElement\n } else if (this.element.closest('[data-kt-menu-trigger]')) {\n this.triggerElement = this.element.closest('[data-kt-menu-trigger]') as HTMLElement\n } else if (\n this.element.parentNode &&\n getElementChild(this.element.parentNode as HTMLElement, '[data-kt-menu-trigger]')\n ) {\n const child = getElementChild(\n this.element.parentNode as HTMLElement,\n '[data-kt-menu-trigger]'\n )\n if (child) {\n this.triggerElement = child\n }\n }\n\n if (this.triggerElement) {\n DataUtil.set(this.triggerElement, 'menu', this)\n }\n }\n\n // Test if menu has external trigger element\n private _isTriggerElement = (item: HTMLElement) => {\n return this.triggerElement === item\n }\n\n // Get item option(through html attributes)\n private _getItemOption = (item: HTMLElement, name: string) => {\n let value: string | JSON | null | boolean = null\n if (item && item.hasAttribute('data-kt-menu-' + name)) {\n const attr = item.getAttribute('data-kt-menu-' + name) || ''\n value = getAttributeValueByBreakpoint(attr)\n if (value !== null && String(value) === 'true') {\n value = true\n } else if (value !== null && String(value) === 'false') {\n value = false\n }\n }\n return value\n }\n\n // Get item element\n private _getItemElement = (_element: HTMLElement): HTMLElement | undefined => {\n // Element is the external trigger element\n if (this._isTriggerElement(_element)) {\n return _element\n }\n\n // Element has item toggler attribute\n if (_element.hasAttribute('data-kt-menu-trigger')) {\n return _element\n }\n\n // Element has item DOM reference in it's data storage\n const itemElement = DataUtil.get(_element, 'item')\n if (itemElement) {\n return itemElement as HTMLElement\n }\n\n // Item is parent of element\n const item = _element.closest('.menu-item[data-kt-menu-trigger]')\n if (item) {\n return item\n }\n\n // Element's parent has item DOM reference in it's data storage\n const sub = _element.closest('.menu-sub')\n if (sub) {\n const subItem = DataUtil.get(sub as HTMLElement, 'item')\n if (subItem) {\n return subItem as HTMLElement\n }\n }\n }\n\n // Get item parent element\n private _getItemParentElement = (item: HTMLElement) => {\n const sub = item.closest('.menu-sub')\n if (!sub) {\n return null\n }\n\n const subItem = DataUtil.get(sub, 'item')\n if (subItem) {\n return subItem as HTMLElement\n }\n\n const parentItem = sub.closest('.menu-item[data-kt-menu-trigger]')\n if (sub && parentItem) {\n return parentItem\n }\n\n return null\n }\n\n // Get item parent elements\n private _getItemParentElements = (item: HTMLElement) => {\n const parents: Array = []\n let parent: HTMLElement | null\n let i = 0\n let buffer: HTMLElement = item\n\n do {\n parent = this._getItemParentElement(buffer)\n if (parent) {\n parents.push(parent)\n buffer = parent as HTMLElement\n }\n\n i++\n } while (parent !== null && i < 20)\n\n if (this.triggerElement) {\n parents.unshift(this.triggerElement)\n }\n\n return parents\n }\n\n // Prepare popper config for dropdown(see: https://popper.js.org/docs/v2/)\n private _getDropdownPopperConfig = (item: HTMLElement) => {\n // Placement\n const placementOption = this._getItemOption(item, 'placement')\n let placement: PopperPlacement = 'right'\n if (placementOption) {\n placement = placementOption as PopperPlacement\n }\n\n // Flip\n // const flipValue = this._getItemOption(item, 'flip')\n // const flip = flipValue ? flipValue.toString().split(',') : []\n\n // Offset\n const offsetValue = this._getItemOption(item, 'offset')\n const offset = offsetValue ? offsetValue.toString().split(',') : []\n\n // Strategy\n const strategy: 'absolute' | 'fixed' | undefined =\n this._getItemOption(item, 'overflow') === true ? 'absolute' : 'fixed'\n\n return {\n placement: placement,\n strategy: strategy,\n modifiers: [\n {\n name: 'offset',\n options: {\n offset: offset,\n },\n },\n {\n name: 'preventOverflow',\n },\n {\n name: 'flip',\n options: {\n // altBoundary: true,\n // fallbackPlacements: flip,\n flipVariations: false,\n },\n },\n ],\n }\n }\n\n // Get item child element\n private _getItemChildElement = (item: HTMLElement): HTMLElement | null => {\n let selector = item\n\n const subItem = DataUtil.get(item, 'sub')\n if (subItem) {\n selector = subItem as HTMLElement\n }\n\n if (selector) {\n //element = selector.querySelector('.show.menu-item[data-kt-menu-trigger]');\n const element = selector.querySelector('.menu-item[data-kt-menu-trigger]')\n if (element) {\n return element\n }\n }\n return null\n }\n\n // Get item child elements\n private _getItemChildElements = (item: HTMLElement) => {\n const children: Array = []\n let child: HTMLElement | null\n let i = 0\n let buffer = item\n do {\n child = this._getItemChildElement(buffer)\n if (child) {\n children.push(child)\n buffer = child as HTMLElement\n }\n\n i++\n } while (child !== null && i < 20)\n\n return children\n }\n\n // Get item sub element\n private _getItemSubElement = (item: HTMLElement): HTMLElement | null => {\n if (!item) {\n return null\n }\n\n if (this._isTriggerElement(item)) {\n return this.element\n }\n\n if (item.classList.contains('menu-sub')) {\n return item\n } else if (DataUtil.has(item, 'sub')) {\n const itemSub = DataUtil.get(item, 'sub')\n return itemSub ? (itemSub as HTMLElement) : null\n } else {\n return getElementChild(item, '.menu-sub')\n }\n }\n\n private _getCss = (el: HTMLElement, styleProp: string) => {\n const defaultView = (el.ownerDocument || document).defaultView\n if (!defaultView) {\n return ''\n }\n\n // sanitize property name to css notation\n // (hyphen separated words eg. font-Size)\n styleProp = styleProp.replace(/([A-Z])/g, '-$1').toLowerCase()\n\n return defaultView.getComputedStyle(el, null).getPropertyValue(styleProp)\n }\n\n // Get item sub type\n private _getItemSubType = (element: HTMLElement) => {\n const sub = this._getItemSubElement(element)\n if (sub && parseInt(this._getCss(sub as HTMLElement, 'z-index')) > 0) {\n return 'dropdown'\n } else {\n return 'accordion'\n }\n }\n\n // Test if item's sub is shown\n private _isItemSubShown = (item: HTMLElement) => {\n let sub = this._getItemSubElement(item)\n if (sub) {\n if (this._getItemSubType(item) === 'dropdown') {\n const subHTMLElement = sub as HTMLElement\n return (\n subHTMLElement.classList.contains('show') &&\n subHTMLElement.hasAttribute('data-popper-placement')\n )\n } else {\n return item.classList.contains('show')\n }\n }\n\n return false\n }\n\n // Test if item dropdown is permanent\n private _isItemDropdownPermanent = (item: HTMLElement) => {\n return this._getItemOption(item, 'permanent') === true\n }\n\n // Test if item's parent is shown\n private _isItemParentShown = (item: HTMLElement) => {\n return getElementParents(item, '.menu-item.show').length > 0\n }\n\n // Test of it is item sub element\n private _isItemSubElement = (item: HTMLElement) => {\n return item.classList.contains('menu-sub')\n }\n\n // Test if item has sub\n private _hasItemSub = (item: HTMLElement) => {\n return item.classList.contains('menu-item') && item.hasAttribute('data-kt-menu-trigger')\n }\n\n // Get link element\n private _getItemLinkElement = (item: HTMLElement) => {\n return getElementChild(item, '.menu-link')\n }\n\n // Get toggle element\n private _getItemToggleElement = (item: HTMLElement) => {\n if (this.triggerElement) {\n return this.triggerElement\n }\n\n return this._getItemLinkElement(item)\n }\n\n // Show item dropdown\n private _showDropdown = (item: HTMLElement) => {\n if (EventHandlerUtil.trigger(this.element, 'kt.menu.dropdown.show') === false) {\n return\n }\n\n // Hide all currently shown dropdowns except current one\n MenuComponent.hideDropdowns(item)\n\n // const toggle = this._isTriggerElement(item) ? item : this._getItemLinkElement(item);\n const sub = this._getItemSubElement(item)\n const width = this._getItemOption(item, 'width')\n const height = this._getItemOption(item, 'height')\n\n let zindex = this.options.dropdown.zindex\n const parentZindex = getHighestZindex(item) // update\n // Apply a new z-index if dropdown's toggle element or it's parent has greater z-index // update\n if (parentZindex !== null && parentZindex >= zindex) {\n zindex = parentZindex + 1\n }\n\n if (zindex && sub) {\n ElementStyleUtil.set(sub, 'z-index', zindex)\n }\n\n if (width && sub) {\n ElementStyleUtil.set(sub, 'width', width)\n }\n\n if (height && sub) {\n ElementStyleUtil.set(sub, 'height', height)\n }\n\n this.initDropdownPopper(item, sub as HTMLElement)\n\n item.classList.add('show')\n item.classList.add('menu-dropdown')\n sub?.classList.add('show')\n\n // Append the sub the the root of the menu\n if (this._getItemOption(item, 'overflow') === true) {\n if (sub) {\n document.body.appendChild(sub)\n DataUtil.set(item, 'sub', sub)\n DataUtil.set(sub, 'item', item)\n DataUtil.set(sub, 'menu', this)\n }\n } else {\n if (sub) {\n DataUtil.set(sub, 'item', item)\n }\n }\n\n EventHandlerUtil.trigger(this.element, 'kt.menu.dropdown.shown')\n }\n\n // Init dropdown popper(new)\n private initDropdownPopper = (item: HTMLElement, sub: HTMLElement) => {\n // Setup popper instance\n let reference\n const attach = this._getItemOption(item, 'attach') as string\n\n if (attach) {\n if (attach === 'parent') {\n reference = item.parentNode\n } else {\n reference = document.querySelector(attach)\n }\n } else {\n reference = item\n }\n\n if (reference) {\n const popper = createPopper(\n reference as Element | VirtualElement,\n sub,\n this._getDropdownPopperConfig(item)\n )\n DataUtil.set(item, 'popper', popper)\n }\n }\n\n // Hide item dropdown\n private _hideDropdown = (item: HTMLElement) => {\n if (EventHandlerUtil.trigger(this.element, 'kt.menu.dropdown.hide') === false) {\n return\n }\n\n const sub = this._getItemSubElement(item)\n if (sub) {\n ElementStyleUtil.set(sub, 'z-index', '')\n ElementStyleUtil.set(sub, 'width', '')\n ElementStyleUtil.set(sub, 'height', '')\n }\n\n item.classList.remove('show')\n item.classList.remove('menu-dropdown')\n if (sub) {\n sub.classList.remove('show')\n }\n\n // Append the sub back to it's parent\n if (this._getItemOption(item, 'overflow') === true) {\n if (item.classList.contains('menu-item')) {\n if (sub) {\n item.appendChild(sub)\n }\n } else {\n insertAfterElement(this.element, item)\n }\n\n if (sub) {\n DataUtil.remove(item, 'sub')\n DataUtil.remove(sub, 'item')\n DataUtil.remove(sub, 'menu')\n }\n }\n\n if (DataUtil.has(item, 'popper') === true) {\n // @ts-ignore\n DataUtil.get(item, 'popper').destroy()\n DataUtil.remove(item, 'popper')\n }\n\n // Destroy popper(new)\n this.destroyDropdownPopper(item)\n EventHandlerUtil.trigger(this.element, 'kt.menu.dropdown.hidden')\n }\n\n // Destroy dropdown popper(new)\n private destroyDropdownPopper = (item: HTMLElement) => {\n if (DataUtil.has(item, 'popper') === true) {\n // @ts-ignore\n DataUtil.get(item, 'popper').destroy()\n DataUtil.remove(item, 'popper')\n }\n\n EventHandlerUtil.trigger(this.element, 'kt.menu.dropdown.hidden')\n }\n\n private _showAccordion = (item: HTMLElement) => {\n if (EventHandlerUtil.trigger(this.element, 'kt.menu.accordion.show') === false) {\n return\n }\n\n if (this.options.accordion.expand === false) {\n this._hideAccordions(item)\n }\n\n if (DataUtil.has(item, 'popper') === true) {\n this._hideDropdown(item)\n }\n\n item.classList.add('hover') // updateWW\n item.classList.add('showing')\n\n const subElement = this._getItemSubElement(item)\n if (subElement) {\n const sub = subElement as HTMLElement\n slideDown(sub, this.options.accordion.slideSpeed, () => {\n item.classList.remove('showing')\n item.classList.add('show')\n sub.classList.add('show')\n EventHandlerUtil.trigger(this.element, 'kt.menu.accordion.shown')\n })\n }\n }\n\n private _hideAccordion = (item: HTMLElement) => {\n if (EventHandlerUtil.trigger(this.element, 'kt.menu.accordion.hide') === false) {\n return\n }\n\n const sub = this._getItemSubElement(item)\n item.classList.add('hiding')\n\n if (sub) {\n slideUp(sub, this.options.accordion.slideSpeed, () => {\n item.classList.remove('hiding')\n item.classList.remove('show')\n sub.classList.remove('show')\n item.classList.remove('hover') // update\n EventHandlerUtil.trigger(this.element, 'kt.menu.accordion.hidden')\n })\n }\n }\n\n // Hide all shown accordions of item\n private _hideAccordions = (item: HTMLElement) => {\n const itemsToHide = this.element.querySelectorAll('.show[data-kt-menu-trigger]')\n if (itemsToHide && itemsToHide.length > 0) {\n for (var i = 0, len = itemsToHide.length; i < len; i++) {\n const itemToHide = itemsToHide[i] as HTMLElement\n\n if (\n this._getItemSubType(itemToHide) === 'accordion' &&\n itemToHide !== item &&\n item.contains(itemToHide) === false &&\n itemToHide.contains(item) === false\n ) {\n this._hideAccordion(itemToHide)\n }\n }\n }\n }\n\n // Event Handlers\n // Reset item state classes if item sub type changed\n private _reset = (item: HTMLElement) => {\n if (this._hasItemSub(item) === false) {\n return\n }\n\n const sub = this._getItemSubElement(item)\n\n // Reset sub state if sub type is changed during the window resize\n if (DataUtil.has(item, 'type') && DataUtil.get(item, 'type') !== this._getItemSubType(item)) {\n // updated\n item.classList.remove('hover')\n item.classList.remove('show')\n item.classList.remove('show')\n if (sub) {\n sub.classList.remove('show')\n }\n } // updated\n }\n\n // TODO: not done\n private _destroy = () => {}\n\n // Update all item state classes if item sub type changed\n private _update = () => {\n const items = this.element.querySelectorAll('.menu-item[data-kt-menu-trigger]')\n items.forEach((el) => this._reset(el as HTMLElement))\n }\n\n // Hide item sub\n private _hide = (item: HTMLElement) => {\n if (!item) {\n return\n }\n\n if (this._isItemSubShown(item) === false) {\n return\n }\n\n if (this._getItemSubType(item) === 'dropdown') {\n this._hideDropdown(item)\n } else if (this._getItemSubType(item) === 'accordion') {\n this._hideAccordion(item)\n }\n }\n\n // Show item sub\n private _show = (item: HTMLElement) => {\n if (!item) {\n return\n }\n\n if (this._isItemSubShown(item) === true) {\n return\n }\n\n if (this._getItemSubType(item) === 'dropdown') {\n this._showDropdown(item) // // show current dropdown\n } else if (this._getItemSubType(item) === 'accordion') {\n this._showAccordion(item)\n }\n\n // Remember last submenu type\n\n DataUtil.set(item, 'type', this._getItemSubType(item)) // updated\n }\n\n // Toggle item sub\n private _toggle = (item: HTMLElement) => {\n if (!item) {\n return\n }\n\n if (this._isItemSubShown(item) === true) {\n this._hide(item)\n } else {\n this._show(item)\n }\n }\n\n // Mouseout handle\n private _mouseout = (element: HTMLElement, e: MouseEvent) => {\n const item = this._getItemElement(element)\n if (!item) {\n return\n }\n\n if (this._getItemOption(item, 'trigger') !== 'hover') {\n return\n }\n\n const timeout = setTimeout(() => {\n if (DataUtil.get(item, 'hover') === '1') {\n this._hide(item)\n }\n }, this.options.dropdown.hoverTimeout)\n\n DataUtil.set(item, 'hover', '1')\n DataUtil.set(item, 'timeout', timeout)\n }\n\n // Mouseover handle\n private _mouseover = (element: HTMLElement, e: MouseEvent) => {\n const item = this._getItemElement(element)\n if (!item) {\n return\n }\n\n if (this._getItemOption(item, 'trigger') !== 'hover') {\n return\n }\n\n if (DataUtil.get(item, 'hover') === '1') {\n const timeout = DataUtil.get(item, 'timeout')\n if (timeout) {\n clearTimeout(timeout as number)\n }\n DataUtil.remove(item, 'hover')\n DataUtil.remove(item, 'timeout')\n }\n\n this._show(item)\n }\n\n // Dismiss handler\n private _dismiss = (element: HTMLElement, e: Event) => {\n const item = this._getItemElement(element)\n if (!item) {\n return\n }\n const items = this._getItemChildElements(item)\n //if ( item !== null && _getItemOption(item, 'trigger') === 'click' && _getItemSubType(item) === 'dropdown' ) {\n const itemSubType = this._getItemSubType(item)\n if (item !== null && itemSubType === 'dropdown') {\n this._hide(item) // hide items dropdown\n\n // Hide all child elements as well\n if (items.length > 0) {\n for (let i = 0, len = items.length; i < len; i++) {\n //if ( _getItemOption(item, 'trigger') === 'click' && _getItemSubType(item) === 'dropdown' ) {\n if (items[i] !== null && this._getItemSubType(items[i] as HTMLElement) === 'dropdown') {\n this._hide(items[i] as HTMLElement)\n }\n }\n }\n }\n }\n\n // Link handler\n private _link = (element: HTMLElement, e: Event) => {\n if (EventHandlerUtil.trigger(this.element, 'kt.menu.link.click') === false) {\n return\n }\n\n // Dismiss all shown dropdowns\n MenuComponent.hideDropdowns(undefined)\n EventHandlerUtil.trigger(this.element, 'kt.menu.link.clicked')\n }\n\n private _click = (element: HTMLElement, e: Event) => {\n e.preventDefault()\n const item = this._getItemElement(element)\n if (item) {\n if (this._getItemOption(item, 'trigger') !== 'click') {\n return\n }\n\n if (this._getItemOption(item, 'toggle') === false) {\n this._show(item)\n } else {\n this._toggle(item)\n }\n }\n }\n\n ///////////////////////\n // ** Public API ** //\n ///////////////////////\n public click = (element: HTMLElement, e: Event) => {\n return this._click(element, e)\n }\n\n public link = (element: HTMLElement, e: Event) => {\n return this._link(element, e)\n }\n\n public dismiss = (element: HTMLElement, e: Event) => {\n return this._dismiss(element, e)\n }\n\n public mouseover = (element: HTMLElement, e: Event) => {\n return this._mouseover(element, e as MouseEvent)\n }\n\n public mouseout = (element: HTMLElement, e: Event) => {\n return this._mouseout(element, e as MouseEvent)\n }\n\n // General Methods\n public getItemTriggerType = (item: HTMLElement) => {\n return this._getItemOption(item, 'trigger')\n }\n\n public getItemSubType = (element: HTMLElement) => {\n return this._getItemSubType(element)\n }\n\n public show = (item: HTMLElement) => {\n return this._show(item)\n }\n\n public hide = (item: HTMLElement) => {\n return this._hide(item)\n }\n\n public reset = (item: HTMLElement) => {\n return this._reset(item)\n }\n\n public update = () => {\n return this._update()\n }\n\n public getElement = () => {\n return this.element\n }\n\n public getItemLinkElement = (item: HTMLElement) => {\n return this._getItemLinkElement(item)\n }\n\n public getItemToggleElement = (item: HTMLElement) => {\n return this._getItemToggleElement(item)\n }\n\n public getItemSubElement = (item: HTMLElement) => {\n return this._getItemSubElement(item)\n }\n\n public getItemParentElements = (item: HTMLElement) => {\n return this._getItemParentElements(item)\n }\n\n public isItemSubShown = (item: HTMLElement) => {\n return this._isItemSubShown(item)\n }\n\n public isItemParentShown = (item: HTMLElement) => {\n return this._isItemParentShown(item)\n }\n\n public getTriggerElement = () => {\n return this.triggerElement\n }\n\n public isItemDropdownPermanent = (item: HTMLElement) => {\n return this._isItemDropdownPermanent(item)\n }\n\n // Accordion Mode Methods\n public hideAccordions = (item: HTMLElement) => {\n return this._hideAccordions(item)\n }\n\n // Event API\n public on = (name: string, handler: any) => {\n return EventHandlerUtil.on(this.element, name, handler)\n }\n\n public one = (name: string, handler: any) => {\n return EventHandlerUtil.one(this.element, name, handler)\n }\n\n public off = (name: string, handlerId: string) => {\n return EventHandlerUtil.off(this.element, name, handlerId)\n }\n\n // public static methods\n // Get KTMenu instance by element\n public static getInstance = (element: HTMLElement): MenuComponent | null => {\n // Element has menu DOM reference in it's DATA storage\n const elementMenu = DataUtil.get(element, 'menu')\n if (elementMenu) {\n return elementMenu as MenuComponent\n }\n\n // Element has .menu parent\n const menu = element.closest('.menu')\n if (menu) {\n const menuData = DataUtil.get(menu as HTMLElement, 'menu')\n if (menuData) {\n return menuData as MenuComponent\n }\n }\n\n // Element has a parent with DOM reference to .menu in it's DATA storage\n if (element.classList.contains('menu-link')) {\n const sub = element.closest('.menu-sub')\n if (sub) {\n const subMenu = DataUtil.get(sub as HTMLElement, 'menu')\n if (subMenu) {\n return subMenu as MenuComponent\n }\n }\n }\n\n return null\n }\n\n // Hide all dropdowns and skip one if provided\n public static hideDropdowns = (skip: HTMLElement | undefined) => {\n const items = document.querySelectorAll(\n '.show.menu-dropdown[data-kt-menu-trigger]'\n )\n\n if (items && items.length > 0) {\n for (let i = 0, len = items.length; i < len; i++) {\n const item = items[i]\n const menu = MenuComponent.getInstance(item as HTMLElement)\n\n if (menu && menu.getItemSubType(item) === 'dropdown') {\n if (skip) {\n if (\n // @ts-ignore\n menu.getItemSubElement(item).contains(skip) === false &&\n item.contains(skip) === false &&\n item !== skip\n ) {\n menu.hide(item)\n }\n } else {\n menu.hide(item)\n }\n }\n }\n }\n }\n\n public static updateDropdowns = () => {\n const items = document.querySelectorAll('.show.menu-dropdown[data-kt-menu-trigger]')\n if (items && items.length > 0) {\n for (var i = 0, len = items.length; i < len; i++) {\n var item = items[i]\n\n if (DataUtil.has(item as HTMLElement, 'popper')) {\n // @ts-ignore\n DataUtil.get(item as HTMLElement, 'popper').forceUpdate()\n }\n }\n }\n }\n\n // Global handlers\n public static createInstances = (selector: string) => {\n // Initialize menus\n document.querySelectorAll(selector).forEach((el) => {\n const menuItem = el as HTMLElement\n let menuInstance = MenuComponent.getInstance(menuItem)\n if (!menuInstance) {\n menuInstance = new MenuComponent(el as HTMLElement, defaultMenuOptions)\n }\n })\n }\n\n public static initGlobalHandlers = () => {\n // Dropdown handler\n document.addEventListener('click', (e) => {\n const menuItems = document.querySelectorAll('.show.menu-dropdown[data-kt-menu-trigger]')\n if (menuItems && menuItems.length > 0) {\n for (let i = 0; i < menuItems.length; i++) {\n const item = menuItems[i] as HTMLElement\n const menuObj = MenuComponent.getInstance(item) as MenuComponent\n if (menuObj && menuObj.getItemSubType(item) === 'dropdown') {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const menu = menuObj.getElement()\n const sub = menuObj.getItemSubElement(item) as HTMLElement\n if (item === e.target || item.contains(e.target as HTMLElement)) {\n continue\n }\n\n if (sub && (sub === e.target || sub.contains(e.target as HTMLElement))) {\n continue\n }\n menuObj.hide(item)\n }\n }\n }\n })\n\n // Sub toggle handler\n DOMEventHandlerUtil.on(\n document.body,\n '.menu-item[data-kt-menu-trigger] > .menu-link, [data-kt-menu-trigger]:not(.menu-item):not([data-kt-menu-trigger=\"auto\"])',\n 'click',\n function (this: HTMLElement, e: Event) {\n const menu = MenuComponent.getInstance(this) as MenuComponent\n if (menu) {\n return menu.click(this, e)\n }\n }\n )\n\n // // Link handler\n DOMEventHandlerUtil.on(\n document.body,\n '.menu-item:not([data-kt-menu-trigger]) > .menu-link',\n 'click',\n function (this: HTMLElement, e: Event) {\n e.stopPropagation()\n const menu = MenuComponent.getInstance(this)\n if (menu && menu.link) {\n return menu.link(this, e)\n }\n }\n )\n\n // Dismiss handler\n DOMEventHandlerUtil.on(\n document.body,\n '[data-kt-menu-dismiss=\"true\"]',\n 'click',\n function (this: HTMLElement, e: Event) {\n const menu = MenuComponent.getInstance(this) as MenuComponent\n if (menu) {\n return menu.dismiss(this, e)\n }\n }\n )\n\n // Mouseover handler\n DOMEventHandlerUtil.on(\n document.body,\n '[data-kt-menu-trigger], .menu-sub',\n 'mouseover',\n function (this: HTMLElement, e: Event) {\n const menu = MenuComponent.getInstance(this) as MenuComponent\n if (menu && menu.getItemSubType(this) === 'dropdown') {\n return menu.mouseover(this, e)\n }\n }\n )\n\n // Mouseout handler\n DOMEventHandlerUtil.on(\n document.body,\n '[data-kt-menu-trigger], .menu-sub',\n 'mouseout',\n function (this: HTMLElement, e: Event) {\n const menu = MenuComponent.getInstance(this) as MenuComponent\n if (menu && menu.getItemSubType(this) === 'dropdown') {\n return menu.mouseout(this, e)\n }\n }\n )\n\n // Resize handler\n window.addEventListener('resize', () => {\n let timer\n throttle(\n timer,\n () => {\n // Locate and update Drawer instances on window resize\n const elements = document.querySelectorAll('[data-kt-menu=\"true\"]')\n elements.forEach((el) => {\n const menu = MenuComponent.getInstance(el as HTMLElement)\n if (menu) {\n menu.update()\n }\n })\n },\n 200\n )\n })\n }\n\n public static bootstrap = () => {\n MenuComponent.initGlobalHandlers()\n MenuComponent.createInstances('[data-kt-menu=\"true\"]')\n }\n\n public static reinitialization = () => {\n MenuComponent.createInstances('[data-kt-menu=\"true\"]')\n }\n\n public static createInsance = (\n selector: string,\n options: MenuOptions = defaultMenuOptions\n ): MenuComponent | undefined => {\n const element = document.body.querySelector(selector)\n if (!element) {\n return\n }\n const item = element as HTMLElement\n let menu = MenuComponent.getInstance(item)\n if (!menu) {\n menu = new MenuComponent(item, options)\n }\n return menu\n }\n}\n\nexport {MenuComponent, defaultMenuOptions}\n","import {\n EventHandlerUtil,\n DataUtil,\n getBreakpoint,\n getAttributeValueByBreakpoint,\n stringSnakeToCamel,\n getObjectPropertyValueByKey,\n getViewPort,\n isVisibleElement,\n throttle,\n} from '../_utils/index'\n\nimport {MenuComponent, defaultMenuOptions} from './MenuComponent'\n\nexport interface ISearchOptions {\n minLength: number // Miniam text lenght to query search\n keypress: boolean // Enable search on keypress\n enter: boolean // Enable search on enter key press\n layout: 'menu' | 'inline' // Use 'menu' or 'inline' layout options to display search results\n responsive?: number // Pass integer value or bootstrap compatible breakpoint key(sm,md,lg,xl,xxl) to enable reponsive form mode for device width below the breakpoint value\n showOnFocus: boolean // Always show menu on input focus\n}\n\nexport interface ISearchQueries {\n componentName: string\n instanseQuery: string\n attrQuery: string\n}\n\nconst defaultSearchOptions: ISearchOptions = {\n minLength: 2, // Miniam text lenght to query search\n keypress: true, // Enable search on keypress\n enter: true, // Enable search on enter key press\n layout: 'menu', // Use 'menu' or 'inline' layout options to display search results\n showOnFocus: true, // Always show menu on input focus\n}\n\nconst defaultSearchQueires: ISearchQueries = {\n componentName: 'search',\n instanseQuery: '[data-kt-search]',\n attrQuery: 'data-kt-search-',\n}\n\nclass SearchComponent {\n element: HTMLElement\n contentElement: HTMLElement\n formElement: HTMLFormElement\n inputElement: HTMLInputElement\n spinnerElement: HTMLElement\n clearElement: HTMLElement\n toggleElement: HTMLElement\n submitElement: HTMLElement\n toolbarElement: HTMLElement\n resultsElement: HTMLElement\n suggestionElement: HTMLElement\n emptyElement: HTMLElement\n layout: any\n\n options: ISearchOptions\n queries: ISearchQueries\n\n processing: boolean = false\n menuObject: MenuComponent | undefined\n\n constructor(_element: HTMLElement, _options: ISearchOptions, _queries: ISearchQueries) {\n // Variables\n this.options = Object.assign(defaultSearchOptions, _options)\n this.queries = _queries\n\n // Elements\n this.element = _element\n this.contentElement = this._getElement('content') as HTMLElement\n this.formElement = this._getElement('form') as HTMLFormElement\n this.inputElement = this._getElement('input') as HTMLInputElement\n this.spinnerElement = this._getElement('spinner') as HTMLElement\n this.clearElement = this._getElement('clear') as HTMLElement\n this.toggleElement = this._getElement('toggle') as HTMLElement\n this.submitElement = this._getElement('submit') as HTMLElement\n this.toolbarElement = this._getElement('toolbar') as HTMLElement\n\n this.resultsElement = this._getElement('results') as HTMLElement\n this.suggestionElement = this._getElement('suggestion') as HTMLElement\n this.emptyElement = this._getElement('empty') as HTMLElement\n\n // Layout\n this.layout = this.getOption('layout')\n if (this.layout === 'menu') {\n this.menuObject = new MenuComponent(this.contentElement, defaultMenuOptions)\n }\n\n // Update\n this.update()\n\n // Event Handlers\n this.handlers()\n\n DataUtil.set(this.element, this.queries.componentName, this)\n }\n\n private _getElement = (name: string) => {\n return this.element.querySelector('[data-kt-search-element=\"' + name + '\"]')\n }\n\n // Get option\n private getOption = (name: string) => {\n const attr = this.element.getAttribute(`${this.queries.attrQuery}${name}`)\n if (attr) {\n let value = getAttributeValueByBreakpoint(attr)\n\n if (value !== null && String(value) === 'true') {\n return true\n } else if (value !== null && String(value) === 'false') {\n return false\n }\n\n return value\n } else {\n const optionName = stringSnakeToCamel(name)\n\n const option = getObjectPropertyValueByKey(this.options, optionName)\n if (option) {\n return getAttributeValueByBreakpoint(option)\n } else {\n return null\n }\n }\n }\n\n // Check if responsive form mode is enabled\n private getResponsiveFormMode = () => {\n const responsive = this.getOption('responsive') as string\n const width = getViewPort().width\n\n if (!responsive) {\n return null\n }\n\n const breakpoint = getBreakpoint(responsive)\n let breakPointNum = -1\n if (!breakpoint) {\n breakPointNum = parseInt(responsive)\n } else {\n breakPointNum = +breakpoint\n }\n\n if (width < breakPointNum) {\n return 'on'\n } else {\n return 'off'\n }\n }\n\n // Focus\n private focus = () => {\n this.element.classList.add('focus')\n\n if (\n this.getOption('show-on-focus') === true ||\n this.inputElement.value.length >= this.options.minLength\n ) {\n this.show()\n }\n }\n\n // Blur\n private blur = () => {\n this.element.classList.remove('focus')\n }\n\n // Enter\n private enter = (e: KeyboardEvent) => {\n const key = e.charCode || e.keyCode || 0\n\n if (key === 13) {\n e.preventDefault()\n\n this.search()\n }\n }\n\n // Input\n private input = () => {\n if (this.getOption('min-length')) {\n const minLength = parseInt(this.getOption('min-length') as string)\n\n if (this.inputElement.value.length >= minLength) {\n this.search()\n } else if (this.inputElement.value.length === 0) {\n this.clear()\n }\n }\n }\n\n private handlers(): void {\n const context = this\n\n // Focus\n this.inputElement.addEventListener('focus', this.focus)\n\n // Blur\n this.inputElement.addEventListener('blur', this.blur)\n\n // Keypress\n if (this.getOption('keypress') === true) {\n this.inputElement.addEventListener('input', this.input)\n }\n\n // Submit\n if (this.submitElement) {\n this.submitElement.addEventListener('click', this.search)\n }\n\n // Enter\n if (this.getOption('enter') === true) {\n this.inputElement.addEventListener('keypress', this.enter)\n }\n\n // Clear\n if (this.clearElement) {\n this.clearElement.addEventListener('click', this.clear)\n }\n\n // Menu\n if (this.menuObject) {\n // Toggle menu\n if (this.toggleElement) {\n this.toggleElement.addEventListener('click', this.show)\n\n this.menuObject.on('kt.menu.dropdown.show', function () {\n // @ts-ignore\n if (isVisibleElement(context.toggleElement)) {\n // @ts-ignore\n context.toggleElement.classList.add('active')\n // @ts-ignore\n context.toggleElement.classList.add('show')\n }\n })\n\n this.menuObject.on('kt.menu.dropdown.hide', function () {\n // @ts-ignore\n if (isVisibleElement(context.toggleElement)) {\n // @ts-ignore\n context.toggleElement.classList.remove('active')\n // @ts-ignore\n context.toggleElement.classList.remove('show')\n }\n })\n }\n\n this.menuObject.on('kt.menu.dropdown.shown', function () {\n // @ts-ignore\n context.inputElement.focus()\n })\n }\n\n // Window resize handling\n window.addEventListener('resize', () => {\n let timer\n\n throttle(\n timer,\n () => {\n this.update()\n },\n 200\n )\n })\n }\n\n ///////////////////////\n // ** Public API ** //\n ///////////////////////\n // Update\n public update = () => {\n // Handle responsive form\n if (this.layout === 'menu') {\n let responsiveFormMode = this.getResponsiveFormMode()\n\n if (responsiveFormMode === 'on' && !this.contentElement.contains(this.formElement)) {\n this.contentElement.prepend(this.formElement)\n this.formElement.classList.remove('d-none')\n } else if (responsiveFormMode === 'off' && this.contentElement.contains(this.formElement)) {\n this.element.prepend(this.formElement)\n this.formElement.classList.add('d-none')\n }\n }\n }\n\n // Show menu\n public show = () => {\n if (this.menuObject) {\n this.update()\n\n this.menuObject.show(this.element)\n }\n }\n\n // Hide menu\n public hide = () => {\n if (this.menuObject) {\n this.update()\n\n this.menuObject.hide(this.element)\n }\n }\n\n // Search\n public search = () => {\n if (!this.processing) {\n // Show search spinner\n if (this.spinnerElement) {\n this.spinnerElement.classList.remove('d-none')\n }\n\n // Hide search clear button\n if (this.clearElement) {\n this.clearElement.classList.add('d-none')\n }\n\n // Hide search toolbar\n if (this.toolbarElement) {\n this.toolbarElement.classList.add('d-none')\n }\n\n // Focus input\n this.inputElement.focus()\n\n this.processing = true\n EventHandlerUtil.trigger(this.element, 'kt.search.process', this)\n }\n }\n\n // Complete\n public complete = () => {\n if (this.spinnerElement) {\n this.spinnerElement.classList.add('d-none')\n }\n\n // Show search toolbar\n if (this.clearElement) {\n this.clearElement.classList.remove('d-none')\n }\n\n if (this.inputElement.value.length === 0) {\n this.clear()\n }\n\n // Focus input\n this.inputElement.focus()\n\n this.show()\n\n this.processing = false\n }\n\n // Clear\n public clear = () => {\n if (EventHandlerUtil.trigger(this.element, 'kt.search.clear') === false) {\n return\n }\n\n // Clear and focus input\n this.inputElement.value = ''\n this.inputElement.focus()\n\n // Hide clear icon\n if (this.clearElement) {\n this.clearElement.classList.add('d-none')\n }\n\n // Show search toolbar\n if (this.toolbarElement) {\n this.toolbarElement.classList.remove('d-none')\n }\n\n // Hide menu\n if (this.getOption('show-on-focus') === false) {\n this.hide()\n }\n\n EventHandlerUtil.trigger(this.element, 'kt.search.cleared')\n }\n\n public isProcessing = () => {\n return this.processing\n }\n\n public getQuery = () => {\n return this.inputElement.value\n }\n\n public getMenu = () => {\n return this.menuObject\n }\n\n public getFormElement = () => {\n return this.formElement\n }\n\n public getInputElement(): HTMLInputElement {\n return this.inputElement\n }\n\n public getContentElement(): HTMLElement {\n return this.contentElement\n }\n\n public getElement(): HTMLElement {\n return this.element\n }\n\n // Event API\n public on = (name: string, handler: Function) => {\n return EventHandlerUtil.on(this.element, name, handler)\n }\n\n public one = (name: string, handler: Function) => {\n return EventHandlerUtil.one(this.element, name, handler)\n }\n\n public off = (name: string, handlerId: string) => {\n return EventHandlerUtil.off(this.element, name, handlerId)\n }\n\n // Static methods\n public static getInstance = (\n el: HTMLElement,\n componentName: string = defaultSearchQueires.componentName\n ) => {\n const Search = DataUtil.get(el, componentName)\n if (Search) {\n return Search as SearchComponent\n }\n\n return null\n }\n\n public static createInstances = (\n selector: string = defaultSearchQueires.instanseQuery,\n options: ISearchOptions = defaultSearchOptions,\n queries: ISearchQueries = defaultSearchQueires\n ) => {\n const elements = document.body.querySelectorAll(selector)\n elements.forEach((el) => {\n const item = el as HTMLElement\n let Search = SearchComponent.getInstance(item)\n if (!Search) {\n Search = new SearchComponent(item, options, queries)\n }\n })\n }\n\n public static createInsance = (\n selector: string = defaultSearchQueires.instanseQuery,\n options: ISearchOptions = defaultSearchOptions,\n queries: ISearchQueries = defaultSearchQueires\n ): SearchComponent | undefined => {\n const element = document.body.querySelector(selector)\n if (!element) {\n return\n }\n const item = element as HTMLElement\n let Search = SearchComponent.getInstance(item)\n if (!Search) {\n Search = new SearchComponent(item, options, queries)\n }\n return Search\n }\n\n public static bootstrap = (selector: string = defaultSearchQueires.instanseQuery) => {\n SearchComponent.createInstances(selector)\n }\n\n public static reinitialization = (selector: string = defaultSearchQueires.instanseQuery) => {\n SearchComponent.createInstances(selector)\n }\n}\nexport {SearchComponent, defaultSearchOptions, defaultSearchQueires}\n","export const toAbsoluteUrl = (pathname: string) => process.env.PUBLIC_URL + pathname\n","export function getCurrentUrl(pathname: string) {\n return pathname.split(/[?#]/)[0]\n}\n\nexport function checkIsActive(pathname: string, url: string) {\n const current = getCurrentUrl(pathname)\n if (!current || !url) {\n return false\n }\n\n if (current === url) {\n return true\n }\n\n if (current.indexOf(url) > -1) {\n return true\n }\n\n return false\n}\n","export const styleToObject = (input: string): Record => {\n const attributes = input.split(/ ?; ?/);\n\n return attributes.reduce((acc: Record, d: string) => {\n const [key, value] = d.split(/ ?: ?/);\n\n if (key && value) {\n acc[key.replace(/-(\\w)/g, (_$0, $1) => $1.toUpperCase())] = Number.isNaN(Number(value))\n ? value\n : Number(value);\n }\n\n return acc;\n }, {});\n};\n\n/* istanbul ignore next */\nexport function randomString(length = 6): string {\n const characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n let result = '';\n\n for (let index = length; index > 0; --index) {\n result += characters[Math.round(Math.random() * (characters.length - 1))];\n }\n\n return result;\n}\n\nexport const noTextChildNodes = [\n 'br',\n 'col',\n 'colgroup',\n 'dl',\n 'hr',\n 'iframe',\n 'img',\n 'input',\n 'link',\n 'menuitem',\n 'meta',\n 'ol',\n 'param',\n 'select',\n 'table',\n 'tbody',\n 'tfoot',\n 'thead',\n 'tr',\n 'ul',\n 'wbr',\n];\n\n/**\n * Copyright (c) 2013-present, Facebook, Inc.\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// Taken from https://raw.githubusercontent.com/facebook/react/baff5cc2f69d30589a5dc65b089e47765437294b/packages/react-dom/src/shared/possibleStandardNames.js\n// tslint:disable:object-literal-sort-keys\nexport const possibleStandardNames: Record = {\n // HTML\n 'accept-charset': 'acceptCharset',\n acceptcharset: 'acceptCharset',\n accesskey: 'accessKey',\n allowfullscreen: 'allowFullScreen',\n autocapitalize: 'autoCapitalize',\n autocomplete: 'autoComplete',\n autocorrect: 'autoCorrect',\n autofocus: 'autoFocus',\n autoplay: 'autoPlay',\n autosave: 'autoSave',\n cellpadding: 'cellPadding',\n cellspacing: 'cellSpacing',\n charset: 'charSet',\n class: 'className',\n classid: 'classID',\n classname: 'className',\n colspan: 'colSpan',\n contenteditable: 'contentEditable',\n contextmenu: 'contextMenu',\n controlslist: 'controlsList',\n crossorigin: 'crossOrigin',\n dangerouslysetinnerhtml: 'dangerouslySetInnerHTML',\n datetime: 'dateTime',\n defaultchecked: 'defaultChecked',\n defaultvalue: 'defaultValue',\n enctype: 'encType',\n for: 'htmlFor',\n formmethod: 'formMethod',\n formaction: 'formAction',\n formenctype: 'formEncType',\n formnovalidate: 'formNoValidate',\n formtarget: 'formTarget',\n frameborder: 'frameBorder',\n hreflang: 'hrefLang',\n htmlfor: 'htmlFor',\n httpequiv: 'httpEquiv',\n 'http-equiv': 'httpEquiv',\n icon: 'icon',\n innerhtml: 'innerHTML',\n inputmode: 'inputMode',\n itemid: 'itemID',\n itemprop: 'itemProp',\n itemref: 'itemRef',\n itemscope: 'itemScope',\n itemtype: 'itemType',\n keyparams: 'keyParams',\n keytype: 'keyType',\n marginwidth: 'marginWidth',\n marginheight: 'marginHeight',\n maxlength: 'maxLength',\n mediagroup: 'mediaGroup',\n minlength: 'minLength',\n nomodule: 'noModule',\n novalidate: 'noValidate',\n playsinline: 'playsInline',\n radiogroup: 'radioGroup',\n readonly: 'readOnly',\n referrerpolicy: 'referrerPolicy',\n rowspan: 'rowSpan',\n spellcheck: 'spellCheck',\n srcdoc: 'srcDoc',\n srclang: 'srcLang',\n srcset: 'srcSet',\n tabindex: 'tabIndex',\n typemustmatch: 'typeMustMatch',\n usemap: 'useMap',\n\n // SVG\n accentheight: 'accentHeight',\n 'accent-height': 'accentHeight',\n alignmentbaseline: 'alignmentBaseline',\n 'alignment-baseline': 'alignmentBaseline',\n allowreorder: 'allowReorder',\n arabicform: 'arabicForm',\n 'arabic-form': 'arabicForm',\n attributename: 'attributeName',\n attributetype: 'attributeType',\n autoreverse: 'autoReverse',\n basefrequency: 'baseFrequency',\n baselineshift: 'baselineShift',\n 'baseline-shift': 'baselineShift',\n baseprofile: 'baseProfile',\n calcmode: 'calcMode',\n capheight: 'capHeight',\n 'cap-height': 'capHeight',\n clippath: 'clipPath',\n 'clip-path': 'clipPath',\n clippathunits: 'clipPathUnits',\n cliprule: 'clipRule',\n 'clip-rule': 'clipRule',\n colorinterpolation: 'colorInterpolation',\n 'color-interpolation': 'colorInterpolation',\n colorinterpolationfilters: 'colorInterpolationFilters',\n 'color-interpolation-filters': 'colorInterpolationFilters',\n colorprofile: 'colorProfile',\n 'color-profile': 'colorProfile',\n colorrendering: 'colorRendering',\n 'color-rendering': 'colorRendering',\n contentscripttype: 'contentScriptType',\n contentstyletype: 'contentStyleType',\n diffuseconstant: 'diffuseConstant',\n dominantbaseline: 'dominantBaseline',\n 'dominant-baseline': 'dominantBaseline',\n edgemode: 'edgeMode',\n enablebackground: 'enableBackground',\n 'enable-background': 'enableBackground',\n externalresourcesrequired: 'externalResourcesRequired',\n fillopacity: 'fillOpacity',\n 'fill-opacity': 'fillOpacity',\n fillrule: 'fillRule',\n 'fill-rule': 'fillRule',\n filterres: 'filterRes',\n filterunits: 'filterUnits',\n floodopacity: 'floodOpacity',\n 'flood-opacity': 'floodOpacity',\n floodcolor: 'floodColor',\n 'flood-color': 'floodColor',\n fontfamily: 'fontFamily',\n 'font-family': 'fontFamily',\n fontsize: 'fontSize',\n 'font-size': 'fontSize',\n fontsizeadjust: 'fontSizeAdjust',\n 'font-size-adjust': 'fontSizeAdjust',\n fontstretch: 'fontStretch',\n 'font-stretch': 'fontStretch',\n fontstyle: 'fontStyle',\n 'font-style': 'fontStyle',\n fontvariant: 'fontVariant',\n 'font-variant': 'fontVariant',\n fontweight: 'fontWeight',\n 'font-weight': 'fontWeight',\n glyphname: 'glyphName',\n 'glyph-name': 'glyphName',\n glyphorientationhorizontal: 'glyphOrientationHorizontal',\n 'glyph-orientation-horizontal': 'glyphOrientationHorizontal',\n glyphorientationvertical: 'glyphOrientationVertical',\n 'glyph-orientation-vertical': 'glyphOrientationVertical',\n glyphref: 'glyphRef',\n gradienttransform: 'gradientTransform',\n gradientunits: 'gradientUnits',\n horizadvx: 'horizAdvX',\n 'horiz-adv-x': 'horizAdvX',\n horizoriginx: 'horizOriginX',\n 'horiz-origin-x': 'horizOriginX',\n imagerendering: 'imageRendering',\n 'image-rendering': 'imageRendering',\n kernelmatrix: 'kernelMatrix',\n kernelunitlength: 'kernelUnitLength',\n keypoints: 'keyPoints',\n keysplines: 'keySplines',\n keytimes: 'keyTimes',\n lengthadjust: 'lengthAdjust',\n letterspacing: 'letterSpacing',\n 'letter-spacing': 'letterSpacing',\n lightingcolor: 'lightingColor',\n 'lighting-color': 'lightingColor',\n limitingconeangle: 'limitingConeAngle',\n markerend: 'markerEnd',\n 'marker-end': 'markerEnd',\n markerheight: 'markerHeight',\n markermid: 'markerMid',\n 'marker-mid': 'markerMid',\n markerstart: 'markerStart',\n 'marker-start': 'markerStart',\n markerunits: 'markerUnits',\n markerwidth: 'markerWidth',\n maskcontentunits: 'maskContentUnits',\n maskunits: 'maskUnits',\n numoctaves: 'numOctaves',\n overlineposition: 'overlinePosition',\n 'overline-position': 'overlinePosition',\n overlinethickness: 'overlineThickness',\n 'overline-thickness': 'overlineThickness',\n paintorder: 'paintOrder',\n 'paint-order': 'paintOrder',\n 'panose-1': 'panose1',\n pathlength: 'pathLength',\n patterncontentunits: 'patternContentUnits',\n patterntransform: 'patternTransform',\n patternunits: 'patternUnits',\n pointerevents: 'pointerEvents',\n 'pointer-events': 'pointerEvents',\n pointsatx: 'pointsAtX',\n pointsaty: 'pointsAtY',\n pointsatz: 'pointsAtZ',\n preservealpha: 'preserveAlpha',\n preserveaspectratio: 'preserveAspectRatio',\n primitiveunits: 'primitiveUnits',\n refx: 'refX',\n refy: 'refY',\n renderingintent: 'renderingIntent',\n 'rendering-intent': 'renderingIntent',\n repeatcount: 'repeatCount',\n repeatdur: 'repeatDur',\n requiredextensions: 'requiredExtensions',\n requiredfeatures: 'requiredFeatures',\n shaperendering: 'shapeRendering',\n 'shape-rendering': 'shapeRendering',\n specularconstant: 'specularConstant',\n specularexponent: 'specularExponent',\n spreadmethod: 'spreadMethod',\n startoffset: 'startOffset',\n stddeviation: 'stdDeviation',\n stitchtiles: 'stitchTiles',\n stopcolor: 'stopColor',\n 'stop-color': 'stopColor',\n stopopacity: 'stopOpacity',\n 'stop-opacity': 'stopOpacity',\n strikethroughposition: 'strikethroughPosition',\n 'strikethrough-position': 'strikethroughPosition',\n strikethroughthickness: 'strikethroughThickness',\n 'strikethrough-thickness': 'strikethroughThickness',\n strokedasharray: 'strokeDasharray',\n 'stroke-dasharray': 'strokeDasharray',\n strokedashoffset: 'strokeDashoffset',\n 'stroke-dashoffset': 'strokeDashoffset',\n strokelinecap: 'strokeLinecap',\n 'stroke-linecap': 'strokeLinecap',\n strokelinejoin: 'strokeLinejoin',\n 'stroke-linejoin': 'strokeLinejoin',\n strokemiterlimit: 'strokeMiterlimit',\n 'stroke-miterlimit': 'strokeMiterlimit',\n strokewidth: 'strokeWidth',\n 'stroke-width': 'strokeWidth',\n strokeopacity: 'strokeOpacity',\n 'stroke-opacity': 'strokeOpacity',\n suppresscontenteditablewarning: 'suppressContentEditableWarning',\n suppresshydrationwarning: 'suppressHydrationWarning',\n surfacescale: 'surfaceScale',\n systemlanguage: 'systemLanguage',\n tablevalues: 'tableValues',\n targetx: 'targetX',\n targety: 'targetY',\n textanchor: 'textAnchor',\n 'text-anchor': 'textAnchor',\n textdecoration: 'textDecoration',\n 'text-decoration': 'textDecoration',\n textlength: 'textLength',\n textrendering: 'textRendering',\n 'text-rendering': 'textRendering',\n underlineposition: 'underlinePosition',\n 'underline-position': 'underlinePosition',\n underlinethickness: 'underlineThickness',\n 'underline-thickness': 'underlineThickness',\n unicodebidi: 'unicodeBidi',\n 'unicode-bidi': 'unicodeBidi',\n unicoderange: 'unicodeRange',\n 'unicode-range': 'unicodeRange',\n unitsperem: 'unitsPerEm',\n 'units-per-em': 'unitsPerEm',\n unselectable: 'unselectable',\n valphabetic: 'vAlphabetic',\n 'v-alphabetic': 'vAlphabetic',\n vectoreffect: 'vectorEffect',\n 'vector-effect': 'vectorEffect',\n vertadvy: 'vertAdvY',\n 'vert-adv-y': 'vertAdvY',\n vertoriginx: 'vertOriginX',\n 'vert-origin-x': 'vertOriginX',\n vertoriginy: 'vertOriginY',\n 'vert-origin-y': 'vertOriginY',\n vhanging: 'vHanging',\n 'v-hanging': 'vHanging',\n videographic: 'vIdeographic',\n 'v-ideographic': 'vIdeographic',\n viewbox: 'viewBox',\n viewtarget: 'viewTarget',\n vmathematical: 'vMathematical',\n 'v-mathematical': 'vMathematical',\n wordspacing: 'wordSpacing',\n 'word-spacing': 'wordSpacing',\n writingmode: 'writingMode',\n 'writing-mode': 'writingMode',\n xchannelselector: 'xChannelSelector',\n xheight: 'xHeight',\n 'x-height': 'xHeight',\n xlinkactuate: 'xlinkActuate',\n 'xlink:actuate': 'xlinkActuate',\n xlinkarcrole: 'xlinkArcrole',\n 'xlink:arcrole': 'xlinkArcrole',\n xlinkhref: 'xlinkHref',\n 'xlink:href': 'xlinkHref',\n xlinkrole: 'xlinkRole',\n 'xlink:role': 'xlinkRole',\n xlinkshow: 'xlinkShow',\n 'xlink:show': 'xlinkShow',\n xlinktitle: 'xlinkTitle',\n 'xlink:title': 'xlinkTitle',\n xlinktype: 'xlinkType',\n 'xlink:type': 'xlinkType',\n xmlbase: 'xmlBase',\n 'xml:base': 'xmlBase',\n xmllang: 'xmlLang',\n 'xml:lang': 'xmlLang',\n 'xml:space': 'xmlSpace',\n xmlnsxlink: 'xmlnsXlink',\n 'xmlns:xlink': 'xmlnsXlink',\n xmlspace: 'xmlSpace',\n ychannelselector: 'yChannelSelector',\n zoomandpan: 'zoomAndPan',\n\n // event handlers\n onblur: 'onBlur',\n onchange: 'onChange',\n onclick: 'onClick',\n oncontextmenu: 'onContextMenu',\n ondoubleclick: 'onDoubleClick',\n ondrag: 'onDrag',\n ondragend: 'onDragEnd',\n ondragenter: 'onDragEnter',\n ondragexit: 'onDragExit',\n ondragleave: 'onDragLeave',\n ondragover: 'onDragOver',\n ondragstart: 'onDragStart',\n ondrop: 'onDrop',\n onerror: 'onError',\n onfocus: 'onFocus',\n oninput: 'onInput',\n oninvalid: 'onInvalid',\n onkeydown: 'onKeyDown',\n onkeypress: 'onKeyPress',\n onkeyup: 'onKeyUp',\n onload: 'onLoad',\n onmousedown: 'onMouseDown',\n onmouseenter: 'onMouseEnter',\n onmouseleave: 'onMouseLeave',\n onmousemove: 'onMouseMove',\n onmouseout: 'onMouseOut',\n onmouseover: 'onMouseOver',\n onmouseup: 'onMouseUp',\n onscroll: 'onScroll',\n onsubmit: 'onSubmit',\n ontouchcancel: 'onTouchCancel',\n ontouchend: 'onTouchEnd',\n ontouchmove: 'onTouchMove',\n ontouchstart: 'onTouchStart',\n onwheel: 'onWheel',\n};\n","/* eslint-disable @typescript-eslint/no-use-before-define */\nimport * as React from 'react';\n\nimport { noTextChildNodes, possibleStandardNames, randomString, styleToObject } from './helpers';\n\nexport interface Options {\n actions?: Action[];\n index?: number;\n level?: number;\n nodeOnly?: boolean;\n randomKey?: boolean;\n selector?: string;\n type?: string;\n}\n\ninterface Attributes {\n [index: string]: any;\n\n key: string;\n}\n\nexport interface Action {\n // If this returns true, the two following functions are called if they are defined\n condition: (node: Node, key: string, level: number) => boolean;\n\n // Use this to inject a component or remove the node\n // It must return something that can be rendered by React\n post?: (node: Node, key: string, level: number) => React.ReactNode;\n\n // Use this to update or replace the node\n // e.g. for removing or adding attributes, changing the node type\n pre?: (node: Node, key: string, level: number) => Node;\n}\n\nfunction parseAttributes(node: Node, reactKey: string): Attributes {\n const attributes: Attributes = {\n key: reactKey,\n };\n\n /* istanbul ignore else */\n if (node instanceof Element) {\n const nodeClassNames = node.getAttribute('class');\n\n if (nodeClassNames) {\n attributes.className = nodeClassNames;\n }\n\n [...node.attributes].forEach(d => {\n switch (d.name) {\n // this is manually handled above, so break;\n case 'class':\n break;\n case 'style':\n attributes[d.name] = styleToObject(d.value);\n break;\n case 'allowfullscreen':\n case 'allowpaymentrequest':\n case 'async':\n case 'autofocus':\n case 'autoplay':\n case 'checked':\n case 'controls':\n case 'default':\n case 'defer':\n case 'disabled':\n case 'formnovalidate':\n case 'hidden':\n case 'ismap':\n case 'itemscope':\n case 'loop':\n case 'multiple':\n case 'muted':\n case 'nomodule':\n case 'novalidate':\n case 'open':\n case 'readonly':\n case 'required':\n case 'reversed':\n case 'selected':\n case 'typemustmatch':\n attributes[possibleStandardNames[d.name] || d.name] = true;\n break;\n default:\n attributes[possibleStandardNames[d.name] || d.name] = d.value;\n }\n });\n }\n\n return attributes;\n}\n\nfunction parseChildren(childNodeList: NodeList, level: number, options: Options) {\n const children: React.ReactNode[] = [...childNodeList]\n .map((node, index) =>\n convertFromNode(node, {\n ...options,\n index,\n level: level + 1,\n }),\n )\n .filter(Boolean);\n\n if (!children.length) {\n return null;\n }\n\n return children;\n}\n\nfunction parseName(nodeName: string) {\n if (/[a-z]+[A-Z]+[a-z]+/.test(nodeName)) {\n return nodeName;\n }\n\n return nodeName.toLowerCase();\n}\n\nexport function convertFromNode(input: Node, options: Options = {}): React.ReactNode {\n if (!input || !(input instanceof Node)) {\n return null;\n }\n\n const { actions = [], index = 0, level = 0, randomKey } = options;\n\n let node = input;\n let key = `${level}-${index}`;\n const result: React.ReactNode[] = [];\n\n if (randomKey && level === 0) {\n key = `${randomString()}-${key}`;\n }\n\n /* istanbul ignore else */\n if (Array.isArray(actions)) {\n actions.forEach((action: Action) => {\n if (action.condition(node, key, level)) {\n if (typeof action.pre === 'function') {\n node = action.pre(node, key, level);\n\n if (!(node instanceof Node)) {\n node = input;\n\n /* istanbul ignore else */\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.warn(\n 'The `pre` method always must return a valid DomNode (instanceof Node) - your modification will be ignored (Hint: if you want to render a React-component, use the `post` method instead)',\n );\n }\n }\n }\n\n if (typeof action.post === 'function') {\n result.push(action.post(node, key, level));\n }\n }\n });\n }\n\n if (result.length) {\n return result;\n }\n\n switch (node.nodeType) {\n case 1: {\n // regular dom-node\n return React.createElement(\n parseName(node.nodeName),\n parseAttributes(node, key),\n parseChildren(node.childNodes, level, options),\n );\n }\n case 3: {\n // textnode\n const nodeText = node.nodeValue?.toString() || '';\n\n /* istanbul ignore else */\n if (/^\\s+$/.test(nodeText) && !/[\\u00A0\\u202F]/.test(nodeText)) {\n return null;\n }\n\n /* istanbul ignore next */\n if (!node.parentNode) {\n return nodeText;\n }\n\n const parentNodeName = node.parentNode.nodeName.toLowerCase();\n\n if (noTextChildNodes.includes(parentNodeName)) {\n /* istanbul ignore else */\n if (/\\S/.test(nodeText)) {\n // eslint-disable-next-line no-console\n console.warn(\n `A textNode is not allowed inside '${parentNodeName}'. Your text \"${nodeText}\" will be ignored`,\n );\n }\n\n return null;\n }\n\n return nodeText;\n }\n case 8: {\n // html-comment\n return null;\n }\n /* istanbul ignore next */\n default: {\n return null;\n }\n }\n}\n\nexport function convertFromString(input: string, options: Options = {}): React.ReactNode | Node {\n if (!input || typeof input !== 'string') {\n return null;\n }\n\n const { nodeOnly = false, selector = 'body > *', type = 'text/html' } = options;\n\n try {\n const parser = new DOMParser();\n const document = parser.parseFromString(input, type as DOMParserSupportedType);\n const node = document.querySelector(selector);\n\n if (!(node instanceof Node)) {\n throw new TypeError('Error parsing input');\n }\n\n if (nodeOnly) {\n return node;\n }\n\n return convertFromNode(node, options);\n } catch (error) {\n /* istanbul ignore else */\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line no-console\n console.error(error);\n }\n }\n\n return null;\n}\n\nexport default function convert(\n input: Node | string,\n options: Options = {},\n): React.ReactNode | Node {\n if (typeof input === 'string') {\n return convertFromString(input, options);\n }\n\n if (input instanceof Node) {\n return convertFromNode(input, options);\n }\n\n return null;\n}\n","import { canUseDOM as canUseDOMFlag } from 'exenv';\n\nimport { PlainObject } from './types';\n\nexport const STATUS = {\n FAILED: 'failed',\n LOADED: 'loaded',\n LOADING: 'loading',\n PENDING: 'pending',\n READY: 'ready',\n UNSUPPORTED: 'unsupported',\n};\n\nexport function canUseDOM(): boolean {\n return canUseDOMFlag;\n}\n\nexport function isSupportedEnvironment(): boolean {\n return supportsInlineSVG() && typeof window !== 'undefined' && window !== null;\n}\n\nexport function supportsInlineSVG(): boolean {\n /* istanbul ignore next */\n if (!document) {\n return false;\n }\n\n const div = document.createElement('div');\n\n div.innerHTML = '';\n const svg = div.firstChild as SVGSVGElement;\n\n return !!svg && svg.namespaceURI === 'http://www.w3.org/2000/svg';\n}\n\nfunction randomCharacter(character: string) {\n return character[Math.floor(Math.random() * character.length)];\n}\n\nexport function randomString(length: number): string {\n const letters = 'abcdefghijklmnopqrstuvwxyz';\n const numbers = '1234567890';\n const charset = `${letters}${letters.toUpperCase()}${numbers}`;\n\n let R = '';\n\n for (let index = 0; index < length; index++) {\n R += randomCharacter(charset);\n }\n\n return R;\n}\n\n/**\n * Remove properties from an object\n */\nexport function omit(\n input: T,\n ...filter: K[]\n): Omit {\n const output: any = {};\n\n for (const key in input) {\n /* istanbul ignore else */\n if ({}.hasOwnProperty.call(input, key)) {\n if (!filter.includes(key as unknown as K)) {\n output[key] = input[key];\n }\n }\n }\n\n return output as Omit;\n}\n","import * as React from 'react';\nimport convert from 'react-from-dom';\n\nimport { canUseDOM, isSupportedEnvironment, omit, randomString, STATUS } from './helpers';\nimport { FetchError, Props, State, StorageItem } from './types';\n\nexport const cacheStore: { [key: string]: StorageItem } = Object.create(null);\n\nexport default class InlineSVG extends React.PureComponent {\n private isActive = false;\n private readonly hash: string;\n\n public static defaultProps = {\n cacheRequests: true,\n uniquifyIDs: false,\n };\n\n constructor(props: Props) {\n super(props);\n\n this.state = {\n content: '',\n element: null,\n hasCache: !!props.cacheRequests && !!cacheStore[props.src],\n status: STATUS.PENDING,\n };\n\n this.hash = props.uniqueHash || randomString(8);\n }\n\n public componentDidMount(): void {\n this.isActive = true;\n\n if (!canUseDOM()) {\n return;\n }\n\n const { status } = this.state;\n const { src } = this.props;\n\n try {\n /* istanbul ignore else */\n if (status === STATUS.PENDING) {\n /* istanbul ignore else */\n if (!isSupportedEnvironment()) {\n throw new Error('Browser does not support SVG');\n }\n\n /* istanbul ignore else */\n if (!src) {\n throw new Error('Missing src');\n }\n\n this.load();\n }\n } catch (error: any) {\n this.handleError(error);\n }\n }\n\n public componentDidUpdate(previousProps: Props, previousState: State): void {\n if (!canUseDOM()) {\n return;\n }\n\n const { hasCache, status } = this.state;\n const { onLoad, src } = this.props;\n\n if (previousState.status !== STATUS.READY && status === STATUS.READY) {\n /* istanbul ignore else */\n if (onLoad) {\n onLoad(src, hasCache);\n }\n }\n\n if (previousProps.src !== src) {\n if (!src) {\n this.handleError(new Error('Missing src'));\n\n return;\n }\n\n this.load();\n }\n }\n\n public componentWillUnmount(): void {\n this.isActive = false;\n }\n\n private getNode() {\n const { description, title } = this.props;\n\n try {\n const svgText = this.processSVG();\n const node = convert(svgText, { nodeOnly: true });\n\n if (!node || !(node instanceof SVGSVGElement)) {\n throw new Error('Could not convert the src to a DOM Node');\n }\n\n const svg = this.updateSVGAttributes(node);\n\n if (description) {\n const originalDesc = svg.querySelector('desc');\n\n if (originalDesc && originalDesc.parentNode) {\n originalDesc.parentNode.removeChild(originalDesc);\n }\n\n const descElement = document.createElement('desc');\n\n descElement.innerHTML = description;\n svg.prepend(descElement);\n }\n\n if (title) {\n const originalTitle = svg.querySelector('title');\n\n if (originalTitle && originalTitle.parentNode) {\n originalTitle.parentNode.removeChild(originalTitle);\n }\n\n const titleElement = document.createElement('title');\n\n titleElement.innerHTML = title;\n svg.prepend(titleElement);\n }\n\n return svg;\n } catch (error: any) {\n return this.handleError(error);\n }\n }\n\n private getElement() {\n try {\n const node = this.getNode() as Node;\n const element = convert(node);\n\n if (!element || !React.isValidElement(element)) {\n throw new Error('Could not convert the src to a React element');\n }\n\n this.setState({\n element,\n status: STATUS.READY,\n });\n } catch (error: any) {\n this.handleError(new Error(error.message));\n }\n }\n\n private handleLoad = (content: string) => {\n /* istanbul ignore else */\n if (this.isActive) {\n this.setState(\n {\n content,\n status: STATUS.LOADED,\n },\n this.getElement,\n );\n }\n };\n\n private handleError = (error: Error | FetchError) => {\n const { onError } = this.props;\n const status =\n error.message === 'Browser does not support SVG' ? STATUS.UNSUPPORTED : STATUS.FAILED;\n\n /* istanbul ignore else */\n if (this.isActive) {\n this.setState({ status }, () => {\n /* istanbul ignore else */\n if (typeof onError === 'function') {\n onError(error);\n }\n });\n }\n };\n\n private request = () => {\n const { cacheRequests, fetchOptions, src } = this.props;\n\n try {\n if (cacheRequests) {\n cacheStore[src] = { content: '', status: STATUS.LOADING };\n }\n\n return fetch(src, fetchOptions)\n .then(response => {\n const contentType = response.headers.get('content-type');\n const [fileType] = (contentType || '').split(/ ?; ?/);\n\n if (response.status > 299) {\n throw new Error('Not found');\n }\n\n if (!['image/svg+xml', 'text/plain'].some(d => fileType.includes(d))) {\n throw new Error(`Content type isn't valid: ${fileType}`);\n }\n\n return response.text();\n })\n .then(content => {\n const { src: currentSrc } = this.props;\n\n // the current src don't match the previous one, skipping...\n if (src !== currentSrc) {\n if (cacheStore[src].status === STATUS.LOADING) {\n delete cacheStore[src];\n }\n\n return;\n }\n\n this.handleLoad(content);\n\n /* istanbul ignore else */\n if (cacheRequests) {\n const cache = cacheStore[src];\n\n /* istanbul ignore else */\n if (cache) {\n cache.content = content;\n cache.status = STATUS.LOADED;\n }\n }\n })\n .catch(error => {\n this.handleError(error);\n\n /* istanbul ignore else */\n if (cacheRequests) {\n const cache = cacheStore[src];\n\n /* istanbul ignore else */\n if (cache) {\n delete cacheStore[src];\n }\n }\n });\n } catch (error: any) {\n return this.handleError(new Error(error.message));\n }\n };\n\n private load() {\n /* istanbul ignore else */\n if (this.isActive) {\n this.setState(\n {\n content: '',\n element: null,\n status: STATUS.LOADING,\n },\n () => {\n const { cacheRequests, src } = this.props;\n const cache = cacheRequests && cacheStore[src];\n\n if (cache && cache.status === STATUS.LOADED) {\n this.handleLoad(cache.content);\n\n return;\n }\n\n const dataURI = src.match(/data:image\\/svg[^,]*?(;base64)?,(.*)/);\n let inlineSrc;\n\n if (dataURI) {\n inlineSrc = dataURI[1] ? window.atob(dataURI[2]) : decodeURIComponent(dataURI[2]);\n } else if (src.includes('\n linkAttributes.includes(name) && (value ? !value.includes('#') : false);\n\n if (!uniquifyIDs) {\n return node;\n }\n\n [...node.children].map(d => {\n if (d.attributes && d.attributes.length) {\n const attributes = Object.values(d.attributes).map(a => {\n const attribute = a;\n const match = a.value.match(/url\\((.*?)\\)/);\n\n if (match && match[1]) {\n attribute.value = a.value.replace(match[0], `url(${baseURL}${match[1]}__${this.hash})`);\n }\n\n return attribute;\n });\n\n replaceableAttributes.forEach(r => {\n const attribute = attributes.find(a => a.name === r);\n\n if (attribute && !isDataValue(r, attribute.value)) {\n attribute.value = `${attribute.value}__${this.hash}`;\n }\n });\n }\n\n if (d.children.length) {\n return this.updateSVGAttributes(d as SVGSVGElement);\n }\n\n return d;\n });\n\n return node;\n }\n\n private processSVG() {\n const { content } = this.state;\n const { preProcessor } = this.props;\n\n if (preProcessor) {\n return preProcessor(content);\n }\n\n return content;\n }\n\n public render(): React.ReactNode {\n const { element, status } = this.state;\n const { children = null, innerRef, loader = null } = this.props;\n const elementProps = omit(\n this.props,\n 'baseURL',\n 'cacheRequests',\n 'children',\n 'description',\n 'fetchOptions',\n 'innerRef',\n 'loader',\n 'onError',\n 'onLoad',\n 'preProcessor',\n 'src',\n 'title',\n 'uniqueHash',\n 'uniquifyIDs',\n );\n\n if (!canUseDOM()) {\n return loader;\n }\n\n if (element) {\n return React.cloneElement(element as React.ReactElement, { ref: innerRef, ...elementProps });\n }\n\n if ([STATUS.UNSUPPORTED, STATUS.FAILED].includes(status)) {\n return children;\n }\n\n return loader;\n }\n}\n\nexport * from './types';\n","import React from 'react'\nimport SVG from 'react-inlinesvg'\nimport {toAbsoluteUrl} from '../AssetHelpers'\ntype Props = {\n className?: string\n path: string\n svgClassName?: string\n}\n\nconst KTSVG: React.FC = ({className = '', path, svgClassName = 'mh-50px'}) => {\n return (\n \n \n \n )\n}\n\nexport {KTSVG}\n","import {ReactNode} from 'react'\nimport {MenuComponent} from '../assets/ts/components'\n\ntype WithChildren = {\n children?: ReactNode\n}\n\nconst reInitMenu = () => {\n setTimeout(() => {\n MenuComponent.reinitialization()\n }, 500)\n}\n\nexport {type WithChildren, reInitMenu}\n","import axios, {AxiosResponse} from 'axios'\nimport {useDispatch} from 'react-redux'\nimport {\n AddAddressRequest,\n AddCardRequest,\n AddProductToPaymentRequest,\n ChangeDocumentStatusRequest,\n UpsertCompanyRequest,\n GetCompanyInfoRequest,\n GetRequiredDocumentsRequest,\n LoginRequest,\n NotificationModel,\n RegisterRequest,\n RemoveCardRequest,\n SendPasswordResetMailRequest,\n SetIdentitiyNumberRequest,\n SetNewPasswordRequest,\n SetSelectedCompanyRequest,\n StartManualPaymentRequest,\n UploadDocumentRequest,\n TryDiscountRequest,\n SetCompanyStepRequest,\n OperationFieldSearchRequest,\n SearchAdvisorCompanyRequest,\n InviteAdvisorUserRequest,\n RegisterInvitedAdvisorUserRequest,\n UpsertEInvoiceProductRequest,\n GetProductRequest,\n UpsertEInvoiceCustomerRequest,\n GetCustomerRequest,\n PricesForCertainPaymentRequest,\n CreateInvoiceRequest,\n GetPaymentInvoicesRequest,\n PrintInvoiceRequest,\n UpsertEInvoiceParametersRequest,\n GetPrintedInvoicesRequest,\n GetAdminCompaniesRequest,\n GetAdminCompanyRequest,\n UpdateCompanyRequest,\n GetPotentialCustomersRequest,\n GetDashboardDataRequest,\n GetDocumentsRequest,\n DocumentBaseRequest,\n UpdateUserRequest,\n SetCountryRequest,\n RemoveProductFromPaymentRequest,\n UpdateAdvisorAssignTypeRequest,\n UpsertClemtaCompanyRequest,\n GetAdminProductsRequest,\n UpdateProductRequest,\n SetBannersRequest,\n SetCalendarRequest,\n CreateSubscriptionCancelCartRequest,\n SetCompanySuspensionStatusRequest,\n CancelPaymentRequest,\n RefundPaymentRequest,\n UploadContractDocumentRequest,\n UpdateUserActiveStatusRequest,\n UpdateUserStateRequest,\n GetReferenceCommissionReportRequest,\n ServiceProviderDTO,\n AssignAuthorizationRequest,\n GetUserTypeAuthorizationsRequest,\n PaymentReportRequest,\n UpsertFinancialAdvisorAssignmentRequest,\n BaseIdRequest,\n UpdateProductPriceRequest,\n UpsertDiscountRequest,\n UpdatePaymentPriceRequest,\n UpdatePurchasePriceRequest,\n} from '../api/data-contracts'\nimport {Props} from '../../_metronic/i18n/Metronici18n'\nimport {I18N_CONFIG_KEY, defterdar_log} from '../utils/utilities'\nimport {U} from '@fullcalendar/core/internal-common'\nimport {Payment} from '../api/Payment'\n\nexport class apiUrlHost {\n public static apiUrl: string\n}\n\nfunction getBaseUrl() {\n return apiUrlHost.apiUrl\n}\n\nasync function getRequest(path: string, token: string): Promise {\n let response: AxiosResponse = {} as AxiosResponse\n const lang = getLanguage()\n\n await axios\n .get(`${getBaseUrl()}${path}`, {\n headers: {Authorization: `Bearer ${token}`, Language: lang},\n })\n .then((result) => {\n response = result\n })\n .catch((error) => {\n response = error.response\n })\n\n return response\n}\n\nasync function postRequest(\n path: string,\n body: any,\n token: string\n): Promise {\n let response: AxiosResponse = {} as AxiosResponse\n\n const lang = getLanguage()\n await axios\n .post(`${getBaseUrl()}${path}`, body, {\n headers: {Authorization: `Bearer ${token}`, Language: lang},\n })\n .then((result) => {\n response = result\n })\n .catch((error) => {\n response = error.response\n })\n\n return response\n}\n\nexport function getLanguage(): string {\n const ls = localStorage.getItem(I18N_CONFIG_KEY)\n if (ls) {\n try {\n return (JSON.parse(ls) as Props).selectedLang\n } catch (er) {\n defterdar_log(er)\n return 'tr'\n }\n }\n\n return 'tr'\n}\n\nexport async function Api_Auth_Login(request: LoginRequest, token: string): Promise {\n return await postRequest('Auth/Login', request, token)\n}\n\nexport async function Api_User_GetUserInfo(token: string): Promise {\n return await getRequest('User/GetUserInfo', token)\n}\n\nexport async function Api_Company_SetSelectedCompany(\n request: SetSelectedCompanyRequest,\n token: string\n): Promise {\n return await postRequest('Company/SetSelectedCompany', request, token)\n}\n\nexport async function Api_Company_GetCompanyGeneralInfo(\n request: GetCompanyInfoRequest,\n token: string\n): Promise {\n return await postRequest('Company/GetCompanyGeneralInfo', request, token)\n}\n\nexport async function Api_Product_GetProducts(\n request: {TypeId: string},\n token: string\n): Promise {\n return await postRequest('Product/GetProducts', request, token)\n}\n\nexport async function Api_Payment_StartPayment(\n request: StartManualPaymentRequest,\n token: string\n): Promise {\n return await postRequest('Payment/StartPayment', request, token)\n}\n\nexport async function Api_Product_GetProductAndPaymentInfo(\n request: any,\n token: string\n): Promise {\n return await postRequest('Product/GetProductAndPaymentInfo', request, token)\n}\n\nexport async function Api_Company_UpsertCompany(\n request: UpsertCompanyRequest,\n token: string\n): Promise {\n return await postRequest('Company/UpsertCompany', request, token)\n}\n\nexport async function Api_User_GetAddressFormData(token: string): Promise {\n return await getRequest('Address/AddressFormData', token)\n}\n\nexport async function Api_Address_SetAddress(\n request: AddAddressRequest,\n token: string\n): Promise {\n return await postRequest('Address/SetAddress', request, token)\n}\n\nexport async function Api_Document_GetRequiredDocuments(\n request: GetRequiredDocumentsRequest,\n token: string\n): Promise {\n return await postRequest('Document/GetRequiredDocuments', request, token)\n}\n\nexport async function Api_Document_UploadDocument(\n request: UploadDocumentRequest,\n token: string\n): Promise {\n return await postRequest('Document/UploadDocument', request, token)\n}\n\nexport async function Api_Document_DeleteDocument(\n request: DocumentBaseRequest,\n token: string\n): Promise {\n return await postRequest('Document/Delete', request, token)\n}\n\nexport async function Api_Document_GetDocuments(\n request: GetDocumentsRequest,\n token: string\n): Promise {\n return await postRequest('Document/GetDocuments', request, token)\n}\n\nexport async function Api_User_Register(\n request: RegisterRequest,\n token: string\n): Promise {\n return await postRequest('User/Register', request, token)\n}\n\nexport async function Api_User_SendSmsVerificationCode(\n request: RegisterRequest,\n token: string\n): Promise {\n return await postRequest('User/SendSms', request, token)\n}\n\nexport async function Api_User_CheckSmsCode(\n request: RegisterRequest,\n token: string\n): Promise {\n return await postRequest('User/CheckSmsCode', request, token)\n}\n\nexport async function Api_Document_SetDocumentStatus(\n request: ChangeDocumentStatusRequest,\n token: string\n): Promise {\n return await postRequest('Document/SetDocumentStatus', request, token)\n}\n\nexport async function Api_User_SetUserIdentitiyNumber(\n request: SetIdentitiyNumberRequest,\n token: string\n): Promise {\n return await postRequest('User/SetUserIdentitiyNumber', request, token)\n}\n\nexport async function Api_User_SendPasswordResetEmail(\n request: SendPasswordResetMailRequest,\n token: string\n): Promise {\n return await postRequest('User/SendPasswordResetMail', request, token)\n}\n\nexport async function Api_User_SetNewPassword(\n request: SetNewPasswordRequest,\n token: string\n): Promise {\n return await postRequest('User/SetNewPassword', request, token)\n}\n\nexport async function Api_Payment_GetRegisteredCards(\n request: any,\n token: string\n): Promise {\n return await postRequest('Payment/GetRegisteredCards', request, token)\n}\n\nexport async function Api_Payment_AddNewCard(\n request: AddCardRequest,\n token: string\n): Promise {\n return await postRequest('Payment/AddNewCard', request, token)\n}\n\nexport async function Api_Payment_RemoveCard(\n request: RemoveCardRequest,\n token: string\n): Promise {\n return await postRequest('Payment/RemoveCard', request, token)\n}\n\nexport async function Api_Notification_Test(\n request: NotificationModel,\n token: string\n): Promise {\n return await postRequest('User/PushTest', request, token)\n}\n\nexport async function Api_Payment_AddProduct(\n request: AddProductToPaymentRequest,\n token: string\n): Promise {\n return await postRequest('Payment/AddProduct', request, token)\n}\n\nexport async function Api_Payment_RemoveProduct(\n request: RemoveProductFromPaymentRequest,\n token: string\n): Promise {\n return await postRequest('Payment/RemoveProduct', request, token)\n}\n\nexport async function Api_Payment_TryDiscount(\n request: TryDiscountRequest,\n token: string\n): Promise {\n return await postRequest('Payment/TryDiscount', request, token)\n}\n\nexport async function Api_Company_SetCompanyStep(\n request: SetCompanyStepRequest,\n token: string\n): Promise {\n return await postRequest('Company/SetCompanyStep', request, token)\n}\n\nexport async function Api_Company_OperationFieldSearch(\n request: OperationFieldSearchRequest,\n token: string\n): Promise {\n return await postRequest('Company/OperationFieldSearch', request, token)\n}\n\nexport async function Api_Company_SetCompanyExtraInfo(\n request: SetCompanyStepRequest,\n token: string\n): Promise {\n return await postRequest('Company/SetCompanyExtraInfo', request, token)\n}\n\nexport async function Api_Company_SearchAdvisorCompany(\n request: SearchAdvisorCompanyRequest,\n token: string\n): Promise {\n return await postRequest('Company/SearchAdvisorCompany', request, token)\n}\n\nexport async function Api_User_InviteAdvisorUser(\n request: InviteAdvisorUserRequest,\n token: string\n): Promise {\n return await postRequest('User/InviteAdvisorUser', request, token)\n}\n\nexport async function Api_Company_AssignAdvisorCompanyByCode(\n request: SearchAdvisorCompanyRequest,\n token: string\n): Promise {\n return await postRequest('Company/AssignAdvisorCompanyByCode', request, token)\n}\n\nexport async function Api_Company_UpdateAdvisoriAssignType(\n request: UpdateAdvisorAssignTypeRequest,\n token: string\n): Promise {\n return await postRequest('Company/UpdateAdvisoriAssignType', request, token)\n}\n\nexport async function Api_User_RegisterInvitedAdvisorUser(\n request: RegisterInvitedAdvisorUserRequest,\n token: string\n): Promise {\n return await postRequest('User/RegisterInvitedAdvisorUser', request, token)\n}\n\nexport async function Api_EInvoice_GetCommonData(token: string): Promise {\n return await getRequest('eInvoice/GetCommonData', token)\n}\n\nexport async function Api_EInvoice_UpsertProduct(\n request: UpsertEInvoiceProductRequest,\n token: string\n): Promise {\n return await postRequest('eInvoice/UpsertProduct', request, token)\n}\n\nexport async function Api_EInvoice_GetProduct(\n request: GetProductRequest,\n token: string\n): Promise {\n return await postRequest('eInvoice/GetProduct', request, token)\n}\n\nexport async function Api_EInvoice_RemoveProduct(\n request: GetProductRequest,\n token: string\n): Promise {\n return await postRequest('eInvoice/RemoveProduct', request, token)\n}\n\nexport async function Api_EInvoice_UpsertCustomer(\n request: UpsertEInvoiceCustomerRequest,\n token: string\n): Promise {\n return await postRequest('eInvoice/UpsertCustomer', request, token)\n}\n\nexport async function Api_EInvoice_GetCustomer(\n request: GetCustomerRequest,\n token: string\n): Promise {\n return await postRequest('eInvoice/GetCustomer', request, token)\n}\n\nexport async function Api_EInvoice_RemoveCustomer(\n request: GetCustomerRequest,\n token: string\n): Promise {\n return await postRequest('eInvoice/RemoveCustomer', request, token)\n}\n\nexport async function Api_Payment_PricesForPayment(\n request: PricesForCertainPaymentRequest,\n token: string\n): Promise {\n return await postRequest('Payment/PricesForPayment', request, token)\n}\nexport async function Api_EInvoice_CreateInvoice(\n request: CreateInvoiceRequest,\n token: string\n): Promise {\n return await postRequest('eInvoice/CreateInvioce', request, token)\n}\n\nexport async function Api_EInvoice_GetInviocePreview(\n request: CreateInvoiceRequest,\n token: string\n): Promise {\n return await postRequest('eInvoice/GetInviocePreview', request, token)\n}\n\nexport async function Api_Admin_GetCompanies(\n request: GetAdminCompaniesRequest,\n token: string\n): Promise {\n return await postRequest('Admin/GetCompanies', request, token)\n}\n\nexport async function Api_Admin_GetCompany(\n request: GetAdminCompanyRequest,\n token: string\n): Promise {\n return await postRequest('Admin/GetCompany', request, token)\n}\n\nexport async function Api_Admin_GetPaymentInvoices(\n request: GetPaymentInvoicesRequest,\n token: string\n): Promise {\n return await postRequest('Admin/GetPaymentInvoices', request, token)\n}\n\nexport async function Api_Admin_PrintInvoice(\n request: PrintInvoiceRequest,\n token: string\n): Promise {\n return await postRequest('Admin/PrintInvoice', request, token)\n}\n\nexport async function Api_Wizard_GetWizardData(token: string): Promise {\n return await getRequest('Wizard/GetWizardData', token)\n}\n\nexport async function Api_Wizard_GetClemtaWizardData(token: string): Promise {\n return await getRequest('Wizard/GetClemtaWizardData', token)\n}\n\nexport async function Api_Admin_CheckProcessingInvoices(token: string): Promise {\n return await getRequest('Admin/CheckProcessingInvoices', token)\n}\n\nexport async function Api_eInvoice_UpsertEInvoiceParameters(\n request: UpsertEInvoiceParametersRequest,\n token: string\n): Promise {\n return await postRequest('eInvoice/UpsertEInvoiceParameters', request, token)\n}\n\nexport async function Api_Admin_CancelInvoice(\n request: PrintInvoiceRequest,\n token: string\n): Promise {\n return await postRequest('Admin/CancelInvoice', request, token)\n}\n\nexport async function Api_Admin_GetPrintedInvoicesRequest(\n request: GetPrintedInvoicesRequest,\n token: string\n): Promise {\n return await postRequest('eInvoice/Invoices', request, token)\n}\n\nexport async function Api_Admin_GetCompaniesStartup(token: string): Promise {\n return await getRequest('Admin/GetCompaniesStartup', token)\n}\n\nexport async function Api_Admin_GetCompanyDetailStartup(token: string): Promise {\n return await getRequest('Admin/GetCompanyDetailStartup', token)\n}\n\nexport async function Api_Admin_ChangeUserActive(\n request: UpdateUserActiveStatusRequest,\n token: string\n): Promise {\n return await postRequest('Admin/ChangeUserActive', request, token)\n}\n\nexport async function Api_Admin_ChangeUserState(\n request: UpdateUserStateRequest,\n token: string\n): Promise {\n return await postRequest('Admin/ChangeUserState', request, token)\n}\n\nexport async function Api_Admin_UpdateCompany(\n request: UpdateCompanyRequest,\n token: string\n): Promise {\n return await postRequest('Admin/UpdateCompany', request, token)\n}\n\nexport async function Api_Admin_GetPotentialCustomers(\n request: GetPotentialCustomersRequest,\n token: string\n): Promise {\n return await postRequest('Admin/GetPotentialCustomers', request, token)\n}\n\nexport async function Api_Admin_GetDashboard(\n request: GetDashboardDataRequest,\n token: string\n): Promise {\n return await postRequest('Admin/GetDashboard', request, token)\n}\n\nexport async function Api_Admin_GetInvoicesStartup(token: string): Promise {\n return await getRequest('Admin/GetInvoicesStartup', token)\n}\n\nexport async function Api_Admin_GetInviocePreview(\n request: PrintInvoiceRequest,\n token: string\n): Promise {\n return await postRequest('Admin/GetInviocePreview', request, token)\n}\n\nexport async function Api_User_Update(\n request: UpdateUserRequest,\n token: string\n): Promise {\n return await postRequest('User/Update', request, token)\n}\n\nexport async function Api_Wizard_GetActiveCountries(token: string): Promise {\n return await getRequest('Wizard/GetActiveCountries', token)\n}\n\nexport async function Api_User_SetCountry(\n request: SetCountryRequest,\n token: string\n): Promise {\n return await postRequest('User/SetCountry', request, token)\n}\n\nexport async function Api_Company_UpsertCompanyClemta(\n request: UpsertClemtaCompanyRequest,\n token: string\n): Promise {\n return await postRequest('Company/UpsertCompanyClemta', request, token)\n}\n\nexport async function Api_Admin_GetProductsPage(\n request: GetAdminProductsRequest,\n token: string\n): Promise {\n return await postRequest('Admin/GetProductsPage', request, token)\n}\n\nexport async function Api_Admin_UpsertProduct(\n request: UpdateProductRequest,\n token: string\n): Promise {\n return await postRequest('Admin/UpsertProduct', request, token)\n}\n\nexport async function Api_Admin_GetDiscountPage(token: string): Promise {\n return await getRequest('Admin/GetDiscountPage', token)\n}\n\nexport async function Api_Admin_UpsertDiscount(\n request: UpsertDiscountRequest,\n token: string\n): Promise {\n return await postRequest('Admin/UpsertDiscount', request, token)\n}\n\nexport async function Api_Admin_UpsertProductPrices(\n request: UpdateProductPriceRequest,\n token: string\n): Promise {\n return await postRequest('Admin/UpsertProductPrices', request, token)\n}\n\nexport async function Api_Company_AssignPackage(\n request: any,\n token: string\n): Promise {\n return await postRequest('Company/AssignPackage', request, token)\n}\n\nexport async function Api_Company_GetCompanyTimeline(\n request: any,\n token: string\n): Promise {\n return await postRequest('Company/GetCompanyTimeline', {}, token)\n}\n\nexport async function Api_Company_GetProductSummary(\n request: any,\n token: string\n): Promise {\n return await postRequest('Company/GetProductSummary', {}, token)\n}\n\nexport async function Api_Admin_SetBanners(\n request: SetBannersRequest,\n token: string\n): Promise {\n return await postRequest('Admin/SetBanners', request, token)\n}\n\nexport async function Api_Admin_GetBanners(token: string): Promise {\n return await getRequest('Other/GetBanners', token)\n}\n\nexport async function Api_Admin_SetCalendar(\n request: SetCalendarRequest,\n token: string\n): Promise {\n return await postRequest('Admin/SetCalendar', request, token)\n}\n\nexport async function Api_Admin_GetCalendarData(token: string): Promise {\n return await getRequest('Admin/GetCalendarData', token)\n}\n\nexport async function Api_Admin_GetCalendar(token: string): Promise {\n return await getRequest('Other/GetCalendar', token)\n}\n\nexport async function Api_Payment_CreateSubscriptionCancelPayment(\n request: CreateSubscriptionCancelCartRequest,\n token: string\n): Promise {\n return await postRequest('Payment/CreateSubscriptionCancelPayment', request, token)\n}\n\nexport async function Api_ServiceProvider_SetCompanySuspensionStatus(\n request: SetCompanySuspensionStatusRequest,\n token: string\n): Promise {\n return await postRequest('ServiceProvider/SetCompanySuspensionStatus', request, token)\n}\nexport async function Api_Admin_CancelPayment(\n request: CancelPaymentRequest,\n token: string\n): Promise {\n return await postRequest('Admin/CancelPayment', request, token)\n}\n\nexport async function Api_Admin_RefundPayment(\n request: RefundPaymentRequest,\n token: string\n): Promise {\n return await postRequest('Admin/RefundPayment', request, token)\n}\n\nexport async function Api_Admin_UpdatePaymentPrice(\n request: UpdatePaymentPriceRequest,\n token: string\n): Promise {\n return await postRequest('Admin/UpdatePaymentPrice', request, token)\n}\n\nexport async function Api_Admin_UpdatePurchasePrice(\n request: UpdatePurchasePriceRequest,\n token: string\n): Promise {\n return await postRequest('Admin/UpdatePurchasePrice', request, token)\n}\n\nexport async function Api_Admin_StopPurchase(\n request: BaseIdRequest,\n token: string\n): Promise {\n return await postRequest('Admin/StopPurchase', request, token)\n}\n\nexport async function Api_Admin_RestartPurchase(\n request: BaseIdRequest,\n token: string\n): Promise {\n return await postRequest('Admin/RestartPurchase', request, token)\n}\n\nexport async function Api_Admin_GetContractTemplate(token: string): Promise {\n return await getRequest('Admin/GetContractTemplate', token)\n}\n\nexport async function Api_Admin_UploadContractDocument(\n request: UploadContractDocumentRequest,\n token: string\n): Promise {\n return await postRequest('Admin/UploadContractDocument', request, token)\n}\n\nexport async function Api_Admin_GetSaleReport(request: any, token: string): Promise {\n return await postRequest('Admin/GetSaleReport', {}, token)\n}\n\nexport async function Api_Admin_GetReferenceCommissionReport(\n request: GetReferenceCommissionReportRequest,\n token: string\n): Promise {\n return await postRequest('Admin/GetReferenceCommissionReport', request, token)\n}\n\nexport async function Api_Admin_GetPaymentReport(\n request: PaymentReportRequest,\n token: string\n): Promise {\n return await postRequest('Admin/GetPaymentReport', request, token)\n}\n\nexport async function Api_Admin_GetReferences(token: string): Promise {\n return await getRequest('Admin/GetReferences', token)\n}\n\nexport async function Api_Admin_GetPaymentStates(token: string): Promise {\n return await getRequest('Admin/GetPaymentStates', token)\n}\n\nexport async function Api_Admin_GetServiceProviders(token: string): Promise {\n return await getRequest('Admin/GetServiceProviders', token)\n}\n\nexport async function Api_Admin_UpdateServiceProviders(\n request: ServiceProviderDTO,\n token: string\n): Promise {\n return await postRequest('Admin/UpdateServiceProviders', request, token)\n}\n\nexport async function Api_Company_CancelSuspension(\n request: any,\n token: string\n): Promise {\n return await postRequest('Company/CancelSuspension', {}, token)\n}\n\nexport async function Api_Admin_GetAuthorizationPageStartup(token: string): Promise {\n return await getRequest('Admin/GetAuthorizationPageStartup', token)\n}\n\nexport async function Api_Admin_AssignAuthorizationToUserType(\n request: AssignAuthorizationRequest,\n token: string\n): Promise {\n return await postRequest('Admin/AssignAuthorizationToUserType', request, token)\n}\n\nexport async function Api_Admin_RemoveAuthorizationFromUserType(\n request: AssignAuthorizationRequest,\n token: string\n): Promise {\n return await postRequest('Admin/RemoveAuthorizationFromUserType', request, token)\n}\n\nexport async function Api_Admin_GetUserTypeAuthorizations(\n request: GetUserTypeAuthorizationsRequest,\n token: string\n): Promise {\n return await postRequest('Admin/GetUserTypeAuthorizations', request, token)\n}\n\nexport async function Api_Admin_GetFaarStartup(token: string): Promise {\n return await getRequest('Admin/GetFinancialAdvisorAssignmentStartup', token)\n}\n\nexport async function Api_Admin_GetFaars(token: string): Promise {\n return await getRequest('Admin/GetFinancialAdvisorAssignmentRules', token)\n}\n\nexport async function Api_Admin_RemoveFaar(\n request: BaseIdRequest,\n token: string\n): Promise {\n return await postRequest('Admin/RemoveFinancialAdvisorAssignmentRule', request, token)\n}\n\nexport async function Api_Admin_UpsertFaar(\n request: UpsertFinancialAdvisorAssignmentRequest,\n token: string\n): Promise {\n return await postRequest('Admin/UpsertFinancialAdvisorAssignmentRule', request, token)\n}\n","export enum CompanyEventEnum {\n COMPANY_BOUGHT_PACKAGE = 6,\n COMPANY_CREATED = 3,\n COMPANY_CREATION_STARTED = 2,\n COMPANY_ECONVERSION_FINISHED = 5,\n COMPANY_ECONVERSION_STARTED = 4,\n COMPANY_REGISTERED = 1,\n}\n\nexport enum CompanySuspensionStatusEnum {\n Borçlu_Fesih = 8,\n Mali_Müşavir_Değişim_Başladı = 7,\n Mali_Müşavir_Değiştirdi = 4,\n Mali_Müşavir_Değiştirmek_İstiyor = 3,\n Şirket_Kapandı___Tasfiye_Sonuçlandı = 2,\n Şirket_Kapanış_İptal_Edildi = 5,\n Şirketi_Kapatmak_İstiyor___Tasfiye_Başladı = 1,\n Tasfiye_Başladı = 6,\n}\n\nexport enum CompanyTypeEnum {\n Anonim_Şirketi = 3,\n C_Corporation__General_Corporation_ = 5,\n Limited_Şirketi = 2,\n LLC__Limited_Liability_Company_ = 6,\n Serbest_Meslek = 4,\n Şahıs_Şirketi = 1,\n}\n\nexport enum ApplicationStepEnum {\n Turkey_AdvisorSelection = 19,\n Turkey_CompanyCreated = 16,\n Turkey_CompanyExtraInfo = 7,\n Turkey_DocumentAreApproved = 12,\n Turkey_DocumentInReview = 11,\n Turkey_DocumentsNeedUpdate = 14,\n Turkey_EconversionStarted = 15,\n Turkey_Finished = 13,\n Turkey_Payment = 21,\n Turkey_PersonalInfo = 20,\n Turkey_WizardFinished = 10,\n}\n\nexport enum AddressTypeEnum {\n Bireysel_Adres = 1,\n Faaliyet_Adresi = 4,\n Fatura_Adresi = 2,\n Kurumsal_Adres = 3,\n}\n\nexport enum DocumentTypeEnum {\n Araç_Sıfırsa_Faturası,\n _İkinci_El_ise_Satış_Noter_Belgesi_veya_Kiralama_Belgesi = 18,\n}\n\nexport enum FileApprovalStatusEnum {\n Onay_Bekliyor = 1,\n Onay_Gerekmiyor = 4,\n Onaylandı = 2,\n Reddedildi = 3,\n}\n\nexport enum CurrencyEnum {\n Dolar = 2,\n Euro = 3,\n Singapur_Doları = 5,\n Sterlin = 4,\n Türk_Lirası = 1,\n}\n\nexport enum ProductTypeEnum {\n Cezai_Bedel = 12,\n Clemta_Package = 11,\n Ek_Çözüm = 4,\n İndirim = 6,\n Paket = 3,\n Paket_Alt_Ürünü = 5,\n Silinmiş = 13,\n}\n\nexport enum ServicePeriodEnum {\n Aylık = 4,\n Günlük = 2,\n Haftalık = 3,\n Saatlik = 1,\n Tek_Sefer = 6,\n Yıllık = 5,\n}\n\nexport enum UserTypeEnum {\n Admin = 5,\n E_Dönüşüm = 3,\n Mali_Müşavir = 2,\n Mali_Müşavir_Davetli = 4,\n Müşteri = 1,\n Satışçı = 6,\n}\n\nexport enum AdvisorAssignTypeEnum {\n Auto = 1,\n Invited = 3,\n Pass = 4,\n SelectedWithCode = 2,\n}\n\nexport enum PaymentStateEnum {\n Abonelik_Ödeme_Başarılı = 8,\n Abonelik_Ödeme_Başarısız = 7,\n Abonelik_Ödeme_İşleniyor = 6,\n Approve_Başarısız = 4,\n Başarılı = 2,\n Başarısız = 3,\n Bekleyen_Abonelik_Ödemesi = 5,\n İade_Edildi = 11,\n İptal = 10,\n Ödeme_Devam_Ediyor = 1,\n Ödeme_Oluşturuluyor = 9,\n}\n\nexport enum CountryEnum {\n Afganistan = 2,\n Alaska = 3,\n Almanya = 4,\n Amerika_Birleşik_Devletleri = 5,\n Amerikan_Samoa = 6,\n Andora = 7,\n Angola = 8,\n Anguilla = 9,\n Antartika = 10,\n Antigua_ve_Barbuda = 11,\n Arjantin = 12,\n Arnavutluk = 13,\n Aruba = 14,\n Avustralya = 15,\n Avusturya = 16,\n Azerbeycan = 17,\n Bahama_Adaları = 18,\n Bahreyn = 19,\n Bangladeş = 20,\n Barbados = 21,\n Belçika = 23,\n Belize = 22,\n Benin = 24,\n Bermuda = 25,\n Beyaz_Rusya = 26,\n Bhutan = 27,\n Birleşik_Arap_Emirlikleri = 28,\n Bolivya = 29,\n Bosna_Hersek = 30,\n Botswana = 31,\n Bouvet_Adası = 32,\n Brezilya = 33,\n British_Virgin_Islands = 34,\n Bulgaristan = 35,\n Burkina_Faso = 36,\n Burma = 37,\n Burundi = 38,\n Burunei_Sultanlığı = 39,\n Cebelitarık = 40,\n Cezayir = 41,\n Christmas_Adaları = 42,\n Cibuti = 43,\n Cocos_Adaları = 44,\n Çad = 223,\n Çek_Cumhuriyeti = 224,\n Çin = 225,\n Danimarka = 45,\n Demokratik_Kongo_Cumhuriyeti = 46,\n Dominik_Cumhuriyeti = 47,\n Dominika = 48,\n Ekvator = 49,\n Ekvator_Ginesi = 50,\n El_Salvador = 51,\n Endonezya = 52,\n Eritre = 53,\n Ermenistan = 54,\n Estonya = 55,\n Etiyopya = 56,\n Falkland_Adası = 57,\n Faroa_Adaları = 58,\n Fas = 59,\n Fiji = 60,\n Fildişi_Sahili = 61,\n Filipinler = 62,\n Filistin = 63,\n Finlandiya = 64,\n Fransa = 65,\n Fransız_Guyanası = 66,\n Fransız_Polinezyası = 67,\n Gabon = 68,\n Gambiya = 69,\n Gana = 70,\n Gine = 71,\n Gine_Bissau = 72,\n Grenada = 73,\n Grönland = 74,\n Guadalup = 75,\n Guam = 76,\n Guatemala = 77,\n Guernsey = 78,\n Guyana = 79,\n Güney_Afrika_Cumhuriyeti = 80,\n Güney_Kore = 81,\n Gürcistan = 82,\n Haiti = 83,\n Heard_ve_McDonald_Adaları = 84,\n Hırvatistan = 90,\n Hindistan = 85,\n Hollanda = 86,\n Hollanda_Antilleri = 87,\n Honduras = 88,\n Hong_Kong = 89,\n Irak = 91,\n Isle_of_Man = 92,\n İngiliz_Virjin_Adaları = 228,\n İngiltere = 229,\n İran = 230,\n İrlanda = 231,\n İspanya = 232,\n İsrail = 233,\n İsveç = 234,\n İsviçre = 235,\n İtalya = 236,\n İzlanda = 237,\n Jamaika = 93,\n Japonya = 94,\n Jersey = 95,\n Kamboçya = 96,\n Kamerun = 97,\n Kanada = 98,\n Kape_Verde__Yeşil_Burun_ = 99,\n Karadağ = 100,\n Katar = 101,\n Kayman_Adaları = 102,\n Kazakistan = 103,\n Kenya = 104,\n Kırgızistan = 115,\n Kiribati = 105,\n Kolombiya = 106,\n Komor_Adaları = 107,\n Kongo = 108,\n Kosta_Rika = 109,\n Kuveyt = 110,\n Kuzey_Kıbrıs_Türk_C_ = 112,\n Kuzey_Kore = 111,\n Kuzey_Mariana_Adası = 113,\n Küba = 114,\n Laos = 116,\n Lesoto = 117,\n Letonya = 118,\n Liberya = 119,\n Libya = 120,\n Lichtenstein = 121,\n Litvanya = 122,\n Lübnan = 123,\n Lüksemburg = 124,\n Macaristan = 125,\n Madagaskar = 126,\n Makao = 127,\n Makedonya = 128,\n Malavi = 129,\n Maldivler = 130,\n Malezya = 131,\n Mali = 132,\n Malta = 133,\n Marshall_Adası = 134,\n Martinik = 135,\n Mauritus = 136,\n Mayotte = 137,\n Meksika = 138,\n Mısır = 146,\n Mikronezya = 139,\n Moğolistan = 145,\n Moldovya = 140,\n Monaco = 141,\n Montserrat = 142,\n Moritanya = 143,\n Mozambik = 144,\n Namibya = 147,\n Nauru = 148,\n Nepal = 149,\n Nijer = 150,\n Nijerya = 151,\n Nikaragua = 152,\n Niue = 153,\n Norfolk_Adası = 154,\n Norveç = 155,\n Orta_Afrika_Cumhuriyeti = 156,\n Özbekistan = 226,\n Pakistan = 157,\n Palau = 158,\n Panama = 159,\n Papua_Yeni_Gine = 160,\n Paraguay = 161,\n Peru = 162,\n Pitcairn_Adaları = 163,\n Polonya = 164,\n Portekiz = 165,\n Porto_Rico = 166,\n Reunion = 167,\n Romanya = 168,\n Ruanda = 169,\n Rusya = 170,\n Saint_Helena = 171,\n Saint_Kitts_ve_Nevis = 172,\n Saint_Lucia = 173,\n Saint_Pierre_ve_Miquelon = 174,\n Saint_Vincent_ve_Grenadinler = 175,\n Samoa = 176,\n San_Marino = 177,\n Sao_Tome_ve_Principe = 178,\n Senegal = 179,\n Sırbistan = 193,\n Sierra_Leone = 180,\n Singapur = 181,\n Slovakya_Cumhuriyeti = 182,\n Slovenya = 183,\n Solomon_Adaları = 184,\n Somali = 185,\n Sri_Lanka = 186,\n Sudan = 187,\n Surinam = 188,\n Suriye = 189,\n Suudi_Arabistan = 190,\n Svalbard = 191,\n Swaziland = 192,\n Şeysel_Adaları = 238,\n Şili = 239,\n Tacikistan = 194,\n Tanzanya = 195,\n Tayland = 196,\n Tayvan = 197,\n Togo = 198,\n Tokelau = 199,\n Tonga = 200,\n Trinidad_ve_Tobago = 201,\n Tunus = 202,\n Turks_ve_Caicos_Adası = 203,\n Tuvalu = 204,\n Türkiye = 1,\n Türkmenistan = 205,\n Ukrayna = 206,\n Umman = 207,\n Uruguay = 208,\n Uyduristan = 209,\n Ürdün = 227,\n Vallis_ve_Futuna_Adası = 210,\n Vanuatu = 211,\n Vatikan = 212,\n Venezuella = 213,\n Vietnam = 214,\n Virgin_Adaları = 215,\n Yemen = 216,\n Yeni_Kaledonya = 217,\n Yeni_Zelanda = 218,\n Yugoslavya = 219,\n Yunanistan = 220,\n Zambiya = 221,\n Zimbabve = 222,\n}\n\nexport enum UserTypeAuthorizationsEnum {\n Admin_Panel__EInvoice_Page = 9,\n Admin_Panel_Companies_Page = 7,\n Admin_Panel_Company_Cancel_Payment = 28,\n Admin_Panel_Company_Documents = 29,\n Admin_Panel_Company_Invoice_Download = 31,\n Admin_Panel_Company_Payment_Amount_Edit = 36,\n Admin_Panel_Company_Payment_Error = 33,\n Admin_Panel_Company_Payment_Refund = 27,\n Admin_Panel_Company_Purchase_Amount_Edit = 39,\n Admin_Panel_Company_Purchase_Start = 38,\n Admin_Panel_Company_Purchase_Stop = 37,\n Admin_Panel_Company_Suspension = 30,\n Admin_Panel_Company_Update = 11,\n Admin_Panel_Company_Update_Active_Passive = 18,\n Admin_Panel_Company_Update_Email = 22,\n Admin_Panel_Company_Update_Financial_Advisor = 26,\n Admin_Panel_Company_Update_Inspection = 19,\n Admin_Panel_Company_Update_Name = 16,\n Admin_Panel_Company_Update_Phone = 23,\n Admin_Panel_Company_Update_Reference = 24,\n Admin_Panel_Company_Update_State = 20,\n Admin_Panel_Company_Update_Suspension_Reason = 21,\n Admin_Panel_Company_Update_Tax_Number = 17,\n Admin_Panel_Company_User_Active_Passive = 25,\n Admin_Panel_Dashboard_Page = 5,\n Admin_Panel_Discount_Page = 35,\n Admin_Panel_Login = 1,\n Admin_Panel_Non_Customer_Users_Page = 8,\n Admin_Panel_Product_Page = 34,\n Admin_Panel_Report_Commission = 15,\n Admin_Panel_Report_Payment = 32,\n Admin_Panel_Report_Sale = 14,\n Admin_Panel_Reports_Page = 6,\n Admin_Panel_Settings_Page = 10,\n Authorization = 12,\n Login = 13,\n}\n\nexport enum SmsTemplateEnum {\n Company_Created = 8,\n Docuemnt_Review = 6,\n EConversion_Started = 7,\n First_Payment = 5,\n Register_Phone_Validation = 3,\n Register_Welcome = 4,\n}\n\nexport enum PaymentSuccessCommandEnum {\n Register_Complete = 1,\n Suspend_Company_For_Advisor_Change = 3,\n Suspend_Company_For_Liquidation = 2,\n}\n\nexport enum CompanySuspensionReasonEnum {\n Borçlu_Fesih = 1,\n Diğer = 5,\n Mali_Müşavir_Sorunları = 4,\n Paket_Fiyatları_Pahalı = 3,\n Tasfiye_Edildi = 2,\n}\n","import React from 'react'\nimport {ErrorMessage} from 'formik'\nimport Translator from '../translate/Translator'\n\nfunction FormInputErrorMessage(props: {name: string}) {\n return (\n (\n
\n \n
\n )}\n />\n )\n}\n\nexport default FormInputErrorMessage\n","import React from 'react'\nimport Translator from '../translate/Translator'\n\nfunction NormalTitle(props: {text: string}) {\n return (\n
\n

\n \n

\n
\n )\n}\n\nexport default NormalTitle\n","import {useIntl} from 'react-intl'\n\nexport interface ITranslatorInput {\n name: string\n params?: any\n}\n\nfunction Translator(props: ITranslatorInput) {\n const intl = useIntl()\n return (\n <>\n \n {props.name?.length > 0 &&\n intl.formatMessage({id: props.name ?? '', defaultMessage: props.name}, props.params)}\n \n \n )\n}\n\nexport default Translator\n","import {useIntl} from 'react-intl'\n\nfunction TranslatorText(name: string, params?: any) {\n const intl = useIntl()\n\n const messageExists = intl.messages[name]\n\n return name.length > 0\n ? messageExists\n ? intl.formatMessage({id: name}, params)\n : name // Fallback to name if translation doesn't exist\n : null\n}\n\nexport default TranslatorText\n","import { EMPTY_ARR } from \"./constants\";\n\n/**\n * Assign properties from `props` to `obj`\n * @template O, P The obj and props types\n * @param {O} obj The object to copy properties to\n * @param {P} props The object to copy properties from\n * @returns {O & P}\n */\nexport function assign(obj, props) {\n\t// @ts-ignore We change the type of `obj` to be `O & P`\n\tfor (let i in props) obj[i] = props[i];\n\treturn /** @type {O & P} */ (obj);\n}\n\n/**\n * Remove a child node from its parent if attached. This is a workaround for\n * IE11 which doesn't support `Element.prototype.remove()`. Using this function\n * is smaller than including a dedicated polyfill.\n * @param {Node} node The node to remove\n */\nexport function removeNode(node) {\n\tlet parentNode = node.parentNode;\n\tif (parentNode) parentNode.removeChild(node);\n}\n\nexport const slice = EMPTY_ARR.slice;\n","import { _catchError } from './diff/catch-error';\n\n/**\n * The `option` object can potentially contain callback functions\n * that are called during various stages of our renderer. This is the\n * foundation on which all our addons like `preact/debug`, `preact/compat`,\n * and `preact/hooks` are based on. See the `Options` type in `internal.d.ts`\n * for a full list of available option hooks (most editors/IDEs allow you to\n * ctrl+click or cmd+click on mac the type definition below).\n * @type {import('./internal').Options}\n */\nconst options = {\n\t_catchError\n};\n\nexport default options;\n","import { slice } from './util';\nimport options from './options';\n\nlet vnodeId = 0;\n\n/**\n * Create an virtual node (used for JSX)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component\n * constructor for this virtual node\n * @param {object | null | undefined} [props] The properties of the virtual node\n * @param {Array} [children] The children of the virtual node\n * @returns {import('./internal').VNode}\n */\nexport function createElement(type, props, children) {\n\tlet normalizedProps = {},\n\t\tkey,\n\t\tref,\n\t\ti;\n\tfor (i in props) {\n\t\tif (i == 'key') key = props[i];\n\t\telse if (i == 'ref') ref = props[i];\n\t\telse normalizedProps[i] = props[i];\n\t}\n\n\tif (arguments.length > 2) {\n\t\tnormalizedProps.children =\n\t\t\targuments.length > 3 ? slice.call(arguments, 2) : children;\n\t}\n\n\t// If a Component VNode, check for and apply defaultProps\n\t// Note: type may be undefined in development, must never error here.\n\tif (typeof type == 'function' && type.defaultProps != null) {\n\t\tfor (i in type.defaultProps) {\n\t\t\tif (normalizedProps[i] === undefined) {\n\t\t\t\tnormalizedProps[i] = type.defaultProps[i];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn createVNode(type, normalizedProps, key, ref, null);\n}\n\n/**\n * Create a VNode (used internally by Preact)\n * @param {import('./internal').VNode[\"type\"]} type The node name or Component\n * Constructor for this virtual node\n * @param {object | string | number | null} props The properties of this virtual node.\n * If this virtual node represents a text node, this is the text of the node (string or number).\n * @param {string | number | null} key The key for this virtual node, used when\n * diffing it against its children\n * @param {import('./internal').VNode[\"ref\"]} ref The ref property that will\n * receive a reference to its created child\n * @returns {import('./internal').VNode}\n */\nexport function createVNode(type, props, key, ref, original) {\n\t// V8 seems to be better at detecting type shapes if the object is allocated from the same call site\n\t// Do not inline into createElement and coerceToVNode!\n\tconst vnode = {\n\t\ttype,\n\t\tprops,\n\t\tkey,\n\t\tref,\n\t\t_children: null,\n\t\t_parent: null,\n\t\t_depth: 0,\n\t\t_dom: null,\n\t\t// _nextDom must be initialized to undefined b/c it will eventually\n\t\t// be set to dom.nextSibling which can return `null` and it is important\n\t\t// to be able to distinguish between an uninitialized _nextDom and\n\t\t// a _nextDom that has been set to `null`\n\t\t_nextDom: undefined,\n\t\t_component: null,\n\t\t_hydrating: null,\n\t\tconstructor: undefined,\n\t\t_original: original == null ? ++vnodeId : original\n\t};\n\n\t// Only invoke the vnode hook if this was *not* a direct copy:\n\tif (original == null && options.vnode != null) options.vnode(vnode);\n\n\treturn vnode;\n}\n\nexport function createRef() {\n\treturn { current: null };\n}\n\nexport function Fragment(props) {\n\treturn props.children;\n}\n\n/**\n * Check if a the argument is a valid Preact VNode.\n * @param {*} vnode\n * @returns {vnode is import('./internal').VNode}\n */\nexport const isValidElement = vnode =>\n\tvnode != null && vnode.constructor === undefined;\n","import { IS_NON_DIMENSIONAL } from '../constants';\nimport options from '../options';\n\n/**\n * Diff the old and new properties of a VNode and apply changes to the DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to apply\n * changes to\n * @param {object} newProps The new props\n * @param {object} oldProps The old props\n * @param {boolean} isSvg Whether or not this node is an SVG node\n * @param {boolean} hydrate Whether or not we are in hydration mode\n */\nexport function diffProps(dom, newProps, oldProps, isSvg, hydrate) {\n\tlet i;\n\n\tfor (i in oldProps) {\n\t\tif (i !== 'children' && i !== 'key' && !(i in newProps)) {\n\t\t\tsetProperty(dom, i, null, oldProps[i], isSvg);\n\t\t}\n\t}\n\n\tfor (i in newProps) {\n\t\tif (\n\t\t\t(!hydrate || typeof newProps[i] == 'function') &&\n\t\t\ti !== 'children' &&\n\t\t\ti !== 'key' &&\n\t\t\ti !== 'value' &&\n\t\t\ti !== 'checked' &&\n\t\t\toldProps[i] !== newProps[i]\n\t\t) {\n\t\t\tsetProperty(dom, i, newProps[i], oldProps[i], isSvg);\n\t\t}\n\t}\n}\n\nfunction setStyle(style, key, value) {\n\tif (key[0] === '-') {\n\t\tstyle.setProperty(key, value == null ? '' : value);\n\t} else if (value == null) {\n\t\tstyle[key] = '';\n\t} else if (typeof value != 'number' || IS_NON_DIMENSIONAL.test(key)) {\n\t\tstyle[key] = value;\n\t} else {\n\t\tstyle[key] = value + 'px';\n\t}\n}\n\n/**\n * Set a property value on a DOM node\n * @param {import('../internal').PreactElement} dom The DOM node to modify\n * @param {string} name The name of the property to set\n * @param {*} value The value to set the property to\n * @param {*} oldValue The old value the property had\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node or not\n */\nexport function setProperty(dom, name, value, oldValue, isSvg) {\n\tlet useCapture;\n\n\to: if (name === 'style') {\n\t\tif (typeof value == 'string') {\n\t\t\tdom.style.cssText = value;\n\t\t} else {\n\t\t\tif (typeof oldValue == 'string') {\n\t\t\t\tdom.style.cssText = oldValue = '';\n\t\t\t}\n\n\t\t\tif (oldValue) {\n\t\t\t\tfor (name in oldValue) {\n\t\t\t\t\tif (!(value && name in value)) {\n\t\t\t\t\t\tsetStyle(dom.style, name, '');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (value) {\n\t\t\t\tfor (name in value) {\n\t\t\t\t\tif (!oldValue || value[name] !== oldValue[name]) {\n\t\t\t\t\t\tsetStyle(dom.style, name, value[name]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t// Benchmark for comparison: https://esbench.com/bench/574c954bdb965b9a00965ac6\n\telse if (name[0] === 'o' && name[1] === 'n') {\n\t\tuseCapture = name !== (name = name.replace(/Capture$/, ''));\n\n\t\t// Infer correct casing for DOM built-in events:\n\t\tif (name.toLowerCase() in dom) name = name.toLowerCase().slice(2);\n\t\telse name = name.slice(2);\n\n\t\tif (!dom._listeners) dom._listeners = {};\n\t\tdom._listeners[name + useCapture] = value;\n\n\t\tif (value) {\n\t\t\tif (!oldValue) {\n\t\t\t\tconst handler = useCapture ? eventProxyCapture : eventProxy;\n\t\t\t\tdom.addEventListener(name, handler, useCapture);\n\t\t\t}\n\t\t} else {\n\t\t\tconst handler = useCapture ? eventProxyCapture : eventProxy;\n\t\t\tdom.removeEventListener(name, handler, useCapture);\n\t\t}\n\t} else if (name !== 'dangerouslySetInnerHTML') {\n\t\tif (isSvg) {\n\t\t\t// Normalize incorrect prop usage for SVG:\n\t\t\t// - xlink:href / xlinkHref --> href (xlink:href was removed from SVG and isn't needed)\n\t\t\t// - className --> class\n\t\t\tname = name.replace(/xlink(H|:h)/, 'h').replace(/sName$/, 's');\n\t\t} else if (\n\t\t\tname !== 'width' &&\n\t\t\tname !== 'height' &&\n\t\t\tname !== 'href' &&\n\t\t\tname !== 'list' &&\n\t\t\tname !== 'form' &&\n\t\t\t// Default value in browsers is `-1` and an empty string is\n\t\t\t// cast to `0` instead\n\t\t\tname !== 'tabIndex' &&\n\t\t\tname !== 'download' &&\n\t\t\tname in dom\n\t\t) {\n\t\t\ttry {\n\t\t\t\tdom[name] = value == null ? '' : value;\n\t\t\t\t// labelled break is 1b smaller here than a return statement (sorry)\n\t\t\t\tbreak o;\n\t\t\t} catch (e) {}\n\t\t}\n\n\t\t// ARIA-attributes have a different notion of boolean values.\n\t\t// The value `false` is different from the attribute not\n\t\t// existing on the DOM, so we can't remove it. For non-boolean\n\t\t// ARIA-attributes we could treat false as a removal, but the\n\t\t// amount of exceptions would cost us too many bytes. On top of\n\t\t// that other VDOM frameworks also always stringify `false`.\n\n\t\tif (typeof value === 'function') {\n\t\t\t// never serialize functions as attribute values\n\t\t} else if (value != null && (value !== false || name.indexOf('-') != -1)) {\n\t\t\tdom.setAttribute(name, value);\n\t\t} else {\n\t\t\tdom.removeAttribute(name);\n\t\t}\n\t}\n}\n\nexport let inEvent = false;\n\n/**\n * Proxy an event to hooked event handlers\n * @param {Event} e The event object from the browser\n * @private\n */\nfunction eventProxy(e) {\n\tinEvent = true;\n\ttry {\n\t\treturn this._listeners[e.type + false](\n\t\t\toptions.event ? options.event(e) : e\n\t\t);\n\t} finally {\n\t\tinEvent = false;\n\t}\n}\n\nfunction eventProxyCapture(e) {\n\tinEvent = true;\n\ttry {\n\t\treturn this._listeners[e.type + true](options.event ? options.event(e) : e);\n\t} finally {\n\t\tinEvent = false;\n\t}\n}\n","import { assign } from './util';\nimport { diff, commitRoot } from './diff/index';\nimport options from './options';\nimport { Fragment } from './create-element';\nimport { inEvent } from './diff/props';\n\n/**\n * Base Component class. Provides `setState()` and `forceUpdate()`, which\n * trigger rendering\n * @param {object} props The initial component props\n * @param {object} context The initial context from parent components'\n * getChildContext\n */\nexport function Component(props, context) {\n\tthis.props = props;\n\tthis.context = context;\n}\n\n/**\n * Update component state and schedule a re-render.\n * @this {import('./internal').Component}\n * @param {object | ((s: object, p: object) => object)} update A hash of state\n * properties to update with new values or a function that given the current\n * state and props returns a new partial state\n * @param {() => void} [callback] A function to be called once component state is\n * updated\n */\nComponent.prototype.setState = function(update, callback) {\n\t// only clone state when copying to nextState the first time.\n\tlet s;\n\tif (this._nextState != null && this._nextState !== this.state) {\n\t\ts = this._nextState;\n\t} else {\n\t\ts = this._nextState = assign({}, this.state);\n\t}\n\n\tif (typeof update == 'function') {\n\t\t// Some libraries like `immer` mark the current state as readonly,\n\t\t// preventing us from mutating it, so we need to clone it. See #2716\n\t\tupdate = update(assign({}, s), this.props);\n\t}\n\n\tif (update) {\n\t\tassign(s, update);\n\t}\n\n\t// Skip update if updater function returned null\n\tif (update == null) return;\n\n\tif (this._vnode) {\n\t\tif (callback) {\n\t\t\tthis._stateCallbacks.push(callback);\n\t\t}\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Immediately perform a synchronous re-render of the component\n * @this {import('./internal').Component}\n * @param {() => void} [callback] A function to be called after component is\n * re-rendered\n */\nComponent.prototype.forceUpdate = function(callback) {\n\tif (this._vnode) {\n\t\t// Set render mode so that we can differentiate where the render request\n\t\t// is coming from. We need this because forceUpdate should never call\n\t\t// shouldComponentUpdate\n\t\tthis._force = true;\n\t\tif (callback) this._renderCallbacks.push(callback);\n\t\tenqueueRender(this);\n\t}\n};\n\n/**\n * Accepts `props` and `state`, and returns a new Virtual DOM tree to build.\n * Virtual DOM is generally constructed via [JSX](http://jasonformat.com/wtf-is-jsx).\n * @param {object} props Props (eg: JSX attributes) received from parent\n * element/component\n * @param {object} state The component's current state\n * @param {object} context Context object, as returned by the nearest\n * ancestor's `getChildContext()`\n * @returns {import('./index').ComponentChildren | void}\n */\nComponent.prototype.render = Fragment;\n\n/**\n * @param {import('./internal').VNode} vnode\n * @param {number | null} [childIndex]\n */\nexport function getDomSibling(vnode, childIndex) {\n\tif (childIndex == null) {\n\t\t// Use childIndex==null as a signal to resume the search from the vnode's sibling\n\t\treturn vnode._parent\n\t\t\t? getDomSibling(vnode._parent, vnode._parent._children.indexOf(vnode) + 1)\n\t\t\t: null;\n\t}\n\n\tlet sibling;\n\tfor (; childIndex < vnode._children.length; childIndex++) {\n\t\tsibling = vnode._children[childIndex];\n\n\t\tif (sibling != null && sibling._dom != null) {\n\t\t\t// Since updateParentDomPointers keeps _dom pointer correct,\n\t\t\t// we can rely on _dom to tell us if this subtree contains a\n\t\t\t// rendered DOM node, and what the first rendered DOM node is\n\t\t\treturn sibling._dom;\n\t\t}\n\t}\n\n\t// If we get here, we have not found a DOM node in this vnode's children.\n\t// We must resume from this vnode's sibling (in it's parent _children array)\n\t// Only climb up and search the parent if we aren't searching through a DOM\n\t// VNode (meaning we reached the DOM parent of the original vnode that began\n\t// the search)\n\treturn typeof vnode.type == 'function' ? getDomSibling(vnode) : null;\n}\n\n/**\n * Trigger in-place re-rendering of a component.\n * @param {import('./internal').Component} component The component to rerender\n */\nfunction renderComponent(component) {\n\tlet vnode = component._vnode,\n\t\toldDom = vnode._dom,\n\t\tparentDom = component._parentDom;\n\n\tif (parentDom) {\n\t\tlet commitQueue = [];\n\t\tconst oldVNode = assign({}, vnode);\n\t\toldVNode._original = vnode._original + 1;\n\n\t\tdiff(\n\t\t\tparentDom,\n\t\t\tvnode,\n\t\t\toldVNode,\n\t\t\tcomponent._globalContext,\n\t\t\tparentDom.ownerSVGElement !== undefined,\n\t\t\tvnode._hydrating != null ? [oldDom] : null,\n\t\t\tcommitQueue,\n\t\t\toldDom == null ? getDomSibling(vnode) : oldDom,\n\t\t\tvnode._hydrating\n\t\t);\n\t\tcommitRoot(commitQueue, vnode);\n\n\t\tif (vnode._dom != oldDom) {\n\t\t\tupdateParentDomPointers(vnode);\n\t\t}\n\t}\n}\n\n/**\n * @param {import('./internal').VNode} vnode\n */\nfunction updateParentDomPointers(vnode) {\n\tif ((vnode = vnode._parent) != null && vnode._component != null) {\n\t\tvnode._dom = vnode._component.base = null;\n\t\tfor (let i = 0; i < vnode._children.length; i++) {\n\t\t\tlet child = vnode._children[i];\n\t\t\tif (child != null && child._dom != null) {\n\t\t\t\tvnode._dom = vnode._component.base = child._dom;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn updateParentDomPointers(vnode);\n\t}\n}\n\n/**\n * The render queue\n * @type {Array}\n */\nlet rerenderQueue = [];\n\n/*\n * The value of `Component.debounce` must asynchronously invoke the passed in callback. It is\n * important that contributors to Preact can consistently reason about what calls to `setState`, etc.\n * do, and when their effects will be applied. See the links below for some further reading on designing\n * asynchronous APIs.\n * * [Designing APIs for Asynchrony](https://blog.izs.me/2013/08/designing-apis-for-asynchrony)\n * * [Callbacks synchronous and asynchronous](https://blog.ometer.com/2011/07/24/callbacks-synchronous-and-asynchronous/)\n */\n\nlet prevDebounce;\n\nconst microTick =\n\ttypeof Promise == 'function'\n\t\t? Promise.prototype.then.bind(Promise.resolve())\n\t\t: setTimeout;\nfunction defer(cb) {\n\tif (inEvent) {\n\t\tsetTimeout(cb);\n\t} else {\n\t\tmicroTick(cb);\n\t}\n}\n\n/**\n * Enqueue a rerender of a component\n * @param {import('./internal').Component} c The component to rerender\n */\nexport function enqueueRender(c) {\n\tif (\n\t\t(!c._dirty &&\n\t\t\t(c._dirty = true) &&\n\t\t\trerenderQueue.push(c) &&\n\t\t\t!process._rerenderCount++) ||\n\t\tprevDebounce !== options.debounceRendering\n\t) {\n\t\tprevDebounce = options.debounceRendering;\n\t\t(prevDebounce || defer)(process);\n\t}\n}\n\n/** Flush the render queue by rerendering all queued components */\nfunction process() {\n\tlet c;\n\trerenderQueue.sort((a, b) => a._vnode._depth - b._vnode._depth);\n\t// Don't update `renderCount` yet. Keep its value non-zero to prevent unnecessary\n\t// process() calls from getting scheduled while `queue` is still being consumed.\n\twhile ((c = rerenderQueue.shift())) {\n\t\tif (c._dirty) {\n\t\t\tlet renderQueueLength = rerenderQueue.length;\n\t\t\trenderComponent(c);\n\t\t\tif (rerenderQueue.length > renderQueueLength) {\n\t\t\t\t// When i.e. rerendering a provider additional new items can be injected, we want to\n\t\t\t\t// keep the order from top to bottom with those new items so we can handle them in a\n\t\t\t\t// single pass\n\t\t\t\trerenderQueue.sort((a, b) => a._vnode._depth - b._vnode._depth);\n\t\t\t}\n\t\t}\n\t}\n\tprocess._rerenderCount = 0;\n}\n\nprocess._rerenderCount = 0;\n","import { enqueueRender } from './component';\n\nexport let i = 0;\n\nexport function createContext(defaultValue, contextId) {\n\tcontextId = '__cC' + i++;\n\n\tconst context = {\n\t\t_id: contextId,\n\t\t_defaultValue: defaultValue,\n\t\t/** @type {import('./internal').FunctionComponent} */\n\t\tConsumer(props, contextValue) {\n\t\t\t// return props.children(\n\t\t\t// \tcontext[contextId] ? context[contextId].props.value : defaultValue\n\t\t\t// );\n\t\t\treturn props.children(contextValue);\n\t\t},\n\t\t/** @type {import('./internal').FunctionComponent} */\n\t\tProvider(props) {\n\t\t\tif (!this.getChildContext) {\n\t\t\t\t/** @type {import('./internal').Component[]} */\n\t\t\t\tlet subs = [];\n\t\t\t\tlet ctx = {};\n\t\t\t\tctx[contextId] = this;\n\n\t\t\t\tthis.getChildContext = () => ctx;\n\n\t\t\t\tthis.shouldComponentUpdate = function(_props) {\n\t\t\t\t\tif (this.props.value !== _props.value) {\n\t\t\t\t\t\t// I think the forced value propagation here was only needed when `options.debounceRendering` was being bypassed:\n\t\t\t\t\t\t// https://github.com/preactjs/preact/commit/4d339fb803bea09e9f198abf38ca1bf8ea4b7771#diff-54682ce380935a717e41b8bfc54737f6R358\n\t\t\t\t\t\t// In those cases though, even with the value corrected, we're double-rendering all nodes.\n\t\t\t\t\t\t// It might be better to just tell folks not to use force-sync mode.\n\t\t\t\t\t\t// Currently, using `useContext()` in a class component will overwrite its `this.context` value.\n\t\t\t\t\t\t// subs.some(c => {\n\t\t\t\t\t\t// \tc.context = _props.value;\n\t\t\t\t\t\t// \tenqueueRender(c);\n\t\t\t\t\t\t// });\n\n\t\t\t\t\t\t// subs.some(c => {\n\t\t\t\t\t\t// \tc.context[contextId] = _props.value;\n\t\t\t\t\t\t// \tenqueueRender(c);\n\t\t\t\t\t\t// });\n\t\t\t\t\t\tsubs.some(c => {\n\t\t\t\t\t\t\tc._force = true;\n\t\t\t\t\t\t\tenqueueRender(c);\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t};\n\n\t\t\t\tthis.sub = c => {\n\t\t\t\t\tsubs.push(c);\n\t\t\t\t\tlet old = c.componentWillUnmount;\n\t\t\t\t\tc.componentWillUnmount = () => {\n\t\t\t\t\t\tsubs.splice(subs.indexOf(c), 1);\n\t\t\t\t\t\tif (old) old.call(c);\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t}\n\n\t\t\treturn props.children;\n\t\t}\n\t};\n\n\t// Devtools needs access to the context object when it\n\t// encounters a Provider. This is necessary to support\n\t// setting `displayName` on the context object instead\n\t// of on the component itself. See:\n\t// https://reactjs.org/docs/context.html#contextdisplayname\n\n\treturn (context.Provider._contextRef = context.Consumer.contextType = context);\n}\n","export const EMPTY_OBJ = {};\nexport const EMPTY_ARR = [];\nexport const IS_NON_DIMENSIONAL = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;\n","import { diff, unmount, applyRef } from './index';\nimport { createVNode, Fragment } from '../create-element';\nimport { EMPTY_OBJ, EMPTY_ARR } from '../constants';\nimport { getDomSibling } from '../component';\n\n/**\n * Diff the children of a virtual node\n * @param {import('../internal').PreactElement} parentDom The DOM element whose\n * children are being diffed\n * @param {import('../internal').ComponentChildren[]} renderResult\n * @param {import('../internal').VNode} newParentVNode The new virtual\n * node whose children should be diff'ed against oldParentVNode\n * @param {import('../internal').VNode} oldParentVNode The old virtual\n * node whose children should be diff'ed against newParentVNode\n * @param {object} globalContext The current context object - modified by getChildContext\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node\n * @param {Array} excessDomChildren\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').PreactElement} oldDom The current attached DOM\n * element any new dom elements should be placed around. Likely `null` on first\n * render (except when hydrating). Can be a sibling DOM element when diffing\n * Fragments that have siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} isHydrating Whether or not we are in hydration\n */\nexport function diffChildren(\n\tparentDom,\n\trenderResult,\n\tnewParentVNode,\n\toldParentVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating\n) {\n\tlet i, j, oldVNode, childVNode, newDom, firstChildDom, refs;\n\n\t// This is a compression of oldParentVNode!=null && oldParentVNode != EMPTY_OBJ && oldParentVNode._children || EMPTY_ARR\n\t// as EMPTY_OBJ._children should be `undefined`.\n\tlet oldChildren = (oldParentVNode && oldParentVNode._children) || EMPTY_ARR;\n\n\tlet oldChildrenLength = oldChildren.length;\n\n\tnewParentVNode._children = [];\n\tfor (i = 0; i < renderResult.length; i++) {\n\t\tchildVNode = renderResult[i];\n\n\t\tif (childVNode == null || typeof childVNode == 'boolean') {\n\t\t\tchildVNode = newParentVNode._children[i] = null;\n\t\t}\n\t\t// If this newVNode is being reused (e.g.
{reuse}{reuse}
) in the same diff,\n\t\t// or we are rendering a component (e.g. setState) copy the oldVNodes so it can have\n\t\t// it's own DOM & etc. pointers\n\t\telse if (\n\t\t\ttypeof childVNode == 'string' ||\n\t\t\ttypeof childVNode == 'number' ||\n\t\t\t// eslint-disable-next-line valid-typeof\n\t\t\ttypeof childVNode == 'bigint'\n\t\t) {\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tnull,\n\t\t\t\tchildVNode,\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tchildVNode\n\t\t\t);\n\t\t} else if (Array.isArray(childVNode)) {\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tFragment,\n\t\t\t\t{ children: childVNode },\n\t\t\t\tnull,\n\t\t\t\tnull,\n\t\t\t\tnull\n\t\t\t);\n\t\t} else if (childVNode._depth > 0) {\n\t\t\t// VNode is already in use, clone it. This can happen in the following\n\t\t\t// scenario:\n\t\t\t// const reuse =
\n\t\t\t//
{reuse}{reuse}
\n\t\t\tchildVNode = newParentVNode._children[i] = createVNode(\n\t\t\t\tchildVNode.type,\n\t\t\t\tchildVNode.props,\n\t\t\t\tchildVNode.key,\n\t\t\t\tchildVNode.ref ? childVNode.ref : null,\n\t\t\t\tchildVNode._original\n\t\t\t);\n\t\t} else {\n\t\t\tchildVNode = newParentVNode._children[i] = childVNode;\n\t\t}\n\n\t\t// Terser removes the `continue` here and wraps the loop body\n\t\t// in a `if (childVNode) { ... } condition\n\t\tif (childVNode == null) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tchildVNode._parent = newParentVNode;\n\t\tchildVNode._depth = newParentVNode._depth + 1;\n\n\t\t// Check if we find a corresponding element in oldChildren.\n\t\t// If found, delete the array item by setting to `undefined`.\n\t\t// We use `undefined`, as `null` is reserved for empty placeholders\n\t\t// (holes).\n\t\toldVNode = oldChildren[i];\n\n\t\tif (\n\t\t\toldVNode === null ||\n\t\t\t(oldVNode &&\n\t\t\t\tchildVNode.key == oldVNode.key &&\n\t\t\t\tchildVNode.type === oldVNode.type)\n\t\t) {\n\t\t\toldChildren[i] = undefined;\n\t\t} else {\n\t\t\t// Either oldVNode === undefined or oldChildrenLength > 0,\n\t\t\t// so after this loop oldVNode == null or oldVNode is a valid value.\n\t\t\tfor (j = 0; j < oldChildrenLength; j++) {\n\t\t\t\toldVNode = oldChildren[j];\n\t\t\t\t// If childVNode is unkeyed, we only match similarly unkeyed nodes, otherwise we match by key.\n\t\t\t\t// We always match by type (in either case).\n\t\t\t\tif (\n\t\t\t\t\toldVNode &&\n\t\t\t\t\tchildVNode.key == oldVNode.key &&\n\t\t\t\t\tchildVNode.type === oldVNode.type\n\t\t\t\t) {\n\t\t\t\t\toldChildren[j] = undefined;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\toldVNode = null;\n\t\t\t}\n\t\t}\n\n\t\toldVNode = oldVNode || EMPTY_OBJ;\n\n\t\t// Morph the old element into the new one, but don't append it to the dom yet\n\t\tdiff(\n\t\t\tparentDom,\n\t\t\tchildVNode,\n\t\t\toldVNode,\n\t\t\tglobalContext,\n\t\t\tisSvg,\n\t\t\texcessDomChildren,\n\t\t\tcommitQueue,\n\t\t\toldDom,\n\t\t\tisHydrating\n\t\t);\n\n\t\tnewDom = childVNode._dom;\n\n\t\tif ((j = childVNode.ref) && oldVNode.ref != j) {\n\t\t\tif (!refs) refs = [];\n\t\t\tif (oldVNode.ref) refs.push(oldVNode.ref, null, childVNode);\n\t\t\trefs.push(j, childVNode._component || newDom, childVNode);\n\t\t}\n\n\t\tif (newDom != null) {\n\t\t\tif (firstChildDom == null) {\n\t\t\t\tfirstChildDom = newDom;\n\t\t\t}\n\n\t\t\tif (\n\t\t\t\ttypeof childVNode.type == 'function' &&\n\t\t\t\tchildVNode._children === oldVNode._children\n\t\t\t) {\n\t\t\t\tchildVNode._nextDom = oldDom = reorderChildren(\n\t\t\t\t\tchildVNode,\n\t\t\t\t\toldDom,\n\t\t\t\t\tparentDom\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\toldDom = placeChild(\n\t\t\t\t\tparentDom,\n\t\t\t\t\tchildVNode,\n\t\t\t\t\toldVNode,\n\t\t\t\t\toldChildren,\n\t\t\t\t\tnewDom,\n\t\t\t\t\toldDom\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif (typeof newParentVNode.type == 'function') {\n\t\t\t\t// Because the newParentVNode is Fragment-like, we need to set it's\n\t\t\t\t// _nextDom property to the nextSibling of its last child DOM node.\n\t\t\t\t//\n\t\t\t\t// `oldDom` contains the correct value here because if the last child\n\t\t\t\t// is a Fragment-like, then oldDom has already been set to that child's _nextDom.\n\t\t\t\t// If the last child is a DOM VNode, then oldDom will be set to that DOM\n\t\t\t\t// node's nextSibling.\n\t\t\t\tnewParentVNode._nextDom = oldDom;\n\t\t\t}\n\t\t} else if (\n\t\t\toldDom &&\n\t\t\toldVNode._dom == oldDom &&\n\t\t\toldDom.parentNode != parentDom\n\t\t) {\n\t\t\t// The above condition is to handle null placeholders. See test in placeholder.test.js:\n\t\t\t// `efficiently replace null placeholders in parent rerenders`\n\t\t\toldDom = getDomSibling(oldVNode);\n\t\t}\n\t}\n\n\tnewParentVNode._dom = firstChildDom;\n\n\t// Remove remaining oldChildren if there are any.\n\tfor (i = oldChildrenLength; i--; ) {\n\t\tif (oldChildren[i] != null) {\n\t\t\tif (\n\t\t\t\ttypeof newParentVNode.type == 'function' &&\n\t\t\t\toldChildren[i]._dom != null &&\n\t\t\t\toldChildren[i]._dom == newParentVNode._nextDom\n\t\t\t) {\n\t\t\t\t// If the newParentVNode.__nextDom points to a dom node that is about to\n\t\t\t\t// be unmounted, then get the next sibling of that vnode and set\n\t\t\t\t// _nextDom to it\n\t\t\t\tnewParentVNode._nextDom = getLastDom(oldParentVNode).nextSibling;\n\t\t\t}\n\n\t\t\tunmount(oldChildren[i], oldChildren[i]);\n\t\t}\n\t}\n\n\t// Set refs only after unmount\n\tif (refs) {\n\t\tfor (i = 0; i < refs.length; i++) {\n\t\t\tapplyRef(refs[i], refs[++i], refs[++i]);\n\t\t}\n\t}\n}\n\nfunction reorderChildren(childVNode, oldDom, parentDom) {\n\t// Note: VNodes in nested suspended trees may be missing _children.\n\tlet c = childVNode._children;\n\tlet tmp = 0;\n\tfor (; c && tmp < c.length; tmp++) {\n\t\tlet vnode = c[tmp];\n\t\tif (vnode) {\n\t\t\t// We typically enter this code path on sCU bailout, where we copy\n\t\t\t// oldVNode._children to newVNode._children. If that is the case, we need\n\t\t\t// to update the old children's _parent pointer to point to the newVNode\n\t\t\t// (childVNode here).\n\t\t\tvnode._parent = childVNode;\n\n\t\t\tif (typeof vnode.type == 'function') {\n\t\t\t\toldDom = reorderChildren(vnode, oldDom, parentDom);\n\t\t\t} else {\n\t\t\t\toldDom = placeChild(parentDom, vnode, vnode, c, vnode._dom, oldDom);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn oldDom;\n}\n\n/**\n * Flatten and loop through the children of a virtual node\n * @param {import('../index').ComponentChildren} children The unflattened\n * children of a virtual node\n * @returns {import('../internal').VNode[]}\n */\nexport function toChildArray(children, out) {\n\tout = out || [];\n\tif (children == null || typeof children == 'boolean') {\n\t} else if (Array.isArray(children)) {\n\t\tchildren.some(child => {\n\t\t\ttoChildArray(child, out);\n\t\t});\n\t} else {\n\t\tout.push(children);\n\t}\n\treturn out;\n}\n\nfunction placeChild(\n\tparentDom,\n\tchildVNode,\n\toldVNode,\n\toldChildren,\n\tnewDom,\n\toldDom\n) {\n\tlet nextDom;\n\tif (childVNode._nextDom !== undefined) {\n\t\t// Only Fragments or components that return Fragment like VNodes will\n\t\t// have a non-undefined _nextDom. Continue the diff from the sibling\n\t\t// of last DOM child of this child VNode\n\t\tnextDom = childVNode._nextDom;\n\n\t\t// Eagerly cleanup _nextDom. We don't need to persist the value because\n\t\t// it is only used by `diffChildren` to determine where to resume the diff after\n\t\t// diffing Components and Fragments. Once we store it the nextDOM local var, we\n\t\t// can clean up the property\n\t\tchildVNode._nextDom = undefined;\n\t} else if (\n\t\toldVNode == null ||\n\t\tnewDom != oldDom ||\n\t\tnewDom.parentNode == null\n\t) {\n\t\touter: if (oldDom == null || oldDom.parentNode !== parentDom) {\n\t\t\tparentDom.appendChild(newDom);\n\t\t\tnextDom = null;\n\t\t} else {\n\t\t\t// `j= 0; i--) {\n\t\t\tlet child = vnode._children[i];\n\t\t\tif (child) {\n\t\t\t\tlet lastDom = getLastDom(child);\n\t\t\t\tif (lastDom) {\n\t\t\t\t\treturn lastDom;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn null;\n}\n","import { EMPTY_OBJ } from '../constants';\nimport { Component, getDomSibling } from '../component';\nimport { Fragment } from '../create-element';\nimport { diffChildren } from './children';\nimport { diffProps, setProperty } from './props';\nimport { assign, removeNode, slice } from '../util';\nimport options from '../options';\n\n/**\n * Diff two virtual nodes and apply proper changes to the DOM\n * @param {import('../internal').PreactElement} parentDom The parent of the DOM element\n * @param {import('../internal').VNode} newVNode The new virtual node\n * @param {import('../internal').VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object. Modified by getChildContext\n * @param {boolean} isSvg Whether or not this element is an SVG node\n * @param {Array} excessDomChildren\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').PreactElement} oldDom The current attached DOM\n * element any new dom elements should be placed around. Likely `null` on first\n * render (except when hydrating). Can be a sibling DOM element when diffing\n * Fragments that have siblings. In most cases, it starts out as `oldChildren[0]._dom`.\n * @param {boolean} [isHydrating] Whether or not we are in hydration\n */\nexport function diff(\n\tparentDom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\toldDom,\n\tisHydrating\n) {\n\tlet tmp,\n\t\tnewType = newVNode.type;\n\n\t// When passing through createElement it assigns the object\n\t// constructor as undefined. This to prevent JSON-injection.\n\tif (newVNode.constructor !== undefined) return null;\n\n\t// If the previous diff bailed out, resume creating/hydrating.\n\tif (oldVNode._hydrating != null) {\n\t\tisHydrating = oldVNode._hydrating;\n\t\toldDom = newVNode._dom = oldVNode._dom;\n\t\t// if we resume, we want the tree to be \"unlocked\"\n\t\tnewVNode._hydrating = null;\n\t\texcessDomChildren = [oldDom];\n\t}\n\n\tif ((tmp = options._diff)) tmp(newVNode);\n\n\ttry {\n\t\touter: if (typeof newType == 'function') {\n\t\t\tlet c, isNew, oldProps, oldState, snapshot, clearProcessingException;\n\t\t\tlet newProps = newVNode.props;\n\n\t\t\t// Necessary for createContext api. Setting this property will pass\n\t\t\t// the context value as `this.context` just for this component.\n\t\t\ttmp = newType.contextType;\n\t\t\tlet provider = tmp && globalContext[tmp._id];\n\t\t\tlet componentContext = tmp\n\t\t\t\t? provider\n\t\t\t\t\t? provider.props.value\n\t\t\t\t\t: tmp._defaultValue\n\t\t\t\t: globalContext;\n\n\t\t\t// Get component and set it to `c`\n\t\t\tif (oldVNode._component) {\n\t\t\t\tc = newVNode._component = oldVNode._component;\n\t\t\t\tclearProcessingException = c._processingException = c._pendingError;\n\t\t\t} else {\n\t\t\t\t// Instantiate the new component\n\t\t\t\tif ('prototype' in newType && newType.prototype.render) {\n\t\t\t\t\t// @ts-ignore The check above verifies that newType is suppose to be constructed\n\t\t\t\t\tnewVNode._component = c = new newType(newProps, componentContext); // eslint-disable-line new-cap\n\t\t\t\t} else {\n\t\t\t\t\t// @ts-ignore Trust me, Component implements the interface we want\n\t\t\t\t\tnewVNode._component = c = new Component(newProps, componentContext);\n\t\t\t\t\tc.constructor = newType;\n\t\t\t\t\tc.render = doRender;\n\t\t\t\t}\n\t\t\t\tif (provider) provider.sub(c);\n\n\t\t\t\tc.props = newProps;\n\t\t\t\tif (!c.state) c.state = {};\n\t\t\t\tc.context = componentContext;\n\t\t\t\tc._globalContext = globalContext;\n\t\t\t\tisNew = c._dirty = true;\n\t\t\t\tc._renderCallbacks = [];\n\t\t\t\tc._stateCallbacks = [];\n\t\t\t}\n\n\t\t\t// Invoke getDerivedStateFromProps\n\t\t\tif (c._nextState == null) {\n\t\t\t\tc._nextState = c.state;\n\t\t\t}\n\n\t\t\tif (newType.getDerivedStateFromProps != null) {\n\t\t\t\tif (c._nextState == c.state) {\n\t\t\t\t\tc._nextState = assign({}, c._nextState);\n\t\t\t\t}\n\n\t\t\t\tassign(\n\t\t\t\t\tc._nextState,\n\t\t\t\t\tnewType.getDerivedStateFromProps(newProps, c._nextState)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\toldProps = c.props;\n\t\t\toldState = c.state;\n\t\t\tc._vnode = newVNode;\n\n\t\t\t// Invoke pre-render lifecycle methods\n\t\t\tif (isNew) {\n\t\t\t\tif (\n\t\t\t\t\tnewType.getDerivedStateFromProps == null &&\n\t\t\t\t\tc.componentWillMount != null\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillMount();\n\t\t\t\t}\n\n\t\t\t\tif (c.componentDidMount != null) {\n\t\t\t\t\tc._renderCallbacks.push(c.componentDidMount);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif (\n\t\t\t\t\tnewType.getDerivedStateFromProps == null &&\n\t\t\t\t\tnewProps !== oldProps &&\n\t\t\t\t\tc.componentWillReceiveProps != null\n\t\t\t\t) {\n\t\t\t\t\tc.componentWillReceiveProps(newProps, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (\n\t\t\t\t\t(!c._force &&\n\t\t\t\t\t\tc.shouldComponentUpdate != null &&\n\t\t\t\t\t\tc.shouldComponentUpdate(\n\t\t\t\t\t\t\tnewProps,\n\t\t\t\t\t\t\tc._nextState,\n\t\t\t\t\t\t\tcomponentContext\n\t\t\t\t\t\t) === false) ||\n\t\t\t\t\tnewVNode._original === oldVNode._original\n\t\t\t\t) {\n\t\t\t\t\t// More info about this here: https://gist.github.com/JoviDeCroock/bec5f2ce93544d2e6070ef8e0036e4e8\n\t\t\t\t\tif (newVNode._original !== oldVNode._original) {\n\t\t\t\t\t\t// When we are dealing with a bail because of sCU we have to update\n\t\t\t\t\t\t// the props, state and dirty-state.\n\t\t\t\t\t\t// when we are dealing with strict-equality we don't as the child could still\n\t\t\t\t\t\t// be dirtied see #3883\n\t\t\t\t\t\tc.props = newProps;\n\t\t\t\t\t\tc.state = c._nextState;\n\t\t\t\t\t\tc._dirty = false;\n\t\t\t\t\t}\n\t\t\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t\t\t\tnewVNode._children = oldVNode._children;\n\t\t\t\t\tnewVNode._children.forEach(vnode => {\n\t\t\t\t\t\tif (vnode) vnode._parent = newVNode;\n\t\t\t\t\t});\n\n\t\t\t\t\tfor (let i = 0; i < c._stateCallbacks.length; i++) {\n\t\t\t\t\t\tc._renderCallbacks.push(c._stateCallbacks[i]);\n\t\t\t\t\t}\n\t\t\t\t\tc._stateCallbacks = [];\n\n\t\t\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\t\t\tcommitQueue.push(c);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak outer;\n\t\t\t\t}\n\n\t\t\t\tif (c.componentWillUpdate != null) {\n\t\t\t\t\tc.componentWillUpdate(newProps, c._nextState, componentContext);\n\t\t\t\t}\n\n\t\t\t\tif (c.componentDidUpdate != null) {\n\t\t\t\t\tc._renderCallbacks.push(() => {\n\t\t\t\t\t\tc.componentDidUpdate(oldProps, oldState, snapshot);\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tc.context = componentContext;\n\t\t\tc.props = newProps;\n\t\t\tc._parentDom = parentDom;\n\n\t\t\tlet renderHook = options._render,\n\t\t\t\tcount = 0;\n\t\t\tif ('prototype' in newType && newType.prototype.render) {\n\t\t\t\tc.state = c._nextState;\n\t\t\t\tc._dirty = false;\n\n\t\t\t\tif (renderHook) renderHook(newVNode);\n\n\t\t\t\ttmp = c.render(c.props, c.state, c.context);\n\n\t\t\t\tfor (let i = 0; i < c._stateCallbacks.length; i++) {\n\t\t\t\t\tc._renderCallbacks.push(c._stateCallbacks[i]);\n\t\t\t\t}\n\t\t\t\tc._stateCallbacks = [];\n\t\t\t} else {\n\t\t\t\tdo {\n\t\t\t\t\tc._dirty = false;\n\t\t\t\t\tif (renderHook) renderHook(newVNode);\n\n\t\t\t\t\ttmp = c.render(c.props, c.state, c.context);\n\n\t\t\t\t\t// Handle setState called in render, see #2553\n\t\t\t\t\tc.state = c._nextState;\n\t\t\t\t} while (c._dirty && ++count < 25);\n\t\t\t}\n\n\t\t\t// Handle setState called in render, see #2553\n\t\t\tc.state = c._nextState;\n\n\t\t\tif (c.getChildContext != null) {\n\t\t\t\tglobalContext = assign(assign({}, globalContext), c.getChildContext());\n\t\t\t}\n\n\t\t\tif (!isNew && c.getSnapshotBeforeUpdate != null) {\n\t\t\t\tsnapshot = c.getSnapshotBeforeUpdate(oldProps, oldState);\n\t\t\t}\n\n\t\t\tlet isTopLevelFragment =\n\t\t\t\ttmp != null && tmp.type === Fragment && tmp.key == null;\n\t\t\tlet renderResult = isTopLevelFragment ? tmp.props.children : tmp;\n\n\t\t\tdiffChildren(\n\t\t\t\tparentDom,\n\t\t\t\tArray.isArray(renderResult) ? renderResult : [renderResult],\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tisSvg,\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\toldDom,\n\t\t\t\tisHydrating\n\t\t\t);\n\n\t\t\tc.base = newVNode._dom;\n\n\t\t\t// We successfully rendered this VNode, unset any stored hydration/bailout state:\n\t\t\tnewVNode._hydrating = null;\n\n\t\t\tif (c._renderCallbacks.length) {\n\t\t\t\tcommitQueue.push(c);\n\t\t\t}\n\n\t\t\tif (clearProcessingException) {\n\t\t\t\tc._pendingError = c._processingException = null;\n\t\t\t}\n\n\t\t\tc._force = false;\n\t\t} else if (\n\t\t\texcessDomChildren == null &&\n\t\t\tnewVNode._original === oldVNode._original\n\t\t) {\n\t\t\tnewVNode._children = oldVNode._children;\n\t\t\tnewVNode._dom = oldVNode._dom;\n\t\t} else {\n\t\t\tnewVNode._dom = diffElementNodes(\n\t\t\t\toldVNode._dom,\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tisSvg,\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\tisHydrating\n\t\t\t);\n\t\t}\n\n\t\tif ((tmp = options.diffed)) tmp(newVNode);\n\t} catch (e) {\n\t\tnewVNode._original = null;\n\t\t// if hydrating or creating initial tree, bailout preserves DOM:\n\t\tif (isHydrating || excessDomChildren != null) {\n\t\t\tnewVNode._dom = oldDom;\n\t\t\tnewVNode._hydrating = !!isHydrating;\n\t\t\texcessDomChildren[excessDomChildren.indexOf(oldDom)] = null;\n\t\t\t// ^ could possibly be simplified to:\n\t\t\t// excessDomChildren.length = 0;\n\t\t}\n\t\toptions._catchError(e, newVNode, oldVNode);\n\t}\n}\n\n/**\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {import('../internal').VNode} root\n */\nexport function commitRoot(commitQueue, root) {\n\tif (options._commit) options._commit(root, commitQueue);\n\n\tcommitQueue.some(c => {\n\t\ttry {\n\t\t\t// @ts-ignore Reuse the commitQueue variable here so the type changes\n\t\t\tcommitQueue = c._renderCallbacks;\n\t\t\tc._renderCallbacks = [];\n\t\t\tcommitQueue.some(cb => {\n\t\t\t\t// @ts-ignore See above ts-ignore on commitQueue\n\t\t\t\tcb.call(c);\n\t\t\t});\n\t\t} catch (e) {\n\t\t\toptions._catchError(e, c._vnode);\n\t\t}\n\t});\n}\n\n/**\n * Diff two virtual nodes representing DOM element\n * @param {import('../internal').PreactElement} dom The DOM element representing\n * the virtual nodes being diffed\n * @param {import('../internal').VNode} newVNode The new virtual node\n * @param {import('../internal').VNode} oldVNode The old virtual node\n * @param {object} globalContext The current context object\n * @param {boolean} isSvg Whether or not this DOM node is an SVG node\n * @param {*} excessDomChildren\n * @param {Array} commitQueue List of components\n * which have callbacks to invoke in commitRoot\n * @param {boolean} isHydrating Whether or not we are in hydration\n * @returns {import('../internal').PreactElement}\n */\nfunction diffElementNodes(\n\tdom,\n\tnewVNode,\n\toldVNode,\n\tglobalContext,\n\tisSvg,\n\texcessDomChildren,\n\tcommitQueue,\n\tisHydrating\n) {\n\tlet oldProps = oldVNode.props;\n\tlet newProps = newVNode.props;\n\tlet nodeType = newVNode.type;\n\tlet i = 0;\n\n\t// Tracks entering and exiting SVG namespace when descending through the tree.\n\tif (nodeType === 'svg') isSvg = true;\n\n\tif (excessDomChildren != null) {\n\t\tfor (; i < excessDomChildren.length; i++) {\n\t\t\tconst child = excessDomChildren[i];\n\n\t\t\t// if newVNode matches an element in excessDomChildren or the `dom`\n\t\t\t// argument matches an element in excessDomChildren, remove it from\n\t\t\t// excessDomChildren so it isn't later removed in diffChildren\n\t\t\tif (\n\t\t\t\tchild &&\n\t\t\t\t'setAttribute' in child === !!nodeType &&\n\t\t\t\t(nodeType ? child.localName === nodeType : child.nodeType === 3)\n\t\t\t) {\n\t\t\t\tdom = child;\n\t\t\t\texcessDomChildren[i] = null;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tif (dom == null) {\n\t\tif (nodeType === null) {\n\t\t\t// @ts-ignore createTextNode returns Text, we expect PreactElement\n\t\t\treturn document.createTextNode(newProps);\n\t\t}\n\n\t\tif (isSvg) {\n\t\t\tdom = document.createElementNS(\n\t\t\t\t'http://www.w3.org/2000/svg',\n\t\t\t\t// @ts-ignore We know `newVNode.type` is a string\n\t\t\t\tnodeType\n\t\t\t);\n\t\t} else {\n\t\t\tdom = document.createElement(\n\t\t\t\t// @ts-ignore We know `newVNode.type` is a string\n\t\t\t\tnodeType,\n\t\t\t\tnewProps.is && newProps\n\t\t\t);\n\t\t}\n\n\t\t// we created a new parent, so none of the previously attached children can be reused:\n\t\texcessDomChildren = null;\n\t\t// we are creating a new node, so we can assume this is a new subtree (in case we are hydrating), this deopts the hydrate\n\t\tisHydrating = false;\n\t}\n\n\tif (nodeType === null) {\n\t\t// During hydration, we still have to split merged text from SSR'd HTML.\n\t\tif (oldProps !== newProps && (!isHydrating || dom.data !== newProps)) {\n\t\t\tdom.data = newProps;\n\t\t}\n\t} else {\n\t\t// If excessDomChildren was not null, repopulate it with the current element's children:\n\t\texcessDomChildren = excessDomChildren && slice.call(dom.childNodes);\n\n\t\toldProps = oldVNode.props || EMPTY_OBJ;\n\n\t\tlet oldHtml = oldProps.dangerouslySetInnerHTML;\n\t\tlet newHtml = newProps.dangerouslySetInnerHTML;\n\n\t\t// During hydration, props are not diffed at all (including dangerouslySetInnerHTML)\n\t\t// @TODO we should warn in debug mode when props don't match here.\n\t\tif (!isHydrating) {\n\t\t\t// But, if we are in a situation where we are using existing DOM (e.g. replaceNode)\n\t\t\t// we should read the existing DOM attributes to diff them\n\t\t\tif (excessDomChildren != null) {\n\t\t\t\toldProps = {};\n\t\t\t\tfor (i = 0; i < dom.attributes.length; i++) {\n\t\t\t\t\toldProps[dom.attributes[i].name] = dom.attributes[i].value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (newHtml || oldHtml) {\n\t\t\t\t// Avoid re-applying the same '__html' if it did not changed between re-render\n\t\t\t\tif (\n\t\t\t\t\t!newHtml ||\n\t\t\t\t\t((!oldHtml || newHtml.__html != oldHtml.__html) &&\n\t\t\t\t\t\tnewHtml.__html !== dom.innerHTML)\n\t\t\t\t) {\n\t\t\t\t\tdom.innerHTML = (newHtml && newHtml.__html) || '';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tdiffProps(dom, newProps, oldProps, isSvg, isHydrating);\n\n\t\t// If the new vnode didn't have dangerouslySetInnerHTML, diff its children\n\t\tif (newHtml) {\n\t\t\tnewVNode._children = [];\n\t\t} else {\n\t\t\ti = newVNode.props.children;\n\t\t\tdiffChildren(\n\t\t\t\tdom,\n\t\t\t\tArray.isArray(i) ? i : [i],\n\t\t\t\tnewVNode,\n\t\t\t\toldVNode,\n\t\t\t\tglobalContext,\n\t\t\t\tisSvg && nodeType !== 'foreignObject',\n\t\t\t\texcessDomChildren,\n\t\t\t\tcommitQueue,\n\t\t\t\texcessDomChildren\n\t\t\t\t\t? excessDomChildren[0]\n\t\t\t\t\t: oldVNode._children && getDomSibling(oldVNode, 0),\n\t\t\t\tisHydrating\n\t\t\t);\n\n\t\t\t// Remove children that are not part of any vnode.\n\t\t\tif (excessDomChildren != null) {\n\t\t\t\tfor (i = excessDomChildren.length; i--; ) {\n\t\t\t\t\tif (excessDomChildren[i] != null) removeNode(excessDomChildren[i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// (as above, don't diff props during hydration)\n\t\tif (!isHydrating) {\n\t\t\tif (\n\t\t\t\t'value' in newProps &&\n\t\t\t\t(i = newProps.value) !== undefined &&\n\t\t\t\t// #2756 For the -element the initial value is 0,\n\t\t\t\t// despite the attribute not being present. When the attribute\n\t\t\t\t// is missing the progress bar is treated as indeterminate.\n\t\t\t\t// To fix that we'll always update it when it is 0 for progress elements\n\t\t\t\t(i !== dom.value ||\n\t\t\t\t\t(nodeType === 'progress' && !i) ||\n\t\t\t\t\t// This is only for IE 11 to fix \n\t\tif (\n\t\t\ttype == 'select' &&\n\t\t\tnormalizedProps.multiple &&\n\t\t\tArray.isArray(normalizedProps.value)\n\t\t) {\n\t\t\t// forEach() always returns undefined, which we abuse here to unset the value prop.\n\t\t\tnormalizedProps.value = toChildArray(props.children).forEach(child => {\n\t\t\t\tchild.props.selected =\n\t\t\t\t\tnormalizedProps.value.indexOf(child.props.value) != -1;\n\t\t\t});\n\t\t}\n\n\t\t// Adding support for defaultValue in select tag\n\t\tif (type == 'select' && normalizedProps.defaultValue != null) {\n\t\t\tnormalizedProps.value = toChildArray(props.children).forEach(child => {\n\t\t\t\tif (normalizedProps.multiple) {\n\t\t\t\t\tchild.props.selected =\n\t\t\t\t\t\tnormalizedProps.defaultValue.indexOf(child.props.value) != -1;\n\t\t\t\t} else {\n\t\t\t\t\tchild.props.selected =\n\t\t\t\t\t\tnormalizedProps.defaultValue == child.props.value;\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\n\t\tvnode.props = normalizedProps;\n\n\t\tif (props.class != props.className) {\n\t\t\tclassNameDescriptor.enumerable = 'className' in props;\n\t\t\tif (props.className != null) normalizedProps.class = props.className;\n\t\t\tObject.defineProperty(normalizedProps, 'className', classNameDescriptor);\n\t\t}\n\t}\n\n\tvnode.$$typeof = REACT_ELEMENT_TYPE;\n\n\tif (oldVNodeHook) oldVNodeHook(vnode);\n};\n\n// Only needed for react-relay\nlet currentComponent;\nconst oldBeforeRender = options._render;\noptions._render = function(vnode) {\n\tif (oldBeforeRender) {\n\t\toldBeforeRender(vnode);\n\t}\n\tcurrentComponent = vnode._component;\n};\n\n// This is a very very private internal function for React it\n// is used to sort-of do runtime dependency injection. So far\n// only `react-relay` makes use of it. It uses it to read the\n// context value.\nexport const __SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {\n\tReactCurrentDispatcher: {\n\t\tcurrent: {\n\t\t\treadContext(context) {\n\t\t\t\treturn currentComponent._globalContext[context._id].props.value;\n\t\t\t}\n\t\t}\n\t}\n};\n","import * as preact from 'preact';\nimport { Component, createElement, isValidElement, Fragment } from 'preact';\nimport { createPortal } from 'preact/compat';\n\nconst styleTexts = [];\nconst styleEls = new Map();\nfunction injectStyles(styleText) {\n styleTexts.push(styleText);\n styleEls.forEach((styleEl) => {\n appendStylesTo(styleEl, styleText);\n });\n}\nfunction ensureElHasStyles(el) {\n if (el.isConnected && // sometimes true if SSR system simulates DOM\n el.getRootNode // sometimes undefined if SSR system simulates DOM\n ) {\n registerStylesRoot(el.getRootNode());\n }\n}\nfunction registerStylesRoot(rootNode) {\n let styleEl = styleEls.get(rootNode);\n if (!styleEl || !styleEl.isConnected) {\n styleEl = rootNode.querySelector('style[data-fullcalendar]');\n if (!styleEl) {\n styleEl = document.createElement('style');\n styleEl.setAttribute('data-fullcalendar', '');\n const nonce = getNonceValue();\n if (nonce) {\n styleEl.nonce = nonce;\n }\n const parentEl = rootNode === document ? document.head : rootNode;\n const insertBefore = rootNode === document\n ? parentEl.querySelector('script,link[rel=stylesheet],link[as=style],style')\n : parentEl.firstChild;\n parentEl.insertBefore(styleEl, insertBefore);\n }\n styleEls.set(rootNode, styleEl);\n hydrateStylesRoot(styleEl);\n }\n}\nfunction hydrateStylesRoot(styleEl) {\n for (const styleText of styleTexts) {\n appendStylesTo(styleEl, styleText);\n }\n}\nfunction appendStylesTo(styleEl, styleText) {\n const { sheet } = styleEl;\n const ruleCnt = sheet.cssRules.length;\n styleText.split('}').forEach((styleStr, i) => {\n styleStr = styleStr.trim();\n if (styleStr) {\n sheet.insertRule(styleStr + '}', ruleCnt + i);\n }\n });\n}\n// nonce\n// -------------------------------------------------------------------------------------------------\nlet queriedNonceValue;\nfunction getNonceValue() {\n if (queriedNonceValue === undefined) {\n queriedNonceValue = queryNonceValue();\n }\n return queriedNonceValue;\n}\n/*\nTODO: discourage meta tag and instead put nonce attribute on placeholder '];\n\topts.cellXfs.forEach(function(xf, id) {\n\t\tvar payload/*:Array*/ = [];\n\t\tpayload.push(writextag('NumberFormat', null, {\"ss:Format\": escapexml(table_fmt[xf.numFmtId])}));\n\n\t\tvar o = /*::(*/{\"ss:ID\": \"s\" + (21+id)}/*:: :any)*/;\n\t\tstyles.push(writextag('Style', payload.join(\"\"), o));\n\t});\n\treturn writextag(\"Styles\", styles.join(\"\"));\n}\nfunction write_name_xlml(n) { return writextag(\"NamedRange\", null, {\"ss:Name\": n.Name, \"ss:RefersTo\":\"=\" + a1_to_rc(n.Ref, {r:0,c:0})}); }\nfunction write_names_xlml(wb/*::, opts*/)/*:string*/ {\n\tif(!((wb||{}).Workbook||{}).Names) return \"\";\n\t/*:: if(!wb || !wb.Workbook || !wb.Workbook.Names) throw new Error(\"unreachable\"); */\n\tvar names/*:Array*/ = wb.Workbook.Names;\n\tvar out/*:Array*/ = [];\n\tfor(var i = 0; i < names.length; ++i) {\n\t\tvar n = names[i];\n\t\tif(n.Sheet != null) continue;\n\t\tif(n.Name.match(/^_xlfn\\./)) continue;\n\t\tout.push(write_name_xlml(n));\n\t}\n\treturn writextag(\"Names\", out.join(\"\"));\n}\nfunction write_ws_xlml_names(ws/*:Worksheet*/, opts, idx/*:number*/, wb/*:Workbook*/)/*:string*/ {\n\tif(!ws) return \"\";\n\tif(!((wb||{}).Workbook||{}).Names) return \"\";\n\t/*:: if(!wb || !wb.Workbook || !wb.Workbook.Names) throw new Error(\"unreachable\"); */\n\tvar names/*:Array*/ = wb.Workbook.Names;\n\tvar out/*:Array*/ = [];\n\tfor(var i = 0; i < names.length; ++i) {\n\t\tvar n = names[i];\n\t\tif(n.Sheet != idx) continue;\n\t\t/*switch(n.Name) {\n\t\t\tcase \"_\": continue;\n\t\t}*/\n\t\tif(n.Name.match(/^_xlfn\\./)) continue;\n\t\tout.push(write_name_xlml(n));\n\t}\n\treturn out.join(\"\");\n}\n/* WorksheetOptions */\nfunction write_ws_xlml_wsopts(ws/*:Worksheet*/, opts, idx/*:number*/, wb/*:Workbook*/)/*:string*/ {\n\tif(!ws) return \"\";\n\tvar o/*:Array*/ = [];\n\t/* NOTE: spec technically allows any order, but stick with implied order */\n\n\t/* FitToPage */\n\t/* DoNotDisplayColHeaders */\n\t/* DoNotDisplayRowHeaders */\n\t/* ViewableRange */\n\t/* Selection */\n\t/* GridlineColor */\n\t/* Name */\n\t/* ExcelWorksheetType */\n\t/* IntlMacro */\n\t/* Unsynced */\n\t/* Selected */\n\t/* CodeName */\n\n\tif(ws['!margins']) {\n\t\to.push(\"\");\n\t\tif(ws['!margins'].header) o.push(writextag(\"Header\", null, {'x:Margin':ws['!margins'].header}));\n\t\tif(ws['!margins'].footer) o.push(writextag(\"Footer\", null, {'x:Margin':ws['!margins'].footer}));\n\t\to.push(writextag(\"PageMargins\", null, {\n\t\t\t'x:Bottom': ws['!margins'].bottom || \"0.75\",\n\t\t\t'x:Left': ws['!margins'].left || \"0.7\",\n\t\t\t'x:Right': ws['!margins'].right || \"0.7\",\n\t\t\t'x:Top': ws['!margins'].top || \"0.75\"\n\t\t}));\n\t\to.push(\"\");\n\t}\n\n\t/* PageSetup */\n\t/* DisplayPageBreak */\n\t/* TransitionExpressionEvaluation */\n\t/* TransitionFormulaEntry */\n\t/* Print */\n\t/* Zoom */\n\t/* PageLayoutZoom */\n\t/* PageBreakZoom */\n\t/* ShowPageBreakZoom */\n\t/* DefaultRowHeight */\n\t/* DefaultColumnWidth */\n\t/* StandardWidth */\n\n\tif(wb && wb.Workbook && wb.Workbook.Sheets && wb.Workbook.Sheets[idx]) {\n\t\t/* Visible */\n\t\tif(wb.Workbook.Sheets[idx].Hidden) o.push(writextag(\"Visible\", (wb.Workbook.Sheets[idx].Hidden == 1 ? \"SheetHidden\" : \"SheetVeryHidden\"), {}));\n\t\telse {\n\t\t\t/* Selected */\n\t\t\tfor(var i = 0; i < idx; ++i) if(wb.Workbook.Sheets[i] && !wb.Workbook.Sheets[i].Hidden) break;\n\t\t\tif(i == idx) o.push(\"\");\n\t\t}\n\t}\n\n\t/* LeftColumnVisible */\n\n\tif(((((wb||{}).Workbook||{}).Views||[])[0]||{}).RTL) o.push(\"\");\n\n\t/* GridlineColorIndex */\n\t/* DisplayFormulas */\n\t/* DoNotDisplayGridlines */\n\t/* DoNotDisplayHeadings */\n\t/* DoNotDisplayOutline */\n\t/* ApplyAutomaticOutlineStyles */\n\t/* NoSummaryRowsBelowDetail */\n\t/* NoSummaryColumnsRightDetail */\n\t/* DoNotDisplayZeros */\n\t/* ActiveRow */\n\t/* ActiveColumn */\n\t/* FilterOn */\n\t/* RangeSelection */\n\t/* TopRowVisible */\n\t/* TopRowBottomPane */\n\t/* LeftColumnRightPane */\n\t/* ActivePane */\n\t/* SplitHorizontal */\n\t/* SplitVertical */\n\t/* FreezePanes */\n\t/* FrozenNoSplit */\n\t/* TabColorIndex */\n\t/* Panes */\n\n\t/* NOTE: Password not supported in XLML Format */\n\tif(ws['!protect']) {\n\t\to.push(writetag(\"ProtectContents\", \"True\"));\n\t\tif(ws['!protect'].objects) o.push(writetag(\"ProtectObjects\", \"True\"));\n\t\tif(ws['!protect'].scenarios) o.push(writetag(\"ProtectScenarios\", \"True\"));\n\t\tif(ws['!protect'].selectLockedCells != null && !ws['!protect'].selectLockedCells) o.push(writetag(\"EnableSelection\", \"NoSelection\"));\n\t\telse if(ws['!protect'].selectUnlockedCells != null && !ws['!protect'].selectUnlockedCells) o.push(writetag(\"EnableSelection\", \"UnlockedCells\"));\n\t[\n\t\t[ \"formatCells\", \"AllowFormatCells\" ],\n\t\t[ \"formatColumns\", \"AllowSizeCols\" ],\n\t\t[ \"formatRows\", \"AllowSizeRows\" ],\n\t\t[ \"insertColumns\", \"AllowInsertCols\" ],\n\t\t[ \"insertRows\", \"AllowInsertRows\" ],\n\t\t[ \"insertHyperlinks\", \"AllowInsertHyperlinks\" ],\n\t\t[ \"deleteColumns\", \"AllowDeleteCols\" ],\n\t\t[ \"deleteRows\", \"AllowDeleteRows\" ],\n\t\t[ \"sort\", \"AllowSort\" ],\n\t\t[ \"autoFilter\", \"AllowFilter\" ],\n\t\t[ \"pivotTables\", \"AllowUsePivotTables\" ]\n\t].forEach(function(x) { if(ws['!protect'][x[0]]) o.push(\"<\"+x[1]+\"/>\"); });\n\t}\n\n\tif(o.length == 0) return \"\";\n\treturn writextag(\"WorksheetOptions\", o.join(\"\"), {xmlns:XLMLNS.x});\n}\nfunction write_ws_xlml_comment(comments/*:Array*/)/*:string*/ {\n\treturn comments.map(function(c) {\n\t\t// TODO: formatted text\n\t\tvar t = xlml_unfixstr(c.t||\"\");\n\t\tvar d =writextag(\"ss:Data\", t, {\"xmlns\":\"http://www.w3.org/TR/REC-html40\"});\n\t\treturn writextag(\"Comment\", d, {\"ss:Author\":c.a});\n\t}).join(\"\");\n}\nfunction write_ws_xlml_cell(cell, ref/*:string*/, ws, opts, idx/*:number*/, wb, addr)/*:string*/{\n\tif(!cell || (cell.v == undefined && cell.f == undefined)) return \"\";\n\n\tvar attr = {};\n\tif(cell.f) attr[\"ss:Formula\"] = \"=\" + escapexml(a1_to_rc(cell.f, addr));\n\tif(cell.F && cell.F.slice(0, ref.length) == ref) {\n\t\tvar end = decode_cell(cell.F.slice(ref.length + 1));\n\t\tattr[\"ss:ArrayRange\"] = \"RC:R\" + (end.r == addr.r ? \"\" : \"[\" + (end.r - addr.r) + \"]\") + \"C\" + (end.c == addr.c ? \"\" : \"[\" + (end.c - addr.c) + \"]\");\n\t}\n\n\tif(cell.l && cell.l.Target) {\n\t\tattr[\"ss:HRef\"] = escapexml(cell.l.Target);\n\t\tif(cell.l.Tooltip) attr[\"x:HRefScreenTip\"] = escapexml(cell.l.Tooltip);\n\t}\n\n\tif(ws['!merges']) {\n\t\tvar marr = ws['!merges'];\n\t\tfor(var mi = 0; mi != marr.length; ++mi) {\n\t\t\tif(marr[mi].s.c != addr.c || marr[mi].s.r != addr.r) continue;\n\t\t\tif(marr[mi].e.c > marr[mi].s.c) attr['ss:MergeAcross'] = marr[mi].e.c - marr[mi].s.c;\n\t\t\tif(marr[mi].e.r > marr[mi].s.r) attr['ss:MergeDown'] = marr[mi].e.r - marr[mi].s.r;\n\t\t}\n\t}\n\n\tvar t = \"\", p = \"\";\n\tswitch(cell.t) {\n\t\tcase 'z': if(!opts.sheetStubs) return \"\"; break;\n\t\tcase 'n': t = 'Number'; p = String(cell.v); break;\n\t\tcase 'b': t = 'Boolean'; p = (cell.v ? \"1\" : \"0\"); break;\n\t\tcase 'e': t = 'Error'; p = BErr[cell.v]; break;\n\t\tcase 'd': t = 'DateTime'; p = new Date(cell.v).toISOString(); if(cell.z == null) cell.z = cell.z || table_fmt[14]; break;\n\t\tcase 's': t = 'String'; p = escapexlml(cell.v||\"\"); break;\n\t}\n\t/* TODO: cell style */\n\tvar os = get_cell_style(opts.cellXfs, cell, opts);\n\tattr[\"ss:StyleID\"] = \"s\" + (21+os);\n\tattr[\"ss:Index\"] = addr.c + 1;\n\tvar _v = (cell.v != null ? p : \"\");\n\tvar m = cell.t == 'z' ? \"\" : ('' + _v + '');\n\n\tif((cell.c||[]).length > 0) m += write_ws_xlml_comment(cell.c);\n\n\treturn writextag(\"Cell\", m, attr);\n}\nfunction write_ws_xlml_row(R/*:number*/, row)/*:string*/ {\n\tvar o = '';\n}\n/* TODO */\nfunction write_ws_xlml_table(ws/*:Worksheet*/, opts, idx/*:number*/, wb/*:Workbook*/)/*:string*/ {\n\tif(!ws['!ref']) return \"\";\n\tvar range/*:Range*/ = safe_decode_range(ws['!ref']);\n\tvar marr/*:Array*/ = ws['!merges'] || [], mi = 0;\n\tvar o/*:Array*/ = [];\n\tif(ws['!cols']) ws['!cols'].forEach(function(n, i) {\n\t\tprocess_col(n);\n\t\tvar w = !!n.width;\n\t\tvar p = col_obj_w(i, n);\n\t\tvar k/*:any*/ = {\"ss:Index\":i+1};\n\t\tif(w) k['ss:Width'] = width2px(p.width);\n\t\tif(n.hidden) k['ss:Hidden']=\"1\";\n\t\to.push(writextag(\"Column\",null,k));\n\t});\n\tvar dense = Array.isArray(ws);\n\tfor(var R = range.s.r; R <= range.e.r; ++R) {\n\t\tvar row = [write_ws_xlml_row(R, (ws['!rows']||[])[R])];\n\t\tfor(var C = range.s.c; C <= range.e.c; ++C) {\n\t\t\tvar skip = false;\n\t\t\tfor(mi = 0; mi != marr.length; ++mi) {\n\t\t\t\tif(marr[mi].s.c > C) continue;\n\t\t\t\tif(marr[mi].s.r > R) continue;\n\t\t\t\tif(marr[mi].e.c < C) continue;\n\t\t\t\tif(marr[mi].e.r < R) continue;\n\t\t\t\tif(marr[mi].s.c != C || marr[mi].s.r != R) skip = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif(skip) continue;\n\t\t\tvar addr = {r:R,c:C};\n\t\t\tvar ref = encode_cell(addr), cell = dense ? (ws[R]||[])[C] : ws[ref];\n\t\t\trow.push(write_ws_xlml_cell(cell, ref, ws, opts, idx, wb, addr));\n\t\t}\n\t\trow.push(\"\");\n\t\tif(row.length > 2) o.push(row.join(\"\"));\n\t}\n\treturn o.join(\"\");\n}\nfunction write_ws_xlml(idx/*:number*/, opts, wb/*:Workbook*/)/*:string*/ {\n\tvar o/*:Array*/ = [];\n\tvar s = wb.SheetNames[idx];\n\tvar ws = wb.Sheets[s];\n\n\tvar t/*:string*/ = ws ? write_ws_xlml_names(ws, opts, idx, wb) : \"\";\n\tif(t.length > 0) o.push(\"\" + t + \"\");\n\n\t/* Table */\n\tt = ws ? write_ws_xlml_table(ws, opts, idx, wb) : \"\";\n\tif(t.length > 0) o.push(\"\" + t + \"
\");\n\n\t/* WorksheetOptions */\n\to.push(write_ws_xlml_wsopts(ws, opts, idx, wb));\n\n\treturn o.join(\"\");\n}\nfunction write_xlml(wb, opts)/*:string*/ {\n\tif(!opts) opts = {};\n\tif(!wb.SSF) wb.SSF = dup(table_fmt);\n\tif(wb.SSF) {\n\t\tmake_ssf(); SSF_load_table(wb.SSF);\n\t\t// $FlowIgnore\n\t\topts.revssf = evert_num(wb.SSF); opts.revssf[wb.SSF[65535]] = 0;\n\t\topts.ssf = wb.SSF;\n\t\topts.cellXfs = [];\n\t\tget_cell_style(opts.cellXfs, {}, {revssf:{\"General\":0}});\n\t}\n\tvar d/*:Array*/ = [];\n\td.push(write_props_xlml(wb, opts));\n\td.push(write_wb_xlml(wb, opts));\n\td.push(\"\");\n\td.push(\"\");\n\tfor(var i = 0; i < wb.SheetNames.length; ++i)\n\t\td.push(writextag(\"Worksheet\", write_ws_xlml(i, opts, wb), {\"ss:Name\":escapexml(wb.SheetNames[i])}));\n\td[2] = write_sty_xlml(wb, opts);\n\td[3] = write_names_xlml(wb, opts);\n\treturn XML_HEADER + writextag(\"Workbook\", d.join(\"\"), {\n\t\t'xmlns': XLMLNS.ss,\n\t\t'xmlns:o': XLMLNS.o,\n\t\t'xmlns:x': XLMLNS.x,\n\t\t'xmlns:ss': XLMLNS.ss,\n\t\t'xmlns:dt': XLMLNS.dt,\n\t\t'xmlns:html': XLMLNS.html\n\t});\n}\n/* [MS-OLEDS] 2.3.8 CompObjStream */\nfunction parse_compobj(obj/*:CFBEntry*/) {\n\tvar v = {};\n\tvar o = obj.content;\n\t/*:: if(o == null) return; */\n\n\t/* [MS-OLEDS] 2.3.7 CompObjHeader -- All fields MUST be ignored */\n\to.l = 28;\n\n\tv.AnsiUserType = o.read_shift(0, \"lpstr-ansi\");\n\tv.AnsiClipboardFormat = parse_ClipboardFormatOrAnsiString(o);\n\n\tif(o.length - o.l <= 4) return v;\n\n\tvar m/*:number*/ = o.read_shift(4);\n\tif(m == 0 || m > 40) return v;\n\to.l-=4; v.Reserved1 = o.read_shift(0, \"lpstr-ansi\");\n\n\tif(o.length - o.l <= 4) return v;\n\tm = o.read_shift(4);\n\tif(m !== 0x71b239f4) return v;\n\tv.UnicodeClipboardFormat = parse_ClipboardFormatOrUnicodeString(o);\n\n\tm = o.read_shift(4);\n\tif(m == 0 || m > 40) return v;\n\to.l-=4; v.Reserved2 = o.read_shift(0, \"lpwstr\");\n}\n\n/*\n\tContinue logic for:\n\t- 2.4.58 Continue 0x003c\n\t- 2.4.59 ContinueBigName 0x043c\n\t- 2.4.60 ContinueFrt 0x0812\n\t- 2.4.61 ContinueFrt11 0x0875\n\t- 2.4.62 ContinueFrt12 0x087f\n*/\nvar CONTINUE_RT = [ 0x003c, 0x043c, 0x0812, 0x0875, 0x087f ];\nfunction slurp(RecordType, R, blob, length/*:number*/, opts)/*:any*/ {\n\tvar l = length;\n\tvar bufs = [];\n\tvar d = blob.slice(blob.l,blob.l+l);\n\tif(opts && opts.enc && opts.enc.insitu && d.length > 0) switch(RecordType) {\n\tcase 0x0009: case 0x0209: case 0x0409: case 0x0809/* BOF */: case 0x002f /* FilePass */: case 0x0195 /* FileLock */: case 0x00e1 /* InterfaceHdr */: case 0x0196 /* RRDInfo */: case 0x0138 /* RRDHead */: case 0x0194 /* UsrExcl */: case 0x000a /* EOF */:\n\t\tbreak;\n\tcase 0x0085 /* BoundSheet8 */:\n\t\tbreak;\n\tdefault:\n\t\topts.enc.insitu(d);\n\t}\n\tbufs.push(d);\n\tblob.l += l;\n\tvar nextrt = __readUInt16LE(blob,blob.l), next = XLSRecordEnum[nextrt];\n\tvar start = 0;\n\twhile(next != null && CONTINUE_RT.indexOf(nextrt) > -1) {\n\t\tl = __readUInt16LE(blob,blob.l+2);\n\t\tstart = blob.l + 4;\n\t\tif(nextrt == 0x0812 /* ContinueFrt */) start += 4;\n\t\telse if(nextrt == 0x0875 || nextrt == 0x087f) {\n\t\t\tstart += 12;\n\t\t}\n\t\td = blob.slice(start,blob.l+4+l);\n\t\tbufs.push(d);\n\t\tblob.l += 4+l;\n\t\tnext = (XLSRecordEnum[nextrt = __readUInt16LE(blob, blob.l)]);\n\t}\n\tvar b = (bconcat(bufs)/*:any*/);\n\tprep_blob(b, 0);\n\tvar ll = 0; b.lens = [];\n\tfor(var j = 0; j < bufs.length; ++j) { b.lens.push(ll); ll += bufs[j].length; }\n\tif(b.length < length) throw \"XLS Record 0x\" + RecordType.toString(16) + \" Truncated: \" + b.length + \" < \" + length;\n\treturn R.f(b, b.length, opts);\n}\n\nfunction safe_format_xf(p/*:any*/, opts/*:ParseOpts*/, date1904/*:?boolean*/) {\n\tif(p.t === 'z') return;\n\tif(!p.XF) return;\n\tvar fmtid = 0;\n\ttry {\n\t\tfmtid = p.z || p.XF.numFmtId || 0;\n\t\tif(opts.cellNF) p.z = table_fmt[fmtid];\n\t} catch(e) { if(opts.WTF) throw e; }\n\tif(!opts || opts.cellText !== false) try {\n\t\tif(p.t === 'e') { p.w = p.w || BErr[p.v]; }\n\t\telse if(fmtid === 0 || fmtid == \"General\") {\n\t\t\tif(p.t === 'n') {\n\t\t\t\tif((p.v|0) === p.v) p.w = p.v.toString(10);\n\t\t\t\telse p.w = SSF_general_num(p.v);\n\t\t\t}\n\t\t\telse p.w = SSF_general(p.v);\n\t\t}\n\t\telse p.w = SSF_format(fmtid,p.v, {date1904:!!date1904, dateNF: opts && opts.dateNF});\n\t} catch(e) { if(opts.WTF) throw e; }\n\tif(opts.cellDates && fmtid && p.t == 'n' && fmt_is_date(table_fmt[fmtid] || String(fmtid))) {\n\t\tvar _d = SSF_parse_date_code(p.v); if(_d) { p.t = 'd'; p.v = new Date(_d.y, _d.m-1,_d.d,_d.H,_d.M,_d.S,_d.u); }\n\t}\n}\n\nfunction make_cell(val, ixfe, t)/*:Cell*/ {\n\treturn ({v:val, ixfe:ixfe, t:t}/*:any*/);\n}\n\n// 2.3.2\nfunction parse_workbook(blob, options/*:ParseOpts*/)/*:Workbook*/ {\n\tvar wb = ({opts:{}}/*:any*/);\n\tvar Sheets = {};\n\tif(DENSE != null && options.dense == null) options.dense = DENSE;\n\tvar out/*:Worksheet*/ = ((options.dense ? [] : {})/*:any*/);\n\tvar Directory = {};\n\tvar range/*:Range*/ = ({}/*:any*/);\n\tvar last_formula = null;\n\tvar sst/*:SST*/ = ([]/*:any*/);\n\tvar cur_sheet = \"\";\n\tvar Preamble = {};\n\tvar lastcell, last_cell = \"\", cc/*:Cell*/, cmnt, rngC, rngR;\n\tvar sharedf = {};\n\tvar arrayf/*:Array<[Range, string]>*/ = [];\n\tvar temp_val/*:Cell*/;\n\tvar country;\n\tvar XFs = []; /* XF records */\n\tvar palette/*:Array<[number, number, number]>*/ = [];\n\tvar Workbook/*:WBWBProps*/ = ({ Sheets:[], WBProps:{date1904:false}, Views:[{}] }/*:any*/), wsprops = {};\n\tvar get_rgb = function getrgb(icv/*:number*/)/*:[number, number, number]*/ {\n\t\tif(icv < 8) return XLSIcv[icv];\n\t\tif(icv < 64) return palette[icv-8] || XLSIcv[icv];\n\t\treturn XLSIcv[icv];\n\t};\n\tvar process_cell_style = function pcs(cell, line/*:any*/, options) {\n\t\tvar xfd = line.XF.data;\n\t\tif(!xfd || !xfd.patternType || !options || !options.cellStyles) return;\n\t\tline.s = ({}/*:any*/);\n\t\tline.s.patternType = xfd.patternType;\n\t\tvar t;\n\t\tif((t = rgb2Hex(get_rgb(xfd.icvFore)))) { line.s.fgColor = {rgb:t}; }\n\t\tif((t = rgb2Hex(get_rgb(xfd.icvBack)))) { line.s.bgColor = {rgb:t}; }\n\t};\n\tvar addcell = function addcell(cell/*:any*/, line/*:any*/, options/*:any*/) {\n\t\tif(file_depth > 1) return;\n\t\tif(options.sheetRows && cell.r >= options.sheetRows) return;\n\t\tif(options.cellStyles && line.XF && line.XF.data) process_cell_style(cell, line, options);\n\t\tdelete line.ixfe; delete line.XF;\n\t\tlastcell = cell;\n\t\tlast_cell = encode_cell(cell);\n\t\tif(!range || !range.s || !range.e) range = {s:{r:0,c:0},e:{r:0,c:0}};\n\t\tif(cell.r < range.s.r) range.s.r = cell.r;\n\t\tif(cell.c < range.s.c) range.s.c = cell.c;\n\t\tif(cell.r + 1 > range.e.r) range.e.r = cell.r + 1;\n\t\tif(cell.c + 1 > range.e.c) range.e.c = cell.c + 1;\n\t\tif(options.cellFormula && line.f) {\n\t\t\tfor(var afi = 0; afi < arrayf.length; ++afi) {\n\t\t\t\tif(arrayf[afi][0].s.c > cell.c || arrayf[afi][0].s.r > cell.r) continue;\n\t\t\t\tif(arrayf[afi][0].e.c < cell.c || arrayf[afi][0].e.r < cell.r) continue;\n\t\t\t\tline.F = encode_range(arrayf[afi][0]);\n\t\t\t\tif(arrayf[afi][0].s.c != cell.c || arrayf[afi][0].s.r != cell.r) delete line.f;\n\t\t\t\tif(line.f) line.f = \"\" + stringify_formula(arrayf[afi][1], range, cell, supbooks, opts);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t{\n\t\t\tif(options.dense) {\n\t\t\t\tif(!out[cell.r]) out[cell.r] = [];\n\t\t\t\tout[cell.r][cell.c] = line;\n\t\t\t} else out[last_cell] = line;\n\t\t}\n\t};\n\tvar opts = ({\n\t\tenc: false, // encrypted\n\t\tsbcch: 0, // cch in the preceding SupBook\n\t\tsnames: [], // sheetnames\n\t\tsharedf: sharedf, // shared formulae by address\n\t\tarrayf: arrayf, // array formulae array\n\t\trrtabid: [], // RRTabId\n\t\tlastuser: \"\", // Last User from WriteAccess\n\t\tbiff: 8, // BIFF version\n\t\tcodepage: 0, // CP from CodePage record\n\t\twinlocked: 0, // fLockWn from WinProtect\n\t\tcellStyles: !!options && !!options.cellStyles,\n\t\tWTF: !!options && !!options.wtf\n\t}/*:any*/);\n\tif(options.password) opts.password = options.password;\n\tvar themes;\n\tvar merges/*:Array*/ = [];\n\tvar objects = [];\n\tvar colinfo/*:Array*/ = [], rowinfo/*:Array*/ = [];\n\tvar seencol = false;\n\tvar supbooks = ([]/*:any*/); // 1-indexed, will hold extern names\n\tsupbooks.SheetNames = opts.snames;\n\tsupbooks.sharedf = opts.sharedf;\n\tsupbooks.arrayf = opts.arrayf;\n\tsupbooks.names = [];\n\tsupbooks.XTI = [];\n\tvar last_RT = 0;\n\tvar file_depth = 0; /* TODO: make a real stack */\n\tvar BIFF2Fmt = 0, BIFF2FmtTable/*:Array*/ = [];\n\tvar FilterDatabases = []; /* TODO: sort out supbooks and process elsewhere */\n\tvar last_lbl/*:?DefinedName*/;\n\n\t/* explicit override for some broken writers */\n\topts.codepage = 1200;\n\tset_cp(1200);\n\tvar seen_codepage = false;\n\twhile(blob.l < blob.length - 1) {\n\t\tvar s = blob.l;\n\t\tvar RecordType = blob.read_shift(2);\n\t\tif(RecordType === 0 && last_RT === 0x000a /* EOF */) break;\n\t\tvar length = (blob.l === blob.length ? 0 : blob.read_shift(2));\n\t\tvar R = XLSRecordEnum[RecordType];\n\t\t//console.log(RecordType.toString(16), RecordType, R, blob.l, length, blob.length);\n\t\t//if(!R) console.log(blob.slice(blob.l, blob.l + length));\n\t\tif(R && R.f) {\n\t\t\tif(options.bookSheets) {\n\t\t\t\tif(last_RT === 0x0085 /* BoundSheet8 */ && RecordType !== 0x0085 /* R.n !== 'BoundSheet8' */) break;\n\t\t\t}\n\t\t\tlast_RT = RecordType;\n\t\t\tif(R.r === 2 || R.r == 12) {\n\t\t\t\tvar rt = blob.read_shift(2); length -= 2;\n\t\t\t\tif(!opts.enc && rt !== RecordType && (((rt&0xFF)<<8)|(rt>>8)) !== RecordType) throw new Error(\"rt mismatch: \" + rt + \"!=\" + RecordType);\n\t\t\t\tif(R.r == 12){\n\t\t\t\t\tblob.l += 10; length -= 10;\n\t\t\t\t} // skip FRT\n\t\t\t}\n\t\t\t//console.error(R,blob.l,length,blob.length);\n\t\t\tvar val/*:any*/ = ({}/*:any*/);\n\t\t\tif(RecordType === 0x000a /* EOF */) val = /*::(*/R.f(blob, length, opts)/*:: :any)*/;\n\t\t\telse val = /*::(*/slurp(RecordType, R, blob, length, opts)/*:: :any)*/;\n\t\t\t/*:: val = (val:any); */\n\t\t\tif(file_depth == 0 && [0x0009, 0x0209, 0x0409, 0x0809].indexOf(last_RT) === -1 /* 'BOF' */) continue;\n\t\t\tswitch(RecordType) {\n\t\t\t\tcase 0x0022 /* Date1904 */:\n\t\t\t\t\t/*:: if(!Workbook.WBProps) Workbook.WBProps = {}; */\n\t\t\t\t\twb.opts.Date1904 = Workbook.WBProps.date1904 = val; break;\n\t\t\t\tcase 0x0086 /* WriteProtect */: wb.opts.WriteProtect = true; break;\n\t\t\t\tcase 0x002f /* FilePass */:\n\t\t\t\t\tif(!opts.enc) blob.l = 0;\n\t\t\t\t\topts.enc = val;\n\t\t\t\t\tif(!options.password) throw new Error(\"File is password-protected\");\n\t\t\t\t\tif(val.valid == null) throw new Error(\"Encryption scheme unsupported\");\n\t\t\t\t\tif(!val.valid) throw new Error(\"Password is incorrect\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x005c /* WriteAccess */: opts.lastuser = val; break;\n\t\t\t\tcase 0x0042 /* CodePage */:\n\t\t\t\t\tvar cpval = Number(val);\n\t\t\t\t\t/* overrides based on test cases */\n\t\t\t\t\tswitch(cpval) {\n\t\t\t\t\t\tcase 0x5212: cpval = 1200; break;\n\t\t\t\t\t\tcase 0x8000: cpval = 10000; break;\n\t\t\t\t\t\tcase 0x8001: cpval = 1252; break;\n\t\t\t\t\t}\n\t\t\t\t\tset_cp(opts.codepage = cpval);\n\t\t\t\t\tseen_codepage = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x013d /* RRTabId */: opts.rrtabid = val; break;\n\t\t\t\tcase 0x0019 /* WinProtect */: opts.winlocked = val; break;\n\t\t\t\tcase 0x01b7 /* RefreshAll */: wb.opts[\"RefreshAll\"] = val; break;\n\t\t\t\tcase 0x000c /* CalcCount */: wb.opts[\"CalcCount\"] = val; break;\n\t\t\t\tcase 0x0010 /* CalcDelta */: wb.opts[\"CalcDelta\"] = val; break;\n\t\t\t\tcase 0x0011 /* CalcIter */: wb.opts[\"CalcIter\"] = val; break;\n\t\t\t\tcase 0x000d /* CalcMode */: wb.opts[\"CalcMode\"] = val; break;\n\t\t\t\tcase 0x000e /* CalcPrecision */: wb.opts[\"CalcPrecision\"] = val; break;\n\t\t\t\tcase 0x005f /* CalcSaveRecalc */: wb.opts[\"CalcSaveRecalc\"] = val; break;\n\t\t\t\tcase 0x000f /* CalcRefMode */: opts.CalcRefMode = val; break; // TODO: implement R1C1\n\t\t\t\tcase 0x08a3 /* ForceFullCalculation */: wb.opts.FullCalc = val; break;\n\t\t\t\tcase 0x0081 /* WsBool */:\n\t\t\t\t\tif(val.fDialog) out[\"!type\"] = \"dialog\";\n\t\t\t\t\tif(!val.fBelow) (out[\"!outline\"] || (out[\"!outline\"] = {})).above = true;\n\t\t\t\t\tif(!val.fRight) (out[\"!outline\"] || (out[\"!outline\"] = {})).left = true;\n\t\t\t\t\tbreak; // TODO\n\t\t\t\tcase 0x00e0 /* XF */:\n\t\t\t\t\tXFs.push(val); break;\n\t\t\t\tcase 0x01ae /* SupBook */:\n\t\t\t\t\tsupbooks.push([val]);\n\t\t\t\t\tsupbooks[supbooks.length-1].XTI = [];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x0023: case 0x0223 /* ExternName */:\n\t\t\t\t\tsupbooks[supbooks.length-1].push(val);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x0018: case 0x0218 /* Lbl */:\n\t\t\t\t\tlast_lbl = ({\n\t\t\t\t\t\tName: val.Name,\n\t\t\t\t\t\tRef: stringify_formula(val.rgce,range,null,supbooks,opts)\n\t\t\t\t\t}/*:DefinedName*/);\n\t\t\t\t\tif(val.itab > 0) last_lbl.Sheet = val.itab - 1;\n\t\t\t\t\tsupbooks.names.push(last_lbl);\n\t\t\t\t\tif(!supbooks[0]) { supbooks[0] = []; supbooks[0].XTI = []; }\n\t\t\t\t\tsupbooks[supbooks.length-1].push(val);\n\t\t\t\t\tif(val.Name == \"_xlnm._FilterDatabase\" && val.itab > 0)\n\t\t\t\t\t\tif(val.rgce && val.rgce[0] && val.rgce[0][0] && val.rgce[0][0][0] == 'PtgArea3d')\n\t\t\t\t\t\t\tFilterDatabases[val.itab - 1] = { ref: encode_range(val.rgce[0][0][1][2]) };\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x0016 /* ExternCount */: opts.ExternCount = val; break;\n\t\t\t\tcase 0x0017 /* ExternSheet */:\n\t\t\t\t\tif(supbooks.length == 0) { supbooks[0] = []; supbooks[0].XTI = []; }\n\t\t\t\t\tsupbooks[supbooks.length - 1].XTI = supbooks[supbooks.length - 1].XTI.concat(val); supbooks.XTI = supbooks.XTI.concat(val); break;\n\t\t\t\tcase 0x0894 /* NameCmt */:\n\t\t\t\t\t/* TODO: search for correct name */\n\t\t\t\t\tif(opts.biff < 8) break;\n\t\t\t\t\tif(last_lbl != null) last_lbl.Comment = val[1];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x0012 /* Protect */: out[\"!protect\"] = val; break; /* for sheet or book */\n\t\t\t\tcase 0x0013 /* Password */: if(val !== 0 && opts.WTF) console.error(\"Password verifier: \" + val); break;\n\t\t\t\tcase 0x0085 /* BoundSheet8 */: {\n\t\t\t\t\tDirectory[val.pos] = val;\n\t\t\t\t\topts.snames.push(val.name);\n\t\t\t\t} break;\n\t\t\t\tcase 0x000a /* EOF */: {\n\t\t\t\t\tif(--file_depth) break;\n\t\t\t\t\tif(range.e) {\n\t\t\t\t\t\tif(range.e.r > 0 && range.e.c > 0) {\n\t\t\t\t\t\t\trange.e.r--; range.e.c--;\n\t\t\t\t\t\t\tout[\"!ref\"] = encode_range(range);\n\t\t\t\t\t\t\tif(options.sheetRows && options.sheetRows <= range.e.r) {\n\t\t\t\t\t\t\t\tvar tmpri = range.e.r;\n\t\t\t\t\t\t\t\trange.e.r = options.sheetRows - 1;\n\t\t\t\t\t\t\t\tout[\"!fullref\"] = out[\"!ref\"];\n\t\t\t\t\t\t\t\tout[\"!ref\"] = encode_range(range);\n\t\t\t\t\t\t\t\trange.e.r = tmpri;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\trange.e.r++; range.e.c++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(merges.length > 0) out[\"!merges\"] = merges;\n\t\t\t\t\t\tif(objects.length > 0) out[\"!objects\"] = objects;\n\t\t\t\t\t\tif(colinfo.length > 0) out[\"!cols\"] = colinfo;\n\t\t\t\t\t\tif(rowinfo.length > 0) out[\"!rows\"] = rowinfo;\n\t\t\t\t\t\tWorkbook.Sheets.push(wsprops);\n\t\t\t\t\t}\n\t\t\t\t\tif(cur_sheet === \"\") Preamble = out; else Sheets[cur_sheet] = out;\n\t\t\t\t\tout = ((options.dense ? [] : {})/*:any*/);\n\t\t\t\t} break;\n\t\t\t\tcase 0x0009: case 0x0209: case 0x0409: case 0x0809 /* BOF */: {\n\t\t\t\t\tif(opts.biff === 8) opts.biff = {\n\t\t\t\t\t\t/*::[*/0x0009/*::]*/:2,\n\t\t\t\t\t\t/*::[*/0x0209/*::]*/:3,\n\t\t\t\t\t\t/*::[*/0x0409/*::]*/:4\n\t\t\t\t\t}[RecordType] || {\n\t\t\t\t\t\t/*::[*/0x0200/*::]*/:2,\n\t\t\t\t\t\t/*::[*/0x0300/*::]*/:3,\n\t\t\t\t\t\t/*::[*/0x0400/*::]*/:4,\n\t\t\t\t\t\t/*::[*/0x0500/*::]*/:5,\n\t\t\t\t\t\t/*::[*/0x0600/*::]*/:8,\n\t\t\t\t\t\t/*::[*/0x0002/*::]*/:2,\n\t\t\t\t\t\t/*::[*/0x0007/*::]*/:2\n\t\t\t\t\t}[val.BIFFVer] || 8;\n\t\t\t\t\topts.biffguess = val.BIFFVer == 0;\n\t\t\t\t\tif(val.BIFFVer == 0 && val.dt == 0x1000) { opts.biff = 5; seen_codepage = true; set_cp(opts.codepage = 28591); }\n\t\t\t\t\tif(opts.biff == 8 && val.BIFFVer == 0 && val.dt == 16) opts.biff = 2;\n\t\t\t\t\tif(file_depth++) break;\n\t\t\t\t\tout = ((options.dense ? [] : {})/*:any*/);\n\n\t\t\t\t\tif(opts.biff < 8 && !seen_codepage) { seen_codepage = true; set_cp(opts.codepage = options.codepage || 1252); }\n\n\t\t\t\t\tif(opts.biff < 5 || val.BIFFVer == 0 && val.dt == 0x1000) {\n\t\t\t\t\t\tif(cur_sheet === \"\") cur_sheet = \"Sheet1\";\n\t\t\t\t\t\trange = {s:{r:0,c:0},e:{r:0,c:0}};\n\t\t\t\t\t\t/* fake BoundSheet8 */\n\t\t\t\t\t\tvar fakebs8 = {pos: blob.l - length, name:cur_sheet};\n\t\t\t\t\t\tDirectory[fakebs8.pos] = fakebs8;\n\t\t\t\t\t\topts.snames.push(cur_sheet);\n\t\t\t\t\t}\n\t\t\t\t\telse cur_sheet = (Directory[s] || {name:\"\"}).name;\n\t\t\t\t\tif(val.dt == 0x20) out[\"!type\"] = \"chart\";\n\t\t\t\t\tif(val.dt == 0x40) out[\"!type\"] = \"macro\";\n\t\t\t\t\tmerges = [];\n\t\t\t\t\tobjects = [];\n\t\t\t\t\topts.arrayf = arrayf = [];\n\t\t\t\t\tcolinfo = []; rowinfo = [];\n\t\t\t\t\tseencol = false;\n\t\t\t\t\twsprops = {Hidden:(Directory[s]||{hs:0}).hs, name:cur_sheet };\n\t\t\t\t} break;\n\t\t\t\tcase 0x0203 /* Number */: case 0x0003 /* BIFF2NUM */: case 0x0002 /* BIFF2INT */: {\n\t\t\t\t\tif(out[\"!type\"] == \"chart\") if(options.dense ? (out[val.r]||[])[val.c]: out[encode_cell({c:val.c, r:val.r})]) ++val.c;\n\t\t\t\t\ttemp_val = ({ixfe: val.ixfe, XF: XFs[val.ixfe]||{}, v:val.val, t:'n'}/*:any*/);\n\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\taddcell({c:val.c, r:val.r}, temp_val, options);\n\t\t\t\t} break;\n\t\t\t\tcase 0x0005: case 0x0205 /* BoolErr */: {\n\t\t\t\t\ttemp_val = ({ixfe: val.ixfe, XF: XFs[val.ixfe], v:val.val, t:val.t}/*:any*/);\n\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\taddcell({c:val.c, r:val.r}, temp_val, options);\n\t\t\t\t} break;\n\t\t\t\tcase 0x027e /* RK */: {\n\t\t\t\t\ttemp_val = ({ixfe: val.ixfe, XF: XFs[val.ixfe], v:val.rknum, t:'n'}/*:any*/);\n\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\taddcell({c:val.c, r:val.r}, temp_val, options);\n\t\t\t\t} break;\n\t\t\t\tcase 0x00bd /* MulRk */: {\n\t\t\t\t\tfor(var j = val.c; j <= val.C; ++j) {\n\t\t\t\t\t\tvar ixfe = val.rkrec[j-val.c][0];\n\t\t\t\t\t\ttemp_val= ({ixfe:ixfe, XF:XFs[ixfe], v:val.rkrec[j-val.c][1], t:'n'}/*:any*/);\n\t\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\t\taddcell({c:j, r:val.r}, temp_val, options);\n\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t\tcase 0x0006: case 0x0206: case 0x0406 /* Formula */: {\n\t\t\t\t\tif(val.val == 'String') { last_formula = val; break; }\n\t\t\t\t\ttemp_val = make_cell(val.val, val.cell.ixfe, val.tt);\n\t\t\t\t\ttemp_val.XF = XFs[temp_val.ixfe];\n\t\t\t\t\tif(options.cellFormula) {\n\t\t\t\t\t\tvar _f = val.formula;\n\t\t\t\t\t\tif(_f && _f[0] && _f[0][0] && _f[0][0][0] == 'PtgExp') {\n\t\t\t\t\t\t\tvar _fr = _f[0][0][1][0], _fc = _f[0][0][1][1];\n\t\t\t\t\t\t\tvar _fe = encode_cell({r:_fr, c:_fc});\n\t\t\t\t\t\t\tif(sharedf[_fe]) temp_val.f = \"\"+stringify_formula(val.formula,range,val.cell,supbooks, opts);\n\t\t\t\t\t\t\telse temp_val.F = ((options.dense ? (out[_fr]||[])[_fc]: out[_fe]) || {}).F;\n\t\t\t\t\t\t} else temp_val.f = \"\"+stringify_formula(val.formula,range,val.cell,supbooks, opts);\n\t\t\t\t\t}\n\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\taddcell(val.cell, temp_val, options);\n\t\t\t\t\tlast_formula = val;\n\t\t\t\t} break;\n\t\t\t\tcase 0x0007: case 0x0207 /* String */: {\n\t\t\t\t\tif(last_formula) { /* technically always true */\n\t\t\t\t\t\tlast_formula.val = val;\n\t\t\t\t\t\ttemp_val = make_cell(val, last_formula.cell.ixfe, 's');\n\t\t\t\t\t\ttemp_val.XF = XFs[temp_val.ixfe];\n\t\t\t\t\t\tif(options.cellFormula) {\n\t\t\t\t\t\t\ttemp_val.f = \"\"+stringify_formula(last_formula.formula, range, last_formula.cell, supbooks, opts);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\t\taddcell(last_formula.cell, temp_val, options);\n\t\t\t\t\t\tlast_formula = null;\n\t\t\t\t\t} else throw new Error(\"String record expects Formula\");\n\t\t\t\t} break;\n\t\t\t\tcase 0x0021: case 0x0221 /* Array */: {\n\t\t\t\t\tarrayf.push(val);\n\t\t\t\t\tvar _arraystart = encode_cell(val[0].s);\n\t\t\t\t\tcc = options.dense ? (out[val[0].s.r]||[])[val[0].s.c] : out[_arraystart];\n\t\t\t\t\tif(options.cellFormula && cc) {\n\t\t\t\t\t\tif(!last_formula) break; /* technically unreachable */\n\t\t\t\t\t\tif(!_arraystart || !cc) break;\n\t\t\t\t\t\tcc.f = \"\"+stringify_formula(val[1], range, val[0], supbooks, opts);\n\t\t\t\t\t\tcc.F = encode_range(val[0]);\n\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t\tcase 0x04bc /* ShrFmla */: {\n\t\t\t\t\tif(!options.cellFormula) break;\n\t\t\t\t\tif(last_cell) {\n\t\t\t\t\t\t/* TODO: capture range */\n\t\t\t\t\t\tif(!last_formula) break; /* technically unreachable */\n\t\t\t\t\t\tsharedf[encode_cell(last_formula.cell)]= val[0];\n\t\t\t\t\t\tcc = options.dense ? (out[last_formula.cell.r]||[])[last_formula.cell.c] : out[encode_cell(last_formula.cell)];\n\t\t\t\t\t\t(cc||{}).f = \"\"+stringify_formula(val[0], range, lastcell, supbooks, opts);\n\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t\tcase 0x00fd /* LabelSst */:\n\t\t\t\t\ttemp_val=make_cell(sst[val.isst].t, val.ixfe, 's');\n\t\t\t\t\tif(sst[val.isst].h) temp_val.h = sst[val.isst].h;\n\t\t\t\t\ttemp_val.XF = XFs[temp_val.ixfe];\n\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\taddcell({c:val.c, r:val.r}, temp_val, options);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x0201 /* Blank */: if(options.sheetStubs) {\n\t\t\t\t\ttemp_val = ({ixfe: val.ixfe, XF: XFs[val.ixfe], t:'z'}/*:any*/);\n\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\taddcell({c:val.c, r:val.r}, temp_val, options);\n\t\t\t\t} break;\n\t\t\t\tcase 0x00be /* MulBlank */: if(options.sheetStubs) {\n\t\t\t\t\tfor(var _j = val.c; _j <= val.C; ++_j) {\n\t\t\t\t\t\tvar _ixfe = val.ixfe[_j-val.c];\n\t\t\t\t\t\ttemp_val= ({ixfe:_ixfe, XF:XFs[_ixfe], t:'z'}/*:any*/);\n\t\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\t\taddcell({c:_j, r:val.r}, temp_val, options);\n\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t\tcase 0x00d6 /* RString */:\n\t\t\t\tcase 0x0204 /* Label */: case 0x0004 /* BIFF2STR */:\n\t\t\t\t\ttemp_val=make_cell(val.val, val.ixfe, 's');\n\t\t\t\t\ttemp_val.XF = XFs[temp_val.ixfe];\n\t\t\t\t\tif(BIFF2Fmt > 0) temp_val.z = BIFF2FmtTable[(temp_val.ixfe>>8) & 0x3F];\n\t\t\t\t\tsafe_format_xf(temp_val, options, wb.opts.Date1904);\n\t\t\t\t\taddcell({c:val.c, r:val.r}, temp_val, options);\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 0x0000: case 0x0200 /* Dimensions */: {\n\t\t\t\t\tif(file_depth === 1) range = val; /* TODO: stack */\n\t\t\t\t} break;\n\t\t\t\tcase 0x00fc /* SST */: {\n\t\t\t\t\tsst = val;\n\t\t\t\t} break;\n\t\t\t\tcase 0x041e /* Format */: { /* val = [id, fmt] */\n\t\t\t\t\tif(opts.biff == 4) {\n\t\t\t\t\t\tBIFF2FmtTable[BIFF2Fmt++] = val[1];\n\t\t\t\t\t\tfor(var b4idx = 0; b4idx < BIFF2Fmt + 163; ++b4idx) if(table_fmt[b4idx] == val[1]) break;\n\t\t\t\t\t\tif(b4idx >= 163) SSF_load(val[1], BIFF2Fmt + 163);\n\t\t\t\t\t}\n\t\t\t\t\telse SSF_load(val[1], val[0]);\n\t\t\t\t} break;\n\t\t\t\tcase 0x001e /* BIFF2FORMAT */: {\n\t\t\t\t\tBIFF2FmtTable[BIFF2Fmt++] = val;\n\t\t\t\t\tfor(var b2idx = 0; b2idx < BIFF2Fmt + 163; ++b2idx) if(table_fmt[b2idx] == val) break;\n\t\t\t\t\tif(b2idx >= 163) SSF_load(val, BIFF2Fmt + 163);\n\t\t\t\t} break;\n\n\t\t\t\tcase 0x00e5 /* MergeCells */: merges = merges.concat(val); break;\n\n\t\t\t\tcase 0x005d /* Obj */: objects[val.cmo[0]] = opts.lastobj = val; break;\n\t\t\t\tcase 0x01b6 /* TxO */: opts.lastobj.TxO = val; break;\n\t\t\t\tcase 0x007f /* ImData */: opts.lastobj.ImData = val; break;\n\n\t\t\t\tcase 0x01b8 /* HLink */: {\n\t\t\t\t\tfor(rngR = val[0].s.r; rngR <= val[0].e.r; ++rngR)\n\t\t\t\t\t\tfor(rngC = val[0].s.c; rngC <= val[0].e.c; ++rngC) {\n\t\t\t\t\t\t\tcc = options.dense ? (out[rngR]||[])[rngC] : out[encode_cell({c:rngC,r:rngR})];\n\t\t\t\t\t\t\tif(cc) cc.l = val[1];\n\t\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t\tcase 0x0800 /* HLinkTooltip */: {\n\t\t\t\t\tfor(rngR = val[0].s.r; rngR <= val[0].e.r; ++rngR)\n\t\t\t\t\t\tfor(rngC = val[0].s.c; rngC <= val[0].e.c; ++rngC) {\n\t\t\t\t\t\t\tcc = options.dense ? (out[rngR]||[])[rngC] : out[encode_cell({c:rngC,r:rngR})];\n\t\t\t\t\t\t\tif(cc && cc.l) cc.l.Tooltip = val[1];\n\t\t\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t\tcase 0x001c /* Note */: {\n\t\t\t\t\tif(opts.biff <= 5 && opts.biff >= 2) break; /* TODO: BIFF5 */\n\t\t\t\t\tcc = options.dense ? (out[val[0].r]||[])[val[0].c] : out[encode_cell(val[0])];\n\t\t\t\t\tvar noteobj = objects[val[2]];\n\t\t\t\t\tif(!cc) {\n\t\t\t\t\t\tif(options.dense) {\n\t\t\t\t\t\t\tif(!out[val[0].r]) out[val[0].r] = [];\n\t\t\t\t\t\t\tcc = out[val[0].r][val[0].c] = ({t:\"z\"}/*:any*/);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tcc = out[encode_cell(val[0])] = ({t:\"z\"}/*:any*/);\n\t\t\t\t\t\t}\n\t\t\t\t\t\trange.e.r = Math.max(range.e.r, val[0].r);\n\t\t\t\t\t\trange.s.r = Math.min(range.s.r, val[0].r);\n\t\t\t\t\t\trange.e.c = Math.max(range.e.c, val[0].c);\n\t\t\t\t\t\trange.s.c = Math.min(range.s.c, val[0].c);\n\t\t\t\t\t}\n\t\t\t\t\tif(!cc.c) cc.c = [];\n\t\t\t\t\tcmnt = {a:val[1],t:noteobj.TxO.t};\n\t\t\t\t\tcc.c.push(cmnt);\n\t\t\t\t} break;\n\t\t\t\tcase 0x087d /* XFExt */: update_xfext(XFs[val.ixfe], val.ext); break;\n\t\t\t\tcase 0x007d /* ColInfo */: {\n\t\t\t\t\tif(!opts.cellStyles) break;\n\t\t\t\t\twhile(val.e >= val.s) {\n\t\t\t\t\t\tcolinfo[val.e--] = { width: val.w/256, level: (val.level || 0), hidden: !!(val.flags & 1) };\n\t\t\t\t\t\tif(!seencol) { seencol = true; find_mdw_colw(val.w/256); }\n\t\t\t\t\t\tprocess_col(colinfo[val.e+1]);\n\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t\tcase 0x0208 /* Row */: {\n\t\t\t\t\tvar rowobj = {};\n\t\t\t\t\tif(val.level != null) { rowinfo[val.r] = rowobj; rowobj.level = val.level; }\n\t\t\t\t\tif(val.hidden) { rowinfo[val.r] = rowobj; rowobj.hidden = true; }\n\t\t\t\t\tif(val.hpt) {\n\t\t\t\t\t\trowinfo[val.r] = rowobj;\n\t\t\t\t\t\trowobj.hpt = val.hpt; rowobj.hpx = pt2px(val.hpt);\n\t\t\t\t\t}\n\t\t\t\t} break;\n\t\t\t\tcase 0x0026 /* LeftMargin */:\n\t\t\t\tcase 0x0027 /* RightMargin */:\n\t\t\t\tcase 0x0028 /* TopMargin */:\n\t\t\t\tcase 0x0029 /* BottomMargin */:\n\t\t\t\t\tif(!out['!margins']) default_margins(out['!margins'] = {});\n\t\t\t\t\tout['!margins'][({0x26: \"left\", 0x27:\"right\", 0x28:\"top\", 0x29:\"bottom\"})[RecordType]] = val;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x00a1 /* Setup */: // TODO\n\t\t\t\t\tif(!out['!margins']) default_margins(out['!margins'] = {});\n\t\t\t\t\tout['!margins'].header = val.header;\n\t\t\t\t\tout['!margins'].footer = val.footer;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x023e /* Window2 */: // TODO\n\t\t\t\t\t// $FlowIgnore\n\t\t\t\t\tif(val.RTL) Workbook.Views[0].RTL = true;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 0x0092 /* Palette */: palette = val; break;\n\t\t\t\tcase 0x0896 /* Theme */: themes = val; break;\n\t\t\t\tcase 0x008c /* Country */: country = val; break;\n\t\t\t\tcase 0x01ba /* CodeName */: {\n\t\t\t\t\t/*:: if(!Workbook.WBProps) Workbook.WBProps = {}; */\n\t\t\t\t\tif(!cur_sheet) Workbook.WBProps.CodeName = val || \"ThisWorkbook\";\n\t\t\t\t\telse wsprops.CodeName = val || wsprops.name;\n\t\t\t\t} break;\n\t\t\t}\n\t\t} else {\n\t\t\tif(!R) console.error(\"Missing Info for XLS Record 0x\" + RecordType.toString(16));\n\t\t\tblob.l += length;\n\t\t}\n\t}\n\twb.SheetNames=keys(Directory).sort(function(a,b) { return Number(a) - Number(b); }).map(function(x){return Directory[x].name;});\n\tif(!options.bookSheets) wb.Sheets=Sheets;\n\tif(!wb.SheetNames.length && Preamble[\"!ref\"]) {\n\t\twb.SheetNames.push(\"Sheet1\");\n\t\t/*jshint -W069 */\n\t\tif(wb.Sheets) wb.Sheets[\"Sheet1\"] = Preamble;\n\t\t/*jshint +W069 */\n\t} else wb.Preamble=Preamble;\n\tif(wb.Sheets) FilterDatabases.forEach(function(r,i) { wb.Sheets[wb.SheetNames[i]]['!autofilter'] = r; });\n\twb.Strings = sst;\n\twb.SSF = dup(table_fmt);\n\tif(opts.enc) wb.Encryption = opts.enc;\n\tif(themes) wb.Themes = themes;\n\twb.Metadata = {};\n\tif(country !== undefined) wb.Metadata.Country = country;\n\tif(supbooks.names.length > 0) Workbook.Names = supbooks.names;\n\twb.Workbook = Workbook;\n\treturn wb;\n}\n\n/* TODO: split props*/\nvar PSCLSID = {\n\tSI: \"e0859ff2f94f6810ab9108002b27b3d9\",\n\tDSI: \"02d5cdd59c2e1b10939708002b2cf9ae\",\n\tUDI: \"05d5cdd59c2e1b10939708002b2cf9ae\"\n};\nfunction parse_xls_props(cfb/*:CFBContainer*/, props, o) {\n\t/* [MS-OSHARED] 2.3.3.2.2 Document Summary Information Property Set */\n\tvar DSI = CFB.find(cfb, '/!DocumentSummaryInformation');\n\tif(DSI && DSI.size > 0) try {\n\t\tvar DocSummary = parse_PropertySetStream(DSI, DocSummaryPIDDSI, PSCLSID.DSI);\n\t\tfor(var d in DocSummary) props[d] = DocSummary[d];\n\t} catch(e) {if(o.WTF) throw e;/* empty */}\n\n\t/* [MS-OSHARED] 2.3.3.2.1 Summary Information Property Set*/\n\tvar SI = CFB.find(cfb, '/!SummaryInformation');\n\tif(SI && SI.size > 0) try {\n\t\tvar Summary = parse_PropertySetStream(SI, SummaryPIDSI, PSCLSID.SI);\n\t\tfor(var s in Summary) if(props[s] == null) props[s] = Summary[s];\n\t} catch(e) {if(o.WTF) throw e;/* empty */}\n\n\tif(props.HeadingPairs && props.TitlesOfParts) {\n\t\tload_props_pairs(props.HeadingPairs, props.TitlesOfParts, props, o);\n\t\tdelete props.HeadingPairs; delete props.TitlesOfParts;\n\t}\n}\nfunction write_xls_props(wb/*:Workbook*/, cfb/*:CFBContainer*/) {\n\tvar DSEntries = [], SEntries = [], CEntries = [];\n\tvar i = 0, Keys;\n\tvar DocSummaryRE/*:{[key:string]:string}*/ = evert_key(DocSummaryPIDDSI, \"n\");\n\tvar SummaryRE/*:{[key:string]:string}*/ = evert_key(SummaryPIDSI, \"n\");\n\tif(wb.Props) {\n\t\tKeys = keys(wb.Props);\n\t\t// $FlowIgnore\n\t\tfor(i = 0; i < Keys.length; ++i) (Object.prototype.hasOwnProperty.call(DocSummaryRE, Keys[i]) ? DSEntries : Object.prototype.hasOwnProperty.call(SummaryRE, Keys[i]) ? SEntries : CEntries).push([Keys[i], wb.Props[Keys[i]]]);\n\t}\n\tif(wb.Custprops) {\n\t\tKeys = keys(wb.Custprops);\n\t\t// $FlowIgnore\n\t\tfor(i = 0; i < Keys.length; ++i) if(!Object.prototype.hasOwnProperty.call((wb.Props||{}), Keys[i])) (Object.prototype.hasOwnProperty.call(DocSummaryRE, Keys[i]) ? DSEntries : Object.prototype.hasOwnProperty.call(SummaryRE, Keys[i]) ? SEntries : CEntries).push([Keys[i], wb.Custprops[Keys[i]]]);\n\t}\n\tvar CEntries2 = [];\n\tfor(i = 0; i < CEntries.length; ++i) {\n\t\tif(XLSPSSkip.indexOf(CEntries[i][0]) > -1 || PseudoPropsPairs.indexOf(CEntries[i][0]) > -1) continue;\n\t\tif(CEntries[i][1] == null) continue;\n\t\tCEntries2.push(CEntries[i]);\n\t}\n\tif(SEntries.length) CFB.utils.cfb_add(cfb, \"/\\u0005SummaryInformation\", write_PropertySetStream(SEntries, PSCLSID.SI, SummaryRE, SummaryPIDSI));\n\tif(DSEntries.length || CEntries2.length) CFB.utils.cfb_add(cfb, \"/\\u0005DocumentSummaryInformation\", write_PropertySetStream(DSEntries, PSCLSID.DSI, DocSummaryRE, DocSummaryPIDDSI, CEntries2.length ? CEntries2 : null, PSCLSID.UDI));\n}\n\nfunction parse_xlscfb(cfb/*:any*/, options/*:?ParseOpts*/)/*:Workbook*/ {\nif(!options) options = {};\nfix_read_opts(options);\nreset_cp();\nif(options.codepage) set_ansi(options.codepage);\nvar CompObj/*:?CFBEntry*/, WB/*:?any*/;\nif(cfb.FullPaths) {\n\tif(CFB.find(cfb, '/encryption')) throw new Error(\"File is password-protected\");\n\tCompObj = CFB.find(cfb, '!CompObj');\n\tWB = CFB.find(cfb, '/Workbook') || CFB.find(cfb, '/Book');\n} else {\n\tswitch(options.type) {\n\t\tcase 'base64': cfb = s2a(Base64_decode(cfb)); break;\n\t\tcase 'binary': cfb = s2a(cfb); break;\n\t\tcase 'buffer': break;\n\t\tcase 'array': if(!Array.isArray(cfb)) cfb = Array.prototype.slice.call(cfb); break;\n\t}\n\tprep_blob(cfb, 0);\n\tWB = ({content: cfb}/*:any*/);\n}\nvar /*::CompObjP, */WorkbookP/*:: :Workbook = XLSX.utils.book_new(); */;\n\nvar _data/*:?any*/;\nif(CompObj) /*::CompObjP = */parse_compobj(CompObj);\nif(options.bookProps && !options.bookSheets) WorkbookP = ({}/*:any*/);\nelse/*:: if(cfb instanceof CFBContainer) */ {\n\tvar T = has_buf ? 'buffer' : 'array';\n\tif(WB && WB.content) WorkbookP = parse_workbook(WB.content, options);\n\t/* Quattro Pro 7-8 */\n\telse if((_data=CFB.find(cfb, 'PerfectOffice_MAIN')) && _data.content) WorkbookP = WK_.to_workbook(_data.content, (options.type = T, options));\n\t/* Quattro Pro 9 */\n\telse if((_data=CFB.find(cfb, 'NativeContent_MAIN')) && _data.content) WorkbookP = WK_.to_workbook(_data.content, (options.type = T, options));\n\t/* Works 4 for Mac */\n\telse if((_data=CFB.find(cfb, 'MN0')) && _data.content) throw new Error(\"Unsupported Works 4 for Mac file\");\n\telse throw new Error(\"Cannot find Workbook stream\");\n\tif(options.bookVBA && cfb.FullPaths && CFB.find(cfb, '/_VBA_PROJECT_CUR/VBA/dir')) WorkbookP.vbaraw = make_vba_xls(cfb);\n}\n\nvar props = {};\nif(cfb.FullPaths) parse_xls_props(/*::((*/cfb/*:: :any):CFBContainer)*/, props, options);\n\nWorkbookP.Props = WorkbookP.Custprops = props; /* TODO: split up properties */\nif(options.bookFiles) WorkbookP.cfb = cfb;\n/*WorkbookP.CompObjP = CompObjP; // TODO: storage? */\nreturn WorkbookP;\n}\n\n\nfunction write_xlscfb(wb/*:Workbook*/, opts/*:WriteOpts*/)/*:CFBContainer*/ {\n\tvar o = opts || {};\n\tvar cfb = CFB.utils.cfb_new({root:\"R\"});\n\tvar wbpath = \"/Workbook\";\n\tswitch(o.bookType || \"xls\") {\n\t\tcase \"xls\": o.bookType = \"biff8\";\n\t\t/* falls through */\n\t\tcase \"xla\": if(!o.bookType) o.bookType = \"xla\";\n\t\t/* falls through */\n\t\tcase \"biff8\": wbpath = \"/Workbook\"; o.biff = 8; break;\n\t\tcase \"biff5\": wbpath = \"/Book\"; o.biff = 5; break;\n\t\tdefault: throw new Error(\"invalid type \" + o.bookType + \" for XLS CFB\");\n\t}\n\tCFB.utils.cfb_add(cfb, wbpath, write_biff_buf(wb, o));\n\tif(o.biff == 8 && (wb.Props || wb.Custprops)) write_xls_props(wb, cfb);\n\t// TODO: SI, DSI, CO\n\tif(o.biff == 8 && wb.vbaraw) fill_vba_xls(cfb, CFB.read(wb.vbaraw, {type: typeof wb.vbaraw == \"string\" ? \"binary\" : \"buffer\"}));\n\treturn cfb;\n}\n/* [MS-XLSB] 2.3 Record Enumeration */\nvar XLSBRecordEnum = {\n\t/*::[*/0x0000/*::]*/: { /* n:\"BrtRowHdr\", */ f:parse_BrtRowHdr },\n\t/*::[*/0x0001/*::]*/: { /* n:\"BrtCellBlank\", */ f:parse_BrtCellBlank },\n\t/*::[*/0x0002/*::]*/: { /* n:\"BrtCellRk\", */ f:parse_BrtCellRk },\n\t/*::[*/0x0003/*::]*/: { /* n:\"BrtCellError\", */ f:parse_BrtCellError },\n\t/*::[*/0x0004/*::]*/: { /* n:\"BrtCellBool\", */ f:parse_BrtCellBool },\n\t/*::[*/0x0005/*::]*/: { /* n:\"BrtCellReal\", */ f:parse_BrtCellReal },\n\t/*::[*/0x0006/*::]*/: { /* n:\"BrtCellSt\", */ f:parse_BrtCellSt },\n\t/*::[*/0x0007/*::]*/: { /* n:\"BrtCellIsst\", */ f:parse_BrtCellIsst },\n\t/*::[*/0x0008/*::]*/: { /* n:\"BrtFmlaString\", */ f:parse_BrtFmlaString },\n\t/*::[*/0x0009/*::]*/: { /* n:\"BrtFmlaNum\", */ f:parse_BrtFmlaNum },\n\t/*::[*/0x000A/*::]*/: { /* n:\"BrtFmlaBool\", */ f:parse_BrtFmlaBool },\n\t/*::[*/0x000B/*::]*/: { /* n:\"BrtFmlaError\", */ f:parse_BrtFmlaError },\n\t/*::[*/0x000C/*::]*/: { /* n:\"BrtShortBlank\", */ f:parse_BrtShortBlank },\n\t/*::[*/0x000D/*::]*/: { /* n:\"BrtShortRk\", */ f:parse_BrtShortRk },\n\t/*::[*/0x000E/*::]*/: { /* n:\"BrtShortError\", */ f:parse_BrtShortError },\n\t/*::[*/0x000F/*::]*/: { /* n:\"BrtShortBool\", */ f:parse_BrtShortBool },\n\t/*::[*/0x0010/*::]*/: { /* n:\"BrtShortReal\", */ f:parse_BrtShortReal },\n\t/*::[*/0x0011/*::]*/: { /* n:\"BrtShortSt\", */ f:parse_BrtShortSt },\n\t/*::[*/0x0012/*::]*/: { /* n:\"BrtShortIsst\", */ f:parse_BrtShortIsst },\n\t/*::[*/0x0013/*::]*/: { /* n:\"BrtSSTItem\", */ f:parse_RichStr },\n\t/*::[*/0x0014/*::]*/: { /* n:\"BrtPCDIMissing\" */ },\n\t/*::[*/0x0015/*::]*/: { /* n:\"BrtPCDINumber\" */ },\n\t/*::[*/0x0016/*::]*/: { /* n:\"BrtPCDIBoolean\" */ },\n\t/*::[*/0x0017/*::]*/: { /* n:\"BrtPCDIError\" */ },\n\t/*::[*/0x0018/*::]*/: { /* n:\"BrtPCDIString\" */ },\n\t/*::[*/0x0019/*::]*/: { /* n:\"BrtPCDIDatetime\" */ },\n\t/*::[*/0x001A/*::]*/: { /* n:\"BrtPCDIIndex\" */ },\n\t/*::[*/0x001B/*::]*/: { /* n:\"BrtPCDIAMissing\" */ },\n\t/*::[*/0x001C/*::]*/: { /* n:\"BrtPCDIANumber\" */ },\n\t/*::[*/0x001D/*::]*/: { /* n:\"BrtPCDIABoolean\" */ },\n\t/*::[*/0x001E/*::]*/: { /* n:\"BrtPCDIAError\" */ },\n\t/*::[*/0x001F/*::]*/: { /* n:\"BrtPCDIAString\" */ },\n\t/*::[*/0x0020/*::]*/: { /* n:\"BrtPCDIADatetime\" */ },\n\t/*::[*/0x0021/*::]*/: { /* n:\"BrtPCRRecord\" */ },\n\t/*::[*/0x0022/*::]*/: { /* n:\"BrtPCRRecordDt\" */ },\n\t/*::[*/0x0023/*::]*/: { /* n:\"BrtFRTBegin\", */ T:1 },\n\t/*::[*/0x0024/*::]*/: { /* n:\"BrtFRTEnd\", */ T:-1 },\n\t/*::[*/0x0025/*::]*/: { /* n:\"BrtACBegin\", */ T:1 },\n\t/*::[*/0x0026/*::]*/: { /* n:\"BrtACEnd\", */ T:-1 },\n\t/*::[*/0x0027/*::]*/: { /* n:\"BrtName\", */ f:parse_BrtName },\n\t/*::[*/0x0028/*::]*/: { /* n:\"BrtIndexRowBlock\" */ },\n\t/*::[*/0x002A/*::]*/: { /* n:\"BrtIndexBlock\" */ },\n\t/*::[*/0x002B/*::]*/: { /* n:\"BrtFont\", */ f:parse_BrtFont },\n\t/*::[*/0x002C/*::]*/: { /* n:\"BrtFmt\", */ f:parse_BrtFmt },\n\t/*::[*/0x002D/*::]*/: { /* n:\"BrtFill\", */ f:parse_BrtFill },\n\t/*::[*/0x002E/*::]*/: { /* n:\"BrtBorder\", */ f:parse_BrtBorder },\n\t/*::[*/0x002F/*::]*/: { /* n:\"BrtXF\", */ f:parse_BrtXF },\n\t/*::[*/0x0030/*::]*/: { /* n:\"BrtStyle\" */ },\n\t/*::[*/0x0031/*::]*/: { /* n:\"BrtCellMeta\", */ f:parse_Int32LE },\n\t/*::[*/0x0032/*::]*/: { /* n:\"BrtValueMeta\" */ },\n\t/*::[*/0x0033/*::]*/: { /* n:\"BrtMdb\" */ f:parse_BrtMdb },\n\t/*::[*/0x0034/*::]*/: { /* n:\"BrtBeginFmd\", */ T:1 },\n\t/*::[*/0x0035/*::]*/: { /* n:\"BrtEndFmd\", */ T:-1 },\n\t/*::[*/0x0036/*::]*/: { /* n:\"BrtBeginMdx\", */ T:1 },\n\t/*::[*/0x0037/*::]*/: { /* n:\"BrtEndMdx\", */ T:-1 },\n\t/*::[*/0x0038/*::]*/: { /* n:\"BrtBeginMdxTuple\", */ T:1 },\n\t/*::[*/0x0039/*::]*/: { /* n:\"BrtEndMdxTuple\", */ T:-1 },\n\t/*::[*/0x003A/*::]*/: { /* n:\"BrtMdxMbrIstr\" */ },\n\t/*::[*/0x003B/*::]*/: { /* n:\"BrtStr\" */ },\n\t/*::[*/0x003C/*::]*/: { /* n:\"BrtColInfo\", */ f:parse_ColInfo },\n\t/*::[*/0x003E/*::]*/: { /* n:\"BrtCellRString\", */ f:parse_BrtCellRString },\n\t/*::[*/0x003F/*::]*/: { /* n:\"BrtCalcChainItem$\", */ f:parse_BrtCalcChainItem$ },\n\t/*::[*/0x0040/*::]*/: { /* n:\"BrtDVal\", */ f:parse_BrtDVal },\n\t/*::[*/0x0041/*::]*/: { /* n:\"BrtSxvcellNum\" */ },\n\t/*::[*/0x0042/*::]*/: { /* n:\"BrtSxvcellStr\" */ },\n\t/*::[*/0x0043/*::]*/: { /* n:\"BrtSxvcellBool\" */ },\n\t/*::[*/0x0044/*::]*/: { /* n:\"BrtSxvcellErr\" */ },\n\t/*::[*/0x0045/*::]*/: { /* n:\"BrtSxvcellDate\" */ },\n\t/*::[*/0x0046/*::]*/: { /* n:\"BrtSxvcellNil\" */ },\n\t/*::[*/0x0080/*::]*/: { /* n:\"BrtFileVersion\" */ },\n\t/*::[*/0x0081/*::]*/: { /* n:\"BrtBeginSheet\", */ T:1 },\n\t/*::[*/0x0082/*::]*/: { /* n:\"BrtEndSheet\", */ T:-1 },\n\t/*::[*/0x0083/*::]*/: { /* n:\"BrtBeginBook\", */ T:1, f:parsenoop, p:0 },\n\t/*::[*/0x0084/*::]*/: { /* n:\"BrtEndBook\", */ T:-1 },\n\t/*::[*/0x0085/*::]*/: { /* n:\"BrtBeginWsViews\", */ T:1 },\n\t/*::[*/0x0086/*::]*/: { /* n:\"BrtEndWsViews\", */ T:-1 },\n\t/*::[*/0x0087/*::]*/: { /* n:\"BrtBeginBookViews\", */ T:1 },\n\t/*::[*/0x0088/*::]*/: { /* n:\"BrtEndBookViews\", */ T:-1 },\n\t/*::[*/0x0089/*::]*/: { /* n:\"BrtBeginWsView\", */ T:1, f:parse_BrtBeginWsView },\n\t/*::[*/0x008A/*::]*/: { /* n:\"BrtEndWsView\", */ T:-1 },\n\t/*::[*/0x008B/*::]*/: { /* n:\"BrtBeginCsViews\", */ T:1 },\n\t/*::[*/0x008C/*::]*/: { /* n:\"BrtEndCsViews\", */ T:-1 },\n\t/*::[*/0x008D/*::]*/: { /* n:\"BrtBeginCsView\", */ T:1 },\n\t/*::[*/0x008E/*::]*/: { /* n:\"BrtEndCsView\", */ T:-1 },\n\t/*::[*/0x008F/*::]*/: { /* n:\"BrtBeginBundleShs\", */ T:1 },\n\t/*::[*/0x0090/*::]*/: { /* n:\"BrtEndBundleShs\", */ T:-1 },\n\t/*::[*/0x0091/*::]*/: { /* n:\"BrtBeginSheetData\", */ T:1 },\n\t/*::[*/0x0092/*::]*/: { /* n:\"BrtEndSheetData\", */ T:-1 },\n\t/*::[*/0x0093/*::]*/: { /* n:\"BrtWsProp\", */ f:parse_BrtWsProp },\n\t/*::[*/0x0094/*::]*/: { /* n:\"BrtWsDim\", */ f:parse_BrtWsDim, p:16 },\n\t/*::[*/0x0097/*::]*/: { /* n:\"BrtPane\", */ f:parse_BrtPane },\n\t/*::[*/0x0098/*::]*/: { /* n:\"BrtSel\" */ },\n\t/*::[*/0x0099/*::]*/: { /* n:\"BrtWbProp\", */ f:parse_BrtWbProp },\n\t/*::[*/0x009A/*::]*/: { /* n:\"BrtWbFactoid\" */ },\n\t/*::[*/0x009B/*::]*/: { /* n:\"BrtFileRecover\" */ },\n\t/*::[*/0x009C/*::]*/: { /* n:\"BrtBundleSh\", */ f:parse_BrtBundleSh },\n\t/*::[*/0x009D/*::]*/: { /* n:\"BrtCalcProp\" */ },\n\t/*::[*/0x009E/*::]*/: { /* n:\"BrtBookView\" */ },\n\t/*::[*/0x009F/*::]*/: { /* n:\"BrtBeginSst\", */ T:1, f:parse_BrtBeginSst },\n\t/*::[*/0x00A0/*::]*/: { /* n:\"BrtEndSst\", */ T:-1 },\n\t/*::[*/0x00A1/*::]*/: { /* n:\"BrtBeginAFilter\", */ T:1, f:parse_UncheckedRfX },\n\t/*::[*/0x00A2/*::]*/: { /* n:\"BrtEndAFilter\", */ T:-1 },\n\t/*::[*/0x00A3/*::]*/: { /* n:\"BrtBeginFilterColumn\", */ T:1 },\n\t/*::[*/0x00A4/*::]*/: { /* n:\"BrtEndFilterColumn\", */ T:-1 },\n\t/*::[*/0x00A5/*::]*/: { /* n:\"BrtBeginFilters\", */ T:1 },\n\t/*::[*/0x00A6/*::]*/: { /* n:\"BrtEndFilters\", */ T:-1 },\n\t/*::[*/0x00A7/*::]*/: { /* n:\"BrtFilter\" */ },\n\t/*::[*/0x00A8/*::]*/: { /* n:\"BrtColorFilter\" */ },\n\t/*::[*/0x00A9/*::]*/: { /* n:\"BrtIconFilter\" */ },\n\t/*::[*/0x00AA/*::]*/: { /* n:\"BrtTop10Filter\" */ },\n\t/*::[*/0x00AB/*::]*/: { /* n:\"BrtDynamicFilter\" */ },\n\t/*::[*/0x00AC/*::]*/: { /* n:\"BrtBeginCustomFilters\", */ T:1 },\n\t/*::[*/0x00AD/*::]*/: { /* n:\"BrtEndCustomFilters\", */ T:-1 },\n\t/*::[*/0x00AE/*::]*/: { /* n:\"BrtCustomFilter\" */ },\n\t/*::[*/0x00AF/*::]*/: { /* n:\"BrtAFilterDateGroupItem\" */ },\n\t/*::[*/0x00B0/*::]*/: { /* n:\"BrtMergeCell\", */ f:parse_BrtMergeCell },\n\t/*::[*/0x00B1/*::]*/: { /* n:\"BrtBeginMergeCells\", */ T:1 },\n\t/*::[*/0x00B2/*::]*/: { /* n:\"BrtEndMergeCells\", */ T:-1 },\n\t/*::[*/0x00B3/*::]*/: { /* n:\"BrtBeginPivotCacheDef\", */ T:1 },\n\t/*::[*/0x00B4/*::]*/: { /* n:\"BrtEndPivotCacheDef\", */ T:-1 },\n\t/*::[*/0x00B5/*::]*/: { /* n:\"BrtBeginPCDFields\", */ T:1 },\n\t/*::[*/0x00B6/*::]*/: { /* n:\"BrtEndPCDFields\", */ T:-1 },\n\t/*::[*/0x00B7/*::]*/: { /* n:\"BrtBeginPCDField\", */ T:1 },\n\t/*::[*/0x00B8/*::]*/: { /* n:\"BrtEndPCDField\", */ T:-1 },\n\t/*::[*/0x00B9/*::]*/: { /* n:\"BrtBeginPCDSource\", */ T:1 },\n\t/*::[*/0x00BA/*::]*/: { /* n:\"BrtEndPCDSource\", */ T:-1 },\n\t/*::[*/0x00BB/*::]*/: { /* n:\"BrtBeginPCDSRange\", */ T:1 },\n\t/*::[*/0x00BC/*::]*/: { /* n:\"BrtEndPCDSRange\", */ T:-1 },\n\t/*::[*/0x00BD/*::]*/: { /* n:\"BrtBeginPCDFAtbl\", */ T:1 },\n\t/*::[*/0x00BE/*::]*/: { /* n:\"BrtEndPCDFAtbl\", */ T:-1 },\n\t/*::[*/0x00BF/*::]*/: { /* n:\"BrtBeginPCDIRun\", */ T:1 },\n\t/*::[*/0x00C0/*::]*/: { /* n:\"BrtEndPCDIRun\", */ T:-1 },\n\t/*::[*/0x00C1/*::]*/: { /* n:\"BrtBeginPivotCacheRecords\", */ T:1 },\n\t/*::[*/0x00C2/*::]*/: { /* n:\"BrtEndPivotCacheRecords\", */ T:-1 },\n\t/*::[*/0x00C3/*::]*/: { /* n:\"BrtBeginPCDHierarchies\", */ T:1 },\n\t/*::[*/0x00C4/*::]*/: { /* n:\"BrtEndPCDHierarchies\", */ T:-1 },\n\t/*::[*/0x00C5/*::]*/: { /* n:\"BrtBeginPCDHierarchy\", */ T:1 },\n\t/*::[*/0x00C6/*::]*/: { /* n:\"BrtEndPCDHierarchy\", */ T:-1 },\n\t/*::[*/0x00C7/*::]*/: { /* n:\"BrtBeginPCDHFieldsUsage\", */ T:1 },\n\t/*::[*/0x00C8/*::]*/: { /* n:\"BrtEndPCDHFieldsUsage\", */ T:-1 },\n\t/*::[*/0x00C9/*::]*/: { /* n:\"BrtBeginExtConnection\", */ T:1 },\n\t/*::[*/0x00CA/*::]*/: { /* n:\"BrtEndExtConnection\", */ T:-1 },\n\t/*::[*/0x00CB/*::]*/: { /* n:\"BrtBeginECDbProps\", */ T:1 },\n\t/*::[*/0x00CC/*::]*/: { /* n:\"BrtEndECDbProps\", */ T:-1 },\n\t/*::[*/0x00CD/*::]*/: { /* n:\"BrtBeginECOlapProps\", */ T:1 },\n\t/*::[*/0x00CE/*::]*/: { /* n:\"BrtEndECOlapProps\", */ T:-1 },\n\t/*::[*/0x00CF/*::]*/: { /* n:\"BrtBeginPCDSConsol\", */ T:1 },\n\t/*::[*/0x00D0/*::]*/: { /* n:\"BrtEndPCDSConsol\", */ T:-1 },\n\t/*::[*/0x00D1/*::]*/: { /* n:\"BrtBeginPCDSCPages\", */ T:1 },\n\t/*::[*/0x00D2/*::]*/: { /* n:\"BrtEndPCDSCPages\", */ T:-1 },\n\t/*::[*/0x00D3/*::]*/: { /* n:\"BrtBeginPCDSCPage\", */ T:1 },\n\t/*::[*/0x00D4/*::]*/: { /* n:\"BrtEndPCDSCPage\", */ T:-1 },\n\t/*::[*/0x00D5/*::]*/: { /* n:\"BrtBeginPCDSCPItem\", */ T:1 },\n\t/*::[*/0x00D6/*::]*/: { /* n:\"BrtEndPCDSCPItem\", */ T:-1 },\n\t/*::[*/0x00D7/*::]*/: { /* n:\"BrtBeginPCDSCSets\", */ T:1 },\n\t/*::[*/0x00D8/*::]*/: { /* n:\"BrtEndPCDSCSets\", */ T:-1 },\n\t/*::[*/0x00D9/*::]*/: { /* n:\"BrtBeginPCDSCSet\", */ T:1 },\n\t/*::[*/0x00DA/*::]*/: { /* n:\"BrtEndPCDSCSet\", */ T:-1 },\n\t/*::[*/0x00DB/*::]*/: { /* n:\"BrtBeginPCDFGroup\", */ T:1 },\n\t/*::[*/0x00DC/*::]*/: { /* n:\"BrtEndPCDFGroup\", */ T:-1 },\n\t/*::[*/0x00DD/*::]*/: { /* n:\"BrtBeginPCDFGItems\", */ T:1 },\n\t/*::[*/0x00DE/*::]*/: { /* n:\"BrtEndPCDFGItems\", */ T:-1 },\n\t/*::[*/0x00DF/*::]*/: { /* n:\"BrtBeginPCDFGRange\", */ T:1 },\n\t/*::[*/0x00E0/*::]*/: { /* n:\"BrtEndPCDFGRange\", */ T:-1 },\n\t/*::[*/0x00E1/*::]*/: { /* n:\"BrtBeginPCDFGDiscrete\", */ T:1 },\n\t/*::[*/0x00E2/*::]*/: { /* n:\"BrtEndPCDFGDiscrete\", */ T:-1 },\n\t/*::[*/0x00E3/*::]*/: { /* n:\"BrtBeginPCDSDTupleCache\", */ T:1 },\n\t/*::[*/0x00E4/*::]*/: { /* n:\"BrtEndPCDSDTupleCache\", */ T:-1 },\n\t/*::[*/0x00E5/*::]*/: { /* n:\"BrtBeginPCDSDTCEntries\", */ T:1 },\n\t/*::[*/0x00E6/*::]*/: { /* n:\"BrtEndPCDSDTCEntries\", */ T:-1 },\n\t/*::[*/0x00E7/*::]*/: { /* n:\"BrtBeginPCDSDTCEMembers\", */ T:1 },\n\t/*::[*/0x00E8/*::]*/: { /* n:\"BrtEndPCDSDTCEMembers\", */ T:-1 },\n\t/*::[*/0x00E9/*::]*/: { /* n:\"BrtBeginPCDSDTCEMember\", */ T:1 },\n\t/*::[*/0x00EA/*::]*/: { /* n:\"BrtEndPCDSDTCEMember\", */ T:-1 },\n\t/*::[*/0x00EB/*::]*/: { /* n:\"BrtBeginPCDSDTCQueries\", */ T:1 },\n\t/*::[*/0x00EC/*::]*/: { /* n:\"BrtEndPCDSDTCQueries\", */ T:-1 },\n\t/*::[*/0x00ED/*::]*/: { /* n:\"BrtBeginPCDSDTCQuery\", */ T:1 },\n\t/*::[*/0x00EE/*::]*/: { /* n:\"BrtEndPCDSDTCQuery\", */ T:-1 },\n\t/*::[*/0x00EF/*::]*/: { /* n:\"BrtBeginPCDSDTCSets\", */ T:1 },\n\t/*::[*/0x00F0/*::]*/: { /* n:\"BrtEndPCDSDTCSets\", */ T:-1 },\n\t/*::[*/0x00F1/*::]*/: { /* n:\"BrtBeginPCDSDTCSet\", */ T:1 },\n\t/*::[*/0x00F2/*::]*/: { /* n:\"BrtEndPCDSDTCSet\", */ T:-1 },\n\t/*::[*/0x00F3/*::]*/: { /* n:\"BrtBeginPCDCalcItems\", */ T:1 },\n\t/*::[*/0x00F4/*::]*/: { /* n:\"BrtEndPCDCalcItems\", */ T:-1 },\n\t/*::[*/0x00F5/*::]*/: { /* n:\"BrtBeginPCDCalcItem\", */ T:1 },\n\t/*::[*/0x00F6/*::]*/: { /* n:\"BrtEndPCDCalcItem\", */ T:-1 },\n\t/*::[*/0x00F7/*::]*/: { /* n:\"BrtBeginPRule\", */ T:1 },\n\t/*::[*/0x00F8/*::]*/: { /* n:\"BrtEndPRule\", */ T:-1 },\n\t/*::[*/0x00F9/*::]*/: { /* n:\"BrtBeginPRFilters\", */ T:1 },\n\t/*::[*/0x00FA/*::]*/: { /* n:\"BrtEndPRFilters\", */ T:-1 },\n\t/*::[*/0x00FB/*::]*/: { /* n:\"BrtBeginPRFilter\", */ T:1 },\n\t/*::[*/0x00FC/*::]*/: { /* n:\"BrtEndPRFilter\", */ T:-1 },\n\t/*::[*/0x00FD/*::]*/: { /* n:\"BrtBeginPNames\", */ T:1 },\n\t/*::[*/0x00FE/*::]*/: { /* n:\"BrtEndPNames\", */ T:-1 },\n\t/*::[*/0x00FF/*::]*/: { /* n:\"BrtBeginPName\", */ T:1 },\n\t/*::[*/0x0100/*::]*/: { /* n:\"BrtEndPName\", */ T:-1 },\n\t/*::[*/0x0101/*::]*/: { /* n:\"BrtBeginPNPairs\", */ T:1 },\n\t/*::[*/0x0102/*::]*/: { /* n:\"BrtEndPNPairs\", */ T:-1 },\n\t/*::[*/0x0103/*::]*/: { /* n:\"BrtBeginPNPair\", */ T:1 },\n\t/*::[*/0x0104/*::]*/: { /* n:\"BrtEndPNPair\", */ T:-1 },\n\t/*::[*/0x0105/*::]*/: { /* n:\"BrtBeginECWebProps\", */ T:1 },\n\t/*::[*/0x0106/*::]*/: { /* n:\"BrtEndECWebProps\", */ T:-1 },\n\t/*::[*/0x0107/*::]*/: { /* n:\"BrtBeginEcWpTables\", */ T:1 },\n\t/*::[*/0x0108/*::]*/: { /* n:\"BrtEndECWPTables\", */ T:-1 },\n\t/*::[*/0x0109/*::]*/: { /* n:\"BrtBeginECParams\", */ T:1 },\n\t/*::[*/0x010A/*::]*/: { /* n:\"BrtEndECParams\", */ T:-1 },\n\t/*::[*/0x010B/*::]*/: { /* n:\"BrtBeginECParam\", */ T:1 },\n\t/*::[*/0x010C/*::]*/: { /* n:\"BrtEndECParam\", */ T:-1 },\n\t/*::[*/0x010D/*::]*/: { /* n:\"BrtBeginPCDKPIs\", */ T:1 },\n\t/*::[*/0x010E/*::]*/: { /* n:\"BrtEndPCDKPIs\", */ T:-1 },\n\t/*::[*/0x010F/*::]*/: { /* n:\"BrtBeginPCDKPI\", */ T:1 },\n\t/*::[*/0x0110/*::]*/: { /* n:\"BrtEndPCDKPI\", */ T:-1 },\n\t/*::[*/0x0111/*::]*/: { /* n:\"BrtBeginDims\", */ T:1 },\n\t/*::[*/0x0112/*::]*/: { /* n:\"BrtEndDims\", */ T:-1 },\n\t/*::[*/0x0113/*::]*/: { /* n:\"BrtBeginDim\", */ T:1 },\n\t/*::[*/0x0114/*::]*/: { /* n:\"BrtEndDim\", */ T:-1 },\n\t/*::[*/0x0115/*::]*/: { /* n:\"BrtIndexPartEnd\" */ },\n\t/*::[*/0x0116/*::]*/: { /* n:\"BrtBeginStyleSheet\", */ T:1 },\n\t/*::[*/0x0117/*::]*/: { /* n:\"BrtEndStyleSheet\", */ T:-1 },\n\t/*::[*/0x0118/*::]*/: { /* n:\"BrtBeginSXView\", */ T:1 },\n\t/*::[*/0x0119/*::]*/: { /* n:\"BrtEndSXVI\", */ T:-1 },\n\t/*::[*/0x011A/*::]*/: { /* n:\"BrtBeginSXVI\", */ T:1 },\n\t/*::[*/0x011B/*::]*/: { /* n:\"BrtBeginSXVIs\", */ T:1 },\n\t/*::[*/0x011C/*::]*/: { /* n:\"BrtEndSXVIs\", */ T:-1 },\n\t/*::[*/0x011D/*::]*/: { /* n:\"BrtBeginSXVD\", */ T:1 },\n\t/*::[*/0x011E/*::]*/: { /* n:\"BrtEndSXVD\", */ T:-1 },\n\t/*::[*/0x011F/*::]*/: { /* n:\"BrtBeginSXVDs\", */ T:1 },\n\t/*::[*/0x0120/*::]*/: { /* n:\"BrtEndSXVDs\", */ T:-1 },\n\t/*::[*/0x0121/*::]*/: { /* n:\"BrtBeginSXPI\", */ T:1 },\n\t/*::[*/0x0122/*::]*/: { /* n:\"BrtEndSXPI\", */ T:-1 },\n\t/*::[*/0x0123/*::]*/: { /* n:\"BrtBeginSXPIs\", */ T:1 },\n\t/*::[*/0x0124/*::]*/: { /* n:\"BrtEndSXPIs\", */ T:-1 },\n\t/*::[*/0x0125/*::]*/: { /* n:\"BrtBeginSXDI\", */ T:1 },\n\t/*::[*/0x0126/*::]*/: { /* n:\"BrtEndSXDI\", */ T:-1 },\n\t/*::[*/0x0127/*::]*/: { /* n:\"BrtBeginSXDIs\", */ T:1 },\n\t/*::[*/0x0128/*::]*/: { /* n:\"BrtEndSXDIs\", */ T:-1 },\n\t/*::[*/0x0129/*::]*/: { /* n:\"BrtBeginSXLI\", */ T:1 },\n\t/*::[*/0x012A/*::]*/: { /* n:\"BrtEndSXLI\", */ T:-1 },\n\t/*::[*/0x012B/*::]*/: { /* n:\"BrtBeginSXLIRws\", */ T:1 },\n\t/*::[*/0x012C/*::]*/: { /* n:\"BrtEndSXLIRws\", */ T:-1 },\n\t/*::[*/0x012D/*::]*/: { /* n:\"BrtBeginSXLICols\", */ T:1 },\n\t/*::[*/0x012E/*::]*/: { /* n:\"BrtEndSXLICols\", */ T:-1 },\n\t/*::[*/0x012F/*::]*/: { /* n:\"BrtBeginSXFormat\", */ T:1 },\n\t/*::[*/0x0130/*::]*/: { /* n:\"BrtEndSXFormat\", */ T:-1 },\n\t/*::[*/0x0131/*::]*/: { /* n:\"BrtBeginSXFormats\", */ T:1 },\n\t/*::[*/0x0132/*::]*/: { /* n:\"BrtEndSxFormats\", */ T:-1 },\n\t/*::[*/0x0133/*::]*/: { /* n:\"BrtBeginSxSelect\", */ T:1 },\n\t/*::[*/0x0134/*::]*/: { /* n:\"BrtEndSxSelect\", */ T:-1 },\n\t/*::[*/0x0135/*::]*/: { /* n:\"BrtBeginISXVDRws\", */ T:1 },\n\t/*::[*/0x0136/*::]*/: { /* n:\"BrtEndISXVDRws\", */ T:-1 },\n\t/*::[*/0x0137/*::]*/: { /* n:\"BrtBeginISXVDCols\", */ T:1 },\n\t/*::[*/0x0138/*::]*/: { /* n:\"BrtEndISXVDCols\", */ T:-1 },\n\t/*::[*/0x0139/*::]*/: { /* n:\"BrtEndSXLocation\", */ T:-1 },\n\t/*::[*/0x013A/*::]*/: { /* n:\"BrtBeginSXLocation\", */ T:1 },\n\t/*::[*/0x013B/*::]*/: { /* n:\"BrtEndSXView\", */ T:-1 },\n\t/*::[*/0x013C/*::]*/: { /* n:\"BrtBeginSXTHs\", */ T:1 },\n\t/*::[*/0x013D/*::]*/: { /* n:\"BrtEndSXTHs\", */ T:-1 },\n\t/*::[*/0x013E/*::]*/: { /* n:\"BrtBeginSXTH\", */ T:1 },\n\t/*::[*/0x013F/*::]*/: { /* n:\"BrtEndSXTH\", */ T:-1 },\n\t/*::[*/0x0140/*::]*/: { /* n:\"BrtBeginISXTHRws\", */ T:1 },\n\t/*::[*/0x0141/*::]*/: { /* n:\"BrtEndISXTHRws\", */ T:-1 },\n\t/*::[*/0x0142/*::]*/: { /* n:\"BrtBeginISXTHCols\", */ T:1 },\n\t/*::[*/0x0143/*::]*/: { /* n:\"BrtEndISXTHCols\", */ T:-1 },\n\t/*::[*/0x0144/*::]*/: { /* n:\"BrtBeginSXTDMPS\", */ T:1 },\n\t/*::[*/0x0145/*::]*/: { /* n:\"BrtEndSXTDMPs\", */ T:-1 },\n\t/*::[*/0x0146/*::]*/: { /* n:\"BrtBeginSXTDMP\", */ T:1 },\n\t/*::[*/0x0147/*::]*/: { /* n:\"BrtEndSXTDMP\", */ T:-1 },\n\t/*::[*/0x0148/*::]*/: { /* n:\"BrtBeginSXTHItems\", */ T:1 },\n\t/*::[*/0x0149/*::]*/: { /* n:\"BrtEndSXTHItems\", */ T:-1 },\n\t/*::[*/0x014A/*::]*/: { /* n:\"BrtBeginSXTHItem\", */ T:1 },\n\t/*::[*/0x014B/*::]*/: { /* n:\"BrtEndSXTHItem\", */ T:-1 },\n\t/*::[*/0x014C/*::]*/: { /* n:\"BrtBeginMetadata\", */ T:1 },\n\t/*::[*/0x014D/*::]*/: { /* n:\"BrtEndMetadata\", */ T:-1 },\n\t/*::[*/0x014E/*::]*/: { /* n:\"BrtBeginEsmdtinfo\", */ T:1 },\n\t/*::[*/0x014F/*::]*/: { /* n:\"BrtMdtinfo\", */ f:parse_BrtMdtinfo },\n\t/*::[*/0x0150/*::]*/: { /* n:\"BrtEndEsmdtinfo\", */ T:-1 },\n\t/*::[*/0x0151/*::]*/: { /* n:\"BrtBeginEsmdb\", */ f:parse_BrtBeginEsmdb, T:1 },\n\t/*::[*/0x0152/*::]*/: { /* n:\"BrtEndEsmdb\", */ T:-1 },\n\t/*::[*/0x0153/*::]*/: { /* n:\"BrtBeginEsfmd\", */ T:1 },\n\t/*::[*/0x0154/*::]*/: { /* n:\"BrtEndEsfmd\", */ T:-1 },\n\t/*::[*/0x0155/*::]*/: { /* n:\"BrtBeginSingleCells\", */ T:1 },\n\t/*::[*/0x0156/*::]*/: { /* n:\"BrtEndSingleCells\", */ T:-1 },\n\t/*::[*/0x0157/*::]*/: { /* n:\"BrtBeginList\", */ T:1 },\n\t/*::[*/0x0158/*::]*/: { /* n:\"BrtEndList\", */ T:-1 },\n\t/*::[*/0x0159/*::]*/: { /* n:\"BrtBeginListCols\", */ T:1 },\n\t/*::[*/0x015A/*::]*/: { /* n:\"BrtEndListCols\", */ T:-1 },\n\t/*::[*/0x015B/*::]*/: { /* n:\"BrtBeginListCol\", */ T:1 },\n\t/*::[*/0x015C/*::]*/: { /* n:\"BrtEndListCol\", */ T:-1 },\n\t/*::[*/0x015D/*::]*/: { /* n:\"BrtBeginListXmlCPr\", */ T:1 },\n\t/*::[*/0x015E/*::]*/: { /* n:\"BrtEndListXmlCPr\", */ T:-1 },\n\t/*::[*/0x015F/*::]*/: { /* n:\"BrtListCCFmla\" */ },\n\t/*::[*/0x0160/*::]*/: { /* n:\"BrtListTrFmla\" */ },\n\t/*::[*/0x0161/*::]*/: { /* n:\"BrtBeginExternals\", */ T:1 },\n\t/*::[*/0x0162/*::]*/: { /* n:\"BrtEndExternals\", */ T:-1 },\n\t/*::[*/0x0163/*::]*/: { /* n:\"BrtSupBookSrc\", */ f:parse_RelID},\n\t/*::[*/0x0165/*::]*/: { /* n:\"BrtSupSelf\" */ },\n\t/*::[*/0x0166/*::]*/: { /* n:\"BrtSupSame\" */ },\n\t/*::[*/0x0167/*::]*/: { /* n:\"BrtSupTabs\" */ },\n\t/*::[*/0x0168/*::]*/: { /* n:\"BrtBeginSupBook\", */ T:1 },\n\t/*::[*/0x0169/*::]*/: { /* n:\"BrtPlaceholderName\" */ },\n\t/*::[*/0x016A/*::]*/: { /* n:\"BrtExternSheet\", */ f:parse_ExternSheet },\n\t/*::[*/0x016B/*::]*/: { /* n:\"BrtExternTableStart\" */ },\n\t/*::[*/0x016C/*::]*/: { /* n:\"BrtExternTableEnd\" */ },\n\t/*::[*/0x016E/*::]*/: { /* n:\"BrtExternRowHdr\" */ },\n\t/*::[*/0x016F/*::]*/: { /* n:\"BrtExternCellBlank\" */ },\n\t/*::[*/0x0170/*::]*/: { /* n:\"BrtExternCellReal\" */ },\n\t/*::[*/0x0171/*::]*/: { /* n:\"BrtExternCellBool\" */ },\n\t/*::[*/0x0172/*::]*/: { /* n:\"BrtExternCellError\" */ },\n\t/*::[*/0x0173/*::]*/: { /* n:\"BrtExternCellString\" */ },\n\t/*::[*/0x0174/*::]*/: { /* n:\"BrtBeginEsmdx\", */ T:1 },\n\t/*::[*/0x0175/*::]*/: { /* n:\"BrtEndEsmdx\", */ T:-1 },\n\t/*::[*/0x0176/*::]*/: { /* n:\"BrtBeginMdxSet\", */ T:1 },\n\t/*::[*/0x0177/*::]*/: { /* n:\"BrtEndMdxSet\", */ T:-1 },\n\t/*::[*/0x0178/*::]*/: { /* n:\"BrtBeginMdxMbrProp\", */ T:1 },\n\t/*::[*/0x0179/*::]*/: { /* n:\"BrtEndMdxMbrProp\", */ T:-1 },\n\t/*::[*/0x017A/*::]*/: { /* n:\"BrtBeginMdxKPI\", */ T:1 },\n\t/*::[*/0x017B/*::]*/: { /* n:\"BrtEndMdxKPI\", */ T:-1 },\n\t/*::[*/0x017C/*::]*/: { /* n:\"BrtBeginEsstr\", */ T:1 },\n\t/*::[*/0x017D/*::]*/: { /* n:\"BrtEndEsstr\", */ T:-1 },\n\t/*::[*/0x017E/*::]*/: { /* n:\"BrtBeginPRFItem\", */ T:1 },\n\t/*::[*/0x017F/*::]*/: { /* n:\"BrtEndPRFItem\", */ T:-1 },\n\t/*::[*/0x0180/*::]*/: { /* n:\"BrtBeginPivotCacheIDs\", */ T:1 },\n\t/*::[*/0x0181/*::]*/: { /* n:\"BrtEndPivotCacheIDs\", */ T:-1 },\n\t/*::[*/0x0182/*::]*/: { /* n:\"BrtBeginPivotCacheID\", */ T:1 },\n\t/*::[*/0x0183/*::]*/: { /* n:\"BrtEndPivotCacheID\", */ T:-1 },\n\t/*::[*/0x0184/*::]*/: { /* n:\"BrtBeginISXVIs\", */ T:1 },\n\t/*::[*/0x0185/*::]*/: { /* n:\"BrtEndISXVIs\", */ T:-1 },\n\t/*::[*/0x0186/*::]*/: { /* n:\"BrtBeginColInfos\", */ T:1 },\n\t/*::[*/0x0187/*::]*/: { /* n:\"BrtEndColInfos\", */ T:-1 },\n\t/*::[*/0x0188/*::]*/: { /* n:\"BrtBeginRwBrk\", */ T:1 },\n\t/*::[*/0x0189/*::]*/: { /* n:\"BrtEndRwBrk\", */ T:-1 },\n\t/*::[*/0x018A/*::]*/: { /* n:\"BrtBeginColBrk\", */ T:1 },\n\t/*::[*/0x018B/*::]*/: { /* n:\"BrtEndColBrk\", */ T:-1 },\n\t/*::[*/0x018C/*::]*/: { /* n:\"BrtBrk\" */ },\n\t/*::[*/0x018D/*::]*/: { /* n:\"BrtUserBookView\" */ },\n\t/*::[*/0x018E/*::]*/: { /* n:\"BrtInfo\" */ },\n\t/*::[*/0x018F/*::]*/: { /* n:\"BrtCUsr\" */ },\n\t/*::[*/0x0190/*::]*/: { /* n:\"BrtUsr\" */ },\n\t/*::[*/0x0191/*::]*/: { /* n:\"BrtBeginUsers\", */ T:1 },\n\t/*::[*/0x0193/*::]*/: { /* n:\"BrtEOF\" */ },\n\t/*::[*/0x0194/*::]*/: { /* n:\"BrtUCR\" */ },\n\t/*::[*/0x0195/*::]*/: { /* n:\"BrtRRInsDel\" */ },\n\t/*::[*/0x0196/*::]*/: { /* n:\"BrtRREndInsDel\" */ },\n\t/*::[*/0x0197/*::]*/: { /* n:\"BrtRRMove\" */ },\n\t/*::[*/0x0198/*::]*/: { /* n:\"BrtRREndMove\" */ },\n\t/*::[*/0x0199/*::]*/: { /* n:\"BrtRRChgCell\" */ },\n\t/*::[*/0x019A/*::]*/: { /* n:\"BrtRREndChgCell\" */ },\n\t/*::[*/0x019B/*::]*/: { /* n:\"BrtRRHeader\" */ },\n\t/*::[*/0x019C/*::]*/: { /* n:\"BrtRRUserView\" */ },\n\t/*::[*/0x019D/*::]*/: { /* n:\"BrtRRRenSheet\" */ },\n\t/*::[*/0x019E/*::]*/: { /* n:\"BrtRRInsertSh\" */ },\n\t/*::[*/0x019F/*::]*/: { /* n:\"BrtRRDefName\" */ },\n\t/*::[*/0x01A0/*::]*/: { /* n:\"BrtRRNote\" */ },\n\t/*::[*/0x01A1/*::]*/: { /* n:\"BrtRRConflict\" */ },\n\t/*::[*/0x01A2/*::]*/: { /* n:\"BrtRRTQSIF\" */ },\n\t/*::[*/0x01A3/*::]*/: { /* n:\"BrtRRFormat\" */ },\n\t/*::[*/0x01A4/*::]*/: { /* n:\"BrtRREndFormat\" */ },\n\t/*::[*/0x01A5/*::]*/: { /* n:\"BrtRRAutoFmt\" */ },\n\t/*::[*/0x01A6/*::]*/: { /* n:\"BrtBeginUserShViews\", */ T:1 },\n\t/*::[*/0x01A7/*::]*/: { /* n:\"BrtBeginUserShView\", */ T:1 },\n\t/*::[*/0x01A8/*::]*/: { /* n:\"BrtEndUserShView\", */ T:-1 },\n\t/*::[*/0x01A9/*::]*/: { /* n:\"BrtEndUserShViews\", */ T:-1 },\n\t/*::[*/0x01AA/*::]*/: { /* n:\"BrtArrFmla\", */ f:parse_BrtArrFmla },\n\t/*::[*/0x01AB/*::]*/: { /* n:\"BrtShrFmla\", */ f:parse_BrtShrFmla },\n\t/*::[*/0x01AC/*::]*/: { /* n:\"BrtTable\" */ },\n\t/*::[*/0x01AD/*::]*/: { /* n:\"BrtBeginExtConnections\", */ T:1 },\n\t/*::[*/0x01AE/*::]*/: { /* n:\"BrtEndExtConnections\", */ T:-1 },\n\t/*::[*/0x01AF/*::]*/: { /* n:\"BrtBeginPCDCalcMems\", */ T:1 },\n\t/*::[*/0x01B0/*::]*/: { /* n:\"BrtEndPCDCalcMems\", */ T:-1 },\n\t/*::[*/0x01B1/*::]*/: { /* n:\"BrtBeginPCDCalcMem\", */ T:1 },\n\t/*::[*/0x01B2/*::]*/: { /* n:\"BrtEndPCDCalcMem\", */ T:-1 },\n\t/*::[*/0x01B3/*::]*/: { /* n:\"BrtBeginPCDHGLevels\", */ T:1 },\n\t/*::[*/0x01B4/*::]*/: { /* n:\"BrtEndPCDHGLevels\", */ T:-1 },\n\t/*::[*/0x01B5/*::]*/: { /* n:\"BrtBeginPCDHGLevel\", */ T:1 },\n\t/*::[*/0x01B6/*::]*/: { /* n:\"BrtEndPCDHGLevel\", */ T:-1 },\n\t/*::[*/0x01B7/*::]*/: { /* n:\"BrtBeginPCDHGLGroups\", */ T:1 },\n\t/*::[*/0x01B8/*::]*/: { /* n:\"BrtEndPCDHGLGroups\", */ T:-1 },\n\t/*::[*/0x01B9/*::]*/: { /* n:\"BrtBeginPCDHGLGroup\", */ T:1 },\n\t/*::[*/0x01BA/*::]*/: { /* n:\"BrtEndPCDHGLGroup\", */ T:-1 },\n\t/*::[*/0x01BB/*::]*/: { /* n:\"BrtBeginPCDHGLGMembers\", */ T:1 },\n\t/*::[*/0x01BC/*::]*/: { /* n:\"BrtEndPCDHGLGMembers\", */ T:-1 },\n\t/*::[*/0x01BD/*::]*/: { /* n:\"BrtBeginPCDHGLGMember\", */ T:1 },\n\t/*::[*/0x01BE/*::]*/: { /* n:\"BrtEndPCDHGLGMember\", */ T:-1 },\n\t/*::[*/0x01BF/*::]*/: { /* n:\"BrtBeginQSI\", */ T:1 },\n\t/*::[*/0x01C0/*::]*/: { /* n:\"BrtEndQSI\", */ T:-1 },\n\t/*::[*/0x01C1/*::]*/: { /* n:\"BrtBeginQSIR\", */ T:1 },\n\t/*::[*/0x01C2/*::]*/: { /* n:\"BrtEndQSIR\", */ T:-1 },\n\t/*::[*/0x01C3/*::]*/: { /* n:\"BrtBeginDeletedNames\", */ T:1 },\n\t/*::[*/0x01C4/*::]*/: { /* n:\"BrtEndDeletedNames\", */ T:-1 },\n\t/*::[*/0x01C5/*::]*/: { /* n:\"BrtBeginDeletedName\", */ T:1 },\n\t/*::[*/0x01C6/*::]*/: { /* n:\"BrtEndDeletedName\", */ T:-1 },\n\t/*::[*/0x01C7/*::]*/: { /* n:\"BrtBeginQSIFs\", */ T:1 },\n\t/*::[*/0x01C8/*::]*/: { /* n:\"BrtEndQSIFs\", */ T:-1 },\n\t/*::[*/0x01C9/*::]*/: { /* n:\"BrtBeginQSIF\", */ T:1 },\n\t/*::[*/0x01CA/*::]*/: { /* n:\"BrtEndQSIF\", */ T:-1 },\n\t/*::[*/0x01CB/*::]*/: { /* n:\"BrtBeginAutoSortScope\", */ T:1 },\n\t/*::[*/0x01CC/*::]*/: { /* n:\"BrtEndAutoSortScope\", */ T:-1 },\n\t/*::[*/0x01CD/*::]*/: { /* n:\"BrtBeginConditionalFormatting\", */ T:1 },\n\t/*::[*/0x01CE/*::]*/: { /* n:\"BrtEndConditionalFormatting\", */ T:-1 },\n\t/*::[*/0x01CF/*::]*/: { /* n:\"BrtBeginCFRule\", */ T:1 },\n\t/*::[*/0x01D0/*::]*/: { /* n:\"BrtEndCFRule\", */ T:-1 },\n\t/*::[*/0x01D1/*::]*/: { /* n:\"BrtBeginIconSet\", */ T:1 },\n\t/*::[*/0x01D2/*::]*/: { /* n:\"BrtEndIconSet\", */ T:-1 },\n\t/*::[*/0x01D3/*::]*/: { /* n:\"BrtBeginDatabar\", */ T:1 },\n\t/*::[*/0x01D4/*::]*/: { /* n:\"BrtEndDatabar\", */ T:-1 },\n\t/*::[*/0x01D5/*::]*/: { /* n:\"BrtBeginColorScale\", */ T:1 },\n\t/*::[*/0x01D6/*::]*/: { /* n:\"BrtEndColorScale\", */ T:-1 },\n\t/*::[*/0x01D7/*::]*/: { /* n:\"BrtCFVO\" */ },\n\t/*::[*/0x01D8/*::]*/: { /* n:\"BrtExternValueMeta\" */ },\n\t/*::[*/0x01D9/*::]*/: { /* n:\"BrtBeginColorPalette\", */ T:1 },\n\t/*::[*/0x01DA/*::]*/: { /* n:\"BrtEndColorPalette\", */ T:-1 },\n\t/*::[*/0x01DB/*::]*/: { /* n:\"BrtIndexedColor\" */ },\n\t/*::[*/0x01DC/*::]*/: { /* n:\"BrtMargins\", */ f:parse_BrtMargins },\n\t/*::[*/0x01DD/*::]*/: { /* n:\"BrtPrintOptions\" */ },\n\t/*::[*/0x01DE/*::]*/: { /* n:\"BrtPageSetup\" */ },\n\t/*::[*/0x01DF/*::]*/: { /* n:\"BrtBeginHeaderFooter\", */ T:1 },\n\t/*::[*/0x01E0/*::]*/: { /* n:\"BrtEndHeaderFooter\", */ T:-1 },\n\t/*::[*/0x01E1/*::]*/: { /* n:\"BrtBeginSXCrtFormat\", */ T:1 },\n\t/*::[*/0x01E2/*::]*/: { /* n:\"BrtEndSXCrtFormat\", */ T:-1 },\n\t/*::[*/0x01E3/*::]*/: { /* n:\"BrtBeginSXCrtFormats\", */ T:1 },\n\t/*::[*/0x01E4/*::]*/: { /* n:\"BrtEndSXCrtFormats\", */ T:-1 },\n\t/*::[*/0x01E5/*::]*/: { /* n:\"BrtWsFmtInfo\", */ f:parse_BrtWsFmtInfo },\n\t/*::[*/0x01E6/*::]*/: { /* n:\"BrtBeginMgs\", */ T:1 },\n\t/*::[*/0x01E7/*::]*/: { /* n:\"BrtEndMGs\", */ T:-1 },\n\t/*::[*/0x01E8/*::]*/: { /* n:\"BrtBeginMGMaps\", */ T:1 },\n\t/*::[*/0x01E9/*::]*/: { /* n:\"BrtEndMGMaps\", */ T:-1 },\n\t/*::[*/0x01EA/*::]*/: { /* n:\"BrtBeginMG\", */ T:1 },\n\t/*::[*/0x01EB/*::]*/: { /* n:\"BrtEndMG\", */ T:-1 },\n\t/*::[*/0x01EC/*::]*/: { /* n:\"BrtBeginMap\", */ T:1 },\n\t/*::[*/0x01ED/*::]*/: { /* n:\"BrtEndMap\", */ T:-1 },\n\t/*::[*/0x01EE/*::]*/: { /* n:\"BrtHLink\", */ f:parse_BrtHLink },\n\t/*::[*/0x01EF/*::]*/: { /* n:\"BrtBeginDCon\", */ T:1 },\n\t/*::[*/0x01F0/*::]*/: { /* n:\"BrtEndDCon\", */ T:-1 },\n\t/*::[*/0x01F1/*::]*/: { /* n:\"BrtBeginDRefs\", */ T:1 },\n\t/*::[*/0x01F2/*::]*/: { /* n:\"BrtEndDRefs\", */ T:-1 },\n\t/*::[*/0x01F3/*::]*/: { /* n:\"BrtDRef\" */ },\n\t/*::[*/0x01F4/*::]*/: { /* n:\"BrtBeginScenMan\", */ T:1 },\n\t/*::[*/0x01F5/*::]*/: { /* n:\"BrtEndScenMan\", */ T:-1 },\n\t/*::[*/0x01F6/*::]*/: { /* n:\"BrtBeginSct\", */ T:1 },\n\t/*::[*/0x01F7/*::]*/: { /* n:\"BrtEndSct\", */ T:-1 },\n\t/*::[*/0x01F8/*::]*/: { /* n:\"BrtSlc\" */ },\n\t/*::[*/0x01F9/*::]*/: { /* n:\"BrtBeginDXFs\", */ T:1 },\n\t/*::[*/0x01FA/*::]*/: { /* n:\"BrtEndDXFs\", */ T:-1 },\n\t/*::[*/0x01FB/*::]*/: { /* n:\"BrtDXF\" */ },\n\t/*::[*/0x01FC/*::]*/: { /* n:\"BrtBeginTableStyles\", */ T:1 },\n\t/*::[*/0x01FD/*::]*/: { /* n:\"BrtEndTableStyles\", */ T:-1 },\n\t/*::[*/0x01FE/*::]*/: { /* n:\"BrtBeginTableStyle\", */ T:1 },\n\t/*::[*/0x01FF/*::]*/: { /* n:\"BrtEndTableStyle\", */ T:-1 },\n\t/*::[*/0x0200/*::]*/: { /* n:\"BrtTableStyleElement\" */ },\n\t/*::[*/0x0201/*::]*/: { /* n:\"BrtTableStyleClient\" */ },\n\t/*::[*/0x0202/*::]*/: { /* n:\"BrtBeginVolDeps\", */ T:1 },\n\t/*::[*/0x0203/*::]*/: { /* n:\"BrtEndVolDeps\", */ T:-1 },\n\t/*::[*/0x0204/*::]*/: { /* n:\"BrtBeginVolType\", */ T:1 },\n\t/*::[*/0x0205/*::]*/: { /* n:\"BrtEndVolType\", */ T:-1 },\n\t/*::[*/0x0206/*::]*/: { /* n:\"BrtBeginVolMain\", */ T:1 },\n\t/*::[*/0x0207/*::]*/: { /* n:\"BrtEndVolMain\", */ T:-1 },\n\t/*::[*/0x0208/*::]*/: { /* n:\"BrtBeginVolTopic\", */ T:1 },\n\t/*::[*/0x0209/*::]*/: { /* n:\"BrtEndVolTopic\", */ T:-1 },\n\t/*::[*/0x020A/*::]*/: { /* n:\"BrtVolSubtopic\" */ },\n\t/*::[*/0x020B/*::]*/: { /* n:\"BrtVolRef\" */ },\n\t/*::[*/0x020C/*::]*/: { /* n:\"BrtVolNum\" */ },\n\t/*::[*/0x020D/*::]*/: { /* n:\"BrtVolErr\" */ },\n\t/*::[*/0x020E/*::]*/: { /* n:\"BrtVolStr\" */ },\n\t/*::[*/0x020F/*::]*/: { /* n:\"BrtVolBool\" */ },\n\t/*::[*/0x0210/*::]*/: { /* n:\"BrtBeginCalcChain$\", */ T:1 },\n\t/*::[*/0x0211/*::]*/: { /* n:\"BrtEndCalcChain$\", */ T:-1 },\n\t/*::[*/0x0212/*::]*/: { /* n:\"BrtBeginSortState\", */ T:1 },\n\t/*::[*/0x0213/*::]*/: { /* n:\"BrtEndSortState\", */ T:-1 },\n\t/*::[*/0x0214/*::]*/: { /* n:\"BrtBeginSortCond\", */ T:1 },\n\t/*::[*/0x0215/*::]*/: { /* n:\"BrtEndSortCond\", */ T:-1 },\n\t/*::[*/0x0216/*::]*/: { /* n:\"BrtBookProtection\" */ },\n\t/*::[*/0x0217/*::]*/: { /* n:\"BrtSheetProtection\" */ },\n\t/*::[*/0x0218/*::]*/: { /* n:\"BrtRangeProtection\" */ },\n\t/*::[*/0x0219/*::]*/: { /* n:\"BrtPhoneticInfo\" */ },\n\t/*::[*/0x021A/*::]*/: { /* n:\"BrtBeginECTxtWiz\", */ T:1 },\n\t/*::[*/0x021B/*::]*/: { /* n:\"BrtEndECTxtWiz\", */ T:-1 },\n\t/*::[*/0x021C/*::]*/: { /* n:\"BrtBeginECTWFldInfoLst\", */ T:1 },\n\t/*::[*/0x021D/*::]*/: { /* n:\"BrtEndECTWFldInfoLst\", */ T:-1 },\n\t/*::[*/0x021E/*::]*/: { /* n:\"BrtBeginECTwFldInfo\", */ T:1 },\n\t/*::[*/0x0224/*::]*/: { /* n:\"BrtFileSharing\" */ },\n\t/*::[*/0x0225/*::]*/: { /* n:\"BrtOleSize\" */ },\n\t/*::[*/0x0226/*::]*/: { /* n:\"BrtDrawing\", */ f:parse_RelID },\n\t/*::[*/0x0227/*::]*/: { /* n:\"BrtLegacyDrawing\" */ },\n\t/*::[*/0x0228/*::]*/: { /* n:\"BrtLegacyDrawingHF\" */ },\n\t/*::[*/0x0229/*::]*/: { /* n:\"BrtWebOpt\" */ },\n\t/*::[*/0x022A/*::]*/: { /* n:\"BrtBeginWebPubItems\", */ T:1 },\n\t/*::[*/0x022B/*::]*/: { /* n:\"BrtEndWebPubItems\", */ T:-1 },\n\t/*::[*/0x022C/*::]*/: { /* n:\"BrtBeginWebPubItem\", */ T:1 },\n\t/*::[*/0x022D/*::]*/: { /* n:\"BrtEndWebPubItem\", */ T:-1 },\n\t/*::[*/0x022E/*::]*/: { /* n:\"BrtBeginSXCondFmt\", */ T:1 },\n\t/*::[*/0x022F/*::]*/: { /* n:\"BrtEndSXCondFmt\", */ T:-1 },\n\t/*::[*/0x0230/*::]*/: { /* n:\"BrtBeginSXCondFmts\", */ T:1 },\n\t/*::[*/0x0231/*::]*/: { /* n:\"BrtEndSXCondFmts\", */ T:-1 },\n\t/*::[*/0x0232/*::]*/: { /* n:\"BrtBkHim\" */ },\n\t/*::[*/0x0234/*::]*/: { /* n:\"BrtColor\" */ },\n\t/*::[*/0x0235/*::]*/: { /* n:\"BrtBeginIndexedColors\", */ T:1 },\n\t/*::[*/0x0236/*::]*/: { /* n:\"BrtEndIndexedColors\", */ T:-1 },\n\t/*::[*/0x0239/*::]*/: { /* n:\"BrtBeginMRUColors\", */ T:1 },\n\t/*::[*/0x023A/*::]*/: { /* n:\"BrtEndMRUColors\", */ T:-1 },\n\t/*::[*/0x023C/*::]*/: { /* n:\"BrtMRUColor\" */ },\n\t/*::[*/0x023D/*::]*/: { /* n:\"BrtBeginDVals\", */ T:1 },\n\t/*::[*/0x023E/*::]*/: { /* n:\"BrtEndDVals\", */ T:-1 },\n\t/*::[*/0x0241/*::]*/: { /* n:\"BrtSupNameStart\" */ },\n\t/*::[*/0x0242/*::]*/: { /* n:\"BrtSupNameValueStart\" */ },\n\t/*::[*/0x0243/*::]*/: { /* n:\"BrtSupNameValueEnd\" */ },\n\t/*::[*/0x0244/*::]*/: { /* n:\"BrtSupNameNum\" */ },\n\t/*::[*/0x0245/*::]*/: { /* n:\"BrtSupNameErr\" */ },\n\t/*::[*/0x0246/*::]*/: { /* n:\"BrtSupNameSt\" */ },\n\t/*::[*/0x0247/*::]*/: { /* n:\"BrtSupNameNil\" */ },\n\t/*::[*/0x0248/*::]*/: { /* n:\"BrtSupNameBool\" */ },\n\t/*::[*/0x0249/*::]*/: { /* n:\"BrtSupNameFmla\" */ },\n\t/*::[*/0x024A/*::]*/: { /* n:\"BrtSupNameBits\" */ },\n\t/*::[*/0x024B/*::]*/: { /* n:\"BrtSupNameEnd\" */ },\n\t/*::[*/0x024C/*::]*/: { /* n:\"BrtEndSupBook\", */ T:-1 },\n\t/*::[*/0x024D/*::]*/: { /* n:\"BrtCellSmartTagProperty\" */ },\n\t/*::[*/0x024E/*::]*/: { /* n:\"BrtBeginCellSmartTag\", */ T:1 },\n\t/*::[*/0x024F/*::]*/: { /* n:\"BrtEndCellSmartTag\", */ T:-1 },\n\t/*::[*/0x0250/*::]*/: { /* n:\"BrtBeginCellSmartTags\", */ T:1 },\n\t/*::[*/0x0251/*::]*/: { /* n:\"BrtEndCellSmartTags\", */ T:-1 },\n\t/*::[*/0x0252/*::]*/: { /* n:\"BrtBeginSmartTags\", */ T:1 },\n\t/*::[*/0x0253/*::]*/: { /* n:\"BrtEndSmartTags\", */ T:-1 },\n\t/*::[*/0x0254/*::]*/: { /* n:\"BrtSmartTagType\" */ },\n\t/*::[*/0x0255/*::]*/: { /* n:\"BrtBeginSmartTagTypes\", */ T:1 },\n\t/*::[*/0x0256/*::]*/: { /* n:\"BrtEndSmartTagTypes\", */ T:-1 },\n\t/*::[*/0x0257/*::]*/: { /* n:\"BrtBeginSXFilters\", */ T:1 },\n\t/*::[*/0x0258/*::]*/: { /* n:\"BrtEndSXFilters\", */ T:-1 },\n\t/*::[*/0x0259/*::]*/: { /* n:\"BrtBeginSXFILTER\", */ T:1 },\n\t/*::[*/0x025A/*::]*/: { /* n:\"BrtEndSXFilter\", */ T:-1 },\n\t/*::[*/0x025B/*::]*/: { /* n:\"BrtBeginFills\", */ T:1 },\n\t/*::[*/0x025C/*::]*/: { /* n:\"BrtEndFills\", */ T:-1 },\n\t/*::[*/0x025D/*::]*/: { /* n:\"BrtBeginCellWatches\", */ T:1 },\n\t/*::[*/0x025E/*::]*/: { /* n:\"BrtEndCellWatches\", */ T:-1 },\n\t/*::[*/0x025F/*::]*/: { /* n:\"BrtCellWatch\" */ },\n\t/*::[*/0x0260/*::]*/: { /* n:\"BrtBeginCRErrs\", */ T:1 },\n\t/*::[*/0x0261/*::]*/: { /* n:\"BrtEndCRErrs\", */ T:-1 },\n\t/*::[*/0x0262/*::]*/: { /* n:\"BrtCrashRecErr\" */ },\n\t/*::[*/0x0263/*::]*/: { /* n:\"BrtBeginFonts\", */ T:1 },\n\t/*::[*/0x0264/*::]*/: { /* n:\"BrtEndFonts\", */ T:-1 },\n\t/*::[*/0x0265/*::]*/: { /* n:\"BrtBeginBorders\", */ T:1 },\n\t/*::[*/0x0266/*::]*/: { /* n:\"BrtEndBorders\", */ T:-1 },\n\t/*::[*/0x0267/*::]*/: { /* n:\"BrtBeginFmts\", */ T:1 },\n\t/*::[*/0x0268/*::]*/: { /* n:\"BrtEndFmts\", */ T:-1 },\n\t/*::[*/0x0269/*::]*/: { /* n:\"BrtBeginCellXFs\", */ T:1 },\n\t/*::[*/0x026A/*::]*/: { /* n:\"BrtEndCellXFs\", */ T:-1 },\n\t/*::[*/0x026B/*::]*/: { /* n:\"BrtBeginStyles\", */ T:1 },\n\t/*::[*/0x026C/*::]*/: { /* n:\"BrtEndStyles\", */ T:-1 },\n\t/*::[*/0x0271/*::]*/: { /* n:\"BrtBigName\" */ },\n\t/*::[*/0x0272/*::]*/: { /* n:\"BrtBeginCellStyleXFs\", */ T:1 },\n\t/*::[*/0x0273/*::]*/: { /* n:\"BrtEndCellStyleXFs\", */ T:-1 },\n\t/*::[*/0x0274/*::]*/: { /* n:\"BrtBeginComments\", */ T:1 },\n\t/*::[*/0x0275/*::]*/: { /* n:\"BrtEndComments\", */ T:-1 },\n\t/*::[*/0x0276/*::]*/: { /* n:\"BrtBeginCommentAuthors\", */ T:1 },\n\t/*::[*/0x0277/*::]*/: { /* n:\"BrtEndCommentAuthors\", */ T:-1 },\n\t/*::[*/0x0278/*::]*/: { /* n:\"BrtCommentAuthor\", */ f:parse_BrtCommentAuthor },\n\t/*::[*/0x0279/*::]*/: { /* n:\"BrtBeginCommentList\", */ T:1 },\n\t/*::[*/0x027A/*::]*/: { /* n:\"BrtEndCommentList\", */ T:-1 },\n\t/*::[*/0x027B/*::]*/: { /* n:\"BrtBeginComment\", */ T:1, f:parse_BrtBeginComment},\n\t/*::[*/0x027C/*::]*/: { /* n:\"BrtEndComment\", */ T:-1 },\n\t/*::[*/0x027D/*::]*/: { /* n:\"BrtCommentText\", */ f:parse_BrtCommentText },\n\t/*::[*/0x027E/*::]*/: { /* n:\"BrtBeginOleObjects\", */ T:1 },\n\t/*::[*/0x027F/*::]*/: { /* n:\"BrtOleObject\" */ },\n\t/*::[*/0x0280/*::]*/: { /* n:\"BrtEndOleObjects\", */ T:-1 },\n\t/*::[*/0x0281/*::]*/: { /* n:\"BrtBeginSxrules\", */ T:1 },\n\t/*::[*/0x0282/*::]*/: { /* n:\"BrtEndSxRules\", */ T:-1 },\n\t/*::[*/0x0283/*::]*/: { /* n:\"BrtBeginActiveXControls\", */ T:1 },\n\t/*::[*/0x0284/*::]*/: { /* n:\"BrtActiveX\" */ },\n\t/*::[*/0x0285/*::]*/: { /* n:\"BrtEndActiveXControls\", */ T:-1 },\n\t/*::[*/0x0286/*::]*/: { /* n:\"BrtBeginPCDSDTCEMembersSortBy\", */ T:1 },\n\t/*::[*/0x0288/*::]*/: { /* n:\"BrtBeginCellIgnoreECs\", */ T:1 },\n\t/*::[*/0x0289/*::]*/: { /* n:\"BrtCellIgnoreEC\" */ },\n\t/*::[*/0x028A/*::]*/: { /* n:\"BrtEndCellIgnoreECs\", */ T:-1 },\n\t/*::[*/0x028B/*::]*/: { /* n:\"BrtCsProp\", */ f:parse_BrtCsProp },\n\t/*::[*/0x028C/*::]*/: { /* n:\"BrtCsPageSetup\" */ },\n\t/*::[*/0x028D/*::]*/: { /* n:\"BrtBeginUserCsViews\", */ T:1 },\n\t/*::[*/0x028E/*::]*/: { /* n:\"BrtEndUserCsViews\", */ T:-1 },\n\t/*::[*/0x028F/*::]*/: { /* n:\"BrtBeginUserCsView\", */ T:1 },\n\t/*::[*/0x0290/*::]*/: { /* n:\"BrtEndUserCsView\", */ T:-1 },\n\t/*::[*/0x0291/*::]*/: { /* n:\"BrtBeginPcdSFCIEntries\", */ T:1 },\n\t/*::[*/0x0292/*::]*/: { /* n:\"BrtEndPCDSFCIEntries\", */ T:-1 },\n\t/*::[*/0x0293/*::]*/: { /* n:\"BrtPCDSFCIEntry\" */ },\n\t/*::[*/0x0294/*::]*/: { /* n:\"BrtBeginListParts\", */ T:1 },\n\t/*::[*/0x0295/*::]*/: { /* n:\"BrtListPart\" */ },\n\t/*::[*/0x0296/*::]*/: { /* n:\"BrtEndListParts\", */ T:-1 },\n\t/*::[*/0x0297/*::]*/: { /* n:\"BrtSheetCalcProp\" */ },\n\t/*::[*/0x0298/*::]*/: { /* n:\"BrtBeginFnGroup\", */ T:1 },\n\t/*::[*/0x0299/*::]*/: { /* n:\"BrtFnGroup\" */ },\n\t/*::[*/0x029A/*::]*/: { /* n:\"BrtEndFnGroup\", */ T:-1 },\n\t/*::[*/0x029B/*::]*/: { /* n:\"BrtSupAddin\" */ },\n\t/*::[*/0x029C/*::]*/: { /* n:\"BrtSXTDMPOrder\" */ },\n\t/*::[*/0x029D/*::]*/: { /* n:\"BrtCsProtection\" */ },\n\t/*::[*/0x029F/*::]*/: { /* n:\"BrtBeginWsSortMap\", */ T:1 },\n\t/*::[*/0x02A0/*::]*/: { /* n:\"BrtEndWsSortMap\", */ T:-1 },\n\t/*::[*/0x02A1/*::]*/: { /* n:\"BrtBeginRRSort\", */ T:1 },\n\t/*::[*/0x02A2/*::]*/: { /* n:\"BrtEndRRSort\", */ T:-1 },\n\t/*::[*/0x02A3/*::]*/: { /* n:\"BrtRRSortItem\" */ },\n\t/*::[*/0x02A4/*::]*/: { /* n:\"BrtFileSharingIso\" */ },\n\t/*::[*/0x02A5/*::]*/: { /* n:\"BrtBookProtectionIso\" */ },\n\t/*::[*/0x02A6/*::]*/: { /* n:\"BrtSheetProtectionIso\" */ },\n\t/*::[*/0x02A7/*::]*/: { /* n:\"BrtCsProtectionIso\" */ },\n\t/*::[*/0x02A8/*::]*/: { /* n:\"BrtRangeProtectionIso\" */ },\n\t/*::[*/0x02A9/*::]*/: { /* n:\"BrtDValList\" */ },\n\t/*::[*/0x0400/*::]*/: { /* n:\"BrtRwDescent\" */ },\n\t/*::[*/0x0401/*::]*/: { /* n:\"BrtKnownFonts\" */ },\n\t/*::[*/0x0402/*::]*/: { /* n:\"BrtBeginSXTupleSet\", */ T:1 },\n\t/*::[*/0x0403/*::]*/: { /* n:\"BrtEndSXTupleSet\", */ T:-1 },\n\t/*::[*/0x0404/*::]*/: { /* n:\"BrtBeginSXTupleSetHeader\", */ T:1 },\n\t/*::[*/0x0405/*::]*/: { /* n:\"BrtEndSXTupleSetHeader\", */ T:-1 },\n\t/*::[*/0x0406/*::]*/: { /* n:\"BrtSXTupleSetHeaderItem\" */ },\n\t/*::[*/0x0407/*::]*/: { /* n:\"BrtBeginSXTupleSetData\", */ T:1 },\n\t/*::[*/0x0408/*::]*/: { /* n:\"BrtEndSXTupleSetData\", */ T:-1 },\n\t/*::[*/0x0409/*::]*/: { /* n:\"BrtBeginSXTupleSetRow\", */ T:1 },\n\t/*::[*/0x040A/*::]*/: { /* n:\"BrtEndSXTupleSetRow\", */ T:-1 },\n\t/*::[*/0x040B/*::]*/: { /* n:\"BrtSXTupleSetRowItem\" */ },\n\t/*::[*/0x040C/*::]*/: { /* n:\"BrtNameExt\" */ },\n\t/*::[*/0x040D/*::]*/: { /* n:\"BrtPCDH14\" */ },\n\t/*::[*/0x040E/*::]*/: { /* n:\"BrtBeginPCDCalcMem14\", */ T:1 },\n\t/*::[*/0x040F/*::]*/: { /* n:\"BrtEndPCDCalcMem14\", */ T:-1 },\n\t/*::[*/0x0410/*::]*/: { /* n:\"BrtSXTH14\" */ },\n\t/*::[*/0x0411/*::]*/: { /* n:\"BrtBeginSparklineGroup\", */ T:1 },\n\t/*::[*/0x0412/*::]*/: { /* n:\"BrtEndSparklineGroup\", */ T:-1 },\n\t/*::[*/0x0413/*::]*/: { /* n:\"BrtSparkline\" */ },\n\t/*::[*/0x0414/*::]*/: { /* n:\"BrtSXDI14\" */ },\n\t/*::[*/0x0415/*::]*/: { /* n:\"BrtWsFmtInfoEx14\" */ },\n\t/*::[*/0x0416/*::]*/: { /* n:\"BrtBeginConditionalFormatting14\", */ T:1 },\n\t/*::[*/0x0417/*::]*/: { /* n:\"BrtEndConditionalFormatting14\", */ T:-1 },\n\t/*::[*/0x0418/*::]*/: { /* n:\"BrtBeginCFRule14\", */ T:1 },\n\t/*::[*/0x0419/*::]*/: { /* n:\"BrtEndCFRule14\", */ T:-1 },\n\t/*::[*/0x041A/*::]*/: { /* n:\"BrtCFVO14\" */ },\n\t/*::[*/0x041B/*::]*/: { /* n:\"BrtBeginDatabar14\", */ T:1 },\n\t/*::[*/0x041C/*::]*/: { /* n:\"BrtBeginIconSet14\", */ T:1 },\n\t/*::[*/0x041D/*::]*/: { /* n:\"BrtDVal14\", */ f: parse_BrtDVal14 },\n\t/*::[*/0x041E/*::]*/: { /* n:\"BrtBeginDVals14\", */ T:1 },\n\t/*::[*/0x041F/*::]*/: { /* n:\"BrtColor14\" */ },\n\t/*::[*/0x0420/*::]*/: { /* n:\"BrtBeginSparklines\", */ T:1 },\n\t/*::[*/0x0421/*::]*/: { /* n:\"BrtEndSparklines\", */ T:-1 },\n\t/*::[*/0x0422/*::]*/: { /* n:\"BrtBeginSparklineGroups\", */ T:1 },\n\t/*::[*/0x0423/*::]*/: { /* n:\"BrtEndSparklineGroups\", */ T:-1 },\n\t/*::[*/0x0425/*::]*/: { /* n:\"BrtSXVD14\" */ },\n\t/*::[*/0x0426/*::]*/: { /* n:\"BrtBeginSXView14\", */ T:1 },\n\t/*::[*/0x0427/*::]*/: { /* n:\"BrtEndSXView14\", */ T:-1 },\n\t/*::[*/0x0428/*::]*/: { /* n:\"BrtBeginSXView16\", */ T:1 },\n\t/*::[*/0x0429/*::]*/: { /* n:\"BrtEndSXView16\", */ T:-1 },\n\t/*::[*/0x042A/*::]*/: { /* n:\"BrtBeginPCD14\", */ T:1 },\n\t/*::[*/0x042B/*::]*/: { /* n:\"BrtEndPCD14\", */ T:-1 },\n\t/*::[*/0x042C/*::]*/: { /* n:\"BrtBeginExtConn14\", */ T:1 },\n\t/*::[*/0x042D/*::]*/: { /* n:\"BrtEndExtConn14\", */ T:-1 },\n\t/*::[*/0x042E/*::]*/: { /* n:\"BrtBeginSlicerCacheIDs\", */ T:1 },\n\t/*::[*/0x042F/*::]*/: { /* n:\"BrtEndSlicerCacheIDs\", */ T:-1 },\n\t/*::[*/0x0430/*::]*/: { /* n:\"BrtBeginSlicerCacheID\", */ T:1 },\n\t/*::[*/0x0431/*::]*/: { /* n:\"BrtEndSlicerCacheID\", */ T:-1 },\n\t/*::[*/0x0433/*::]*/: { /* n:\"BrtBeginSlicerCache\", */ T:1 },\n\t/*::[*/0x0434/*::]*/: { /* n:\"BrtEndSlicerCache\", */ T:-1 },\n\t/*::[*/0x0435/*::]*/: { /* n:\"BrtBeginSlicerCacheDef\", */ T:1 },\n\t/*::[*/0x0436/*::]*/: { /* n:\"BrtEndSlicerCacheDef\", */ T:-1 },\n\t/*::[*/0x0437/*::]*/: { /* n:\"BrtBeginSlicersEx\", */ T:1 },\n\t/*::[*/0x0438/*::]*/: { /* n:\"BrtEndSlicersEx\", */ T:-1 },\n\t/*::[*/0x0439/*::]*/: { /* n:\"BrtBeginSlicerEx\", */ T:1 },\n\t/*::[*/0x043A/*::]*/: { /* n:\"BrtEndSlicerEx\", */ T:-1 },\n\t/*::[*/0x043B/*::]*/: { /* n:\"BrtBeginSlicer\", */ T:1 },\n\t/*::[*/0x043C/*::]*/: { /* n:\"BrtEndSlicer\", */ T:-1 },\n\t/*::[*/0x043D/*::]*/: { /* n:\"BrtSlicerCachePivotTables\" */ },\n\t/*::[*/0x043E/*::]*/: { /* n:\"BrtBeginSlicerCacheOlapImpl\", */ T:1 },\n\t/*::[*/0x043F/*::]*/: { /* n:\"BrtEndSlicerCacheOlapImpl\", */ T:-1 },\n\t/*::[*/0x0440/*::]*/: { /* n:\"BrtBeginSlicerCacheLevelsData\", */ T:1 },\n\t/*::[*/0x0441/*::]*/: { /* n:\"BrtEndSlicerCacheLevelsData\", */ T:-1 },\n\t/*::[*/0x0442/*::]*/: { /* n:\"BrtBeginSlicerCacheLevelData\", */ T:1 },\n\t/*::[*/0x0443/*::]*/: { /* n:\"BrtEndSlicerCacheLevelData\", */ T:-1 },\n\t/*::[*/0x0444/*::]*/: { /* n:\"BrtBeginSlicerCacheSiRanges\", */ T:1 },\n\t/*::[*/0x0445/*::]*/: { /* n:\"BrtEndSlicerCacheSiRanges\", */ T:-1 },\n\t/*::[*/0x0446/*::]*/: { /* n:\"BrtBeginSlicerCacheSiRange\", */ T:1 },\n\t/*::[*/0x0447/*::]*/: { /* n:\"BrtEndSlicerCacheSiRange\", */ T:-1 },\n\t/*::[*/0x0448/*::]*/: { /* n:\"BrtSlicerCacheOlapItem\" */ },\n\t/*::[*/0x0449/*::]*/: { /* n:\"BrtBeginSlicerCacheSelections\", */ T:1 },\n\t/*::[*/0x044A/*::]*/: { /* n:\"BrtSlicerCacheSelection\" */ },\n\t/*::[*/0x044B/*::]*/: { /* n:\"BrtEndSlicerCacheSelections\", */ T:-1 },\n\t/*::[*/0x044C/*::]*/: { /* n:\"BrtBeginSlicerCacheNative\", */ T:1 },\n\t/*::[*/0x044D/*::]*/: { /* n:\"BrtEndSlicerCacheNative\", */ T:-1 },\n\t/*::[*/0x044E/*::]*/: { /* n:\"BrtSlicerCacheNativeItem\" */ },\n\t/*::[*/0x044F/*::]*/: { /* n:\"BrtRangeProtection14\" */ },\n\t/*::[*/0x0450/*::]*/: { /* n:\"BrtRangeProtectionIso14\" */ },\n\t/*::[*/0x0451/*::]*/: { /* n:\"BrtCellIgnoreEC14\" */ },\n\t/*::[*/0x0457/*::]*/: { /* n:\"BrtList14\" */ },\n\t/*::[*/0x0458/*::]*/: { /* n:\"BrtCFIcon\" */ },\n\t/*::[*/0x0459/*::]*/: { /* n:\"BrtBeginSlicerCachesPivotCacheIDs\", */ T:1 },\n\t/*::[*/0x045A/*::]*/: { /* n:\"BrtEndSlicerCachesPivotCacheIDs\", */ T:-1 },\n\t/*::[*/0x045B/*::]*/: { /* n:\"BrtBeginSlicers\", */ T:1 },\n\t/*::[*/0x045C/*::]*/: { /* n:\"BrtEndSlicers\", */ T:-1 },\n\t/*::[*/0x045D/*::]*/: { /* n:\"BrtWbProp14\" */ },\n\t/*::[*/0x045E/*::]*/: { /* n:\"BrtBeginSXEdit\", */ T:1 },\n\t/*::[*/0x045F/*::]*/: { /* n:\"BrtEndSXEdit\", */ T:-1 },\n\t/*::[*/0x0460/*::]*/: { /* n:\"BrtBeginSXEdits\", */ T:1 },\n\t/*::[*/0x0461/*::]*/: { /* n:\"BrtEndSXEdits\", */ T:-1 },\n\t/*::[*/0x0462/*::]*/: { /* n:\"BrtBeginSXChange\", */ T:1 },\n\t/*::[*/0x0463/*::]*/: { /* n:\"BrtEndSXChange\", */ T:-1 },\n\t/*::[*/0x0464/*::]*/: { /* n:\"BrtBeginSXChanges\", */ T:1 },\n\t/*::[*/0x0465/*::]*/: { /* n:\"BrtEndSXChanges\", */ T:-1 },\n\t/*::[*/0x0466/*::]*/: { /* n:\"BrtSXTupleItems\" */ },\n\t/*::[*/0x0468/*::]*/: { /* n:\"BrtBeginSlicerStyle\", */ T:1 },\n\t/*::[*/0x0469/*::]*/: { /* n:\"BrtEndSlicerStyle\", */ T:-1 },\n\t/*::[*/0x046A/*::]*/: { /* n:\"BrtSlicerStyleElement\" */ },\n\t/*::[*/0x046B/*::]*/: { /* n:\"BrtBeginStyleSheetExt14\", */ T:1 },\n\t/*::[*/0x046C/*::]*/: { /* n:\"BrtEndStyleSheetExt14\", */ T:-1 },\n\t/*::[*/0x046D/*::]*/: { /* n:\"BrtBeginSlicerCachesPivotCacheID\", */ T:1 },\n\t/*::[*/0x046E/*::]*/: { /* n:\"BrtEndSlicerCachesPivotCacheID\", */ T:-1 },\n\t/*::[*/0x046F/*::]*/: { /* n:\"BrtBeginConditionalFormattings\", */ T:1 },\n\t/*::[*/0x0470/*::]*/: { /* n:\"BrtEndConditionalFormattings\", */ T:-1 },\n\t/*::[*/0x0471/*::]*/: { /* n:\"BrtBeginPCDCalcMemExt\", */ T:1 },\n\t/*::[*/0x0472/*::]*/: { /* n:\"BrtEndPCDCalcMemExt\", */ T:-1 },\n\t/*::[*/0x0473/*::]*/: { /* n:\"BrtBeginPCDCalcMemsExt\", */ T:1 },\n\t/*::[*/0x0474/*::]*/: { /* n:\"BrtEndPCDCalcMemsExt\", */ T:-1 },\n\t/*::[*/0x0475/*::]*/: { /* n:\"BrtPCDField14\" */ },\n\t/*::[*/0x0476/*::]*/: { /* n:\"BrtBeginSlicerStyles\", */ T:1 },\n\t/*::[*/0x0477/*::]*/: { /* n:\"BrtEndSlicerStyles\", */ T:-1 },\n\t/*::[*/0x0478/*::]*/: { /* n:\"BrtBeginSlicerStyleElements\", */ T:1 },\n\t/*::[*/0x0479/*::]*/: { /* n:\"BrtEndSlicerStyleElements\", */ T:-1 },\n\t/*::[*/0x047A/*::]*/: { /* n:\"BrtCFRuleExt\" */ },\n\t/*::[*/0x047B/*::]*/: { /* n:\"BrtBeginSXCondFmt14\", */ T:1 },\n\t/*::[*/0x047C/*::]*/: { /* n:\"BrtEndSXCondFmt14\", */ T:-1 },\n\t/*::[*/0x047D/*::]*/: { /* n:\"BrtBeginSXCondFmts14\", */ T:1 },\n\t/*::[*/0x047E/*::]*/: { /* n:\"BrtEndSXCondFmts14\", */ T:-1 },\n\t/*::[*/0x0480/*::]*/: { /* n:\"BrtBeginSortCond14\", */ T:1 },\n\t/*::[*/0x0481/*::]*/: { /* n:\"BrtEndSortCond14\", */ T:-1 },\n\t/*::[*/0x0482/*::]*/: { /* n:\"BrtEndDVals14\", */ T:-1 },\n\t/*::[*/0x0483/*::]*/: { /* n:\"BrtEndIconSet14\", */ T:-1 },\n\t/*::[*/0x0484/*::]*/: { /* n:\"BrtEndDatabar14\", */ T:-1 },\n\t/*::[*/0x0485/*::]*/: { /* n:\"BrtBeginColorScale14\", */ T:1 },\n\t/*::[*/0x0486/*::]*/: { /* n:\"BrtEndColorScale14\", */ T:-1 },\n\t/*::[*/0x0487/*::]*/: { /* n:\"BrtBeginSxrules14\", */ T:1 },\n\t/*::[*/0x0488/*::]*/: { /* n:\"BrtEndSxrules14\", */ T:-1 },\n\t/*::[*/0x0489/*::]*/: { /* n:\"BrtBeginPRule14\", */ T:1 },\n\t/*::[*/0x048A/*::]*/: { /* n:\"BrtEndPRule14\", */ T:-1 },\n\t/*::[*/0x048B/*::]*/: { /* n:\"BrtBeginPRFilters14\", */ T:1 },\n\t/*::[*/0x048C/*::]*/: { /* n:\"BrtEndPRFilters14\", */ T:-1 },\n\t/*::[*/0x048D/*::]*/: { /* n:\"BrtBeginPRFilter14\", */ T:1 },\n\t/*::[*/0x048E/*::]*/: { /* n:\"BrtEndPRFilter14\", */ T:-1 },\n\t/*::[*/0x048F/*::]*/: { /* n:\"BrtBeginPRFItem14\", */ T:1 },\n\t/*::[*/0x0490/*::]*/: { /* n:\"BrtEndPRFItem14\", */ T:-1 },\n\t/*::[*/0x0491/*::]*/: { /* n:\"BrtBeginCellIgnoreECs14\", */ T:1 },\n\t/*::[*/0x0492/*::]*/: { /* n:\"BrtEndCellIgnoreECs14\", */ T:-1 },\n\t/*::[*/0x0493/*::]*/: { /* n:\"BrtDxf14\" */ },\n\t/*::[*/0x0494/*::]*/: { /* n:\"BrtBeginDxF14s\", */ T:1 },\n\t/*::[*/0x0495/*::]*/: { /* n:\"BrtEndDxf14s\", */ T:-1 },\n\t/*::[*/0x0499/*::]*/: { /* n:\"BrtFilter14\" */ },\n\t/*::[*/0x049A/*::]*/: { /* n:\"BrtBeginCustomFilters14\", */ T:1 },\n\t/*::[*/0x049C/*::]*/: { /* n:\"BrtCustomFilter14\" */ },\n\t/*::[*/0x049D/*::]*/: { /* n:\"BrtIconFilter14\" */ },\n\t/*::[*/0x049E/*::]*/: { /* n:\"BrtPivotCacheConnectionName\" */ },\n\t/*::[*/0x0800/*::]*/: { /* n:\"BrtBeginDecoupledPivotCacheIDs\", */ T:1 },\n\t/*::[*/0x0801/*::]*/: { /* n:\"BrtEndDecoupledPivotCacheIDs\", */ T:-1 },\n\t/*::[*/0x0802/*::]*/: { /* n:\"BrtDecoupledPivotCacheID\" */ },\n\t/*::[*/0x0803/*::]*/: { /* n:\"BrtBeginPivotTableRefs\", */ T:1 },\n\t/*::[*/0x0804/*::]*/: { /* n:\"BrtEndPivotTableRefs\", */ T:-1 },\n\t/*::[*/0x0805/*::]*/: { /* n:\"BrtPivotTableRef\" */ },\n\t/*::[*/0x0806/*::]*/: { /* n:\"BrtSlicerCacheBookPivotTables\" */ },\n\t/*::[*/0x0807/*::]*/: { /* n:\"BrtBeginSxvcells\", */ T:1 },\n\t/*::[*/0x0808/*::]*/: { /* n:\"BrtEndSxvcells\", */ T:-1 },\n\t/*::[*/0x0809/*::]*/: { /* n:\"BrtBeginSxRow\", */ T:1 },\n\t/*::[*/0x080A/*::]*/: { /* n:\"BrtEndSxRow\", */ T:-1 },\n\t/*::[*/0x080C/*::]*/: { /* n:\"BrtPcdCalcMem15\" */ },\n\t/*::[*/0x0813/*::]*/: { /* n:\"BrtQsi15\" */ },\n\t/*::[*/0x0814/*::]*/: { /* n:\"BrtBeginWebExtensions\", */ T:1 },\n\t/*::[*/0x0815/*::]*/: { /* n:\"BrtEndWebExtensions\", */ T:-1 },\n\t/*::[*/0x0816/*::]*/: { /* n:\"BrtWebExtension\" */ },\n\t/*::[*/0x0817/*::]*/: { /* n:\"BrtAbsPath15\" */ },\n\t/*::[*/0x0818/*::]*/: { /* n:\"BrtBeginPivotTableUISettings\", */ T:1 },\n\t/*::[*/0x0819/*::]*/: { /* n:\"BrtEndPivotTableUISettings\", */ T:-1 },\n\t/*::[*/0x081B/*::]*/: { /* n:\"BrtTableSlicerCacheIDs\" */ },\n\t/*::[*/0x081C/*::]*/: { /* n:\"BrtTableSlicerCacheID\" */ },\n\t/*::[*/0x081D/*::]*/: { /* n:\"BrtBeginTableSlicerCache\", */ T:1 },\n\t/*::[*/0x081E/*::]*/: { /* n:\"BrtEndTableSlicerCache\", */ T:-1 },\n\t/*::[*/0x081F/*::]*/: { /* n:\"BrtSxFilter15\" */ },\n\t/*::[*/0x0820/*::]*/: { /* n:\"BrtBeginTimelineCachePivotCacheIDs\", */ T:1 },\n\t/*::[*/0x0821/*::]*/: { /* n:\"BrtEndTimelineCachePivotCacheIDs\", */ T:-1 },\n\t/*::[*/0x0822/*::]*/: { /* n:\"BrtTimelineCachePivotCacheID\" */ },\n\t/*::[*/0x0823/*::]*/: { /* n:\"BrtBeginTimelineCacheIDs\", */ T:1 },\n\t/*::[*/0x0824/*::]*/: { /* n:\"BrtEndTimelineCacheIDs\", */ T:-1 },\n\t/*::[*/0x0825/*::]*/: { /* n:\"BrtBeginTimelineCacheID\", */ T:1 },\n\t/*::[*/0x0826/*::]*/: { /* n:\"BrtEndTimelineCacheID\", */ T:-1 },\n\t/*::[*/0x0827/*::]*/: { /* n:\"BrtBeginTimelinesEx\", */ T:1 },\n\t/*::[*/0x0828/*::]*/: { /* n:\"BrtEndTimelinesEx\", */ T:-1 },\n\t/*::[*/0x0829/*::]*/: { /* n:\"BrtBeginTimelineEx\", */ T:1 },\n\t/*::[*/0x082A/*::]*/: { /* n:\"BrtEndTimelineEx\", */ T:-1 },\n\t/*::[*/0x082B/*::]*/: { /* n:\"BrtWorkBookPr15\" */ },\n\t/*::[*/0x082C/*::]*/: { /* n:\"BrtPCDH15\" */ },\n\t/*::[*/0x082D/*::]*/: { /* n:\"BrtBeginTimelineStyle\", */ T:1 },\n\t/*::[*/0x082E/*::]*/: { /* n:\"BrtEndTimelineStyle\", */ T:-1 },\n\t/*::[*/0x082F/*::]*/: { /* n:\"BrtTimelineStyleElement\" */ },\n\t/*::[*/0x0830/*::]*/: { /* n:\"BrtBeginTimelineStylesheetExt15\", */ T:1 },\n\t/*::[*/0x0831/*::]*/: { /* n:\"BrtEndTimelineStylesheetExt15\", */ T:-1 },\n\t/*::[*/0x0832/*::]*/: { /* n:\"BrtBeginTimelineStyles\", */ T:1 },\n\t/*::[*/0x0833/*::]*/: { /* n:\"BrtEndTimelineStyles\", */ T:-1 },\n\t/*::[*/0x0834/*::]*/: { /* n:\"BrtBeginTimelineStyleElements\", */ T:1 },\n\t/*::[*/0x0835/*::]*/: { /* n:\"BrtEndTimelineStyleElements\", */ T:-1 },\n\t/*::[*/0x0836/*::]*/: { /* n:\"BrtDxf15\" */ },\n\t/*::[*/0x0837/*::]*/: { /* n:\"BrtBeginDxfs15\", */ T:1 },\n\t/*::[*/0x0838/*::]*/: { /* n:\"BrtEndDxfs15\", */ T:-1 },\n\t/*::[*/0x0839/*::]*/: { /* n:\"BrtSlicerCacheHideItemsWithNoData\" */ },\n\t/*::[*/0x083A/*::]*/: { /* n:\"BrtBeginItemUniqueNames\", */ T:1 },\n\t/*::[*/0x083B/*::]*/: { /* n:\"BrtEndItemUniqueNames\", */ T:-1 },\n\t/*::[*/0x083C/*::]*/: { /* n:\"BrtItemUniqueName\" */ },\n\t/*::[*/0x083D/*::]*/: { /* n:\"BrtBeginExtConn15\", */ T:1 },\n\t/*::[*/0x083E/*::]*/: { /* n:\"BrtEndExtConn15\", */ T:-1 },\n\t/*::[*/0x083F/*::]*/: { /* n:\"BrtBeginOledbPr15\", */ T:1 },\n\t/*::[*/0x0840/*::]*/: { /* n:\"BrtEndOledbPr15\", */ T:-1 },\n\t/*::[*/0x0841/*::]*/: { /* n:\"BrtBeginDataFeedPr15\", */ T:1 },\n\t/*::[*/0x0842/*::]*/: { /* n:\"BrtEndDataFeedPr15\", */ T:-1 },\n\t/*::[*/0x0843/*::]*/: { /* n:\"BrtTextPr15\" */ },\n\t/*::[*/0x0844/*::]*/: { /* n:\"BrtRangePr15\" */ },\n\t/*::[*/0x0845/*::]*/: { /* n:\"BrtDbCommand15\" */ },\n\t/*::[*/0x0846/*::]*/: { /* n:\"BrtBeginDbTables15\", */ T:1 },\n\t/*::[*/0x0847/*::]*/: { /* n:\"BrtEndDbTables15\", */ T:-1 },\n\t/*::[*/0x0848/*::]*/: { /* n:\"BrtDbTable15\" */ },\n\t/*::[*/0x0849/*::]*/: { /* n:\"BrtBeginDataModel\", */ T:1 },\n\t/*::[*/0x084A/*::]*/: { /* n:\"BrtEndDataModel\", */ T:-1 },\n\t/*::[*/0x084B/*::]*/: { /* n:\"BrtBeginModelTables\", */ T:1 },\n\t/*::[*/0x084C/*::]*/: { /* n:\"BrtEndModelTables\", */ T:-1 },\n\t/*::[*/0x084D/*::]*/: { /* n:\"BrtModelTable\" */ },\n\t/*::[*/0x084E/*::]*/: { /* n:\"BrtBeginModelRelationships\", */ T:1 },\n\t/*::[*/0x084F/*::]*/: { /* n:\"BrtEndModelRelationships\", */ T:-1 },\n\t/*::[*/0x0850/*::]*/: { /* n:\"BrtModelRelationship\" */ },\n\t/*::[*/0x0851/*::]*/: { /* n:\"BrtBeginECTxtWiz15\", */ T:1 },\n\t/*::[*/0x0852/*::]*/: { /* n:\"BrtEndECTxtWiz15\", */ T:-1 },\n\t/*::[*/0x0853/*::]*/: { /* n:\"BrtBeginECTWFldInfoLst15\", */ T:1 },\n\t/*::[*/0x0854/*::]*/: { /* n:\"BrtEndECTWFldInfoLst15\", */ T:-1 },\n\t/*::[*/0x0855/*::]*/: { /* n:\"BrtBeginECTWFldInfo15\", */ T:1 },\n\t/*::[*/0x0856/*::]*/: { /* n:\"BrtFieldListActiveItem\" */ },\n\t/*::[*/0x0857/*::]*/: { /* n:\"BrtPivotCacheIdVersion\" */ },\n\t/*::[*/0x0858/*::]*/: { /* n:\"BrtSXDI15\" */ },\n\t/*::[*/0x0859/*::]*/: { /* n:\"BrtBeginModelTimeGroupings\", */ T:1 },\n\t/*::[*/0x085A/*::]*/: { /* n:\"BrtEndModelTimeGroupings\", */ T:-1 },\n\t/*::[*/0x085B/*::]*/: { /* n:\"BrtBeginModelTimeGrouping\", */ T:1 },\n\t/*::[*/0x085C/*::]*/: { /* n:\"BrtEndModelTimeGrouping\", */ T:-1 },\n\t/*::[*/0x085D/*::]*/: { /* n:\"BrtModelTimeGroupingCalcCol\" */ },\n\t/*::[*/0x0C00/*::]*/: { /* n:\"BrtUid\" */ },\n\t/*::[*/0x0C01/*::]*/: { /* n:\"BrtRevisionPtr\" */ },\n\t/*::[*/0x1000/*::]*/: { /* n:\"BrtBeginDynamicArrayPr\", */ T:1 },\n\t/*::[*/0x1001/*::]*/: { /* n:\"BrtEndDynamicArrayPr\", */ T:-1 },\n\t/*::[*/0x138A/*::]*/: { /* n:\"BrtBeginRichValueBlock\", */ T:1 },\n\t/*::[*/0x138B/*::]*/: { /* n:\"BrtEndRichValueBlock\", */ T:-1 },\n\t/*::[*/0x13D9/*::]*/: { /* n:\"BrtBeginRichFilters\", */ T:1 },\n\t/*::[*/0x13DA/*::]*/: { /* n:\"BrtEndRichFilters\", */ T:-1 },\n\t/*::[*/0x13DB/*::]*/: { /* n:\"BrtRichFilter\" */ },\n\t/*::[*/0x13DC/*::]*/: { /* n:\"BrtBeginRichFilterColumn\", */ T:1 },\n\t/*::[*/0x13DD/*::]*/: { /* n:\"BrtEndRichFilterColumn\", */ T:-1 },\n\t/*::[*/0x13DE/*::]*/: { /* n:\"BrtBeginCustomRichFilters\", */ T:1 },\n\t/*::[*/0x13DF/*::]*/: { /* n:\"BrtEndCustomRichFilters\", */ T:-1 },\n\t/*::[*/0x13E0/*::]*/: { /* n:\"BrtCustomRichFilter\" */ },\n\t/*::[*/0x13E1/*::]*/: { /* n:\"BrtTop10RichFilter\" */ },\n\t/*::[*/0x13E2/*::]*/: { /* n:\"BrtDynamicRichFilter\" */ },\n\t/*::[*/0x13E4/*::]*/: { /* n:\"BrtBeginRichSortCondition\", */ T:1 },\n\t/*::[*/0x13E5/*::]*/: { /* n:\"BrtEndRichSortCondition\", */ T:-1 },\n\t/*::[*/0x13E6/*::]*/: { /* n:\"BrtRichFilterDateGroupItem\" */ },\n\t/*::[*/0x13E7/*::]*/: { /* n:\"BrtBeginCalcFeatures\", */ T:1 },\n\t/*::[*/0x13E8/*::]*/: { /* n:\"BrtEndCalcFeatures\", */ T:-1 },\n\t/*::[*/0x13E9/*::]*/: { /* n:\"BrtCalcFeature\" */ },\n\t/*::[*/0x13EB/*::]*/: { /* n:\"BrtExternalLinksPr\" */ },\n\t/*::[*/0xFFFF/*::]*/: { n:\"\" }\n};\n\n/* [MS-XLS] 2.3 Record Enumeration (and other sources) */\nvar XLSRecordEnum = {\n\t/* [MS-XLS] 2.3 Record Enumeration 2021-08-17 */\n\t/*::[*/0x0006/*::]*/: { /* n:\"Formula\", */ f:parse_Formula },\n\t/*::[*/0x000a/*::]*/: { /* n:\"EOF\", */ f:parsenoop2 },\n\t/*::[*/0x000c/*::]*/: { /* n:\"CalcCount\", */ f:parseuint16 }, //\n\t/*::[*/0x000d/*::]*/: { /* n:\"CalcMode\", */ f:parseuint16 }, //\n\t/*::[*/0x000e/*::]*/: { /* n:\"CalcPrecision\", */ f:parsebool }, //\n\t/*::[*/0x000f/*::]*/: { /* n:\"CalcRefMode\", */ f:parsebool }, //\n\t/*::[*/0x0010/*::]*/: { /* n:\"CalcDelta\", */ f:parse_Xnum }, //\n\t/*::[*/0x0011/*::]*/: { /* n:\"CalcIter\", */ f:parsebool }, //\n\t/*::[*/0x0012/*::]*/: { /* n:\"Protect\", */ f:parsebool },\n\t/*::[*/0x0013/*::]*/: { /* n:\"Password\", */ f:parseuint16 },\n\t/*::[*/0x0014/*::]*/: { /* n:\"Header\", */ f:parse_XLHeaderFooter },\n\t/*::[*/0x0015/*::]*/: { /* n:\"Footer\", */ f:parse_XLHeaderFooter },\n\t/*::[*/0x0017/*::]*/: { /* n:\"ExternSheet\", */ f:parse_ExternSheet },\n\t/*::[*/0x0018/*::]*/: { /* n:\"Lbl\", */ f:parse_Lbl },\n\t/*::[*/0x0019/*::]*/: { /* n:\"WinProtect\", */ f:parsebool },\n\t/*::[*/0x001a/*::]*/: { /* n:\"VerticalPageBreaks\", */ },\n\t/*::[*/0x001b/*::]*/: { /* n:\"HorizontalPageBreaks\", */ },\n\t/*::[*/0x001c/*::]*/: { /* n:\"Note\", */ f:parse_Note },\n\t/*::[*/0x001d/*::]*/: { /* n:\"Selection\", */ },\n\t/*::[*/0x0022/*::]*/: { /* n:\"Date1904\", */ f:parsebool },\n\t/*::[*/0x0023/*::]*/: { /* n:\"ExternName\", */ f:parse_ExternName },\n\t/*::[*/0x0026/*::]*/: { /* n:\"LeftMargin\", */ f:parse_Xnum }, // *\n\t/*::[*/0x0027/*::]*/: { /* n:\"RightMargin\", */ f:parse_Xnum }, // *\n\t/*::[*/0x0028/*::]*/: { /* n:\"TopMargin\", */ f:parse_Xnum }, // *\n\t/*::[*/0x0029/*::]*/: { /* n:\"BottomMargin\", */ f:parse_Xnum }, // *\n\t/*::[*/0x002a/*::]*/: { /* n:\"PrintRowCol\", */ f:parsebool },\n\t/*::[*/0x002b/*::]*/: { /* n:\"PrintGrid\", */ f:parsebool },\n\t/*::[*/0x002f/*::]*/: { /* n:\"FilePass\", */ f:parse_FilePass },\n\t/*::[*/0x0031/*::]*/: { /* n:\"Font\", */ f:parse_Font },\n\t/*::[*/0x0033/*::]*/: { /* n:\"PrintSize\", */ f:parseuint16 },\n\t/*::[*/0x003c/*::]*/: { /* n:\"Continue\", */ },\n\t/*::[*/0x003d/*::]*/: { /* n:\"Window1\", */ f:parse_Window1 },\n\t/*::[*/0x0040/*::]*/: { /* n:\"Backup\", */ f:parsebool },\n\t/*::[*/0x0041/*::]*/: { /* n:\"Pane\", */ f:parse_Pane },\n\t/*::[*/0x0042/*::]*/: { /* n:\"CodePage\", */ f:parseuint16 },\n\t/*::[*/0x004d/*::]*/: { /* n:\"Pls\", */ },\n\t/*::[*/0x0050/*::]*/: { /* n:\"DCon\", */ },\n\t/*::[*/0x0051/*::]*/: { /* n:\"DConRef\", */ },\n\t/*::[*/0x0052/*::]*/: { /* n:\"DConName\", */ },\n\t/*::[*/0x0055/*::]*/: { /* n:\"DefColWidth\", */ f:parseuint16 },\n\t/*::[*/0x0059/*::]*/: { /* n:\"XCT\", */ },\n\t/*::[*/0x005a/*::]*/: { /* n:\"CRN\", */ },\n\t/*::[*/0x005b/*::]*/: { /* n:\"FileSharing\", */ },\n\t/*::[*/0x005c/*::]*/: { /* n:\"WriteAccess\", */ f:parse_WriteAccess },\n\t/*::[*/0x005d/*::]*/: { /* n:\"Obj\", */ f:parse_Obj },\n\t/*::[*/0x005e/*::]*/: { /* n:\"Uncalced\", */ },\n\t/*::[*/0x005f/*::]*/: { /* n:\"CalcSaveRecalc\", */ f:parsebool }, //\n\t/*::[*/0x0060/*::]*/: { /* n:\"Template\", */ },\n\t/*::[*/0x0061/*::]*/: { /* n:\"Intl\", */ },\n\t/*::[*/0x0063/*::]*/: { /* n:\"ObjProtect\", */ f:parsebool },\n\t/*::[*/0x007d/*::]*/: { /* n:\"ColInfo\", */ f:parse_ColInfo },\n\t/*::[*/0x0080/*::]*/: { /* n:\"Guts\", */ f:parse_Guts },\n\t/*::[*/0x0081/*::]*/: { /* n:\"WsBool\", */ f:parse_WsBool },\n\t/*::[*/0x0082/*::]*/: { /* n:\"GridSet\", */ f:parseuint16 },\n\t/*::[*/0x0083/*::]*/: { /* n:\"HCenter\", */ f:parsebool },\n\t/*::[*/0x0084/*::]*/: { /* n:\"VCenter\", */ f:parsebool },\n\t/*::[*/0x0085/*::]*/: { /* n:\"BoundSheet8\", */ f:parse_BoundSheet8 },\n\t/*::[*/0x0086/*::]*/: { /* n:\"WriteProtect\", */ },\n\t/*::[*/0x008c/*::]*/: { /* n:\"Country\", */ f:parse_Country },\n\t/*::[*/0x008d/*::]*/: { /* n:\"HideObj\", */ f:parseuint16 },\n\t/*::[*/0x0090/*::]*/: { /* n:\"Sort\", */ },\n\t/*::[*/0x0092/*::]*/: { /* n:\"Palette\", */ f:parse_Palette },\n\t/*::[*/0x0097/*::]*/: { /* n:\"Sync\", */ },\n\t/*::[*/0x0098/*::]*/: { /* n:\"LPr\", */ },\n\t/*::[*/0x0099/*::]*/: { /* n:\"DxGCol\", */ },\n\t/*::[*/0x009a/*::]*/: { /* n:\"FnGroupName\", */ },\n\t/*::[*/0x009b/*::]*/: { /* n:\"FilterMode\", */ },\n\t/*::[*/0x009c/*::]*/: { /* n:\"BuiltInFnGroupCount\", */ f:parseuint16 },\n\t/*::[*/0x009d/*::]*/: { /* n:\"AutoFilterInfo\", */ },\n\t/*::[*/0x009e/*::]*/: { /* n:\"AutoFilter\", */ },\n\t/*::[*/0x00a0/*::]*/: { /* n:\"Scl\", */ f:parse_Scl },\n\t/*::[*/0x00a1/*::]*/: { /* n:\"Setup\", */ f:parse_Setup },\n\t/*::[*/0x00ae/*::]*/: { /* n:\"ScenMan\", */ },\n\t/*::[*/0x00af/*::]*/: { /* n:\"SCENARIO\", */ },\n\t/*::[*/0x00b0/*::]*/: { /* n:\"SxView\", */ },\n\t/*::[*/0x00b1/*::]*/: { /* n:\"Sxvd\", */ },\n\t/*::[*/0x00b2/*::]*/: { /* n:\"SXVI\", */ },\n\t/*::[*/0x00b4/*::]*/: { /* n:\"SxIvd\", */ },\n\t/*::[*/0x00b5/*::]*/: { /* n:\"SXLI\", */ },\n\t/*::[*/0x00b6/*::]*/: { /* n:\"SXPI\", */ },\n\t/*::[*/0x00b8/*::]*/: { /* n:\"DocRoute\", */ },\n\t/*::[*/0x00b9/*::]*/: { /* n:\"RecipName\", */ },\n\t/*::[*/0x00bd/*::]*/: { /* n:\"MulRk\", */ f:parse_MulRk },\n\t/*::[*/0x00be/*::]*/: { /* n:\"MulBlank\", */ f:parse_MulBlank },\n\t/*::[*/0x00c1/*::]*/: { /* n:\"Mms\", */ f:parsenoop2 },\n\t/*::[*/0x00c5/*::]*/: { /* n:\"SXDI\", */ },\n\t/*::[*/0x00c6/*::]*/: { /* n:\"SXDB\", */ },\n\t/*::[*/0x00c7/*::]*/: { /* n:\"SXFDB\", */ },\n\t/*::[*/0x00c8/*::]*/: { /* n:\"SXDBB\", */ },\n\t/*::[*/0x00c9/*::]*/: { /* n:\"SXNum\", */ },\n\t/*::[*/0x00ca/*::]*/: { /* n:\"SxBool\", */ f:parsebool },\n\t/*::[*/0x00cb/*::]*/: { /* n:\"SxErr\", */ },\n\t/*::[*/0x00cc/*::]*/: { /* n:\"SXInt\", */ },\n\t/*::[*/0x00cd/*::]*/: { /* n:\"SXString\", */ },\n\t/*::[*/0x00ce/*::]*/: { /* n:\"SXDtr\", */ },\n\t/*::[*/0x00cf/*::]*/: { /* n:\"SxNil\", */ },\n\t/*::[*/0x00d0/*::]*/: { /* n:\"SXTbl\", */ },\n\t/*::[*/0x00d1/*::]*/: { /* n:\"SXTBRGIITM\", */ },\n\t/*::[*/0x00d2/*::]*/: { /* n:\"SxTbpg\", */ },\n\t/*::[*/0x00d3/*::]*/: { /* n:\"ObProj\", */ },\n\t/*::[*/0x00d5/*::]*/: { /* n:\"SXStreamID\", */ },\n\t/*::[*/0x00d7/*::]*/: { /* n:\"DBCell\", */ },\n\t/*::[*/0x00d8/*::]*/: { /* n:\"SXRng\", */ },\n\t/*::[*/0x00d9/*::]*/: { /* n:\"SxIsxoper\", */ },\n\t/*::[*/0x00da/*::]*/: { /* n:\"BookBool\", */ f:parseuint16 },\n\t/*::[*/0x00dc/*::]*/: { /* n:\"DbOrParamQry\", */ },\n\t/*::[*/0x00dd/*::]*/: { /* n:\"ScenarioProtect\", */ f:parsebool },\n\t/*::[*/0x00de/*::]*/: { /* n:\"OleObjectSize\", */ },\n\t/*::[*/0x00e0/*::]*/: { /* n:\"XF\", */ f:parse_XF },\n\t/*::[*/0x00e1/*::]*/: { /* n:\"InterfaceHdr\", */ f:parse_InterfaceHdr },\n\t/*::[*/0x00e2/*::]*/: { /* n:\"InterfaceEnd\", */ f:parsenoop2 },\n\t/*::[*/0x00e3/*::]*/: { /* n:\"SXVS\", */ },\n\t/*::[*/0x00e5/*::]*/: { /* n:\"MergeCells\", */ f:parse_MergeCells },\n\t/*::[*/0x00e9/*::]*/: { /* n:\"BkHim\", */ },\n\t/*::[*/0x00eb/*::]*/: { /* n:\"MsoDrawingGroup\", */ },\n\t/*::[*/0x00ec/*::]*/: { /* n:\"MsoDrawing\", */ },\n\t/*::[*/0x00ed/*::]*/: { /* n:\"MsoDrawingSelection\", */ },\n\t/*::[*/0x00ef/*::]*/: { /* n:\"PhoneticInfo\", */ },\n\t/*::[*/0x00f0/*::]*/: { /* n:\"SxRule\", */ },\n\t/*::[*/0x00f1/*::]*/: { /* n:\"SXEx\", */ },\n\t/*::[*/0x00f2/*::]*/: { /* n:\"SxFilt\", */ },\n\t/*::[*/0x00f4/*::]*/: { /* n:\"SxDXF\", */ },\n\t/*::[*/0x00f5/*::]*/: { /* n:\"SxItm\", */ },\n\t/*::[*/0x00f6/*::]*/: { /* n:\"SxName\", */ },\n\t/*::[*/0x00f7/*::]*/: { /* n:\"SxSelect\", */ },\n\t/*::[*/0x00f8/*::]*/: { /* n:\"SXPair\", */ },\n\t/*::[*/0x00f9/*::]*/: { /* n:\"SxFmla\", */ },\n\t/*::[*/0x00fb/*::]*/: { /* n:\"SxFormat\", */ },\n\t/*::[*/0x00fc/*::]*/: { /* n:\"SST\", */ f:parse_SST },\n\t/*::[*/0x00fd/*::]*/: { /* n:\"LabelSst\", */ f:parse_LabelSst },\n\t/*::[*/0x00ff/*::]*/: { /* n:\"ExtSST\", */ f:parse_ExtSST },\n\t/*::[*/0x0100/*::]*/: { /* n:\"SXVDEx\", */ },\n\t/*::[*/0x0103/*::]*/: { /* n:\"SXFormula\", */ },\n\t/*::[*/0x0122/*::]*/: { /* n:\"SXDBEx\", */ },\n\t/*::[*/0x0137/*::]*/: { /* n:\"RRDInsDel\", */ },\n\t/*::[*/0x0138/*::]*/: { /* n:\"RRDHead\", */ },\n\t/*::[*/0x013b/*::]*/: { /* n:\"RRDChgCell\", */ },\n\t/*::[*/0x013d/*::]*/: { /* n:\"RRTabId\", */ f:parseuint16a },\n\t/*::[*/0x013e/*::]*/: { /* n:\"RRDRenSheet\", */ },\n\t/*::[*/0x013f/*::]*/: { /* n:\"RRSort\", */ },\n\t/*::[*/0x0140/*::]*/: { /* n:\"RRDMove\", */ },\n\t/*::[*/0x014a/*::]*/: { /* n:\"RRFormat\", */ },\n\t/*::[*/0x014b/*::]*/: { /* n:\"RRAutoFmt\", */ },\n\t/*::[*/0x014d/*::]*/: { /* n:\"RRInsertSh\", */ },\n\t/*::[*/0x014e/*::]*/: { /* n:\"RRDMoveBegin\", */ },\n\t/*::[*/0x014f/*::]*/: { /* n:\"RRDMoveEnd\", */ },\n\t/*::[*/0x0150/*::]*/: { /* n:\"RRDInsDelBegin\", */ },\n\t/*::[*/0x0151/*::]*/: { /* n:\"RRDInsDelEnd\", */ },\n\t/*::[*/0x0152/*::]*/: { /* n:\"RRDConflict\", */ },\n\t/*::[*/0x0153/*::]*/: { /* n:\"RRDDefName\", */ },\n\t/*::[*/0x0154/*::]*/: { /* n:\"RRDRstEtxp\", */ },\n\t/*::[*/0x015f/*::]*/: { /* n:\"LRng\", */ },\n\t/*::[*/0x0160/*::]*/: { /* n:\"UsesELFs\", */ f:parsebool },\n\t/*::[*/0x0161/*::]*/: { /* n:\"DSF\", */ f:parsenoop2 },\n\t/*::[*/0x0191/*::]*/: { /* n:\"CUsr\", */ },\n\t/*::[*/0x0192/*::]*/: { /* n:\"CbUsr\", */ },\n\t/*::[*/0x0193/*::]*/: { /* n:\"UsrInfo\", */ },\n\t/*::[*/0x0194/*::]*/: { /* n:\"UsrExcl\", */ },\n\t/*::[*/0x0195/*::]*/: { /* n:\"FileLock\", */ },\n\t/*::[*/0x0196/*::]*/: { /* n:\"RRDInfo\", */ },\n\t/*::[*/0x0197/*::]*/: { /* n:\"BCUsrs\", */ },\n\t/*::[*/0x0198/*::]*/: { /* n:\"UsrChk\", */ },\n\t/*::[*/0x01a9/*::]*/: { /* n:\"UserBView\", */ },\n\t/*::[*/0x01aa/*::]*/: { /* n:\"UserSViewBegin\", */ },\n\t/*::[*/0x01ab/*::]*/: { /* n:\"UserSViewEnd\", */ },\n\t/*::[*/0x01ac/*::]*/: { /* n:\"RRDUserView\", */ },\n\t/*::[*/0x01ad/*::]*/: { /* n:\"Qsi\", */ },\n\t/*::[*/0x01ae/*::]*/: { /* n:\"SupBook\", */ f:parse_SupBook },\n\t/*::[*/0x01af/*::]*/: { /* n:\"Prot4Rev\", */ f:parsebool },\n\t/*::[*/0x01b0/*::]*/: { /* n:\"CondFmt\", */ },\n\t/*::[*/0x01b1/*::]*/: { /* n:\"CF\", */ },\n\t/*::[*/0x01b2/*::]*/: { /* n:\"DVal\", */ },\n\t/*::[*/0x01b5/*::]*/: { /* n:\"DConBin\", */ },\n\t/*::[*/0x01b6/*::]*/: { /* n:\"TxO\", */ f:parse_TxO },\n\t/*::[*/0x01b7/*::]*/: { /* n:\"RefreshAll\", */ f:parsebool }, //\n\t/*::[*/0x01b8/*::]*/: { /* n:\"HLink\", */ f:parse_HLink },\n\t/*::[*/0x01b9/*::]*/: { /* n:\"Lel\", */ },\n\t/*::[*/0x01ba/*::]*/: { /* n:\"CodeName\", */ f:parse_XLUnicodeString },\n\t/*::[*/0x01bb/*::]*/: { /* n:\"SXFDBType\", */ },\n\t/*::[*/0x01bc/*::]*/: { /* n:\"Prot4RevPass\", */ f:parseuint16 },\n\t/*::[*/0x01bd/*::]*/: { /* n:\"ObNoMacros\", */ },\n\t/*::[*/0x01be/*::]*/: { /* n:\"Dv\", */ },\n\t/*::[*/0x01c0/*::]*/: { /* n:\"Excel9File\", */ f:parsenoop2 },\n\t/*::[*/0x01c1/*::]*/: { /* n:\"RecalcId\", */ f:parse_RecalcId, r:2},\n\t/*::[*/0x01c2/*::]*/: { /* n:\"EntExU2\", */ f:parsenoop2 },\n\t/*::[*/0x0200/*::]*/: { /* n:\"Dimensions\", */ f:parse_Dimensions },\n\t/*::[*/0x0201/*::]*/: { /* n:\"Blank\", */ f:parse_Blank },\n\t/*::[*/0x0203/*::]*/: { /* n:\"Number\", */ f:parse_Number },\n\t/*::[*/0x0204/*::]*/: { /* n:\"Label\", */ f:parse_Label },\n\t/*::[*/0x0205/*::]*/: { /* n:\"BoolErr\", */ f:parse_BoolErr },\n\t/*::[*/0x0207/*::]*/: { /* n:\"String\", */ f:parse_String },\n\t/*::[*/0x0208/*::]*/: { /* n:\"Row\", */ f:parse_Row },\n\t/*::[*/0x020b/*::]*/: { /* n:\"Index\", */ },\n\t/*::[*/0x0221/*::]*/: { /* n:\"Array\", */ f:parse_Array },\n\t/*::[*/0x0225/*::]*/: { /* n:\"DefaultRowHeight\", */ f:parse_DefaultRowHeight },\n\t/*::[*/0x0236/*::]*/: { /* n:\"Table\", */ },\n\t/*::[*/0x023e/*::]*/: { /* n:\"Window2\", */ f:parse_Window2 },\n\t/*::[*/0x027e/*::]*/: { /* n:\"RK\", */ f:parse_RK },\n\t/*::[*/0x0293/*::]*/: { /* n:\"Style\", */ },\n\t/*::[*/0x0418/*::]*/: { /* n:\"BigName\", */ },\n\t/*::[*/0x041e/*::]*/: { /* n:\"Format\", */ f:parse_Format },\n\t/*::[*/0x043c/*::]*/: { /* n:\"ContinueBigName\", */ },\n\t/*::[*/0x04bc/*::]*/: { /* n:\"ShrFmla\", */ f:parse_ShrFmla },\n\t/*::[*/0x0800/*::]*/: { /* n:\"HLinkTooltip\", */ f:parse_HLinkTooltip },\n\t/*::[*/0x0801/*::]*/: { /* n:\"WebPub\", */ },\n\t/*::[*/0x0802/*::]*/: { /* n:\"QsiSXTag\", */ },\n\t/*::[*/0x0803/*::]*/: { /* n:\"DBQueryExt\", */ },\n\t/*::[*/0x0804/*::]*/: { /* n:\"ExtString\", */ },\n\t/*::[*/0x0805/*::]*/: { /* n:\"TxtQry\", */ },\n\t/*::[*/0x0806/*::]*/: { /* n:\"Qsir\", */ },\n\t/*::[*/0x0807/*::]*/: { /* n:\"Qsif\", */ },\n\t/*::[*/0x0808/*::]*/: { /* n:\"RRDTQSIF\", */ },\n\t/*::[*/0x0809/*::]*/: { /* n:\"BOF\", */ f:parse_BOF },\n\t/*::[*/0x080a/*::]*/: { /* n:\"OleDbConn\", */ },\n\t/*::[*/0x080b/*::]*/: { /* n:\"WOpt\", */ },\n\t/*::[*/0x080c/*::]*/: { /* n:\"SXViewEx\", */ },\n\t/*::[*/0x080d/*::]*/: { /* n:\"SXTH\", */ },\n\t/*::[*/0x080e/*::]*/: { /* n:\"SXPIEx\", */ },\n\t/*::[*/0x080f/*::]*/: { /* n:\"SXVDTEx\", */ },\n\t/*::[*/0x0810/*::]*/: { /* n:\"SXViewEx9\", */ },\n\t/*::[*/0x0812/*::]*/: { /* n:\"ContinueFrt\", */ },\n\t/*::[*/0x0813/*::]*/: { /* n:\"RealTimeData\", */ },\n\t/*::[*/0x0850/*::]*/: { /* n:\"ChartFrtInfo\", */ },\n\t/*::[*/0x0851/*::]*/: { /* n:\"FrtWrapper\", */ },\n\t/*::[*/0x0852/*::]*/: { /* n:\"StartBlock\", */ },\n\t/*::[*/0x0853/*::]*/: { /* n:\"EndBlock\", */ },\n\t/*::[*/0x0854/*::]*/: { /* n:\"StartObject\", */ },\n\t/*::[*/0x0855/*::]*/: { /* n:\"EndObject\", */ },\n\t/*::[*/0x0856/*::]*/: { /* n:\"CatLab\", */ },\n\t/*::[*/0x0857/*::]*/: { /* n:\"YMult\", */ },\n\t/*::[*/0x0858/*::]*/: { /* n:\"SXViewLink\", */ },\n\t/*::[*/0x0859/*::]*/: { /* n:\"PivotChartBits\", */ },\n\t/*::[*/0x085a/*::]*/: { /* n:\"FrtFontList\", */ },\n\t/*::[*/0x0862/*::]*/: { /* n:\"SheetExt\", */ },\n\t/*::[*/0x0863/*::]*/: { /* n:\"BookExt\", */ r:12},\n\t/*::[*/0x0864/*::]*/: { /* n:\"SXAddl\", */ },\n\t/*::[*/0x0865/*::]*/: { /* n:\"CrErr\", */ },\n\t/*::[*/0x0866/*::]*/: { /* n:\"HFPicture\", */ },\n\t/*::[*/0x0867/*::]*/: { /* n:\"FeatHdr\", */ f:parsenoop2 },\n\t/*::[*/0x0868/*::]*/: { /* n:\"Feat\", */ },\n\t/*::[*/0x086a/*::]*/: { /* n:\"DataLabExt\", */ },\n\t/*::[*/0x086b/*::]*/: { /* n:\"DataLabExtContents\", */ },\n\t/*::[*/0x086c/*::]*/: { /* n:\"CellWatch\", */ },\n\t/*::[*/0x0871/*::]*/: { /* n:\"FeatHdr11\", */ },\n\t/*::[*/0x0872/*::]*/: { /* n:\"Feature11\", */ },\n\t/*::[*/0x0874/*::]*/: { /* n:\"DropDownObjIds\", */ },\n\t/*::[*/0x0875/*::]*/: { /* n:\"ContinueFrt11\", */ },\n\t/*::[*/0x0876/*::]*/: { /* n:\"DConn\", */ },\n\t/*::[*/0x0877/*::]*/: { /* n:\"List12\", */ },\n\t/*::[*/0x0878/*::]*/: { /* n:\"Feature12\", */ },\n\t/*::[*/0x0879/*::]*/: { /* n:\"CondFmt12\", */ },\n\t/*::[*/0x087a/*::]*/: { /* n:\"CF12\", */ },\n\t/*::[*/0x087b/*::]*/: { /* n:\"CFEx\", */ },\n\t/*::[*/0x087c/*::]*/: { /* n:\"XFCRC\", */ f:parse_XFCRC, r:12 },\n\t/*::[*/0x087d/*::]*/: { /* n:\"XFExt\", */ f:parse_XFExt, r:12 },\n\t/*::[*/0x087e/*::]*/: { /* n:\"AutoFilter12\", */ },\n\t/*::[*/0x087f/*::]*/: { /* n:\"ContinueFrt12\", */ },\n\t/*::[*/0x0884/*::]*/: { /* n:\"MDTInfo\", */ },\n\t/*::[*/0x0885/*::]*/: { /* n:\"MDXStr\", */ },\n\t/*::[*/0x0886/*::]*/: { /* n:\"MDXTuple\", */ },\n\t/*::[*/0x0887/*::]*/: { /* n:\"MDXSet\", */ },\n\t/*::[*/0x0888/*::]*/: { /* n:\"MDXProp\", */ },\n\t/*::[*/0x0889/*::]*/: { /* n:\"MDXKPI\", */ },\n\t/*::[*/0x088a/*::]*/: { /* n:\"MDB\", */ },\n\t/*::[*/0x088b/*::]*/: { /* n:\"PLV\", */ },\n\t/*::[*/0x088c/*::]*/: { /* n:\"Compat12\", */ f:parsebool, r:12 },\n\t/*::[*/0x088d/*::]*/: { /* n:\"DXF\", */ },\n\t/*::[*/0x088e/*::]*/: { /* n:\"TableStyles\", */ r:12 },\n\t/*::[*/0x088f/*::]*/: { /* n:\"TableStyle\", */ },\n\t/*::[*/0x0890/*::]*/: { /* n:\"TableStyleElement\", */ },\n\t/*::[*/0x0892/*::]*/: { /* n:\"StyleExt\", */ },\n\t/*::[*/0x0893/*::]*/: { /* n:\"NamePublish\", */ },\n\t/*::[*/0x0894/*::]*/: { /* n:\"NameCmt\", */ f:parse_NameCmt, r:12 },\n\t/*::[*/0x0895/*::]*/: { /* n:\"SortData\", */ },\n\t/*::[*/0x0896/*::]*/: { /* n:\"Theme\", */ f:parse_Theme, r:12 },\n\t/*::[*/0x0897/*::]*/: { /* n:\"GUIDTypeLib\", */ },\n\t/*::[*/0x0898/*::]*/: { /* n:\"FnGrp12\", */ },\n\t/*::[*/0x0899/*::]*/: { /* n:\"NameFnGrp12\", */ },\n\t/*::[*/0x089a/*::]*/: { /* n:\"MTRSettings\", */ f:parse_MTRSettings, r:12 },\n\t/*::[*/0x089b/*::]*/: { /* n:\"CompressPictures\", */ f:parsenoop2 },\n\t/*::[*/0x089c/*::]*/: { /* n:\"HeaderFooter\", */ },\n\t/*::[*/0x089d/*::]*/: { /* n:\"CrtLayout12\", */ },\n\t/*::[*/0x089e/*::]*/: { /* n:\"CrtMlFrt\", */ },\n\t/*::[*/0x089f/*::]*/: { /* n:\"CrtMlFrtContinue\", */ },\n\t/*::[*/0x08a3/*::]*/: { /* n:\"ForceFullCalculation\", */ f:parse_ForceFullCalculation },\n\t/*::[*/0x08a4/*::]*/: { /* n:\"ShapePropsStream\", */ },\n\t/*::[*/0x08a5/*::]*/: { /* n:\"TextPropsStream\", */ },\n\t/*::[*/0x08a6/*::]*/: { /* n:\"RichTextStream\", */ },\n\t/*::[*/0x08a7/*::]*/: { /* n:\"CrtLayout12A\", */ },\n\t/*::[*/0x1001/*::]*/: { /* n:\"Units\", */ },\n\t/*::[*/0x1002/*::]*/: { /* n:\"Chart\", */ },\n\t/*::[*/0x1003/*::]*/: { /* n:\"Series\", */ },\n\t/*::[*/0x1006/*::]*/: { /* n:\"DataFormat\", */ },\n\t/*::[*/0x1007/*::]*/: { /* n:\"LineFormat\", */ },\n\t/*::[*/0x1009/*::]*/: { /* n:\"MarkerFormat\", */ },\n\t/*::[*/0x100a/*::]*/: { /* n:\"AreaFormat\", */ },\n\t/*::[*/0x100b/*::]*/: { /* n:\"PieFormat\", */ },\n\t/*::[*/0x100c/*::]*/: { /* n:\"AttachedLabel\", */ },\n\t/*::[*/0x100d/*::]*/: { /* n:\"SeriesText\", */ },\n\t/*::[*/0x1014/*::]*/: { /* n:\"ChartFormat\", */ },\n\t/*::[*/0x1015/*::]*/: { /* n:\"Legend\", */ },\n\t/*::[*/0x1016/*::]*/: { /* n:\"SeriesList\", */ },\n\t/*::[*/0x1017/*::]*/: { /* n:\"Bar\", */ },\n\t/*::[*/0x1018/*::]*/: { /* n:\"Line\", */ },\n\t/*::[*/0x1019/*::]*/: { /* n:\"Pie\", */ },\n\t/*::[*/0x101a/*::]*/: { /* n:\"Area\", */ },\n\t/*::[*/0x101b/*::]*/: { /* n:\"Scatter\", */ },\n\t/*::[*/0x101c/*::]*/: { /* n:\"CrtLine\", */ },\n\t/*::[*/0x101d/*::]*/: { /* n:\"Axis\", */ },\n\t/*::[*/0x101e/*::]*/: { /* n:\"Tick\", */ },\n\t/*::[*/0x101f/*::]*/: { /* n:\"ValueRange\", */ },\n\t/*::[*/0x1020/*::]*/: { /* n:\"CatSerRange\", */ },\n\t/*::[*/0x1021/*::]*/: { /* n:\"AxisLine\", */ },\n\t/*::[*/0x1022/*::]*/: { /* n:\"CrtLink\", */ },\n\t/*::[*/0x1024/*::]*/: { /* n:\"DefaultText\", */ },\n\t/*::[*/0x1025/*::]*/: { /* n:\"Text\", */ },\n\t/*::[*/0x1026/*::]*/: { /* n:\"FontX\", */ f:parseuint16 },\n\t/*::[*/0x1027/*::]*/: { /* n:\"ObjectLink\", */ },\n\t/*::[*/0x1032/*::]*/: { /* n:\"Frame\", */ },\n\t/*::[*/0x1033/*::]*/: { /* n:\"Begin\", */ },\n\t/*::[*/0x1034/*::]*/: { /* n:\"End\", */ },\n\t/*::[*/0x1035/*::]*/: { /* n:\"PlotArea\", */ },\n\t/*::[*/0x103a/*::]*/: { /* n:\"Chart3d\", */ },\n\t/*::[*/0x103c/*::]*/: { /* n:\"PicF\", */ },\n\t/*::[*/0x103d/*::]*/: { /* n:\"DropBar\", */ },\n\t/*::[*/0x103e/*::]*/: { /* n:\"Radar\", */ },\n\t/*::[*/0x103f/*::]*/: { /* n:\"Surf\", */ },\n\t/*::[*/0x1040/*::]*/: { /* n:\"RadarArea\", */ },\n\t/*::[*/0x1041/*::]*/: { /* n:\"AxisParent\", */ },\n\t/*::[*/0x1043/*::]*/: { /* n:\"LegendException\", */ },\n\t/*::[*/0x1044/*::]*/: { /* n:\"ShtProps\", */ f:parse_ShtProps },\n\t/*::[*/0x1045/*::]*/: { /* n:\"SerToCrt\", */ },\n\t/*::[*/0x1046/*::]*/: { /* n:\"AxesUsed\", */ },\n\t/*::[*/0x1048/*::]*/: { /* n:\"SBaseRef\", */ },\n\t/*::[*/0x104a/*::]*/: { /* n:\"SerParent\", */ },\n\t/*::[*/0x104b/*::]*/: { /* n:\"SerAuxTrend\", */ },\n\t/*::[*/0x104e/*::]*/: { /* n:\"IFmtRecord\", */ },\n\t/*::[*/0x104f/*::]*/: { /* n:\"Pos\", */ },\n\t/*::[*/0x1050/*::]*/: { /* n:\"AlRuns\", */ },\n\t/*::[*/0x1051/*::]*/: { /* n:\"BRAI\", */ },\n\t/*::[*/0x105b/*::]*/: { /* n:\"SerAuxErrBar\", */ },\n\t/*::[*/0x105c/*::]*/: { /* n:\"ClrtClient\", */ f:parse_ClrtClient },\n\t/*::[*/0x105d/*::]*/: { /* n:\"SerFmt\", */ },\n\t/*::[*/0x105f/*::]*/: { /* n:\"Chart3DBarShape\", */ },\n\t/*::[*/0x1060/*::]*/: { /* n:\"Fbi\", */ },\n\t/*::[*/0x1061/*::]*/: { /* n:\"BopPop\", */ },\n\t/*::[*/0x1062/*::]*/: { /* n:\"AxcExt\", */ },\n\t/*::[*/0x1063/*::]*/: { /* n:\"Dat\", */ },\n\t/*::[*/0x1064/*::]*/: { /* n:\"PlotGrowth\", */ },\n\t/*::[*/0x1065/*::]*/: { /* n:\"SIIndex\", */ },\n\t/*::[*/0x1066/*::]*/: { /* n:\"GelFrame\", */ },\n\t/*::[*/0x1067/*::]*/: { /* n:\"BopPopCustom\", */ },\n\t/*::[*/0x1068/*::]*/: { /* n:\"Fbi2\", */ },\n\n\t/*::[*/0x0000/*::]*/: { /* n:\"Dimensions\", */ f:parse_Dimensions },\n\t/*::[*/0x0001/*::]*/: { /* n:\"BIFF2BLANK\", */ },\n\t/*::[*/0x0002/*::]*/: { /* n:\"BIFF2INT\", */ f:parse_BIFF2INT },\n\t/*::[*/0x0003/*::]*/: { /* n:\"BIFF2NUM\", */ f:parse_BIFF2NUM },\n\t/*::[*/0x0004/*::]*/: { /* n:\"BIFF2STR\", */ f:parse_BIFF2STR },\n\t/*::[*/0x0005/*::]*/: { /* n:\"BoolErr\", */ f:parse_BoolErr },\n\t/*::[*/0x0007/*::]*/: { /* n:\"String\", */ f:parse_BIFF2STRING },\n\t/*::[*/0x0008/*::]*/: { /* n:\"BIFF2ROW\", */ },\n\t/*::[*/0x0009/*::]*/: { /* n:\"BOF\", */ f:parse_BOF },\n\t/*::[*/0x000b/*::]*/: { /* n:\"Index\", */ },\n\t/*::[*/0x0016/*::]*/: { /* n:\"ExternCount\", */ f:parseuint16 },\n\t/*::[*/0x001e/*::]*/: { /* n:\"BIFF2FORMAT\", */ f:parse_BIFF2Format },\n\t/*::[*/0x001f/*::]*/: { /* n:\"BIFF2FMTCNT\", */ }, /* 16-bit cnt of BIFF2FORMAT records */\n\t/*::[*/0x0020/*::]*/: { /* n:\"BIFF2COLINFO\", */ },\n\t/*::[*/0x0021/*::]*/: { /* n:\"Array\", */ f:parse_Array },\n\t/*::[*/0x0024/*::]*/: { /* n:\"COLWIDTH\", */ },\n\t/*::[*/0x0025/*::]*/: { /* n:\"DefaultRowHeight\", */ f:parse_DefaultRowHeight },\n\t// 0x2c ??\n\t// 0x2d ??\n\t// 0x2e ??\n\t// 0x30 FONTCOUNT: number of fonts\n\t/*::[*/0x0032/*::]*/: { /* n:\"BIFF2FONTXTRA\", */ f:parse_BIFF2FONTXTRA },\n\t// 0x35: INFOOPTS\n\t// 0x36: TABLE (BIFF2 only)\n\t// 0x37: TABLE2 (BIFF2 only)\n\t// 0x38: WNDESK\n\t// 0x39 ??\n\t// 0x3a: BEGINPREF\n\t// 0x3b: ENDPREF\n\t/*::[*/0x003e/*::]*/: { /* n:\"BIFF2WINDOW2\", */ },\n\t// 0x3f ??\n\t// 0x46: SHOWSCROLL\n\t// 0x47: SHOWFORMULA\n\t// 0x48: STATUSBAR\n\t// 0x49: SHORTMENUS\n\t// 0x4A:\n\t// 0x4B:\n\t// 0x4C:\n\t// 0x4E:\n\t// 0x4F:\n\t// 0x58: TOOLBAR (BIFF3)\n\n\t/* - - - */\n\t/*::[*/0x0034/*::]*/: { /* n:\"DDEObjName\", */ },\n\t/*::[*/0x0043/*::]*/: { /* n:\"BIFF2XF\", */ },\n\t/*::[*/0x0044/*::]*/: { /* n:\"BIFF2XFINDEX\", */ f:parseuint16 },\n\t/*::[*/0x0045/*::]*/: { /* n:\"BIFF2FONTCLR\", */ },\n\t/*::[*/0x0056/*::]*/: { /* n:\"BIFF4FMTCNT\", */ }, /* 16-bit cnt, similar to BIFF2 */\n\t/*::[*/0x007e/*::]*/: { /* n:\"RK\", */ }, /* Not necessarily same as 0x027e */\n\t/*::[*/0x007f/*::]*/: { /* n:\"ImData\", */ f:parse_ImData },\n\t/*::[*/0x0087/*::]*/: { /* n:\"Addin\", */ },\n\t/*::[*/0x0088/*::]*/: { /* n:\"Edg\", */ },\n\t/*::[*/0x0089/*::]*/: { /* n:\"Pub\", */ },\n\t// 0x8A\n\t// 0x8B LH: alternate menu key flag (BIFF3/4)\n\t// 0x8E\n\t// 0x8F\n\t/*::[*/0x0091/*::]*/: { /* n:\"Sub\", */ },\n\t// 0x93 STYLE\n\t/*::[*/0x0094/*::]*/: { /* n:\"LHRecord\", */ },\n\t/*::[*/0x0095/*::]*/: { /* n:\"LHNGraph\", */ },\n\t/*::[*/0x0096/*::]*/: { /* n:\"Sound\", */ },\n\t// 0xA2 FNPROTO: function prototypes (BIFF4)\n\t// 0xA3\n\t// 0xA8\n\t/*::[*/0x00a9/*::]*/: { /* n:\"CoordList\", */ },\n\t/*::[*/0x00ab/*::]*/: { /* n:\"GCW\", */ },\n\t/*::[*/0x00bc/*::]*/: { /* n:\"ShrFmla\", */ }, /* Not necessarily same as 0x04bc */\n\t/*::[*/0x00bf/*::]*/: { /* n:\"ToolbarHdr\", */ },\n\t/*::[*/0x00c0/*::]*/: { /* n:\"ToolbarEnd\", */ },\n\t/*::[*/0x00c2/*::]*/: { /* n:\"AddMenu\", */ },\n\t/*::[*/0x00c3/*::]*/: { /* n:\"DelMenu\", */ },\n\t/*::[*/0x00d6/*::]*/: { /* n:\"RString\", */ f:parse_RString },\n\t/*::[*/0x00df/*::]*/: { /* n:\"UDDesc\", */ },\n\t/*::[*/0x00ea/*::]*/: { /* n:\"TabIdConf\", */ },\n\t/*::[*/0x0162/*::]*/: { /* n:\"XL5Modify\", */ },\n\t/*::[*/0x01a5/*::]*/: { /* n:\"FileSharing2\", */ },\n\t/*::[*/0x0206/*::]*/: { /* n:\"Formula\", */ f:parse_Formula },\n\t/*::[*/0x0209/*::]*/: { /* n:\"BOF\", */ f:parse_BOF },\n\t/*::[*/0x0218/*::]*/: { /* n:\"Lbl\", */ f:parse_Lbl },\n\t/*::[*/0x0223/*::]*/: { /* n:\"ExternName\", */ f:parse_ExternName },\n\t/*::[*/0x0231/*::]*/: { /* n:\"Font\", */ },\n\t/*::[*/0x0243/*::]*/: { /* n:\"BIFF3XF\", */ },\n\t/*::[*/0x0406/*::]*/: { /* n:\"Formula\", */ f:parse_Formula },\n\t/*::[*/0x0409/*::]*/: { /* n:\"BOF\", */ f:parse_BOF },\n\t/*::[*/0x0443/*::]*/: { /* n:\"BIFF4XF\", */ },\n\t/*::[*/0x086d/*::]*/: { /* n:\"FeatInfo\", */ },\n\t/*::[*/0x0873/*::]*/: { /* n:\"FeatInfo11\", */ },\n\t/*::[*/0x0881/*::]*/: { /* n:\"SXAddl12\", */ },\n\t/*::[*/0x08c0/*::]*/: { /* n:\"AutoWebPub\", */ },\n\t/*::[*/0x08c1/*::]*/: { /* n:\"ListObj\", */ },\n\t/*::[*/0x08c2/*::]*/: { /* n:\"ListField\", */ },\n\t/*::[*/0x08c3/*::]*/: { /* n:\"ListDV\", */ },\n\t/*::[*/0x08c4/*::]*/: { /* n:\"ListCondFmt\", */ },\n\t/*::[*/0x08c5/*::]*/: { /* n:\"ListCF\", */ },\n\t/*::[*/0x08c6/*::]*/: { /* n:\"FMQry\", */ },\n\t/*::[*/0x08c7/*::]*/: { /* n:\"FMSQry\", */ },\n\t/*::[*/0x08c8/*::]*/: { /* n:\"PLV\", */ },\n\t/*::[*/0x08c9/*::]*/: { /* n:\"LnExt\", */ },\n\t/*::[*/0x08ca/*::]*/: { /* n:\"MkrExt\", */ },\n\t/*::[*/0x08cb/*::]*/: { /* n:\"CrtCoopt\", */ },\n\t/*::[*/0x08d6/*::]*/: { /* n:\"FRTArchId$\", */ r:12 },\n\n\t/*::[*/0x7262/*::]*/: {}\n};\n\nfunction write_biff_rec(ba/*:BufArray*/, type/*:number*/, payload, length/*:?number*/)/*:void*/ {\n\tvar t/*:number*/ = type;\n\tif(isNaN(t)) return;\n\tvar len = length || (payload||[]).length || 0;\n\tvar o = ba.next(4);\n\to.write_shift(2, t);\n\to.write_shift(2, len);\n\tif(/*:: len != null &&*/len > 0 && is_buf(payload)) ba.push(payload);\n}\n\nfunction write_biff_continue(ba/*:BufArray*/, type/*:number*/, payload, length/*:?number*/)/*:void*/ {\n\tvar len = length || (payload||[]).length || 0;\n\tif(len <= 8224) return write_biff_rec(ba, type, payload, len);\n\tvar t = type;\n\tif(isNaN(t)) return;\n\tvar parts = payload.parts || [], sidx = 0;\n\tvar i = 0, w = 0;\n\twhile(w + (parts[sidx] || 8224) <= 8224) { w+= (parts[sidx] || 8224); sidx++; }\n\tvar o = ba.next(4);\n\to.write_shift(2, t);\n\to.write_shift(2, w);\n\tba.push(payload.slice(i, i + w));\n\ti += w;\n\twhile(i < len) {\n\t\to = ba.next(4);\n\t\to.write_shift(2, 0x3c); // TODO: figure out correct continue type\n\t\tw = 0;\n\t\twhile(w + (parts[sidx] || 8224) <= 8224) { w+= (parts[sidx] || 8224); sidx++; }\n\t\to.write_shift(2, w);\n\t\tba.push(payload.slice(i, i+w)); i+= w;\n\t}\n}\n\nfunction write_BIFF2Cell(out, r/*:number*/, c/*:number*/) {\n\tif(!out) out = new_buf(7);\n\tout.write_shift(2, r);\n\tout.write_shift(2, c);\n\tout.write_shift(2, 0);\n\tout.write_shift(1, 0);\n\treturn out;\n}\n\nfunction write_BIFF2BERR(r/*:number*/, c/*:number*/, val, t/*:?string*/) {\n\tvar out = new_buf(9);\n\twrite_BIFF2Cell(out, r, c);\n\twrite_Bes(val, t || 'b', out);\n\treturn out;\n}\n\n/* TODO: codepage, large strings */\nfunction write_BIFF2LABEL(r/*:number*/, c/*:number*/, val) {\n\tvar out = new_buf(8 + 2*val.length);\n\twrite_BIFF2Cell(out, r, c);\n\tout.write_shift(1, val.length);\n\tout.write_shift(val.length, val, 'sbcs');\n\treturn out.l < out.length ? out.slice(0, out.l) : out;\n}\n\nfunction write_ws_biff2_cell(ba/*:BufArray*/, cell/*:Cell*/, R/*:number*/, C/*:number*//*::, opts*/) {\n\tif(cell.v != null) switch(cell.t) {\n\t\tcase 'd': case 'n':\n\t\t\tvar v = cell.t == 'd' ? datenum(parseDate(cell.v)) : cell.v;\n\t\t\tif((v == (v|0)) && (v >= 0) && (v < 65536))\n\t\t\t\twrite_biff_rec(ba, 0x0002, write_BIFF2INT(R, C, v));\n\t\t\telse\n\t\t\t\twrite_biff_rec(ba, 0x0003, write_BIFF2NUM(R,C, v));\n\t\t\treturn;\n\t\tcase 'b': case 'e': write_biff_rec(ba, 0x0005, write_BIFF2BERR(R, C, cell.v, cell.t)); return;\n\t\t/* TODO: codepage, sst */\n\t\tcase 's': case 'str':\n\t\t\twrite_biff_rec(ba, 0x0004, write_BIFF2LABEL(R, C, (cell.v||\"\").slice(0,255)));\n\t\t\treturn;\n\t}\n\twrite_biff_rec(ba, 0x0001, write_BIFF2Cell(null, R, C));\n}\n\nfunction write_ws_biff2(ba/*:BufArray*/, ws/*:Worksheet*/, idx/*:number*/, opts/*::, wb:Workbook*/) {\n\tvar dense = Array.isArray(ws);\n\tvar range = safe_decode_range(ws['!ref'] || \"A1\"), ref/*:string*/, rr = \"\", cols/*:Array*/ = [];\n\tif(range.e.c > 0xFF || range.e.r > 0x3FFF) {\n\t\tif(opts.WTF) throw new Error(\"Range \" + (ws['!ref'] || \"A1\") + \" exceeds format limit A1:IV16384\");\n\t\trange.e.c = Math.min(range.e.c, 0xFF);\n\t\trange.e.r = Math.min(range.e.c, 0x3FFF);\n\t\tref = encode_range(range);\n\t}\n\tfor(var R = range.s.r; R <= range.e.r; ++R) {\n\t\trr = encode_row(R);\n\t\tfor(var C = range.s.c; C <= range.e.c; ++C) {\n\t\t\tif(R === range.s.r) cols[C] = encode_col(C);\n\t\t\tref = cols[C] + rr;\n\t\t\tvar cell = dense ? (ws[R]||[])[C] : ws[ref];\n\t\t\tif(!cell) continue;\n\t\t\t/* write cell */\n\t\t\twrite_ws_biff2_cell(ba, cell, R, C, opts);\n\t\t}\n\t}\n}\n\n/* Based on test files */\nfunction write_biff2_buf(wb/*:Workbook*/, opts/*:WriteOpts*/) {\n\tvar o = opts || {};\n\tif(DENSE != null && o.dense == null) o.dense = DENSE;\n\tvar ba = buf_array();\n\tvar idx = 0;\n\tfor(var i=0;i*/ = [];\n\tvar range = safe_decode_range(ws['!ref'] || \"A1\");\n\tvar MAX_ROWS = b8 ? 65536 : 16384;\n\tif(range.e.c > 0xFF || range.e.r >= MAX_ROWS) {\n\t\tif(opts.WTF) throw new Error(\"Range \" + (ws['!ref'] || \"A1\") + \" exceeds format limit A1:IV16384\");\n\t\trange.e.c = Math.min(range.e.c, 0xFF);\n\t\trange.e.r = Math.min(range.e.c, MAX_ROWS-1);\n\t}\n\n\twrite_biff_rec(ba, 0x0809, write_BOF(wb, 0x10, opts));\n\t/* [Uncalced] Index */\n\twrite_biff_rec(ba, 0x000d /* CalcMode */, writeuint16(1));\n\twrite_biff_rec(ba, 0x000c /* CalcCount */, writeuint16(100));\n\twrite_biff_rec(ba, 0x000f /* CalcRefMode */, writebool(true));\n\twrite_biff_rec(ba, 0x0011 /* CalcIter */, writebool(false));\n\twrite_biff_rec(ba, 0x0010 /* CalcDelta */, write_Xnum(0.001));\n\twrite_biff_rec(ba, 0x005f /* CalcSaveRecalc */, writebool(true));\n\twrite_biff_rec(ba, 0x002a /* PrintRowCol */, writebool(false));\n\twrite_biff_rec(ba, 0x002b /* PrintGrid */, writebool(false));\n\twrite_biff_rec(ba, 0x0082 /* GridSet */, writeuint16(1));\n\twrite_biff_rec(ba, 0x0080 /* Guts */, write_Guts([0,0]));\n\t/* DefaultRowHeight WsBool [Sync] [LPr] [HorizontalPageBreaks] [VerticalPageBreaks] */\n\t/* Header (string) */\n\t/* Footer (string) */\n\twrite_biff_rec(ba, 0x0083 /* HCenter */, writebool(false));\n\twrite_biff_rec(ba, 0x0084 /* VCenter */, writebool(false));\n\t/* ... */\n\tif(b8) write_ws_cols_biff8(ba, ws[\"!cols\"]);\n\t/* ... */\n\twrite_biff_rec(ba, 0x200, write_Dimensions(range, opts));\n\t/* ... */\n\n\tif(b8) ws['!links'] = [];\n\tfor(var R = range.s.r; R <= range.e.r; ++R) {\n\t\trr = encode_row(R);\n\t\tfor(var C = range.s.c; C <= range.e.c; ++C) {\n\t\t\tif(R === range.s.r) cols[C] = encode_col(C);\n\t\t\tref = cols[C] + rr;\n\t\t\tvar cell = dense ? (ws[R]||[])[C] : ws[ref];\n\t\t\tif(!cell) continue;\n\t\t\t/* write cell */\n\t\t\twrite_ws_biff8_cell(ba, cell, R, C, opts);\n\t\t\tif(b8 && cell.l) ws['!links'].push([ref, cell.l]);\n\t\t}\n\t}\n\tvar cname/*:string*/ = _sheet.CodeName || _sheet.name || s;\n\t/* ... */\n\tif(b8) write_biff_rec(ba, 0x023e /* Window2 */, write_Window2((_WB.Views||[])[0]));\n\t/* ... */\n\tif(b8 && (ws['!merges']||[]).length) write_biff_rec(ba, 0x00e5 /* MergeCells */, write_MergeCells(ws['!merges']));\n\t/* [LRng] *QUERYTABLE [PHONETICINFO] CONDFMTS */\n\tif(b8) write_ws_biff8_hlinks(ba, ws);\n\t/* [DVAL] */\n\twrite_biff_rec(ba, 0x01ba /* CodeName */, write_XLUnicodeString(cname, opts));\n\t/* *WebPub *CellWatch [SheetExt] */\n\tif(b8) write_FEAT(ba, ws);\n\t/* *FEAT11 *RECORD12 */\n\twrite_biff_rec(ba, 0x000a /* EOF */);\n\treturn ba.end();\n}\n\n/* [MS-XLS] 2.1.7.20.3 */\nfunction write_biff8_global(wb/*:Workbook*/, bufs, opts/*:WriteOpts*/) {\n\tvar A = buf_array();\n\tvar _WB/*:WBWBProps*/ = ((wb||{}).Workbook||{}/*:any*/);\n\tvar _sheets/*:Array*/ = (_WB.Sheets||[]);\n\tvar _wb/*:WBProps*/ = /*::((*/_WB.WBProps||{/*::CodeName:\"ThisWorkbook\"*/}/*:: ):any)*/;\n\tvar b8 = opts.biff == 8, b5 = opts.biff == 5;\n\twrite_biff_rec(A, 0x0809, write_BOF(wb, 0x05, opts));\n\tif(opts.bookType == \"xla\") write_biff_rec(A, 0x0087 /* Addin */);\n\twrite_biff_rec(A, 0x00e1 /* InterfaceHdr */, b8 ? writeuint16(0x04b0) : null);\n\twrite_biff_rec(A, 0x00c1 /* Mms */, writezeroes(2));\n\tif(b5) write_biff_rec(A, 0x00bf /* ToolbarHdr */);\n\tif(b5) write_biff_rec(A, 0x00c0 /* ToolbarEnd */);\n\twrite_biff_rec(A, 0x00e2 /* InterfaceEnd */);\n\twrite_biff_rec(A, 0x005c /* WriteAccess */, write_WriteAccess(\"SheetJS\", opts));\n\t/* [FileSharing] */\n\twrite_biff_rec(A, 0x0042 /* CodePage */, writeuint16(b8 ? 0x04b0 : 0x04E4));\n\t/* *2047 Lel */\n\tif(b8) write_biff_rec(A, 0x0161 /* DSF */, writeuint16(0));\n\tif(b8) write_biff_rec(A, 0x01c0 /* Excel9File */);\n\twrite_biff_rec(A, 0x013d /* RRTabId */, write_RRTabId(wb.SheetNames.length));\n\tif(b8 && wb.vbaraw) write_biff_rec(A, 0x00d3 /* ObProj */);\n\t/* [ObNoMacros] */\n\tif(b8 && wb.vbaraw) {\n\t\tvar cname/*:string*/ = _wb.CodeName || \"ThisWorkbook\";\n\t\twrite_biff_rec(A, 0x01ba /* CodeName */, write_XLUnicodeString(cname, opts));\n\t}\n\twrite_biff_rec(A, 0x009c /* BuiltInFnGroupCount */, writeuint16(0x11));\n\t/* *FnGroupName *FnGrp12 */\n\t/* *Lbl */\n\t/* [OleObjectSize] */\n\twrite_biff_rec(A, 0x0019 /* WinProtect */, writebool(false));\n\twrite_biff_rec(A, 0x0012 /* Protect */, writebool(false));\n\twrite_biff_rec(A, 0x0013 /* Password */, writeuint16(0));\n\tif(b8) write_biff_rec(A, 0x01af /* Prot4Rev */, writebool(false));\n\tif(b8) write_biff_rec(A, 0x01bc /* Prot4RevPass */, writeuint16(0));\n\twrite_biff_rec(A, 0x003d /* Window1 */, write_Window1(opts));\n\twrite_biff_rec(A, 0x0040 /* Backup */, writebool(false));\n\twrite_biff_rec(A, 0x008d /* HideObj */, writeuint16(0));\n\twrite_biff_rec(A, 0x0022 /* Date1904 */, writebool(safe1904(wb)==\"true\"));\n\twrite_biff_rec(A, 0x000e /* CalcPrecision */, writebool(true));\n\tif(b8) write_biff_rec(A, 0x01b7 /* RefreshAll */, writebool(false));\n\twrite_biff_rec(A, 0x00DA /* BookBool */, writeuint16(0));\n\t/* ... */\n\twrite_FONTS_biff8(A, wb, opts);\n\twrite_FMTS_biff8(A, wb.SSF, opts);\n\twrite_CELLXFS_biff8(A, opts);\n\t/* ... */\n\tif(b8) write_biff_rec(A, 0x0160 /* UsesELFs */, writebool(false));\n\tvar a = A.end();\n\n\tvar C = buf_array();\n\t/* METADATA [MTRSettings] [ForceFullCalculation] */\n\tif(b8) write_biff_rec(C, 0x008C, write_Country());\n\t/* *SUPBOOK *LBL *RTD [RecalcId] *HFPicture *MSODRAWINGGROUP */\n\n\t/* BIFF8: [SST *Continue] ExtSST */\n\tif(b8 && opts.Strings) write_biff_continue(C, 0x00FC, write_SST(opts.Strings, opts));\n\n\t/* *WebPub [WOpt] [CrErr] [BookExt] *FeatHdr *DConn [THEME] [CompressPictures] [Compat12] [GUIDTypeLib] */\n\twrite_biff_rec(C, 0x000A /* EOF */);\n\tvar c = C.end();\n\n\tvar B = buf_array();\n\tvar blen = 0, j = 0;\n\tfor(j = 0; j < wb.SheetNames.length; ++j) blen += (b8 ? 12 : 11) + (b8 ? 2 : 1) * wb.SheetNames[j].length;\n\tvar start = a.length + blen + c.length;\n\tfor(j = 0; j < wb.SheetNames.length; ++j) {\n\t\tvar _sheet/*:WBWSProp*/ = _sheets[j] || ({}/*:any*/);\n\t\twrite_biff_rec(B, 0x0085 /* BoundSheet8 */, write_BoundSheet8({pos:start, hs:_sheet.Hidden||0, dt:0, name:wb.SheetNames[j]}, opts));\n\t\tstart += bufs[j].length;\n\t}\n\t/* 1*BoundSheet8 */\n\tvar b = B.end();\n\tif(blen != b.length) throw new Error(\"BS8 \" + blen + \" != \" + b.length);\n\n\tvar out = [];\n\tif(a.length) out.push(a);\n\tif(b.length) out.push(b);\n\tif(c.length) out.push(c);\n\treturn bconcat(out);\n}\n\n/* [MS-XLS] 2.1.7.20 Workbook Stream */\nfunction write_biff8_buf(wb/*:Workbook*/, opts/*:WriteOpts*/) {\n\tvar o = opts || {};\n\tvar bufs = [];\n\n\tif(wb && !wb.SSF) {\n\t\twb.SSF = dup(table_fmt);\n\t}\n\tif(wb && wb.SSF) {\n\t\tmake_ssf(); SSF_load_table(wb.SSF);\n\t\t// $FlowIgnore\n\t\to.revssf = evert_num(wb.SSF); o.revssf[wb.SSF[65535]] = 0;\n\t\to.ssf = wb.SSF;\n\t}\n\n\to.Strings = /*::((*/[]/*:: :any):SST)*/; o.Strings.Count = 0; o.Strings.Unique = 0;\n\tfix_write_opts(o);\n\n\to.cellXfs = [];\n\tget_cell_style(o.cellXfs, {}, {revssf:{\"General\":0}});\n\n\tif(!wb.Props) wb.Props = {};\n\n\tfor(var i = 0; i < wb.SheetNames.length; ++i) bufs[bufs.length] = write_ws_biff8(i, o, wb);\n\tbufs.unshift(write_biff8_global(wb, bufs, o));\n\treturn bconcat(bufs);\n}\n\nfunction write_biff_buf(wb/*:Workbook*/, opts/*:WriteOpts*/) {\n\tfor(var i = 0; i <= wb.SheetNames.length; ++i) {\n\t\tvar ws = wb.Sheets[wb.SheetNames[i]];\n\t\tif(!ws || !ws[\"!ref\"]) continue;\n\t\tvar range = decode_range(ws[\"!ref\"]);\n\t\tif(range.e.c > 255) { // note: 255 is IV\n\t\tif(typeof console != \"undefined\" && console.error) console.error(\"Worksheet '\" + wb.SheetNames[i] + \"' extends beyond column IV (255). Data may be lost.\");\n\t\t}\n\t}\n\n\tvar o = opts || {};\n\tswitch(o.biff || 2) {\n\t\tcase 8: case 5: return write_biff8_buf(wb, opts);\n\t\tcase 4: case 3: case 2: return write_biff2_buf(wb, opts);\n\t}\n\tthrow new Error(\"invalid type \" + o.bookType + \" for BIFF\");\n}\n/* note: browser DOM element cannot see mso- style attrs, must parse */\nfunction html_to_sheet(str/*:string*/, _opts)/*:Workbook*/ {\n\tvar opts = _opts || {};\n\tif(DENSE != null && opts.dense == null) opts.dense = DENSE;\n\tvar ws/*:Worksheet*/ = opts.dense ? ([]/*:any*/) : ({}/*:any*/);\n\tstr = str.replace(//g, \"\");\n\tvar mtch/*:any*/ = str.match(/\");\n\tvar mtch2/*:any*/ = str.match(/<\\/table/i);\n\tvar i/*:number*/ = mtch.index, j/*:number*/ = mtch2 && mtch2.index || str.length;\n\tvar rows = split_regex(str.slice(i, j), /(:?]*>)/i, \"\");\n\tvar R = -1, C = 0, RS = 0, CS = 0;\n\tvar range/*:Range*/ = {s:{r:10000000, c:10000000},e:{r:0,c:0}};\n\tvar merges/*:Array*/ = [];\n\tfor(i = 0; i < rows.length; ++i) {\n\t\tvar row = rows[i].trim();\n\t\tvar hd = row.slice(0,3).toLowerCase();\n\t\tif(hd == \"/i);\n\t\tfor(j = 0; j < cells.length; ++j) {\n\t\t\tvar cell = cells[j].trim();\n\t\t\tif(!cell.match(/\")) > -1) m = m.slice(cc+1);\n\t\t\tfor(var midx = 0; midx < merges.length; ++midx) {\n\t\t\t\tvar _merge/*:Range*/ = merges[midx];\n\t\t\t\tif(_merge.s.c == C && _merge.s.r < R && R <= _merge.e.r) { C = _merge.e.c + 1; midx = -1; }\n\t\t\t}\n\t\t\tvar tag = parsexmltag(cell.slice(0, cell.indexOf(\">\")));\n\t\t\tCS = tag.colspan ? +tag.colspan : 1;\n\t\t\tif((RS = +tag.rowspan)>1 || CS>1) merges.push({s:{r:R,c:C},e:{r:R + (RS||1) - 1, c:C + CS - 1}});\n\t\t\tvar _t/*:string*/ = tag.t || tag[\"data-t\"] || \"\";\n\t\t\t/* TODO: generate stub cells */\n\t\t\tif(!m.length) { C += CS; continue; }\n\t\t\tm = htmldecode(m);\n\t\t\tif(range.s.r > R) range.s.r = R; if(range.e.r < R) range.e.r = R;\n\t\t\tif(range.s.c > C) range.s.c = C; if(range.e.c < C) range.e.c = C;\n\t\t\tif(!m.length) { C += CS; continue; }\n\t\t\tvar o/*:Cell*/ = {t:'s', v:m};\n\t\t\tif(opts.raw || !m.trim().length || _t == 's'){}\n\t\t\telse if(m === 'TRUE') o = {t:'b', v:true};\n\t\t\telse if(m === 'FALSE') o = {t:'b', v:false};\n\t\t\telse if(!isNaN(fuzzynum(m))) o = {t:'n', v:fuzzynum(m)};\n\t\t\telse if(!isNaN(fuzzydate(m).getDate())) {\n\t\t\t\to = ({t:'d', v:parseDate(m)}/*:any*/);\n\t\t\t\tif(!opts.cellDates) o = ({t:'n', v:datenum(o.v)}/*:any*/);\n\t\t\t\to.z = opts.dateNF || table_fmt[14];\n\t\t\t}\n\t\t\tif(opts.dense) { if(!ws[R]) ws[R] = []; ws[R][C] = o; }\n\t\t\telse ws[encode_cell({r:R, c:C})] = o;\n\t\t\tC += CS;\n\t\t}\n\t}\n\tws['!ref'] = encode_range(range);\n\tif(merges.length) ws[\"!merges\"] = merges;\n\treturn ws;\n}\nfunction make_html_row(ws/*:Worksheet*/, r/*:Range*/, R/*:number*/, o/*:Sheet2HTMLOpts*/)/*:string*/ {\n\tvar M/*:Array*/ = (ws['!merges'] ||[]);\n\tvar oo/*:Array*/ = [];\n\tfor(var C = r.s.c; C <= r.e.c; ++C) {\n\t\tvar RS = 0, CS = 0;\n\t\tfor(var j = 0; j < M.length; ++j) {\n\t\t\tif(M[j].s.r > R || M[j].s.c > C) continue;\n\t\t\tif(M[j].e.r < R || M[j].e.c < C) continue;\n\t\t\tif(M[j].s.r < R || M[j].s.c < C) { RS = -1; break; }\n\t\t\tRS = M[j].e.r - M[j].s.r + 1; CS = M[j].e.c - M[j].s.c + 1; break;\n\t\t}\n\t\tif(RS < 0) continue;\n\t\tvar coord = encode_cell({r:R,c:C});\n\t\tvar cell = o.dense ? (ws[R]||[])[C] : ws[coord];\n\t\t/* TODO: html entities */\n\t\tvar w = (cell && cell.v != null) && (cell.h || escapehtml(cell.w || (format_cell(cell), cell.w) || \"\")) || \"\";\n\t\tvar sp = ({}/*:any*/);\n\t\tif(RS > 1) sp.rowspan = RS;\n\t\tif(CS > 1) sp.colspan = CS;\n\t\tif(o.editable) w = '' + w + '';\n\t\telse if(cell) {\n\t\t\tsp[\"data-t\"] = cell && cell.t || 'z';\n\t\t\tif(cell.v != null) sp[\"data-v\"] = cell.v;\n\t\t\tif(cell.z != null) sp[\"data-z\"] = cell.z;\n\t\t\tif(cell.l && (cell.l.Target || \"#\").charAt(0) != \"#\") w = '' + w + '';\n\t\t}\n\t\tsp.id = (o.id || \"sjs\") + \"-\" + coord;\n\t\too.push(writextag('td', w, sp));\n\t}\n\tvar preamble = \"\";\n\treturn preamble + oo.join(\"\") + \"\";\n}\n\nvar HTML_BEGIN = 'SheetJS Table Export';\nvar HTML_END = '';\n\nfunction html_to_workbook(str/*:string*/, opts)/*:Workbook*/ {\n\tvar mtch = str.match(/[\\s\\S]*?<\\/table>/gi);\n\tif(!mtch || mtch.length == 0) throw new Error(\"Invalid HTML: could not find
\");\n\tif(mtch.length == 1) return sheet_to_workbook(html_to_sheet(mtch[0], opts), opts);\n\tvar wb = book_new();\n\tmtch.forEach(function(s, idx) { book_append_sheet(wb, html_to_sheet(s, opts), \"Sheet\" + (idx+1)); });\n\treturn wb;\n}\n\nfunction make_html_preamble(ws/*:Worksheet*/, R/*:Range*/, o/*:Sheet2HTMLOpts*/)/*:string*/ {\n\tvar out/*:Array*/ = [];\n\treturn out.join(\"\") + '';\n}\n\nfunction sheet_to_html(ws/*:Worksheet*/, opts/*:?Sheet2HTMLOpts*//*, wb:?Workbook*/)/*:string*/ {\n\tvar o = opts || {};\n\tvar header = o.header != null ? o.header : HTML_BEGIN;\n\tvar footer = o.footer != null ? o.footer : HTML_END;\n\tvar out/*:Array*/ = [header];\n\tvar r = decode_range(ws['!ref']);\n\to.dense = Array.isArray(ws);\n\tout.push(make_html_preamble(ws, r, o));\n\tfor(var R = r.s.r; R <= r.e.r; ++R) out.push(make_html_row(ws, r, R, o));\n\tout.push(\"
\" + footer);\n\treturn out.join(\"\");\n}\n\nfunction sheet_add_dom(ws/*:Worksheet*/, table/*:HTMLElement*/, _opts/*:?any*/)/*:Worksheet*/ {\n\tvar opts = _opts || {};\n\tif(DENSE != null) opts.dense = DENSE;\n\tvar or_R = 0, or_C = 0;\n\tif(opts.origin != null) {\n\t\tif(typeof opts.origin == 'number') or_R = opts.origin;\n\t\telse {\n\t\t\tvar _origin/*:CellAddress*/ = typeof opts.origin == \"string\" ? decode_cell(opts.origin) : opts.origin;\n\t\t\tor_R = _origin.r; or_C = _origin.c;\n\t\t}\n\t}\n\n\tvar rows/*:HTMLCollection*/ = table.getElementsByTagName('tr');\n\tvar sheetRows = Math.min(opts.sheetRows||10000000, rows.length);\n\tvar range/*:Range*/ = {s:{r:0,c:0},e:{r:or_R,c:or_C}};\n\tif(ws[\"!ref\"]) {\n\t\tvar _range/*:Range*/ = decode_range(ws[\"!ref\"]);\n\t\trange.s.r = Math.min(range.s.r, _range.s.r);\n\t\trange.s.c = Math.min(range.s.c, _range.s.c);\n\t\trange.e.r = Math.max(range.e.r, _range.e.r);\n\t\trange.e.c = Math.max(range.e.c, _range.e.c);\n\t\tif(or_R == -1) range.e.r = or_R = _range.e.r + 1;\n\t}\n\tvar merges/*:Array*/ = [], midx = 0;\n\tvar rowinfo/*:Array*/ = ws[\"!rows\"] || (ws[\"!rows\"] = []);\n\tvar _R = 0, R = 0, _C = 0, C = 0, RS = 0, CS = 0;\n\tif(!ws[\"!cols\"]) ws['!cols'] = [];\n\tfor(; _R < rows.length && R < sheetRows; ++_R) {\n\t\tvar row/*:HTMLTableRowElement*/ = rows[_R];\n\t\tif (is_dom_element_hidden(row)) {\n\t\t\tif (opts.display) continue;\n\t\t\trowinfo[R] = {hidden: true};\n\t\t}\n\t\tvar elts/*:HTMLCollection*/ = (row.children/*:any*/);\n\t\tfor(_C = C = 0; _C < elts.length; ++_C) {\n\t\t\tvar elt/*:HTMLTableCellElement*/ = elts[_C];\n\t\t\tif (opts.display && is_dom_element_hidden(elt)) continue;\n\t\t\tvar v/*:?string*/ = elt.hasAttribute('data-v') ? elt.getAttribute('data-v') : elt.hasAttribute('v') ? elt.getAttribute('v') : htmldecode(elt.innerHTML);\n\t\t\tvar z/*:?string*/ = elt.getAttribute('data-z') || elt.getAttribute('z');\n\t\t\tfor(midx = 0; midx < merges.length; ++midx) {\n\t\t\t\tvar m/*:Range*/ = merges[midx];\n\t\t\t\tif(m.s.c == C + or_C && m.s.r < R + or_R && R + or_R <= m.e.r) { C = m.e.c+1 - or_C; midx = -1; }\n\t\t\t}\n\t\t\t/* TODO: figure out how to extract nonstandard mso- style */\n\t\t\tCS = +elt.getAttribute(\"colspan\") || 1;\n\t\t\tif( ((RS = (+elt.getAttribute(\"rowspan\") || 1)))>1 || CS>1) merges.push({s:{r:R + or_R,c:C + or_C},e:{r:R + or_R + (RS||1) - 1, c:C + or_C + (CS||1) - 1}});\n\t\t\tvar o/*:Cell*/ = {t:'s', v:v};\n\t\t\tvar _t/*:string*/ = elt.getAttribute(\"data-t\") || elt.getAttribute(\"t\") || \"\";\n\t\t\tif(v != null) {\n\t\t\t\tif(v.length == 0) o.t = _t || 'z';\n\t\t\t\telse if(opts.raw || v.trim().length == 0 || _t == \"s\"){}\n\t\t\t\telse if(v === 'TRUE') o = {t:'b', v:true};\n\t\t\t\telse if(v === 'FALSE') o = {t:'b', v:false};\n\t\t\t\telse if(!isNaN(fuzzynum(v))) o = {t:'n', v:fuzzynum(v)};\n\t\t\t\telse if(!isNaN(fuzzydate(v).getDate())) {\n\t\t\t\t\to = ({t:'d', v:parseDate(v)}/*:any*/);\n\t\t\t\t\tif(!opts.cellDates) o = ({t:'n', v:datenum(o.v)}/*:any*/);\n\t\t\t\t\to.z = opts.dateNF || table_fmt[14];\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(o.z === undefined && z != null) o.z = z;\n\t\t\t/* The first link is used. Links are assumed to be fully specified.\n\t\t\t * TODO: The right way to process relative links is to make a new */\n\t\t\tvar l = \"\", Aelts = elt.getElementsByTagName(\"A\");\n\t\t\tif(Aelts && Aelts.length) for(var Aelti = 0; Aelti < Aelts.length; ++Aelti)\tif(Aelts[Aelti].hasAttribute(\"href\")) {\n\t\t\t\tl = Aelts[Aelti].getAttribute(\"href\"); if(l.charAt(0) != \"#\") break;\n\t\t\t}\n\t\t\tif(l && l.charAt(0) != \"#\") o.l = ({ Target: l });\n\t\t\tif(opts.dense) { if(!ws[R + or_R]) ws[R + or_R] = []; ws[R + or_R][C + or_C] = o; }\n\t\t\telse ws[encode_cell({c:C + or_C, r:R + or_R})] = o;\n\t\t\tif(range.e.c < C + or_C) range.e.c = C + or_C;\n\t\t\tC += CS;\n\t\t}\n\t\t++R;\n\t}\n\tif(merges.length) ws['!merges'] = (ws[\"!merges\"] || []).concat(merges);\n\trange.e.r = Math.max(range.e.r, R - 1 + or_R);\n\tws['!ref'] = encode_range(range);\n\tif(R >= sheetRows) ws['!fullref'] = encode_range((range.e.r = rows.length-_R+R-1 + or_R,range)); // We can count the real number of rows to parse but we don't to improve the performance\n\treturn ws;\n}\n\nfunction parse_dom_table(table/*:HTMLElement*/, _opts/*:?any*/)/*:Worksheet*/ {\n\tvar opts = _opts || {};\n\tvar ws/*:Worksheet*/ = opts.dense ? ([]/*:any*/) : ({}/*:any*/);\n\treturn sheet_add_dom(ws, table, _opts);\n}\n\nfunction table_to_book(table/*:HTMLElement*/, opts/*:?any*/)/*:Workbook*/ {\n\treturn sheet_to_workbook(parse_dom_table(table, opts), opts);\n}\n\nfunction is_dom_element_hidden(element/*:HTMLElement*/)/*:boolean*/ {\n\tvar display/*:string*/ = '';\n\tvar get_computed_style/*:?function*/ = get_get_computed_style_function(element);\n\tif(get_computed_style) display = get_computed_style(element).getPropertyValue('display');\n\tif(!display) display = element.style && element.style.display;\n\treturn display === 'none';\n}\n\n/* global getComputedStyle */\nfunction get_get_computed_style_function(element/*:HTMLElement*/)/*:?function*/ {\n\t// The proper getComputedStyle implementation is the one defined in the element window\n\tif(element.ownerDocument.defaultView && typeof element.ownerDocument.defaultView.getComputedStyle === 'function') return element.ownerDocument.defaultView.getComputedStyle;\n\t// If it is not available, try to get one from the global namespace\n\tif(typeof getComputedStyle === 'function') return getComputedStyle;\n\treturn null;\n}\n/* OpenDocument */\nfunction parse_text_p(text/*:string*//*::, tag*/)/*:Array*/ {\n\t/* 6.1.2 White Space Characters */\n\tvar fixed = text\n\t\t.replace(/[\\t\\r\\n]/g, \" \").trim().replace(/ +/g, \" \")\n\t\t.replace(//g,\" \")\n\t\t.replace(//g, function($$,$1) { return Array(parseInt($1,10)+1).join(\" \"); })\n\t\t.replace(/]*\\/>/g,\"\\t\")\n\t\t.replace(//g,\"\\n\");\n\tvar v = unescapexml(fixed.replace(/<[^>]*>/g,\"\"));\n\n\treturn [v];\n}\n\nvar number_formats_ods = {\n\t/* ods name: [short ssf fmt, long ssf fmt] */\n\tday: [\"d\", \"dd\"],\n\tmonth: [\"m\", \"mm\"],\n\tyear: [\"y\", \"yy\"],\n\thours: [\"h\", \"hh\"],\n\tminutes: [\"m\", \"mm\"],\n\tseconds: [\"s\", \"ss\"],\n\t\"am-pm\": [\"A/P\", \"AM/PM\"],\n\t\"day-of-week\": [\"ddd\", \"dddd\"],\n\tera: [\"e\", \"ee\"],\n\t/* there is no native representation of LO \"Q\" format */\n\tquarter: [\"\\\\Qm\", \"m\\\\\\\"th quarter\\\"\"]\n};\n\n\nfunction parse_content_xml(d/*:string*/, _opts)/*:Workbook*/ {\n\t\tvar opts = _opts || {};\n\t\tif(DENSE != null && opts.dense == null) opts.dense = DENSE;\n\t\tvar str = xlml_normalize(d);\n\t\tvar state/*:Array*/ = [], tmp;\n\t\tvar tag/*:: = {}*/;\n\t\tvar NFtag = {name:\"\"}, NF = \"\", pidx = 0;\n\t\tvar sheetag/*:: = {name:\"\", '名称':\"\"}*/;\n\t\tvar rowtag/*:: = {'行号':\"\"}*/;\n\t\tvar Sheets = {}, SheetNames/*:Array*/ = [];\n\t\tvar ws = opts.dense ? ([]/*:any*/) : ({}/*:any*/);\n\t\tvar Rn, q/*:: :any = ({t:\"\", v:null, z:null, w:\"\",c:[],}:any)*/;\n\t\tvar ctag = ({value:\"\"}/*:any*/);\n\t\tvar textp = \"\", textpidx = 0, textptag/*:: = {}*/;\n\t\tvar textR = [];\n\t\tvar R = -1, C = -1, range = {s: {r:1000000,c:10000000}, e: {r:0, c:0}};\n\t\tvar row_ol = 0;\n\t\tvar number_format_map = {};\n\t\tvar merges/*:Array*/ = [], mrange = {}, mR = 0, mC = 0;\n\t\tvar rowinfo/*:Array*/ = [], rowpeat = 1, colpeat = 1;\n\t\tvar arrayf/*:Array<[Range, string]>*/ = [];\n\t\tvar WB = {Names:[]};\n\t\tvar atag = ({}/*:any*/);\n\t\tvar _Ref/*:[string, string]*/ = [\"\", \"\"];\n\t\tvar comments/*:Array*/ = [], comment/*:Comment*/ = ({}/*:any*/);\n\t\tvar creator = \"\", creatoridx = 0;\n\t\tvar isstub = false, intable = false;\n\t\tvar i = 0;\n\t\txlmlregex.lastIndex = 0;\n\t\tstr = str.replace(//mg,\"\").replace(//gm,\"\");\n\t\twhile((Rn = xlmlregex.exec(str))) switch((Rn[3]=Rn[3].replace(/_.*$/,\"\"))) {\n\n\t\t\tcase 'table': case '工作表': // 9.1.2 \n\t\t\t\tif(Rn[1]==='/') {\n\t\t\t\t\tif(range.e.c >= range.s.c && range.e.r >= range.s.r) ws['!ref'] = encode_range(range);\n\t\t\t\t\telse ws['!ref'] = \"A1:A1\";\n\t\t\t\t\tif(opts.sheetRows > 0 && opts.sheetRows <= range.e.r) {\n\t\t\t\t\t\tws['!fullref'] = ws['!ref'];\n\t\t\t\t\t\trange.e.r = opts.sheetRows - 1;\n\t\t\t\t\t\tws['!ref'] = encode_range(range);\n\t\t\t\t\t}\n\t\t\t\t\tif(merges.length) ws['!merges'] = merges;\n\t\t\t\t\tif(rowinfo.length) ws[\"!rows\"] = rowinfo;\n\t\t\t\t\tsheetag.name = sheetag['名称'] || sheetag.name;\n\t\t\t\t\tif(typeof JSON !== 'undefined') JSON.stringify(sheetag);\n\t\t\t\t\tSheetNames.push(sheetag.name);\n\t\t\t\t\tSheets[sheetag.name] = ws;\n\t\t\t\t\tintable = false;\n\t\t\t\t}\n\t\t\t\telse if(Rn[0].charAt(Rn[0].length-2) !== '/') {\n\t\t\t\t\tsheetag = parsexmltag(Rn[0], false);\n\t\t\t\t\tR = C = -1;\n\t\t\t\t\trange.s.r = range.s.c = 10000000; range.e.r = range.e.c = 0;\n\t\t\t\t\tws = opts.dense ? ([]/*:any*/) : ({}/*:any*/); merges = [];\n\t\t\t\t\trowinfo = [];\n\t\t\t\t\tintable = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 'table-row-group': // 9.1.9 \n\t\t\t\tif(Rn[1] === \"/\") --row_ol; else ++row_ol;\n\t\t\t\tbreak;\n\t\t\tcase 'table-row': case '行': // 9.1.3 \n\t\t\t\tif(Rn[1] === '/') { R+=rowpeat; rowpeat = 1; break; }\n\t\t\t\trowtag = parsexmltag(Rn[0], false);\n\t\t\t\tif(rowtag['行号']) R = rowtag['行号'] - 1; else if(R == -1) R = 0;\n\t\t\t\trowpeat = +rowtag['number-rows-repeated'] || 1;\n\t\t\t\t/* TODO: remove magic */\n\t\t\t\tif(rowpeat < 10) for(i = 0; i < rowpeat; ++i) if(row_ol > 0) rowinfo[R + i] = {level: row_ol};\n\t\t\t\tC = -1; break;\n\t\t\tcase 'covered-table-cell': // 9.1.5 \n\t\t\t\tif(Rn[1] !== '/') ++C;\n\t\t\t\tif(opts.sheetStubs) {\n\t\t\t\t\tif(opts.dense) { if(!ws[R]) ws[R] = []; ws[R][C] = {t:'z'}; }\n\t\t\t\t\telse ws[encode_cell({r:R,c:C})] = {t:'z'};\n\t\t\t\t}\n\t\t\t\ttextp = \"\"; textR = [];\n\t\t\t\tbreak; /* stub */\n\t\t\tcase 'table-cell': case '数据':\n\t\t\t\tif(Rn[0].charAt(Rn[0].length-2) === '/') {\n\t\t\t\t\t++C;\n\t\t\t\t\tctag = parsexmltag(Rn[0], false);\n\t\t\t\t\tcolpeat = parseInt(ctag['number-columns-repeated']||\"1\", 10);\n\t\t\t\t\tq = ({t:'z', v:null/*:: , z:null, w:\"\",c:[]*/}/*:any*/);\n\t\t\t\t\tif(ctag.formula && opts.cellFormula != false) q.f = ods_to_csf_formula(unescapexml(ctag.formula));\n\t\t\t\t\tif((ctag['数据类型'] || ctag['value-type']) == \"string\") {\n\t\t\t\t\t\tq.t = \"s\"; q.v = unescapexml(ctag['string-value'] || \"\");\n\t\t\t\t\t\tif(opts.dense) {\n\t\t\t\t\t\t\tif(!ws[R]) ws[R] = [];\n\t\t\t\t\t\t\tws[R][C] = q;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tws[encode_cell({r:R,c:C})] = q;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tC+= colpeat-1;\n\t\t\t\t} else if(Rn[1]!=='/') {\n\t\t\t\t\t++C;\n\t\t\t\t\ttextp = \"\"; textpidx = 0; textR = [];\n\t\t\t\t\tcolpeat = 1;\n\t\t\t\t\tvar rptR = rowpeat ? R + rowpeat - 1 : R;\n\t\t\t\t\tif(C > range.e.c) range.e.c = C;\n\t\t\t\t\tif(C < range.s.c) range.s.c = C;\n\t\t\t\t\tif(R < range.s.r) range.s.r = R;\n\t\t\t\t\tif(rptR > range.e.r) range.e.r = rptR;\n\t\t\t\t\tctag = parsexmltag(Rn[0], false);\n\t\t\t\t\tcomments = []; comment = ({}/*:any*/);\n\t\t\t\t\tq = ({t:ctag['数据类型'] || ctag['value-type'], v:null/*:: , z:null, w:\"\",c:[]*/}/*:any*/);\n\t\t\t\t\tif(opts.cellFormula) {\n\t\t\t\t\t\tif(ctag.formula) ctag.formula = unescapexml(ctag.formula);\n\t\t\t\t\t\tif(ctag['number-matrix-columns-spanned'] && ctag['number-matrix-rows-spanned']) {\n\t\t\t\t\t\t\tmR = parseInt(ctag['number-matrix-rows-spanned'],10) || 0;\n\t\t\t\t\t\t\tmC = parseInt(ctag['number-matrix-columns-spanned'],10) || 0;\n\t\t\t\t\t\t\tmrange = {s: {r:R,c:C}, e:{r:R + mR-1,c:C + mC-1}};\n\t\t\t\t\t\t\tq.F = encode_range(mrange);\n\t\t\t\t\t\t\tarrayf.push([mrange, q.F]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(ctag.formula) q.f = ods_to_csf_formula(ctag.formula);\n\t\t\t\t\t\telse for(i = 0; i < arrayf.length; ++i)\n\t\t\t\t\t\t\tif(R >= arrayf[i][0].s.r && R <= arrayf[i][0].e.r)\n\t\t\t\t\t\t\t\tif(C >= arrayf[i][0].s.c && C <= arrayf[i][0].e.c)\n\t\t\t\t\t\t\t\t\tq.F = arrayf[i][1];\n\t\t\t\t\t}\n\t\t\t\t\tif(ctag['number-columns-spanned'] || ctag['number-rows-spanned']) {\n\t\t\t\t\t\tmR = parseInt(ctag['number-rows-spanned'],10) || 0;\n\t\t\t\t\t\tmC = parseInt(ctag['number-columns-spanned'],10) || 0;\n\t\t\t\t\t\tmrange = {s: {r:R,c:C}, e:{r:R + mR-1,c:C + mC-1}};\n\t\t\t\t\t\tmerges.push(mrange);\n\t\t\t\t\t}\n\n\t\t\t\t\t/* 19.675.2 table:number-columns-repeated */\n\t\t\t\t\tif(ctag['number-columns-repeated']) colpeat = parseInt(ctag['number-columns-repeated'], 10);\n\n\t\t\t\t\t/* 19.385 office:value-type */\n\t\t\t\t\tswitch(q.t) {\n\t\t\t\t\t\tcase 'boolean': q.t = 'b'; q.v = parsexmlbool(ctag['boolean-value']); break;\n\t\t\t\t\t\tcase 'float': q.t = 'n'; q.v = parseFloat(ctag.value); break;\n\t\t\t\t\t\tcase 'percentage': q.t = 'n'; q.v = parseFloat(ctag.value); break;\n\t\t\t\t\t\tcase 'currency': q.t = 'n'; q.v = parseFloat(ctag.value); break;\n\t\t\t\t\t\tcase 'date': q.t = 'd'; q.v = parseDate(ctag['date-value']);\n\t\t\t\t\t\t\tif(!opts.cellDates) { q.t = 'n'; q.v = datenum(q.v); }\n\t\t\t\t\t\t\tq.z = 'm/d/yy'; break;\n\t\t\t\t\t\tcase 'time': q.t = 'n'; q.v = parse_isodur(ctag['time-value'])/86400;\n\t\t\t\t\t\t\tif(opts.cellDates) { q.t = 'd'; q.v = numdate(q.v); }\n\t\t\t\t\t\t\tq.z = 'HH:MM:SS'; break;\n\t\t\t\t\t\tcase 'number': q.t = 'n'; q.v = parseFloat(ctag['数据数值']); break;\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tif(q.t === 'string' || q.t === 'text' || !q.t) {\n\t\t\t\t\t\t\t\tq.t = 's';\n\t\t\t\t\t\t\t\tif(ctag['string-value'] != null) { textp = unescapexml(ctag['string-value']); textR = []; }\n\t\t\t\t\t\t\t} else throw new Error('Unsupported value type ' + q.t);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tisstub = false;\n\t\t\t\t\tif(q.t === 's') {\n\t\t\t\t\t\tq.v = textp || '';\n\t\t\t\t\t\tif(textR.length) q.R = textR;\n\t\t\t\t\t\tisstub = textpidx == 0;\n\t\t\t\t\t}\n\t\t\t\t\tif(atag.Target) q.l = atag;\n\t\t\t\t\tif(comments.length > 0) { q.c = comments; comments = []; }\n\t\t\t\t\tif(textp && opts.cellText !== false) q.w = textp;\n\t\t\t\t\tif(isstub) { q.t = \"z\"; delete q.v; }\n\t\t\t\t\tif(!isstub || opts.sheetStubs) {\n\t\t\t\t\t\tif(!(opts.sheetRows && opts.sheetRows <= R)) {\n\t\t\t\t\t\t\tfor(var rpt = 0; rpt < rowpeat; ++rpt) {\n\t\t\t\t\t\t\t\tcolpeat = parseInt(ctag['number-columns-repeated']||\"1\", 10);\n\t\t\t\t\t\t\t\tif(opts.dense) {\n\t\t\t\t\t\t\t\t\tif(!ws[R + rpt]) ws[R + rpt] = [];\n\t\t\t\t\t\t\t\t\tws[R + rpt][C] = rpt == 0 ? q : dup(q);\n\t\t\t\t\t\t\t\t\twhile(--colpeat > 0) ws[R + rpt][C + colpeat] = dup(q);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\tws[encode_cell({r:R + rpt,c:C})] = q;\n\t\t\t\t\t\t\t\t\twhile(--colpeat > 0) ws[encode_cell({r:R + rpt,c:C + colpeat})] = dup(q);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif(range.e.c <= C) range.e.c = C;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcolpeat = parseInt(ctag['number-columns-repeated']||\"1\", 10);\n\t\t\t\t\tC += colpeat-1; colpeat = 0;\n\t\t\t\t\tq = {/*:: t:\"\", v:null, z:null, w:\"\",c:[]*/};\n\t\t\t\t\ttextp = \"\"; textR = [];\n\t\t\t\t}\n\t\t\t\tatag = ({}/*:any*/);\n\t\t\t\tbreak; // 9.1.4 \n\n\t\t\t/* pure state */\n\t\t\tcase 'document': // TODO: is the root for FODS\n\t\t\tcase 'document-content': case '电子表格文档': // 3.1.3.2 \n\t\t\tcase 'spreadsheet': case '主体': // 3.7 \n\t\t\tcase 'scripts': // 3.12 \n\t\t\tcase 'styles': // TODO \n\t\t\tcase 'font-face-decls': // 3.14 \n\t\t\tcase 'master-styles': // 3.15.4 -- relevant for FODS\n\t\t\t\tif(Rn[1]==='/'){if((tmp=state.pop())[0]!==Rn[3]) throw \"Bad state: \"+tmp;}\n\t\t\t\telse if(Rn[0].charAt(Rn[0].length-2) !== '/') state.push([Rn[3], true]);\n\t\t\t\tbreak;\n\n\t\t\tcase 'annotation': // 14.1 \n\t\t\t\tif(Rn[1]==='/'){\n\t\t\t\t\tif((tmp=state.pop())[0]!==Rn[3]) throw \"Bad state: \"+tmp;\n\t\t\t\t\tcomment.t = textp;\n\t\t\t\t\tif(textR.length) /*::(*/comment/*:: :any)*/.R = textR;\n\t\t\t\t\tcomment.a = creator;\n\t\t\t\t\tcomments.push(comment);\n\t\t\t\t}\n\t\t\t\telse if(Rn[0].charAt(Rn[0].length-2) !== '/') {state.push([Rn[3], false]);}\n\t\t\t\tcreator = \"\"; creatoridx = 0;\n\t\t\t\ttextp = \"\"; textpidx = 0; textR = [];\n\t\t\t\tbreak;\n\n\t\t\tcase 'creator': // 4.3.2.7 \n\t\t\t\tif(Rn[1]==='/') { creator = str.slice(creatoridx,Rn.index); }\n\t\t\t\telse creatoridx = Rn.index + Rn[0].length;\n\t\t\t\tbreak;\n\n\t\t\t/* ignore state */\n\t\t\tcase 'meta': case '元数据': // TODO: FODS/UOF\n\t\t\tcase 'settings': // TODO: \n\t\t\tcase 'config-item-set': // TODO: \n\t\t\tcase 'config-item-map-indexed': // TODO: \n\t\t\tcase 'config-item-map-entry': // TODO: \n\t\t\tcase 'config-item-map-named': // TODO: \n\t\t\tcase 'shapes': // 9.2.8 \n\t\t\tcase 'frame': // 10.4.2 \n\t\t\tcase 'text-box': // 10.4.3 \n\t\t\tcase 'image': // 10.4.4 \n\t\t\tcase 'data-pilot-tables': // 9.6.2 \n\t\t\tcase 'list-style': // 16.30 \n\t\t\tcase 'form': // 13.13 \n\t\t\tcase 'dde-links': // 9.8 \n\t\t\tcase 'event-listeners': // TODO\n\t\t\tcase 'chart': // TODO\n\t\t\t\tif(Rn[1]==='/'){if((tmp=state.pop())[0]!==Rn[3]) throw \"Bad state: \"+tmp;}\n\t\t\t\telse if(Rn[0].charAt(Rn[0].length-2) !== '/') state.push([Rn[3], false]);\n\t\t\t\ttextp = \"\"; textpidx = 0; textR = [];\n\t\t\t\tbreak;\n\n\t\t\tcase 'scientific-number': // TODO: \n\t\t\t\tbreak;\n\t\t\tcase 'currency-symbol': // TODO: \n\t\t\t\tbreak;\n\t\t\tcase 'currency-style': // TODO: \n\t\t\t\tbreak;\n\t\t\tcase 'number-style': // 16.27.2 \n\t\t\tcase 'percentage-style': // 16.27.9 \n\t\t\tcase 'date-style': // 16.27.10 \n\t\t\tcase 'time-style': // 16.27.18 \n\t\t\t\tif(Rn[1]==='/'){\n\t\t\t\t\tnumber_format_map[NFtag.name] = NF;\n\t\t\t\t\tif((tmp=state.pop())[0]!==Rn[3]) throw \"Bad state: \"+tmp;\n\t\t\t\t} else if(Rn[0].charAt(Rn[0].length-2) !== '/') {\n\t\t\t\t\tNF = \"\";\n\t\t\t\t\tNFtag = parsexmltag(Rn[0], false);\n\t\t\t\t\tstate.push([Rn[3], true]);\n\t\t\t\t} break;\n\n\t\t\tcase 'script': break; // 3.13 \n\t\t\tcase 'libraries': break; // TODO: \n\t\t\tcase 'automatic-styles': break; // 3.15.3 \n\n\t\t\tcase 'default-style': // TODO: \n\t\t\tcase 'page-layout': break; // TODO: \n\t\t\tcase 'style': // 16.2 \n\t\t\t\tbreak;\n\t\t\tcase 'map': break; // 16.3 \n\t\t\tcase 'font-face': break; // 16.21 \n\n\t\t\tcase 'paragraph-properties': break; // 17.6 \n\t\t\tcase 'table-properties': break; // 17.15 \n\t\t\tcase 'table-column-properties': break; // 17.16 \n\t\t\tcase 'table-row-properties': break; // 17.17 \n\t\t\tcase 'table-cell-properties': break; // 17.18 \n\n\t\t\tcase 'number': // 16.27.3 \n\t\t\t\tswitch(state[state.length-1][0]) {\n\t\t\t\t\tcase 'time-style':\n\t\t\t\t\tcase 'date-style':\n\t\t\t\t\t\ttag = parsexmltag(Rn[0], false);\n\t\t\t\t\t\tNF += number_formats_ods[Rn[3]][tag.style==='long'?1:0]; break;\n\t\t\t\t} break;\n\n\t\t\tcase 'fraction': break; // TODO 16.27.6 \n\n\t\t\tcase 'day': // 16.27.11 \n\t\t\tcase 'month': // 16.27.12 \n\t\t\tcase 'year': // 16.27.13 \n\t\t\tcase 'era': // 16.27.14 \n\t\t\tcase 'day-of-week': // 16.27.15 \n\t\t\tcase 'week-of-year': // 16.27.16 \n\t\t\tcase 'quarter': // 16.27.17 \n\t\t\tcase 'hours': // 16.27.19 \n\t\t\tcase 'minutes': // 16.27.20 \n\t\t\tcase 'seconds': // 16.27.21 \n\t\t\tcase 'am-pm': // 16.27.22 \n\t\t\t\tswitch(state[state.length-1][0]) {\n\t\t\t\t\tcase 'time-style':\n\t\t\t\t\tcase 'date-style':\n\t\t\t\t\t\ttag = parsexmltag(Rn[0], false);\n\t\t\t\t\t\tNF += number_formats_ods[Rn[3]][tag.style==='long'?1:0]; break;\n\t\t\t\t} break;\n\n\t\t\tcase 'boolean-style': break; // 16.27.23 \n\t\t\tcase 'boolean': break; // 16.27.24 \n\t\t\tcase 'text-style': break; // 16.27.25 \n\t\t\tcase 'text': // 16.27.26 \n\t\t\t\tif(Rn[0].slice(-2) === \"/>\") break;\n\t\t\t\telse if(Rn[1]===\"/\") switch(state[state.length-1][0]) {\n\t\t\t\t\tcase 'number-style':\n\t\t\t\t\tcase 'date-style':\n\t\t\t\t\tcase 'time-style':\n\t\t\t\t\t\tNF += str.slice(pidx, Rn.index);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse pidx = Rn.index + Rn[0].length;\n\t\t\t\tbreak;\n\n\t\t\tcase 'named-range': // 9.4.12 \n\t\t\t\ttag = parsexmltag(Rn[0], false);\n\t\t\t\t_Ref = ods_to_csf_3D(tag['cell-range-address']);\n\t\t\t\tvar nrange = ({Name:tag.name, Ref:_Ref[0] + '!' + _Ref[1]}/*:any*/);\n\t\t\t\tif(intable) nrange.Sheet = SheetNames.length;\n\t\t\t\tWB.Names.push(nrange);\n\t\t\t\tbreak;\n\n\t\t\tcase 'text-content': break; // 16.27.27 \n\t\t\tcase 'text-properties': break; // 16.27.27 \n\t\t\tcase 'embedded-text': break; // 16.27.4 \n\n\t\t\tcase 'body': case '电子表格': break; // 3.3 16.9.6 19.726.3\n\n\t\t\tcase 'forms': break; // 12.25.2 13.2\n\t\t\tcase 'table-column': break; // 9.1.6 \n\t\t\tcase 'table-header-rows': break; // 9.1.7 \n\t\t\tcase 'table-rows': break; // 9.1.12 \n\t\t\t/* TODO: outline levels */\n\t\t\tcase 'table-column-group': break; // 9.1.10 \n\t\t\tcase 'table-header-columns': break; // 9.1.11 \n\t\t\tcase 'table-columns': break; // 9.1.12 \n\n\t\t\tcase 'null-date': break; // 9.4.2 TODO: date1904\n\n\t\t\tcase 'graphic-properties': break; // 17.21 \n\t\t\tcase 'calculation-settings': break; // 9.4.1 \n\t\t\tcase 'named-expressions': break; // 9.4.11 \n\t\t\tcase 'label-range': break; // 9.4.9 \n\t\t\tcase 'label-ranges': break; // 9.4.10 \n\t\t\tcase 'named-expression': break; // 9.4.13 \n\t\t\tcase 'sort': break; // 9.4.19 \n\t\t\tcase 'sort-by': break; // 9.4.20 \n\t\t\tcase 'sort-groups': break; // 9.4.22 \n\n\t\t\tcase 'tab': break; // 6.1.4 \n\t\t\tcase 'line-break': break; // 6.1.5 \n\t\t\tcase 'span': break; // 6.1.7 \n\t\t\tcase 'p': case '文本串': // 5.1.3 \n\t\t\t\tif(['master-styles'].indexOf(state[state.length-1][0]) > -1) break;\n\t\t\t\tif(Rn[1]==='/' && (!ctag || !ctag['string-value'])) {\n\t\t\t\t\tvar ptp = parse_text_p(str.slice(textpidx,Rn.index), textptag);\n\t\t\t\t\ttextp = (textp.length > 0 ? textp + \"\\n\" : \"\") + ptp[0];\n\t\t\t\t} else { textptag = parsexmltag(Rn[0], false); textpidx = Rn.index + Rn[0].length; }\n\t\t\t\tbreak; // \n\t\t\tcase 's': break; // \n\n\t\t\tcase 'database-range': // 9.4.15 \n\t\t\t\tif(Rn[1]==='/') break;\n\t\t\t\ttry {\n\t\t\t\t\t_Ref = ods_to_csf_3D(parsexmltag(Rn[0])['target-range-address']);\n\t\t\t\t\tSheets[_Ref[0]]['!autofilter'] = { ref:_Ref[1] };\n\t\t\t\t} catch(e) {/* empty */}\n\t\t\t\tbreak;\n\n\t\t\tcase 'date': break; // <*:date>\n\n\t\t\tcase 'object': break; // 10.4.6.2 \n\t\t\tcase 'title': case '标题': break; // <*:title> OR \n\t\t\tcase 'desc': break; // <*:desc>\n\t\t\tcase 'binary-data': break; // 10.4.5 TODO: b64 blob\n\n\t\t\t/* 9.2 Advanced Tables */\n\t\t\tcase 'table-source': break; // 9.2.6\n\t\t\tcase 'scenario': break; // 9.2.6\n\n\t\t\tcase 'iteration': break; // 9.4.3 \n\t\t\tcase 'content-validations': break; // 9.4.4 \n\t\t\tcase 'filter': break; // 9.5.2 \n\t\t\tcase 'filter-and': break; // 9.5.3 \n\t\t\tcase 'filter-or': break; // 9.5.4 \n\t\t\tcase 'filter-condition': break; // 9.5.5 \n\n\t\t\tcase 'list-level-style-bullet': break; // 16.31 \n\t\t\tcase 'page-count': break; // TODO \n\t\t\tcase 'time': break; // TODO \n\n\t\t\t/* 9.3 Advanced Table Cells */\n\t\t\tcase 'cell-range-source': break; // 9.3.1 \n\t\t\tcase 'property': break; // 13.8 \n\n\t\t\tcase 'a': // 6.1.8 hyperlink\n\t\t\t\tif(Rn[1]!== '/') {\n\t\t\t\t\tatag = parsexmltag(Rn[0], false);\n\t\t\t\t\tif(!atag.href) break;\n\t\t\t\t\tatag.Target = unescapexml(atag.href); delete atag.href;\n\t\t\t\t\tif(atag.Target.charAt(0) == \"#\" && atag.Target.indexOf(\".\") > -1) {\n\t\t\t\t\t\t_Ref = ods_to_csf_3D(atag.Target.slice(1));\n\t\t\t\t\t\tatag.Target = \"#\" + _Ref[0] + \"!\" + _Ref[1];\n\t\t\t\t\t} else if(atag.Target.match(/^\\.\\.[\\\\\\/]/)) atag.Target = atag.Target.slice(3);\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\t/* non-standard */\n\t\t\tcase 'table-protection': break;\n\t\t\tcase 'data-pilot-grand-total': break; // ',\n\t\t\t'',\n\t\t\t\t'',\n\t\t\t\t'',\n\t\t\t\t'',\n\t\t\t\t'',\n\t\t\t'',\n\t\t''\n\t].join(\"\");\n\n\tvar payload = '' + master_styles + '';\n\n\treturn function wso(/*::wb, opts*/) {\n\t\treturn XML_HEADER + payload;\n\t};\n})();\nvar write_content_ods/*:{(wb:any, opts:any):string}*/ = /* @__PURE__ */(function() {\n\t/* 6.1.2 White Space Characters */\n\tvar write_text_p = function(text/*:string*/)/*:string*/ {\n\t\treturn escapexml(text)\n\t\t\t.replace(/ +/g, function($$){return '';})\n\t\t\t.replace(/\\t/g, \"\")\n\t\t\t.replace(/\\n/g, \"\")\n\t\t\t.replace(/^ /, \"\").replace(/ $/, \"\");\n\t};\n\n\tvar null_cell_xml = ' \\n';\n\tvar covered_cell_xml = ' \\n';\n\tvar write_ws = function(ws, wb/*:Workbook*/, i/*:number*//*::, opts*/)/*:string*/ {\n\t\t/* Section 9 Tables */\n\t\tvar o/*:Array*/ = [];\n\t\to.push(' \\n');\n\t\tvar R=0,C=0, range = decode_range(ws['!ref']||\"A1\");\n\t\tvar marr/*:Array*/ = ws['!merges'] || [], mi = 0;\n\t\tvar dense = Array.isArray(ws);\n\t\tif(ws[\"!cols\"]) {\n\t\t\tfor(C = 0; C <= range.e.c; ++C) o.push(' \\n');\n\t\t}\n\t\tvar H = \"\", ROWS = ws[\"!rows\"]||[];\n\t\tfor(R = 0; R < range.s.r; ++R) {\n\t\t\tH = ROWS[R] ? ' table:style-name=\"ro' + ROWS[R].ods + '\"' : \"\";\n\t\t\to.push(' \\n');\n\t\t}\n\t\tfor(; R <= range.e.r; ++R) {\n\t\t\tH = ROWS[R] ? ' table:style-name=\"ro' + ROWS[R].ods + '\"' : \"\";\n\t\t\to.push(' \\n');\n\t\t\tfor(C=0; C < range.s.c; ++C) o.push(null_cell_xml);\n\t\t\tfor(; C <= range.e.c; ++C) {\n\t\t\t\tvar skip = false, ct = {}, textp = \"\";\n\t\t\t\tfor(mi = 0; mi != marr.length; ++mi) {\n\t\t\t\t\tif(marr[mi].s.c > C) continue;\n\t\t\t\t\tif(marr[mi].s.r > R) continue;\n\t\t\t\t\tif(marr[mi].e.c < C) continue;\n\t\t\t\t\tif(marr[mi].e.r < R) continue;\n\t\t\t\t\tif(marr[mi].s.c != C || marr[mi].s.r != R) skip = true;\n\t\t\t\t\tct['table:number-columns-spanned'] = (marr[mi].e.c - marr[mi].s.c + 1);\n\t\t\t\t\tct['table:number-rows-spanned'] = (marr[mi].e.r - marr[mi].s.r + 1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(skip) { o.push(covered_cell_xml); continue; }\n\t\t\t\tvar ref = encode_cell({r:R, c:C}), cell = dense ? (ws[R]||[])[C]: ws[ref];\n\t\t\t\tif(cell && cell.f) {\n\t\t\t\t\tct['table:formula'] = escapexml(csf_to_ods_formula(cell.f));\n\t\t\t\t\tif(cell.F) {\n\t\t\t\t\t\tif(cell.F.slice(0, ref.length) == ref) {\n\t\t\t\t\t\t\tvar _Fref = decode_range(cell.F);\n\t\t\t\t\t\t\tct['table:number-matrix-columns-spanned'] = (_Fref.e.c - _Fref.s.c + 1);\n\t\t\t\t\t\t\tct['table:number-matrix-rows-spanned'] = (_Fref.e.r - _Fref.s.r + 1);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(!cell) { o.push(null_cell_xml); continue; }\n\t\t\t\tswitch(cell.t) {\n\t\t\t\t\tcase 'b':\n\t\t\t\t\t\ttextp = (cell.v ? 'TRUE' : 'FALSE');\n\t\t\t\t\t\tct['office:value-type'] = \"boolean\";\n\t\t\t\t\t\tct['office:boolean-value'] = (cell.v ? 'true' : 'false');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'n':\n\t\t\t\t\t\ttextp = (cell.w||String(cell.v||0));\n\t\t\t\t\t\tct['office:value-type'] = \"float\";\n\t\t\t\t\t\tct['office:value'] = (cell.v||0);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 's': case 'str':\n\t\t\t\t\t\ttextp = cell.v == null ? \"\" : cell.v;\n\t\t\t\t\t\tct['office:value-type'] = \"string\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'd':\n\t\t\t\t\t\ttextp = (cell.w||(parseDate(cell.v).toISOString()));\n\t\t\t\t\t\tct['office:value-type'] = \"date\";\n\t\t\t\t\t\tct['office:date-value'] = (parseDate(cell.v).toISOString());\n\t\t\t\t\t\tct['table:style-name'] = \"ce1\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t//case 'e':\n\t\t\t\t\tdefault: o.push(null_cell_xml); continue;\n\t\t\t\t}\n\t\t\t\tvar text_p = write_text_p(textp);\n\t\t\t\tif(cell.l && cell.l.Target) {\n\t\t\t\t\tvar _tgt = cell.l.Target;\n\t\t\t\t\t_tgt = _tgt.charAt(0) == \"#\" ? \"#\" + csf_to_ods_3D(_tgt.slice(1)) : _tgt;\n\t\t\t\t\t// TODO: choose correct parent path format based on link delimiters\n\t\t\t\t\tif(_tgt.charAt(0) != \"#\" && !_tgt.match(/^\\w+:/)) _tgt = '../' + _tgt;\n\t\t\t\t\ttext_p = writextag('text:a', text_p, {'xlink:href': _tgt.replace(/&/g, \"&\")});\n\t\t\t\t}\n\t\t\t\to.push(' ' + writextag('table:table-cell', writextag('text:p', text_p, {}), ct) + '\\n');\n\t\t\t}\n\t\t\to.push(' \\n');\n\t\t}\n\t\to.push(' \\n');\n\t\treturn o.join(\"\");\n\t};\n\n\tvar write_automatic_styles_ods = function(o/*:Array*/, wb) {\n\t\to.push(' \\n');\n\n\t\to.push(' \\n');\n\t\to.push(' \\n');\n\t\to.push(' /\\n');\n\t\to.push(' \\n');\n\t\to.push(' /\\n');\n\t\to.push(' \\n');\n\t\to.push(' \\n');\n\n\t\t/* column styles */\n\t\tvar cidx = 0;\n\t\twb.SheetNames.map(function(n) { return wb.Sheets[n]; }).forEach(function(ws) {\n\t\t\tif(!ws) return;\n\t\t\tif(ws[\"!cols\"]) {\n\t\t\t\tfor(var C = 0; C < ws[\"!cols\"].length; ++C) if(ws[\"!cols\"][C]) {\n\t\t\t\t\tvar colobj = ws[\"!cols\"][C];\n\t\t\t\t\tif(colobj.width == null && colobj.wpx == null && colobj.wch == null) continue;\n\t\t\t\t\tprocess_col(colobj);\n\t\t\t\t\tcolobj.ods = cidx;\n\t\t\t\t\tvar w = ws[\"!cols\"][C].wpx + \"px\";\n\t\t\t\t\to.push(' \\n');\n\t\t\t\t\to.push(' \\n');\n\t\t\t\t\to.push(' \\n');\n\t\t\t\t\t++cidx;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t/* row styles */\n\t\tvar ridx = 0;\n\t\twb.SheetNames.map(function(n) { return wb.Sheets[n]; }).forEach(function(ws) {\n\t\t\tif(!ws) return;\n\t\t\tif(ws[\"!rows\"]) {\n\t\t\t\tfor(var R = 0; R < ws[\"!rows\"].length; ++R) if(ws[\"!rows\"][R]) {\n\t\t\t\t\tws[\"!rows\"][R].ods = ridx;\n\t\t\t\t\tvar h = ws[\"!rows\"][R].hpx + \"px\";\n\t\t\t\t\to.push(' \\n');\n\t\t\t\t\to.push(' \\n');\n\t\t\t\t\to.push(' \\n');\n\t\t\t\t\t++ridx;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\t/* table */\n\t\to.push(' \\n');\n\t\to.push(' \\n');\n\t\to.push(' \\n');\n\n\t\t/* table cells, text */\n\t\to.push(' \\n');\n\n\t\t/* page-layout */\n\n\t\to.push(' \\n');\n\t};\n\n\treturn function wcx(wb, opts) {\n\t\tvar o = [XML_HEADER];\n\t\t/* 3.1.3.2 */\n\t\tvar attr = wxt_helper({\n\t\t\t'xmlns:office': \"urn:oasis:names:tc:opendocument:xmlns:office:1.0\",\n\t\t\t'xmlns:table': \"urn:oasis:names:tc:opendocument:xmlns:table:1.0\",\n\t\t\t'xmlns:style': \"urn:oasis:names:tc:opendocument:xmlns:style:1.0\",\n\t\t\t'xmlns:text': \"urn:oasis:names:tc:opendocument:xmlns:text:1.0\",\n\t\t\t'xmlns:draw': \"urn:oasis:names:tc:opendocument:xmlns:drawing:1.0\",\n\t\t\t'xmlns:fo': \"urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0\",\n\t\t\t'xmlns:xlink': \"http://www.w3.org/1999/xlink\",\n\t\t\t'xmlns:dc': \"http://purl.org/dc/elements/1.1/\",\n\t\t\t'xmlns:meta': \"urn:oasis:names:tc:opendocument:xmlns:meta:1.0\",\n\t\t\t'xmlns:number': \"urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0\",\n\t\t\t'xmlns:presentation': \"urn:oasis:names:tc:opendocument:xmlns:presentation:1.0\",\n\t\t\t'xmlns:svg': \"urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0\",\n\t\t\t'xmlns:chart': \"urn:oasis:names:tc:opendocument:xmlns:chart:1.0\",\n\t\t\t'xmlns:dr3d': \"urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0\",\n\t\t\t'xmlns:math': \"http://www.w3.org/1998/Math/MathML\",\n\t\t\t'xmlns:form': \"urn:oasis:names:tc:opendocument:xmlns:form:1.0\",\n\t\t\t'xmlns:script': \"urn:oasis:names:tc:opendocument:xmlns:script:1.0\",\n\t\t\t'xmlns:ooo': \"http://openoffice.org/2004/office\",\n\t\t\t'xmlns:ooow': \"http://openoffice.org/2004/writer\",\n\t\t\t'xmlns:oooc': \"http://openoffice.org/2004/calc\",\n\t\t\t'xmlns:dom': \"http://www.w3.org/2001/xml-events\",\n\t\t\t'xmlns:xforms': \"http://www.w3.org/2002/xforms\",\n\t\t\t'xmlns:xsd': \"http://www.w3.org/2001/XMLSchema\",\n\t\t\t'xmlns:xsi': \"http://www.w3.org/2001/XMLSchema-instance\",\n\t\t\t'xmlns:sheet': \"urn:oasis:names:tc:opendocument:sh33tjs:1.0\",\n\t\t\t'xmlns:rpt': \"http://openoffice.org/2005/report\",\n\t\t\t'xmlns:of': \"urn:oasis:names:tc:opendocument:xmlns:of:1.2\",\n\t\t\t'xmlns:xhtml': \"http://www.w3.org/1999/xhtml\",\n\t\t\t'xmlns:grddl': \"http://www.w3.org/2003/g/data-view#\",\n\t\t\t'xmlns:tableooo': \"http://openoffice.org/2009/table\",\n\t\t\t'xmlns:drawooo': \"http://openoffice.org/2010/draw\",\n\t\t\t'xmlns:calcext': \"urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0\",\n\t\t\t'xmlns:loext': \"urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0\",\n\t\t\t'xmlns:field': \"urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0\",\n\t\t\t'xmlns:formx': \"urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0\",\n\t\t\t'xmlns:css3t': \"http://www.w3.org/TR/css3-text/\",\n\t\t\t'office:version': \"1.2\"\n\t\t});\n\n\t\tvar fods = wxt_helper({\n\t\t\t'xmlns:config': \"urn:oasis:names:tc:opendocument:xmlns:config:1.0\",\n\t\t\t'office:mimetype': \"application/vnd.oasis.opendocument.spreadsheet\"\n\t\t});\n\n\t\tif(opts.bookType == \"fods\") {\n\t\t\to.push('\\n');\n\t\t\to.push(write_meta_ods().replace(/office:document-meta/g, \"office:meta\"));\n\t\t\t// TODO: settings (equiv of settings.xml for ODS)\n\t\t} else o.push('\\n');\n\t\t// o.push(' \\n');\n\t\twrite_automatic_styles_ods(o, wb);\n\t\to.push(' \\n');\n\t\to.push(' \\n');\n\t\tfor(var i = 0; i != wb.SheetNames.length; ++i) o.push(write_ws(wb.Sheets[wb.SheetNames[i]], wb, i, opts));\n\t\to.push(' \\n');\n\t\to.push(' \\n');\n\t\tif(opts.bookType == \"fods\") o.push('');\n\t\telse o.push('');\n\t\treturn o.join(\"\");\n\t};\n})();\n\nfunction write_ods(wb/*:any*/, opts/*:any*/) {\n\tif(opts.bookType == \"fods\") return write_content_ods(wb, opts);\n\n\tvar zip = zip_new();\n\tvar f = \"\";\n\n\tvar manifest/*:Array >*/ = [];\n\tvar rdf/*:Array<[string, string]>*/ = [];\n\n\t/* Part 3 Section 3.3 MIME Media Type */\n\tf = \"mimetype\";\n\tzip_add_file(zip, f, \"application/vnd.oasis.opendocument.spreadsheet\");\n\n\t/* Part 1 Section 2.2 Documents */\n\tf = \"content.xml\";\n\tzip_add_file(zip, f, write_content_ods(wb, opts));\n\tmanifest.push([f, \"text/xml\"]);\n\trdf.push([f, \"ContentFile\"]);\n\n\t/* TODO: these are hard-coded styles to satiate excel */\n\tf = \"styles.xml\";\n\tzip_add_file(zip, f, write_styles_ods(wb, opts));\n\tmanifest.push([f, \"text/xml\"]);\n\trdf.push([f, \"StylesFile\"]);\n\n\t/* TODO: this is hard-coded to satiate excel */\n\tf = \"meta.xml\";\n\tzip_add_file(zip, f, XML_HEADER + write_meta_ods(/*::wb, opts*/));\n\tmanifest.push([f, \"text/xml\"]);\n\trdf.push([f, \"MetadataFile\"]);\n\n\t/* Part 3 Section 6 Metadata Manifest File */\n\tf = \"manifest.rdf\";\n\tzip_add_file(zip, f, write_rdf(rdf/*, opts*/));\n\tmanifest.push([f, \"application/rdf+xml\"]);\n\n\t/* Part 3 Section 4 Manifest File */\n\tf = \"META-INF/manifest.xml\";\n\tzip_add_file(zip, f, write_manifest(manifest/*, opts*/));\n\n\treturn zip;\n}\n\n/*! sheetjs (C) 2013-present SheetJS -- http://sheetjs.com */\nfunction u8_to_dataview(array) {\n return new DataView(array.buffer, array.byteOffset, array.byteLength);\n}\nfunction u8str(u8) {\n return typeof TextDecoder != \"undefined\" ? new TextDecoder().decode(u8) : utf8read(a2s(u8));\n}\nfunction stru8(str) {\n return typeof TextEncoder != \"undefined\" ? new TextEncoder().encode(str) : s2a(utf8write(str));\n}\nfunction u8contains(body, search) {\n outer:\n for (var L = 0; L <= body.length - search.length; ++L) {\n for (var j = 0; j < search.length; ++j)\n if (body[L + j] != search[j])\n continue outer;\n return true;\n }\n return false;\n}\nfunction u8concat(u8a) {\n var len = u8a.reduce(function(acc, x) {\n return acc + x.length;\n }, 0);\n var out = new Uint8Array(len);\n var off = 0;\n u8a.forEach(function(u8) {\n out.set(u8, off);\n off += u8.length;\n });\n return out;\n}\nfunction popcnt(x) {\n x -= x >> 1 & 1431655765;\n x = (x & 858993459) + (x >> 2 & 858993459);\n return (x + (x >> 4) & 252645135) * 16843009 >>> 24;\n}\nfunction readDecimal128LE(buf, offset) {\n var exp = (buf[offset + 15] & 127) << 7 | buf[offset + 14] >> 1;\n var mantissa = buf[offset + 14] & 1;\n for (var j = offset + 13; j >= offset; --j)\n mantissa = mantissa * 256 + buf[j];\n return (buf[offset + 15] & 128 ? -mantissa : mantissa) * Math.pow(10, exp - 6176);\n}\nfunction writeDecimal128LE(buf, offset, value) {\n var exp = Math.floor(value == 0 ? 0 : Math.LOG10E * Math.log(Math.abs(value))) + 6176 - 20;\n var mantissa = value / Math.pow(10, exp - 6176);\n buf[offset + 15] |= exp >> 7;\n buf[offset + 14] |= (exp & 127) << 1;\n for (var i = 0; mantissa >= 1; ++i, mantissa /= 256)\n buf[offset + i] = mantissa & 255;\n buf[offset + 15] |= value >= 0 ? 0 : 128;\n}\nfunction parse_varint49(buf, ptr) {\n var l = ptr ? ptr[0] : 0;\n var usz = buf[l] & 127;\n varint:\n if (buf[l++] >= 128) {\n usz |= (buf[l] & 127) << 7;\n if (buf[l++] < 128)\n break varint;\n usz |= (buf[l] & 127) << 14;\n if (buf[l++] < 128)\n break varint;\n usz |= (buf[l] & 127) << 21;\n if (buf[l++] < 128)\n break varint;\n usz += (buf[l] & 127) * Math.pow(2, 28);\n ++l;\n if (buf[l++] < 128)\n break varint;\n usz += (buf[l] & 127) * Math.pow(2, 35);\n ++l;\n if (buf[l++] < 128)\n break varint;\n usz += (buf[l] & 127) * Math.pow(2, 42);\n ++l;\n if (buf[l++] < 128)\n break varint;\n }\n if (ptr)\n ptr[0] = l;\n return usz;\n}\nfunction write_varint49(v) {\n var usz = new Uint8Array(7);\n usz[0] = v & 127;\n var L = 1;\n sz:\n if (v > 127) {\n usz[L - 1] |= 128;\n usz[L] = v >> 7 & 127;\n ++L;\n if (v <= 16383)\n break sz;\n usz[L - 1] |= 128;\n usz[L] = v >> 14 & 127;\n ++L;\n if (v <= 2097151)\n break sz;\n usz[L - 1] |= 128;\n usz[L] = v >> 21 & 127;\n ++L;\n if (v <= 268435455)\n break sz;\n usz[L - 1] |= 128;\n usz[L] = v / 256 >>> 21 & 127;\n ++L;\n if (v <= 34359738367)\n break sz;\n usz[L - 1] |= 128;\n usz[L] = v / 65536 >>> 21 & 127;\n ++L;\n if (v <= 4398046511103)\n break sz;\n usz[L - 1] |= 128;\n usz[L] = v / 16777216 >>> 21 & 127;\n ++L;\n }\n return usz.slice(0, L);\n}\nfunction varint_to_i32(buf) {\n var l = 0, i32 = buf[l] & 127;\n varint:\n if (buf[l++] >= 128) {\n i32 |= (buf[l] & 127) << 7;\n if (buf[l++] < 128)\n break varint;\n i32 |= (buf[l] & 127) << 14;\n if (buf[l++] < 128)\n break varint;\n i32 |= (buf[l] & 127) << 21;\n if (buf[l++] < 128)\n break varint;\n i32 |= (buf[l] & 127) << 28;\n }\n return i32;\n}\nfunction parse_shallow(buf) {\n var out = [], ptr = [0];\n while (ptr[0] < buf.length) {\n var off = ptr[0];\n var num = parse_varint49(buf, ptr);\n var type = num & 7;\n num = Math.floor(num / 8);\n var len = 0;\n var res;\n if (num == 0)\n break;\n switch (type) {\n case 0:\n {\n var l = ptr[0];\n while (buf[ptr[0]++] >= 128)\n ;\n res = buf.slice(l, ptr[0]);\n }\n break;\n case 5:\n len = 4;\n res = buf.slice(ptr[0], ptr[0] + len);\n ptr[0] += len;\n break;\n case 1:\n len = 8;\n res = buf.slice(ptr[0], ptr[0] + len);\n ptr[0] += len;\n break;\n case 2:\n len = parse_varint49(buf, ptr);\n res = buf.slice(ptr[0], ptr[0] + len);\n ptr[0] += len;\n break;\n case 3:\n case 4:\n default:\n throw new Error(\"PB Type \".concat(type, \" for Field \").concat(num, \" at offset \").concat(off));\n }\n var v = { data: res, type: type };\n if (out[num] == null)\n out[num] = [v];\n else\n out[num].push(v);\n }\n return out;\n}\nfunction write_shallow(proto) {\n var out = [];\n proto.forEach(function(field, idx) {\n field.forEach(function(item) {\n if (!item.data)\n return;\n out.push(write_varint49(idx * 8 + item.type));\n if (item.type == 2)\n out.push(write_varint49(item.data.length));\n out.push(item.data);\n });\n });\n return u8concat(out);\n}\nfunction mappa(data, cb) {\n return (data == null ? void 0 : data.map(function(d) {\n return cb(d.data);\n })) || [];\n}\nfunction parse_iwa_file(buf) {\n var _a;\n var out = [], ptr = [0];\n while (ptr[0] < buf.length) {\n var len = parse_varint49(buf, ptr);\n var ai = parse_shallow(buf.slice(ptr[0], ptr[0] + len));\n ptr[0] += len;\n var res = {\n id: varint_to_i32(ai[1][0].data),\n messages: []\n };\n ai[2].forEach(function(b) {\n var mi = parse_shallow(b.data);\n var fl = varint_to_i32(mi[3][0].data);\n res.messages.push({\n meta: mi,\n data: buf.slice(ptr[0], ptr[0] + fl)\n });\n ptr[0] += fl;\n });\n if ((_a = ai[3]) == null ? void 0 : _a[0])\n res.merge = varint_to_i32(ai[3][0].data) >>> 0 > 0;\n out.push(res);\n }\n return out;\n}\nfunction write_iwa_file(ias) {\n var bufs = [];\n ias.forEach(function(ia) {\n var ai = [];\n ai[1] = [{ data: write_varint49(ia.id), type: 0 }];\n ai[2] = [];\n if (ia.merge != null)\n ai[3] = [{ data: write_varint49(+!!ia.merge), type: 0 }];\n var midata = [];\n ia.messages.forEach(function(mi) {\n midata.push(mi.data);\n mi.meta[3] = [{ type: 0, data: write_varint49(mi.data.length) }];\n ai[2].push({ data: write_shallow(mi.meta), type: 2 });\n });\n var aipayload = write_shallow(ai);\n bufs.push(write_varint49(aipayload.length));\n bufs.push(aipayload);\n midata.forEach(function(mid) {\n return bufs.push(mid);\n });\n });\n return u8concat(bufs);\n}\nfunction parse_snappy_chunk(type, buf) {\n if (type != 0)\n throw new Error(\"Unexpected Snappy chunk type \".concat(type));\n var ptr = [0];\n var usz = parse_varint49(buf, ptr);\n var chunks = [];\n while (ptr[0] < buf.length) {\n var tag = buf[ptr[0]] & 3;\n if (tag == 0) {\n var len = buf[ptr[0]++] >> 2;\n if (len < 60)\n ++len;\n else {\n var c = len - 59;\n len = buf[ptr[0]];\n if (c > 1)\n len |= buf[ptr[0] + 1] << 8;\n if (c > 2)\n len |= buf[ptr[0] + 2] << 16;\n if (c > 3)\n len |= buf[ptr[0] + 3] << 24;\n len >>>= 0;\n len++;\n ptr[0] += c;\n }\n chunks.push(buf.slice(ptr[0], ptr[0] + len));\n ptr[0] += len;\n continue;\n } else {\n var offset = 0, length = 0;\n if (tag == 1) {\n length = (buf[ptr[0]] >> 2 & 7) + 4;\n offset = (buf[ptr[0]++] & 224) << 3;\n offset |= buf[ptr[0]++];\n } else {\n length = (buf[ptr[0]++] >> 2) + 1;\n if (tag == 2) {\n offset = buf[ptr[0]] | buf[ptr[0] + 1] << 8;\n ptr[0] += 2;\n } else {\n offset = (buf[ptr[0]] | buf[ptr[0] + 1] << 8 | buf[ptr[0] + 2] << 16 | buf[ptr[0] + 3] << 24) >>> 0;\n ptr[0] += 4;\n }\n }\n chunks = [u8concat(chunks)];\n if (offset == 0)\n throw new Error(\"Invalid offset 0\");\n if (offset > chunks[0].length)\n throw new Error(\"Invalid offset beyond length\");\n if (length >= offset) {\n chunks.push(chunks[0].slice(-offset));\n length -= offset;\n while (length >= chunks[chunks.length - 1].length) {\n chunks.push(chunks[chunks.length - 1]);\n length -= chunks[chunks.length - 1].length;\n }\n }\n chunks.push(chunks[0].slice(-offset, -offset + length));\n }\n }\n var o = u8concat(chunks);\n if (o.length != usz)\n throw new Error(\"Unexpected length: \".concat(o.length, \" != \").concat(usz));\n return o;\n}\nfunction decompress_iwa_file(buf) {\n var out = [];\n var l = 0;\n while (l < buf.length) {\n var t = buf[l++];\n var len = buf[l] | buf[l + 1] << 8 | buf[l + 2] << 16;\n l += 3;\n out.push(parse_snappy_chunk(t, buf.slice(l, l + len)));\n l += len;\n }\n if (l !== buf.length)\n throw new Error(\"data is not a valid framed stream!\");\n return u8concat(out);\n}\nfunction compress_iwa_file(buf) {\n var out = [];\n var l = 0;\n while (l < buf.length) {\n var c = Math.min(buf.length - l, 268435455);\n var frame = new Uint8Array(4);\n out.push(frame);\n var usz = write_varint49(c);\n var L = usz.length;\n out.push(usz);\n if (c <= 60) {\n L++;\n out.push(new Uint8Array([c - 1 << 2]));\n } else if (c <= 256) {\n L += 2;\n out.push(new Uint8Array([240, c - 1 & 255]));\n } else if (c <= 65536) {\n L += 3;\n out.push(new Uint8Array([244, c - 1 & 255, c - 1 >> 8 & 255]));\n } else if (c <= 16777216) {\n L += 4;\n out.push(new Uint8Array([248, c - 1 & 255, c - 1 >> 8 & 255, c - 1 >> 16 & 255]));\n } else if (c <= 4294967296) {\n L += 5;\n out.push(new Uint8Array([252, c - 1 & 255, c - 1 >> 8 & 255, c - 1 >> 16 & 255, c - 1 >>> 24 & 255]));\n }\n out.push(buf.slice(l, l + c));\n L += c;\n frame[0] = 0;\n frame[1] = L & 255;\n frame[2] = L >> 8 & 255;\n frame[3] = L >> 16 & 255;\n l += c;\n }\n return u8concat(out);\n}\nfunction parse_old_storage(buf, sst, rsst, v) {\n var dv = u8_to_dataview(buf);\n var flags = dv.getUint32(4, true);\n var data_offset = (v > 1 ? 12 : 8) + popcnt(flags & (v > 1 ? 3470 : 398)) * 4;\n var ridx = -1, sidx = -1, ieee = NaN, dt = new Date(2001, 0, 1);\n if (flags & 512) {\n ridx = dv.getUint32(data_offset, true);\n data_offset += 4;\n }\n data_offset += popcnt(flags & (v > 1 ? 12288 : 4096)) * 4;\n if (flags & 16) {\n sidx = dv.getUint32(data_offset, true);\n data_offset += 4;\n }\n if (flags & 32) {\n ieee = dv.getFloat64(data_offset, true);\n data_offset += 8;\n }\n if (flags & 64) {\n dt.setTime(dt.getTime() + dv.getFloat64(data_offset, true) * 1e3);\n data_offset += 8;\n }\n var ret;\n switch (buf[2]) {\n case 0:\n break;\n case 2:\n ret = { t: \"n\", v: ieee };\n break;\n case 3:\n ret = { t: \"s\", v: sst[sidx] };\n break;\n case 5:\n ret = { t: \"d\", v: dt };\n break;\n case 6:\n ret = { t: \"b\", v: ieee > 0 };\n break;\n case 7:\n ret = { t: \"n\", v: ieee / 86400 };\n break;\n case 8:\n ret = { t: \"e\", v: 0 };\n break;\n case 9:\n {\n if (ridx > -1)\n ret = { t: \"s\", v: rsst[ridx] };\n else if (sidx > -1)\n ret = { t: \"s\", v: sst[sidx] };\n else if (!isNaN(ieee))\n ret = { t: \"n\", v: ieee };\n else\n throw new Error(\"Unsupported cell type \".concat(buf.slice(0, 4)));\n }\n break;\n default:\n throw new Error(\"Unsupported cell type \".concat(buf.slice(0, 4)));\n }\n return ret;\n}\nfunction parse_new_storage(buf, sst, rsst) {\n var dv = u8_to_dataview(buf);\n var flags = dv.getUint32(8, true);\n var data_offset = 12;\n var ridx = -1, sidx = -1, d128 = NaN, ieee = NaN, dt = new Date(2001, 0, 1);\n if (flags & 1) {\n d128 = readDecimal128LE(buf, data_offset);\n data_offset += 16;\n }\n if (flags & 2) {\n ieee = dv.getFloat64(data_offset, true);\n data_offset += 8;\n }\n if (flags & 4) {\n dt.setTime(dt.getTime() + dv.getFloat64(data_offset, true) * 1e3);\n data_offset += 8;\n }\n if (flags & 8) {\n sidx = dv.getUint32(data_offset, true);\n data_offset += 4;\n }\n if (flags & 16) {\n ridx = dv.getUint32(data_offset, true);\n data_offset += 4;\n }\n var ret;\n switch (buf[1]) {\n case 0:\n break;\n case 2:\n ret = { t: \"n\", v: d128 };\n break;\n case 3:\n ret = { t: \"s\", v: sst[sidx] };\n break;\n case 5:\n ret = { t: \"d\", v: dt };\n break;\n case 6:\n ret = { t: \"b\", v: ieee > 0 };\n break;\n case 7:\n ret = { t: \"n\", v: ieee / 86400 };\n break;\n case 8:\n ret = { t: \"e\", v: 0 };\n break;\n case 9:\n {\n if (ridx > -1)\n ret = { t: \"s\", v: rsst[ridx] };\n else\n throw new Error(\"Unsupported cell type \".concat(buf[1], \" : \").concat(flags & 31, \" : \").concat(buf.slice(0, 4)));\n }\n break;\n case 10:\n ret = { t: \"n\", v: d128 };\n break;\n default:\n throw new Error(\"Unsupported cell type \".concat(buf[1], \" : \").concat(flags & 31, \" : \").concat(buf.slice(0, 4)));\n }\n return ret;\n}\nfunction write_new_storage(cell, sst) {\n var out = new Uint8Array(32), dv = u8_to_dataview(out), l = 12, flags = 0;\n out[0] = 5;\n switch (cell.t) {\n case \"n\":\n out[1] = 2;\n writeDecimal128LE(out, l, cell.v);\n flags |= 1;\n l += 16;\n break;\n case \"b\":\n out[1] = 6;\n dv.setFloat64(l, cell.v ? 1 : 0, true);\n flags |= 2;\n l += 8;\n break;\n case \"s\":\n if (sst.indexOf(cell.v) == -1)\n throw new Error(\"Value \".concat(cell.v, \" missing from SST!\"));\n out[1] = 3;\n dv.setUint32(l, sst.indexOf(cell.v), true);\n flags |= 8;\n l += 4;\n break;\n default:\n throw \"unsupported cell type \" + cell.t;\n }\n dv.setUint32(8, flags, true);\n return out.slice(0, l);\n}\nfunction write_old_storage(cell, sst) {\n var out = new Uint8Array(32), dv = u8_to_dataview(out), l = 12, flags = 0;\n out[0] = 3;\n switch (cell.t) {\n case \"n\":\n out[2] = 2;\n dv.setFloat64(l, cell.v, true);\n flags |= 32;\n l += 8;\n break;\n case \"b\":\n out[2] = 6;\n dv.setFloat64(l, cell.v ? 1 : 0, true);\n flags |= 32;\n l += 8;\n break;\n case \"s\":\n if (sst.indexOf(cell.v) == -1)\n throw new Error(\"Value \".concat(cell.v, \" missing from SST!\"));\n out[2] = 3;\n dv.setUint32(l, sst.indexOf(cell.v), true);\n flags |= 16;\n l += 4;\n break;\n default:\n throw \"unsupported cell type \" + cell.t;\n }\n dv.setUint32(4, flags, true);\n return out.slice(0, l);\n}\nfunction parse_cell_storage(buf, sst, rsst) {\n switch (buf[0]) {\n case 0:\n case 1:\n case 2:\n case 3:\n return parse_old_storage(buf, sst, rsst, buf[0]);\n case 5:\n return parse_new_storage(buf, sst, rsst);\n default:\n throw new Error(\"Unsupported payload version \".concat(buf[0]));\n }\n}\nfunction parse_TSP_Reference(buf) {\n var pb = parse_shallow(buf);\n return parse_varint49(pb[1][0].data);\n}\nfunction write_TSP_Reference(idx) {\n var out = [];\n out[1] = [{ type: 0, data: write_varint49(idx) }];\n return write_shallow(out);\n}\nfunction parse_TST_TableDataList(M, root) {\n var pb = parse_shallow(root.data);\n var type = varint_to_i32(pb[1][0].data);\n var entries = pb[3];\n var data = [];\n (entries || []).forEach(function(entry) {\n var le = parse_shallow(entry.data);\n var key = varint_to_i32(le[1][0].data) >>> 0;\n switch (type) {\n case 1:\n data[key] = u8str(le[3][0].data);\n break;\n case 8:\n {\n var rt = M[parse_TSP_Reference(le[9][0].data)][0];\n var rtp = parse_shallow(rt.data);\n var rtpref = M[parse_TSP_Reference(rtp[1][0].data)][0];\n var mtype = varint_to_i32(rtpref.meta[1][0].data);\n if (mtype != 2001)\n throw new Error(\"2000 unexpected reference to \".concat(mtype));\n var tswpsa = parse_shallow(rtpref.data);\n data[key] = tswpsa[3].map(function(x) {\n return u8str(x.data);\n }).join(\"\");\n }\n break;\n }\n });\n return data;\n}\nfunction parse_TST_TileRowInfo(u8, type) {\n var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;\n var pb = parse_shallow(u8);\n var R = varint_to_i32(pb[1][0].data) >>> 0;\n var cnt = varint_to_i32(pb[2][0].data) >>> 0;\n var wide_offsets = ((_b = (_a = pb[8]) == null ? void 0 : _a[0]) == null ? void 0 : _b.data) && varint_to_i32(pb[8][0].data) > 0 || false;\n var used_storage_u8, used_storage;\n if (((_d = (_c = pb[7]) == null ? void 0 : _c[0]) == null ? void 0 : _d.data) && type != 0) {\n used_storage_u8 = (_f = (_e = pb[7]) == null ? void 0 : _e[0]) == null ? void 0 : _f.data;\n used_storage = (_h = (_g = pb[6]) == null ? void 0 : _g[0]) == null ? void 0 : _h.data;\n } else if (((_j = (_i = pb[4]) == null ? void 0 : _i[0]) == null ? void 0 : _j.data) && type != 1) {\n used_storage_u8 = (_l = (_k = pb[4]) == null ? void 0 : _k[0]) == null ? void 0 : _l.data;\n used_storage = (_n = (_m = pb[3]) == null ? void 0 : _m[0]) == null ? void 0 : _n.data;\n } else\n throw \"NUMBERS Tile missing \".concat(type, \" cell storage\");\n var width = wide_offsets ? 4 : 1;\n var used_storage_offsets = u8_to_dataview(used_storage_u8);\n var offsets = [];\n for (var C = 0; C < used_storage_u8.length / 2; ++C) {\n var off = used_storage_offsets.getUint16(C * 2, true);\n if (off < 65535)\n offsets.push([C, off]);\n }\n if (offsets.length != cnt)\n throw \"Expected \".concat(cnt, \" cells, found \").concat(offsets.length);\n var cells = [];\n for (C = 0; C < offsets.length - 1; ++C)\n cells[offsets[C][0]] = used_storage.subarray(offsets[C][1] * width, offsets[C + 1][1] * width);\n if (offsets.length >= 1)\n cells[offsets[offsets.length - 1][0]] = used_storage.subarray(offsets[offsets.length - 1][1] * width);\n return { R: R, cells: cells };\n}\nfunction parse_TST_Tile(M, root) {\n var _a;\n var pb = parse_shallow(root.data);\n var storage = ((_a = pb == null ? void 0 : pb[7]) == null ? void 0 : _a[0]) ? varint_to_i32(pb[7][0].data) >>> 0 > 0 ? 1 : 0 : -1;\n var ri = mappa(pb[5], function(u8) {\n return parse_TST_TileRowInfo(u8, storage);\n });\n return {\n nrows: varint_to_i32(pb[4][0].data) >>> 0,\n data: ri.reduce(function(acc, x) {\n if (!acc[x.R])\n acc[x.R] = [];\n x.cells.forEach(function(cell, C) {\n if (acc[x.R][C])\n throw new Error(\"Duplicate cell r=\".concat(x.R, \" c=\").concat(C));\n acc[x.R][C] = cell;\n });\n return acc;\n }, [])\n };\n}\nfunction parse_TST_TableModelArchive(M, root, ws) {\n var _a;\n var pb = parse_shallow(root.data);\n var range = { s: { r: 0, c: 0 }, e: { r: 0, c: 0 } };\n range.e.r = (varint_to_i32(pb[6][0].data) >>> 0) - 1;\n if (range.e.r < 0)\n throw new Error(\"Invalid row varint \".concat(pb[6][0].data));\n range.e.c = (varint_to_i32(pb[7][0].data) >>> 0) - 1;\n if (range.e.c < 0)\n throw new Error(\"Invalid col varint \".concat(pb[7][0].data));\n ws[\"!ref\"] = encode_range(range);\n var store = parse_shallow(pb[4][0].data);\n var sst = parse_TST_TableDataList(M, M[parse_TSP_Reference(store[4][0].data)][0]);\n var rsst = ((_a = store[17]) == null ? void 0 : _a[0]) ? parse_TST_TableDataList(M, M[parse_TSP_Reference(store[17][0].data)][0]) : [];\n var tile = parse_shallow(store[3][0].data);\n var _R = 0;\n tile[1].forEach(function(t) {\n var tl = parse_shallow(t.data);\n var ref = M[parse_TSP_Reference(tl[2][0].data)][0];\n var mtype = varint_to_i32(ref.meta[1][0].data);\n if (mtype != 6002)\n throw new Error(\"6001 unexpected reference to \".concat(mtype));\n var _tile = parse_TST_Tile(M, ref);\n _tile.data.forEach(function(row, R) {\n row.forEach(function(buf, C) {\n var addr = encode_cell({ r: _R + R, c: C });\n var res = parse_cell_storage(buf, sst, rsst);\n if (res)\n ws[addr] = res;\n });\n });\n _R += _tile.nrows;\n });\n}\nfunction parse_TST_TableInfoArchive(M, root) {\n var pb = parse_shallow(root.data);\n var out = { \"!ref\": \"A1\" };\n var tableref = M[parse_TSP_Reference(pb[2][0].data)];\n var mtype = varint_to_i32(tableref[0].meta[1][0].data);\n if (mtype != 6001)\n throw new Error(\"6000 unexpected reference to \".concat(mtype));\n parse_TST_TableModelArchive(M, tableref[0], out);\n return out;\n}\nfunction parse_TN_SheetArchive(M, root) {\n var _a;\n var pb = parse_shallow(root.data);\n var out = {\n name: ((_a = pb[1]) == null ? void 0 : _a[0]) ? u8str(pb[1][0].data) : \"\",\n sheets: []\n };\n var shapeoffs = mappa(pb[2], parse_TSP_Reference);\n shapeoffs.forEach(function(off) {\n M[off].forEach(function(m) {\n var mtype = varint_to_i32(m.meta[1][0].data);\n if (mtype == 6e3)\n out.sheets.push(parse_TST_TableInfoArchive(M, m));\n });\n });\n return out;\n}\nfunction parse_TN_DocumentArchive(M, root) {\n var out = book_new();\n var pb = parse_shallow(root.data);\n var sheetoffs = mappa(pb[1], parse_TSP_Reference);\n sheetoffs.forEach(function(off) {\n M[off].forEach(function(m) {\n var mtype = varint_to_i32(m.meta[1][0].data);\n if (mtype == 2) {\n var root2 = parse_TN_SheetArchive(M, m);\n root2.sheets.forEach(function(sheet, idx) {\n book_append_sheet(out, sheet, idx == 0 ? root2.name : root2.name + \"_\" + idx, true);\n });\n }\n });\n });\n if (out.SheetNames.length == 0)\n throw new Error(\"Empty NUMBERS file\");\n return out;\n}\nfunction parse_numbers_iwa(cfb) {\n var _a, _b, _c, _d;\n var M = {}, indices = [];\n cfb.FullPaths.forEach(function(p) {\n if (p.match(/\\.iwpv2/))\n throw new Error(\"Unsupported password protection\");\n });\n cfb.FileIndex.forEach(function(s) {\n if (!s.name.match(/\\.iwa$/))\n return;\n var o;\n try {\n o = decompress_iwa_file(s.content);\n } catch (e) {\n return console.log(\"?? \" + s.content.length + \" \" + (e.message || e));\n }\n var packets;\n try {\n packets = parse_iwa_file(o);\n } catch (e) {\n return console.log(\"## \" + (e.message || e));\n }\n packets.forEach(function(packet) {\n M[packet.id] = packet.messages;\n indices.push(packet.id);\n });\n });\n if (!indices.length)\n throw new Error(\"File has no messages\");\n var docroot = ((_d = (_c = (_b = (_a = M == null ? void 0 : M[1]) == null ? void 0 : _a[0]) == null ? void 0 : _b.meta) == null ? void 0 : _c[1]) == null ? void 0 : _d[0].data) && varint_to_i32(M[1][0].meta[1][0].data) == 1 && M[1][0];\n if (!docroot)\n indices.forEach(function(idx) {\n M[idx].forEach(function(iwam) {\n var mtype = varint_to_i32(iwam.meta[1][0].data) >>> 0;\n if (mtype == 1) {\n if (!docroot)\n docroot = iwam;\n else\n throw new Error(\"Document has multiple roots\");\n }\n });\n });\n if (!docroot)\n throw new Error(\"Cannot find Document root\");\n return parse_TN_DocumentArchive(M, docroot);\n}\nfunction write_tile_row(tri, data, SST) {\n var _a, _b, _c, _d;\n if (!((_a = tri[6]) == null ? void 0 : _a[0]) || !((_b = tri[7]) == null ? void 0 : _b[0]))\n throw \"Mutation only works on post-BNC storages!\";\n var wide_offsets = ((_d = (_c = tri[8]) == null ? void 0 : _c[0]) == null ? void 0 : _d.data) && varint_to_i32(tri[8][0].data) > 0 || false;\n if (wide_offsets)\n throw \"Math only works with normal offsets\";\n var cnt = 0;\n var dv = u8_to_dataview(tri[7][0].data), last_offset = 0, cell_storage = [];\n var _dv = u8_to_dataview(tri[4][0].data), _last_offset = 0, _cell_storage = [];\n for (var C = 0; C < data.length; ++C) {\n if (data[C] == null) {\n dv.setUint16(C * 2, 65535, true);\n _dv.setUint16(C * 2, 65535);\n continue;\n }\n dv.setUint16(C * 2, last_offset, true);\n _dv.setUint16(C * 2, _last_offset, true);\n var celload, _celload;\n switch (typeof data[C]) {\n case \"string\":\n celload = write_new_storage({ t: \"s\", v: data[C] }, SST);\n _celload = write_old_storage({ t: \"s\", v: data[C] }, SST);\n break;\n case \"number\":\n celload = write_new_storage({ t: \"n\", v: data[C] }, SST);\n _celload = write_old_storage({ t: \"n\", v: data[C] }, SST);\n break;\n case \"boolean\":\n celload = write_new_storage({ t: \"b\", v: data[C] }, SST);\n _celload = write_old_storage({ t: \"b\", v: data[C] }, SST);\n break;\n default:\n throw new Error(\"Unsupported value \" + data[C]);\n }\n cell_storage.push(celload);\n last_offset += celload.length;\n _cell_storage.push(_celload);\n _last_offset += _celload.length;\n ++cnt;\n }\n tri[2][0].data = write_varint49(cnt);\n for (; C < tri[7][0].data.length / 2; ++C) {\n dv.setUint16(C * 2, 65535, true);\n _dv.setUint16(C * 2, 65535, true);\n }\n tri[6][0].data = u8concat(cell_storage);\n tri[3][0].data = u8concat(_cell_storage);\n return cnt;\n}\nfunction write_numbers_iwa(wb, opts) {\n if (!opts || !opts.numbers)\n throw new Error(\"Must pass a `numbers` option -- check the README\");\n var ws = wb.Sheets[wb.SheetNames[0]];\n if (wb.SheetNames.length > 1)\n console.error(\"The Numbers writer currently writes only the first table\");\n var range = decode_range(ws[\"!ref\"]);\n range.s.r = range.s.c = 0;\n var trunc = false;\n if (range.e.c > 9) {\n trunc = true;\n range.e.c = 9;\n }\n if (range.e.r > 49) {\n trunc = true;\n range.e.r = 49;\n }\n if (trunc)\n console.error(\"The Numbers writer is currently limited to \".concat(encode_range(range)));\n var data = sheet_to_json(ws, { range: range, header: 1 });\n var SST = [\"~Sh33tJ5~\"];\n data.forEach(function(row) {\n return row.forEach(function(cell) {\n if (typeof cell == \"string\")\n SST.push(cell);\n });\n });\n var dependents = {};\n var indices = [];\n var cfb = CFB.read(opts.numbers, { type: \"base64\" });\n cfb.FileIndex.map(function(fi, idx) {\n return [fi, cfb.FullPaths[idx]];\n }).forEach(function(row) {\n var fi = row[0], fp = row[1];\n if (fi.type != 2)\n return;\n if (!fi.name.match(/\\.iwa/))\n return;\n var old_content = fi.content;\n var raw1 = decompress_iwa_file(old_content);\n var x2 = parse_iwa_file(raw1);\n x2.forEach(function(packet2) {\n indices.push(packet2.id);\n dependents[packet2.id] = { deps: [], location: fp, type: varint_to_i32(packet2.messages[0].meta[1][0].data) };\n });\n });\n indices.sort(function(x2, y2) {\n return x2 - y2;\n });\n var indices_varint = indices.filter(function(x2) {\n return x2 > 1;\n }).map(function(x2) {\n return [x2, write_varint49(x2)];\n });\n cfb.FileIndex.map(function(fi, idx) {\n return [fi, cfb.FullPaths[idx]];\n }).forEach(function(row) {\n var fi = row[0], fp = row[1];\n if (!fi.name.match(/\\.iwa/))\n return;\n var x2 = parse_iwa_file(decompress_iwa_file(fi.content));\n x2.forEach(function(ia) {\n ia.messages.forEach(function(m) {\n indices_varint.forEach(function(ivi) {\n if (ia.messages.some(function(mess) {\n return varint_to_i32(mess.meta[1][0].data) != 11006 && u8contains(mess.data, ivi[1]);\n })) {\n dependents[ivi[0]].deps.push(ia.id);\n }\n });\n });\n });\n });\n function get_unique_msgid() {\n for (var i = 927262; i < 2e6; ++i)\n if (!dependents[i])\n return i;\n throw new Error(\"Too many messages\");\n }\n var entry = CFB.find(cfb, dependents[1].location);\n var x = parse_iwa_file(decompress_iwa_file(entry.content));\n var docroot;\n for (var xi = 0; xi < x.length; ++xi) {\n var packet = x[xi];\n if (packet.id == 1)\n docroot = packet;\n }\n var sheetrootref = parse_TSP_Reference(parse_shallow(docroot.messages[0].data)[1][0].data);\n entry = CFB.find(cfb, dependents[sheetrootref].location);\n x = parse_iwa_file(decompress_iwa_file(entry.content));\n for (xi = 0; xi < x.length; ++xi) {\n packet = x[xi];\n if (packet.id == sheetrootref)\n docroot = packet;\n }\n sheetrootref = parse_TSP_Reference(parse_shallow(docroot.messages[0].data)[2][0].data);\n entry = CFB.find(cfb, dependents[sheetrootref].location);\n x = parse_iwa_file(decompress_iwa_file(entry.content));\n for (xi = 0; xi < x.length; ++xi) {\n packet = x[xi];\n if (packet.id == sheetrootref)\n docroot = packet;\n }\n sheetrootref = parse_TSP_Reference(parse_shallow(docroot.messages[0].data)[2][0].data);\n entry = CFB.find(cfb, dependents[sheetrootref].location);\n x = parse_iwa_file(decompress_iwa_file(entry.content));\n for (xi = 0; xi < x.length; ++xi) {\n packet = x[xi];\n if (packet.id == sheetrootref)\n docroot = packet;\n }\n var pb = parse_shallow(docroot.messages[0].data);\n {\n pb[6][0].data = write_varint49(range.e.r + 1);\n pb[7][0].data = write_varint49(range.e.c + 1);\n var cruidsref = parse_TSP_Reference(pb[46][0].data);\n var oldbucket = CFB.find(cfb, dependents[cruidsref].location);\n var _x = parse_iwa_file(decompress_iwa_file(oldbucket.content));\n {\n for (var j = 0; j < _x.length; ++j) {\n if (_x[j].id == cruidsref)\n break;\n }\n if (_x[j].id != cruidsref)\n throw \"Bad ColumnRowUIDMapArchive\";\n var cruids = parse_shallow(_x[j].messages[0].data);\n cruids[1] = [];\n cruids[2] = [], cruids[3] = [];\n for (var C = 0; C <= range.e.c; ++C) {\n var uuid = [];\n uuid[1] = uuid[2] = [{ type: 0, data: write_varint49(C + 420690) }];\n cruids[1].push({ type: 2, data: write_shallow(uuid) });\n cruids[2].push({ type: 0, data: write_varint49(C) });\n cruids[3].push({ type: 0, data: write_varint49(C) });\n }\n cruids[4] = [];\n cruids[5] = [], cruids[6] = [];\n for (var R = 0; R <= range.e.r; ++R) {\n uuid = [];\n uuid[1] = uuid[2] = [{ type: 0, data: write_varint49(R + 726270) }];\n cruids[4].push({ type: 2, data: write_shallow(uuid) });\n cruids[5].push({ type: 0, data: write_varint49(R) });\n cruids[6].push({ type: 0, data: write_varint49(R) });\n }\n _x[j].messages[0].data = write_shallow(cruids);\n }\n oldbucket.content = compress_iwa_file(write_iwa_file(_x));\n oldbucket.size = oldbucket.content.length;\n delete pb[46];\n var store = parse_shallow(pb[4][0].data);\n {\n store[7][0].data = write_varint49(range.e.r + 1);\n var row_headers = parse_shallow(store[1][0].data);\n var row_header_ref = parse_TSP_Reference(row_headers[2][0].data);\n oldbucket = CFB.find(cfb, dependents[row_header_ref].location);\n _x = parse_iwa_file(decompress_iwa_file(oldbucket.content));\n {\n if (_x[0].id != row_header_ref)\n throw \"Bad HeaderStorageBucket\";\n var base_bucket = parse_shallow(_x[0].messages[0].data);\n for (R = 0; R < data.length; ++R) {\n var _bucket = parse_shallow(base_bucket[2][0].data);\n _bucket[1][0].data = write_varint49(R);\n _bucket[4][0].data = write_varint49(data[R].length);\n base_bucket[2][R] = { type: base_bucket[2][0].type, data: write_shallow(_bucket) };\n }\n _x[0].messages[0].data = write_shallow(base_bucket);\n }\n oldbucket.content = compress_iwa_file(write_iwa_file(_x));\n oldbucket.size = oldbucket.content.length;\n var col_header_ref = parse_TSP_Reference(store[2][0].data);\n oldbucket = CFB.find(cfb, dependents[col_header_ref].location);\n _x = parse_iwa_file(decompress_iwa_file(oldbucket.content));\n {\n if (_x[0].id != col_header_ref)\n throw \"Bad HeaderStorageBucket\";\n base_bucket = parse_shallow(_x[0].messages[0].data);\n for (C = 0; C <= range.e.c; ++C) {\n _bucket = parse_shallow(base_bucket[2][0].data);\n _bucket[1][0].data = write_varint49(C);\n _bucket[4][0].data = write_varint49(range.e.r + 1);\n base_bucket[2][C] = { type: base_bucket[2][0].type, data: write_shallow(_bucket) };\n }\n _x[0].messages[0].data = write_shallow(base_bucket);\n }\n oldbucket.content = compress_iwa_file(write_iwa_file(_x));\n oldbucket.size = oldbucket.content.length;\n var sstref = parse_TSP_Reference(store[4][0].data);\n (function() {\n var sentry = CFB.find(cfb, dependents[sstref].location);\n var sx = parse_iwa_file(decompress_iwa_file(sentry.content));\n var sstroot;\n for (var sxi = 0; sxi < sx.length; ++sxi) {\n var packet2 = sx[sxi];\n if (packet2.id == sstref)\n sstroot = packet2;\n }\n var sstdata = parse_shallow(sstroot.messages[0].data);\n {\n sstdata[3] = [];\n var newsst = [];\n SST.forEach(function(str, i) {\n newsst[1] = [{ type: 0, data: write_varint49(i) }];\n newsst[2] = [{ type: 0, data: write_varint49(1) }];\n newsst[3] = [{ type: 2, data: stru8(str) }];\n sstdata[3].push({ type: 2, data: write_shallow(newsst) });\n });\n }\n sstroot.messages[0].data = write_shallow(sstdata);\n var sy = write_iwa_file(sx);\n var raw32 = compress_iwa_file(sy);\n sentry.content = raw32;\n sentry.size = sentry.content.length;\n })();\n var tile = parse_shallow(store[3][0].data);\n {\n var t = tile[1][0];\n delete tile[2];\n var tl = parse_shallow(t.data);\n {\n var tileref = parse_TSP_Reference(tl[2][0].data);\n (function() {\n var tentry = CFB.find(cfb, dependents[tileref].location);\n var tx = parse_iwa_file(decompress_iwa_file(tentry.content));\n var tileroot;\n for (var sxi = 0; sxi < tx.length; ++sxi) {\n var packet2 = tx[sxi];\n if (packet2.id == tileref)\n tileroot = packet2;\n }\n var tiledata = parse_shallow(tileroot.messages[0].data);\n {\n delete tiledata[6];\n delete tile[7];\n var rowload = new Uint8Array(tiledata[5][0].data);\n tiledata[5] = [];\n var cnt = 0;\n for (var R2 = 0; R2 <= range.e.r; ++R2) {\n var tilerow = parse_shallow(rowload);\n cnt += write_tile_row(tilerow, data[R2], SST);\n tilerow[1][0].data = write_varint49(R2);\n tiledata[5].push({ data: write_shallow(tilerow), type: 2 });\n }\n tiledata[1] = [{ type: 0, data: write_varint49(range.e.c + 1) }];\n tiledata[2] = [{ type: 0, data: write_varint49(range.e.r + 1) }];\n tiledata[3] = [{ type: 0, data: write_varint49(cnt) }];\n tiledata[4] = [{ type: 0, data: write_varint49(range.e.r + 1) }];\n }\n tileroot.messages[0].data = write_shallow(tiledata);\n var ty = write_iwa_file(tx);\n var raw32 = compress_iwa_file(ty);\n tentry.content = raw32;\n tentry.size = tentry.content.length;\n })();\n }\n t.data = write_shallow(tl);\n }\n store[3][0].data = write_shallow(tile);\n }\n pb[4][0].data = write_shallow(store);\n }\n docroot.messages[0].data = write_shallow(pb);\n var y = write_iwa_file(x);\n var raw3 = compress_iwa_file(y);\n entry.content = raw3;\n entry.size = entry.content.length;\n return cfb;\n}\nfunction fix_opts_func(defaults/*:Array >*/)/*:{(o:any):void}*/ {\n\treturn function fix_opts(opts) {\n\t\tfor(var i = 0; i != defaults.length; ++i) {\n\t\t\tvar d = defaults[i];\n\t\t\tif(opts[d[0]] === undefined) opts[d[0]] = d[1];\n\t\t\tif(d[2] === 'n') opts[d[0]] = Number(opts[d[0]]);\n\t\t}\n\t};\n}\n\nfunction fix_read_opts(opts) {\nfix_opts_func([\n\t['cellNF', false], /* emit cell number format string as .z */\n\t['cellHTML', true], /* emit html string as .h */\n\t['cellFormula', true], /* emit formulae as .f */\n\t['cellStyles', false], /* emits style/theme as .s */\n\t['cellText', true], /* emit formatted text as .w */\n\t['cellDates', false], /* emit date cells with type `d` */\n\n\t['sheetStubs', false], /* emit empty cells */\n\t['sheetRows', 0, 'n'], /* read n rows (0 = read all rows) */\n\n\t['bookDeps', false], /* parse calculation chains */\n\t['bookSheets', false], /* only try to get sheet names (no Sheets) */\n\t['bookProps', false], /* only try to get properties (no Sheets) */\n\t['bookFiles', false], /* include raw file structure (keys, files, cfb) */\n\t['bookVBA', false], /* include vba raw data (vbaraw) */\n\n\t['password',''], /* password */\n\t['WTF', false] /* WTF mode (throws errors) */\n])(opts);\n}\n\nfunction fix_write_opts(opts) {\nfix_opts_func([\n\t['cellDates', false], /* write date cells with type `d` */\n\n\t['bookSST', false], /* Generate Shared String Table */\n\n\t['bookType', 'xlsx'], /* Type of workbook (xlsx/m/b) */\n\n\t['compression', false], /* Use file compression */\n\n\t['WTF', false] /* WTF mode (throws errors) */\n])(opts);\n}\nfunction get_sheet_type(n/*:string*/)/*:string*/ {\n\tif(RELS.WS.indexOf(n) > -1) return \"sheet\";\n\tif(RELS.CS && n == RELS.CS) return \"chart\";\n\tif(RELS.DS && n == RELS.DS) return \"dialog\";\n\tif(RELS.MS && n == RELS.MS) return \"macro\";\n\treturn (n && n.length) ? n : \"sheet\";\n}\nfunction safe_parse_wbrels(wbrels, sheets) {\n\tif(!wbrels) return 0;\n\ttry {\n\t\twbrels = sheets.map(function pwbr(w) { if(!w.id) w.id = w.strRelID; return [w.name, wbrels['!id'][w.id].Target, get_sheet_type(wbrels['!id'][w.id].Type)]; });\n\t} catch(e) { return null; }\n\treturn !wbrels || wbrels.length === 0 ? null : wbrels;\n}\n\nfunction safe_parse_sheet(zip, path/*:string*/, relsPath/*:string*/, sheet, idx/*:number*/, sheetRels, sheets, stype/*:string*/, opts, wb, themes, styles) {\n\ttry {\n\t\tsheetRels[sheet]=parse_rels(getzipstr(zip, relsPath, true), path);\n\t\tvar data = getzipdata(zip, path);\n\t\tvar _ws;\n\t\tswitch(stype) {\n\t\t\tcase 'sheet': _ws = parse_ws(data, path, idx, opts, sheetRels[sheet], wb, themes, styles); break;\n\t\t\tcase 'chart': _ws = parse_cs(data, path, idx, opts, sheetRels[sheet], wb, themes, styles);\n\t\t\t\tif(!_ws || !_ws['!drawel']) break;\n\t\t\t\tvar dfile = resolve_path(_ws['!drawel'].Target, path);\n\t\t\t\tvar drelsp = get_rels_path(dfile);\n\t\t\t\tvar draw = parse_drawing(getzipstr(zip, dfile, true), parse_rels(getzipstr(zip, drelsp, true), dfile));\n\t\t\t\tvar chartp = resolve_path(draw, dfile);\n\t\t\t\tvar crelsp = get_rels_path(chartp);\n\t\t\t\t_ws = parse_chart(getzipstr(zip, chartp, true), chartp, opts, parse_rels(getzipstr(zip, crelsp, true), chartp), wb, _ws);\n\t\t\t\tbreak;\n\t\t\tcase 'macro': _ws = parse_ms(data, path, idx, opts, sheetRels[sheet], wb, themes, styles); break;\n\t\t\tcase 'dialog': _ws = parse_ds(data, path, idx, opts, sheetRels[sheet], wb, themes, styles); break;\n\t\t\tdefault: throw new Error(\"Unrecognized sheet type \" + stype);\n\t\t}\n\t\tsheets[sheet] = _ws;\n\n\t\t/* scan rels for comments and threaded comments */\n\t\tvar tcomments = [];\n\t\tif(sheetRels && sheetRels[sheet]) keys(sheetRels[sheet]).forEach(function(n) {\n\t\t\tvar dfile = \"\";\n\t\t\tif(sheetRels[sheet][n].Type == RELS.CMNT) {\n\t\t\t\tdfile = resolve_path(sheetRels[sheet][n].Target, path);\n\t\t\t\tvar comments = parse_cmnt(getzipdata(zip, dfile, true), dfile, opts);\n\t\t\t\tif(!comments || !comments.length) return;\n\t\t\t\tsheet_insert_comments(_ws, comments, false);\n\t\t\t}\n\t\t\tif(sheetRels[sheet][n].Type == RELS.TCMNT) {\n\t\t\t\tdfile = resolve_path(sheetRels[sheet][n].Target, path);\n\t\t\t\ttcomments = tcomments.concat(parse_tcmnt_xml(getzipdata(zip, dfile, true), opts));\n\t\t\t}\n\t\t});\n\t\tif(tcomments && tcomments.length) sheet_insert_comments(_ws, tcomments, true, opts.people || []);\n\t} catch(e) { if(opts.WTF) throw e; }\n}\n\nfunction strip_front_slash(x/*:string*/)/*:string*/ { return x.charAt(0) == '/' ? x.slice(1) : x; }\n\nfunction parse_zip(zip/*:ZIP*/, opts/*:?ParseOpts*/)/*:Workbook*/ {\n\tmake_ssf();\n\topts = opts || {};\n\tfix_read_opts(opts);\n\n\t/* OpenDocument Part 3 Section 2.2.1 OpenDocument Package */\n\tif(safegetzipfile(zip, 'META-INF/manifest.xml')) return parse_ods(zip, opts);\n\t/* UOC */\n\tif(safegetzipfile(zip, 'objectdata.xml')) return parse_ods(zip, opts);\n\t/* Numbers */\n\tif(safegetzipfile(zip, 'Index/Document.iwa')) {\n\t\tif(typeof Uint8Array == \"undefined\") throw new Error('NUMBERS file parsing requires Uint8Array support');\n\t\tif(typeof parse_numbers_iwa != \"undefined\") {\n\t\t\tif(zip.FileIndex) return parse_numbers_iwa(zip);\n\t\t\tvar _zip = CFB.utils.cfb_new();\n\t\t\tzipentries(zip).forEach(function(e) { zip_add_file(_zip, e, getzipbin(zip, e)); });\n\t\t\treturn parse_numbers_iwa(_zip);\n\t\t}\n\t\tthrow new Error('Unsupported NUMBERS file');\n\t}\n\tif(!safegetzipfile(zip, '[Content_Types].xml')) {\n\t\tif(safegetzipfile(zip, 'index.xml.gz')) throw new Error('Unsupported NUMBERS 08 file');\n\t\tif(safegetzipfile(zip, 'index.xml')) throw new Error('Unsupported NUMBERS 09 file');\n\t\tthrow new Error('Unsupported ZIP file');\n\t}\n\n\tvar entries = zipentries(zip);\n\tvar dir = parse_ct((getzipstr(zip, '[Content_Types].xml')/*:?any*/));\n\tvar xlsb = false;\n\tvar sheets, binname;\n\tif(dir.workbooks.length === 0) {\n\t\tbinname = \"xl/workbook.xml\";\n\t\tif(getzipdata(zip,binname, true)) dir.workbooks.push(binname);\n\t}\n\tif(dir.workbooks.length === 0) {\n\t\tbinname = \"xl/workbook.bin\";\n\t\tif(!getzipdata(zip,binname,true)) throw new Error(\"Could not find workbook\");\n\t\tdir.workbooks.push(binname);\n\t\txlsb = true;\n\t}\n\tif(dir.workbooks[0].slice(-3) == \"bin\") xlsb = true;\n\n\tvar themes = ({}/*:any*/);\n\tvar styles = ({}/*:any*/);\n\tif(!opts.bookSheets && !opts.bookProps) {\n\t\tstrs = [];\n\t\tif(dir.sst) try { strs=parse_sst(getzipdata(zip, strip_front_slash(dir.sst)), dir.sst, opts); } catch(e) { if(opts.WTF) throw e; }\n\n\t\tif(opts.cellStyles && dir.themes.length) themes = parse_theme(getzipstr(zip, dir.themes[0].replace(/^\\//,''), true)||\"\",dir.themes[0], opts);\n\n\t\tif(dir.style) styles = parse_sty(getzipdata(zip, strip_front_slash(dir.style)), dir.style, themes, opts);\n\t}\n\n\t/*var externbooks = */dir.links.map(function(link) {\n\t\ttry {\n\t\t\tvar rels = parse_rels(getzipstr(zip, get_rels_path(strip_front_slash(link))), link);\n\t\t\treturn parse_xlink(getzipdata(zip, strip_front_slash(link)), rels, link, opts);\n\t\t} catch(e) {}\n\t});\n\n\tvar wb = parse_wb(getzipdata(zip, strip_front_slash(dir.workbooks[0])), dir.workbooks[0], opts);\n\n\tvar props = {}, propdata = \"\";\n\n\tif(dir.coreprops.length) {\n\t\tpropdata = getzipdata(zip, strip_front_slash(dir.coreprops[0]), true);\n\t\tif(propdata) props = parse_core_props(propdata);\n\t\tif(dir.extprops.length !== 0) {\n\t\t\tpropdata = getzipdata(zip, strip_front_slash(dir.extprops[0]), true);\n\t\t\tif(propdata) parse_ext_props(propdata, props, opts);\n\t\t}\n\t}\n\n\tvar custprops = {};\n\tif(!opts.bookSheets || opts.bookProps) {\n\t\tif (dir.custprops.length !== 0) {\n\t\t\tpropdata = getzipstr(zip, strip_front_slash(dir.custprops[0]), true);\n\t\t\tif(propdata) custprops = parse_cust_props(propdata, opts);\n\t\t}\n\t}\n\n\tvar out = ({}/*:any*/);\n\tif(opts.bookSheets || opts.bookProps) {\n\t\tif(wb.Sheets) sheets = wb.Sheets.map(function pluck(x){ return x.name; });\n\t\telse if(props.Worksheets && props.SheetNames.length > 0) sheets=props.SheetNames;\n\t\tif(opts.bookProps) { out.Props = props; out.Custprops = custprops; }\n\t\tif(opts.bookSheets && typeof sheets !== 'undefined') out.SheetNames = sheets;\n\t\tif(opts.bookSheets ? out.SheetNames : opts.bookProps) return out;\n\t}\n\tsheets = {};\n\n\tvar deps = {};\n\tif(opts.bookDeps && dir.calcchain) deps=parse_cc(getzipdata(zip, strip_front_slash(dir.calcchain)),dir.calcchain,opts);\n\n\tvar i=0;\n\tvar sheetRels = ({}/*:any*/);\n\tvar path, relsPath;\n\n\t{\n\t\tvar wbsheets = wb.Sheets;\n\t\tprops.Worksheets = wbsheets.length;\n\t\tprops.SheetNames = [];\n\t\tfor(var j = 0; j != wbsheets.length; ++j) {\n\t\t\tprops.SheetNames[j] = wbsheets[j].name;\n\t\t}\n\t}\n\n\tvar wbext = xlsb ? \"bin\" : \"xml\";\n\tvar wbrelsi = dir.workbooks[0].lastIndexOf(\"/\");\n\tvar wbrelsfile = (dir.workbooks[0].slice(0, wbrelsi+1) + \"_rels/\" + dir.workbooks[0].slice(wbrelsi+1) + \".rels\").replace(/^\\//,\"\");\n\tif(!safegetzipfile(zip, wbrelsfile)) wbrelsfile = 'xl/_rels/workbook.' + wbext + '.rels';\n\tvar wbrels = parse_rels(getzipstr(zip, wbrelsfile, true), wbrelsfile.replace(/_rels.*/, \"s5s\"));\n\n\tif((dir.metadata || []).length >= 1) {\n\t\t/* TODO: MDX and other types of metadata */\n\t\topts.xlmeta = parse_xlmeta(getzipdata(zip, strip_front_slash(dir.metadata[0])),dir.metadata[0],opts);\n\t}\n\n\tif((dir.people || []).length >= 1) {\n\t\topts.people = parse_people_xml(getzipdata(zip, strip_front_slash(dir.people[0])),opts);\n\t}\n\n\tif(wbrels) wbrels = safe_parse_wbrels(wbrels, wb.Sheets);\n\n\t/* Numbers iOS hack */\n\tvar nmode = (getzipdata(zip,\"xl/worksheets/sheet.xml\",true))?1:0;\n\twsloop: for(i = 0; i != props.Worksheets; ++i) {\n\t\tvar stype = \"sheet\";\n\t\tif(wbrels && wbrels[i]) {\n\t\t\tpath = 'xl/' + (wbrels[i][1]).replace(/[\\/]?xl\\//, \"\");\n\t\t\tif(!safegetzipfile(zip, path)) path = wbrels[i][1];\n\t\t\tif(!safegetzipfile(zip, path)) path = wbrelsfile.replace(/_rels\\/.*$/,\"\") + wbrels[i][1];\n\t\t\tstype = wbrels[i][2];\n\t\t} else {\n\t\t\tpath = 'xl/worksheets/sheet'+(i+1-nmode)+\".\" + wbext;\n\t\t\tpath = path.replace(/sheet0\\./,\"sheet.\");\n\t\t}\n\t\trelsPath = path.replace(/^(.*)(\\/)([^\\/]*)$/, \"$1/_rels/$3.rels\");\n\t\tif(opts && opts.sheets != null) switch(typeof opts.sheets) {\n\t\t\tcase \"number\": if(i != opts.sheets) continue wsloop; break;\n\t\t\tcase \"string\": if(props.SheetNames[i].toLowerCase() != opts.sheets.toLowerCase()) continue wsloop; break;\n\t\t\tdefault: if(Array.isArray && Array.isArray(opts.sheets)) {\n\t\t\t\tvar snjseen = false;\n\t\t\t\tfor(var snj = 0; snj != opts.sheets.length; ++snj) {\n\t\t\t\t\tif(typeof opts.sheets[snj] == \"number\" && opts.sheets[snj] == i) snjseen=1;\n\t\t\t\t\tif(typeof opts.sheets[snj] == \"string\" && opts.sheets[snj].toLowerCase() == props.SheetNames[i].toLowerCase()) snjseen = 1;\n\t\t\t\t}\n\t\t\t\tif(!snjseen) continue wsloop;\n\t\t\t}\n\t\t}\n\t\tsafe_parse_sheet(zip, path, relsPath, props.SheetNames[i], i, sheetRels, sheets, stype, opts, wb, themes, styles);\n\t}\n\n\tout = ({\n\t\tDirectory: dir,\n\t\tWorkbook: wb,\n\t\tProps: props,\n\t\tCustprops: custprops,\n\t\tDeps: deps,\n\t\tSheets: sheets,\n\t\tSheetNames: props.SheetNames,\n\t\tStrings: strs,\n\t\tStyles: styles,\n\t\tThemes: themes,\n\t\tSSF: dup(table_fmt)\n\t}/*:any*/);\n\tif(opts && opts.bookFiles) {\n\t\tif(zip.files) {\n\t\t\tout.keys = entries;\n\t\t\tout.files = zip.files;\n\t\t} else {\n\t\t\tout.keys = [];\n\t\t\tout.files = {};\n\t\t\tzip.FullPaths.forEach(function(p, idx) {\n\t\t\t\tp = p.replace(/^Root Entry[\\/]/, \"\");\n\t\t\t\tout.keys.push(p);\n\t\t\t\tout.files[p] = zip.FileIndex[idx];\n\t\t\t});\n\t\t}\n\t}\n\tif(opts && opts.bookVBA) {\n\t\tif(dir.vba.length > 0) out.vbaraw = getzipdata(zip,strip_front_slash(dir.vba[0]),true);\n\t\telse if(dir.defaults && dir.defaults.bin === CT_VBA) out.vbaraw = getzipdata(zip, 'xl/vbaProject.bin',true);\n\t}\n\treturn out;\n}\n\n/* [MS-OFFCRYPTO] 2.1.1 */\nfunction parse_xlsxcfb(cfb, _opts/*:?ParseOpts*/)/*:Workbook*/ {\n\tvar opts = _opts || {};\n\tvar f = 'Workbook', data = CFB.find(cfb, f);\n\ttry {\n\tf = '/!DataSpaces/Version';\n\tdata = CFB.find(cfb, f); if(!data || !data.content) throw new Error(\"ECMA-376 Encrypted file missing \" + f);\n\t/*var version = */parse_DataSpaceVersionInfo(data.content);\n\n\t/* 2.3.4.1 */\n\tf = '/!DataSpaces/DataSpaceMap';\n\tdata = CFB.find(cfb, f); if(!data || !data.content) throw new Error(\"ECMA-376 Encrypted file missing \" + f);\n\tvar dsm = parse_DataSpaceMap(data.content);\n\tif(dsm.length !== 1 || dsm[0].comps.length !== 1 || dsm[0].comps[0].t !== 0 || dsm[0].name !== \"StrongEncryptionDataSpace\" || dsm[0].comps[0].v !== \"EncryptedPackage\")\n\t\tthrow new Error(\"ECMA-376 Encrypted file bad \" + f);\n\n\t/* 2.3.4.2 */\n\tf = '/!DataSpaces/DataSpaceInfo/StrongEncryptionDataSpace';\n\tdata = CFB.find(cfb, f); if(!data || !data.content) throw new Error(\"ECMA-376 Encrypted file missing \" + f);\n\tvar seds = parse_DataSpaceDefinition(data.content);\n\tif(seds.length != 1 || seds[0] != \"StrongEncryptionTransform\")\n\t\tthrow new Error(\"ECMA-376 Encrypted file bad \" + f);\n\n\t/* 2.3.4.3 */\n\tf = '/!DataSpaces/TransformInfo/StrongEncryptionTransform/!Primary';\n\tdata = CFB.find(cfb, f); if(!data || !data.content) throw new Error(\"ECMA-376 Encrypted file missing \" + f);\n\t/*var hdr = */parse_Primary(data.content);\n\t} catch(e) {}\n\n\tf = '/EncryptionInfo';\n\tdata = CFB.find(cfb, f); if(!data || !data.content) throw new Error(\"ECMA-376 Encrypted file missing \" + f);\n\tvar einfo = parse_EncryptionInfo(data.content);\n\n\t/* 2.3.4.4 */\n\tf = '/EncryptedPackage';\n\tdata = CFB.find(cfb, f); if(!data || !data.content) throw new Error(\"ECMA-376 Encrypted file missing \" + f);\n\n/*global decrypt_agile */\n/*:: declare var decrypt_agile:any; */\n\tif(einfo[0] == 0x04 && typeof decrypt_agile !== 'undefined') return decrypt_agile(einfo[1], data.content, opts.password || \"\", opts);\n/*global decrypt_std76 */\n/*:: declare var decrypt_std76:any; */\n\tif(einfo[0] == 0x02 && typeof decrypt_std76 !== 'undefined') return decrypt_std76(einfo[1], data.content, opts.password || \"\", opts);\n\tthrow new Error(\"File is password-protected\");\n}\n\nfunction write_zip(wb/*:Workbook*/, opts/*:WriteOpts*/)/*:ZIP*/ {\n\tif(opts.bookType == \"ods\") return write_ods(wb, opts);\n\tif(opts.bookType == \"numbers\") return write_numbers_iwa(wb, opts);\n\tif(opts.bookType == \"xlsb\") return write_zip_xlsxb(wb, opts);\n\treturn write_zip_xlsx(wb, opts);\n}\n\n/* XLSX and XLSB writing are very similar. Originally they were unified in one\n export function. This is horrible for tree shaking in the common case (most\n applications need to export files in one format) so this function supports\n both formats while write_zip_xlsx only handles XLSX */\nfunction write_zip_xlsxb(wb/*:Workbook*/, opts/*:WriteOpts*/)/*:ZIP*/ {\n\t_shapeid = 1024;\n\tif(wb && !wb.SSF) {\n\t\twb.SSF = dup(table_fmt);\n\t}\n\tif(wb && wb.SSF) {\n\t\tmake_ssf(); SSF_load_table(wb.SSF);\n\t\t// $FlowIgnore\n\t\topts.revssf = evert_num(wb.SSF); opts.revssf[wb.SSF[65535]] = 0;\n\t\topts.ssf = wb.SSF;\n\t}\n\topts.rels = {}; opts.wbrels = {};\n\topts.Strings = /*::((*/[]/*:: :any):SST)*/; opts.Strings.Count = 0; opts.Strings.Unique = 0;\n\tif(browser_has_Map) opts.revStrings = new Map();\n\telse { opts.revStrings = {}; opts.revStrings.foo = []; delete opts.revStrings.foo; }\n\tvar wbext = opts.bookType == \"xlsb\" ? \"bin\" : \"xml\";\n\tvar vbafmt = VBAFMTS.indexOf(opts.bookType) > -1;\n\tvar ct = new_ct();\n\tfix_write_opts(opts = opts || {});\n\tvar zip = zip_new();\n\tvar f = \"\", rId = 0;\n\n\topts.cellXfs = [];\n\tget_cell_style(opts.cellXfs, {}, {revssf:{\"General\":0}});\n\n\tif(!wb.Props) wb.Props = {};\n\n\tf = \"docProps/core.xml\";\n\tzip_add_file(zip, f, write_core_props(wb.Props, opts));\n\tct.coreprops.push(f);\n\tadd_rels(opts.rels, 2, f, RELS.CORE_PROPS);\n\n\t/*::if(!wb.Props) throw \"unreachable\"; */\n\tf = \"docProps/app.xml\";\n\tif(wb.Props && wb.Props.SheetNames){/* empty */}\n\telse if(!wb.Workbook || !wb.Workbook.Sheets) wb.Props.SheetNames = wb.SheetNames;\n\telse {\n\t\tvar _sn = [];\n\t\tfor(var _i = 0; _i < wb.SheetNames.length; ++_i)\n\t\t\tif((wb.Workbook.Sheets[_i]||{}).Hidden != 2) _sn.push(wb.SheetNames[_i]);\n\t\twb.Props.SheetNames = _sn;\n\t}\n\twb.Props.Worksheets = wb.Props.SheetNames.length;\n\tzip_add_file(zip, f, write_ext_props(wb.Props, opts));\n\tct.extprops.push(f);\n\tadd_rels(opts.rels, 3, f, RELS.EXT_PROPS);\n\n\tif(wb.Custprops !== wb.Props && keys(wb.Custprops||{}).length > 0) {\n\t\tf = \"docProps/custom.xml\";\n\t\tzip_add_file(zip, f, write_cust_props(wb.Custprops, opts));\n\t\tct.custprops.push(f);\n\t\tadd_rels(opts.rels, 4, f, RELS.CUST_PROPS);\n\t}\n\n\tfor(rId=1;rId <= wb.SheetNames.length; ++rId) {\n\t\tvar wsrels = {'!id':{}};\n\t\tvar ws = wb.Sheets[wb.SheetNames[rId-1]];\n\t\tvar _type = (ws || {})[\"!type\"] || \"sheet\";\n\t\tswitch(_type) {\n\t\tcase \"chart\":\n\t\t\t/* falls through */\n\t\tdefault:\n\t\t\tf = \"xl/worksheets/sheet\" + rId + \".\" + wbext;\n\t\t\tzip_add_file(zip, f, write_ws(rId-1, f, opts, wb, wsrels));\n\t\t\tct.sheets.push(f);\n\t\t\tadd_rels(opts.wbrels, -1, \"worksheets/sheet\" + rId + \".\" + wbext, RELS.WS[0]);\n\t\t}\n\n\t\tif(ws) {\n\t\t\tvar comments = ws['!comments'];\n\t\t\tvar need_vml = false;\n\t\t\tvar cf = \"\";\n\t\t\tif(comments && comments.length > 0) {\n\t\t\t\tcf = \"xl/comments\" + rId + \".\" + wbext;\n\t\t\t\tzip_add_file(zip, cf, write_cmnt(comments, cf, opts));\n\t\t\t\tct.comments.push(cf);\n\t\t\t\tadd_rels(wsrels, -1, \"../comments\" + rId + \".\" + wbext, RELS.CMNT);\n\t\t\t\tneed_vml = true;\n\t\t\t}\n\t\t\tif(ws['!legacy']) {\n\t\t\t\tif(need_vml) zip_add_file(zip, \"xl/drawings/vmlDrawing\" + (rId) + \".vml\", write_comments_vml(rId, ws['!comments']));\n\t\t\t}\n\t\t\tdelete ws['!comments'];\n\t\t\tdelete ws['!legacy'];\n\t\t}\n\n\t\tif(wsrels['!id'].rId1) zip_add_file(zip, get_rels_path(f), write_rels(wsrels));\n\t}\n\n\tif(opts.Strings != null && opts.Strings.length > 0) {\n\t\tf = \"xl/sharedStrings.\" + wbext;\n\t\tzip_add_file(zip, f, write_sst(opts.Strings, f, opts));\n\t\tct.strs.push(f);\n\t\tadd_rels(opts.wbrels, -1, \"sharedStrings.\" + wbext, RELS.SST);\n\t}\n\n\tf = \"xl/workbook.\" + wbext;\n\tzip_add_file(zip, f, write_wb(wb, f, opts));\n\tct.workbooks.push(f);\n\tadd_rels(opts.rels, 1, f, RELS.WB);\n\n\t/* TODO: something more intelligent with themes */\n\n\tf = \"xl/theme/theme1.xml\";\n\tzip_add_file(zip, f, write_theme(wb.Themes, opts));\n\tct.themes.push(f);\n\tadd_rels(opts.wbrels, -1, \"theme/theme1.xml\", RELS.THEME);\n\n\t/* TODO: something more intelligent with styles */\n\n\tf = \"xl/styles.\" + wbext;\n\tzip_add_file(zip, f, write_sty(wb, f, opts));\n\tct.styles.push(f);\n\tadd_rels(opts.wbrels, -1, \"styles.\" + wbext, RELS.STY);\n\n\tif(wb.vbaraw && vbafmt) {\n\t\tf = \"xl/vbaProject.bin\";\n\t\tzip_add_file(zip, f, wb.vbaraw);\n\t\tct.vba.push(f);\n\t\tadd_rels(opts.wbrels, -1, \"vbaProject.bin\", RELS.VBA);\n\t}\n\n\tf = \"xl/metadata.\" + wbext;\n\tzip_add_file(zip, f, write_xlmeta(f));\n\tct.metadata.push(f);\n\tadd_rels(opts.wbrels, -1, \"metadata.\" + wbext, RELS.XLMETA);\n\n\tzip_add_file(zip, \"[Content_Types].xml\", write_ct(ct, opts));\n\tzip_add_file(zip, '_rels/.rels', write_rels(opts.rels));\n\tzip_add_file(zip, 'xl/_rels/workbook.' + wbext + '.rels', write_rels(opts.wbrels));\n\n\tdelete opts.revssf; delete opts.ssf;\n\treturn zip;\n}\n\nfunction write_zip_xlsx(wb/*:Workbook*/, opts/*:WriteOpts*/)/*:ZIP*/ {\n\t_shapeid = 1024;\n\tif(wb && !wb.SSF) {\n\t\twb.SSF = dup(table_fmt);\n\t}\n\tif(wb && wb.SSF) {\n\t\tmake_ssf(); SSF_load_table(wb.SSF);\n\t\t// $FlowIgnore\n\t\topts.revssf = evert_num(wb.SSF); opts.revssf[wb.SSF[65535]] = 0;\n\t\topts.ssf = wb.SSF;\n\t}\n\topts.rels = {}; opts.wbrels = {};\n\topts.Strings = /*::((*/[]/*:: :any):SST)*/; opts.Strings.Count = 0; opts.Strings.Unique = 0;\n\tif(browser_has_Map) opts.revStrings = new Map();\n\telse { opts.revStrings = {}; opts.revStrings.foo = []; delete opts.revStrings.foo; }\n\tvar wbext = \"xml\";\n\tvar vbafmt = VBAFMTS.indexOf(opts.bookType) > -1;\n\tvar ct = new_ct();\n\tfix_write_opts(opts = opts || {});\n\tvar zip = zip_new();\n\tvar f = \"\", rId = 0;\n\n\topts.cellXfs = [];\n\tget_cell_style(opts.cellXfs, {}, {revssf:{\"General\":0}});\n\n\tif(!wb.Props) wb.Props = {};\n\n\tf = \"docProps/core.xml\";\n\tzip_add_file(zip, f, write_core_props(wb.Props, opts));\n\tct.coreprops.push(f);\n\tadd_rels(opts.rels, 2, f, RELS.CORE_PROPS);\n\n\t/*::if(!wb.Props) throw \"unreachable\"; */\n\tf = \"docProps/app.xml\";\n\tif(wb.Props && wb.Props.SheetNames){/* empty */}\n\telse if(!wb.Workbook || !wb.Workbook.Sheets) wb.Props.SheetNames = wb.SheetNames;\n\telse {\n\t\tvar _sn = [];\n\t\tfor(var _i = 0; _i < wb.SheetNames.length; ++_i)\n\t\t\tif((wb.Workbook.Sheets[_i]||{}).Hidden != 2) _sn.push(wb.SheetNames[_i]);\n\t\twb.Props.SheetNames = _sn;\n\t}\n\twb.Props.Worksheets = wb.Props.SheetNames.length;\n\tzip_add_file(zip, f, write_ext_props(wb.Props, opts));\n\tct.extprops.push(f);\n\tadd_rels(opts.rels, 3, f, RELS.EXT_PROPS);\n\n\tif(wb.Custprops !== wb.Props && keys(wb.Custprops||{}).length > 0) {\n\t\tf = \"docProps/custom.xml\";\n\t\tzip_add_file(zip, f, write_cust_props(wb.Custprops, opts));\n\t\tct.custprops.push(f);\n\t\tadd_rels(opts.rels, 4, f, RELS.CUST_PROPS);\n\t}\n\n\tvar people = [\"SheetJ5\"];\n\topts.tcid = 0;\n\n\tfor(rId=1;rId <= wb.SheetNames.length; ++rId) {\n\t\tvar wsrels = {'!id':{}};\n\t\tvar ws = wb.Sheets[wb.SheetNames[rId-1]];\n\t\tvar _type = (ws || {})[\"!type\"] || \"sheet\";\n\t\tswitch(_type) {\n\t\tcase \"chart\":\n\t\t\t/* falls through */\n\t\tdefault:\n\t\t\tf = \"xl/worksheets/sheet\" + rId + \".\" + wbext;\n\t\t\tzip_add_file(zip, f, write_ws_xml(rId-1, opts, wb, wsrels));\n\t\t\tct.sheets.push(f);\n\t\t\tadd_rels(opts.wbrels, -1, \"worksheets/sheet\" + rId + \".\" + wbext, RELS.WS[0]);\n\t\t}\n\n\t\tif(ws) {\n\t\t\tvar comments = ws['!comments'];\n\t\t\tvar need_vml = false;\n\t\t\tvar cf = \"\";\n\t\t\tif(comments && comments.length > 0) {\n\t\t\t\tvar needtc = false;\n\t\t\t\tcomments.forEach(function(carr) {\n\t\t\t\t\tcarr[1].forEach(function(c) { if(c.T == true) needtc = true; });\n\t\t\t\t});\n\t\t\t\tif(needtc) {\n\t\t\t\t\tcf = \"xl/threadedComments/threadedComment\" + rId + \".\" + wbext;\n\t\t\t\t\tzip_add_file(zip, cf, write_tcmnt_xml(comments, people, opts));\n\t\t\t\t\tct.threadedcomments.push(cf);\n\t\t\t\t\tadd_rels(wsrels, -1, \"../threadedComments/threadedComment\" + rId + \".\" + wbext, RELS.TCMNT);\n\t\t\t\t}\n\n\t\t\t\tcf = \"xl/comments\" + rId + \".\" + wbext;\n\t\t\t\tzip_add_file(zip, cf, write_comments_xml(comments, opts));\n\t\t\t\tct.comments.push(cf);\n\t\t\t\tadd_rels(wsrels, -1, \"../comments\" + rId + \".\" + wbext, RELS.CMNT);\n\t\t\t\tneed_vml = true;\n\t\t\t}\n\t\t\tif(ws['!legacy']) {\n\t\t\t\tif(need_vml) zip_add_file(zip, \"xl/drawings/vmlDrawing\" + (rId) + \".vml\", write_comments_vml(rId, ws['!comments']));\n\t\t\t}\n\t\t\tdelete ws['!comments'];\n\t\t\tdelete ws['!legacy'];\n\t\t}\n\n\t\tif(wsrels['!id'].rId1) zip_add_file(zip, get_rels_path(f), write_rels(wsrels));\n\t}\n\n\tif(opts.Strings != null && opts.Strings.length > 0) {\n\t\tf = \"xl/sharedStrings.\" + wbext;\n\t\tzip_add_file(zip, f, write_sst_xml(opts.Strings, opts));\n\t\tct.strs.push(f);\n\t\tadd_rels(opts.wbrels, -1, \"sharedStrings.\" + wbext, RELS.SST);\n\t}\n\n\tf = \"xl/workbook.\" + wbext;\n\tzip_add_file(zip, f, write_wb_xml(wb, opts));\n\tct.workbooks.push(f);\n\tadd_rels(opts.rels, 1, f, RELS.WB);\n\n\t/* TODO: something more intelligent with themes */\n\n\tf = \"xl/theme/theme1.xml\";\n\tzip_add_file(zip, f, write_theme(wb.Themes, opts));\n\tct.themes.push(f);\n\tadd_rels(opts.wbrels, -1, \"theme/theme1.xml\", RELS.THEME);\n\n\t/* TODO: something more intelligent with styles */\n\n\tf = \"xl/styles.\" + wbext;\n\tzip_add_file(zip, f, write_sty_xml(wb, opts));\n\tct.styles.push(f);\n\tadd_rels(opts.wbrels, -1, \"styles.\" + wbext, RELS.STY);\n\n\tif(wb.vbaraw && vbafmt) {\n\t\tf = \"xl/vbaProject.bin\";\n\t\tzip_add_file(zip, f, wb.vbaraw);\n\t\tct.vba.push(f);\n\t\tadd_rels(opts.wbrels, -1, \"vbaProject.bin\", RELS.VBA);\n\t}\n\n\tf = \"xl/metadata.\" + wbext;\n\tzip_add_file(zip, f, write_xlmeta_xml());\n\tct.metadata.push(f);\n\tadd_rels(opts.wbrels, -1, \"metadata.\" + wbext, RELS.XLMETA);\n\n\tif(people.length > 1) {\n\t\tf = \"xl/persons/person.xml\";\n\t\tzip_add_file(zip, f, write_people_xml(people, opts));\n\t\tct.people.push(f);\n\t\tadd_rels(opts.wbrels, -1, \"persons/person.xml\", RELS.PEOPLE);\n\t}\n\n\tzip_add_file(zip, \"[Content_Types].xml\", write_ct(ct, opts));\n\tzip_add_file(zip, '_rels/.rels', write_rels(opts.rels));\n\tzip_add_file(zip, 'xl/_rels/workbook.' + wbext + '.rels', write_rels(opts.wbrels));\n\n\tdelete opts.revssf; delete opts.ssf;\n\treturn zip;\n}\n\nfunction firstbyte(f/*:RawData*/,o/*:?TypeOpts*/)/*:Array*/ {\n\tvar x = \"\";\n\tswitch((o||{}).type || \"base64\") {\n\t\tcase 'buffer': return [f[0], f[1], f[2], f[3], f[4], f[5], f[6], f[7]];\n\t\tcase 'base64': x = Base64_decode(f.slice(0,12)); break;\n\t\tcase 'binary': x = f; break;\n\t\tcase 'array': return [f[0], f[1], f[2], f[3], f[4], f[5], f[6], f[7]];\n\t\tdefault: throw new Error(\"Unrecognized type \" + (o && o.type || \"undefined\"));\n\t}\n\treturn [x.charCodeAt(0), x.charCodeAt(1), x.charCodeAt(2), x.charCodeAt(3), x.charCodeAt(4), x.charCodeAt(5), x.charCodeAt(6), x.charCodeAt(7)];\n}\n\nfunction read_cfb(cfb/*:CFBContainer*/, opts/*:?ParseOpts*/)/*:Workbook*/ {\n\tif(CFB.find(cfb, \"EncryptedPackage\")) return parse_xlsxcfb(cfb, opts);\n\treturn parse_xlscfb(cfb, opts);\n}\n\nfunction read_zip(data/*:RawData*/, opts/*:?ParseOpts*/)/*:Workbook*/ {\n\tvar zip, d = data;\n\tvar o = opts||{};\n\tif(!o.type) o.type = (has_buf && Buffer.isBuffer(data)) ? \"buffer\" : \"base64\";\n\tzip = zip_read(d, o);\n\treturn parse_zip(zip, o);\n}\n\nfunction read_plaintext(data/*:string*/, o/*:ParseOpts*/)/*:Workbook*/ {\n\tvar i = 0;\n\tmain: while(i < data.length) switch(data.charCodeAt(i)) {\n\t\tcase 0x0A: case 0x0D: case 0x20: ++i; break;\n\t\tcase 0x3C: return parse_xlml(data.slice(i),o);\n\t\tdefault: break main;\n\t}\n\treturn PRN.to_workbook(data, o);\n}\n\nfunction read_plaintext_raw(data/*:RawData*/, o/*:ParseOpts*/)/*:Workbook*/ {\n\tvar str = \"\", bytes = firstbyte(data, o);\n\tswitch(o.type) {\n\t\tcase 'base64': str = Base64_decode(data); break;\n\t\tcase 'binary': str = data; break;\n\t\tcase 'buffer': str = data.toString('binary'); break;\n\t\tcase 'array': str = cc2str(data); break;\n\t\tdefault: throw new Error(\"Unrecognized type \" + o.type);\n\t}\n\tif(bytes[0] == 0xEF && bytes[1] == 0xBB && bytes[2] == 0xBF) str = utf8read(str);\n\to.type = \"binary\";\n\treturn read_plaintext(str, o);\n}\n\nfunction read_utf16(data/*:RawData*/, o/*:ParseOpts*/)/*:Workbook*/ {\n\tvar d = data;\n\tif(o.type == 'base64') d = Base64_decode(d);\n\td = $cptable.utils.decode(1200, d.slice(2), 'str');\n\to.type = \"binary\";\n\treturn read_plaintext(d, o);\n}\n\nfunction bstrify(data/*:string*/)/*:string*/ {\n\treturn !data.match(/[^\\x00-\\x7F]/) ? data : utf8write(data);\n}\n\nfunction read_prn(data, d, o, str) {\n\tif(str) { o.type = \"string\"; return PRN.to_workbook(data, o); }\n\treturn PRN.to_workbook(d, o);\n}\n\nfunction readSync(data/*:RawData*/, opts/*:?ParseOpts*/)/*:Workbook*/ {\n\treset_cp();\n\tvar o = opts||{};\n\tif(typeof ArrayBuffer !== 'undefined' && data instanceof ArrayBuffer) return readSync(new Uint8Array(data), (o = dup(o), o.type = \"array\", o));\n\tif(typeof Uint8Array !== 'undefined' && data instanceof Uint8Array && !o.type) o.type = typeof Deno !== \"undefined\" ? \"buffer\" : \"array\";\n\tvar d = data, n = [0,0,0,0], str = false;\n\tif(o.cellStyles) { o.cellNF = true; o.sheetStubs = true; }\n\t_ssfopts = {};\n\tif(o.dateNF) _ssfopts.dateNF = o.dateNF;\n\tif(!o.type) o.type = (has_buf && Buffer.isBuffer(data)) ? \"buffer\" : \"base64\";\n\tif(o.type == \"file\") { o.type = has_buf ? \"buffer\" : \"binary\"; d = read_binary(data); if(typeof Uint8Array !== 'undefined' && !has_buf) o.type = \"array\"; }\n\tif(o.type == \"string\") { str = true; o.type = \"binary\"; o.codepage = 65001; d = bstrify(data); }\n\tif(o.type == 'array' && typeof Uint8Array !== 'undefined' && data instanceof Uint8Array && typeof ArrayBuffer !== 'undefined') {\n\t\t// $FlowIgnore\n\t\tvar ab=new ArrayBuffer(3), vu=new Uint8Array(ab); vu.foo=\"bar\";\n\t\t// $FlowIgnore\n\t\tif(!vu.foo) {o=dup(o); o.type='array'; return readSync(ab2a(d), o);}\n\t}\n\tswitch((n = firstbyte(d, o))[0]) {\n\t\tcase 0xD0: if(n[1] === 0xCF && n[2] === 0x11 && n[3] === 0xE0 && n[4] === 0xA1 && n[5] === 0xB1 && n[6] === 0x1A && n[7] === 0xE1) return read_cfb(CFB.read(d, o), o); break;\n\t\tcase 0x09: if(n[1] <= 0x08) return parse_xlscfb(d, o); break;\n\t\tcase 0x3C: return parse_xlml(d, o);\n\t\tcase 0x49:\n\t\t\tif(n[1] === 0x49 && n[2] === 0x2a && n[3] === 0x00) throw new Error(\"TIFF Image File is not a spreadsheet\");\n\t\t\tif(n[1] === 0x44) return read_wb_ID(d, o);\n\t\t\tbreak;\n\t\tcase 0x54: if(n[1] === 0x41 && n[2] === 0x42 && n[3] === 0x4C) return DIF.to_workbook(d, o); break;\n\t\tcase 0x50: return (n[1] === 0x4B && n[2] < 0x09 && n[3] < 0x09) ? read_zip(d, o) : read_prn(data, d, o, str);\n\t\tcase 0xEF: return n[3] === 0x3C ? parse_xlml(d, o) : read_prn(data, d, o, str);\n\t\tcase 0xFF:\n\t\t\tif(n[1] === 0xFE) { return read_utf16(d, o); }\n\t\t\telse if(n[1] === 0x00 && n[2] === 0x02 && n[3] === 0x00) return WK_.to_workbook(d, o);\n\t\t\tbreak;\n\t\tcase 0x00:\n\t\t\tif(n[1] === 0x00) {\n\t\t\t\tif(n[2] >= 0x02 && n[3] === 0x00) return WK_.to_workbook(d, o);\n\t\t\t\tif(n[2] === 0x00 && (n[3] === 0x08 || n[3] === 0x09)) return WK_.to_workbook(d, o);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase 0x03: case 0x83: case 0x8B: case 0x8C: return DBF.to_workbook(d, o);\n\t\tcase 0x7B: if(n[1] === 0x5C && n[2] === 0x72 && n[3] === 0x74) return RTF.to_workbook(d, o); break;\n\t\tcase 0x0A: case 0x0D: case 0x20: return read_plaintext_raw(d, o);\n\t\tcase 0x89: if(n[1] === 0x50 && n[2] === 0x4E && n[3] === 0x47) throw new Error(\"PNG Image File is not a spreadsheet\"); break;\n\t}\n\tif(DBF_SUPPORTED_VERSIONS.indexOf(n[0]) > -1 && n[2] <= 12 && n[3] <= 31) return DBF.to_workbook(d, o);\n\treturn read_prn(data, d, o, str);\n}\n\nfunction readFileSync(filename/*:string*/, opts/*:?ParseOpts*/)/*:Workbook*/ {\n\tvar o = opts||{}; o.type = 'file';\n\treturn readSync(filename, o);\n}\nfunction write_cfb_ctr(cfb/*:CFBContainer*/, o/*:WriteOpts*/)/*:any*/ {\n\tswitch(o.type) {\n\t\tcase \"base64\": case \"binary\": break;\n\t\tcase \"buffer\": case \"array\": o.type = \"\"; break;\n\t\tcase \"file\": return write_dl(o.file, CFB.write(cfb, {type:has_buf ? 'buffer' : \"\"}));\n\t\tcase \"string\": throw new Error(\"'string' output type invalid for '\" + o.bookType + \"' files\");\n\t\tdefault: throw new Error(\"Unrecognized type \" + o.type);\n\t}\n\treturn CFB.write(cfb, o);\n}\n\n/*:: declare var encrypt_agile:any; */\nfunction write_zip_type(wb/*:Workbook*/, opts/*:?WriteOpts*/)/*:any*/ {\n\tvar o = dup(opts||{});\n\tvar z = write_zip(wb, o);\n\treturn write_zip_denouement(z, o);\n}\nfunction write_zip_typeXLSX(wb/*:Workbook*/, opts/*:?WriteOpts*/)/*:any*/ {\n\tvar o = dup(opts||{});\n\tvar z = write_zip_xlsx(wb, o);\n\treturn write_zip_denouement(z, o);\n}\nfunction write_zip_denouement(z/*:any*/, o/*:?WriteOpts*/)/*:any*/ {\n\tvar oopts = {};\n\tvar ftype = has_buf ? \"nodebuffer\" : (typeof Uint8Array !== \"undefined\" ? \"array\" : \"string\");\n\tif(o.compression) oopts.compression = 'DEFLATE';\n\tif(o.password) oopts.type = ftype;\n\telse switch(o.type) {\n\t\tcase \"base64\": oopts.type = \"base64\"; break;\n\t\tcase \"binary\": oopts.type = \"string\"; break;\n\t\tcase \"string\": throw new Error(\"'string' output type invalid for '\" + o.bookType + \"' files\");\n\t\tcase \"buffer\":\n\t\tcase \"file\": oopts.type = ftype; break;\n\t\tdefault: throw new Error(\"Unrecognized type \" + o.type);\n\t}\n\tvar out = z.FullPaths ? CFB.write(z, {fileType:\"zip\", type: /*::(*/{\"nodebuffer\": \"buffer\", \"string\": \"binary\"}/*:: :any)*/[oopts.type] || oopts.type, compression: !!o.compression}) : z.generate(oopts);\n\tif(typeof Deno !== \"undefined\") {\n\t\tif(typeof out == \"string\") {\n\t\t\tif(o.type == \"binary\" || o.type == \"base64\") return out;\n\t\t\tout = new Uint8Array(s2ab(out));\n\t\t}\n\t}\n/*jshint -W083 */\n\tif(o.password && typeof encrypt_agile !== 'undefined') return write_cfb_ctr(encrypt_agile(out, o.password), o); // eslint-disable-line no-undef\n/*jshint +W083 */\n\tif(o.type === \"file\") return write_dl(o.file, out);\n\treturn o.type == \"string\" ? utf8read(/*::(*/out/*:: :any)*/) : out;\n}\n\nfunction write_cfb_type(wb/*:Workbook*/, opts/*:?WriteOpts*/)/*:any*/ {\n\tvar o = opts||{};\n\tvar cfb/*:CFBContainer*/ = write_xlscfb(wb, o);\n\treturn write_cfb_ctr(cfb, o);\n}\n\nfunction write_string_type(out/*:string*/, opts/*:WriteOpts*/, bom/*:?string*/)/*:any*/ {\n\tif(!bom) bom = \"\";\n\tvar o = bom + out;\n\tswitch(opts.type) {\n\t\tcase \"base64\": return Base64_encode(utf8write(o));\n\t\tcase \"binary\": return utf8write(o);\n\t\tcase \"string\": return out;\n\t\tcase \"file\": return write_dl(opts.file, o, 'utf8');\n\t\tcase \"buffer\": {\n\t\t\tif(has_buf) return Buffer_from(o, 'utf8');\n\t\t\telse if(typeof TextEncoder !== \"undefined\") return new TextEncoder().encode(o);\n\t\t\telse return write_string_type(o, {type:'binary'}).split(\"\").map(function(c) { return c.charCodeAt(0); });\n\t\t}\n\t}\n\tthrow new Error(\"Unrecognized type \" + opts.type);\n}\n\nfunction write_stxt_type(out/*:string*/, opts/*:WriteOpts*/)/*:any*/ {\n\tswitch(opts.type) {\n\t\tcase \"base64\": return Base64_encode(out);\n\t\tcase \"binary\": return out;\n\t\tcase \"string\": return out; /* override in sheet_to_txt */\n\t\tcase \"file\": return write_dl(opts.file, out, 'binary');\n\t\tcase \"buffer\": {\n\t\t\tif(has_buf) return Buffer_from(out, 'binary');\n\t\t\telse return out.split(\"\").map(function(c) { return c.charCodeAt(0); });\n\t\t}\n\t}\n\tthrow new Error(\"Unrecognized type \" + opts.type);\n}\n\n/* TODO: test consistency */\nfunction write_binary_type(out, opts/*:WriteOpts*/)/*:any*/ {\n\tswitch(opts.type) {\n\t\tcase \"string\":\n\t\tcase \"base64\":\n\t\tcase \"binary\":\n\t\t\tvar bstr = \"\";\n\t\t\t// $FlowIgnore\n\t\t\tfor(var i = 0; i < out.length; ++i) bstr += String.fromCharCode(out[i]);\n\t\t\treturn opts.type == 'base64' ? Base64_encode(bstr) : opts.type == 'string' ? utf8read(bstr) : bstr;\n\t\tcase \"file\": return write_dl(opts.file, out);\n\t\tcase \"buffer\": return out;\n\t\tdefault: throw new Error(\"Unrecognized type \" + opts.type);\n\t}\n}\n\nfunction writeSyncXLSX(wb/*:Workbook*/, opts/*:?WriteOpts*/) {\n\treset_cp();\n\tcheck_wb(wb);\n\tvar o = dup(opts||{});\n\tif(o.cellStyles) { o.cellNF = true; o.sheetStubs = true; }\n\tif(o.type == \"array\") { o.type = \"binary\"; var out/*:string*/ = (writeSyncXLSX(wb, o)/*:any*/); o.type = \"array\"; return s2ab(out); }\n\treturn write_zip_typeXLSX(wb, o);\n}\n\nfunction writeSync(wb/*:Workbook*/, opts/*:?WriteOpts*/) {\n\treset_cp();\n\tcheck_wb(wb);\n\tvar o = dup(opts||{});\n\tif(o.cellStyles) { o.cellNF = true; o.sheetStubs = true; }\n\tif(o.type == \"array\") { o.type = \"binary\"; var out/*:string*/ = (writeSync(wb, o)/*:any*/); o.type = \"array\"; return s2ab(out); }\n\tvar idx = 0;\n\tif(o.sheet) {\n\t\tif(typeof o.sheet == \"number\") idx = o.sheet;\n\t\telse idx = wb.SheetNames.indexOf(o.sheet);\n\t\tif(!wb.SheetNames[idx]) throw new Error(\"Sheet not found: \" + o.sheet + \" : \" + (typeof o.sheet));\n\t}\n\tswitch(o.bookType || 'xlsb') {\n\t\tcase 'xml':\n\t\tcase 'xlml': return write_string_type(write_xlml(wb, o), o);\n\t\tcase 'slk':\n\t\tcase 'sylk': return write_string_type(SYLK.from_sheet(wb.Sheets[wb.SheetNames[idx]], o), o);\n\t\tcase 'htm':\n\t\tcase 'html': return write_string_type(sheet_to_html(wb.Sheets[wb.SheetNames[idx]], o), o);\n\t\tcase 'txt': return write_stxt_type(sheet_to_txt(wb.Sheets[wb.SheetNames[idx]], o), o);\n\t\tcase 'csv': return write_string_type(sheet_to_csv(wb.Sheets[wb.SheetNames[idx]], o), o, \"\\ufeff\");\n\t\tcase 'dif': return write_string_type(DIF.from_sheet(wb.Sheets[wb.SheetNames[idx]], o), o);\n\t\tcase 'dbf': return write_binary_type(DBF.from_sheet(wb.Sheets[wb.SheetNames[idx]], o), o);\n\t\tcase 'prn': return write_string_type(PRN.from_sheet(wb.Sheets[wb.SheetNames[idx]], o), o);\n\t\tcase 'rtf': return write_string_type(RTF.from_sheet(wb.Sheets[wb.SheetNames[idx]], o), o);\n\t\tcase 'eth': return write_string_type(ETH.from_sheet(wb.Sheets[wb.SheetNames[idx]], o), o);\n\t\tcase 'fods': return write_string_type(write_ods(wb, o), o);\n\t\tcase 'wk1': return write_binary_type(WK_.sheet_to_wk1(wb.Sheets[wb.SheetNames[idx]], o), o);\n\t\tcase 'wk3': return write_binary_type(WK_.book_to_wk3(wb, o), o);\n\t\tcase 'biff2': if(!o.biff) o.biff = 2; /* falls through */\n\t\tcase 'biff3': if(!o.biff) o.biff = 3; /* falls through */\n\t\tcase 'biff4': if(!o.biff) o.biff = 4; return write_binary_type(write_biff_buf(wb, o), o);\n\t\tcase 'biff5': if(!o.biff) o.biff = 5; /* falls through */\n\t\tcase 'biff8':\n\t\tcase 'xla':\n\t\tcase 'xls': if(!o.biff) o.biff = 8; return write_cfb_type(wb, o);\n\t\tcase 'xlsx':\n\t\tcase 'xlsm':\n\t\tcase 'xlam':\n\t\tcase 'xlsb':\n\t\tcase 'numbers':\n\t\tcase 'ods': return write_zip_type(wb, o);\n\t\tdefault: throw new Error (\"Unrecognized bookType |\" + o.bookType + \"|\");\n\t}\n}\n\nfunction resolve_book_type(o/*:WriteFileOpts*/) {\n\tif(o.bookType) return;\n\tvar _BT = {\n\t\t\"xls\": \"biff8\",\n\t\t\"htm\": \"html\",\n\t\t\"slk\": \"sylk\",\n\t\t\"socialcalc\": \"eth\",\n\t\t\"Sh33tJS\": \"WTF\"\n\t};\n\tvar ext = o.file.slice(o.file.lastIndexOf(\".\")).toLowerCase();\n\tif(ext.match(/^\\.[a-z]+$/)) o.bookType = ext.slice(1);\n\to.bookType = _BT[o.bookType] || o.bookType;\n}\n\nfunction writeFileSync(wb/*:Workbook*/, filename/*:string*/, opts/*:?WriteFileOpts*/) {\n\tvar o = opts||{}; o.type = 'file';\n\to.file = filename;\n\tresolve_book_type(o);\n\treturn writeSync(wb, o);\n}\n\nfunction writeFileSyncXLSX(wb/*:Workbook*/, filename/*:string*/, opts/*:?WriteFileOpts*/) {\n\tvar o = opts||{}; o.type = 'file';\n\to.file = filename;\n\tresolve_book_type(o);\n\treturn writeSyncXLSX(wb, o);\n}\n\n\nfunction writeFileAsync(filename/*:string*/, wb/*:Workbook*/, opts/*:?WriteFileOpts*/, cb/*:?(e?:ErrnoError)=>void*/) {\n\tvar o = opts||{}; o.type = 'file';\n\to.file = filename;\n\tresolve_book_type(o);\n\to.type = 'buffer';\n\tvar _cb = cb; if(!(_cb instanceof Function)) _cb = (opts/*:any*/);\n\treturn _fs.writeFile(filename, writeSync(wb, o), _cb);\n}\n/*::\ntype MJRObject = {\n\trow: any;\n\tisempty: boolean;\n};\n*/\nfunction make_json_row(sheet/*:Worksheet*/, r/*:Range*/, R/*:number*/, cols/*:Array*/, header/*:number*/, hdr/*:Array*/, dense/*:boolean*/, o/*:Sheet2JSONOpts*/)/*:MJRObject*/ {\n\tvar rr = encode_row(R);\n\tvar defval = o.defval, raw = o.raw || !Object.prototype.hasOwnProperty.call(o, \"raw\");\n\tvar isempty = true;\n\tvar row/*:any*/ = (header === 1) ? [] : {};\n\tif(header !== 1) {\n\t\tif(Object.defineProperty) try { Object.defineProperty(row, '__rowNum__', {value:R, enumerable:false}); } catch(e) { row.__rowNum__ = R; }\n\t\telse row.__rowNum__ = R;\n\t}\n\tif(!dense || sheet[R]) for (var C = r.s.c; C <= r.e.c; ++C) {\n\t\tvar val = dense ? sheet[R][C] : sheet[cols[C] + rr];\n\t\tif(val === undefined || val.t === undefined) {\n\t\t\tif(defval === undefined) continue;\n\t\t\tif(hdr[C] != null) { row[hdr[C]] = defval; }\n\t\t\tcontinue;\n\t\t}\n\t\tvar v = val.v;\n\t\tswitch(val.t){\n\t\t\tcase 'z': if(v == null) break; continue;\n\t\t\tcase 'e': v = (v == 0 ? null : void 0); break;\n\t\t\tcase 's': case 'd': case 'b': case 'n': break;\n\t\t\tdefault: throw new Error('unrecognized type ' + val.t);\n\t\t}\n\t\tif(hdr[C] != null) {\n\t\t\tif(v == null) {\n\t\t\t\tif(val.t == \"e\" && v === null) row[hdr[C]] = null;\n\t\t\t\telse if(defval !== undefined) row[hdr[C]] = defval;\n\t\t\t\telse if(raw && v === null) row[hdr[C]] = null;\n\t\t\t\telse continue;\n\t\t\t} else {\n\t\t\t\trow[hdr[C]] = raw && (val.t !== \"n\" || (val.t === \"n\" && o.rawNumbers !== false)) ? v : format_cell(val,v,o);\n\t\t\t}\n\t\t\tif(v != null) isempty = false;\n\t\t}\n\t}\n\treturn { row: row, isempty: isempty };\n}\n\n\nfunction sheet_to_json(sheet/*:Worksheet*/, opts/*:?Sheet2JSONOpts*/) {\n\tif(sheet == null || sheet[\"!ref\"] == null) return [];\n\tvar val = {t:'n',v:0}, header = 0, offset = 1, hdr/*:Array*/ = [], v=0, vv=\"\";\n\tvar r = {s:{r:0,c:0},e:{r:0,c:0}};\n\tvar o = opts || {};\n\tvar range = o.range != null ? o.range : sheet[\"!ref\"];\n\tif(o.header === 1) header = 1;\n\telse if(o.header === \"A\") header = 2;\n\telse if(Array.isArray(o.header)) header = 3;\n\telse if(o.header == null) header = 0;\n\tswitch(typeof range) {\n\t\tcase 'string': r = safe_decode_range(range); break;\n\t\tcase 'number': r = safe_decode_range(sheet[\"!ref\"]); r.s.r = range; break;\n\t\tdefault: r = range;\n\t}\n\tif(header > 0) offset = 0;\n\tvar rr = encode_row(r.s.r);\n\tvar cols/*:Array*/ = [];\n\tvar out/*:Array*/ = [];\n\tvar outi = 0, counter = 0;\n\tvar dense = Array.isArray(sheet);\n\tvar R = r.s.r, C = 0;\n\tvar header_cnt = {};\n\tif(dense && !sheet[R]) sheet[R] = [];\n\tvar colinfo/*:Array*/ = o.skipHidden && sheet[\"!cols\"] || [];\n\tvar rowinfo/*:Array*/ = o.skipHidden && sheet[\"!rows\"] || [];\n\tfor(C = r.s.c; C <= r.e.c; ++C) {\n\t\tif(((colinfo[C]||{}).hidden)) continue;\n\t\tcols[C] = encode_col(C);\n\t\tval = dense ? sheet[R][C] : sheet[cols[C] + rr];\n\t\tswitch(header) {\n\t\t\tcase 1: hdr[C] = C - r.s.c; break;\n\t\t\tcase 2: hdr[C] = cols[C]; break;\n\t\t\tcase 3: hdr[C] = o.header[C - r.s.c]; break;\n\t\t\tdefault:\n\t\t\t\tif(val == null) val = {w: \"__EMPTY\", t: \"s\"};\n\t\t\t\tvv = v = format_cell(val, null, o);\n\t\t\t\tcounter = header_cnt[v] || 0;\n\t\t\t\tif(!counter) header_cnt[v] = 1;\n\t\t\t\telse {\n\t\t\t\t\tdo { vv = v + \"_\" + (counter++); } while(header_cnt[vv]); header_cnt[v] = counter;\n\t\t\t\t\theader_cnt[vv] = 1;\n\t\t\t\t}\n\t\t\t\thdr[C] = vv;\n\t\t}\n\t}\n\tfor (R = r.s.r + offset; R <= r.e.r; ++R) {\n\t\tif ((rowinfo[R]||{}).hidden) continue;\n\t\tvar row = make_json_row(sheet, r, R, cols, header, hdr, dense, o);\n\t\tif((row.isempty === false) || (header === 1 ? o.blankrows !== false : !!o.blankrows)) out[outi++] = row.row;\n\t}\n\tout.length = outi;\n\treturn out;\n}\n\nvar qreg = /\"/g;\nfunction make_csv_row(sheet/*:Worksheet*/, r/*:Range*/, R/*:number*/, cols/*:Array*/, fs/*:number*/, rs/*:number*/, FS/*:string*/, o/*:Sheet2CSVOpts*/)/*:?string*/ {\n\tvar isempty = true;\n\tvar row/*:Array*/ = [], txt = \"\", rr = encode_row(R);\n\tfor(var C = r.s.c; C <= r.e.c; ++C) {\n\t\tif (!cols[C]) continue;\n\t\tvar val = o.dense ? (sheet[R]||[])[C]: sheet[cols[C] + rr];\n\t\tif(val == null) txt = \"\";\n\t\telse if(val.v != null) {\n\t\t\tisempty = false;\n\t\t\ttxt = ''+(o.rawNumbers && val.t == \"n\" ? val.v : format_cell(val, null, o));\n\t\t\tfor(var i = 0, cc = 0; i !== txt.length; ++i) if((cc = txt.charCodeAt(i)) === fs || cc === rs || cc === 34 || o.forceQuotes) {txt = \"\\\"\" + txt.replace(qreg, '\"\"') + \"\\\"\"; break; }\n\t\t\tif(txt == \"ID\") txt = '\"ID\"';\n\t\t} else if(val.f != null && !val.F) {\n\t\t\tisempty = false;\n\t\t\ttxt = '=' + val.f; if(txt.indexOf(\",\") >= 0) txt = '\"' + txt.replace(qreg, '\"\"') + '\"';\n\t\t} else txt = \"\";\n\t\t/* NOTE: Excel CSV does not support array formulae */\n\t\trow.push(txt);\n\t}\n\tif(o.blankrows === false && isempty) return null;\n\treturn row.join(FS);\n}\n\nfunction sheet_to_csv(sheet/*:Worksheet*/, opts/*:?Sheet2CSVOpts*/)/*:string*/ {\n\tvar out/*:Array*/ = [];\n\tvar o = opts == null ? {} : opts;\n\tif(sheet == null || sheet[\"!ref\"] == null) return \"\";\n\tvar r = safe_decode_range(sheet[\"!ref\"]);\n\tvar FS = o.FS !== undefined ? o.FS : \",\", fs = FS.charCodeAt(0);\n\tvar RS = o.RS !== undefined ? o.RS : \"\\n\", rs = RS.charCodeAt(0);\n\tvar endregex = new RegExp((FS==\"|\" ? \"\\\\|\" : FS)+\"+$\");\n\tvar row = \"\", cols/*:Array*/ = [];\n\to.dense = Array.isArray(sheet);\n\tvar colinfo/*:Array*/ = o.skipHidden && sheet[\"!cols\"] || [];\n\tvar rowinfo/*:Array*/ = o.skipHidden && sheet[\"!rows\"] || [];\n\tfor(var C = r.s.c; C <= r.e.c; ++C) if (!((colinfo[C]||{}).hidden)) cols[C] = encode_col(C);\n\tvar w = 0;\n\tfor(var R = r.s.r; R <= r.e.r; ++R) {\n\t\tif ((rowinfo[R]||{}).hidden) continue;\n\t\trow = make_csv_row(sheet, r, R, cols, fs, rs, FS, o);\n\t\tif(row == null) { continue; }\n\t\tif(o.strip) row = row.replace(endregex,\"\");\n\t\tif(row || (o.blankrows !== false)) out.push((w++ ? RS : \"\") + row);\n\t}\n\tdelete o.dense;\n\treturn out.join(\"\");\n}\n\nfunction sheet_to_txt(sheet/*:Worksheet*/, opts/*:?Sheet2CSVOpts*/) {\n\tif(!opts) opts = {}; opts.FS = \"\\t\"; opts.RS = \"\\n\";\n\tvar s = sheet_to_csv(sheet, opts);\n\tif(typeof $cptable == 'undefined' || opts.type == 'string') return s;\n\tvar o = $cptable.utils.encode(1200, s, 'str');\n\treturn String.fromCharCode(255) + String.fromCharCode(254) + o;\n}\n\nfunction sheet_to_formulae(sheet/*:Worksheet*/)/*:Array*/ {\n\tvar y = \"\", x, val=\"\";\n\tif(sheet == null || sheet[\"!ref\"] == null) return [];\n\tvar r = safe_decode_range(sheet['!ref']), rr = \"\", cols/*:Array*/ = [], C;\n\tvar cmds/*:Array*/ = [];\n\tvar dense = Array.isArray(sheet);\n\tfor(C = r.s.c; C <= r.e.c; ++C) cols[C] = encode_col(C);\n\tfor(var R = r.s.r; R <= r.e.r; ++R) {\n\t\trr = encode_row(R);\n\t\tfor(C = r.s.c; C <= r.e.c; ++C) {\n\t\t\ty = cols[C] + rr;\n\t\t\tx = dense ? (sheet[R]||[])[C] : sheet[y];\n\t\t\tval = \"\";\n\t\t\tif(x === undefined) continue;\n\t\t\telse if(x.F != null) {\n\t\t\t\ty = x.F;\n\t\t\t\tif(!x.f) continue;\n\t\t\t\tval = x.f;\n\t\t\t\tif(y.indexOf(\":\") == -1) y = y + \":\" + y;\n\t\t\t}\n\t\t\tif(x.f != null) val = x.f;\n\t\t\telse if(x.t == 'z') continue;\n\t\t\telse if(x.t == 'n' && x.v != null) val = \"\" + x.v;\n\t\t\telse if(x.t == 'b') val = x.v ? \"TRUE\" : \"FALSE\";\n\t\t\telse if(x.w !== undefined) val = \"'\" + x.w;\n\t\t\telse if(x.v === undefined) continue;\n\t\t\telse if(x.t == 's') val = \"'\" + x.v;\n\t\t\telse val = \"\"+x.v;\n\t\t\tcmds[cmds.length] = y + \"=\" + val;\n\t\t}\n\t}\n\treturn cmds;\n}\n\nfunction sheet_add_json(_ws/*:?Worksheet*/, js/*:Array*/, opts)/*:Worksheet*/ {\n\tvar o = opts || {};\n\tvar offset = +!o.skipHeader;\n\tvar ws/*:Worksheet*/ = _ws || ({}/*:any*/);\n\tvar _R = 0, _C = 0;\n\tif(ws && o.origin != null) {\n\t\tif(typeof o.origin == 'number') _R = o.origin;\n\t\telse {\n\t\t\tvar _origin/*:CellAddress*/ = typeof o.origin == \"string\" ? decode_cell(o.origin) : o.origin;\n\t\t\t_R = _origin.r; _C = _origin.c;\n\t\t}\n\t}\n\tvar cell/*:Cell*/;\n\tvar range/*:Range*/ = ({s: {c:0, r:0}, e: {c:_C, r:_R + js.length - 1 + offset}}/*:any*/);\n\tif(ws['!ref']) {\n\t\tvar _range = safe_decode_range(ws['!ref']);\n\t\trange.e.c = Math.max(range.e.c, _range.e.c);\n\t\trange.e.r = Math.max(range.e.r, _range.e.r);\n\t\tif(_R == -1) { _R = _range.e.r + 1; range.e.r = _R + js.length - 1 + offset; }\n\t} else {\n\t\tif(_R == -1) { _R = 0; range.e.r = js.length - 1 + offset; }\n\t}\n\tvar hdr/*:Array*/ = o.header || [], C = 0;\n\n\tjs.forEach(function (JS, R/*:number*/) {\n\t\tkeys(JS).forEach(function(k) {\n\t\t\tif((C=hdr.indexOf(k)) == -1) hdr[C=hdr.length] = k;\n\t\t\tvar v = JS[k];\n\t\t\tvar t = 'z';\n\t\t\tvar z = \"\";\n\t\t\tvar ref = encode_cell({c:_C + C,r:_R + R + offset});\n\t\t\tcell = ws_get_cell_stub(ws, ref);\n\t\t\tif(v && typeof v === 'object' && !(v instanceof Date)){\n\t\t\t\tws[ref] = v;\n\t\t\t} else {\n\t\t\t\tif(typeof v == 'number') t = 'n';\n\t\t\t\telse if(typeof v == 'boolean') t = 'b';\n\t\t\t\telse if(typeof v == 'string') t = 's';\n\t\t\t\telse if(v instanceof Date) {\n\t\t\t\t\tt = 'd';\n\t\t\t\t\tif(!o.cellDates) { t = 'n'; v = datenum(v); }\n\t\t\t\t\tz = (o.dateNF || table_fmt[14]);\n\t\t\t\t}\n\t\t\t\telse if(v === null && o.nullError) { t = 'e'; v = 0; }\n\t\t\t\tif(!cell) ws[ref] = cell = ({t:t, v:v}/*:any*/);\n\t\t\t\telse {\n\t\t\t\t\tcell.t = t; cell.v = v;\n\t\t\t\t\tdelete cell.w; delete cell.R;\n\t\t\t\t\tif(z) cell.z = z;\n\t\t\t\t}\n\t\t\t\tif(z) cell.z = z;\n\t\t\t}\n\t\t});\n\t});\n\trange.e.c = Math.max(range.e.c, _C + hdr.length - 1);\n\tvar __R = encode_row(_R);\n\tif(offset) for(C = 0; C < hdr.length; ++C) ws[encode_col(C + _C) + __R] = {t:'s', v:hdr[C]};\n\tws['!ref'] = encode_range(range);\n\treturn ws;\n}\nfunction json_to_sheet(js/*:Array*/, opts)/*:Worksheet*/ { return sheet_add_json(null, js, opts); }\n\n/* get cell, creating a stub if necessary */\nfunction ws_get_cell_stub(ws/*:Worksheet*/, R, C/*:?number*/)/*:Cell*/ {\n\t/* A1 cell address */\n\tif(typeof R == \"string\") {\n\t\t/* dense */\n\t\tif(Array.isArray(ws)) {\n\t\t\tvar RC = decode_cell(R);\n\t\t\tif(!ws[RC.r]) ws[RC.r] = [];\n\t\t\treturn ws[RC.r][RC.c] || (ws[RC.r][RC.c] = {t:'z'});\n\t\t}\n\t\treturn ws[R] || (ws[R] = {t:'z'});\n\t}\n\t/* cell address object */\n\tif(typeof R != \"number\") return ws_get_cell_stub(ws, encode_cell(R));\n\t/* R and C are 0-based indices */\n\treturn ws_get_cell_stub(ws, encode_cell({r:R,c:C||0}));\n}\n\n/* find sheet index for given name / validate index */\nfunction wb_sheet_idx(wb/*:Workbook*/, sh/*:number|string*/) {\n\tif(typeof sh == \"number\") {\n\t\tif(sh >= 0 && wb.SheetNames.length > sh) return sh;\n\t\tthrow new Error(\"Cannot find sheet # \" + sh);\n\t} else if(typeof sh == \"string\") {\n\t\tvar idx = wb.SheetNames.indexOf(sh);\n\t\tif(idx > -1) return idx;\n\t\tthrow new Error(\"Cannot find sheet name |\" + sh + \"|\");\n\t} else throw new Error(\"Cannot find sheet |\" + sh + \"|\");\n}\n\n/* simple blank workbook object */\nfunction book_new()/*:Workbook*/ {\n\treturn { SheetNames: [], Sheets: {} };\n}\n\n/* add a worksheet to the end of a given workbook */\nfunction book_append_sheet(wb/*:Workbook*/, ws/*:Worksheet*/, name/*:?string*/, roll/*:?boolean*/)/*:string*/ {\n\tvar i = 1;\n\tif(!name) for(; i <= 0xFFFF; ++i, name = undefined) if(wb.SheetNames.indexOf(name = \"Sheet\" + i) == -1) break;\n\tif(!name || wb.SheetNames.length >= 0xFFFF) throw new Error(\"Too many worksheets\");\n\tif(roll && wb.SheetNames.indexOf(name) >= 0) {\n\t\tvar m = name.match(/(^.*?)(\\d+)$/);\n\t\ti = m && +m[2] || 0;\n\t\tvar root = m && m[1] || name;\n\t\tfor(++i; i <= 0xFFFF; ++i) if(wb.SheetNames.indexOf(name = root + i) == -1) break;\n\t}\n\tcheck_ws_name(name);\n\tif(wb.SheetNames.indexOf(name) >= 0) throw new Error(\"Worksheet with name |\" + name + \"| already exists!\");\n\n\twb.SheetNames.push(name);\n\twb.Sheets[name] = ws;\n\treturn name;\n}\n\n/* set sheet visibility (visible/hidden/very hidden) */\nfunction book_set_sheet_visibility(wb/*:Workbook*/, sh/*:number|string*/, vis/*:number*/) {\n\tif(!wb.Workbook) wb.Workbook = {};\n\tif(!wb.Workbook.Sheets) wb.Workbook.Sheets = [];\n\n\tvar idx = wb_sheet_idx(wb, sh);\n\t// $FlowIgnore\n\tif(!wb.Workbook.Sheets[idx]) wb.Workbook.Sheets[idx] = {};\n\n\tswitch(vis) {\n\t\tcase 0: case 1: case 2: break;\n\t\tdefault: throw new Error(\"Bad sheet visibility setting \" + vis);\n\t}\n\t// $FlowIgnore\n\twb.Workbook.Sheets[idx].Hidden = vis;\n}\n\n/* set number format */\nfunction cell_set_number_format(cell/*:Cell*/, fmt/*:string|number*/) {\n\tcell.z = fmt;\n\treturn cell;\n}\n\n/* set cell hyperlink */\nfunction cell_set_hyperlink(cell/*:Cell*/, target/*:string*/, tooltip/*:?string*/) {\n\tif(!target) {\n\t\tdelete cell.l;\n\t} else {\n\t\tcell.l = ({ Target: target }/*:Hyperlink*/);\n\t\tif(tooltip) cell.l.Tooltip = tooltip;\n\t}\n\treturn cell;\n}\nfunction cell_set_internal_link(cell/*:Cell*/, range/*:string*/, tooltip/*:?string*/) { return cell_set_hyperlink(cell, \"#\" + range, tooltip); }\n\n/* add to cell comments */\nfunction cell_add_comment(cell/*:Cell*/, text/*:string*/, author/*:?string*/) {\n\tif(!cell.c) cell.c = [];\n\tcell.c.push({t:text, a:author||\"SheetJS\"});\n}\n\n/* set array formula and flush related cells */\nfunction sheet_set_array_formula(ws/*:Worksheet*/, range, formula/*:string*/, dynamic/*:boolean*/) {\n\tvar rng = typeof range != \"string\" ? range : safe_decode_range(range);\n\tvar rngstr = typeof range == \"string\" ? range : encode_range(range);\n\tfor(var R = rng.s.r; R <= rng.e.r; ++R) for(var C = rng.s.c; C <= rng.e.c; ++C) {\n\t\tvar cell = ws_get_cell_stub(ws, R, C);\n\t\tcell.t = 'n';\n\t\tcell.F = rngstr;\n\t\tdelete cell.v;\n\t\tif(R == rng.s.r && C == rng.s.c) {\n\t\t\tcell.f = formula;\n\t\t\tif(dynamic) cell.D = true;\n\t\t}\n\t}\n\treturn ws;\n}\n\nvar utils/*:any*/ = {\n\tencode_col: encode_col,\n\tencode_row: encode_row,\n\tencode_cell: encode_cell,\n\tencode_range: encode_range,\n\tdecode_col: decode_col,\n\tdecode_row: decode_row,\n\tsplit_cell: split_cell,\n\tdecode_cell: decode_cell,\n\tdecode_range: decode_range,\n\tformat_cell: format_cell,\n\tsheet_add_aoa: sheet_add_aoa,\n\tsheet_add_json: sheet_add_json,\n\tsheet_add_dom: sheet_add_dom,\n\taoa_to_sheet: aoa_to_sheet,\n\tjson_to_sheet: json_to_sheet,\n\ttable_to_sheet: parse_dom_table,\n\ttable_to_book: table_to_book,\n\tsheet_to_csv: sheet_to_csv,\n\tsheet_to_txt: sheet_to_txt,\n\tsheet_to_json: sheet_to_json,\n\tsheet_to_html: sheet_to_html,\n\tsheet_to_formulae: sheet_to_formulae,\n\tsheet_to_row_object_array: sheet_to_json,\n\tsheet_get_cell: ws_get_cell_stub,\n\tbook_new: book_new,\n\tbook_append_sheet: book_append_sheet,\n\tbook_set_sheet_visibility: book_set_sheet_visibility,\n\tcell_set_number_format: cell_set_number_format,\n\tcell_set_hyperlink: cell_set_hyperlink,\n\tcell_set_internal_link: cell_set_internal_link,\n\tcell_add_comment: cell_add_comment,\n\tsheet_set_array_formula: sheet_set_array_formula,\n\tconsts: {\n\t\tSHEET_VISIBLE: 0,\n\t\tSHEET_HIDDEN: 1,\n\t\tSHEET_VERY_HIDDEN: 2\n\t}\n};\n\nvar _Readable;\nfunction set_readable(R) { _Readable = R; }\n\nfunction write_csv_stream(sheet/*:Worksheet*/, opts/*:?Sheet2CSVOpts*/) {\n\tvar stream = _Readable();\n\tvar o = opts == null ? {} : opts;\n\tif(sheet == null || sheet[\"!ref\"] == null) { stream.push(null); return stream; }\n\tvar r = safe_decode_range(sheet[\"!ref\"]);\n\tvar FS = o.FS !== undefined ? o.FS : \",\", fs = FS.charCodeAt(0);\n\tvar RS = o.RS !== undefined ? o.RS : \"\\n\", rs = RS.charCodeAt(0);\n\tvar endregex = new RegExp((FS==\"|\" ? \"\\\\|\" : FS)+\"+$\");\n\tvar row/*:?string*/ = \"\", cols/*:Array*/ = [];\n\to.dense = Array.isArray(sheet);\n\tvar colinfo/*:Array*/ = o.skipHidden && sheet[\"!cols\"] || [];\n\tvar rowinfo/*:Array*/ = o.skipHidden && sheet[\"!rows\"] || [];\n\tfor(var C = r.s.c; C <= r.e.c; ++C) if (!((colinfo[C]||{}).hidden)) cols[C] = encode_col(C);\n\tvar R = r.s.r;\n\tvar BOM = false, w = 0;\n\tstream._read = function() {\n\t\tif(!BOM) { BOM = true; return stream.push(\"\\uFEFF\"); }\n\t\twhile(R <= r.e.r) {\n\t\t\t++R;\n\t\t\tif ((rowinfo[R-1]||{}).hidden) continue;\n\t\t\trow = make_csv_row(sheet, r, R-1, cols, fs, rs, FS, o);\n\t\t\tif(row != null) {\n\t\t\t\tif(o.strip) row = row.replace(endregex,\"\");\n\t\t\t\tif(row || (o.blankrows !== false)) return stream.push((w++ ? RS : \"\") + row);\n\t\t\t}\n\t\t}\n\t\treturn stream.push(null);\n\t};\n\treturn stream;\n}\n\nfunction write_html_stream(ws/*:Worksheet*/, opts/*:?Sheet2HTMLOpts*/) {\n\tvar stream = _Readable();\n\n\tvar o = opts || {};\n\tvar header = o.header != null ? o.header : HTML_BEGIN;\n\tvar footer = o.footer != null ? o.footer : HTML_END;\n\tstream.push(header);\n\tvar r = decode_range(ws['!ref']);\n\to.dense = Array.isArray(ws);\n\tstream.push(make_html_preamble(ws, r, o));\n\tvar R = r.s.r;\n\tvar end = false;\n\tstream._read = function() {\n\t\tif(R > r.e.r) {\n\t\t\tif(!end) { end = true; stream.push(\"\" + footer); }\n\t\t\treturn stream.push(null);\n\t\t}\n\t\twhile(R <= r.e.r) {\n\t\t\tstream.push(make_html_row(ws, r, R, o));\n\t\t\t++R;\n\t\t\tbreak;\n\t\t}\n\t};\n\treturn stream;\n}\n\nfunction write_json_stream(sheet/*:Worksheet*/, opts/*:?Sheet2CSVOpts*/) {\n\tvar stream = _Readable({objectMode:true});\n\n\tif(sheet == null || sheet[\"!ref\"] == null) { stream.push(null); return stream; }\n\tvar val = {t:'n',v:0}, header = 0, offset = 1, hdr/*:Array*/ = [], v=0, vv=\"\";\n\tvar r = {s:{r:0,c:0},e:{r:0,c:0}};\n\tvar o = opts || {};\n\tvar range = o.range != null ? o.range : sheet[\"!ref\"];\n\tif(o.header === 1) header = 1;\n\telse if(o.header === \"A\") header = 2;\n\telse if(Array.isArray(o.header)) header = 3;\n\tswitch(typeof range) {\n\t\tcase 'string': r = safe_decode_range(range); break;\n\t\tcase 'number': r = safe_decode_range(sheet[\"!ref\"]); r.s.r = range; break;\n\t\tdefault: r = range;\n\t}\n\tif(header > 0) offset = 0;\n\tvar rr = encode_row(r.s.r);\n\tvar cols/*:Array*/ = [];\n\tvar counter = 0;\n\tvar dense = Array.isArray(sheet);\n\tvar R = r.s.r, C = 0;\n\tvar header_cnt = {};\n\tif(dense && !sheet[R]) sheet[R] = [];\n\tvar colinfo/*:Array*/ = o.skipHidden && sheet[\"!cols\"] || [];\n\tvar rowinfo/*:Array*/ = o.skipHidden && sheet[\"!rows\"] || [];\n\tfor(C = r.s.c; C <= r.e.c; ++C) {\n\t\tif(((colinfo[C]||{}).hidden)) continue;\n\t\tcols[C] = encode_col(C);\n\t\tval = dense ? sheet[R][C] : sheet[cols[C] + rr];\n\t\tswitch(header) {\n\t\t\tcase 1: hdr[C] = C - r.s.c; break;\n\t\t\tcase 2: hdr[C] = cols[C]; break;\n\t\t\tcase 3: hdr[C] = o.header[C - r.s.c]; break;\n\t\t\tdefault:\n\t\t\t\tif(val == null) val = {w: \"__EMPTY\", t: \"s\"};\n\t\t\t\tvv = v = format_cell(val, null, o);\n\t\t\t\tcounter = header_cnt[v] || 0;\n\t\t\t\tif(!counter) header_cnt[v] = 1;\n\t\t\t\telse {\n\t\t\t\t\tdo { vv = v + \"_\" + (counter++); } while(header_cnt[vv]); header_cnt[v] = counter;\n\t\t\t\t\theader_cnt[vv] = 1;\n\t\t\t\t}\n\t\t\t\thdr[C] = vv;\n\t\t}\n\t}\n\tR = r.s.r + offset;\n\tstream._read = function() {\n\t\twhile(R <= r.e.r) {\n\t\t\tif ((rowinfo[R-1]||{}).hidden) continue;\n\t\t\tvar row = make_json_row(sheet, r, R, cols, header, hdr, dense, o);\n\t\t\t++R;\n\t\t\tif((row.isempty === false) || (header === 1 ? o.blankrows !== false : !!o.blankrows)) {\n\t\t\t\tstream.push(row.row);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\treturn stream.push(null);\n\t};\n\treturn stream;\n}\n\nvar __stream = {\n\tto_json: write_json_stream,\n\tto_html: write_html_stream,\n\tto_csv: write_csv_stream,\n set_readable: set_readable\n};\nexport const version = XLSX.version;\nexport {\n\tparse_xlscfb,\n\tparse_zip,\n\treadSync as read,\n\treadFileSync as readFile,\n\treadFileSync,\n\twriteSync as write,\n\twriteFileSync as writeFile,\n\twriteFileSync,\n\twriteFileAsync,\n\twriteSyncXLSX as writeXLSX,\n\twriteFileSyncXLSX as writeFileXLSX,\n\tutils,\n\t__stream as stream,\n\tSSF,\n\tCFB\n};\n","import React from 'react'\nimport {Button} from 'react-bootstrap'\nimport * as FileSaver from 'file-saver'\nimport * as XLSX from 'xlsx'\n\nfunction ExportCSV(props: {csvData: any[]; fileName: string}) {\n const fileType = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=UTF-8'\n const fileExtension = '.xlsx'\n\n const exportToCSV = (csvData: any, fileName: string) => {\n const ws = XLSX.utils.json_to_sheet(csvData)\n const wb = {Sheets: {data: ws}, SheetNames: ['data']}\n const excelBuffer = XLSX.write(wb, {bookType: 'xlsx', type: 'array'})\n const data = new Blob([excelBuffer], {type: fileType})\n FileSaver.saveAs(data, fileName + fileExtension)\n }\n\n return (\n exportToCSV(props.csvData, props.fileName)}\n >\n Excel Aktar\n \n )\n}\n\nexport default ExportCSV\n","import clsx from 'clsx'\nimport React from 'react'\n\nfunction TextWithClipBoard(props: {text: string; color: string}) {\n return (\n
\n {props.text}\n {\n navigator.clipboard.writeText(props.text)\n }}\n >\n \n
\n
\n )\n}\n\nexport default TextWithClipBoard\n","import './table_fixed_header.css'\nimport _ from 'lodash'\nimport moment from 'moment'\nimport BootstrapTable, {ColumnDescription} from 'react-bootstrap-table-next'\nimport paginationFactory, {\n PaginationListStandalone,\n PaginationProvider,\n PaginationTotalStandalone,\n SizePerPageDropdownStandalone,\n} from 'react-bootstrap-table2-paginator'\nimport 'react-bootstrap-table-next/dist/react-bootstrap-table2.min.css'\nimport 'react-bootstrap-table2-paginator/dist/react-bootstrap-table2-paginator.min.css'\nimport clsx from 'clsx'\nimport {KTSVG} from '../../../../_metronic/helpers'\nimport {AdminPanelCompanyDTO} from '../../../api/data-contracts'\nimport CompanyStateProgressBar from './CompanyStateProgressBar'\nimport ExportCSV from '../common/ExportCSV'\nimport {getUserState} from '../../../redux/userSlice'\nimport {useSelector} from 'react-redux'\nimport {\n CompanySuspensionStatusEnum,\n UserTypeAuthorizationsEnum,\n UserTypeEnum,\n} from '../../../apiClient/enums'\nimport TextWithClipBoard from '../../other/TextWithClipBoard'\nimport {Link} from 'react-router-dom'\nimport AuthorizationPage from '../../../pages/admin/Settings/AuthorizationPage'\nimport AuthorizedComponent from '../../common/auth/AuthorizedComponent'\n\nfunction CompaniesTable(props: {companies: AdminPanelCompanyDTO[]}) {\n const role = useSelector(getUserState).data?.roleId as UserTypeEnum\n\n const columns: ColumnDescription[] = [\n {\n dataField: 'shortName',\n text: 'Firma Bilgileri',\n sort: true,\n headerStyle: {width: '35%'},\n formatter: (cell: any, row: AdminPanelCompanyDTO, rowIndex: number, colIndex: number) => (\n
\n
\n
{row.shortName}
\n\n
\n
\n
\n {'Şirket Tipi'} {':'}\n {row.type}\n
\n
\n\n {(row.assignedFinancialAdvisorId ?? 0) > 0 && (\n
\n
\n {'M. Müşavir'} {':'}\n {row.assignedFinancialAdvisor}\n
\n
\n )}\n\n \n
\n
\n {'Referans'} {':'}\n {row.referenceName}\n
\n
\n \n\n
\n
\n {'Vergi No'} {':'}\n \n {row.taxNumber && (\n \n )}\n \n
\n
\n\n {/*
\n
\n {'Yeni Şirket'} {':'}\n {row.isNewCompany ? (\n \n ) : (\n \n )}\n
\n
*/}\n
\n
\n {(row.suspensionStatusId ?? 0) > 0 && (\n
\n
\n {'Fesih Durum'} {':'}\n \n {row.suspensionStatus}\n \n
\n
\n )}\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n ),\n },\n {\n dataField: 'firstName',\n text: 'Kişi Bilgileri',\n sort: true,\n headerClasses: 'mw-500px',\n classes: 'mw-500px',\n width: 500,\n headerStyle: {width: '25%'},\n formatter: (cell: any, m: AdminPanelCompanyDTO, rowIndex: number, colIndex: number) => (\n <>\n
\n {m.firstName} {m.lastName}{' '}\n {m.isUserActive !== true && (\n \n )}\n
\n\n
\n
\n
\n {'Kayıt Tarihi'} {':'}\n \n {moment(m.createTime).format('DD.MM.yyyy HH:mm')}\n \n
\n
\n
\n
\n
\n
\n {'Email'} {':'}\n \n {m.mailAddress && (\n \n )}\n \n
\n
\n
\n
\n
\n
\n {'Telefon'} {':'}\n \n {m.phoneNumber && (\n \n )}\n \n
\n
\n
\n {m.suspendTime && (\n
\n
\n
\n {'Fesih Tarihi'} {':'}\n \n {moment(m.suspendTime).format('DD.MM.yyyy HH:mm')}\n \n
\n
\n
\n )}\n \n ),\n },\n {\n dataField: 'totalPaymentAmount',\n text: 'Ödeme',\n sort: true,\n headerStyle: {width: '30%'},\n headerClasses: '',\n formatter: (cell: any, m: AdminPanelCompanyDTO, rowIndex: number, colIndex: number) => (\n <>\n
\n
Toplam
\n
Gelecek
\n
Borç
\n
\n
\n
\n
Toplam
\n
\n {m.totalPaymentAmount?.toFixed(0)} ₺\n
\n
\n {m.totalDuePaymentAmount?.toFixed(0)} ₺\n
\n
\n {m.totalDept?.toFixed(0)} ₺\n
\n
\n {(m.totalPaymentAmountDetails?.length ?? 0) > 1 &&\n m.totalPaymentAmountDetails?.map((d) => {\n return (\n
\n
\n
\n
{d.name}
\n
\n {d.amount?.toFixed(0)} ₺\n
\n
\n {m.totalDuePaymentAmountDetails\n ?.find((f) => f.name === d.name)\n ?.amount?.toFixed(0)}{' '}\n ₺\n
\n
\n {m.totalDeptDetails?.find((f) => f.name === d.name)?.amount?.toFixed(0)} ₺\n
\n
\n
\n )\n })}\n \n ),\n },\n {\n dataField: '',\n text: 'Detay',\n sort: true,\n headerStyle: {width: '5%'},\n formatter: (cell: any, m: AdminPanelCompanyDTO, rowIndex: number, colIndex: number) => (\n <>\n
\n \n \n \n
\n \n ),\n },\n ]\n\n function getExcelData() {\n if (role === UserTypeEnum.Admin) {\n return getExcelDataForAdmin()\n } else if (role === UserTypeEnum.Mali_Müşavir) {\n return getExcelDataForFinancialAdvisor()\n } else {\n return getExcelDataForFinancialAdvisor()\n }\n }\n\n function getExcelDataForAdmin() {\n return (_.orderBy(props.companies, (o) => o.createTime, 'desc') ?? []).map((m) => {\n return {\n 'Şirket Adı': m.shortName,\n 'Şirket Tipi': m.type,\n 'Kullanıcı Adı': m.firstName,\n 'Kullanıcı Soyadı': m.lastName,\n Telefon: m.phoneNumber,\n Email: m.mailAddress,\n 'Kayıt Tarihi': m.createTime,\n 'Fesih Tarihi': m.suspendTime,\n 'Operasyon Adres Tipi': m.operationAddressType,\n 'Şirket Durumu': m.descriptionForAdvisor,\n 'Toplam Ödeme': m.totalPaymentAmount,\n 'Toplam Gelecek Ödeme': m.totalDuePaymentAmount,\n 'Toplam Borç': m.totalDept,\n 'Aktif Mi': m.isCompanyActive,\n 'Mali Müşavir': m.assignedFinancialAdvisor,\n Adres: m.address,\n Referans: m.referenceName,\n ...m.totalPaymentAmountDetails?.reduce(\n (a, v) => ({...a, [v.name + ' Ödeme']: v.amount?.toFixed(0)}),\n {}\n ),\n ...m.totalDuePaymentAmountDetails?.reduce(\n (a, v) => ({...a, [v.name + ' Gelecek Ödeme']: v.amount?.toFixed(0)}),\n {}\n ),\n ...m.totalDeptDetails?.reduce(\n (a, v) => ({...a, [v.name + ' Borç']: v.amount?.toFixed(0)}),\n {}\n ),\n ...m.averageRecurringPaymentDetails?.reduce(\n (a, v) => ({...a, [v.name + ' Aylık Ödeme']: v.amount?.toFixed(0)}),\n {}\n ),\n }\n })\n }\n\n function getExcelDataForFinancialAdvisor() {\n return (_.orderBy(props.companies, (o) => o.createTime, 'desc') ?? []).map((m) => {\n return {\n 'Şirket Adı': m.shortName,\n 'Şirket Tipi': m.type,\n 'Kullanıcı Adı': m.firstName,\n 'Kullanıcı Soyadı': m.lastName,\n Telefon: m.phoneNumber,\n Email: m.mailAddress,\n 'Kayıt Tarihi': m.createTime,\n 'Fesih Tarihi': m.suspendTime,\n 'Operasyon Adres Tipi': m.operationAddressType,\n 'Şirket Durumu': m.descriptionForAdvisor,\n 'Toplam Ödeme': m.totalPaymentAmount,\n 'Toplam Gelecek Ödeme': m.totalDuePaymentAmount,\n 'Toplam Borç': m.totalDept,\n 'Aktif Mi': m.isCompanyActive,\n ...m.totalPaymentAmountDetails?.reduce(\n (a, v) => ({...a, [v.name + ' Ödeme']: v.amount?.toFixed(0)}),\n {}\n ),\n ...m.totalDuePaymentAmountDetails?.reduce(\n (a, v) => ({...a, [v.name + ' Gelecek Ödeme']: v.amount?.toFixed(0)}),\n {}\n ),\n ...m.totalDeptDetails?.reduce(\n (a, v) => ({...a, [v.name + ' Borç']: v.amount?.toFixed(0)}),\n {}\n ),\n ...m.averageRecurringPaymentDetails?.reduce(\n (a, v) => ({...a, [v.name + ' Aylık Ödeme']: v.amount?.toFixed(0)}),\n {}\n ),\n }\n })\n }\n const rowClasses = (row: AdminPanelCompanyDTO, rowIndex: number): string => {\n return clsx(\n {\n 'bg-danger bg-opacity-15': !row.isCompanyActive,\n 'bg-warning bg-opacity-15':\n row.isCompanyActive &&\n row.suspensionStatusId ==\n CompanySuspensionStatusEnum.Şirketi_Kapatmak_İstiyor___Tasfiye_Başladı,\n },\n 'border-dark'\n )\n }\n\n return (\n <>\n {(props.companies?.length ?? 0) > 0 && (\n <>\n (\n \n Toplam {size} firmadan {from} - {to} arası gösteriliyor{' '}\n \n \n ),\n })}\n >\n {({paginationProps, paginationTableProps}) => (\n <>\n \n \n \n\n
\n o.createTime, 'desc') ?? []}\n columns={columns}\n classes='table table-hover table-responsive table-row-bordered border-dark table-rounded gy-7 gx-5'\n headerClasses='table-header fw-bolder fs-5'\n />\n
\n \n )}\n \n \n )}\n \n )\n}\n\nexport default CompaniesTable\n","import { u as useStateManager } from './useStateManager-7e1e8489.esm.js';\nexport { u as useStateManager } from './useStateManager-7e1e8489.esm.js';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport * as React from 'react';\nimport { forwardRef, useMemo } from 'react';\nimport { S as Select } from './Select-49a62830.esm.js';\nexport { c as createFilter, d as defaultTheme, m as mergeStyles } from './Select-49a62830.esm.js';\nimport { CacheProvider } from '@emotion/react';\nimport createCache from '@emotion/cache';\nexport { c as components } from './index-a301f526.esm.js';\nimport '@babel/runtime/helpers/objectSpread2';\nimport '@babel/runtime/helpers/slicedToArray';\nimport '@babel/runtime/helpers/objectWithoutProperties';\nimport '@babel/runtime/helpers/classCallCheck';\nimport '@babel/runtime/helpers/createClass';\nimport '@babel/runtime/helpers/inherits';\nimport '@babel/runtime/helpers/createSuper';\nimport '@babel/runtime/helpers/toConsumableArray';\nimport 'memoize-one';\nimport '@babel/runtime/helpers/typeof';\nimport '@babel/runtime/helpers/taggedTemplateLiteral';\nimport '@babel/runtime/helpers/defineProperty';\nimport 'react-dom';\nimport '@floating-ui/dom';\nimport 'use-isomorphic-layout-effect';\n\nvar StateManagedSelect = /*#__PURE__*/forwardRef(function (props, ref) {\n var baseSelectProps = useStateManager(props);\n return /*#__PURE__*/React.createElement(Select, _extends({\n ref: ref\n }, baseSelectProps));\n});\nvar StateManagedSelect$1 = StateManagedSelect;\n\nvar NonceProvider = (function (_ref) {\n var nonce = _ref.nonce,\n children = _ref.children,\n cacheKey = _ref.cacheKey;\n var emotionCache = useMemo(function () {\n return createCache({\n key: cacheKey,\n nonce: nonce\n });\n }, [cacheKey, nonce]);\n return /*#__PURE__*/React.createElement(CacheProvider, {\n value: emotionCache\n }, children);\n});\n\nexport { NonceProvider, StateManagedSelect$1 as default };\n","import {Field} from 'formik'\nimport moment from 'moment'\nimport React from 'react'\n\nfunction DateRangeSelectorHorizontal(props: {\n setFieldValue: (field: string, value: any, shouldValidate?: boolean) => void\n startKey: string\n finishKey: string\n}) {\n return (\n <>\n
\n {\n if (event.target.value == 0) {\n props.setFieldValue(\n props.startKey,\n moment(new Date()).startOf('day').format('yyyy-MM-DD')\n )\n props.setFieldValue(\n props.finishKey,\n moment(new Date()).add(1, 'day').startOf('day').format('yyyy-MM-DD')\n )\n } else if (event.target.value == 1) {\n props.setFieldValue(\n props.startKey,\n moment(new Date()).startOf('week').format('yyyy-MM-DD')\n )\n props.setFieldValue(\n props.finishKey,\n moment(new Date()).startOf('week').add(1, 'week').format('yyyy-MM-DD')\n )\n } else if (event.target.value == 2) {\n props.setFieldValue(\n props.startKey,\n moment(new Date()).startOf('month').format('yyyy-MM-DD')\n )\n props.setFieldValue(\n props.finishKey,\n moment(new Date()).startOf('month').add(1, 'month').format('yyyy-MM-DD')\n )\n } else if (event.target.value == 3) {\n props.setFieldValue(\n props.startKey,\n moment(new Date()).startOf('year').format('yyyy-MM-DD')\n )\n props.setFieldValue(\n props.finishKey,\n moment(new Date()).endOf('year').format('yyyy-MM-DD')\n )\n } else if (event.target.value == 4) {\n props.setFieldValue(\n props.startKey,\n moment(new Date()).add(-1, 'month').startOf('month').format('yyyy-MM-DD')\n )\n props.setFieldValue(\n props.finishKey,\n moment(new Date()).startOf('month').format('yyyy-MM-DD')\n )\n } else if (event.target.value == 5) {\n props.setFieldValue(\n props.startKey,\n moment(new Date()).add(-10, 'year').startOf('year').format('yyyy-MM-DD')\n )\n props.setFieldValue(\n props.finishKey,\n moment(new Date()).endOf('day').format('yyyy-MM-DD')\n )\n } else {\n props.setFieldValue(\n props.startKey,\n moment(new Date())\n .startOf('year')\n .add(Number(event.target.value) - 11, 'month')\n .format('yyyy-MM-DD')\n )\n props.setFieldValue(\n props.finishKey,\n moment(new Date())\n .startOf('year')\n .add(Number(event.target.value) - 11, 'month')\n .endOf('month')\n .format('yyyy-MM-DD')\n )\n }\n }}\n >\n \n \n \n \n \n \n \n {Array.from({length: 12}, (_, i) => i + 1).map((m) => {\n return (\n \n )\n })}\n \n \n \n
\n \n )\n}\n\nexport default DateRangeSelectorHorizontal\n","import {useEffect, useMemo, useState} from 'react'\nimport {useDispatch, useSelector} from 'react-redux'\nimport {getCommonState, getRequestAsync, postRequestAsync} from '../../../redux/commonSlice'\nimport {getCompanyState} from '../../../redux/companySlice'\nimport {getUserState} from '../../../redux/userSlice'\nimport {\n AdminPanelCompaniesStartupDTO,\n AdminPanelCompaniesStartupDTOApiData,\n AdminPanelCompanyDTOIEnumerableApiData,\n GetAdminCompaniesRequest,\n} from '../../../api/data-contracts'\nimport {Api_Admin_GetCompanies, Api_Admin_GetCompaniesStartup} from '../../../apiClient/apiClient'\nimport moment from 'moment'\nimport FormikForm from '../../form/FormikForm'\nimport FormInput from '../../form/FormInput'\nimport Select from 'react-select'\nimport _, {filter} from 'lodash'\nimport DateRangeSelectorHorizontal from '../../form/dropdown/DateRangeSelectorHorizontal'\nimport {getAdminState, setCompanies} from '../../../redux/adminSlice'\nimport {KTSVG} from '../../../../_metronic/helpers'\nimport { DropdownOption } from '../../form/dropdown/CustomDropdown'\n\nfunction CompanyFilter() {\n const adminState = useSelector(getAdminState)\n\n const [startUp, setStartUp] = useState(null)\n\n const [filterDetailed, setFilterDetailed] = useState(false)\n\n const dispatch = useDispatch()\n\n const submit = async (values: GetAdminCompaniesRequest) => {\n await dispatch(\n postRequestAsync({\n postRequestFunction: Api_Admin_GetCompanies,\n body: values,\n })\n )\n .unwrap()\n .then(async function (response: AdminPanelCompanyDTOIEnumerableApiData) {\n dispatch(setCompanies(response.data))\n })\n }\n\n const initFilterValues : GetAdminCompaniesRequest = ({\n textSearch: '',\n creationDateEnd: moment(new Date()).startOf('month').add(1, 'month').format('yyyy-MM-DD'),\n creationDateStart: moment(new Date()).add(-10, 'year').startOf('month').format('yyyy-MM-DD'),\n activePassive: -1,\n assignedFinancialAdvisorUserId: undefined,\n deptAmount: undefined,\n boughtProducts: [],\n companyTypes: [],\n states: [],\n });\n\n async function loadStartup() {\n await dispatch(\n getRequestAsync({\n getRequestFunction: Api_Admin_GetCompaniesStartup,\n })\n )\n .unwrap()\n .then(async function (response: AdminPanelCompaniesStartupDTOApiData) {\n setStartUp(response.data)\n })\n\n await submit(initFilterValues)\n }\n\n useEffect(() => {\n loadStartup()\n },[])\n\n const activePassiveOptions: DropdownOption[] = [\n {\n label: 'Hepsi',\n value: '-1',\n },\n {\n label:\n 'Fesih' +\n ' (' +\n adminState?.companies?.filter((f) => f.isCompanyActive === false).length +\n ')',\n value: '0',\n },\n {\n label:\n 'Aktif' +\n ' (' +\n adminState?.companies?.filter((f) => f.isCompanyActive === true).length +\n ')',\n value: '1',\n },\n ]\n\n\n const allFinancialAdvisorItem: DropdownOption = {\n label: 'Hepsi',\n value: '0',\n }\n\n const financialAdvisorOptions =\n _.orderBy(\n startUp?.financialAdvisors?.map((m) => {\n const d: DropdownOption = {\n label:\n (m.description ?? '') +\n ' (' +\n adminState?.companies?.filter((f) => f.assignedFinancialAdvisorId == m.id).length +\n ')',\n value: m.id?.toString() ?? '0',\n }\n return d\n }),\n (o) => o.label\n ) ?? []\n\n financialAdvisorOptions.unshift(allFinancialAdvisorItem)\n\n return (\n
\n \n {(props) => {\n return (\n <>\n
\n
\n \n \n
\n\n
\n \n {\n props.setFieldValue(\n 'activePassive',\n parseInt((value as DropdownOption).value)\n )\n }}\n classNames={{\n control: (state) => 'form-select form-select-solid fs-6',\n }}\n styles={{\n control: (baseStyles, state) => ({\n ...baseStyles,\n paddingTop: '0',\n paddingBottom: '0',\n }),\n dropdownIndicator: (baseStyles, state) => ({\n ...baseStyles,\n display: 'none',\n }),\n }}\n />\n
\n\n {filterDetailed && (\n <>\n
\n \n o.progressIndex)?.map((m) => {\n const d: DropdownOption = {\n label:\n m.description +\n ' (' +\n adminState?.companies?.filter(\n (f) => f.stepDescription == m.description\n ).length +\n ')',\n value: m.applicationStepId?.toString() ?? '0',\n }\n return d\n }) ?? []\n }\n isMulti\n closeMenuOnSelect={false}\n name='states'\n onChange={(value) => {\n props.setFieldValue(\n 'states',\n (value as DropdownOption[]).map((m) => Number(m.value))\n )\n }}\n classNames={{\n control: (state) => 'form-select form-select-solid fs-6',\n }}\n styles={{\n control: (baseStyles, state) => ({\n ...baseStyles,\n paddingTop: '0',\n paddingBottom: '0',\n }),\n dropdownIndicator: (baseStyles, state) => ({\n ...baseStyles,\n display: 'none',\n }),\n }}\n />\n
\n\n
\n \n {\n const d: DropdownOption = {\n label:\n (m.description ?? '') +\n ' (' +\n adminState?.companies?.filter((f) => f.type == m.description)\n .length +\n ')',\n value: m.companyTypeId?.toString() ?? '0',\n }\n return d\n }) ?? []\n }\n isMulti\n closeMenuOnSelect={false}\n name='companyTypes'\n onChange={(value) => {\n props.setFieldValue(\n 'companyTypes',\n (value as DropdownOption[]).map((m) => Number(m.value))\n )\n }}\n classNames={{\n control: (state) => 'form-select form-select-solid fs-6',\n }}\n styles={{\n control: (baseStyles, state) => ({\n ...baseStyles,\n paddingTop: '0',\n paddingBottom: '0',\n }),\n dropdownIndicator: (baseStyles, state) => ({\n ...baseStyles,\n display: 'none',\n }),\n }}\n />\n
\n\n
\n \n {\n const d: DropdownOption = {\n label:\n (m.description ?? '') +\n ' (' +\n adminState?.companies?.filter((f) => f.suspensionStatusId == m.id)\n .length +\n ')',\n value: m.id?.toString() ?? '0',\n }\n return d\n }) ?? []\n }\n isMulti\n closeMenuOnSelect={false}\n name='suspensionStates'\n onChange={(value) => {\n props.setFieldValue(\n 'suspensionStates',\n (value as DropdownOption[]).map((m) => Number(m.value))\n )\n }}\n classNames={{\n control: (state) => 'form-select form-select-solid fs-8',\n }}\n styles={{\n control: (baseStyles, state) => ({\n ...baseStyles,\n paddingTop: '0',\n paddingBottom: '0',\n }),\n dropdownIndicator: (baseStyles, state) => ({\n ...baseStyles,\n display: 'none',\n }),\n }}\n />\n
\n\n {financialAdvisorOptions.length > 2 && (\n
\n \n
\n {\n props.setFieldValue(\n 'assignedFinancialAdvisorUserId',\n parseInt((value as DropdownOption).value)\n )\n }}\n classNames={{\n control: (state) => 'form-select form-select-solid fs-8',\n }}\n styles={{\n control: (baseStyles, state) => ({\n ...baseStyles,\n paddingTop: '0',\n paddingBottom: '0',\n }),\n dropdownIndicator: (baseStyles, state) => ({\n ...baseStyles,\n display: 'none',\n }),\n }}\n />\n
\n
\n )}\n\n
\n \n
\n\n
\n \n
\n\n
\n \n o.title)?.map((m) => {\n const d: DropdownOption = {\n label: m.title ?? '',\n value: m.id?.toString() ?? '0',\n }\n return d\n }) ?? []\n }\n isMulti\n closeMenuOnSelect={false}\n name='boughtProducts'\n onChange={(value) => {\n props.setFieldValue(\n 'boughtProducts',\n (value as DropdownOption[]).map((m) => Number(m.value))\n )\n }}\n classNames={{\n control: (state) => 'form-select form-select-solid fs-6',\n }}\n styles={{\n control: (baseStyles, state) => ({\n ...baseStyles,\n paddingTop: '0',\n paddingBottom: '0',\n }),\n dropdownIndicator: (baseStyles, state) => ({\n ...baseStyles,\n display: 'none',\n }),\n }}\n />\n
\n\n
\n {\n setFilterDetailed(false)\n }}\n className='btn btn-sm btn-link btn-color-gray-500 btn-active-color-primary me-5 mb-2'\n >\n Daha Az Filtre\n \n
\n
\n \n )}\n\n
\n {\n props.resetForm({values: initFilterValues})\n }}\n >\n Temizle\n
\n
\n\n
\n \n
\n \n {!filterDetailed && (\n
\n )}\n \n )\n }}\n \n \n )\n}\n\nexport default CompanyFilter\n","import {useSelector} from 'react-redux'\nimport {getAdminState} from '../../../redux/adminSlice'\nimport _ from 'lodash'\nimport 'react-bootstrap-table-next/dist/react-bootstrap-table2.min.css'\nimport 'react-bootstrap-table2-paginator/dist/react-bootstrap-table2-paginator.min.css'\nimport CompaniesTable from '../../../components/admin/company/CompaniesTable'\nimport {Company} from '../../../api/Company'\nimport CompanyFilter from '../../../components/admin/company/CompanyFilter'\n\nexport interface AdminCompaniesFilter {\n textFilter: string\n companyType: number\n}\n\nfunction AdminCompaniesPage() {\n const adminState = useSelector(getAdminState)\n\n return (\n
\n
\n
\n \n
\n\n
\n \n
\n
\n
\n )\n}\n\nexport default AdminCompaniesPage\n","import {useDispatch, useSelector} from 'react-redux'\nimport {postRequestAsync, setIsLoading} from '../../../redux/commonSlice'\nimport {\n BooleanApiData,\n PaymentInvoiceDTO,\n PrintInvoiceRequest,\n StringApiData,\n} from '../../../api/data-contracts'\nimport {\n Api_Admin_CancelInvoice,\n Api_Admin_GetInviocePreview,\n Api_Admin_PrintInvoice,\n} from '../../../apiClient/apiClient'\nimport {getAdminState, getPaymentInvoicesAsync} from '../../../redux/adminSlice'\nimport {KTSVG} from '../../../../_metronic/helpers'\nimport _ from 'lodash'\nimport moment from 'moment'\nimport BootstrapTable, {ColumnDescription} from 'react-bootstrap-table-next'\nimport paginationFactory, {\n PaginationListStandalone,\n PaginationProvider,\n PaginationTotalStandalone,\n SizePerPageDropdownStandalone,\n} from 'react-bootstrap-table2-paginator'\nimport BasePopup, {PopupProvides} from '../../../components/common/popup/BasePopup'\nimport clsx from 'clsx'\nimport filterFactory, {selectFilter, textFilter} from 'react-bootstrap-table2-filter'\n\nfunction PaymentInvoiceTable() {\n const dispatch = useDispatch()\n const adminState = useSelector(getAdminState)\n\n function printInvoice(guid: string) {\n const body: PrintInvoiceRequest = {\n guidId: guid,\n }\n dispatch(setIsLoading(true))\n dispatch(\n postRequestAsync({\n postRequestFunction: Api_Admin_PrintInvoice,\n body: body,\n })\n )\n .unwrap()\n .then(async function (response: BooleanApiData) {\n await dispatch(getPaymentInvoicesAsync())\n })\n }\n\n const preview = async (guid: string) => {\n const body: PrintInvoiceRequest = {\n guidId: guid,\n }\n\n dispatch(setIsLoading(true))\n await dispatch(\n postRequestAsync({\n postRequestFunction: Api_Admin_GetInviocePreview,\n body: body,\n })\n )\n .unwrap()\n .then(async (response: StringApiData) => {\n var win = window.open(response.data ?? '', '_blank')\n win?.focus()\n dispatch(setIsLoading(false))\n })\n }\n\n const columns: ColumnDescription[] = [\n {\n dataField: 'paymentId',\n text: 'E-Fatura',\n sort: true,\n headerClasses: '',\n classes: '',\n width: 500,\n headerStyle: {width: '5%'},\n formatter: (cell: any, m: PaymentInvoiceDTO, rowIndex: number, colIndex: number) => (\n <>\n
\n {m.isUbl === true ? (\n \n ) : (\n <>\n )}\n
\n \n ),\n },\n {\n dataField: 'userName',\n text: 'Kişi ve Firma',\n sort: true,\n headerClasses: 'mw-500px',\n classes: 'mw-500px',\n width: 500,\n headerStyle: {width: '20%'},\n filter: textFilter(),\n formatter: (cell: any, m: PaymentInvoiceDTO, rowIndex: number, colIndex: number) => (\n <>\n
{m.userName}
\n
{m.companyName}
\n \n ),\n },\n {\n dataField: 'stateId',\n text: 'Ödeme Durumu',\n sort: true,\n headerClasses: 'mw-500px',\n classes: 'mw-500px',\n width: 500,\n headerStyle: {width: '15%'},\n formatter: (cell: any, m: PaymentInvoiceDTO, rowIndex: number, colIndex: number) => (\n
{m.paymentState}
\n ),\n filter: selectFilter({\n options:\n _.sortBy(\n _.uniqBy(\n adminState.invoices?.map((m) => {\n return {\n value: m.stateId ?? 0,\n label: m.paymentState ?? '',\n }\n }),\n (item) => `${item.value}-${item.label}` // Ensure uniqueness by both value and label\n ),\n 'label' // Sort by the label property\n ) ?? [],\n }),\n },\n {\n dataField: 'einvoiceStateDescription',\n text: 'E-Fatura Durum',\n sort: true,\n headerClasses: 'mw-500px',\n classes: 'mw-500px',\n width: 500,\n headerStyle: {width: '10%'},\n formatter: (cell: any, m: PaymentInvoiceDTO, rowIndex: number, colIndex: number) => (\n
\n
{m.einvoiceStateDescription}
\n\n
\n {m.foribaWebServiceMessage && (m.isSuccessful ?? false) == false && (\n \n }\n >\n {(providers: PopupProvides) => {\n return <>{m.foribaWebServiceMessage}\n }}\n \n )}\n
\n
\n ),\n },\n {\n dataField: 'dueDate',\n text: 'Ödeme Tarihi',\n sort: true,\n headerClasses: 'mw-500px',\n classes: 'mw-500px',\n width: 500,\n headerStyle: {width: '10%'},\n formatter: (cell: any, m: PaymentInvoiceDTO, rowIndex: number, colIndex: number) => (\n
\n {' '}\n {moment(m.dueDate).format('DD.MM.yyyy HH:mm')}\n
\n ),\n },\n {\n dataField: 'invoiceAmount',\n text: 'Fatura',\n sort: true,\n headerClasses: 'mw-500px',\n classes: 'mw-500px',\n width: 500,\n headerStyle: {width: '5%'},\n formatter: (cell: any, m: PaymentInvoiceDTO, rowIndex: number, colIndex: number) => (\n
{Math.round(m.invoiceAmount ?? 0)} ₺
\n ),\n },\n {\n dataField: 'totalAmount',\n text: 'Toplam',\n sort: true,\n headerClasses: 'mw-500px',\n classes: 'mw-500px',\n width: 500,\n headerStyle: {width: '5%'},\n formatter: (cell: any, m: PaymentInvoiceDTO, rowIndex: number, colIndex: number) => (\n
{Math.round(m.totalAmount ?? 0)} ₺
\n ),\n },\n {\n dataField: 'preview',\n text: 'Önizleme / PDF',\n sort: true,\n headerClasses: 'mw-500px text-center',\n classes: 'mw-500px',\n width: 500,\n headerStyle: {width: '10%'},\n formatter: (cell: any, m: PaymentInvoiceDTO, rowIndex: number, colIndex: number) => (\n <>\n
\n {(m.documentLink?.length ?? 0 > 0) && (\n
\n
PDF
\n\n \n \n \n
\n )}\n\n
\n
Önizleme
\n \n \n \n
\n
\n \n ),\n },\n {\n dataField: 'missingInfo',\n text: 'Eksik Bilgiler\t',\n sort: true,\n headerClasses: 'mw-500px',\n classes: 'mw-500px',\n width: 500,\n headerStyle: {width: '10%'},\n formatter: (cell: any, m: PaymentInvoiceDTO, rowIndex: number, colIndex: number) => (\n
\n {m.missingInfo}\n
\n ),\n },\n ]\n\n return (\n
\n {/* begin::Header */}\n
\n

\n Ödeme ve Faturalar\n

\n
\n {/* end::Header */}\n {/* begin::Body */}\n
\n
\n {(adminState.invoices?.length ?? 0) > 0 && (\n <>\n (\n <>\n \n Toplam {size} faturadan {from} - {to} arası gösteriliyor.\n \n \n ),\n })}\n >\n {({paginationProps, paginationTableProps}) => (\n <>\n
\n \n \n \n o.dueDate, 'desc') ?? []}\n filter={filterFactory()}\n filterPosition='top'\n columns={columns}\n classes='table table-hover table-row-dashed table-rounded mt-5'\n />\n
\n \n )}\n \n \n )}\n
\n {/* end::Table container */}\n
\n {/* begin::Body */}\n
\n )\n}\n\nexport default PaymentInvoiceTable\n","import {Formik, Form, Field} from 'formik'\nimport _ from 'lodash'\nimport moment from 'moment'\nimport {useEffect} from 'react'\nimport {useDispatch, useSelector} from 'react-redux'\nimport {\n GetPaymentInvoicesRequest,\n AdminPanelInvoicesStartupDTOApiData,\n} from '../../../api/data-contracts'\nimport {Api_Admin_GetInvoicesStartup} from '../../../apiClient/apiClient'\nimport {\n getAdminState,\n setGetPaymentInvoicesRequest,\n getPaymentInvoicesAsync,\n setInvoicesStartup,\n} from '../../../redux/adminSlice'\nimport {setIsLoading, getRequestAsync} from '../../../redux/commonSlice'\nimport Select from 'react-select'\nimport DateRangeSelectorHorizontal from '../../../components/form/dropdown/DateRangeSelectorHorizontal'\nimport { DropdownOption } from '../../../components/form/dropdown/CustomDropdown'\n\nfunction PaymentInvoiceFilter() {\n const dispatch = useDispatch()\n const adminState = useSelector(getAdminState)\n\n const submit = async (values: GetPaymentInvoicesRequest) => {\n dispatch(setGetPaymentInvoicesRequest(values))\n await dispatch(getPaymentInvoicesAsync())\n }\n\n async function loadStartup() {\n dispatch(setIsLoading(true))\n await dispatch(\n getRequestAsync({\n getRequestFunction: Api_Admin_GetInvoicesStartup,\n })\n )\n .unwrap()\n .then(async function (response: AdminPanelInvoicesStartupDTOApiData) {\n dispatch(setInvoicesStartup(response.data))\n //setFilteredCompanies(response.data ?? [])\n dispatch(setIsLoading(false))\n })\n\n await submit(initFilterValues)\n }\n\n useEffect(() => {\n loadStartup()\n }, [])\n\n const initFilterValues: GetPaymentInvoicesRequest = {\n startTime: moment(new Date()).startOf('month').format('yyyy-MM-DD'),\n endTime: moment(new Date()).startOf('month').add(1, 'month').format('yyyy-MM-DD'),\n invoiceStates: [],\n isPrinted: -1,\n paymentStates: [],\n textSearch: '',\n isPaymentSuccessful: -1,\n }\n\n const isPrintedOptions: DropdownOption[] = [\n {\n label: 'Hepsi',\n value: '-1',\n },\n {\n label: 'Basılmadı',\n value: '0',\n },\n {\n label: 'Basıldı',\n value: '1',\n },\n ]\n\n const isPaymentSuccessfulOptions: DropdownOption[] = [\n {\n label: 'Hepsi',\n value: '-1',\n },\n {\n label: 'Başarısız',\n value: '0',\n },\n {\n label: 'Başarılı',\n value: '1',\n },\n ]\n\n return (\n
\n
\n \n {({values, setFieldValue, status, resetForm, setValues}) => {\n return (\n
\n
\n
\n \n
\n \n
\n
\n
\n
\n
\n \n {\n setFieldValue('isPrinted', parseInt((value as DropdownOption).value))\n }}\n classNames={{\n control: (state) => 'form-select form-select-solid fs-8',\n }}\n styles={{\n control: (baseStyles, state) => ({\n ...baseStyles,\n paddingTop: '0',\n paddingBottom: '0',\n }),\n dropdownIndicator: (baseStyles, state) => ({\n ...baseStyles,\n display: 'none',\n }),\n }}\n />\n
\n\n
\n \n {\n setFieldValue(\n 'isPaymentSuccessful',\n parseInt((value as DropdownOption).value)\n )\n }}\n classNames={{\n control: (state) => 'form-select form-select-solid fs-8',\n }}\n styles={{\n control: (baseStyles, state) => ({\n ...baseStyles,\n paddingTop: '0',\n paddingBottom: '0',\n }),\n dropdownIndicator: (baseStyles, state) => ({\n ...baseStyles,\n display: 'none',\n }),\n }}\n />\n
\n\n
\n \n o.description\n )?.map((m) => {\n const d: DropdownOption = {\n label:\n (m.description ?? '') +\n ' (' +\n adminState.invoices?.filter(\n (f) => f.foribaWebServiceResultCode == m.id\n ).length +\n ')',\n value: m.id?.toString() ?? '0',\n }\n return d\n }) ?? []\n }\n isMulti\n closeMenuOnSelect={false}\n name='invoiceStates'\n onChange={(value) => {\n setFieldValue(\n 'invoiceStates',\n (value as DropdownOption[]).map((m) => Number(m.value))\n )\n }}\n classNames={{\n control: (state) => 'form-select form-select-solid fs-6 py-1',\n }}\n styles={{\n dropdownIndicator: (baseStyles, state) => ({\n ...baseStyles,\n display: 'none',\n }),\n }}\n />\n
\n\n
\n \n \n
\n
\n
\n
\n {\n resetForm({values: initFilterValues})\n }}\n >\n Temizle\n \n
\n\n
\n \n
\n
\n
\n )\n }}\n
\n
\n
\n )\n}\n\nexport default PaymentInvoiceFilter\n","import React from 'react'\n\nfunction PaymentInvoiceSummaryCard(props: {title: string; description: string; color: string}) {\n return (\n
\n
\n
\n
\n
\n {props.title}\n
\n\n
\n {props.description}\n
\n
\n
\n
\n
\n )\n}\n\nexport default PaymentInvoiceSummaryCard\n","import _ from 'lodash'\nimport {useDispatch, useSelector} from 'react-redux'\nimport {getAdminState} from '../../../redux/adminSlice'\nimport PaymentInvoiceSummaryCard from './PaymentInvoiceSummaryCard'\n\nfunction PaymentInvoiceSummary() {\n const adminState = useSelector(getAdminState)\n\n return (\n
\n
\n
\n f.isSuccessful == true && f.isPaymentSuccessful == true\n )?.length ?? 0\n ).toString()}\n title=' Ödenmiş Basılan'\n color='bg-primary'\n />\n f.isSuccessful == true && f.isPaymentSuccessful == true\n ),\n (o) => o.invoiceAmount ?? 0\n ) ?? 0\n )\n .toFixed(0)\n .toString() + ' ₺'\n }\n title=' Ödenmiş Basılan Tutar'\n color='bg-success'\n />\n (f.isSuccessful ?? false) == false && f.isPaymentSuccessful == true\n )?.length ?? 0\n ).toString()}\n title=' Ödenmiş Basılmayan '\n color='bg-warning'\n />\n (f.isSuccessful ?? false) == false && f.isPaymentSuccessful == true\n ),\n (o) => o.invoiceAmount ?? 0\n ) ?? 0\n )\n .toFixed(0)\n .toString() + ' ₺'\n }\n title=' Ödenmiş Basılmayan Tutar'\n color='bg-danger'\n />\n
\n
\n
\n )\n}\n\nexport default PaymentInvoiceSummary\n","import {useDispatch, useSelector} from 'react-redux'\nimport {getAdminState} from '../../../redux/adminSlice'\nimport _ from 'lodash'\nimport PaymentInvoiceTable from './PaymentInvoiceTable'\nimport PaymentInvoiceFilter from './PaymentInvoiceFilter'\nimport PaymentInvoiceSummary from './PaymentInvoiceSummary'\n\nfunction PaymentInvoicesPage() {\n const dispatch = useDispatch()\n const adminState = useSelector(getAdminState)\n\n return (\n <>\n \n \n \n \n )\n}\n\nexport default PaymentInvoicesPage\n","import {useDispatch, useSelector} from 'react-redux'\nimport {\n BooleanApiData,\n GetPotentialCustomersRequest,\n PotentialCustomerDTO,\n PotentialCustomerDTOIEnumerableApiData,\n UpdateUserStateRequest,\n} from '../../../api/data-contracts'\nimport {getAdminState, setPotentialCustomers} from '../../../redux/adminSlice'\nimport _ from 'lodash'\nimport moment from 'moment'\nimport BootstrapTable, {ColumnDescription} from 'react-bootstrap-table-next'\nimport paginationFactory, {\n PaginationListStandalone,\n PaginationProvider,\n PaginationTotalStandalone,\n SizePerPageDropdownStandalone,\n} from 'react-bootstrap-table2-paginator'\nimport 'react-bootstrap-table-next/dist/react-bootstrap-table2.min.css'\nimport 'react-bootstrap-table2-paginator/dist/react-bootstrap-table2-paginator.min.css'\nimport AreYouSurePopup from '../../../components/common/popup/AreYouSurePopup'\nimport {\n Api_Admin_ChangeUserState,\n Api_Admin_GetPotentialCustomers,\n} from '../../../apiClient/apiClient'\nimport {setIsLoading, postRequestAsync, closeAreYouSureModal} from '../../../redux/commonSlice'\nimport clsx from 'clsx'\nimport {useEffect} from 'react'\nimport Select from 'react-select/dist/declarations/src/Select'\nimport DateRangeSelectorHorizontal from '../../../components/form/dropdown/DateRangeSelectorHorizontal'\nimport FormikForm from '../../../components/form/FormikForm'\nimport FormInput from '../../../components/form/FormInput'\n\nexport interface AdminCompaniesFilter {\n textFilter: string\n companyType: number\n}\n\nfunction AdminPotentialsPage() {\n const dispatch = useDispatch()\n const adminState = useSelector(getAdminState)\n\n const submit = async (values: GetPotentialCustomersRequest) => {\n dispatch(setIsLoading(true))\n await dispatch(\n postRequestAsync({\n postRequestFunction: Api_Admin_GetPotentialCustomers,\n body: values,\n })\n )\n .unwrap()\n .then(async function (response: PotentialCustomerDTOIEnumerableApiData) {\n dispatch(setPotentialCustomers(response.data))\n //setFilteredCompanies(response.data ?? [])\n dispatch(setIsLoading(false))\n })\n }\n\n useEffect(() => {\n submit(initFilterValues)\n }, [])\n\n const initFilterValues: GetPotentialCustomersRequest = {\n textSearch: '',\n creationDateEnd: moment(new Date()).startOf('month').add(1, 'month').format('yyyy-MM-DD'),\n creationDateStart: moment(new Date()).startOf('month').format('yyyy-MM-DD'),\n }\n\n const changeUserActive = async (userId: string, state: boolean) => {\n dispatch(setIsLoading(true))\n const body: UpdateUserStateRequest = {\n userId: userId,\n isActive: state,\n }\n await dispatch(\n postRequestAsync({\n postRequestFunction: Api_Admin_ChangeUserState,\n body: body,\n })\n )\n .unwrap()\n .then(async (response: BooleanApiData) => {\n dispatch(closeAreYouSureModal())\n dispatch(setIsLoading(false))\n window.location.reload()\n })\n }\n\n const columns: ColumnDescription[] = [\n {\n dataField: 'firstName',\n text: 'Kişi',\n sort: true,\n headerClasses: 'mw-500px',\n classes: 'mw-500px',\n width: 500,\n headerStyle: {width: '15%'},\n formatter: (cell: any, m: PotentialCustomerDTO, rowIndex: number, colIndex: number) => (\n <>\n
\n {m.firstName} {m.lastName}\n
\n \n ),\n },\n {\n dataField: 'mailAddress',\n text: 'E-mail',\n sort: true,\n headerClasses: 'mw-500px',\n classes: 'mw-500px',\n width: 500,\n headerStyle: {width: '15%'},\n formatter: (cell: any, m: PotentialCustomerDTO, rowIndex: number, colIndex: number) => (\n <>\n
{m.mailAddress}
\n \n ),\n },\n {\n dataField: 'phoneNumber',\n text: 'Telefon',\n sort: true,\n headerClasses: 'mw-500px',\n classes: 'mw-500px',\n width: 500,\n headerStyle: {width: '15%'},\n formatter: (cell: any, m: PotentialCustomerDTO, rowIndex: number, colIndex: number) => (\n <>\n
{m.phoneNumber}
\n \n ),\n },\n {\n dataField: 'createdAt',\n text: 'Kayıt Zamanı',\n sort: true,\n headerStyle: {width: '15%'},\n formatter: (cell: any, m: PotentialCustomerDTO, rowIndex: number, colIndex: number) => (\n <>\n
\n {moment(m.createdAt).format('DD.MM.yyyy HH:mm')}\n
\n \n ),\n },\n {\n dataField: 'createdAt',\n text: 'İşlem',\n sort: true,\n headerStyle: {width: '15%'},\n formatter: (cell: any, m: PotentialCustomerDTO, rowIndex: number, colIndex: number) => (\n <>\n
\n \n \n {m.isActive ? 'Kullanıcı Pasife Al' : 'Kullanıcı Aktif Et'}\n \n \n }\n message={'EMIN_MISINIZ'}\n onClick={() => changeUserActive(m.guid ?? '', m.isActive ? false : true)}\n />\n
\n \n ),\n },\n ]\n\n const rowClasses = (row: PotentialCustomerDTO, rowIndex: number): string => {\n return clsx({\n 'bg-danger bg-opacity-15': !row.isActive,\n })\n }\n\n return (\n <>\n
\n {/* begin::Header */}\n
\n
\n \n {(props) => {\n return (\n <>\n
\n
\n \n \n
\n\n
\n \n
\n\n
\n {\n props.resetForm({values: initFilterValues})\n }}\n >\n Temizle\n \n
\n\n
\n \n
\n
\n \n )\n }}\n
\n
\n
\n {/* end::Header */}\n {/* begin::Body */}\n\n
\n
\n {(adminState.potentialCustomers?.length ?? 0) > 0 && (\n <>\n (\n \n Toplam {size} talepten {from} - {to} arası gösteriliyor\n \n ),\n })}\n >\n {({paginationProps, paginationTableProps}) => (\n <>\n
\n \n \n \n o.createdAt, 'desc') ??\n []\n }\n columns={columns}\n classes='table table-hover table-row-dashed table-rounded mt-5'\n />\n
\n \n )}\n \n \n )}\n
\n\n {/* begin::Table container */}\n\n {/* end::Table container */}\n
\n {/* begin::Body */}\n
\n \n )\n}\n\nexport default AdminPotentialsPage\n","import React from 'react'\nimport {BaseCardData, CardData} from '../../../../api/data-contracts'\nimport {KTSVG} from '../../../../../_metronic/helpers'\n\nfunction DashboardCardItem(props: {data: BaseCardData; index: number; isLast: boolean}) {\n return (\n
\n
\n \n \n \n
\n\n
\n
\n
{props.data.description}
\n {/*
SubText
*/}\n
\n\n
\n
{props.data.valueText}
\n
\n
\n
\n )\n}\n\nexport default DashboardCardItem\n","import React from 'react'\nimport {CardData} from '../../../../api/data-contracts'\nimport DashboardCardItem from './DashboardCardItem'\nimport _ from 'lodash'\n\nfunction DashboardCard(props: {cardData: CardData | undefined}) {\n return (\n
\n
\n
\n
\n
\n

{props.cardData?.title}

\n
\n\n
\n {props.cardData?.description}\n {props.cardData?.explanation}\n
\n
\n\n \n {_.orderBy(props.cardData?.distributions, (o) => o.value, 'desc')?.map((m, i) => {\n return (\n \n )\n })}\n
\n
\n
\n \n )\n}\n\nexport default DashboardCard\n","import {useDispatch, useSelector} from 'react-redux'\nimport {getAdminState, setDashboardData} from '../../../redux/adminSlice'\nimport _ from 'lodash'\nimport 'react-bootstrap-table-next/dist/react-bootstrap-table2.min.css'\nimport 'react-bootstrap-table2-paginator/dist/react-bootstrap-table2-paginator.min.css'\nimport DashboardCard from './components/DashboardCard'\nimport DashboardSingleCard from './components/DashboardSingleCard'\nimport {NewCustomerDashboardGraph} from './components/NewCustomerDashboardGraph'\nimport {PaymentDashboardGraph} from './components/PaymentDashboardGraph'\nimport moment from 'moment'\nimport {useEffect} from 'react'\nimport {GetDashboardDataRequest, DashboardDataApiData} from '../../../api/data-contracts'\nimport {Api_Admin_GetDashboard} from '../../../apiClient/apiClient'\nimport {setIsLoading, postRequestAsync} from '../../../redux/commonSlice'\n\nexport interface AdminCompaniesFilter {\n textFilter: string\n companyType: number\n}\n\nfunction AdminDashboardPage() {\n const adminState = useSelector(getAdminState)\n\n const dispatch = useDispatch()\n\n const submit = async (values: GetDashboardDataRequest) => {\n dispatch(setIsLoading(true))\n\n dispatch(\n postRequestAsync({\n postRequestFunction: Api_Admin_GetDashboard,\n body: values,\n })\n )\n .unwrap()\n .then(async function (response: DashboardDataApiData) {\n dispatch(setDashboardData(response.data))\n dispatch(setIsLoading(false))\n })\n }\n\n useEffect(() => {\n submit(initFilterValues)\n }, [])\n\n const initFilterValues: GetDashboardDataRequest = {\n start: moment(new Date()).startOf('month').format('yyyy-MM-DD'),\n finish: moment(new Date()).endOf('month').format('yyyy-MM-DD'),\n }\n\n return (\n
\n \n
\n {/*
\n
\n \n \n
\n
*/}\n
\n
\n
\n
\n {adminState.dashboardData?.cards\n ?.filter((f) => f.isGlobal)\n .map((f) => {\n return \n })}\n
\n
\n\n {/*
\n
\n {adminState.dashboardData?.cards\n ?.filter((f) => !f.isGlobal)\n .map((f) => {\n return \n })}\n
\n
\n
\n \n
\n
\n \n
\n
\n
*/}\n
\n
\n
\n
\n \n )\n}\n\nexport default AdminDashboardPage\n","import React, {ChangeEventHandler} from 'react'\nimport Translator from '../common/translate/Translator'\nimport {Field} from 'formik'\n\nfunction FormCheckboxInput(props: {\n name: string\n description: string\n setFieldValue?: (field: string, value: any, shouldValidate?: boolean) => void\n onChange?: (value: boolean) => void\n disabled?: boolean\n}) {\n return (\n
\n ) => {\n props.setFieldValue?.(props.name, e.target.checked)\n props.onChange?.(e.target.checked)\n }}\n />\n \n
\n )\n}\n\nexport default FormCheckboxInput\n","import {FormikValues} from 'formik'\nimport _ from 'lodash'\nimport FormMessage from '../../common/messages/FormMessage'\nimport CustomDropdown, {DropdownOption} from '../../form/dropdown/CustomDropdown'\nimport FormCheckboxInput from '../../form/FormCheckboxInput'\nimport FormikForm from '../../form/FormikForm'\nimport FormInput from '../../form/FormInput'\nimport {useSelector, useDispatch} from 'react-redux'\nimport {UpdateProductRequest, BooleanApiData, AdminProductDTO} from '../../../api/data-contracts'\nimport {Api_Admin_UpsertProduct} from '../../../apiClient/apiClient'\nimport {getAdminState} from '../../../redux/adminSlice'\nimport {postRequestAsync} from '../../../redux/commonSlice'\nimport {FormStatus} from '../../../types/FormStatus'\nimport * as Yup from 'yup'\nimport {ProductTypeEnum} from '../../../apiClient/enums'\n\nfunction AdminProductDetailsForm(props: {product?: AdminProductDTO | null}) {\n const adminState = useSelector(getAdminState)\n\n const schema = Yup.object({})\n\n const dispatch = useDispatch()\n\n const initData: UpdateProductRequest = {\n categoryId: props.product?.categoryId ?? undefined,\n currencyId: props.product?.currencyId,\n description: props.product?.description ?? '',\n descriptionENG: props.product?.descriptionENG ?? '',\n isActive: props.product?.isActive,\n isActiveOnExtras: props.product?.isActiveOnExtras,\n isActiveOnWizard: props.product?.isActiveOnWizard,\n serviceLength: props.product?.serviceLength,\n serviceType: props.product?.serviceType,\n title: props.product?.title ?? '',\n titleEng: props.product?.titleEng ?? '',\n productTypeId: props.product?.typeId,\n }\n\n const submit = async (values: UpdateProductRequest, actions: FormikValues) => {\n actions.setStatus()\n values.id = props.product?.id\n await dispatch(\n postRequestAsync({\n postRequestFunction: Api_Admin_UpsertProduct,\n body: values,\n })\n )\n .unwrap()\n .then(async (response: BooleanApiData) => {\n if (response.data == true) {\n actions.setStatus(new FormStatus(true, 'Ürün Kaydedildi.'))\n } else {\n actions.setStatus(new FormStatus(false, response.serverMessage))\n }\n })\n }\n\n return (\n \n {(form_props) => {\n return (\n <>\n
\n
\n \n
\n
\n \n
\n
\n\n
\n
\n \n
\n
\n \n
\n
\n\n
\n
\n {},\n }}\n noSelectionText='URUN_TIPI_SECINIZ'\n options={\n adminState.productsPage?.productTypes?.map((m) => {\n const v: DropdownOption = {\n label: m.description ?? '',\n value: m.id ?? 0,\n }\n return v\n }) ?? []\n }\n noSelectionValue={0}\n placeHolderOnTop={true}\n setFieldValue={form_props.setFieldValue}\n valueConverter={parseInt}\n />\n
\n
\n {form_props.values.productTypeId === ProductTypeEnum.Ek_Çözüm && (\n {},\n }}\n noSelectionText='KATEGORI_SECINIZ'\n options={\n adminState.productsPage?.productCategories?.map((m) => {\n const v: DropdownOption = {\n label: m.description ?? '',\n value: m.id ?? 0,\n }\n return v\n }) ?? []\n }\n noSelectionValue={0}\n placeHolderOnTop={true}\n setFieldValue={form_props.setFieldValue}\n valueConverter={parseInt}\n />\n )}\n
\n
\n\n
\n
\n
\n
\n {},\n }}\n noSelectionText='PARA_BIRIMI_SECINIZ'\n options={\n adminState.productsPage?.currencies?.map((m) => {\n const v: DropdownOption = {\n label: m.description ?? '',\n value: m.id ?? 0,\n }\n return v\n }) ?? []\n }\n noSelectionValue={0}\n placeHolderOnTop={true}\n setFieldValue={form_props.setFieldValue}\n valueConverter={parseInt}\n />\n
\n
\n {},\n }}\n noSelectionText='SERVIS_PERIYOD_SECINIZ'\n options={\n adminState.productsPage?.servicePeriods?.map((m) => {\n const v: DropdownOption = {\n label: m.description ?? '',\n value: m.id ?? 0,\n }\n return v\n }) ?? []\n }\n noSelectionValue={0}\n placeHolderOnTop={true}\n setFieldValue={form_props.setFieldValue}\n valueConverter={parseInt}\n />\n
\n
\n \n
\n
\n
\n
\n\n
\n
\n
\n
\n \n
\n {form_props.values.productTypeId === ProductTypeEnum.Ek_Çözüm && (\n <>\n
\n \n
\n
\n \n
\n \n )}\n
\n
\n
\n\n
\n
\n \n
\n
\n\n
\n
\n \n
\n
\n \n )\n }}\n
\n )\n}\n\nexport default AdminProductDetailsForm\n","import {FieldArray, FormikValues} from 'formik'\nimport _ from 'lodash'\nimport FormMessage from '../../common/messages/FormMessage'\nimport FormikForm from '../../form/FormikForm'\nimport FormInput from '../../form/FormInput'\nimport {useSelector, useDispatch} from 'react-redux'\nimport {\n BooleanApiData,\n AdminProductDTO,\n UpdateProductPriceRequest,\n AdminProductPrice,\n} from '../../../api/data-contracts'\nimport {Api_Admin_UpsertProductPrices} from '../../../apiClient/apiClient'\nimport {getAdminState} from '../../../redux/adminSlice'\nimport {postRequestAsync} from '../../../redux/commonSlice'\nimport {FormStatus} from '../../../types/FormStatus'\nimport * as Yup from 'yup'\nimport {defterdar_log} from '../../../utils/utilities'\nimport CustomDropdown, {DropdownOption} from '../../form/dropdown/CustomDropdown'\nimport {useState} from 'react'\nimport {KTSVG} from '../../../../_metronic/helpers'\n\nfunction AdminProductPricesForm(props: {product?: AdminProductDTO | null}) {\n const adminState = useSelector(getAdminState)\n\n const [selectedServiceProviderId, setSelectedServiceProviderId] = useState(0)\n\n const schema = Yup.object({})\n\n const dispatch = useDispatch()\n\n const initData: UpdateProductPriceRequest = {\n prices: props.product?.prices,\n }\n\n const submit = async (values: UpdateProductPriceRequest, actions: FormikValues) => {\n actions.setStatus()\n values.id = props.product?.id\n await dispatch(\n postRequestAsync({\n postRequestFunction: Api_Admin_UpsertProductPrices,\n body: values,\n })\n )\n .unwrap()\n .then(async (response: BooleanApiData) => {\n if (response.data === true) {\n actions.setStatus(new FormStatus(true, 'Ürün Kaydedildi.'))\n } else {\n actions.setStatus(new FormStatus(false, response.serverMessage))\n }\n })\n }\n\n function generatePriceForServiceProvider(serviceProviderId: number): AdminProductPrice {\n const financialAdvisorUserId =\n adminState.productsPage?.serviceProviders?.find((m) => m.id === serviceProviderId)?.userId ??\n 0\n\n const name = adminState.productsPage?.serviceProviders?.find(\n (m) => m.id === serviceProviderId\n )?.description\n\n return {\n financialAdvisorUserId: financialAdvisorUserId,\n financialAdvisorUser: name,\n serviceProviderShares: [\n {\n serviceProviderId: 6,\n serviceProvider: 'Defterdar',\n serviceProviderRole: '',\n serviceProviderRoleId: 0,\n totalPrice: 0,\n totalPriceWithoutTax: 0,\n },\n {\n serviceProviderId: serviceProviderId,\n serviceProvider: name,\n serviceProviderRole: '',\n serviceProviderRoleId: 0,\n totalPrice: 0,\n totalPriceWithoutTax: 0,\n },\n ],\n }\n }\n\n return (\n \n {(form_props) => {\n return (\n <>\n
\n
\n (\n
\n
\n {form_props.values?.prices?.map((price, index) => (\n
\n
\n
\n
\n
\n
\n {(price.financialAdvisorUserId ?? 0) > 0 && (\n
\n arrayHelpers.remove(index)}\n >\n \n \n
\n )}\n
\n
\n
\n
\n {price.financialAdvisorUserId\n ? price.financialAdvisorUser + ' İçin Fiyatlar'\n : 'Varsayılan Fiyatlar'}\n
\n
KDV'siz
\n
KDV'li
\n
\n {price?.serviceProviderShares?.map((m, i) => {\n return (\n
\n
\n
\n {(m.serviceProviderRoleId ?? 0) > 0 ? (\n
{m.serviceProviderRole}
\n ) : (\n <>{m.serviceProvider} \n )}\n
\n
\n
\n {\n const value = parseFloat(\n event.target.value == '' ? 0 : event.target.value\n )\n form_props.setFieldValue(\n `prices.${index}.serviceProviderShares.${i}.totalPriceWithoutTax`,\n value\n )\n\n form_props.setFieldValue(\n `prices.${index}.serviceProviderShares.${i}.totalPrice`,\n value * 1.2\n )\n },\n }}\n istouched={true}\n errorMessage={undefined}\n placeHolderOnTop={false}\n checkValid={false}\n />\n
\n
\n {\n const value = parseFloat(\n event.target.value == '' ? 0 : event.target.value\n )\n form_props.setFieldValue(\n `prices.${index}.serviceProviderShares.${i}.totalPrice`,\n value\n )\n\n // form_props.setFieldValue(\n // `prices.${index}.shares.${i}.totalPriceWithoutTax`,\n // value / 1.2\n // )\n },\n }}\n istouched={true}\n errorMessage={undefined}\n placeHolderOnTop={false}\n checkValid={false}\n />\n
\n
\n )\n })}\n\n
\n
\n {!price.financialAdvisorUserId ? (\n {\n const defaultShares = form_props.values?.prices?.find(\n (m) => (m.financialAdvisorUserId ?? 0) === 0\n )?.serviceProviderShares\n\n form_props.values.prices?.forEach((m, i) => {\n if ((m.financialAdvisorUserId ?? 0) > 0) {\n price.serviceProviderShares?.forEach((s, j) => {\n \n\n form_props.setFieldValue(\n `prices.${i}.serviceProviderShares.${j}.totalPriceWithoutTax`,\n defaultShares?.at(j)?.totalPriceWithoutTax\n )\n form_props.setFieldValue(\n `prices.${i}.serviceProviderShares.${j}.totalPrice`,\n defaultShares?.at(j)?.totalPrice\n )\n })\n }\n })\n }}\n >\n Tüm Mali Müşavirlere Aktar\n
\n ) : (\n
Toplam
\n )}\n
\n
\n
\n {_.sumBy(\n form_props.values.prices?.at(index)?.serviceProviderShares,\n (s) => s.totalPriceWithoutTax ?? 0\n ).toFixed(2)}\n
\n
\n
\n {_.sumBy(\n form_props.values.prices?.at(index)?.serviceProviderShares,\n (s) => s.totalPrice ?? 0\n ).toFixed(2)}\n
\n
\n
\n
\n ))}\n
\n\n
\n
\n
\n
\n {\n setSelectedServiceProviderId(parseInt(event.target.value))\n },\n }}\n noSelectionText='SERVIS_SAGLAYICI_SECINIZ'\n options={\n adminState.productsPage?.serviceProviders?.map((m) => {\n const v: DropdownOption = {\n label: m.description ?? '',\n value: m.id ?? 0,\n }\n return v\n }) ?? []\n }\n noSelectionValue={0}\n placeHolderOnTop={false}\n setFieldValue={form_props.setFieldValue}\n valueConverter={parseInt}\n />\n
\n
\n {\n const newPrice =\n generatePriceForServiceProvider(selectedServiceProviderId)\n defterdar_log(newPrice)\n arrayHelpers.push(newPrice)\n }}\n className='btn btn-lg btn-primary me-3'\n >\n Özel Fiyat Ekle +\n
\n
\n
\n
\n
\n
\n )}\n />\n \n \n\n
\n
\n \n
\n
\n\n
\n
\n \n
\n
\n \n )\n }}\n \n )\n}\n\nexport default AdminProductPricesForm\n","import {Modal} from 'react-bootstrap'\nimport {KTSVG} from '../../../../_metronic/helpers'\nimport {useState} from 'react'\nimport {AdminProductDTO} from '../../../api/data-contracts'\nimport _ from 'lodash'\nimport AdminProductDetailsForm from '../../../components/admin/product/AdminProductDetailsForm'\nimport AdminProductPricesForm from '../../../components/admin/product/AdminProductPricesForm'\n\nfunction AdminProductDetailPopup(props: {product?: AdminProductDTO | null; isNew?: boolean}) {\n const [modalShow, setModalShow] = useState(false)\n\n const handleModalClose = () => setModalShow(false)\n\n const load = () => {\n setModalShow(true)\n }\n\n return (\n <>\n {props.isNew ? (\n {\n load()\n }}\n >\n Ürün Ekle +\n \n ) : (\n {\n load()\n }}\n className='btn btn-icon btn-bg-light btn-active-color-primary btn-sm me-1'\n >\n \n \n )}\n\n \n \n {!props.isNew ? (\n
{props.product?.title}
\n ) : (\n
{'Yeni Ürün'}
\n )}\n
\n \n \n\n
\n
\n \n
\n {!props.isNew && (\n
\n \n
\n )}\n
\n
\n
\n \n )\n}\n\nexport default AdminProductDetailPopup\n","import {useDispatch, useSelector} from 'react-redux'\nimport {AdminProductDTO, AdminProductPageDataApiData} from '../../../api/data-contracts'\nimport {getAdminState, setProductsPageData} from '../../../redux/adminSlice'\nimport _ from 'lodash'\nimport BootstrapTable, {ColumnDescription} from 'react-bootstrap-table-next'\nimport paginationFactory, {\n PaginationListStandalone,\n PaginationProvider,\n PaginationTotalStandalone,\n SizePerPageDropdownStandalone,\n} from 'react-bootstrap-table2-paginator'\nimport 'react-bootstrap-table-next/dist/react-bootstrap-table2.min.css'\nimport 'react-bootstrap-table2-paginator/dist/react-bootstrap-table2-paginator.min.css'\nimport filterFactory, {selectFilter, textFilter} from 'react-bootstrap-table2-filter'\n\nimport {Api_Admin_GetProductsPage} from '../../../apiClient/apiClient'\nimport {postRequestAsync} from '../../../redux/commonSlice'\nimport {useEffect} from 'react'\nimport {getCurrencySymbol} from '../../../utils/utilities'\nimport clsx from 'clsx'\nimport AdminProductDetailPopup from './AdminProductDetailPopup'\n\nfunction AdminProductsPage() {\n const dispatch = useDispatch()\n const adminState = useSelector(getAdminState)\n\n useEffect(() => {\n dispatch(\n postRequestAsync({\n postRequestFunction: Api_Admin_GetProductsPage,\n body: {},\n })\n )\n .unwrap()\n .then(async function (response: AdminProductPageDataApiData) {\n dispatch(setProductsPageData(response.data))\n })\n }, [])\n\n function filterByActive(filterVal: any) {\n if (filterVal === '1') {\n return adminState?.productsPage?.products?.filter((p: AdminProductDTO) => p.isActive) ?? []\n } else if (filterVal === '0') {\n return adminState?.productsPage?.products?.filter((p: AdminProductDTO) => !p.isActive) ?? []\n }\n return adminState?.productsPage?.products ?? []\n }\n\n const columns: ColumnDescription[] = [\n {\n dataField: 'isActive',\n text: 'Aktif',\n sort: true,\n headerStyle: {width: '10%'},\n // formatter: cell => adminState.productsPage?.productTypes?.at(cell),\n filter: selectFilter({\n options: [\n {\n label: 'Aktif',\n value: 1,\n },\n {\n label: 'Pasif',\n value: 0,\n },\n ],\n onFilter: filterByActive,\n defaultValue: 1,\n }),\n formatter: (cell: any, m: AdminProductDTO, rowIndex: number, colIndex: number) => (\n <>{m.isActive && }\n ),\n },\n {\n dataField: 'typeId',\n text: 'Tip',\n sort: true,\n headerStyle: {width: '20%'},\n // formatter: cell => adminState.productsPage?.productTypes?.at(cell),\n filter: selectFilter({\n options:\n adminState.productsPage?.productTypes?.map((m) => {\n return {\n value: m.id ?? 0,\n label: m.description ?? '',\n }\n }) ?? [],\n }),\n formatter: (cell: any, m: AdminProductDTO, rowIndex: number, colIndex: number) => (\n <>\n
{m.productTypeName}
\n \n ),\n },\n {\n dataField: 'title',\n text: 'Adı',\n sort: true,\n headerStyle: {width: '30%'},\n filter: textFilter(),\n formatter: (cell: any, m: AdminProductDTO, rowIndex: number, colIndex: number) => (\n <>\n
{m.title}
\n \n ),\n },\n {\n dataField: 'categoryId',\n text: 'Kategori',\n sort: true,\n headerStyle: {width: '15%'},\n filter: selectFilter({\n options:\n adminState.productsPage?.productCategories?.map((m) => {\n return {\n value: m.id ?? 0,\n label: m.description ?? '',\n }\n }) ?? [],\n }),\n formatter: (cell: any, m: AdminProductDTO, rowIndex: number, colIndex: number) => (\n <>\n
{m.category}
\n \n ),\n },\n // {\n // dataField: 'description',\n // text: 'Açıklama',\n // sort: true,\n // headerClasses: 'mw-500px',\n // classes: 'mw-500px',\n // width: 500,\n // headerStyle: {width: '15%'},\n // filter: textFilter(),\n // formatter: (cell: any, m: AdminProductDTO, rowIndex: number, colIndex: number) => (\n // <>\n //
{m.description}
\n // \n // ),\n // },\n {\n dataField: 'defaultPrice',\n text: \"Varsayılan Fiyat (KDV''siz)\",\n sort: true,\n headerStyle: {width: '10%'},\n formatter: (cell: any, m: AdminProductDTO, rowIndex: number, colIndex: number) => (\n <>\n
\n {m.prices?.at(0)?.totalPriceWithoutTax ?? 0} {getCurrencySymbol(m.currencyId ?? 0)}\n
\n \n ),\n },\n {\n dataField: 'defaultPriceWithoutTax',\n text: \"Varsayılan Fiyat (KDV'li)\",\n sort: true,\n headerStyle: {width: '10%'},\n formatter: (cell: any, m: AdminProductDTO, rowIndex: number, colIndex: number) => (\n <>\n
\n {m.prices?.at(0)?.totalPrice ?? 0} {getCurrencySymbol(m.currencyId ?? 0)}\n
\n \n ),\n },\n {\n dataField: '',\n text: 'Detay',\n sort: true,\n headerStyle: {width: '5%'},\n formatter: (cell: any, m: AdminProductDTO, rowIndex: number, colIndex: number) => (\n <>\n
\n \n
\n \n ),\n },\n ]\n\n const rowClasses = (row: AdminProductDTO, rowIndex: number): string => {\n return clsx({\n 'bg-light-danger': !row.isActive,\n })\n }\n\n const newProduct: AdminProductDTO = {\n currencyId: 1,\n isActive: true,\n serviceLength: 1,\n serviceType: 6,\n }\n\n return (\n <>\n
\n
\n \n\n
\n {(adminState.productsPage?.products?.length ?? 0) > 0 && (\n <>\n (\n // \n // Toplam {size} talepten {from} - {to} arası gösteriliyor\n // \n // ),\n })}\n >\n {({paginationProps, paginationTableProps}) => (\n <>\n
\n \n \n \n o.productTypeName,\n 'desc'\n ) ?? []\n }\n columns={columns}\n classes='table table-hover table-row-dashed table-rounded mt-5'\n />\n
\n \n )}\n \n \n )}\n
\n\n {/* begin::Table container */}\n\n {/* end::Table container */}\n
\n {/* begin::Body */}\n
\n \n )\n}\n\nexport default AdminProductsPage\n","import {useEffect, useState} from 'react'\nimport {\n BaseIdRequest,\n BooleanApiData,\n FinancialAdvisorAssignmentRuleDTO,\n FinancialAdvisorAssignmentStartupDTO,\n FinancialAdvisorAssignmentStartupDTOApiData,\n GetFaarsResponseDTOApiData,\n} from '../../../api/data-contracts'\nimport {useDispatch} from 'react-redux'\nimport {getRequestAsync, postRequestAsync} from '../../../redux/commonSlice'\nimport {\n Api_Admin_GetFaars,\n Api_Admin_GetFaarStartup,\n Api_Admin_RemoveFaar,\n Api_Admin_UpsertFaar,\n} from '../../../apiClient/apiClient'\nimport BootstrapTable, {ColumnDescription} from 'react-bootstrap-table-next'\nimport paginationFactory, {\n PaginationProvider,\n} from 'react-bootstrap-table2-paginator'\nimport FormikForm from '../../../components/form/FormikForm'\nimport _ from 'lodash'\nimport CustomDropdown, { DropdownOption } from '../../../components/form/dropdown/CustomDropdown'\nimport FormInput from '../../../components/form/FormInput'\n\nfunction FaarPage() {\n const [startUp, setStartUp] = useState(\n null\n )\n\n const [faars, setFaars] = useState(null)\n const [explanations, setExplanations] = useState(null)\n\n const dispatch = useDispatch()\n\n const financialAdvisorOptions =\n _.orderBy(\n startUp?.financialAdvisors?.map((m) => {\n const d: DropdownOption = {\n label: m.description ?? '',\n value: m.id?.toString() ?? '0',\n }\n return d\n }),\n (o) => o.label\n ) ?? []\n\n const companyTypes =\n _.orderBy(\n startUp?.companyTypes?.map((m) => {\n const d: DropdownOption = {\n label: m.description ?? '',\n value: m.id?.toString() ?? '0',\n }\n return d\n }),\n (o) => o.label\n ) ?? []\n\n const columns: ColumnDescription[] = [\n {\n dataField: 'id',\n text: 'Firma Bilgileri',\n sort: false,\n headerStyle: {width: '100%'},\n headerFormatter: (column: any, colIndex: number) => {\n return (\n
\n
Mali Müşavir
\n
Şirket Tipi
\n
Yüzdesel Ağırlık
\n
\n )\n },\n formatter: (\n cell: any,\n row: FinancialAdvisorAssignmentRuleDTO,\n rowIndex: number,\n colIndex: number\n ) => (\n \n {(props) => {\n return (\n <>\n
\n
\n
\n {},\n }}\n noSelectionText='MALI_MUSAVIR_SECINIZ'\n options={financialAdvisorOptions}\n noSelectionValue={0}\n placeHolderOnTop={false}\n setFieldValue={props.setFieldValue}\n valueConverter={parseInt}\n />\n
\n
\n
\n
\n {},\n }}\n noSelectionText='SIRKET_TIPI_SECINIZ'\n options={companyTypes}\n noSelectionValue={0}\n placeHolderOnTop={false}\n setFieldValue={props.setFieldValue}\n valueConverter={parseInt}\n />\n
\n
\n
\n
\n \n
\n
\n
\n
\n
\n \n
\n
\n removeFaar(row.id ?? 0)}\n >\n Sil\n \n
\n
\n
\n
\n \n )\n }}\n
\n ),\n },\n ]\n\n async function loadFaars() {\n await dispatch(\n getRequestAsync({\n getRequestFunction: Api_Admin_GetFaars,\n })\n )\n .unwrap()\n .then(async function (response: GetFaarsResponseDTOApiData) {\n let faars = response.data?.faars\n faars = _.orderBy(faars, (o) => o.serviceProviderId)\n setFaars(faars)\n setExplanations(response.data?.currentStateExplanations)\n })\n }\n\n async function loadStartup() {\n await dispatch(\n getRequestAsync({\n getRequestFunction: Api_Admin_GetFaarStartup,\n })\n )\n .unwrap()\n .then(async function (response: FinancialAdvisorAssignmentStartupDTOApiData) {\n setStartUp(response.data)\n })\n\n await loadFaars()\n }\n\n useEffect(() => {\n loadStartup()\n }, [])\n\n const submit = async (values: FinancialAdvisorAssignmentRuleDTO) => {\n await dispatch(\n postRequestAsync({\n postRequestFunction: Api_Admin_UpsertFaar,\n body: values,\n })\n )\n .unwrap()\n .then(async (response: BooleanApiData) => {\n loadFaars()\n })\n }\n\n async function addNewFaar() {\n const newFaar = {\n id: 0,\n serviceProviderId: 0,\n companyTypeId: 0,\n weight: 0,\n }\n\n setFaars((prevFaars) => [...(prevFaars ?? []), newFaar])\n }\n\n async function removeFaar(faarId: number) {\n const request: BaseIdRequest = {\n id: faarId,\n }\n await dispatch(\n postRequestAsync({\n postRequestFunction: Api_Admin_RemoveFaar,\n body: request,\n })\n )\n .unwrap()\n .then(async (response: BooleanApiData) => {\n loadFaars()\n })\n }\n\n return (\n <>\n {faars && (\n <>\n (\n \n Toplam {size} kuraldan {from} - {to} arası gösteriliyor\n \n ),\n })}\n >\n {({paginationProps, paginationTableProps}) => (\n <>\n
\n
\n {explanations?.map((m, i) => (\n
\n
  • \n {m}\n
  • \n
    \n ))}\n
    \n \n
    \n\n
    \n \n
    \n \n )}\n \n \n )}\n \n )\n}\n\nexport default FaarPage\n","import React, {Suspense, useState} from 'react'\nimport FaarPage from './FaarPage'\n\nconst HomePageBanners = React.lazy(() => import('./HomePageBanners'))\nconst HomePageCalendar = React.lazy(() => import('./HomePageCalendar'))\nconst ContractDocument = React.lazy(() => import('./ContractDocument'))\nconst AuthorizationPage = React.lazy(() => import('./AuthorizationPage'))\n\nfunction AdminSettingsPage() {\n const [activeTab, setActiveTab] = useState('authorization')\n\n const handleTabClick = (tabId: string) => {\n setActiveTab(tabId)\n }\n\n return (\n
    \n
    \n
    \n
      \n
    • \n handleTabClick('authorization')}\n >\n Yetkilendirme\n \n
    • \n
    • \n handleTabClick('faar')}\n >\n Mali Müşavir Atama Kuralları\n \n
    • \n
    • \n handleTabClick('home_banner')}\n >\n Anasayfa Banner\n \n
    • \n
    • \n handleTabClick('calendar')}\n >\n Anasayfa Takvim\n \n
    • \n
    • \n handleTabClick('contract_document')}\n >\n Sözleşme Dosyası Takvim\n \n
    • \n
    \n
    \n
    \n
    \n
    \n\n
    \n \n {activeTab === 'authorization' && (\n Loading Authorization Page...
    }>\n \n \n )}\n
    \n\n \n {activeTab === 'faar' && (\n Loading Faar Page...
    }>\n \n \n )}\n \n\n \n {activeTab === 'home_banner' && (\n Loading Home Page Banners...}>\n \n \n )}\n \n\n \n {activeTab === 'calendar' && (\n Loading Calendar...}>\n \n \n )}\n \n\n \n {activeTab === 'contract_document' && (\n Loading Contract Document...}>\n \n \n )}\n \n \n \n \n )\n}\n\nexport default AdminSettingsPage\n","export enum ReportEnum {\n SaleReport = 1,\n ReferenceCommissionReport = 2,\n PaymentReport = 3,\n}\n","import React, {useEffect, useState} from 'react'\nimport {SaleReportData, SaleReportDataListApiData} from '../../../../api/data-contracts'\nimport {Api_Admin_GetSaleReport} from '../../../../apiClient/apiClient'\nimport {getAdminState, setDashboardData, setReport} from '../../../../redux/adminSlice'\nimport {postRequestAsync, setIsLoading} from '../../../../redux/commonSlice'\nimport {useDispatch, useSelector} from 'react-redux'\nimport _ from 'lodash'\nimport BootstrapTable, {ColumnDescription} from 'react-bootstrap-table-next'\nimport moment from 'moment'\nimport ExportCSV from '../../../../components/admin/common/ExportCSV'\nimport {ReportEnum} from '../../../../types/ReportEnum'\nimport { getUserState } from '../../../../redux/userSlice'\nimport { UserTypeEnum } from '../../../../apiClient/enums'\n\nfunction AdminSaleReport() {\n const dispatch = useDispatch()\n\n const adminState = useSelector(getAdminState)\n const role = useSelector(getUserState).data?.roleId as UserTypeEnum\n\n\n const columns: ColumnDescription[] = [\n {\n dataField: 'reportIndex',\n text: 'Tarih',\n sort: true,\n headerStyle: {width: '10%'},\n formatter: (cell: any, m: SaleReportData, rowIndex: number, colIndex: number) => (\n <>\n
    \n {moment(new Date(m.reportYear ?? 0, (m.reportMonth ?? 0) - 1)).format('MMMM yyyy')}\n
    \n \n ),\n },\n {\n dataField: 'newCustomer',\n text: 'Yeni Müşteri',\n sort: true,\n headerStyle: {width: '10%'},\n headerClasses: 'text-end',\n formatter: (cell: any, m: SaleReportData, rowIndex: number, colIndex: number) => (\n <>\n
    {m.newCustomer?.toFixed(0)}
    \n \n ),\n },\n\n {\n dataField: 'suspendedCustomer',\n text: 'Fesih Müşteri',\n sort: true,\n headerStyle: {width: '10%'},\n headerClasses: 'text-end',\n formatter: (cell: any, m: SaleReportData, rowIndex: number, colIndex: number) => (\n <>\n
    \n {m.suspendedCustomer?.toFixed(0)}\n
    \n \n ),\n },\n\n {\n dataField: 'totalAmount',\n text: 'Toplam',\n sort: true,\n headerStyle: {width: '10%'},\n headerClasses: 'text-end',\n formatter: (cell: any, m: SaleReportData, rowIndex: number, colIndex: number) => (\n <>\n
    \n {m.totalAmount?.toFixed(0)} ₺\n
    \n \n ),\n },\n {\n dataField: 'totalNewAmount',\n text: 'Toplam Yeni',\n sort: true,\n headerStyle: {width: '10%'},\n headerClasses: 'text-end',\n formatter: (cell: any, m: SaleReportData, rowIndex: number, colIndex: number) => (\n <>\n
    \n {m.totalNewAmount?.toFixed(0)} ₺\n
    \n \n ),\n },\n {\n dataField: 'totalSubsAmount',\n text: 'Toplam Abonelik',\n sort: true,\n headerStyle: {width: '10%'},\n headerClasses: 'text-end',\n formatter: (cell: any, m: SaleReportData, rowIndex: number, colIndex: number) => (\n <>\n
    \n {m.totalSubsAmount?.toFixed(0)} ₺\n
    \n \n ),\n }\n ]\n\n if(role === UserTypeEnum.Admin)\n {\n columns.push(\n {\n dataField: 'defterdarAmount',\n text: 'D. Toplam',\n sort: true,\n headerStyle: {width: '10%'},\n headerClasses: 'text-end',\n formatter: (cell: any, m: SaleReportData, rowIndex: number, colIndex: number) => (\n <>\n
    \n {m.defterdarAmount?.toFixed(0)} ₺\n
    \n \n ),\n },\n {\n dataField: 'defterdarNewAmount',\n text: 'D. Yeni',\n sort: true,\n headerStyle: {width: '10%'},\n headerClasses: 'text-end',\n formatter: (cell: any, m: SaleReportData, rowIndex: number, colIndex: number) => (\n <>\n
    \n {m.defterdarNewAmount?.toFixed(0)} ₺\n
    \n \n ),\n },\n {\n dataField: 'defterdarSubsAmount',\n text: 'D. Abonelik',\n sort: true,\n headerStyle: {width: '10%'},\n headerClasses: 'text-end',\n formatter: (cell: any, m: SaleReportData, rowIndex: number, colIndex: number) => (\n <>\n
    \n {m.defterdarSubsAmount?.toFixed(0)} ₺\n
    \n \n ),\n }\n )\n }\n function getExcelData() {\n return (\n _.orderBy(\n adminState?.reports.saleReport,\n ['reportYear', 'reportMonth'],\n ['desc', 'desc']\n ) ?? []\n ).map((m) => {\n return {\n Index: m.reportIndex,\n 'Rapor Yılı': m.reportYear,\n 'Rapor Ayı': m.reportMonth,\n 'Yeni Müşteri': m.newCustomer,\n 'Fesih Müşteri': m.suspendedCustomer,\n 'Defterdar Tutarı': m.defterdarAmount,\n 'Defterdar Yeni Tutar': m.defterdarNewAmount,\n 'Defterdar Abone Tutar': m.defterdarSubsAmount,\n 'Toplam Tutar': m.totalAmount,\n 'Toplam Yeni Tutar': m.totalNewAmount,\n 'Toplam Abone Tutar': m.totalSubsAmount,\n }\n })\n }\n\n const loadSaleReport = async () => {\n dispatch(\n postRequestAsync({\n postRequestFunction: Api_Admin_GetSaleReport,\n body: {},\n })\n )\n .unwrap()\n .then(async function (response: SaleReportDataListApiData) {\n dispatch(\n setReport({\n reportEnum: ReportEnum.SaleReport,\n saleReport: response.data,\n })\n )\n })\n }\n\n useEffect(() => {\n loadSaleReport()\n }, [])\n\n return (\n
    \n
    \n
    \n \n
    \n {(adminState?.reports.saleReport?.length ?? 0) > 0 && (\n \n )}\n
    \n
    \n )\n}\n\nexport default AdminSaleReport\n","import React, {useEffect, useState} from 'react'\nimport {\n GetReferenceCommissionReportRequest,\n IdDescriptionDTO,\n IdDescriptionDTOListApiData,\n ReferenceCommissionReport,\n ReferenceCommissionReportListApiData,\n} from '../../../../api/data-contracts'\nimport {\n Api_Admin_GetReferenceCommissionReport,\n Api_Admin_GetReferences,\n} from '../../../../apiClient/apiClient'\nimport {getAdminState, setReport} from '../../../../redux/adminSlice'\nimport {getRequestAsync, postRequestAsync, setIsLoading} from '../../../../redux/commonSlice'\nimport {useDispatch, useSelector} from 'react-redux'\nimport _ from 'lodash'\nimport BootstrapTable, {ColumnDescription} from 'react-bootstrap-table-next'\nimport moment from 'moment'\nimport ExportCSV from '../../../../components/admin/common/ExportCSV'\nimport {ReportEnum} from '../../../../types/ReportEnum'\n\nfunction CommissionReport() {\n const adminState = useSelector(getAdminState)\n const dispatch = useDispatch()\n const columns: ColumnDescription[] = [\n {\n dataField: 'reportIndex',\n text: 'Tarih',\n sort: true,\n headerStyle: {width: '10%'},\n formatter: (cell: any, m: ReferenceCommissionReport, rowIndex: number, colIndex: number) => (\n <>\n
    \n {moment(new Date(m.reportYear ?? 0, (m.reportMonth ?? 0) - 1)).format('MMMM yyyy')}\n
    \n \n ),\n },\n {\n dataField: 'newCustomer',\n text: 'Yeni Müşteri',\n sort: true,\n headerStyle: {width: '10%'},\n headerClasses: 'text-end',\n formatter: (cell: any, m: ReferenceCommissionReport, rowIndex: number, colIndex: number) => (\n <>\n
    {m.newCustomer?.toFixed(0)}
    \n \n ),\n },\n\n {\n dataField: 'commissionAmount',\n text: 'Komisyon Toplam',\n sort: true,\n headerStyle: {width: '10%'},\n headerClasses: 'text-end',\n formatter: (cell: any, m: ReferenceCommissionReport, rowIndex: number, colIndex: number) => (\n <>\n
    \n {m.commissionAmount?.toFixed(0)} ₺\n
    \n \n ),\n },\n {\n dataField: 'commissionNewAmount',\n text: 'Komisyon Toplam Yeni',\n sort: true,\n headerStyle: {width: '10%'},\n headerClasses: 'text-end',\n formatter: (cell: any, m: ReferenceCommissionReport, rowIndex: number, colIndex: number) => (\n <>\n
    \n {m.commissionNewAmount?.toFixed(0)} ₺\n
    \n \n ),\n },\n {\n dataField: 'commissionSubsAmount',\n text: 'Komisyon Toplam Abonelik',\n sort: true,\n headerStyle: {width: '10%'},\n headerClasses: 'text-end',\n formatter: (cell: any, m: ReferenceCommissionReport, rowIndex: number, colIndex: number) => (\n <>\n
    \n {m.commissionSubsAmount?.toFixed(0)} ₺\n
    \n \n ),\n },\n\n {\n dataField: 'defterdarAmount',\n text: 'D. Toplam',\n sort: true,\n headerStyle: {width: '10%'},\n headerClasses: 'text-end',\n formatter: (cell: any, m: ReferenceCommissionReport, rowIndex: number, colIndex: number) => (\n <>\n
    \n {m.defterdarAmount?.toFixed(0)} ₺\n
    \n \n ),\n },\n {\n dataField: 'defterdarNewAmount',\n text: 'D. Yeni',\n sort: true,\n headerStyle: {width: '10%'},\n headerClasses: 'text-end',\n formatter: (cell: any, m: ReferenceCommissionReport, rowIndex: number, colIndex: number) => (\n <>\n
    \n {m.defterdarNewAmount?.toFixed(0)} ₺\n
    \n \n ),\n },\n {\n dataField: 'defterdarSubsAmount',\n text: 'D. Abonelik',\n sort: true,\n headerStyle: {width: '10%'},\n headerClasses: 'text-end',\n formatter: (cell: any, m: ReferenceCommissionReport, rowIndex: number, colIndex: number) => (\n <>\n
    \n {m.defterdarSubsAmount?.toFixed(0)} ₺\n
    \n \n ),\n },\n ]\n\n function getExcelData() {\n return (\n _.orderBy(\n adminState?.reports.referenceCommissionReport,\n ['reportYear', 'reportMonth'],\n ['desc', 'desc']\n ) ?? []\n ).map((m) => {\n return {\n Index: m.reportIndex,\n 'Rapor Yılı': m.reportYear,\n 'Rapor Ayı': m.reportMonth,\n 'Yeni Müşteri': m.newCustomer,\n 'Defterdar Tutarı': m.defterdarAmount,\n 'Defterdar Yeni Tutar': m.defterdarNewAmount,\n 'Defterdar Abone Tutar': m.defterdarSubsAmount,\n 'Komisyon Tutar': m.commissionAmount,\n 'Komisyon Yeni Tutar': m.commissionNewAmount,\n 'Komisyon Abone Tutar': m.commissionSubsAmount,\n }\n })\n }\n\n const [references, setReferences] = useState([])\n\n const loadReport = (referenceId: number) => {\n const body: GetReferenceCommissionReportRequest = {\n referenceId: referenceId,\n }\n dispatch(setIsLoading(true))\n dispatch(\n postRequestAsync({\n postRequestFunction: Api_Admin_GetReferenceCommissionReport,\n body: body,\n })\n )\n .unwrap()\n .then(async function (response: ReferenceCommissionReportListApiData) {\n dispatch(\n setReport({\n reportEnum: ReportEnum.ReferenceCommissionReport,\n referenceCommissionReport: response.data,\n })\n )\n })\n }\n\n useEffect(() => {\n dispatch(setIsLoading(true))\n dispatch(\n getRequestAsync({\n getRequestFunction: Api_Admin_GetReferences,\n })\n )\n .unwrap()\n .then(async function (response: IdDescriptionDTOListApiData) {\n setReferences(response.data ?? [])\n })\n }, [])\n\n return (\n
    \n
    \n
    \n ) => {\n loadReport(parseInt(event.target.value))\n }}\n >\n \n {references.map((m) => (\n \n ))}\n \n
    \n
    \n\n
    \n
    \n
    \n \n
    \n {(adminState?.reports.referenceCommissionReport?.length ?? 0) > 0 && (\n \n )}\n
    \n
    \n
    \n )\n}\n\nexport default CommissionReport\n","import React from 'react'\nimport {ReportEnum} from '../../../../../types/ReportEnum'\nimport {useDispatch, useSelector} from 'react-redux'\nimport {getAdminState, setReport} from '../../../../../redux/adminSlice'\nimport clsx from 'clsx'\n\nfunction ReportButton(props: {report: ReportEnum; name: string}) {\n const dispatch = useDispatch()\n const adminState = useSelector(getAdminState)\n\n return (\n
    \n
    \n {\n dispatch(\n setReport({\n reportEnum: props.report,\n })\n )\n }}\n >\n {props.name}\n \n
    \n
    \n )\n}\n\nexport default ReportButton\n","import React, {useEffect, useState} from 'react'\nimport {\n IdDescriptionDTO,\n IdDescriptionDTOListApiData,\n PaymentReport,\n PaymentReportListApiData,\n PaymentReportRequest,\n} from '../../../../api/data-contracts'\nimport {\n Api_Admin_GetPaymentReport,\n Api_Admin_GetPaymentStates,\n Api_Admin_GetReferences,\n} from '../../../../apiClient/apiClient'\nimport {getAdminState, setReport} from '../../../../redux/adminSlice'\nimport {getRequestAsync, postRequestAsync, setIsLoading} from '../../../../redux/commonSlice'\nimport {useDispatch, useSelector} from 'react-redux'\nimport _ from 'lodash'\nimport BootstrapTable, {ColumnDescription} from 'react-bootstrap-table-next'\nimport moment from 'moment'\nimport ExportCSV from '../../../../components/admin/common/ExportCSV'\nimport {ReportEnum} from '../../../../types/ReportEnum'\nimport FormikForm from '../../../../components/form/FormikForm'\nimport DateRangeSelectorHorizontal from '../../../../components/form/dropdown/DateRangeSelectorHorizontal'\nimport {defterdar_log, getPaymentStateColor} from '../../../../utils/utilities'\nimport Select from 'react-select'\nimport clsx from 'clsx'\nimport paginationFactory, {\n PaginationProvider,\n SizePerPageDropdownStandalone,\n PaginationTotalStandalone,\n PaginationListStandalone,\n} from 'react-bootstrap-table2-paginator'\nimport { DropdownOption } from '../../../../components/form/dropdown/CustomDropdown'\n\nfunction PaymentReportComponent() {\n const adminState = useSelector(getAdminState)\n const dispatch = useDispatch()\n const columns: ColumnDescription[] = [\n {\n dataField: 'companyName',\n text: 'Firma',\n sort: true,\n headerStyle: {width: '15%'},\n headerClasses: 'text-start',\n formatter: (cell: any, m: PaymentReport, rowIndex: number, colIndex: number) => (\n <>\n
    {m.companyName}
    \n
    {m.userName}
    \n \n ),\n },\n {\n dataField: 'dueTime',\n text: 'Vade Zamanı',\n sort: true,\n headerStyle: {width: '5%'},\n headerClasses: 'text-start',\n formatter: (cell: any, m: PaymentReport, rowIndex: number, colIndex: number) => (\n <>\n
    \n {moment(m.dueTime).format('DD.MM.yyyy HH:mm')}\n
    \n \n ),\n },\n {\n dataField: 'paymentTime',\n text: 'Ödeme Zamanı',\n sort: true,\n headerStyle: {width: '5%'},\n headerClasses: 'text-start',\n formatter: (cell: any, m: PaymentReport, rowIndex: number, colIndex: number) => (\n <>\n
    \n {m.paymentTime && moment(m.paymentTime).format('DD.MM.yyyy HH:mm')}\n
    \n \n ),\n },\n {\n dataField: 'priceWithoutTax',\n text: 'KDVsiz Miktar',\n sort: true,\n headerStyle: {width: '5%'},\n headerClasses: 'text-end',\n formatter: (cell: any, m: PaymentReport, rowIndex: number, colIndex: number) => (\n <>\n
    \n {m.priceWithoutTax?.toFixed(0)} ₺\n
    \n \n ),\n },\n {\n dataField: 'price',\n text: 'Miktar',\n sort: true,\n headerStyle: {width: '5%'},\n headerClasses: 'text-end',\n formatter: (cell: any, m: PaymentReport, rowIndex: number, colIndex: number) => (\n <>\n
    {m.price?.toFixed(0)} ₺
    \n \n ),\n },\n {\n dataField: 'stateDescription',\n text: 'Durum',\n sort: true,\n headerStyle: {width: '10%'},\n headerClasses: 'text-center',\n formatter: (cell: any, m: PaymentReport, rowIndex: number, colIndex: number) => (\n <>\n
    \n \n {m.stateDescription}\n \n
    \n \n ),\n },\n ]\n\n function getExcelData() {\n return (_.orderBy(adminState?.reports.paymentReport, ['paymentTime'], ['desc']) ?? []).map(\n (m) => {\n return {\n Firma: m.companyName,\n Kişi: m.userName,\n 'Vade Zamanı': m.dueTime,\n 'Ödeme Zamanı': m.paymentTime,\n 'KDVsiz Miktar': m.priceWithoutTax,\n Miktar: m.price,\n Durum: m.stateDescription,\n }\n }\n )\n }\n\n const [paymentStates, setPaymentStates] = useState([])\n\n const loadReport = (request: PaymentReportRequest) => {\n dispatch(setIsLoading(true))\n dispatch(\n postRequestAsync({\n postRequestFunction: Api_Admin_GetPaymentReport,\n body: request,\n })\n )\n .unwrap()\n .then(async function (response: PaymentReportListApiData) {\n dispatch(\n setReport({\n reportEnum: ReportEnum.PaymentReport,\n paymentReport: response.data,\n })\n )\n })\n }\n\n useEffect(() => {\n dispatch(setIsLoading(true))\n dispatch(\n getRequestAsync({\n getRequestFunction: Api_Admin_GetPaymentStates,\n })\n )\n .unwrap()\n .then(async function (response: IdDescriptionDTOListApiData) {\n setPaymentStates(response.data ?? [])\n loadReport(initFilterValues)\n })\n }, [])\n\n const paymentStateOptions: DropdownOption[] = [\n {\n label: 'Hepsi',\n value: '0',\n },\n {\n label: 'Başarılı',\n value: '1',\n },\n {\n label: 'Başarısız',\n value: '2',\n },\n {\n label: 'Bekleyen',\n value: '3',\n },\n ]\n\n const initFilterValues: PaymentReportRequest = {\n finishTime: moment(new Date()).startOf('month').add(1, 'month').format('yyyy-MM-DD'),\n startTime: moment(new Date()).startOf('month').format('yyyy-MM-DD'),\n stateId: 0,\n simpleStateId: 0,\n }\n\n return (\n
    \n
    \n \n {(props) => {\n return (\n <>\n
    \n
    \n \n \n
    \n\n
    \n \n {\n props.setFieldValue(\n 'simpleStateId',\n parseInt((value as DropdownOption).value)\n )\n }}\n classNames={{\n control: (state) => 'form-select form-select-solid fs-6',\n }}\n styles={{\n control: (baseStyles, state) => ({\n ...baseStyles,\n paddingTop: '0',\n paddingBottom: '0',\n }),\n dropdownIndicator: (baseStyles, state) => ({\n ...baseStyles,\n display: 'none',\n }),\n }}\n />\n
    \n\n
    \n {\n props.resetForm({values: initFilterValues})\n }}\n >\n Temizle\n \n
    \n\n
    \n \n
    \n
    \n \n )\n }}\n
    \n
    \n\n
    \n
    \n {(adminState?.reports.paymentReport?.length ?? 0) > 0 && (\n (\n \n Toplam {size} ödemeden {from} - {to} arası gösteriliyor{' '}\n \n \n ),\n })}\n >\n {({paginationProps, paginationTableProps}) => (\n <>\n \n \n \n\n \n \n )}\n \n )}\n
    \n
    \n
    \n )\n}\n\nexport default PaymentReportComponent\n","import {useDispatch, useSelector} from 'react-redux'\nimport {getAdminState, setReport} from '../../../redux/adminSlice'\nimport _ from 'lodash'\nimport 'react-bootstrap-table-next/dist/react-bootstrap-table2.min.css'\nimport 'react-bootstrap-table2-paginator/dist/react-bootstrap-table2-paginator.min.css'\nimport {ReportEnum} from '../../../types/ReportEnum'\nimport AdminSaleReport from './components/AdminSaleReport'\nimport CommissionReport from './components/CommissionReport'\nimport ReportButton from '../../../components/layout/sidebar/admin/components/ReportButton'\nimport {SaleReportDataListApiData} from '../../../api/data-contracts'\nimport {Api_Admin_GetSaleReport} from '../../../apiClient/apiClient'\nimport {postRequestAsync} from '../../../redux/commonSlice'\nimport {CanIDoThat} from '../../../utils/CanIDoThat'\nimport {UserTypeAuthorizationsEnum} from '../../../apiClient/enums'\nimport AuthorizedComponent from '../../../components/common/auth/AuthorizedComponent'\nimport PaymentReport from './components/PaymentReportComponent'\n\nexport interface AdminCompaniesFilter {\n textFilter: string\n companyType: number\n}\n\nfunction AdminReportsPage() {\n const adminState = useSelector(getAdminState)\n\n return (\n
    \n
    \n
    \n
    \n \n \n \n \n \n \n \n \n \n
    \n
    \n\n
    \n {adminState.reports?.reportEnum === ReportEnum.SaleReport && }\n {adminState.reports?.reportEnum === ReportEnum.ReferenceCommissionReport && (\n \n )}\n {adminState.reports?.reportEnum === ReportEnum.PaymentReport && }\n
    \n
    \n
    \n )\n}\n\nexport default AdminReportsPage\n","import {useRef, useState} from 'react'\nimport {\n BooleanApiData,\n ServiceProviderDTO,\n ServiceProviderSipayInfo,\n} from '../../../api/data-contracts'\nimport {FormikValues} from 'formik'\nimport _ from 'lodash'\nimport {Modal} from 'react-bootstrap'\nimport {useIntl} from 'react-intl'\nimport {useSelector, useDispatch} from 'react-redux'\nimport {KTSVG} from '../../../../_metronic/helpers'\nimport {Api_Admin_UpdateServiceProviders} from '../../../apiClient/apiClient'\nimport FormMessage from '../../../components/common/messages/FormMessage'\nimport FormikForm from '../../../components/form/FormikForm'\nimport FormInput from '../../../components/form/FormInput'\nimport {getAdminState} from '../../../redux/adminSlice'\nimport {setIsLoading, postRequestAsync} from '../../../redux/commonSlice'\nimport {CanIDoThat} from '../../../utils/CanIDoThat'\nimport {setFormikStatus} from '../../../utils/utilities'\nimport * as Yup from 'yup'\nimport {ValidateIBAN} from '../../../utils/cardUtilities'\nimport { UserTypeAuthorizationsEnum } from '../../../apiClient/enums'\n\nfunction AdminReferenceDetailPage(props: {data: ServiceProviderDTO}) {\n const schema = Yup.object().shape({\n full_company_name: Yup.string().required('FIRMA_ADI_ZORUNLUDUR'),\n authorized_person_name: Yup.string().required('KISI_ADI_ZORUNLUDUR'),\n authorized_person_email: Yup.string()\n .email('EPOSTA_ADRESI_EPOSTA')\n .min(3, 'EPOSTA_ADRESI_MIN')\n .max(50, 'EPOSTA_ADRESI_MAX')\n .required('EPOSTA_ADRESI_REQUIRED'),\n authorized_person_phone_number: Yup.string()\n .phone('TR', false, 'TELEFON_NUMARASI_TELEFON')\n .required('TELEFON_NUMARASI_REQUIRED'),\n identity_number: Yup.string().length(11, 'KIMLIK_UZUNLUK_HATASI').required('KIMLIK_ZORUNLUDUR'),\n iban_no: Yup.string()\n .required('IBAN_ZORUNLUDUR')\n .test('is-valid-iban', 'GECERSIZ_IBAN', (value) => {\n if (!value) return false\n const cleanedIBAN = value.replace(/\\s+/g, '').toUpperCase()\n\n return ValidateIBAN(cleanedIBAN)\n }),\n })\n\n const [modalShow, setModalShow] = useState(false)\n\n const adminstate = useSelector(getAdminState)\n\n const formikRef = useRef(null)\n const intl = useIntl()\n\n const dispatch = useDispatch()\n\n let sipayInitData: ServiceProviderSipayInfo = props.data.sipayInfo ?? {}\n const handleModalClose = () => setModalShow(false)\n\n const load = () => {\n setModalShow(true)\n }\n\n const submit = async (values: ServiceProviderSipayInfo, actions: FormikValues) => {\n dispatch(setIsLoading(true))\n let body: ServiceProviderDTO = props.data\n body.sipayInfo = values\n await dispatch(\n postRequestAsync({\n postRequestFunction: Api_Admin_UpdateServiceProviders,\n body: body,\n })\n )\n .unwrap()\n .then(async (response: BooleanApiData) => {\n setFormikStatus(actions, response)\n load()\n })\n }\n\n return (\n <>\n {\n load()\n }}\n className='btn btn-icon btn-bg-light btn-active-color-primary btn-sm me-1'\n >\n \n \n\n \n \n
    {props?.data?.name} Bilgileri
    \n
    \n \n {\n <>\n
    \n
    \n \n
    \n
    \n\n
    \n
    \n
    \n \n {(props) => {\n return (\n <>\n
    \n
    \n
    \n \n
    \n
    \n \n
    \n\n
    \n \n
    \n
    \n \n
    \n
    \n\n
    \n\n
    \n
    \n \n
    \n
    \n \n
    \n\n
    \n \n
    \n
    \n \n
    \n
    \n\n
    \n\n
    \n
    \n \n
    \n
    \n \n
    \n\n
    \n \n
    \n
    \n \n
    \n
    \n\n
    \n\n
    \n
    \n \n
    \n
    \n\n {CanIDoThat(\n UserTypeAuthorizationsEnum.Admin_Panel_Company_Update\n ) && (\n
    \n
    \n \n
    \n
    \n )}\n
    \n \n )\n }}\n \n
    \n
    \n
    \n
    \n
    \n
    \n \n }\n
    \n
    \n \n )\n}\n\nexport default AdminReferenceDetailPage\n","import {useDispatch, useSelector} from 'react-redux'\nimport _ from 'lodash'\nimport 'react-bootstrap-table-next/dist/react-bootstrap-table2.min.css'\nimport 'react-bootstrap-table2-paginator/dist/react-bootstrap-table2-paginator.min.css'\nimport BootstrapTable, {ColumnDescription} from 'react-bootstrap-table-next'\nimport paginationFactory, {\n PaginationProvider,\n SizePerPageDropdownStandalone,\n PaginationTotalStandalone,\n PaginationListStandalone,\n} from 'react-bootstrap-table2-paginator'\nimport {\n ServiceProviderDTO,\n ServiceProviderDTOListApiData,\n} from '../../../api/data-contracts'\nimport {UserTypeEnum} from '../../../apiClient/enums'\nimport {getUserState} from '../../../redux/userSlice'\nimport {Api_Admin_GetServiceProviders} from '../../../apiClient/apiClient'\nimport {getRequestAsync} from '../../../redux/commonSlice'\nimport {useEffect, useState} from 'react'\nimport AdminReferenceDetailPage from './AdminReferenceDetailPage'\n\nfunction AdminReferencesPage() {\n const dispatch = useDispatch()\n const role = useSelector(getUserState).data?.roleId as UserTypeEnum\n\n const [serviceProviders, setServiceProviders] = useState(\n null\n )\n\n const columns: ColumnDescription[] = [\n {\n dataField: 'name',\n text: 'Adı',\n sort: true,\n headerStyle: {width: '20%'},\n formatter: (cell: any, row: ServiceProviderDTO, rowIndex: number, colIndex: number) => (\n
    \n
    \n
    {row.name}
    \n
    \n
    \n ),\n },\n {\n dataField: '',\n text: 'Detay',\n sort: true,\n headerStyle: {width: '5%'},\n formatter: (cell: any, m: ServiceProviderDTO, rowIndex: number, colIndex: number) => (\n <>\n
    \n \n
    \n \n ),\n },\n ]\n\n useEffect(() => {\n loadReferences()\n }, [])\n\n async function loadReferences() {\n await dispatch(\n getRequestAsync({\n getRequestFunction: Api_Admin_GetServiceProviders,\n })\n )\n .unwrap()\n .then(async function (response: ServiceProviderDTOListApiData) {\n setServiceProviders(response.data)\n })\n }\n\n return (\n <>\n
    \n {/* begin::Header */}\n
    \n

    \n
    Firmalar
    \n

    \n
    \n {/* end::Header */}\n {/* begin::Body */}\n\n
    \n
    \n {(serviceProviders?.length ?? 0) > 0 && (\n <>\n (\n \n Toplam {size} firmadan {from} - {to} arası gösteriliyor{' '}\n \n ),\n })}\n >\n {({paginationProps, paginationTableProps}) => (\n <>\n
    \n \n \n \n o.name, 'asc') ?? []}\n columns={columns}\n classes='table table-hover table-row-dashed table-rounded mt-5'\n />\n
    \n \n )}\n \n \n )}\n
    \n\n {/* begin::Table container */}\n\n {/* end::Table container */}\n
    \n {/* begin::Body */}\n
    \n \n )\n}\n\nexport default AdminReferencesPage\n","import {useState} from 'react'\nimport {useDispatch, useSelector} from 'react-redux'\nimport {\n AdminPanelCompanyDetailDTOApiData,\n BooleanApiData,\n GetAdminCompanyRequest,\n SetCompanyStepRequest,\n} from '../../../api/data-contracts'\nimport {Api_Admin_GetCompany, Api_Company_SetCompanyStep} from '../../../apiClient/apiClient'\nimport {getCommonState, postRequestAsync, setIsLoading} from '../../../redux/commonSlice'\nimport clsx from 'clsx'\nimport {Button, Modal} from 'react-bootstrap'\nimport {Guid} from 'guid-typescript'\nimport {getUserState} from '../../../redux/userSlice'\nimport {getCompanyState} from '../../../redux/companySlice'\nimport {getAdminState, setAdminSelectedCompany} from '../../../redux/adminSlice'\nimport {useParams} from 'react-router-dom'\n\nfunction CompanyStatusComponent(props: {\n iconName: string\n iconMessage: string\n iconColoring: string\n targerStepId?: number\n visibleSteps?: number[]\n enabledSteps?: number[]\n stepId?: number\n isDisabled?: boolean\n}) {\n const dispatch = useDispatch()\n const adminState = useSelector(getAdminState)\n const commonState = useSelector(getCommonState)\n const userState = useSelector(getUserState)\n const companyState = useSelector(getCompanyState)\n const {id} = useParams()\n\n const [show, setShow] = useState(false)\n\n const handleClose = () => setShow(false)\n const handleShow = () => {\n if ((props.targerStepId ?? 0) > 0 && isEnabled) {\n setShow(true)\n }\n }\n const loadCompanyData = () => {\n const body: GetAdminCompanyRequest = {\n companyGuidId: id,\n }\n dispatch(\n postRequestAsync({\n postRequestFunction: Api_Admin_GetCompany,\n body: body,\n })\n )\n .unwrap()\n .then(async function (response: AdminPanelCompanyDetailDTOApiData) {\n dispatch(setAdminSelectedCompany(response.data))\n })\n }\n\n function changeStep() {\n if ((props.targerStepId ?? 0) > 0 && isEnabled) {\n const body: SetCompanyStepRequest = {\n companyId: adminState.company?.company?.guid ?? '',\n stepId: props.targerStepId,\n }\n dispatch(setIsLoading(true))\n dispatch(\n postRequestAsync({\n postRequestFunction: Api_Company_SetCompanyStep,\n body: body,\n })\n )\n .unwrap()\n .then(async (response: BooleanApiData) => {\n await loadCompanyData()\n dispatch(setIsLoading(false))\n handleClose()\n })\n }\n }\n\n const stepId = adminState.company?.company?.stepId ?? 0\n\n const isEnabled =\n (props.enabledSteps?.includes(stepId) ?? true) &&\n adminState.company?.company?.isActive === true &&\n !props.isDisabled\n\n if (\n ((props.visibleSteps?.length ?? 0) > 0 && (props.visibleSteps?.includes(stepId) ?? false)) ||\n (props.visibleSteps?.length ?? 0) == 0\n ) {\n return (\n
    \n {\n \n \n \n

    Firmanın durumunu değiştirmek istediğinizden emin misiniz?

    \n
    \n \n \n İptal\n \n \n Kaydet\n\n \n Kaydediliyor...{' '}\n \n \n \n \n
    \n }\n\n
    \n 0 ? 'mt-5' : ''\n )}\n >\n \n
    {props.iconMessage}
    \n
    \n
    \n \n )\n } else {\n return null\n }\n}\n\nexport default CompanyStatusComponent\n","/* eslint-disable jsx-a11y/anchor-is-valid */\n\nimport {useSelector} from 'react-redux'\nimport {ApplicationStepEnum} from '../../../apiClient/enums'\nimport CompanyStatusComponent from './CompanyStatusComponent'\nimport {getAdminState} from '../../../redux/adminSlice'\n\nfunction CompanyStatusHeader() {\n const adminState = useSelector(getAdminState)\n\n return (\n
    \n
    \n
    \n
    \n \n \n\n \n\n \n\n \n \n \n\n \n\n \n\n \n\n \n \n \n
    \n
    \n
    \n\n {adminState.company?.company?.stepId == 12 &&\n ((adminState.company?.company?.taxAdministrationNumber?.length ?? 0) < 10 ||\n !adminState.company?.doesHaveTaxNumberFile) && (\n
    \n * Firma durumunu tamamlandı yapabilmeniz için vergi numarası alanını doldurmanız ve\n vergi levhası belgesini yüklemeniz gerekmektedir.\n
    \n )}\n
    \n )\n}\n\nexport {CompanyStatusHeader}\n","import React, {ChangeEventHandler} from 'react'\nimport FormInput, {FormInputProps} from './FormInput'\n\ntype PhoneNumberInputProps = FormInputProps & {\n setFieldValue: (field: string, value: any, shouldValidate?: boolean) => void\n onChange?: ChangeEventHandler | undefined\n}\n\nfunction PhoneNumberInput(props: PhoneNumberInputProps) {\n return (\n {\n if (e.target.value.length < 13) {\n var cleaned = ('' + e.target.value).replace(/\\D/g, '')\n let normValue = `${cleaned.substring(0, 3)}${\n cleaned.length > 3 ? ' ' : ''\n }${cleaned.substring(3, 6)}${cleaned.length > 6 ? ' ' : ''}${cleaned.substring(6, 11)}`\n props.setFieldValue(props.fieldAttributes.name, normValue)\n }\n },\n }}\n />\n )\n}\n\nexport default PhoneNumberInput\n","import React from 'react'\n\nfunction CompanyDetailFormInputLabel(props: {text: string}) {\n return (\n
    \n \n
    \n )\n}\n\nexport default CompanyDetailFormInputLabel\n","import React from 'react'\n\nfunction CompanyDetailFormDataLabel(props: {text: string}) {\n return (\n
    \n {props.text}\n
    \n )\n}\n\nexport default CompanyDetailFormDataLabel\n","import {useDispatch, useSelector} from 'react-redux'\nimport _ from 'lodash'\nimport {SetCompanySuspensionStatusRequest, BooleanApiData} from '../../../api/data-contracts'\nimport {Api_ServiceProvider_SetCompanySuspensionStatus} from '../../../apiClient/apiClient'\nimport {CompanySuspensionStatusEnum} from '../../../apiClient/enums'\nimport {setIsLoading, postRequestAsync} from '../../../redux/commonSlice'\nimport AreYouSurePopup from '../../common/popup/AreYouSurePopup'\nimport {getAdminState} from '../../../redux/adminSlice'\nfunction CompanySetSuspensionStatus(props: {load: () => void}) {\n const dispatch = useDispatch()\n const adminState = useSelector(getAdminState)\n\n async function setStatus(statusId: number) {\n dispatch(setIsLoading(true))\n\n const values: SetCompanySuspensionStatusRequest = {\n suspensionStatusId: statusId,\n companyId: adminState.company?.company?.guid ?? '',\n }\n await dispatch(\n postRequestAsync({\n postRequestFunction: Api_ServiceProvider_SetCompanySuspensionStatus,\n body: values,\n })\n )\n .unwrap()\n .then(async (response: BooleanApiData) => {\n props.load()\n })\n }\n\n return (\n
    \n {adminState?.company?.company?.suspensionStatusId ==\n CompanySuspensionStatusEnum.Mali_Müşavir_Değiştirmek_İstiyor && (\n <>\n \n Mali Müşavir Değişim İptal\n \n }\n message='FESIH_DURUMUNU_DEGISTIRMEK_ISTEDIGINIZDEN_EMIN_MISINIZ'\n onClick={() => setStatus(0)}\n />\n \n Mali Müşavir Değişim Başlat\n \n }\n message='FESIH_DURUMUNU_DEGISTIRMEK_ISTEDIGINIZDEN_EMIN_MISINIZ'\n onClick={() => setStatus(CompanySuspensionStatusEnum.Mali_Müşavir_Değişim_Başladı)}\n />\n \n )}\n\n {adminState?.company?.company?.suspensionStatusId ==\n CompanySuspensionStatusEnum.Mali_Müşavir_Değişim_Başladı && (\n <>\n \n Mali Müşavir Değişim İptal\n \n }\n message='FESIH_DURUMUNU_DEGISTIRMEK_ISTEDIGINIZDEN_EMIN_MISINIZ'\n onClick={() => setStatus(0)}\n />\n \n Mali Müşavir Değişim Tamamlandı\n \n }\n message='FESIH_DURUMUNU_DEGISTIRMEK_ISTEDIGINIZDEN_EMIN_MISINIZ'\n onClick={() => setStatus(CompanySuspensionStatusEnum.Mali_Müşavir_Değiştirdi)}\n />\n \n )}\n\n {adminState?.company?.company?.suspensionStatusId ==\n CompanySuspensionStatusEnum.Şirketi_Kapatmak_İstiyor___Tasfiye_Başladı && (\n <>\n \n Tasfiye İptal Et\n \n }\n message='FESIH_DURUMUNU_DEGISTIRMEK_ISTEDIGINIZDEN_EMIN_MISINIZ'\n onClick={() => setStatus(0)}\n />\n \n Tasfiye Başladı\n \n }\n message='FESIH_DURUMUNU_DEGISTIRMEK_ISTEDIGINIZDEN_EMIN_MISINIZ'\n onClick={() => setStatus(CompanySuspensionStatusEnum.Tasfiye_Başladı)}\n />\n \n )}\n\n {adminState?.company?.company?.suspensionStatusId ==\n CompanySuspensionStatusEnum.Tasfiye_Başladı && (\n <>\n \n Tasfiye İptal Et\n \n }\n message='FESIH_DURUMUNU_DEGISTIRMEK_ISTEDIGINIZDEN_EMIN_MISINIZ'\n onClick={() => setStatus(0)}\n />\n \n Tasfiye Tamamlandı\n \n }\n message='FESIH_DURUMUNU_DEGISTIRMEK_ISTEDIGINIZDEN_EMIN_MISINIZ'\n onClick={() =>\n setStatus(CompanySuspensionStatusEnum.Şirket_Kapandı___Tasfiye_Sonuçlandı)\n }\n />\n \n )}\n
    \n )\n}\n\nexport default CompanySetSuspensionStatus\n","import {\n AdminPanelCompaniesStartupDTO,\n AdminPanelCompanyDetailDTO,\n AdminPanelCompanyDetailStartupDTO,\n BooleanApiData,\n UpdateCompanyRequest,\n UpdateUserActiveStatusRequest,\n} from '../../../api/data-contracts'\nimport _ from 'lodash'\nimport {\n UserTypeAuthorizationsEnum,\n ApplicationStepEnum,\n UserTypeEnum,\n} from '../../../apiClient/enums'\nimport {CanIDoThat} from '../../../utils/CanIDoThat'\nimport FormMessage from '../../common/messages/FormMessage'\nimport AreYouSurePopup from '../../common/popup/AreYouSurePopup'\nimport CustomDropdown from '../../form/dropdown/CustomDropdown'\nimport FormCheckboxInput from '../../form/FormCheckboxInput'\nimport FormikForm from '../../form/FormikForm'\nimport FormInput from '../../form/FormInput'\nimport PhoneNumberInput from '../../form/PhoneNumberInput'\nimport {FormikValues} from 'formik'\nimport {useIntl} from 'react-intl'\nimport {useDispatch, useSelector} from 'react-redux'\nimport {Api_Admin_ChangeUserActive, Api_Admin_UpdateCompany} from '../../../apiClient/apiClient'\nimport {setIsLoading, postRequestAsync} from '../../../redux/commonSlice'\nimport {setFormikStatus} from '../../../utils/utilities'\nimport * as Yup from 'yup'\nimport {getAdminState} from '../../../redux/adminSlice'\nimport CompanyDetailFormInputLabel from './CompanyDetailFormInputLabel'\nimport CompanyDetailFormDataLabel from './CompanyDetailFormDataLabel'\nimport AuthorizedComponent from '../../common/auth/AuthorizedComponent'\nimport CompanySetSuspensionStatus from './CompanySetSuspensionStatus'\n\nfunction CompanyDetailForm(data: {\n load: () => void\n startUp: AdminPanelCompanyDetailStartupDTO | undefined | null\n}) {\n const adminstate = useSelector(getAdminState)\n\n const schema = Yup.object().shape({\n name: Yup.string().required('SIRKET_KISA_ADI_ZORUNLUDUR'),\n phoneNumber: Yup.string()\n .phone('TR', false, 'TELEFON_NUMARASI_TELEFON')\n .required('TELEFON_NUMARASI_REQUIRED'),\n email: Yup.string()\n .email('EPOSTA_ADRESI_EPOSTA')\n .min(3, 'EPOSTA_ADRESI_MIN')\n .max(50, 'EPOSTA_ADRESI_MAX')\n .required('EPOSTA_ADRESI_REQUIRED'),\n })\n\n const intl = useIntl()\n\n const dispatch = useDispatch()\n\n const submit = async (values: UpdateCompanyRequest, actions: FormikValues) => {\n dispatch(setIsLoading(true))\n await dispatch(\n postRequestAsync({\n postRequestFunction: Api_Admin_UpdateCompany,\n body: values,\n })\n )\n .unwrap()\n .then(async (response: BooleanApiData) => {\n setFormikStatus(actions, response)\n data.load()\n })\n }\n\n let initData: UpdateCompanyRequest = {\n taxNumber: adminstate.company?.company?.taxAdministrationNumber ?? '',\n companyId: adminstate.company?.company?.guid ?? '',\n //canOpenMultipleCompany: false,\n financialAdvisorUserId: adminstate.company?.assignedFinancialAdvisorUserId ?? 0,\n name: adminstate.company?.company?.shortName ?? '',\n stepId: adminstate.company?.company?.stepId ?? 0,\n referenceId: adminstate.company?.users?.at(0)?.referenceId ?? 0,\n suspensionReasonId: adminstate.company?.company?.suspensionReasonId ?? 0,\n isInspectionApproved: adminstate.company?.company?.isInspectionApproved ?? false,\n phoneNumber: adminstate.company?.users?.at(0)?.phoneNumber ?? '',\n email: adminstate.company?.users?.at(0)?.mailAddress ?? '',\n }\n\n const changeUserActive = async () => {\n dispatch(setIsLoading(true))\n const body: UpdateUserActiveStatusRequest = {\n companyId: adminstate.company?.company?.guid ?? '',\n isActive: adminstate.company?.users?.at(0)?.isActive ? false : true,\n }\n await dispatch(\n postRequestAsync({\n postRequestFunction: Api_Admin_ChangeUserActive,\n body: body,\n })\n )\n .unwrap()\n .then(async (response: BooleanApiData) => {\n dispatch(setIsLoading(false))\n })\n }\n\n return (\n \n {(props) => {\n return (\n <>\n
    \n
    \n

    Şirket Bilgileri

    \n
    \n \n \n \n
    \n
    \n\n
    \n \n
    \n \n
    \n\n \n \n
    \n\n
    \n\n
    \n \n\n
    \n \n
    \n\n
    \n \n
    \n \n
    \n
    \n
    \n\n
    \n\n
    \n \n <>\n \n\n
    \n {},\n }}\n noSelectionText='FIRMA_DURUM_SECINIZ'\n options={_.orderBy(\n Object.entries(ApplicationStepEnum)\n ?.filter((f) => {\n return isNaN(Number(f[0]))\n })\n .map(([key, value]) => ({\n label: intl.formatMessage({id: key}) ?? '',\n value: value ?? '',\n })) ?? [],\n (o) => o.label\n )}\n noSelectionValue={0}\n placeHolderOnTop={false}\n setFieldValue={props.setFieldValue}\n valueConverter={parseInt}\n />\n
    \n \n \n\n \n \n\n
    \n {},\n }}\n noSelectionText='MALI_MUSAVIR_SECINIZ'\n options={\n data.startUp?.financialAdvisors?.map((m) => ({\n label: m.description ?? '',\n value: m.id ?? '',\n })) ?? []\n }\n noSelectionValue={0}\n placeHolderOnTop={false}\n setFieldValue={props.setFieldValue}\n valueConverter={parseInt}\n />\n
    \n \n
    \n\n
    \n\n
    \n \n \n\n \n\n
    \n {},\n disabled: !CanIDoThat(\n UserTypeAuthorizationsEnum.Admin_Panel_Company_Update_Suspension_Reason\n ),\n }}\n noSelectionText=''\n options={\n data.startUp?.companySuspensionReasons?.map((m) => ({\n label: m.description ?? '',\n value: m.id ?? '',\n })) ?? []\n }\n noSelectionValue={0}\n placeHolderOnTop={false}\n setFieldValue={props.setFieldValue}\n valueConverter={parseInt}\n />\n
    \n
    \n\n {(adminstate.company?.company?.suspensionStatusId ?? 0) > 0 && (\n
    \n \n \n\n
    \n
    \n )}\n\n
    \n
    \n

    Kişi Bilgileri

    \n
    \n \n \n \n {adminstate.company?.users?.at(0)?.isActive\n ? 'Kişi Pasife Al'\n : 'Kişiyi Aktif Et'}\n \n \n }\n message={'EMIN_MISINIZ'}\n onClick={() => changeUserActive()}\n />\n \n
    \n
    \n\n
    \n \n \n\n \n \n\n
    \n {},\n disabled: !CanIDoThat(\n UserTypeAuthorizationsEnum.Admin_Panel_Company_Update_Reference\n ),\n }}\n noSelectionText=''\n options={\n data.startUp?.references?.map((m) => ({\n label: m.description ?? '',\n value: m.id ?? '',\n })) ?? []\n }\n noSelectionValue={0}\n placeHolderOnTop={false}\n setFieldValue={props.setFieldValue}\n valueConverter={parseInt}\n />\n
    \n \n
    \n\n
    \n\n
    \n \n
    \n \n \n \n
    \n \n
    \n \n \n \n
    \n
    \n\n
    \n\n
    \n \n \n
    \n\n
    \n

    Diğer

    \n\n
    \n \n
    \n {adminstate.company?.products?.map((m) => (\n \n {m}\n \n ))}\n
    \n
    \n\n
    \n\n
    \n \n
    \n \n {adminstate.company?.company?.partnerCount}\n \n
    \n \n
    \n \n {adminstate.company?.company?.personnelCount}\n \n
    \n
    \n\n
    \n\n
    \n \n
    \n \n {adminstate.company?.company?.operationAddressType}\n \n
    \n \n
    \n \n {adminstate.company?.company?.capitalAmount}\n \n
    \n
    \n\n
    \n\n
    \n\n
    \n
    \n \n
    \n
    \n\n \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n )\n }}\n \n )\n}\n\nexport default CompanyDetailForm\n","import React, {useState} from 'react'\nimport {UpdatePurchasePriceRequest} from '../../../../api/data-contracts'\nimport {postRequestAsync} from '../../../../redux/commonSlice'\nimport {Api_Admin_UpdatePurchasePrice} from '../../../../apiClient/apiClient'\nimport {BooleanApiData} from '../../../../api/data-contracts'\nimport {useDispatch} from 'react-redux'\n\nfunction AdminPurchasePriceUpdate(props: {\n purchaseId: number\n defaultAmount?: number\n load?: () => void\n close: () => void\n}) {\n const dispatch = useDispatch()\n\n const [amount, setAmount] = useState(0)\n\n async function updatePurchasePrice(purchaseId: number, amount: number) {\n const body: UpdatePurchasePriceRequest = {\n purchaseId: purchaseId,\n amount: amount,\n }\n\n const response: BooleanApiData = await dispatch(\n postRequestAsync({\n postRequestFunction: Api_Admin_UpdatePurchasePrice,\n body: body,\n })\n ).unwrap()\n\n if (response.data) {\n props.load && props.load()\n props.close && props.close()\n }\n }\n\n\n return (\n
    \n
    \n setAmount(Number(e.target.value))}\n />\n
    \n
    \n {\n updatePurchasePrice(props.purchaseId ?? 0, amount)\n }}\n >\n Kaydet\n \n
    \n
    \n )\n}\n\nexport default AdminPurchasePriceUpdate\n","import React, {useState} from 'react'\nimport {UpdatePaymentPriceRequest} from '../../../../api/data-contracts'\nimport {postRequestAsync} from '../../../../redux/commonSlice'\nimport {Api_Admin_UpdatePaymentPrice} from '../../../../apiClient/apiClient'\nimport {BooleanApiData} from '../../../../api/data-contracts'\nimport {useDispatch} from 'react-redux'\n\nfunction AdminPaymentPriceUpdate(props: {\n paymentId: number\n defaultAmount?: number\n load?: () => void\n close: () => void\n}) {\n const dispatch = useDispatch()\n\n const [amount, setAmount] = useState(0)\n function updatePaymentPrice(paymentId: number, amount: number) {\n const body: UpdatePaymentPriceRequest = {\n paymentId: paymentId,\n amount: amount,\n }\n\n dispatch(\n postRequestAsync({\n postRequestFunction: Api_Admin_UpdatePaymentPrice,\n body: body,\n })\n )\n .unwrap()\n .then(async function (response: BooleanApiData) {\n if (response.data) {\n props.load && props.load()\n props.close && props.close()\n }\n })\n }\n\n return (\n
    \n
    \n setAmount(Number(e.target.value))}\n />\n
    \n
    \n {\n updatePaymentPrice(props.paymentId ?? 0, amount)\n }}\n >\n Kaydet\n \n
    \n
    \n )\n}\n\nexport default AdminPaymentPriceUpdate\n","import {\n BooleanApiData,\n CancelPaymentRequest,\n AdminPaymentDTO,\n RefundPaymentRequest,\n AdminCompanyPurchaseDTO,\n BaseIdRequest,\n} from '../../../../api/data-contracts'\nimport moment from 'moment'\nimport {useDispatch, useSelector} from 'react-redux'\nimport {ProductTypeEnum, UserTypeAuthorizationsEnum} from '../../../../apiClient/enums'\nimport _ from 'lodash'\nimport {\n Api_Admin_CancelPayment,\n Api_Admin_RefundPayment,\n Api_Admin_RestartPurchase,\n Api_Admin_StopPurchase,\n} from '../../../../apiClient/apiClient'\nimport {postRequestAsync} from '../../../../redux/commonSlice'\nimport BootstrapTable, {ColumnDescription} from 'react-bootstrap-table-next'\nimport AreYouSurePopup from '../../../common/popup/AreYouSurePopup'\nimport Translator from '../../../common/translate/Translator'\nimport TranslatorText from '../../../common/translate/TranslatorText'\nimport {getAdminState} from '../../../../redux/adminSlice'\nimport clsx from 'clsx'\nimport {getPaymentStateColor} from '../../../../utils/utilities'\nimport AuthorizedComponent from '../../../common/auth/AuthorizedComponent'\nimport BasePopup, {PopupProvides} from '../../../common/popup/BasePopup'\nimport AdminPurchasePriceUpdate from './AdminPurchasePriceUpdate'\nimport AdminPaymentPriceUpdate from './AdminPaymentPriceUpdate'\nfunction AdminCompanyPurchases(props: {load?: () => void}) {\n const dispatch = useDispatch()\n const adminState = useSelector(getAdminState)\n\n function cancelPayment(paymentId: number) {\n const body: CancelPaymentRequest = {\n paymentId: paymentId,\n }\n\n dispatch(\n postRequestAsync({\n postRequestFunction: Api_Admin_CancelPayment,\n body: body,\n })\n )\n .unwrap()\n .then(async function (response: BooleanApiData) {\n if (response.data) {\n props.load && props.load()\n }\n })\n }\n\n function stopPurchase(purchaseId: number) {\n const body: BaseIdRequest = {\n id: purchaseId,\n }\n\n dispatch(\n postRequestAsync({\n postRequestFunction: Api_Admin_StopPurchase,\n body: body,\n })\n )\n .unwrap()\n .then(async function (response: BooleanApiData) {\n if (response.data) {\n props.load && props.load()\n }\n })\n }\n\n function startPurchase(purchaseId: number) {\n const body: BaseIdRequest = {\n id: purchaseId,\n }\n dispatch(\n postRequestAsync({\n postRequestFunction: Api_Admin_RestartPurchase,\n body: body,\n })\n )\n .unwrap()\n .then(async function (response: BooleanApiData) {\n if (response.data) {\n props.load && props.load()\n }\n })\n }\n\n function refundPayment(paymentId: number) {\n const body: RefundPaymentRequest = {\n paymentId: paymentId,\n }\n\n dispatch(\n postRequestAsync({\n postRequestFunction: Api_Admin_RefundPayment,\n body: body,\n })\n )\n .unwrap()\n .then(async function (response: BooleanApiData) {\n if (response.data) {\n props.load && props.load()\n }\n })\n }\n\n const detailsColumns: ColumnDescription[] = [\n {\n dataField: 'dueDate',\n text: TranslatorText('ODENMESI_GEREKEN_ZAMAN') ?? '',\n sort: true,\n headerStyle: {width: '10%'},\n headerClasses: 'text-center',\n formatter: (cell: any, row: AdminPaymentDTO, rowIndex: number) =>\n rowIndex > 0 ? (\n
    {moment(row.dueDate).format('DD.MM.yyyy')}
    \n ) : null,\n },\n {\n dataField: 'paymentTime',\n text: TranslatorText('ODEME_ZAMANI') ?? '',\n sort: true,\n headerStyle: {width: '10%'},\n headerClasses: 'text-center',\n formatter: (cell: any, row: AdminPaymentDTO) => (\n
    \n {row.paymentTime && moment(row.paymentTime).format('DD.MM.yyyy')}\n
    \n ),\n },\n {\n dataField: 'paymentState',\n text: TranslatorText('ODEME_DURUMU') ?? '',\n sort: true,\n headerStyle: {width: '15%'},\n headerClasses: 'text-center',\n formatter: (cell: any, row: AdminPaymentDTO) => (\n
    \n \n {row.paymentStateDescription}\n \n {row.isDebt && row.errorInfo && (\n {row.errorInfo}\n )}\n
    \n ),\n },\n {\n dataField: 'isInvoicePrinted',\n text: TranslatorText('FATURA_DURUMU') ?? '',\n sort: true,\n headerStyle: {width: '10%'},\n headerClasses: 'text-center',\n formatter: (cell: any, row: AdminPaymentDTO) => (\n
    \n {!row.invoiceUrl && (\n
    \n
    {row.isInvoicePrinted ? 'Basıldı' : 'Basılmadı'}
    \n
    \n )}\n \n {row.invoiceUrl && (\n
    \n
    \n \n \n \n \n \n
    \n
    \n )}\n \n
    \n ),\n },\n {\n dataField: 'actions',\n text: 'İade / İptal',\n headerStyle: {width: '10%'},\n headerClasses: 'text-center',\n formatter: (cell: any, row: AdminPaymentDTO) => (\n <>\n {row.isRefundable && process.env.REACT_APP_ENV !== 'PROD' && (\n
    \n
    \n \n \n
    \n }\n message={'IADE_ETMEK_ISTEDIGINIZDEN_EMIN_MISINIZ'}\n onClick={() => refundPayment(row.paymentId ?? 0)}\n />\n
    \n \n )}\n\n {row.isCancellable && (\n
    \n
    \n \n \n
    \n }\n message={'IPTAL_ETMEK_ISTEDIGINIZDEN_EMIN_MISINIZ'}\n onClick={() => cancelPayment(row.paymentId ?? 0)}\n />\n
    \n \n )}\n \n ),\n },\n {\n dataField: 'totalAmount',\n text: 'Miktar',\n sort: true,\n headerClasses: 'text-end',\n headerStyle: {width: '10%'},\n formatter: (cell: any, row: AdminPaymentDTO) => (\n
    \n
    \n {row.isAmountEditable && (\n \n \n
    \n }\n >\n {(providers: PopupProvides) => (\n <>\n \n \n )}\n \n )}\n
    {Math.round(row.totalAmount ?? 0)} ₺
    \n
    \n \n ),\n },\n ]\n\n const discountColumn = {\n dataField: 'discountAmount',\n text: 'İndirim',\n sort: true,\n headerClasses: 'text-end',\n headerStyle: {width: '10%'},\n formatter: (cell: any, row: AdminPaymentDTO) => (\n
    \n {(row.discountAmount ?? 0) < 0 && (\n
    {Math.round(row.discountAmount ?? 0)} ₺
    \n )}\n {(row.discountAmount ?? 0) < 0 && (\n
    {row.discountCode}
    \n )}\n
    \n ),\n }\n\n function generatePaymentDetailColumns(purchase: AdminCompanyPurchaseDTO): ColumnDescription[] {\n const uniqueServiceProviders = Array.from(\n new Set(\n purchase.payments?.flatMap(\n (payment) => payment.serviceProviders?.map((sp) => sp.serviceProviderName) || []\n ) || []\n )\n )\n\n const serviceProviderColumns = uniqueServiceProviders.map((sp) => {\n const col: ColumnDescription = {\n dataField: `serviceProvider_${sp}`,\n text: sp ?? '',\n sort: true,\n headerStyle: {width: '10%'},\n headerClasses: 'text-end',\n formatter: (cell: any, row: AdminPaymentDTO) => (\n
    \n {_.sumBy(\n row.serviceProviders?.filter((f) => f.serviceProviderName === sp),\n (s) => s.amount ?? 0\n ).toFixed(0)}{' '}\n {'₺'}\n
    \n ),\n }\n\n return col\n })\n\n return [...detailsColumns, ...serviceProviderColumns, discountColumn]\n }\n\n function getSortedPurchases() {\n return _.orderBy(\n adminState.company?.purchases ?? [],\n [(o) => (o.product?.productTypeId === 3 ? 0 : 1), (o) => new Date(o.firstPurchaseTime ?? '')],\n ['asc', 'desc']\n )\n }\n\n function getRowColor(productTypeId: number) {\n if (productTypeId === ProductTypeEnum.Paket) {\n return 'bg-success'\n } else if (productTypeId === ProductTypeEnum.Ek_Çözüm) {\n return 'bg-primary'\n } else {\n return 'bg-warning'\n }\n }\n\n const mainTableColumns: ColumnDescription[] = [\n {\n dataField: 'purchaseId',\n text: 'Satın Alınan Ürün',\n sort: true,\n headerClasses: 'text-start',\n headerStyle: {width: '100%'},\n headerFormatter: (column) => (\n
    \n
    {'Ürün'}
    \n
    {'Başlangıç'}
    \n
    {'Bitiş'}
    \n
    {'Toplam'}
    \n
    {'Gelecek'}
    \n
    {'Borç'}
    \n
    \n ),\n formatter: (cell: any, row: AdminCompanyPurchaseDTO, rowIndex: number, colIndex: number) => {\n const headerId = `kt_accordion_1_header_${rowIndex}`\n const bodyId = `kt_accordion_1_body_${rowIndex}`\n return (\n
    \n \n

    \n

    \n \n
    \n
    \n {row.isStoppable && (\n
    \n
    \n \n \n
    \n }\n message={'SATIN_ALINAN_URUNU_DURDURMEK_ISTEDIGINIZDEN_EMIN_MISINIZ'}\n onClick={() => stopPurchase(row.purchaseId ?? 0)}\n />\n
    \n
    \n )}\n {row.isStartable && (\n
    \n
    \n \n \n
    \n }\n message={\n 'SATIN_ALINAN_URUNU_DEVAM_ETTIRMEK_ISTEDIGINIZDEN_EMIN_MISINIZ'\n }\n onClick={() => startPurchase(row.purchaseId ?? 0)}\n />\n
    \n
    \n )}\n {row.canEditAmount && (\n
    \n
    \n \n \n
    \n }\n >\n {(providers: PopupProvides) => (\n <>\n \n \n )}\n \n
    \n
    \n )}\n \n
    \n o.dueDate, 'asc') ?? []}\n columns={generatePaymentDetailColumns(row)}\n classes='table table-rounded table-striped border gt-7 gs-7'\n headerClasses='fw-bold fs-6 text-gray-800 border-bottom border-gray-200'\n />\n
    \n \n \n \n \n )\n },\n },\n ]\n\n return (\n <>\n
    \n <>\n
    \n \n
    \n \n
    \n \n )\n}\n\nexport default AdminCompanyPurchases\n","import _ from 'lodash'\nimport {useState, useEffect} from 'react'\nimport {useDispatch, useSelector} from 'react-redux'\nimport {\n AdminPanelCompanyDetailDTO,\n GetAdminCompanyRequest,\n AdminPanelCompanyDetailDTOApiData,\n AdminPanelCompanyDetailStartupDTO,\n AdminPanelCompanyDetailStartupDTOApiData,\n} from '../../../api/data-contracts'\nimport {Api_Admin_GetCompany, Api_Admin_GetCompanyDetailStartup} from '../../../apiClient/apiClient'\nimport {setIsLoading, postRequestAsync, getRequestAsync} from '../../../redux/commonSlice'\nimport PaymentsTable from '../../../components/customer/finance/PaymentsTable'\nimport {useParams} from 'react-router-dom'\nimport {CompanyStatusHeader} from '../../../components/admin/company/CompanyStatusHeader'\nimport CompanyDetailForm from '../../../components/admin/company/CompanyDetailForm'\nimport {KTSVG} from '../../../../_metronic/helpers'\nimport {getAdminState, setAdminSelectedCompany} from '../../../redux/adminSlice'\nimport {defterdar_log} from '../../../utils/utilities'\nimport {ApplicationStepEnum, UserTypeAuthorizationsEnum} from '../../../apiClient/enums'\nimport clsx from 'clsx'\nimport DocumentsPage from '../../document/DocumentsPage'\nimport AuthorizedComponent from '../../../components/common/auth/AuthorizedComponent'\nimport AdminCompanyPurchases from '../../../components/admin/company/payment/AdminCompanyPurchases'\n\nfunction AdminCompanyDetailPage() {\n const {id} = useParams()\n\n const adminState = useSelector(getAdminState)\n const [startUp, setStartUp] = useState(null)\n\n const dispatch = useDispatch()\n\n const loadCompanyData = () => {\n const body: GetAdminCompanyRequest = {\n companyGuidId: id,\n }\n dispatch(setIsLoading(true))\n dispatch(\n postRequestAsync({\n postRequestFunction: Api_Admin_GetCompany,\n body: body,\n })\n )\n .unwrap()\n .then(async function (response: AdminPanelCompanyDetailDTOApiData) {\n dispatch(setAdminSelectedCompany(response.data))\n dispatch(setIsLoading(false))\n })\n }\n\n async function load() {\n await dispatch(\n getRequestAsync({\n getRequestFunction: Api_Admin_GetCompanyDetailStartup,\n })\n )\n .unwrap()\n .then(async function (response: AdminPanelCompanyDetailStartupDTOApiData) {\n setStartUp(response.data)\n loadCompanyData()\n })\n }\n\n useEffect(() => {\n load()\n }, [])\n\n return (\n
    \n
    \n
    \n
    \n \n \n Geri\n \n
    {adminState?.company?.company?.fullName}
    \n
    \n
    \n\n
    \n \n
    \n
    \n
    \n\n
    \n <>\n
    \n
    \n
      \n
    • \n \n Bilgiler\n \n
    • \n \n
    • \n \n Dökümanlar\n {adminState?.company?.company?.stepId ==\n ApplicationStepEnum.Turkey_WizardFinished && (\n \n )}\n \n
    • \n \n
    • \n \n Ödemeler\n \n
    • \n
    \n
    \n
    \n\n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n {adminState?.company && (\n \n )}\n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n )\n}\n\nexport default AdminCompanyDetailPage\n","import {Modal} from 'react-bootstrap'\nimport {KTSVG} from '../../../../_metronic/helpers'\nimport {useEffect, useState} from 'react'\nimport {\n AdminDiscountPageDataApiData,\n AdminProductPrice,\n BooleanApiData,\n DiscountDTO,\n UpsertDiscountRequest,\n} from '../../../api/data-contracts'\nimport _ from 'lodash'\nimport {Field, FieldArray, FormikValues} from 'formik'\nimport {useSelector, useDispatch} from 'react-redux'\nimport {Api_Admin_GetDiscountPage, Api_Admin_UpsertDiscount} from '../../../apiClient/apiClient'\nimport FormMessage from '../../../components/common/messages/FormMessage'\nimport FormikForm from '../../../components/form/FormikForm'\nimport FormInput from '../../../components/form/FormInput'\nimport {getAdminState, setDiscountsPageData} from '../../../redux/adminSlice'\nimport {getRequestAsync, postRequestAsync} from '../../../redux/commonSlice'\nimport {FormStatus} from '../../../types/FormStatus'\nimport * as Yup from 'yup'\nimport CustomDropdown, {DropdownOption} from '../../../components/form/dropdown/CustomDropdown'\nimport {defterdar_log} from '../../../utils/utilities'\nimport moment from 'moment'\nimport FormCheckboxInput from '../../../components/form/FormCheckboxInput'\n\nfunction AdminDiscountDetailPopup(props: {discountId?: number | null}) {\n const adminState = useSelector(getAdminState)\n\n const newDiscount: DiscountDTO = {\n isActive: true,\n prices: [\n {\n totalPrice: 0,\n totalPriceWithoutTax: 0,\n serviceProviderShares: [\n {\n serviceProviderId: 6,\n serviceProvider: 'Defterdar',\n totalPrice: 0,\n totalPriceWithoutTax: 0,\n },\n {\n serviceProviderRoleId: 2,\n serviceProviderRole: 'Mali Müşavir',\n totalPrice: 0,\n totalPriceWithoutTax: 0,\n },\n ],\n },\n ],\n }\n\n let discount =\n adminState.discountsPage?.discounts?.find((m) => m.id === props.discountId) ?? newDiscount\n\n const [modalShow, setModalShow] = useState(false)\n\n const [selectedServiceProviderId, setSelectedServiceProviderId] = useState(0)\n\n const [selectedPriceMode, setSelectedPriceMode] = useState(false)\n\n const handleModalClose = () => setModalShow(false)\n\n const load = () => {\n setModalShow(true)\n }\n\n const schema = Yup.object({})\n\n const dispatch = useDispatch()\n\n useEffect(() => {\n setSelectedPriceMode((discount?.discountPercentage ?? 0) > 0 ? false : true)\n }, [])\n\n const initData: UpsertDiscountRequest = {\n activitySchedule: discount?.activitySchedule ?? '',\n code: discount?.code ?? '',\n discountDescription: discount?.discountDescription ?? '',\n discountPercentage: discount?.discountPercentage ?? 0,\n eligibleProductIds: discount?.eligibleProductIds ?? [],\n endTime: moment(discount?.endTime ?? '').format('yyyy-MM-DD'),\n id: discount?.id ?? 0,\n isAutomatic: discount?.isAutomatic ?? false,\n prices: discount?.prices ?? [],\n startTime: moment(discount?.startTime ?? '').format('yyyy-MM-DD'),\n }\n\n function reloadDiscounts() {\n dispatch(\n getRequestAsync({\n getRequestFunction: Api_Admin_GetDiscountPage,\n })\n )\n .unwrap()\n .then(async function (response: AdminDiscountPageDataApiData) {\n dispatch(setDiscountsPageData(response.data))\n setModalShow(false)\n })\n }\n const submit = async (values: UpsertDiscountRequest, actions: FormikValues) => {\n actions.setStatus()\n values.id = discount?.id\n values.startTime = !moment(values.startTime).isValid() ? null : values.startTime\n values.endTime = !moment(values.endTime).isValid() ? null : values.endTime\n if (selectedPriceMode) {\n values.discountPercentage = 0\n }\n\n await dispatch(\n postRequestAsync({\n postRequestFunction: Api_Admin_UpsertDiscount,\n body: values,\n })\n )\n .unwrap()\n .then(async (response: BooleanApiData) => {\n if (response.data == true) {\n actions.setStatus(new FormStatus(true, 'İndirim Kaydedildi.'))\n reloadDiscounts()\n } else {\n actions.setStatus(new FormStatus(false, response.serverMessage))\n }\n })\n }\n\n function generatePriceForServiceProvider(serviceProviderId: number): AdminProductPrice {\n const financialAdvisorUserId =\n adminState.productsPage?.serviceProviders?.find((m) => m.id === serviceProviderId)?.userId ??\n 0\n\n const name = adminState.productsPage?.serviceProviders?.find(\n (m) => m.id === serviceProviderId\n )?.description\n\n return {\n financialAdvisorUserId: financialAdvisorUserId,\n financialAdvisorUser: name,\n serviceProviderShares: [\n {\n serviceProviderId: 6,\n serviceProvider: 'Defterdar',\n serviceProviderRole: '',\n serviceProviderRoleId: 0,\n totalPrice: 0,\n totalPriceWithoutTax: 0,\n },\n {\n serviceProviderId: serviceProviderId,\n serviceProvider: name,\n serviceProviderRole: '',\n serviceProviderRoleId: 0,\n totalPrice: 0,\n totalPriceWithoutTax: 0,\n },\n ],\n }\n }\n\n return (\n <>\n {!((discount?.id ?? 0) > 0) ? (\n {\n load()\n }}\n >\n İndirim Ekle +\n \n ) : (\n {\n load()\n }}\n className='btn btn-icon btn-bg-light btn-active-color-primary btn-sm me-1'\n >\n \n \n )}\n\n \n \n {discount != null ? (\n
    \n {discount?.code} {'İndirim Kodu'}{' '}\n
    \n ) : (\n
    {'Yeni İndirim'}
    \n )}\n
    \n \n \n {(form_props) => {\n return (\n <>\n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n \n Otomatik seçildiğinde, aşağıda seçilen ürünler sepete eklendiği anda indirim\n kodu girilmesine gerek kalmadan otomatik indirim uygulanacaktır.\n \n
    \n\n
    \n \n {\n if (Number(e.target.value) > 0) {\n const ones = '1'.repeat(Math.min(Number(e.target.value), 12))\n const zeros = '0'.repeat(12 - Math.min(Number(e.target.value), 12))\n form_props.setFieldValue('activitySchedule', ones + zeros)\n } else {\n form_props.setFieldValue('activitySchedule', undefined)\n }\n }}\n />\n
    \n
    \n \n Eğer kaç ay uygulanacağı belirlenirse, girilen değer kadar indirim uygulanır\n sonrasında indirim uygulanmaz. Sadece şirket kuruluş paketi gibi periyodik\n ödeme alınan ürünlerde geçerli olur. Eğer belirtilmezse, tüm aylar için\n geçerli olur.\n \n
    \n
    \n
    \n
    \n \n
    \n (\n <>\n {adminState.discountsPage?.products?.map((product) => (\n
    \n ) => {\n const isChecked =\n form_props.values.eligibleProductIds?.includes(\n product?.id ?? 0\n )\n if (isChecked) {\n form_props.setFieldValue(\n 'eligibleProductIds',\n form_props.values.eligibleProductIds?.filter(\n (item) => item !== product?.id\n )\n )\n } else {\n form_props.setFieldValue('eligibleProductIds', [\n ...(form_props.values.eligibleProductIds ?? []),\n product?.id,\n ])\n }\n }}\n />\n \n
    \n ))}\n \n )}\n />\n
    \n
    \n
    \n \n
    \n {\n setSelectedPriceMode(!selectedPriceMode)\n }}\n />\n \n
    \n {selectedPriceMode ? (\n <>\n (\n
    \n
    \n {form_props.values?.prices?.map((price, index) => (\n
    \n
    \n
    \n
    \n
    \n
    \n {(price.financialAdvisorUserId ?? 0) > 0 && (\n
    \n arrayHelpers.remove(index)}\n >\n \n \n
    \n )}\n
    \n
    \n
    \n
    \n {price.financialAdvisorUserId\n ? price.financialAdvisorUser + ' İçin Fiyatlar'\n : 'Varsayılan Fiyatlar'}\n
    \n
    \n KDV'siz\n
    \n
    \n KDV'li\n
    \n
    \n {price?.serviceProviderShares?.map((m, i) => {\n return (\n
    \n
    \n
    \n {(m.serviceProviderRoleId ?? 0) > 0 ? (\n
    {m.serviceProviderRole}
    \n ) : (\n <>{m.serviceProvider} \n )}\n
    \n
    \n
    \n {\n const value = parseFloat(\n event.target.value == ''\n ? 0\n : event.target.value\n )\n form_props.setFieldValue(\n `prices.${index}.serviceProviderShares.${i}.totalPriceWithoutTax`,\n value\n )\n\n form_props.setFieldValue(\n `prices.${index}.serviceProviderShares.${i}.totalPrice`,\n value * 1.2\n )\n },\n }}\n istouched={true}\n errorMessage={undefined}\n placeHolderOnTop={false}\n checkValid={false}\n />\n
    \n
    \n {\n const value = parseFloat(\n event.target.value == ''\n ? 0\n : event.target.value\n )\n form_props.setFieldValue(\n `prices.${index}.serviceProviderShares.${i}.totalPrice`,\n value\n )\n\n // form_props.setFieldValue(\n // `prices.${index}.shares.${i}.totalPriceWithoutTax`,\n // value / 1.2\n // )\n },\n }}\n istouched={true}\n errorMessage={undefined}\n placeHolderOnTop={false}\n checkValid={false}\n />\n
    \n
    \n )\n })}\n\n
    \n
    \n {!price.financialAdvisorUserId ? (\n {\n const defaultShares =\n form_props.values?.prices?.find(\n (m) => (m.financialAdvisorUserId ?? 0) === 0\n )?.serviceProviderShares\n\n form_props.values.prices?.forEach((m, i) => {\n if ((m.financialAdvisorUserId ?? 0) > 0) {\n price.serviceProviderShares?.forEach(\n (s, j) => {\n\n form_props.setFieldValue(\n `prices.${i}.serviceProviderShares.${j}.totalPriceWithoutTax`,\n defaultShares?.at(j)\n ?.totalPriceWithoutTax\n )\n form_props.setFieldValue(\n `prices.${i}.serviceProviderShares.${j}.totalPrice`,\n defaultShares?.at(j)?.totalPrice\n )\n }\n )\n }\n })\n }}\n >\n Tüm Mali Müşavirlere Aktar\n
    \n ) : (\n
    Toplam
    \n )}\n
    \n
    \n
    \n {_.sumBy(\n form_props.values.prices?.at(index)\n ?.serviceProviderShares,\n (s) => s.totalPriceWithoutTax ?? 0\n ).toFixed(2)}\n
    \n
    \n
    \n {_.sumBy(\n form_props.values.prices?.at(index)\n ?.serviceProviderShares,\n (s) => s.totalPrice ?? 0\n ).toFixed(2)}\n
    \n
    \n
    \n
    \n ))}\n
    \n\n
    \n
    \n
    \n
    \n {\n setSelectedServiceProviderId(\n parseInt(event.target.value)\n )\n },\n }}\n noSelectionText='SERVIS_SAGLAYICI_SECINIZ'\n options={\n adminState.productsPage?.serviceProviders?.map((m) => {\n const v: DropdownOption = {\n label: m.description ?? '',\n value: m.id ?? 0,\n }\n return v\n }) ?? []\n }\n noSelectionValue={0}\n placeHolderOnTop={false}\n setFieldValue={form_props.setFieldValue}\n valueConverter={parseInt}\n />\n
    \n
    \n {\n const newPrice =\n generatePriceForServiceProvider(\n selectedServiceProviderId\n )\n arrayHelpers.push(newPrice)\n }}\n className='btn btn-lg btn-primary me-3'\n >\n Özel Fiyat Ekle +\n
    \n
    \n
    \n
    \n
    \n
    \n )}\n />\n \n ) : (\n <>\n
    \n
    \n \n
    \n
    \n \n )}\n \n \n
    \n
    \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n \n )\n }}\n
    \n
    \n
    \n \n )\n}\n\nexport default AdminDiscountDetailPopup\n","import {useDispatch, useSelector} from 'react-redux'\nimport {\n AdminDiscountPageData,\n AdminDiscountPageDataApiData,\n AdminProductDTO,\n AdminProductPageDataApiData,\n DiscountDTO,\n} from '../../../api/data-contracts'\nimport {getAdminState, setDiscountsPageData, setProductsPageData} from '../../../redux/adminSlice'\nimport _ from 'lodash'\nimport BootstrapTable, {ColumnDescription} from 'react-bootstrap-table-next'\nimport paginationFactory, {\n PaginationListStandalone,\n PaginationProvider,\n PaginationTotalStandalone,\n SizePerPageDropdownStandalone,\n} from 'react-bootstrap-table2-paginator'\nimport 'react-bootstrap-table-next/dist/react-bootstrap-table2.min.css'\nimport 'react-bootstrap-table2-paginator/dist/react-bootstrap-table2-paginator.min.css'\nimport filterFactory, {selectFilter, textFilter} from 'react-bootstrap-table2-filter'\n\nimport {Api_Admin_GetDiscountPage, Api_Admin_GetProductsPage} from '../../../apiClient/apiClient'\nimport {getRequestAsync, postRequestAsync} from '../../../redux/commonSlice'\nimport {useEffect} from 'react'\nimport {getCurrencySymbol} from '../../../utils/utilities'\nimport clsx from 'clsx'\nimport AdminProductDetailPopup from '../Products/AdminProductDetailPopup'\nimport moment from 'moment'\nimport AdminDiscountDetailPopup from './AdminDiscountDetailPopup'\n\nfunction AdminDiscountPage() {\n const dispatch = useDispatch()\n const adminState = useSelector(getAdminState)\n\n useEffect(() => {\n dispatch(\n getRequestAsync({\n getRequestFunction: Api_Admin_GetDiscountPage,\n })\n )\n .unwrap()\n .then(async function (response: AdminDiscountPageDataApiData) {\n dispatch(setDiscountsPageData(response.data))\n })\n }, [])\n\n const columns: ColumnDescription[] = [\n {\n dataField: 'isActive',\n text: 'Aktif',\n sort: true,\n headerClasses: 'text-center',\n headerStyle: {width: '5%'},\n formatter: (cell: any, m: DiscountDTO, rowIndex: number, colIndex: number) => (\n
    \n {m.isActive && }\n
    \n ),\n },\n {\n dataField: 'code',\n text: 'İndirim Kodu',\n sort: true,\n headerStyle: {width: '40%'},\n formatter: (cell: any, m: DiscountDTO, rowIndex: number, colIndex: number) => (\n <>\n
    {m.code}
    \n \n ),\n },\n {\n dataField: 'discountPercentage',\n text: 'İndirim Miktarı',\n sort: true,\n headerStyle: {width: '10%'},\n formatter: (cell: any, m: DiscountDTO, rowIndex: number, colIndex: number) => (\n <>\n {m.discountPercentage ? (\n
    \n % {m.discountPercentage}\n
    \n ) : (\n <>\n
    \n {m.prices?.find((f) => (f.financialAdvisorUserId ?? 0) === 0)?.totalPrice} {'₺'}\n
    \n \n )}\n \n ),\n },\n {\n dataField: 'startTime',\n text: 'Başlangıç',\n sort: true,\n headerStyle: {width: '20%'},\n headerClasses: 'text-center',\n formatter: (cell: any, m: DiscountDTO, rowIndex: number, colIndex: number) => (\n <>\n
    \n {m.startTime && moment(m.startTime).format('DD.MM.yyyy HH:mm')}\n
    \n \n ),\n },\n {\n dataField: 'endTime',\n text: 'Bitiş',\n sort: true,\n headerStyle: {width: '20%'},\n headerClasses: 'text-center',\n formatter: (cell: any, m: DiscountDTO, rowIndex: number, colIndex: number) => (\n <>\n
    \n {m.endTime && moment(m.endTime).format('DD.MM.yyyy HH:mm')}\n
    \n \n ),\n },\n {\n dataField: '',\n text: 'Detay',\n sort: true,\n headerStyle: {width: '5%'},\n formatter: (cell: any, m: DiscountDTO, rowIndex: number, colIndex: number) => (\n <>\n
    \n \n
    \n \n ),\n },\n ]\n\n const rowClasses = (row: AdminProductDTO, rowIndex: number): string => {\n return clsx({\n 'bg-light-danger': !row.isActive,\n })\n }\n\n const newDiscount: DiscountDTO = {\n isActive: true,\n prices: [\n {\n totalPrice: 0,\n totalPriceWithoutTax: 0,\n serviceProviderShares: [\n {\n serviceProviderId: 6,\n serviceProvider: 'Defterdar',\n totalPrice: 0,\n totalPriceWithoutTax: 0,\n },\n {\n serviceProviderRoleId: 2,\n serviceProviderRole: 'Mali Müşavir',\n totalPrice: 0,\n totalPriceWithoutTax: 0,\n },\n ],\n },\n ],\n }\n\n return (\n <>\n
    \n
    \n \n\n
    \n {(adminState.discountsPage?.discounts?.length ?? 0) > 0 && (\n <>\n \n {({paginationProps, paginationTableProps}) => (\n <>\n
    \n \n \n \n o.id, 'desc') ??\n []\n }\n columns={columns}\n classes='table table-hover table-row-dashed table-rounded mt-5'\n />\n
    \n \n )}\n \n \n )}\n
    \n\n {/* begin::Table container */}\n\n {/* end::Table container */}\n
    \n {/* begin::Body */}\n
    \n \n )\n}\n\nexport default AdminDiscountPage\n","import {FC, Suspense} from 'react'\nimport {Navigate, Route, Routes} from 'react-router-dom'\nimport TopBarProgress from 'react-topbar-progress-indicator'\nimport {getCSSVariableValue} from '../../_metronic/assets/ts/_utils'\nimport {WithChildren} from '../../_metronic/helpers'\nimport AdminCompaniesPage from '../pages/admin/Companies/AdminCompaniesPage'\nimport PaymentInvoicesPage from '../pages/admin/Invoice/PaymentInvoicesPage'\nimport AdminPotentialsPage from '../pages/admin/PotentialCustomers/AdminPotentialsPage'\nimport AdminDashboardPage from '../pages/admin/dashboard/AdminDashboardPage'\nimport AdminProductsPage from '../pages/admin/Products/AdminProductsPage'\nimport AdminSettingsPage from '../pages/admin/Settings/AdminSettingsPage'\nimport AdminReportsPage from '../pages/admin/Report/AdminReportsPage'\nimport AdminReferencesPage from '../pages/admin/References/AdminReferencesPage'\nimport AdminCompanyDetailPage from '../pages/admin/Companies/AdminCompanyDetailPage'\nimport AdminDiscountPage from '../pages/admin/Discount/AdminDiscountPage'\n\nconst AdminRoutes = () => {\n return (\n \n \n \n \n }\n />\n \n \n \n }\n />\n \n \n \n }\n />\n \n \n \n }\n />\n \n \n \n }\n />\n \n \n \n }\n />\n \n \n \n }\n />\n\n \n \n \n }\n />\n \n \n \n }\n />\n\n \n \n \n }\n />\n } />\n \n )\n}\n\nconst SuspensedView: FC = ({children}) => {\n const baseColor = getCSSVariableValue('--kt-primary')\n TopBarProgress.config({\n barColors: {\n '0': baseColor,\n },\n barThickness: 1,\n shadowBlur: 5,\n })\n return }>{children}\n}\n\nexport {AdminRoutes}\n","import {Route, Routes, Navigate} from 'react-router-dom'\nimport {MasterLayout} from '../../_metronic/layout/MasterLayout'\nimport {useSelector} from 'react-redux'\nimport {getUserState} from '../redux/userSlice'\nimport {CustomerRoutes} from './CustomerRoutes'\nimport {AdminRoutes} from './AdminRoutes'\n\nconst PrivateRoutes = () => {\n const userState = useSelector(getUserState)\n\n return (\n \n }>\n } />\n {process.env.REACT_APP_ENV?.includes('ADMIN') == false && (\n <>\n <>\n } />\n \n } />\n \n )}\n\n {process.env.REACT_APP_ENV?.includes('ADMIN') == true && (\n <>\n } />\n\n } />\n \n )}\n\n } />\n \n \n )\n}\n\nexport {PrivateRoutes}\n","import {FC} from 'react'\nimport {Link} from 'react-router-dom'\nimport {toAbsoluteUrl} from '../../../_metronic/helpers'\n\nconst Error500: FC = () => {\n return (\n <>\n {/* begin::Title */}\n

    System Error

    \n {/* end::Title */}\n\n {/* begin::Text */}\n
    \n Something went wrong! Please try again later.\n
    \n {/* end::Text */}\n\n {/* begin::Illustration */}\n
    \n \n \n
    \n {/* end::Illustration */}\n\n {/* begin::Link */}\n
    \n \n Return Home\n \n
    \n {/* end::Link */}\n \n )\n}\n\nexport {Error500}\n","import {FC} from 'react'\nimport {Link} from 'react-router-dom'\nimport {toAbsoluteUrl} from '../../../_metronic/helpers'\n\nconst Error404: FC = () => {\n return (\n <>\n {/* begin::Title */}\n

    Oops!

    \n {/* end::Title */}\n\n {/* begin::Text */}\n
    We can't find that page.
    \n {/* end::Text */}\n\n {/* begin::Illustration */}\n
    \n \n \n
    \n {/* end::Illustration */}\n\n {/* begin::Link */}\n
    \n \n Return Home\n \n
    \n {/* end::Link */}\n \n )\n}\n\nexport {Error404}\n","import {useEffect} from 'react'\nimport {Outlet} from 'react-router-dom'\nimport {useThemeMode} from '../../../_metronic/partials'\nimport {toAbsoluteUrl} from '../../../_metronic/helpers'\n\nconst BODY_CLASSES = ['bgi-size-cover', 'bgi-position-center', 'bgi-no-repeat']\nconst ErrorsLayout = () => {\n const {mode} = useThemeMode()\n useEffect(() => {\n BODY_CLASSES.forEach((c) => document.body.classList.add(c))\n document.body.style.backgroundImage =\n mode === 'dark'\n ? `url(${toAbsoluteUrl('/media/auth/bg7-dark.jpg')})`\n : `url(${toAbsoluteUrl('/media/auth/bg7.jpg')})`\n\n return () => {\n BODY_CLASSES.forEach((c) => document.body.classList.remove(c))\n document.body.style.backgroundImage = 'none'\n }\n }, [mode])\n\n return (\n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n )\n}\n\nexport {ErrorsLayout}\n","/* eslint-disable jsx-a11y/anchor-is-valid */\nimport {Route, Routes} from 'react-router-dom'\nimport {Error500} from '../../components/errors/Error500'\nimport {Error404} from '../../components/errors/Error404'\nimport {ErrorsLayout} from './ErrorsLayout'\n\nconst ErrorsPage = () => (\n \n }>\n } />\n } />\n } />\n \n \n)\n\nexport {ErrorsPage}\n","import { __assign } from \"tslib\";\nimport { invariant } from '@formatjs/ecma402-abstract';\nimport { IntlMessageFormat, } from 'intl-messageformat';\nimport { MissingTranslationError, MessageFormatError } from './error';\nimport { TYPE } from '@formatjs/icu-messageformat-parser';\nfunction setTimeZoneInOptions(opts, timeZone) {\n return Object.keys(opts).reduce(function (all, k) {\n all[k] = __assign({ timeZone: timeZone }, opts[k]);\n return all;\n }, {});\n}\nfunction deepMergeOptions(opts1, opts2) {\n var keys = Object.keys(__assign(__assign({}, opts1), opts2));\n return keys.reduce(function (all, k) {\n all[k] = __assign(__assign({}, (opts1[k] || {})), (opts2[k] || {}));\n return all;\n }, {});\n}\nfunction deepMergeFormatsAndSetTimeZone(f1, timeZone) {\n if (!timeZone) {\n return f1;\n }\n var mfFormats = IntlMessageFormat.formats;\n return __assign(__assign(__assign({}, mfFormats), f1), { date: deepMergeOptions(setTimeZoneInOptions(mfFormats.date, timeZone), setTimeZoneInOptions(f1.date || {}, timeZone)), time: deepMergeOptions(setTimeZoneInOptions(mfFormats.time, timeZone), setTimeZoneInOptions(f1.time || {}, timeZone)) });\n}\nexport function formatMessage(_a, state, messageDescriptor, values, opts) {\n var locale = _a.locale, formats = _a.formats, messages = _a.messages, defaultLocale = _a.defaultLocale, defaultFormats = _a.defaultFormats, fallbackOnEmptyString = _a.fallbackOnEmptyString, onError = _a.onError, timeZone = _a.timeZone, defaultRichTextElements = _a.defaultRichTextElements;\n if (messageDescriptor === void 0) { messageDescriptor = { id: '' }; }\n var msgId = messageDescriptor.id, defaultMessage = messageDescriptor.defaultMessage;\n // `id` is a required field of a Message Descriptor.\n invariant(!!msgId, \"[@formatjs/intl] An `id` must be provided to format a message. You can either:\\n1. Configure your build toolchain with [babel-plugin-formatjs](https://formatjs.io/docs/tooling/babel-plugin)\\nor [@formatjs/ts-transformer](https://formatjs.io/docs/tooling/ts-transformer) OR\\n2. Configure your `eslint` config to include [eslint-plugin-formatjs](https://formatjs.io/docs/tooling/linter#enforce-id)\\nto autofix this issue\");\n var id = String(msgId);\n var message = \n // In case messages is Object.create(null)\n // e.g import('foo.json') from webpack)\n // See https://github.com/formatjs/formatjs/issues/1914\n messages &&\n Object.prototype.hasOwnProperty.call(messages, id) &&\n messages[id];\n // IMPORTANT: Hot path if `message` is AST with a single literal node\n if (Array.isArray(message) &&\n message.length === 1 &&\n message[0].type === TYPE.literal) {\n return message[0].value;\n }\n // IMPORTANT: Hot path straight lookup for performance\n if (!values &&\n message &&\n typeof message === 'string' &&\n !defaultRichTextElements) {\n return message.replace(/'\\{(.*?)\\}'/gi, \"{$1}\");\n }\n values = __assign(__assign({}, defaultRichTextElements), (values || {}));\n formats = deepMergeFormatsAndSetTimeZone(formats, timeZone);\n defaultFormats = deepMergeFormatsAndSetTimeZone(defaultFormats, timeZone);\n if (!message) {\n if (fallbackOnEmptyString === false && message === '') {\n return message;\n }\n if (!defaultMessage ||\n (locale && locale.toLowerCase() !== defaultLocale.toLowerCase())) {\n // This prevents warnings from littering the console in development\n // when no `messages` are passed into the for the\n // default locale.\n onError(new MissingTranslationError(messageDescriptor, locale));\n }\n if (defaultMessage) {\n try {\n var formatter = state.getMessageFormat(defaultMessage, defaultLocale, defaultFormats, opts);\n return formatter.format(values);\n }\n catch (e) {\n onError(new MessageFormatError(\"Error formatting default message for: \\\"\".concat(id, \"\\\", rendering default message verbatim\"), locale, messageDescriptor, e));\n return typeof defaultMessage === 'string' ? defaultMessage : id;\n }\n }\n return id;\n }\n // We have the translated message\n try {\n var formatter = state.getMessageFormat(message, locale, formats, __assign({ formatters: state }, (opts || {})));\n return formatter.format(values);\n }\n catch (e) {\n onError(new MessageFormatError(\"Error formatting message: \\\"\".concat(id, \"\\\", using \").concat(defaultMessage ? 'default message' : 'id', \" as fallback.\"), locale, messageDescriptor, e));\n }\n if (defaultMessage) {\n try {\n var formatter = state.getMessageFormat(defaultMessage, defaultLocale, defaultFormats, opts);\n return formatter.format(values);\n }\n catch (e) {\n onError(new MessageFormatError(\"Error formatting the default message for: \\\"\".concat(id, \"\\\", rendering message verbatim\"), locale, messageDescriptor, e));\n }\n }\n if (typeof message === 'string') {\n return message;\n }\n if (typeof defaultMessage === 'string') {\n return defaultMessage;\n }\n return id;\n}\n","import { getNamedFormat, filterProps } from './utils';\nimport { IntlError, IntlErrorCode } from './error';\nvar NUMBER_FORMAT_OPTIONS = [\n 'localeMatcher',\n 'style',\n 'currency',\n 'currencyDisplay',\n 'unit',\n 'unitDisplay',\n 'useGrouping',\n 'minimumIntegerDigits',\n 'minimumFractionDigits',\n 'maximumFractionDigits',\n 'minimumSignificantDigits',\n 'maximumSignificantDigits',\n // ES2020 NumberFormat\n 'compactDisplay',\n 'currencyDisplay',\n 'currencySign',\n 'notation',\n 'signDisplay',\n 'unit',\n 'unitDisplay',\n 'numberingSystem',\n];\nexport function getFormatter(_a, getNumberFormat, options) {\n var locale = _a.locale, formats = _a.formats, onError = _a.onError;\n if (options === void 0) { options = {}; }\n var format = options.format;\n var defaults = ((format &&\n getNamedFormat(formats, 'number', format, onError)) ||\n {});\n var filteredOptions = filterProps(options, NUMBER_FORMAT_OPTIONS, defaults);\n return getNumberFormat(locale, filteredOptions);\n}\nexport function formatNumber(config, getNumberFormat, value, options) {\n if (options === void 0) { options = {}; }\n try {\n return getFormatter(config, getNumberFormat, options).format(value);\n }\n catch (e) {\n config.onError(new IntlError(IntlErrorCode.FORMAT_ERROR, 'Error formatting number.', e));\n }\n return String(value);\n}\nexport function formatNumberToParts(config, getNumberFormat, value, options) {\n if (options === void 0) { options = {}; }\n try {\n return getFormatter(config, getNumberFormat, options).formatToParts(value);\n }\n catch (e) {\n config.onError(new IntlError(IntlErrorCode.FORMAT_ERROR, 'Error formatting number.', e));\n }\n return [];\n}\n","import { getNamedFormat, filterProps } from './utils';\nimport { FormatError, ErrorCode } from 'intl-messageformat';\nimport { IntlFormatError } from './error';\nvar RELATIVE_TIME_FORMAT_OPTIONS = ['numeric', 'style'];\nfunction getFormatter(_a, getRelativeTimeFormat, options) {\n var locale = _a.locale, formats = _a.formats, onError = _a.onError;\n if (options === void 0) { options = {}; }\n var format = options.format;\n var defaults = (!!format && getNamedFormat(formats, 'relative', format, onError)) || {};\n var filteredOptions = filterProps(options, RELATIVE_TIME_FORMAT_OPTIONS, defaults);\n return getRelativeTimeFormat(locale, filteredOptions);\n}\nexport function formatRelativeTime(config, getRelativeTimeFormat, value, unit, options) {\n if (options === void 0) { options = {}; }\n if (!unit) {\n unit = 'second';\n }\n var RelativeTimeFormat = Intl.RelativeTimeFormat;\n if (!RelativeTimeFormat) {\n config.onError(new FormatError(\"Intl.RelativeTimeFormat is not available in this environment.\\nTry polyfilling it using \\\"@formatjs/intl-relativetimeformat\\\"\\n\", ErrorCode.MISSING_INTL_API));\n }\n try {\n return getFormatter(config, getRelativeTimeFormat, options).format(value, unit);\n }\n catch (e) {\n config.onError(new IntlFormatError('Error formatting relative time.', config.locale, e));\n }\n return String(value);\n}\n","import { __assign } from \"tslib\";\nimport { filterProps, getNamedFormat } from './utils';\nimport { IntlError, IntlErrorCode } from './error';\nvar DATE_TIME_FORMAT_OPTIONS = [\n 'localeMatcher',\n 'formatMatcher',\n 'timeZone',\n 'hour12',\n 'weekday',\n 'era',\n 'year',\n 'month',\n 'day',\n 'hour',\n 'minute',\n 'second',\n 'timeZoneName',\n 'hourCycle',\n 'dateStyle',\n 'timeStyle',\n 'calendar',\n // 'dayPeriod',\n 'numberingSystem',\n];\nexport function getFormatter(_a, type, getDateTimeFormat, options) {\n var locale = _a.locale, formats = _a.formats, onError = _a.onError, timeZone = _a.timeZone;\n if (options === void 0) { options = {}; }\n var format = options.format;\n var defaults = __assign(__assign({}, (timeZone && { timeZone: timeZone })), (format && getNamedFormat(formats, type, format, onError)));\n var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS, defaults);\n if (type === 'time' &&\n !filteredOptions.hour &&\n !filteredOptions.minute &&\n !filteredOptions.second &&\n !filteredOptions.timeStyle &&\n !filteredOptions.dateStyle) {\n // Add default formatting options if hour, minute, or second isn't defined.\n filteredOptions = __assign(__assign({}, filteredOptions), { hour: 'numeric', minute: 'numeric' });\n }\n return getDateTimeFormat(locale, filteredOptions);\n}\nexport function formatDate(config, getDateTimeFormat) {\n var _a = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n _a[_i - 2] = arguments[_i];\n }\n var value = _a[0], _b = _a[1], options = _b === void 0 ? {} : _b;\n var date = typeof value === 'string' ? new Date(value || 0) : value;\n try {\n return getFormatter(config, 'date', getDateTimeFormat, options).format(date);\n }\n catch (e) {\n config.onError(new IntlError(IntlErrorCode.FORMAT_ERROR, 'Error formatting date.', e));\n }\n return String(date);\n}\nexport function formatTime(config, getDateTimeFormat) {\n var _a = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n _a[_i - 2] = arguments[_i];\n }\n var value = _a[0], _b = _a[1], options = _b === void 0 ? {} : _b;\n var date = typeof value === 'string' ? new Date(value || 0) : value;\n try {\n return getFormatter(config, 'time', getDateTimeFormat, options).format(date);\n }\n catch (e) {\n config.onError(new IntlError(IntlErrorCode.FORMAT_ERROR, 'Error formatting time.', e));\n }\n return String(date);\n}\nexport function formatDateTimeRange(config, getDateTimeFormat) {\n var _a = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n _a[_i - 2] = arguments[_i];\n }\n var from = _a[0], to = _a[1], _b = _a[2], options = _b === void 0 ? {} : _b;\n var timeZone = config.timeZone, locale = config.locale, onError = config.onError;\n var filteredOptions = filterProps(options, DATE_TIME_FORMAT_OPTIONS, timeZone ? { timeZone: timeZone } : {});\n try {\n return getDateTimeFormat(locale, filteredOptions).formatRange(from, to);\n }\n catch (e) {\n onError(new IntlError(IntlErrorCode.FORMAT_ERROR, 'Error formatting date time range.', e));\n }\n return String(from);\n}\nexport function formatDateToParts(config, getDateTimeFormat) {\n var _a = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n _a[_i - 2] = arguments[_i];\n }\n var value = _a[0], _b = _a[1], options = _b === void 0 ? {} : _b;\n var date = typeof value === 'string' ? new Date(value || 0) : value;\n try {\n return getFormatter(config, 'date', getDateTimeFormat, options).formatToParts(date);\n }\n catch (e) {\n config.onError(new IntlError(IntlErrorCode.FORMAT_ERROR, 'Error formatting date.', e));\n }\n return [];\n}\nexport function formatTimeToParts(config, getDateTimeFormat) {\n var _a = [];\n for (var _i = 2; _i < arguments.length; _i++) {\n _a[_i - 2] = arguments[_i];\n }\n var value = _a[0], _b = _a[1], options = _b === void 0 ? {} : _b;\n var date = typeof value === 'string' ? new Date(value || 0) : value;\n try {\n return getFormatter(config, 'time', getDateTimeFormat, options).formatToParts(date);\n }\n catch (e) {\n config.onError(new IntlError(IntlErrorCode.FORMAT_ERROR, 'Error formatting time.', e));\n }\n return [];\n}\n","import { filterProps } from './utils';\nimport { IntlFormatError } from './error';\nimport { ErrorCode, FormatError } from 'intl-messageformat';\nvar PLURAL_FORMAT_OPTIONS = [\n 'localeMatcher',\n 'type',\n];\nexport function formatPlural(_a, getPluralRules, value, options) {\n var locale = _a.locale, onError = _a.onError;\n if (options === void 0) { options = {}; }\n if (!Intl.PluralRules) {\n onError(new FormatError(\"Intl.PluralRules is not available in this environment.\\nTry polyfilling it using \\\"@formatjs/intl-pluralrules\\\"\\n\", ErrorCode.MISSING_INTL_API));\n }\n var filteredOptions = filterProps(options, PLURAL_FORMAT_OPTIONS);\n try {\n return getPluralRules(locale, filteredOptions).select(value);\n }\n catch (e) {\n onError(new IntlFormatError('Error formatting plural.', locale, e));\n }\n return 'other';\n}\n","import { __assign } from \"tslib\";\nimport { filterProps } from './utils';\nimport { FormatError, ErrorCode } from 'intl-messageformat';\nimport { IntlError, IntlErrorCode } from './error';\nvar LIST_FORMAT_OPTIONS = [\n 'localeMatcher',\n 'type',\n 'style',\n];\nvar now = Date.now();\nfunction generateToken(i) {\n return \"\".concat(now, \"_\").concat(i, \"_\").concat(now);\n}\nexport function formatList(opts, getListFormat, values, options) {\n if (options === void 0) { options = {}; }\n var results = formatListToParts(opts, getListFormat, values, options).reduce(function (all, el) {\n var val = el.value;\n if (typeof val !== 'string') {\n all.push(val);\n }\n else if (typeof all[all.length - 1] === 'string') {\n all[all.length - 1] += val;\n }\n else {\n all.push(val);\n }\n return all;\n }, []);\n return results.length === 1 ? results[0] : results;\n}\nexport function formatListToParts(_a, getListFormat, values, options) {\n var locale = _a.locale, onError = _a.onError;\n if (options === void 0) { options = {}; }\n var ListFormat = Intl.ListFormat;\n if (!ListFormat) {\n onError(new FormatError(\"Intl.ListFormat is not available in this environment.\\nTry polyfilling it using \\\"@formatjs/intl-listformat\\\"\\n\", ErrorCode.MISSING_INTL_API));\n }\n var filteredOptions = filterProps(options, LIST_FORMAT_OPTIONS);\n try {\n var richValues_1 = {};\n var serializedValues = values.map(function (v, i) {\n if (typeof v === 'object') {\n var id = generateToken(i);\n richValues_1[id] = v;\n return id;\n }\n return String(v);\n });\n return getListFormat(locale, filteredOptions)\n .formatToParts(serializedValues)\n .map(function (part) {\n return part.type === 'literal'\n ? part\n : __assign(__assign({}, part), { value: richValues_1[part.value] || part.value });\n });\n }\n catch (e) {\n onError(new IntlError(IntlErrorCode.FORMAT_ERROR, 'Error formatting list.', e));\n }\n // @ts-ignore\n return values;\n}\n","import { filterProps } from './utils';\nimport { FormatError, ErrorCode } from 'intl-messageformat';\nimport { IntlErrorCode, IntlError } from './error';\nvar DISPLAY_NAMES_OPTONS = [\n 'localeMatcher',\n 'style',\n 'type',\n 'fallback',\n];\nexport function formatDisplayName(_a, getDisplayNames, value, options) {\n var locale = _a.locale, onError = _a.onError;\n var DisplayNames = Intl.DisplayNames;\n if (!DisplayNames) {\n onError(new FormatError(\"Intl.DisplayNames is not available in this environment.\\nTry polyfilling it using \\\"@formatjs/intl-displaynames\\\"\\n\", ErrorCode.MISSING_INTL_API));\n }\n var filteredOptions = filterProps(options, DISPLAY_NAMES_OPTONS);\n try {\n return getDisplayNames(locale, filteredOptions).of(value);\n }\n catch (e) {\n onError(new IntlError(IntlErrorCode.FORMAT_ERROR, 'Error formatting display name.', e));\n }\n}\n","import { __assign } from \"tslib\";\nimport { createFormatters, DEFAULT_INTL_CONFIG } from './utils';\nimport { InvalidConfigError, MissingDataError } from './error';\nimport { formatNumber, formatNumberToParts } from './number';\nimport { formatRelativeTime } from './relativeTime';\nimport { formatDate, formatDateToParts, formatTime, formatTimeToParts, formatDateTimeRange, } from './dateTime';\nimport { formatPlural } from './plural';\nimport { formatMessage } from './message';\nimport { formatList, formatListToParts } from './list';\nimport { formatDisplayName } from './displayName';\nfunction messagesContainString(messages) {\n var firstMessage = messages ? messages[Object.keys(messages)[0]] : undefined;\n return typeof firstMessage === 'string';\n}\nfunction verifyConfigMessages(config) {\n if (config.onWarn &&\n config.defaultRichTextElements &&\n messagesContainString(config.messages || {})) {\n config.onWarn(\"[@formatjs/intl] \\\"defaultRichTextElements\\\" was specified but \\\"message\\\" was not pre-compiled. \\nPlease consider using \\\"@formatjs/cli\\\" to pre-compile your messages for performance.\\nFor more details see https://formatjs.io/docs/getting-started/message-distribution\");\n }\n}\n/**\n * Create intl object\n * @param config intl config\n * @param cache cache for formatter instances to prevent memory leak\n */\nexport function createIntl(config, cache) {\n var formatters = createFormatters(cache);\n var resolvedConfig = __assign(__assign({}, DEFAULT_INTL_CONFIG), config);\n var locale = resolvedConfig.locale, defaultLocale = resolvedConfig.defaultLocale, onError = resolvedConfig.onError;\n if (!locale) {\n if (onError) {\n onError(new InvalidConfigError(\"\\\"locale\\\" was not configured, using \\\"\".concat(defaultLocale, \"\\\" as fallback. See https://formatjs.io/docs/react-intl/api#intlshape for more details\")));\n }\n // Since there's no registered locale data for `locale`, this will\n // fallback to the `defaultLocale` to make sure things can render.\n // The `messages` are overridden to the `defaultProps` empty object\n // to maintain referential equality across re-renders. It's assumed\n // each contains a `defaultMessage` prop.\n resolvedConfig.locale = resolvedConfig.defaultLocale || 'en';\n }\n else if (!Intl.NumberFormat.supportedLocalesOf(locale).length && onError) {\n onError(new MissingDataError(\"Missing locale data for locale: \\\"\".concat(locale, \"\\\" in Intl.NumberFormat. Using default locale: \\\"\").concat(defaultLocale, \"\\\" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details\")));\n }\n else if (!Intl.DateTimeFormat.supportedLocalesOf(locale).length &&\n onError) {\n onError(new MissingDataError(\"Missing locale data for locale: \\\"\".concat(locale, \"\\\" in Intl.DateTimeFormat. Using default locale: \\\"\").concat(defaultLocale, \"\\\" as fallback. See https://formatjs.io/docs/react-intl#runtime-requirements for more details\")));\n }\n verifyConfigMessages(resolvedConfig);\n return __assign(__assign({}, resolvedConfig), { formatters: formatters, formatNumber: formatNumber.bind(null, resolvedConfig, formatters.getNumberFormat), formatNumberToParts: formatNumberToParts.bind(null, resolvedConfig, formatters.getNumberFormat), formatRelativeTime: formatRelativeTime.bind(null, resolvedConfig, formatters.getRelativeTimeFormat), formatDate: formatDate.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatDateToParts: formatDateToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatTime: formatTime.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatDateTimeRange: formatDateTimeRange.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatTimeToParts: formatTimeToParts.bind(null, resolvedConfig, formatters.getDateTimeFormat), formatPlural: formatPlural.bind(null, resolvedConfig, formatters.getPluralRules), formatMessage: formatMessage.bind(null, resolvedConfig, formatters), $t: formatMessage.bind(null, resolvedConfig, formatters), formatList: formatList.bind(null, resolvedConfig, formatters.getListFormat), formatListToParts: formatListToParts.bind(null, resolvedConfig, formatters.getListFormat), formatDisplayName: formatDisplayName.bind(null, resolvedConfig, formatters.getDisplayNames) });\n}\n","/*\n * Copyright 2015, Yahoo Inc.\n * Copyrights licensed under the New BSD License.\n * See the accompanying LICENSE file for terms.\n */\nimport { __assign, __extends, __rest, __spreadArray } from \"tslib\";\nimport * as React from 'react';\nimport { Provider } from './injectIntl';\nimport { DEFAULT_INTL_CONFIG, invariantIntlContext, assignUniqueKeysToParts, shallowEqual, } from '../utils';\nimport { formatMessage as coreFormatMessage, createIntl as coreCreateIntl, createIntlCache, } from '@formatjs/intl';\nimport { isFormatXMLElementFn, } from 'intl-messageformat';\nfunction processIntlConfig(config) {\n return {\n locale: config.locale,\n timeZone: config.timeZone,\n fallbackOnEmptyString: config.fallbackOnEmptyString,\n formats: config.formats,\n textComponent: config.textComponent,\n messages: config.messages,\n defaultLocale: config.defaultLocale,\n defaultFormats: config.defaultFormats,\n onError: config.onError,\n onWarn: config.onWarn,\n wrapRichTextChunksInFragment: config.wrapRichTextChunksInFragment,\n defaultRichTextElements: config.defaultRichTextElements,\n };\n}\nfunction assignUniqueKeysToFormatXMLElementFnArgument(values) {\n if (!values) {\n return values;\n }\n return Object.keys(values).reduce(function (acc, k) {\n var v = values[k];\n acc[k] = isFormatXMLElementFn(v)\n ? assignUniqueKeysToParts(v)\n : v;\n return acc;\n }, {});\n}\nvar formatMessage = function (config, formatters, descriptor, rawValues) {\n var rest = [];\n for (var _i = 4; _i < arguments.length; _i++) {\n rest[_i - 4] = arguments[_i];\n }\n var values = assignUniqueKeysToFormatXMLElementFnArgument(rawValues);\n var chunks = coreFormatMessage.apply(void 0, __spreadArray([config,\n formatters,\n descriptor,\n values], rest, false));\n if (Array.isArray(chunks)) {\n return React.Children.toArray(chunks);\n }\n return chunks;\n};\n/**\n * Create intl object\n * @param config intl config\n * @param cache cache for formatter instances to prevent memory leak\n */\nexport var createIntl = function (_a, cache) {\n var rawDefaultRichTextElements = _a.defaultRichTextElements, config = __rest(_a, [\"defaultRichTextElements\"]);\n var defaultRichTextElements = assignUniqueKeysToFormatXMLElementFnArgument(rawDefaultRichTextElements);\n var coreIntl = coreCreateIntl(__assign(__assign(__assign({}, DEFAULT_INTL_CONFIG), config), { defaultRichTextElements: defaultRichTextElements }), cache);\n return __assign(__assign({}, coreIntl), { formatMessage: formatMessage.bind(null, {\n locale: coreIntl.locale,\n timeZone: coreIntl.timeZone,\n fallbackOnEmptyString: coreIntl.fallbackOnEmptyString,\n formats: coreIntl.formats,\n defaultLocale: coreIntl.defaultLocale,\n defaultFormats: coreIntl.defaultFormats,\n messages: coreIntl.messages,\n onError: coreIntl.onError,\n defaultRichTextElements: defaultRichTextElements,\n }, coreIntl.formatters) });\n};\nvar IntlProvider = /** @class */ (function (_super) {\n __extends(IntlProvider, _super);\n function IntlProvider() {\n var _this = _super !== null && _super.apply(this, arguments) || this;\n _this.cache = createIntlCache();\n _this.state = {\n cache: _this.cache,\n intl: createIntl(processIntlConfig(_this.props), _this.cache),\n prevConfig: processIntlConfig(_this.props),\n };\n return _this;\n }\n IntlProvider.getDerivedStateFromProps = function (props, _a) {\n var prevConfig = _a.prevConfig, cache = _a.cache;\n var config = processIntlConfig(props);\n if (!shallowEqual(prevConfig, config)) {\n return {\n intl: createIntl(config, cache),\n prevConfig: config,\n };\n }\n return null;\n };\n IntlProvider.prototype.render = function () {\n invariantIntlContext(this.state.intl);\n return React.createElement(Provider, { value: this.state.intl }, this.props.children);\n };\n IntlProvider.displayName = 'IntlProvider';\n IntlProvider.defaultProps = DEFAULT_INTL_CONFIG;\n return IntlProvider;\n}(React.PureComponent));\nexport default IntlProvider;\n","import {FC} from 'react'\nimport {useLang} from './Metronici18n'\nimport {IntlProvider} from 'react-intl'\nimport '@formatjs/intl-relativetimeformat/polyfill'\nimport '@formatjs/intl-relativetimeformat/locale-data/en'\nimport '@formatjs/intl-relativetimeformat/locale-data/de'\nimport '@formatjs/intl-relativetimeformat/locale-data/es'\nimport '@formatjs/intl-relativetimeformat/locale-data/fr'\nimport '@formatjs/intl-relativetimeformat/locale-data/ja'\nimport '@formatjs/intl-relativetimeformat/locale-data/zh'\nimport '@formatjs/intl-relativetimeformat/locale-data/tr'\n\nimport deMessages from './messages/de.json'\nimport enMessages from './messages/en.json'\nimport esMessages from './messages/es.json'\nimport frMessages from './messages/fr.json'\nimport jaMessages from './messages/ja.json'\nimport zhMessages from './messages/zh.json'\nimport trMessages from './messages/tr.json'\nimport {WithChildren} from '../helpers'\n\nconst allMessages = {\n de: deMessages,\n en: enMessages,\n es: esMessages,\n fr: frMessages,\n ja: jaMessages,\n zh: zhMessages,\n tr: trMessages,\n}\n\nconst I18nProvider: FC = ({children}) => {\n const locale = useLang()\n const messages = allMessages[locale]\n\n return (\n \n {children}\n \n )\n}\n\nexport {I18nProvider}\n","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow };","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.0-beta1): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1_000_000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = object => {\n if (object === null || object === undefined) {\n return `${object}`\n }\n\n return Object.prototype.toString.call(object).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * Public Util API\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n let hrefAttribute = element.getAttribute('href')\n\n // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n if (!hrefAttribute || (!hrefAttribute.includes('#') && !hrefAttribute.startsWith('.'))) {\n return null\n }\n\n // Just in case some CMS puts out a full URL with the anchor appended\n if (hrefAttribute.includes('#') && !hrefAttribute.startsWith('#')) {\n hrefAttribute = `#${hrefAttribute.split('#')[1]}`\n }\n\n selector = hrefAttribute && hrefAttribute !== '#' ? hrefAttribute.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = object => {\n if (!object || typeof object !== 'object') {\n return false\n }\n\n if (typeof object.jquery !== 'undefined') {\n object = object[0]\n }\n\n return typeof object.nodeType !== 'undefined'\n}\n\nconst getElement = object => {\n // it's a jQuery object or a node element\n if (isElement(object)) {\n return object.jquery ? object[0] : object\n }\n\n if (typeof object === 'string' && object.length > 0) {\n return document.querySelector(object)\n }\n\n return null\n}\n\nconst isVisible = element => {\n if (!isElement(element) || element.getClientRects().length === 0) {\n return false\n }\n\n const elementIsVisible = getComputedStyle(element).getPropertyValue('visibility') === 'visible'\n // Handle `details` element as its content may falsie appear visible when it is closed\n const closedDetails = element.closest('details:not([open])')\n\n if (!closedDetails) {\n return elementIsVisible\n }\n\n if (closedDetails !== element) {\n const summary = element.closest('summary')\n if (summary && summary.parentNode !== closedDetails) {\n return false\n }\n\n if (summary === null) {\n return false\n }\n }\n\n return elementIsVisible\n}\n\nconst isDisabled = element => {\n if (!element || element.nodeType !== Node.ELEMENT_NODE) {\n return true\n }\n\n if (element.classList.contains('disabled')) {\n return true\n }\n\n if (typeof element.disabled !== 'undefined') {\n return element.disabled\n }\n\n return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false'\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => {}\n\n/**\n * Trick to restart an element's animation\n *\n * @param {HTMLElement} element\n * @return void\n *\n * @see https://www.charistheo.io/blog/2021/02/restart-a-css-animation-with-javascript/#restarting-a-css-animation\n */\nconst reflow = element => {\n element.offsetHeight // eslint-disable-line no-unused-expressions\n}\n\nconst getjQuery = () => {\n if (window.jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return window.jQuery\n }\n\n return null\n}\n\nconst DOMContentLoadedCallbacks = []\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n // add listener on the first call when the document is in loading state\n if (!DOMContentLoadedCallbacks.length) {\n document.addEventListener('DOMContentLoaded', () => {\n for (const callback of DOMContentLoadedCallbacks) {\n callback()\n }\n })\n }\n\n DOMContentLoadedCallbacks.push(callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = () => document.documentElement.dir === 'rtl'\n\nconst defineJQueryPlugin = plugin => {\n onDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const name = plugin.NAME\n const JQUERY_NO_CONFLICT = $.fn[name]\n $.fn[name] = plugin.jQueryInterface\n $.fn[name].Constructor = plugin\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT\n return plugin.jQueryInterface\n }\n }\n })\n}\n\nconst execute = callback => {\n if (typeof callback === 'function') {\n callback()\n }\n}\n\nconst executeAfterTransition = (callback, transitionElement, waitForTransition = true) => {\n if (!waitForTransition) {\n execute(callback)\n return\n }\n\n const durationPadding = 5\n const emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding\n\n let called = false\n\n const handler = ({ target }) => {\n if (target !== transitionElement) {\n return\n }\n\n called = true\n transitionElement.removeEventListener(TRANSITION_END, handler)\n execute(callback)\n }\n\n transitionElement.addEventListener(TRANSITION_END, handler)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(transitionElement)\n }\n }, emulatedDuration)\n}\n\n/**\n * Return the previous/next element of a list.\n *\n * @param {array} list The list of elements\n * @param activeElement The active element\n * @param shouldGetNext Choose to get next or previous element\n * @param isCycleAllowed\n * @return {Element|elem} The proper element\n */\nconst getNextActiveElement = (list, activeElement, shouldGetNext, isCycleAllowed) => {\n const listLength = list.length\n let index = list.indexOf(activeElement)\n\n // if the element does not exist in the list return an element\n // depending on the direction and if cycle is allowed\n if (index === -1) {\n return !shouldGetNext && isCycleAllowed ? list[listLength - 1] : list[0]\n }\n\n index += shouldGetNext ? 1 : -1\n\n if (isCycleAllowed) {\n index = (index + listLength) % listLength\n }\n\n return list[Math.max(0, Math.min(index, listLength - 1))]\n}\n\nexport {\n defineJQueryPlugin,\n execute,\n executeAfterTransition,\n findShadowRoot,\n getElement,\n getElementFromSelector,\n getjQuery,\n getNextActiveElement,\n getSelectorFromElement,\n getTransitionDurationFromElement,\n getUID,\n isDisabled,\n isElement,\n isRTL,\n isVisible,\n noop,\n onDOMContentLoaded,\n reflow,\n triggerTransitionEnd,\n toType\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.0-beta1): dom/event-handler.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { getjQuery } from '../util/index'\n\n/**\n * Constants\n */\n\nconst namespaceRegex = /[^.]*(?=\\..*)\\.|.*/\nconst stripNameRegex = /\\..*/\nconst stripUidRegex = /::\\d+$/\nconst eventRegistry = {} // Events storage\nlet uidEvent = 1\nconst customEvents = {\n mouseenter: 'mouseover',\n mouseleave: 'mouseout'\n}\n\nconst nativeEvents = new Set([\n 'click',\n 'dblclick',\n 'mouseup',\n 'mousedown',\n 'contextmenu',\n 'mousewheel',\n 'DOMMouseScroll',\n 'mouseover',\n 'mouseout',\n 'mousemove',\n 'selectstart',\n 'selectend',\n 'keydown',\n 'keypress',\n 'keyup',\n 'orientationchange',\n 'touchstart',\n 'touchmove',\n 'touchend',\n 'touchcancel',\n 'pointerdown',\n 'pointermove',\n 'pointerup',\n 'pointerleave',\n 'pointercancel',\n 'gesturestart',\n 'gesturechange',\n 'gestureend',\n 'focus',\n 'blur',\n 'change',\n 'reset',\n 'select',\n 'submit',\n 'focusin',\n 'focusout',\n 'load',\n 'unload',\n 'beforeunload',\n 'resize',\n 'move',\n 'DOMContentLoaded',\n 'readystatechange',\n 'error',\n 'abort',\n 'scroll'\n])\n\n/**\n * Private methods\n */\n\nfunction getUidEvent(element, uid) {\n return (uid && `${uid}::${uidEvent++}`) || element.uidEvent || uidEvent++\n}\n\nfunction getEvent(element) {\n const uid = getUidEvent(element)\n\n element.uidEvent = uid\n eventRegistry[uid] = eventRegistry[uid] || {}\n\n return eventRegistry[uid]\n}\n\nfunction bootstrapHandler(element, fn) {\n return function handler(event) {\n event.delegateTarget = element\n\n if (handler.oneOff) {\n EventHandler.off(element, event.type, fn)\n }\n\n return fn.apply(element, [event])\n }\n}\n\nfunction bootstrapDelegationHandler(element, selector, fn) {\n return function handler(event) {\n const domElements = element.querySelectorAll(selector)\n\n for (let { target } = event; target && target !== this; target = target.parentNode) {\n for (const domElement of domElements) {\n if (domElement !== target) {\n continue\n }\n\n event.delegateTarget = target\n\n if (handler.oneOff) {\n EventHandler.off(element, event.type, selector, fn)\n }\n\n return fn.apply(target, [event])\n }\n }\n }\n}\n\nfunction findHandler(events, handler, delegationSelector = null) {\n return Object.values(events)\n .find(event => event.originalHandler === handler && event.delegationSelector === delegationSelector)\n}\n\nfunction normalizeParameters(originalTypeEvent, handler, delegationFunction) {\n const delegation = typeof handler === 'string'\n const originalHandler = delegation ? delegationFunction : handler\n let typeEvent = getTypeEvent(originalTypeEvent)\n\n if (!nativeEvents.has(typeEvent)) {\n typeEvent = originalTypeEvent\n }\n\n return [delegation, originalHandler, typeEvent]\n}\n\nfunction addHandler(element, originalTypeEvent, handler, delegationFunction, oneOff) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return\n }\n\n if (!handler) {\n handler = delegationFunction\n delegationFunction = null\n }\n\n // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position\n // this prevents the handler from being dispatched the same way as mouseover or mouseout does\n if (originalTypeEvent in customEvents) {\n const wrapFunction = fn => {\n return function (event) {\n if (!event.relatedTarget || (event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget))) {\n return fn.call(this, event)\n }\n }\n }\n\n if (delegationFunction) {\n delegationFunction = wrapFunction(delegationFunction)\n } else {\n handler = wrapFunction(handler)\n }\n }\n\n const [delegation, originalHandler, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction)\n const events = getEvent(element)\n const handlers = events[typeEvent] || (events[typeEvent] = {})\n const previousFunction = findHandler(handlers, originalHandler, delegation ? handler : null)\n\n if (previousFunction) {\n previousFunction.oneOff = previousFunction.oneOff && oneOff\n\n return\n }\n\n const uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, ''))\n const fn = delegation ?\n bootstrapDelegationHandler(element, handler, delegationFunction) :\n bootstrapHandler(element, handler)\n\n fn.delegationSelector = delegation ? handler : null\n fn.originalHandler = originalHandler\n fn.oneOff = oneOff\n fn.uidEvent = uid\n handlers[uid] = fn\n\n element.addEventListener(typeEvent, fn, delegation)\n}\n\nfunction removeHandler(element, events, typeEvent, handler, delegationSelector) {\n const fn = findHandler(events[typeEvent], handler, delegationSelector)\n\n if (!fn) {\n return\n }\n\n element.removeEventListener(typeEvent, fn, Boolean(delegationSelector))\n delete events[typeEvent][fn.uidEvent]\n}\n\nfunction removeNamespacedHandlers(element, events, typeEvent, namespace) {\n const storeElementEvent = events[typeEvent] || {}\n\n for (const handlerKey of Object.keys(storeElementEvent)) {\n if (handlerKey.includes(namespace)) {\n const event = storeElementEvent[handlerKey]\n removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector)\n }\n }\n}\n\nfunction getTypeEvent(event) {\n // allow to get the native events from namespaced events ('click.bs.button' --> 'click')\n event = event.replace(stripNameRegex, '')\n return customEvents[event] || event\n}\n\nconst EventHandler = {\n on(element, event, handler, delegationFunction) {\n addHandler(element, event, handler, delegationFunction, false)\n },\n\n one(element, event, handler, delegationFunction) {\n addHandler(element, event, handler, delegationFunction, true)\n },\n\n off(element, originalTypeEvent, handler, delegationFunction) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return\n }\n\n const [delegation, originalHandler, typeEvent] = normalizeParameters(originalTypeEvent, handler, delegationFunction)\n const inNamespace = typeEvent !== originalTypeEvent\n const events = getEvent(element)\n const isNamespace = originalTypeEvent.startsWith('.')\n\n if (typeof originalHandler !== 'undefined') {\n // Simplest case: handler is passed, remove that listener ONLY.\n if (!events || !events[typeEvent]) {\n return\n }\n\n removeHandler(element, events, typeEvent, originalHandler, delegation ? handler : null)\n return\n }\n\n if (isNamespace) {\n for (const elementEvent of Object.keys(events)) {\n removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1))\n }\n }\n\n const storeElementEvent = events[typeEvent] || {}\n for (const keyHandlers of Object.keys(storeElementEvent)) {\n const handlerKey = keyHandlers.replace(stripUidRegex, '')\n\n if (!inNamespace || originalTypeEvent.includes(handlerKey)) {\n const event = storeElementEvent[keyHandlers]\n removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector)\n }\n }\n },\n\n trigger(element, event, args) {\n if (typeof event !== 'string' || !element) {\n return null\n }\n\n const $ = getjQuery()\n const typeEvent = getTypeEvent(event)\n const inNamespace = event !== typeEvent\n\n let jQueryEvent = null\n let bubbles = true\n let nativeDispatch = true\n let defaultPrevented = false\n\n if (inNamespace && $) {\n jQueryEvent = $.Event(event, args)\n\n $(element).trigger(jQueryEvent)\n bubbles = !jQueryEvent.isPropagationStopped()\n nativeDispatch = !jQueryEvent.isImmediatePropagationStopped()\n defaultPrevented = jQueryEvent.isDefaultPrevented()\n }\n\n const evt = new Event(event, { bubbles, cancelable: true })\n\n // merge custom information in our event\n if (typeof args !== 'undefined') {\n for (const key of Object.keys(args)) {\n Object.defineProperty(evt, key, {\n get() {\n return args[key]\n }\n })\n }\n }\n\n if (defaultPrevented) {\n evt.preventDefault()\n }\n\n if (nativeDispatch) {\n element.dispatchEvent(evt)\n }\n\n if (evt.defaultPrevented && jQueryEvent) {\n jQueryEvent.preventDefault()\n }\n\n return evt\n }\n}\n\nexport default EventHandler\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.0-beta1): dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * Constants\n */\n\nconst elementMap = new Map()\n\nexport default {\n set(element, key, instance) {\n if (!elementMap.has(element)) {\n elementMap.set(element, new Map())\n }\n\n const instanceMap = elementMap.get(element)\n\n // make it clear we only want one instance per element\n // can be removed later when multiple key/instances are fine to be used\n if (!instanceMap.has(key) && instanceMap.size !== 0) {\n // eslint-disable-next-line no-console\n console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`)\n return\n }\n\n instanceMap.set(key, instance)\n },\n\n get(element, key) {\n if (elementMap.has(element)) {\n return elementMap.get(element).get(key) || null\n }\n\n return null\n },\n\n remove(element, key) {\n if (!elementMap.has(element)) {\n return\n }\n\n const instanceMap = elementMap.get(element)\n\n instanceMap.delete(key)\n\n // free up element references if there are no instances left for an element\n if (instanceMap.size === 0) {\n elementMap.delete(element)\n }\n }\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.0-beta1): dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nfunction normalizeData(value) {\n if (value === 'true') {\n return true\n }\n\n if (value === 'false') {\n return false\n }\n\n if (value === Number(value).toString()) {\n return Number(value)\n }\n\n if (value === '' || value === 'null') {\n return null\n }\n\n if (typeof value !== 'string') {\n return value\n }\n\n try {\n return JSON.parse(decodeURIComponent(value))\n } catch {\n return value\n }\n}\n\nfunction normalizeDataKey(key) {\n return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`)\n}\n\nconst Manipulator = {\n setDataAttribute(element, key, value) {\n element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value)\n },\n\n removeDataAttribute(element, key) {\n element.removeAttribute(`data-bs-${normalizeDataKey(key)}`)\n },\n\n getDataAttributes(element) {\n if (!element) {\n return {}\n }\n\n const attributes = {}\n const bsKeys = Object.keys(element.dataset).filter(key => key.startsWith('bs') && !key.startsWith('bsConfig'))\n\n for (const key of bsKeys) {\n let pureKey = key.replace(/^bs/, '')\n pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length)\n attributes[pureKey] = normalizeData(element.dataset[key])\n }\n\n return attributes\n },\n\n getDataAttribute(element, key) {\n return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`))\n }\n}\n\nexport default Manipulator\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.0-beta1): util/config.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { isElement, toType } from './index'\nimport Manipulator from '../dom/manipulator'\n\n/**\n * Class definition\n */\n\nclass Config {\n // Getters\n static get Default() {\n return {}\n }\n\n static get DefaultType() {\n return {}\n }\n\n static get NAME() {\n throw new Error('You have to implement the static method \"NAME\", for each component!')\n }\n\n _getConfig(config) {\n config = this._mergeConfigObj(config)\n config = this._configAfterMerge(config)\n this._typeCheckConfig(config)\n return config\n }\n\n _configAfterMerge(config) {\n return config\n }\n\n _mergeConfigObj(config, element) {\n const jsonConfig = isElement(element) ? Manipulator.getDataAttribute(element, 'config') : {} // try to parse\n\n return {\n ...this.constructor.Default,\n ...(typeof jsonConfig === 'object' ? jsonConfig : {}),\n ...(isElement(element) ? Manipulator.getDataAttributes(element) : {}),\n ...(typeof config === 'object' ? config : {})\n }\n }\n\n _typeCheckConfig(config, configTypes = this.constructor.DefaultType) {\n for (const property of Object.keys(configTypes)) {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = isElement(value) ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(\n `${this.constructor.NAME.toUpperCase()}: Option \"${property}\" provided type \"${valueType}\" but expected type \"${expectedTypes}\".`\n )\n }\n }\n }\n}\n\nexport default Config\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.0-beta1): base-component.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Data from './dom/data'\nimport { executeAfterTransition, getElement } from './util/index'\nimport EventHandler from './dom/event-handler'\nimport Config from './util/config'\n\n/**\n * Constants\n */\n\nconst VERSION = '5.2.0-beta1'\n\n/**\n * Class definition\n */\n\nclass BaseComponent extends Config {\n constructor(element, config) {\n super()\n\n element = getElement(element)\n if (!element) {\n return\n }\n\n this._element = element\n this._config = this._getConfig(config)\n\n Data.set(this._element, this.constructor.DATA_KEY, this)\n }\n\n // Public\n dispose() {\n Data.remove(this._element, this.constructor.DATA_KEY)\n EventHandler.off(this._element, this.constructor.EVENT_KEY)\n\n for (const propertyName of Object.getOwnPropertyNames(this)) {\n this[propertyName] = null\n }\n }\n\n _queueCallback(callback, element, isAnimated = true) {\n executeAfterTransition(callback, element, isAnimated)\n }\n\n _getConfig(config) {\n config = this._mergeConfigObj(config, this._element)\n config = this._configAfterMerge(config)\n this._typeCheckConfig(config)\n return config\n }\n\n // Static\n static getInstance(element) {\n return Data.get(getElement(element), this.DATA_KEY)\n }\n\n static getOrCreateInstance(element, config = {}) {\n return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null)\n }\n\n static get VERSION() {\n return VERSION\n }\n\n static get DATA_KEY() {\n return `bs.${this.NAME}`\n }\n\n static get EVENT_KEY() {\n return `.${this.DATA_KEY}`\n }\n\n static eventName(name) {\n return `${name}${this.EVENT_KEY}`\n }\n}\n\nexport default BaseComponent\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.0-beta1): util/component-functions.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport EventHandler from '../dom/event-handler'\nimport { getElementFromSelector, isDisabled } from './index'\n\nconst enableDismissTrigger = (component, method = 'hide') => {\n const clickEvent = `click.dismiss${component.EVENT_KEY}`\n const name = component.NAME\n\n EventHandler.on(document, clickEvent, `[data-bs-dismiss=\"${name}\"]`, function (event) {\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault()\n }\n\n if (isDisabled(this)) {\n return\n }\n\n const target = getElementFromSelector(this) || this.closest(`.${name}`)\n const instance = component.getOrCreateInstance(target)\n\n // Method argument is left, for Alert and only, as it doesn't implement the 'hide' method\n instance[method]()\n })\n}\n\nexport {\n enableDismissTrigger\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.0-beta1): alert.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { defineJQueryPlugin } from './util/index'\nimport EventHandler from './dom/event-handler'\nimport BaseComponent from './base-component'\nimport { enableDismissTrigger } from './util/component-functions'\n\n/**\n * Constants\n */\n\nconst NAME = 'alert'\nconst DATA_KEY = 'bs.alert'\nconst EVENT_KEY = `.${DATA_KEY}`\n\nconst EVENT_CLOSE = `close${EVENT_KEY}`\nconst EVENT_CLOSED = `closed${EVENT_KEY}`\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\n\n/**\n * Class definition\n */\n\nclass Alert extends BaseComponent {\n // Getters\n static get NAME() {\n return NAME\n }\n\n // Public\n close() {\n const closeEvent = EventHandler.trigger(this._element, EVENT_CLOSE)\n\n if (closeEvent.defaultPrevented) {\n return\n }\n\n this._element.classList.remove(CLASS_NAME_SHOW)\n\n const isAnimated = this._element.classList.contains(CLASS_NAME_FADE)\n this._queueCallback(() => this._destroyElement(), this._element, isAnimated)\n }\n\n // Private\n _destroyElement() {\n this._element.remove()\n EventHandler.trigger(this._element, EVENT_CLOSED)\n this.dispose()\n }\n\n // Static\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Alert.getOrCreateInstance(this)\n\n if (typeof config !== 'string') {\n return\n }\n\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config](this)\n })\n }\n}\n\n/**\n * Data API implementation\n */\n\nenableDismissTrigger(Alert, 'close')\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Alert)\n\nexport default Alert\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.0-beta1): button.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { defineJQueryPlugin } from './util/index'\nimport EventHandler from './dom/event-handler'\nimport BaseComponent from './base-component'\n\n/**\n * Constants\n */\n\nconst NAME = 'button'\nconst DATA_KEY = 'bs.button'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst CLASS_NAME_ACTIVE = 'active'\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"button\"]'\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\n/**\n * Class definition\n */\n\nclass Button extends BaseComponent {\n // Getters\n static get NAME() {\n return NAME\n }\n\n // Public\n toggle() {\n // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method\n this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE))\n }\n\n // Static\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Button.getOrCreateInstance(this)\n\n if (config === 'toggle') {\n data[config]()\n }\n })\n }\n}\n\n/**\n * Data API implementation\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, event => {\n event.preventDefault()\n\n const button = event.target.closest(SELECTOR_DATA_TOGGLE)\n const data = Button.getOrCreateInstance(button)\n\n data.toggle()\n})\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Button)\n\nexport default Button\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.0-beta1): dom/selector-engine.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { isDisabled, isVisible } from '../util/index'\n\n/**\n * Constants\n */\n\nconst SelectorEngine = {\n find(selector, element = document.documentElement) {\n return [].concat(...Element.prototype.querySelectorAll.call(element, selector))\n },\n\n findOne(selector, element = document.documentElement) {\n return Element.prototype.querySelector.call(element, selector)\n },\n\n children(element, selector) {\n return [].concat(...element.children).filter(child => child.matches(selector))\n },\n\n parents(element, selector) {\n const parents = []\n let ancestor = element.parentNode.closest(selector)\n\n while (ancestor) {\n parents.push(ancestor)\n ancestor = ancestor.parentNode.closest(selector)\n }\n\n return parents\n },\n\n prev(element, selector) {\n let previous = element.previousElementSibling\n\n while (previous) {\n if (previous.matches(selector)) {\n return [previous]\n }\n\n previous = previous.previousElementSibling\n }\n\n return []\n },\n // TODO: this is now unused; remove later along with prev()\n next(element, selector) {\n let next = element.nextElementSibling\n\n while (next) {\n if (next.matches(selector)) {\n return [next]\n }\n\n next = next.nextElementSibling\n }\n\n return []\n },\n\n focusableChildren(element) {\n const focusables = [\n 'a',\n 'button',\n 'input',\n 'textarea',\n 'select',\n 'details',\n '[tabindex]',\n '[contenteditable=\"true\"]'\n ].map(selector => `${selector}:not([tabindex^=\"-\"])`).join(',')\n\n return this.find(focusables, element).filter(el => !isDisabled(el) && isVisible(el))\n }\n}\n\nexport default SelectorEngine\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.0-beta1): util/swipe.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Config from './config'\nimport EventHandler from '../dom/event-handler'\nimport { execute } from './index'\n\n/**\n * Constants\n */\n\nconst NAME = 'swipe'\nconst EVENT_KEY = '.bs.swipe'\nconst EVENT_TOUCHSTART = `touchstart${EVENT_KEY}`\nconst EVENT_TOUCHMOVE = `touchmove${EVENT_KEY}`\nconst EVENT_TOUCHEND = `touchend${EVENT_KEY}`\nconst EVENT_POINTERDOWN = `pointerdown${EVENT_KEY}`\nconst EVENT_POINTERUP = `pointerup${EVENT_KEY}`\nconst POINTER_TYPE_TOUCH = 'touch'\nconst POINTER_TYPE_PEN = 'pen'\nconst CLASS_NAME_POINTER_EVENT = 'pointer-event'\nconst SWIPE_THRESHOLD = 40\n\nconst Default = {\n leftCallback: null,\n rightCallback: null,\n endCallback: null\n}\n\nconst DefaultType = {\n leftCallback: '(function|null)',\n rightCallback: '(function|null)',\n endCallback: '(function|null)'\n}\n\n/**\n * Class definition\n */\n\nclass Swipe extends Config {\n constructor(element, config) {\n super()\n this._element = element\n\n if (!element || !Swipe.isSupported()) {\n return\n }\n\n this._config = this._getConfig(config)\n this._deltaX = 0\n this._supportPointerEvents = Boolean(window.PointerEvent)\n this._initEvents()\n }\n\n // Getters\n static get Default() {\n return Default\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n static get NAME() {\n return NAME\n }\n\n // Public\n dispose() {\n EventHandler.off(this._element, EVENT_KEY)\n }\n\n // Private\n _start(event) {\n if (!this._supportPointerEvents) {\n this._deltaX = event.touches[0].clientX\n\n return\n }\n\n if (this._eventIsPointerPenTouch(event)) {\n this._deltaX = event.clientX\n }\n }\n\n _end(event) {\n if (this._eventIsPointerPenTouch(event)) {\n this._deltaX = event.clientX - this._deltaX\n }\n\n this._handleSwipe()\n execute(this._config.endCallback)\n }\n\n _move(event) {\n this._deltaX = event.touches && event.touches.length > 1 ?\n 0 :\n event.touches[0].clientX - this._deltaX\n }\n\n _handleSwipe() {\n const absDeltaX = Math.abs(this._deltaX)\n\n if (absDeltaX <= SWIPE_THRESHOLD) {\n return\n }\n\n const direction = absDeltaX / this._deltaX\n\n this._deltaX = 0\n\n if (!direction) {\n return\n }\n\n execute(direction > 0 ? this._config.rightCallback : this._config.leftCallback)\n }\n\n _initEvents() {\n if (this._supportPointerEvents) {\n EventHandler.on(this._element, EVENT_POINTERDOWN, event => this._start(event))\n EventHandler.on(this._element, EVENT_POINTERUP, event => this._end(event))\n\n this._element.classList.add(CLASS_NAME_POINTER_EVENT)\n } else {\n EventHandler.on(this._element, EVENT_TOUCHSTART, event => this._start(event))\n EventHandler.on(this._element, EVENT_TOUCHMOVE, event => this._move(event))\n EventHandler.on(this._element, EVENT_TOUCHEND, event => this._end(event))\n }\n }\n\n _eventIsPointerPenTouch(event) {\n return this._supportPointerEvents && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)\n }\n\n // Static\n static isSupported() {\n return 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0\n }\n}\n\nexport default Swipe\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.0-beta1): carousel.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport {\n defineJQueryPlugin,\n getElementFromSelector,\n getNextActiveElement,\n isRTL,\n isVisible,\n reflow,\n triggerTransitionEnd\n} from './util/index'\nimport EventHandler from './dom/event-handler'\nimport Manipulator from './dom/manipulator'\nimport SelectorEngine from './dom/selector-engine'\nimport Swipe from './util/swipe'\nimport BaseComponent from './base-component'\n\n/**\n * Constants\n */\n\nconst NAME = 'carousel'\nconst DATA_KEY = 'bs.carousel'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst ARROW_LEFT_KEY = 'ArrowLeft'\nconst ARROW_RIGHT_KEY = 'ArrowRight'\nconst TOUCHEVENT_COMPAT_WAIT = 500 // Time for mouse compat events to fire after touch\n\nconst ORDER_NEXT = 'next'\nconst ORDER_PREV = 'prev'\nconst DIRECTION_LEFT = 'left'\nconst DIRECTION_RIGHT = 'right'\n\nconst EVENT_SLIDE = `slide${EVENT_KEY}`\nconst EVENT_SLID = `slid${EVENT_KEY}`\nconst EVENT_KEYDOWN = `keydown${EVENT_KEY}`\nconst EVENT_MOUSEENTER = `mouseenter${EVENT_KEY}`\nconst EVENT_MOUSELEAVE = `mouseleave${EVENT_KEY}`\nconst EVENT_DRAG_START = `dragstart${EVENT_KEY}`\nconst EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_CAROUSEL = 'carousel'\nconst CLASS_NAME_ACTIVE = 'active'\nconst CLASS_NAME_SLIDE = 'slide'\nconst CLASS_NAME_END = 'carousel-item-end'\nconst CLASS_NAME_START = 'carousel-item-start'\nconst CLASS_NAME_NEXT = 'carousel-item-next'\nconst CLASS_NAME_PREV = 'carousel-item-prev'\n\nconst SELECTOR_ACTIVE = '.active'\nconst SELECTOR_ITEM = '.carousel-item'\nconst SELECTOR_ACTIVE_ITEM = SELECTOR_ACTIVE + SELECTOR_ITEM\nconst SELECTOR_ITEM_IMG = '.carousel-item img'\nconst SELECTOR_INDICATORS = '.carousel-indicators'\nconst SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]'\nconst SELECTOR_DATA_RIDE = '[data-bs-ride=\"carousel\"]'\n\nconst KEY_TO_DIRECTION = {\n [ARROW_LEFT_KEY]: DIRECTION_RIGHT,\n [ARROW_RIGHT_KEY]: DIRECTION_LEFT\n}\n\nconst Default = {\n interval: 5000,\n keyboard: true,\n pause: 'hover',\n ride: false,\n touch: true,\n wrap: true\n}\n\nconst DefaultType = {\n interval: '(number|boolean)',\n keyboard: 'boolean',\n ride: '(boolean|string)',\n pause: '(string|boolean)',\n touch: 'boolean',\n wrap: 'boolean'\n}\n\n/**\n * Class definition\n */\n\nclass Carousel extends BaseComponent {\n constructor(element, config) {\n super(element, config)\n\n this._interval = null\n this._activeElement = null\n this._isSliding = false\n this.touchTimeout = null\n this._swipeHelper = null\n\n this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element)\n this._addEventListeners()\n\n if (this._config.ride === CLASS_NAME_CAROUSEL) {\n this.cycle()\n }\n }\n\n // Getters\n static get Default() {\n return Default\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n static get NAME() {\n return NAME\n }\n\n // Public\n next() {\n this._slide(ORDER_NEXT)\n }\n\n nextWhenVisible() {\n // FIXME TODO use `document.visibilityState`\n // Don't call next when the page isn't visible\n // or the carousel or its parent isn't visible\n if (!document.hidden && isVisible(this._element)) {\n this.next()\n }\n }\n\n prev() {\n this._slide(ORDER_PREV)\n }\n\n pause() {\n if (this._isSliding) {\n triggerTransitionEnd(this._element)\n }\n\n this._clearInterval()\n }\n\n cycle() {\n this._clearInterval()\n this._updateInterval()\n\n this._interval = setInterval(() => this.nextWhenVisible(), this._config.interval)\n }\n\n _maybeEnableCycle() {\n if (!this._config.ride) {\n return\n }\n\n if (this._isSliding) {\n EventHandler.one(this._element, EVENT_SLID, () => this.cycle())\n return\n }\n\n this.cycle()\n }\n\n to(index) {\n const items = this._getItems()\n if (index > items.length - 1 || index < 0) {\n return\n }\n\n if (this._isSliding) {\n EventHandler.one(this._element, EVENT_SLID, () => this.to(index))\n return\n }\n\n const activeIndex = this._getItemIndex(this._getActive())\n if (activeIndex === index) {\n return\n }\n\n const order = index > activeIndex ? ORDER_NEXT : ORDER_PREV\n\n this._slide(order, items[index])\n }\n\n dispose() {\n if (this._swipeHelper) {\n this._swipeHelper.dispose()\n }\n\n super.dispose()\n }\n\n // Private\n _configAfterMerge(config) {\n config.defaultInterval = config.interval\n return config\n }\n\n _addEventListeners() {\n if (this._config.keyboard) {\n EventHandler.on(this._element, EVENT_KEYDOWN, event => this._keydown(event))\n }\n\n if (this._config.pause === 'hover') {\n EventHandler.on(this._element, EVENT_MOUSEENTER, () => this.pause())\n EventHandler.on(this._element, EVENT_MOUSELEAVE, () => this._maybeEnableCycle())\n }\n\n if (this._config.touch && Swipe.isSupported()) {\n this._addTouchEventListeners()\n }\n }\n\n _addTouchEventListeners() {\n for (const img of SelectorEngine.find(SELECTOR_ITEM_IMG, this._element)) {\n EventHandler.on(img, EVENT_DRAG_START, event => event.preventDefault())\n }\n\n const endCallBack = () => {\n if (this._config.pause !== 'hover') {\n return\n }\n\n // If it's a touch-enabled device, mouseenter/leave are fired as\n // part of the mouse compatibility events on first tap - the carousel\n // would stop cycling until user tapped out of it;\n // here, we listen for touchend, explicitly pause the carousel\n // (as if it's the second time we tap on it, mouseenter compat event\n // is NOT fired) and after a timeout (to allow for mouse compatibility\n // events to fire) we explicitly restart cycling\n\n this.pause()\n if (this.touchTimeout) {\n clearTimeout(this.touchTimeout)\n }\n\n this.touchTimeout = setTimeout(() => this._maybeEnableCycle(), TOUCHEVENT_COMPAT_WAIT + this._config.interval)\n }\n\n const swipeConfig = {\n leftCallback: () => this._slide(this._directionToOrder(DIRECTION_LEFT)),\n rightCallback: () => this._slide(this._directionToOrder(DIRECTION_RIGHT)),\n endCallback: endCallBack\n }\n\n this._swipeHelper = new Swipe(this._element, swipeConfig)\n }\n\n _keydown(event) {\n if (/input|textarea/i.test(event.target.tagName)) {\n return\n }\n\n const direction = KEY_TO_DIRECTION[event.key]\n if (direction) {\n event.preventDefault()\n this._slide(this._directionToOrder(direction))\n }\n }\n\n _getItemIndex(element) {\n return this._getItems().indexOf(element)\n }\n\n _setActiveIndicatorElement(index) {\n if (!this._indicatorsElement) {\n return\n }\n\n const activeIndicator = SelectorEngine.findOne(SELECTOR_ACTIVE, this._indicatorsElement)\n\n activeIndicator.classList.remove(CLASS_NAME_ACTIVE)\n activeIndicator.removeAttribute('aria-current')\n\n const newActiveIndicator = SelectorEngine.findOne(`[data-bs-slide-to=\"${index}\"]`, this._indicatorsElement)\n\n if (newActiveIndicator) {\n newActiveIndicator.classList.add(CLASS_NAME_ACTIVE)\n newActiveIndicator.setAttribute('aria-current', 'true')\n }\n }\n\n _updateInterval() {\n const element = this._activeElement || this._getActive()\n\n if (!element) {\n return\n }\n\n const elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10)\n\n this._config.interval = elementInterval || this._config.defaultInterval\n }\n\n _slide(order, element = null) {\n if (this._isSliding) {\n return\n }\n\n const activeElement = this._getActive()\n const isNext = order === ORDER_NEXT\n const nextElement = element || getNextActiveElement(this._getItems(), activeElement, isNext, this._config.wrap)\n\n if (nextElement === activeElement) {\n return\n }\n\n const nextElementIndex = this._getItemIndex(nextElement)\n\n const triggerEvent = eventName => {\n return EventHandler.trigger(this._element, eventName, {\n relatedTarget: nextElement,\n direction: this._orderToDirection(order),\n from: this._getItemIndex(activeElement),\n to: nextElementIndex\n })\n }\n\n const slideEvent = triggerEvent(EVENT_SLIDE)\n\n if (slideEvent.defaultPrevented) {\n return\n }\n\n if (!activeElement || !nextElement) {\n // Some weirdness is happening, so we bail\n // todo: change tests that use empty divs to avoid this check\n return\n }\n\n const isCycling = Boolean(this._interval)\n this.pause()\n\n this._isSliding = true\n\n this._setActiveIndicatorElement(nextElementIndex)\n this._activeElement = nextElement\n\n const directionalClassName = isNext ? CLASS_NAME_START : CLASS_NAME_END\n const orderClassName = isNext ? CLASS_NAME_NEXT : CLASS_NAME_PREV\n\n nextElement.classList.add(orderClassName)\n\n reflow(nextElement)\n\n activeElement.classList.add(directionalClassName)\n nextElement.classList.add(directionalClassName)\n\n const completeCallBack = () => {\n nextElement.classList.remove(directionalClassName, orderClassName)\n nextElement.classList.add(CLASS_NAME_ACTIVE)\n\n activeElement.classList.remove(CLASS_NAME_ACTIVE, orderClassName, directionalClassName)\n\n this._isSliding = false\n\n triggerEvent(EVENT_SLID)\n }\n\n this._queueCallback(completeCallBack, activeElement, this._isAnimated())\n\n if (isCycling) {\n this.cycle()\n }\n }\n\n _isAnimated() {\n return this._element.classList.contains(CLASS_NAME_SLIDE)\n }\n\n _getActive() {\n return SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element)\n }\n\n _getItems() {\n return SelectorEngine.find(SELECTOR_ITEM, this._element)\n }\n\n _clearInterval() {\n if (this._interval) {\n clearInterval(this._interval)\n this._interval = null\n }\n }\n\n _directionToOrder(direction) {\n if (isRTL()) {\n return direction === DIRECTION_LEFT ? ORDER_PREV : ORDER_NEXT\n }\n\n return direction === DIRECTION_LEFT ? ORDER_NEXT : ORDER_PREV\n }\n\n _orderToDirection(order) {\n if (isRTL()) {\n return order === ORDER_PREV ? DIRECTION_LEFT : DIRECTION_RIGHT\n }\n\n return order === ORDER_PREV ? DIRECTION_RIGHT : DIRECTION_LEFT\n }\n\n // Static\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Carousel.getOrCreateInstance(this, config)\n\n if (typeof config === 'number') {\n data.to(config)\n return\n }\n\n if (typeof config === 'string') {\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n }\n })\n }\n}\n\n/**\n * Data API implementation\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, function (event) {\n const target = getElementFromSelector(this)\n\n if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {\n return\n }\n\n event.preventDefault()\n\n const carousel = Carousel.getOrCreateInstance(target)\n const slideIndex = this.getAttribute('data-bs-slide-to')\n\n if (slideIndex) {\n carousel.to(slideIndex)\n carousel._maybeEnableCycle()\n return\n }\n\n if (Manipulator.getDataAttribute(this, 'slide') === 'next') {\n carousel.next()\n carousel._maybeEnableCycle()\n return\n }\n\n carousel.prev()\n carousel._maybeEnableCycle()\n})\n\nEventHandler.on(window, EVENT_LOAD_DATA_API, () => {\n const carousels = SelectorEngine.find(SELECTOR_DATA_RIDE)\n\n for (const carousel of carousels) {\n Carousel.getOrCreateInstance(carousel)\n }\n})\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Carousel)\n\nexport default Carousel\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.0-beta1): collapse.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport {\n defineJQueryPlugin,\n getElement,\n getElementFromSelector,\n getSelectorFromElement,\n reflow\n} from './util/index'\nimport EventHandler from './dom/event-handler'\nimport SelectorEngine from './dom/selector-engine'\nimport BaseComponent from './base-component'\n\n/**\n * Constants\n */\n\nconst NAME = 'collapse'\nconst DATA_KEY = 'bs.collapse'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_COLLAPSE = 'collapse'\nconst CLASS_NAME_COLLAPSING = 'collapsing'\nconst CLASS_NAME_COLLAPSED = 'collapsed'\nconst CLASS_NAME_DEEPER_CHILDREN = `:scope .${CLASS_NAME_COLLAPSE} .${CLASS_NAME_COLLAPSE}`\nconst CLASS_NAME_HORIZONTAL = 'collapse-horizontal'\n\nconst WIDTH = 'width'\nconst HEIGHT = 'height'\n\nconst SELECTOR_ACTIVES = '.collapse.show, .collapse.collapsing'\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"collapse\"]'\n\nconst Default = {\n toggle: true,\n parent: null\n}\n\nconst DefaultType = {\n toggle: 'boolean',\n parent: '(null|element)'\n}\n\n/**\n * Class definition\n */\n\nclass Collapse extends BaseComponent {\n constructor(element, config) {\n super(element, config)\n\n this._isTransitioning = false\n this._triggerArray = []\n\n const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE)\n\n for (const elem of toggleList) {\n const selector = getSelectorFromElement(elem)\n const filterElement = SelectorEngine.find(selector)\n .filter(foundElement => foundElement === this._element)\n\n if (selector !== null && filterElement.length) {\n this._triggerArray.push(elem)\n }\n }\n\n this._initializeChildren()\n\n if (!this._config.parent) {\n this._addAriaAndCollapsedClass(this._triggerArray, this._isShown())\n }\n\n if (this._config.toggle) {\n this.toggle()\n }\n }\n\n // Getters\n static get Default() {\n return Default\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n static get NAME() {\n return NAME\n }\n\n // Public\n toggle() {\n if (this._isShown()) {\n this.hide()\n } else {\n this.show()\n }\n }\n\n show() {\n if (this._isTransitioning || this._isShown()) {\n return\n }\n\n let activeChildren = []\n\n // find active children\n if (this._config.parent) {\n activeChildren = this._getFirstLevelChildren(SELECTOR_ACTIVES)\n .filter(element => element !== this._element)\n .map(element => Collapse.getOrCreateInstance(element, { toggle: false }))\n }\n\n if (activeChildren.length && activeChildren[0]._isTransitioning) {\n return\n }\n\n const startEvent = EventHandler.trigger(this._element, EVENT_SHOW)\n if (startEvent.defaultPrevented) {\n return\n }\n\n for (const activeInstance of activeChildren) {\n activeInstance.hide()\n }\n\n const dimension = this._getDimension()\n\n this._element.classList.remove(CLASS_NAME_COLLAPSE)\n this._element.classList.add(CLASS_NAME_COLLAPSING)\n\n this._element.style[dimension] = 0\n\n this._addAriaAndCollapsedClass(this._triggerArray, true)\n this._isTransitioning = true\n\n const complete = () => {\n this._isTransitioning = false\n\n this._element.classList.remove(CLASS_NAME_COLLAPSING)\n this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW)\n\n this._element.style[dimension] = ''\n\n EventHandler.trigger(this._element, EVENT_SHOWN)\n }\n\n const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1)\n const scrollSize = `scroll${capitalizedDimension}`\n\n this._queueCallback(complete, this._element, true)\n this._element.style[dimension] = `${this._element[scrollSize]}px`\n }\n\n hide() {\n if (this._isTransitioning || !this._isShown()) {\n return\n }\n\n const startEvent = EventHandler.trigger(this._element, EVENT_HIDE)\n if (startEvent.defaultPrevented) {\n return\n }\n\n const dimension = this._getDimension()\n\n this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`\n\n reflow(this._element)\n\n this._element.classList.add(CLASS_NAME_COLLAPSING)\n this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW)\n\n for (const trigger of this._triggerArray) {\n const element = getElementFromSelector(trigger)\n\n if (element && !this._isShown(element)) {\n this._addAriaAndCollapsedClass([trigger], false)\n }\n }\n\n this._isTransitioning = true\n\n const complete = () => {\n this._isTransitioning = false\n this._element.classList.remove(CLASS_NAME_COLLAPSING)\n this._element.classList.add(CLASS_NAME_COLLAPSE)\n EventHandler.trigger(this._element, EVENT_HIDDEN)\n }\n\n this._element.style[dimension] = ''\n\n this._queueCallback(complete, this._element, true)\n }\n\n _isShown(element = this._element) {\n return element.classList.contains(CLASS_NAME_SHOW)\n }\n\n // Private\n _configAfterMerge(config) {\n config.toggle = Boolean(config.toggle) // Coerce string values\n config.parent = getElement(config.parent)\n return config\n }\n\n _getDimension() {\n return this._element.classList.contains(CLASS_NAME_HORIZONTAL) ? WIDTH : HEIGHT\n }\n\n _initializeChildren() {\n if (!this._config.parent) {\n return\n }\n\n const children = this._getFirstLevelChildren(SELECTOR_DATA_TOGGLE)\n\n for (const element of children) {\n const selected = getElementFromSelector(element)\n\n if (selected) {\n this._addAriaAndCollapsedClass([element], this._isShown(selected))\n }\n }\n }\n\n _getFirstLevelChildren(selector) {\n const children = SelectorEngine.find(CLASS_NAME_DEEPER_CHILDREN, this._config.parent)\n // remove children if greater depth\n return SelectorEngine.find(selector, this._config.parent).filter(element => !children.includes(element))\n }\n\n _addAriaAndCollapsedClass(triggerArray, isOpen) {\n if (!triggerArray.length) {\n return\n }\n\n for (const element of triggerArray) {\n element.classList.toggle(CLASS_NAME_COLLAPSED, !isOpen)\n element.setAttribute('aria-expanded', isOpen)\n }\n }\n\n // Static\n static jQueryInterface(config) {\n const _config = {}\n if (typeof config === 'string' && /show|hide/.test(config)) {\n _config.toggle = false\n }\n\n return this.each(function () {\n const data = Collapse.getOrCreateInstance(this, _config)\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n }\n })\n }\n}\n\n/**\n * Data API implementation\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n // preventDefault only for elements (which change the URL) not inside the collapsible element\n if (event.target.tagName === 'A' || (event.delegateTarget && event.delegateTarget.tagName === 'A')) {\n event.preventDefault()\n }\n\n const selector = getSelectorFromElement(this)\n const selectorElements = SelectorEngine.find(selector)\n\n for (const element of selectorElements) {\n Collapse.getOrCreateInstance(element, { toggle: false }).toggle()\n }\n})\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Collapse)\n\nexport default Collapse\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.0-beta1): dropdown.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport * as Popper from '@popperjs/core'\nimport {\n defineJQueryPlugin,\n getElement,\n getNextActiveElement,\n isDisabled,\n isElement,\n isRTL,\n isVisible,\n noop\n} from './util/index'\nimport EventHandler from './dom/event-handler'\nimport Manipulator from './dom/manipulator'\nimport SelectorEngine from './dom/selector-engine'\nimport BaseComponent from './base-component'\n\n/**\n * Constants\n */\n\nconst NAME = 'dropdown'\nconst DATA_KEY = 'bs.dropdown'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst ESCAPE_KEY = 'Escape'\nconst TAB_KEY = 'Tab'\nconst ARROW_UP_KEY = 'ArrowUp'\nconst ARROW_DOWN_KEY = 'ArrowDown'\nconst RIGHT_MOUSE_BUTTON = 2 // MouseEvent.button value for the secondary button, usually the right button\n\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_DROPUP = 'dropup'\nconst CLASS_NAME_DROPEND = 'dropend'\nconst CLASS_NAME_DROPSTART = 'dropstart'\nconst CLASS_NAME_DROPUP_CENTER = 'dropup-center'\nconst CLASS_NAME_DROPDOWN_CENTER = 'dropdown-center'\n\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"dropdown\"]:not(.disabled):not(:disabled)'\nconst SELECTOR_DATA_TOGGLE_SHOWN = `${SELECTOR_DATA_TOGGLE}.${CLASS_NAME_SHOW}`\nconst SELECTOR_MENU = '.dropdown-menu'\nconst SELECTOR_NAVBAR = '.navbar'\nconst SELECTOR_NAVBAR_NAV = '.navbar-nav'\nconst SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'\n\nconst PLACEMENT_TOP = isRTL() ? 'top-end' : 'top-start'\nconst PLACEMENT_TOPEND = isRTL() ? 'top-start' : 'top-end'\nconst PLACEMENT_BOTTOM = isRTL() ? 'bottom-end' : 'bottom-start'\nconst PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end'\nconst PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start'\nconst PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start'\nconst PLACEMENT_TOPCENTER = 'top'\nconst PLACEMENT_BOTTOMCENTER = 'bottom'\n\nconst Default = {\n offset: [0, 2],\n boundary: 'clippingParents',\n reference: 'toggle',\n display: 'dynamic',\n popperConfig: null,\n autoClose: true\n}\n\nconst DefaultType = {\n offset: '(array|string|function)',\n boundary: '(string|element)',\n reference: '(string|element|object)',\n display: 'string',\n popperConfig: '(null|object|function)',\n autoClose: '(boolean|string)'\n}\n\n/**\n * Class definition\n */\n\nclass Dropdown extends BaseComponent {\n constructor(element, config) {\n super(element, config)\n\n this._popper = null\n this._parent = this._element.parentNode // dropdown wrapper\n this._menu = SelectorEngine.findOne(SELECTOR_MENU, this._parent)\n this._inNavbar = this._detectNavbar()\n }\n\n // Getters\n static get Default() {\n return Default\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n static get NAME() {\n return NAME\n }\n\n // Public\n toggle() {\n return this._isShown() ? this.hide() : this.show()\n }\n\n show() {\n if (isDisabled(this._element) || this._isShown()) {\n return\n }\n\n const relatedTarget = {\n relatedTarget: this._element\n }\n\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW, relatedTarget)\n\n if (showEvent.defaultPrevented) {\n return\n }\n\n this._createPopper()\n\n // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n if ('ontouchstart' in document.documentElement && !this._parent.closest(SELECTOR_NAVBAR_NAV)) {\n for (const element of [].concat(...document.body.children)) {\n EventHandler.on(element, 'mouseover', noop)\n }\n }\n\n this._element.focus()\n this._element.setAttribute('aria-expanded', true)\n\n this._menu.classList.add(CLASS_NAME_SHOW)\n this._element.classList.add(CLASS_NAME_SHOW)\n EventHandler.trigger(this._element, EVENT_SHOWN, relatedTarget)\n }\n\n hide() {\n if (isDisabled(this._element) || !this._isShown()) {\n return\n }\n\n const relatedTarget = {\n relatedTarget: this._element\n }\n\n this._completeHide(relatedTarget)\n }\n\n dispose() {\n if (this._popper) {\n this._popper.destroy()\n }\n\n super.dispose()\n }\n\n update() {\n this._inNavbar = this._detectNavbar()\n if (this._popper) {\n this._popper.update()\n }\n }\n\n // Private\n _completeHide(relatedTarget) {\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE, relatedTarget)\n if (hideEvent.defaultPrevented) {\n return\n }\n\n // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n if ('ontouchstart' in document.documentElement) {\n for (const element of [].concat(...document.body.children)) {\n EventHandler.off(element, 'mouseover', noop)\n }\n }\n\n if (this._popper) {\n this._popper.destroy()\n }\n\n this._menu.classList.remove(CLASS_NAME_SHOW)\n this._element.classList.remove(CLASS_NAME_SHOW)\n this._element.setAttribute('aria-expanded', 'false')\n Manipulator.removeDataAttribute(this._menu, 'popper')\n EventHandler.trigger(this._element, EVENT_HIDDEN, relatedTarget)\n }\n\n _getConfig(config) {\n config = super._getConfig(config)\n\n if (typeof config.reference === 'object' && !isElement(config.reference) &&\n typeof config.reference.getBoundingClientRect !== 'function'\n ) {\n // Popper virtual elements require a getBoundingClientRect method\n throw new TypeError(`${NAME.toUpperCase()}: Option \"reference\" provided type \"object\" without a required \"getBoundingClientRect\" method.`)\n }\n\n return config\n }\n\n _createPopper() {\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s dropdowns require Popper (https://popper.js.org)')\n }\n\n let referenceElement = this._element\n\n if (this._config.reference === 'parent') {\n referenceElement = this._parent\n } else if (isElement(this._config.reference)) {\n referenceElement = getElement(this._config.reference)\n } else if (typeof this._config.reference === 'object') {\n referenceElement = this._config.reference\n }\n\n const popperConfig = this._getPopperConfig()\n this._popper = Popper.createPopper(referenceElement, this._menu, popperConfig)\n }\n\n _isShown() {\n return this._menu.classList.contains(CLASS_NAME_SHOW)\n }\n\n _getPlacement() {\n const parentDropdown = this._parent\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) {\n return PLACEMENT_RIGHT\n }\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) {\n return PLACEMENT_LEFT\n }\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPUP_CENTER)) {\n return PLACEMENT_TOPCENTER\n }\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPDOWN_CENTER)) {\n return PLACEMENT_BOTTOMCENTER\n }\n\n // We need to trim the value because custom properties can also include spaces\n const isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end'\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {\n return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP\n }\n\n return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM\n }\n\n _detectNavbar() {\n return this._element.closest(SELECTOR_NAVBAR) !== null\n }\n\n _getOffset() {\n const { offset } = this._config\n\n if (typeof offset === 'string') {\n return offset.split(',').map(value => Number.parseInt(value, 10))\n }\n\n if (typeof offset === 'function') {\n return popperData => offset(popperData, this._element)\n }\n\n return offset\n }\n\n _getPopperConfig() {\n const defaultBsPopperConfig = {\n placement: this._getPlacement(),\n modifiers: [{\n name: 'preventOverflow',\n options: {\n boundary: this._config.boundary\n }\n },\n {\n name: 'offset',\n options: {\n offset: this._getOffset()\n }\n }]\n }\n\n // Disable Popper if we have a static display or Dropdown is in Navbar\n if (this._inNavbar || this._config.display === 'static') {\n Manipulator.setDataAttribute(this._menu, 'popper', 'static') // todo:v6 remove\n defaultBsPopperConfig.modifiers = [{\n name: 'applyStyles',\n enabled: false\n }]\n }\n\n return {\n ...defaultBsPopperConfig,\n ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)\n }\n }\n\n _selectMenuItem({ key, target }) {\n const items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(element => isVisible(element))\n\n if (!items.length) {\n return\n }\n\n // if target isn't included in items (e.g. when expanding the dropdown)\n // allow cycling to get the last item in case key equals ARROW_UP_KEY\n getNextActiveElement(items, target, key === ARROW_DOWN_KEY, !items.includes(target)).focus()\n }\n\n // Static\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Dropdown.getOrCreateInstance(this, config)\n\n if (typeof config !== 'string') {\n return\n }\n\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n })\n }\n\n static clearMenus(event) {\n if (event.button === RIGHT_MOUSE_BUTTON || (event.type === 'keyup' && event.key !== TAB_KEY)) {\n return\n }\n\n const openToggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE_SHOWN)\n\n for (const toggle of openToggles) {\n const context = Dropdown.getInstance(toggle)\n if (!context || context._config.autoClose === false) {\n continue\n }\n\n const composedPath = event.composedPath()\n const isMenuTarget = composedPath.includes(context._menu)\n if (\n composedPath.includes(context._element) ||\n (context._config.autoClose === 'inside' && !isMenuTarget) ||\n (context._config.autoClose === 'outside' && isMenuTarget)\n ) {\n continue\n }\n\n // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu\n if (context._menu.contains(event.target) && ((event.type === 'keyup' && event.key === TAB_KEY) || /input|select|option|textarea|form/i.test(event.target.tagName))) {\n continue\n }\n\n const relatedTarget = { relatedTarget: context._element }\n\n if (event.type === 'click') {\n relatedTarget.clickEvent = event\n }\n\n context._completeHide(relatedTarget)\n }\n }\n\n static dataApiKeydownHandler(event) {\n // If not an UP | DOWN | ESCAPE key => not a dropdown command\n // If input/textarea && if key is other than ESCAPE => not a dropdown command\n\n const isInput = /input|textarea/i.test(event.target.tagName)\n const isEscapeEvent = event.key === ESCAPE_KEY\n const isUpOrDownEvent = [ARROW_UP_KEY, ARROW_DOWN_KEY].includes(event.key)\n\n if (!isUpOrDownEvent && !isEscapeEvent) {\n return\n }\n\n if (isInput && !isEscapeEvent) {\n return\n }\n\n event.preventDefault()\n\n const getToggleButton = SelectorEngine.findOne(SELECTOR_DATA_TOGGLE, event.delegateTarget.parentNode)\n const instance = Dropdown.getOrCreateInstance(getToggleButton)\n\n if (isUpOrDownEvent) {\n event.stopPropagation()\n instance.show()\n instance._selectMenuItem(event)\n return\n }\n\n if (instance._isShown()) { // else is escape and we check if it is shown\n event.stopPropagation()\n instance.hide()\n getToggleButton.focus()\n }\n }\n}\n\n/**\n * Data API implementation\n */\n\nEventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, Dropdown.dataApiKeydownHandler)\nEventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler)\nEventHandler.on(document, EVENT_CLICK_DATA_API, Dropdown.clearMenus)\nEventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus)\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n event.preventDefault()\n Dropdown.getOrCreateInstance(this).toggle()\n})\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Dropdown)\n\nexport default Dropdown\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.0-beta1): util/scrollBar.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport SelectorEngine from '../dom/selector-engine'\nimport Manipulator from '../dom/manipulator'\nimport { isElement } from './index'\n\n/**\n * Constants\n */\n\nconst SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top'\nconst SELECTOR_STICKY_CONTENT = '.sticky-top'\nconst PROPERTY_PADDING = 'padding-right'\nconst PROPERTY_MARGIN = 'margin-right'\n\n/**\n * Class definition\n */\n\nclass ScrollBarHelper {\n constructor() {\n this._element = document.body\n }\n\n // Public\n getWidth() {\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes\n const documentWidth = document.documentElement.clientWidth\n return Math.abs(window.innerWidth - documentWidth)\n }\n\n hide() {\n const width = this.getWidth()\n this._disableOverFlow()\n // give padding to element to balance the hidden scrollbar width\n this._setElementAttributes(this._element, PROPERTY_PADDING, calculatedValue => calculatedValue + width)\n // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements to keep showing fullwidth\n this._setElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING, calculatedValue => calculatedValue + width)\n this._setElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN, calculatedValue => calculatedValue - width)\n }\n\n reset() {\n this._resetElementAttributes(this._element, 'overflow')\n this._resetElementAttributes(this._element, PROPERTY_PADDING)\n this._resetElementAttributes(SELECTOR_FIXED_CONTENT, PROPERTY_PADDING)\n this._resetElementAttributes(SELECTOR_STICKY_CONTENT, PROPERTY_MARGIN)\n }\n\n isOverflowing() {\n return this.getWidth() > 0\n }\n\n // Private\n _disableOverFlow() {\n this._saveInitialAttribute(this._element, 'overflow')\n this._element.style.overflow = 'hidden'\n }\n\n _setElementAttributes(selector, styleProperty, callback) {\n const scrollbarWidth = this.getWidth()\n const manipulationCallBack = element => {\n if (element !== this._element && window.innerWidth > element.clientWidth + scrollbarWidth) {\n return\n }\n\n this._saveInitialAttribute(element, styleProperty)\n const calculatedValue = window.getComputedStyle(element).getPropertyValue(styleProperty)\n element.style.setProperty(styleProperty, `${callback(Number.parseFloat(calculatedValue))}px`)\n }\n\n this._applyManipulationCallback(selector, manipulationCallBack)\n }\n\n _saveInitialAttribute(element, styleProperty) {\n const actualValue = element.style.getPropertyValue(styleProperty)\n if (actualValue) {\n Manipulator.setDataAttribute(element, styleProperty, actualValue)\n }\n }\n\n _resetElementAttributes(selector, styleProperty) {\n const manipulationCallBack = element => {\n const value = Manipulator.getDataAttribute(element, styleProperty)\n // We only want to remove the property if the value is `null`; the value can also be zero\n if (value === null) {\n element.style.removeProperty(styleProperty)\n return\n }\n\n Manipulator.removeDataAttribute(element, styleProperty)\n element.style.setProperty(styleProperty, value)\n }\n\n this._applyManipulationCallback(selector, manipulationCallBack)\n }\n\n _applyManipulationCallback(selector, callBack) {\n if (isElement(selector)) {\n callBack(selector)\n return\n }\n\n for (const sel of SelectorEngine.find(selector, this._element)) {\n callBack(sel)\n }\n }\n}\n\nexport default ScrollBarHelper\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.0-beta1): util/backdrop.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport EventHandler from '../dom/event-handler'\nimport { execute, executeAfterTransition, getElement, reflow } from './index'\nimport Config from './config'\n\n/**\n * Constants\n */\n\nconst NAME = 'backdrop'\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\nconst EVENT_MOUSEDOWN = `mousedown.bs.${NAME}`\n\nconst Default = {\n className: 'modal-backdrop',\n isVisible: true, // if false, we use the backdrop helper without adding any element to the dom\n isAnimated: false,\n rootElement: 'body', // give the choice to place backdrop under different elements\n clickCallback: null\n}\n\nconst DefaultType = {\n className: 'string',\n isVisible: 'boolean',\n isAnimated: 'boolean',\n rootElement: '(element|string)',\n clickCallback: '(function|null)'\n}\n\n/**\n * Class definition\n */\n\nclass Backdrop extends Config {\n constructor(config) {\n super()\n this._config = this._getConfig(config)\n this._isAppended = false\n this._element = null\n }\n\n // Getters\n static get Default() {\n return Default\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n static get NAME() {\n return NAME\n }\n\n // Public\n show(callback) {\n if (!this._config.isVisible) {\n execute(callback)\n return\n }\n\n this._append()\n\n const element = this._getElement()\n if (this._config.isAnimated) {\n reflow(element)\n }\n\n element.classList.add(CLASS_NAME_SHOW)\n\n this._emulateAnimation(() => {\n execute(callback)\n })\n }\n\n hide(callback) {\n if (!this._config.isVisible) {\n execute(callback)\n return\n }\n\n this._getElement().classList.remove(CLASS_NAME_SHOW)\n\n this._emulateAnimation(() => {\n this.dispose()\n execute(callback)\n })\n }\n\n dispose() {\n if (!this._isAppended) {\n return\n }\n\n EventHandler.off(this._element, EVENT_MOUSEDOWN)\n\n this._element.remove()\n this._isAppended = false\n }\n\n // Private\n _getElement() {\n if (!this._element) {\n const backdrop = document.createElement('div')\n backdrop.className = this._config.className\n if (this._config.isAnimated) {\n backdrop.classList.add(CLASS_NAME_FADE)\n }\n\n this._element = backdrop\n }\n\n return this._element\n }\n\n _configAfterMerge(config) {\n // use getElement() with the default \"body\" to get a fresh Element on each instantiation\n config.rootElement = getElement(config.rootElement)\n return config\n }\n\n _append() {\n if (this._isAppended) {\n return\n }\n\n const element = this._getElement()\n this._config.rootElement.append(element)\n\n EventHandler.on(element, EVENT_MOUSEDOWN, () => {\n execute(this._config.clickCallback)\n })\n\n this._isAppended = true\n }\n\n _emulateAnimation(callback) {\n executeAfterTransition(callback, this._getElement(), this._config.isAnimated)\n }\n}\n\nexport default Backdrop\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.0-beta1): util/focustrap.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport EventHandler from '../dom/event-handler'\nimport SelectorEngine from '../dom/selector-engine'\nimport Config from './config'\n\n/**\n * Constants\n */\n\nconst NAME = 'focustrap'\nconst DATA_KEY = 'bs.focustrap'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst EVENT_FOCUSIN = `focusin${EVENT_KEY}`\nconst EVENT_KEYDOWN_TAB = `keydown.tab${EVENT_KEY}`\n\nconst TAB_KEY = 'Tab'\nconst TAB_NAV_FORWARD = 'forward'\nconst TAB_NAV_BACKWARD = 'backward'\n\nconst Default = {\n trapElement: null, // The element to trap focus inside of\n autofocus: true\n}\n\nconst DefaultType = {\n trapElement: 'element',\n autofocus: 'boolean'\n}\n\n/**\n * Class definition\n */\n\nclass FocusTrap extends Config {\n constructor(config) {\n super()\n this._config = this._getConfig(config)\n this._isActive = false\n this._lastTabNavDirection = null\n }\n\n // Getters\n static get Default() {\n return Default\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n static get NAME() {\n return NAME\n }\n\n // Public\n activate() {\n if (this._isActive) {\n return\n }\n\n if (this._config.autofocus) {\n this._config.trapElement.focus()\n }\n\n EventHandler.off(document, EVENT_KEY) // guard against infinite focus loop\n EventHandler.on(document, EVENT_FOCUSIN, event => this._handleFocusin(event))\n EventHandler.on(document, EVENT_KEYDOWN_TAB, event => this._handleKeydown(event))\n\n this._isActive = true\n }\n\n deactivate() {\n if (!this._isActive) {\n return\n }\n\n this._isActive = false\n EventHandler.off(document, EVENT_KEY)\n }\n\n // Private\n _handleFocusin(event) {\n const { trapElement } = this._config\n\n if (event.target === document || event.target === trapElement || trapElement.contains(event.target)) {\n return\n }\n\n const elements = SelectorEngine.focusableChildren(trapElement)\n\n if (elements.length === 0) {\n trapElement.focus()\n } else if (this._lastTabNavDirection === TAB_NAV_BACKWARD) {\n elements[elements.length - 1].focus()\n } else {\n elements[0].focus()\n }\n }\n\n _handleKeydown(event) {\n if (event.key !== TAB_KEY) {\n return\n }\n\n this._lastTabNavDirection = event.shiftKey ? TAB_NAV_BACKWARD : TAB_NAV_FORWARD\n }\n}\n\nexport default FocusTrap\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.0-beta1): modal.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { defineJQueryPlugin, getElementFromSelector, isRTL, isVisible, reflow } from './util/index'\nimport EventHandler from './dom/event-handler'\nimport SelectorEngine from './dom/selector-engine'\nimport ScrollBarHelper from './util/scrollbar'\nimport BaseComponent from './base-component'\nimport Backdrop from './util/backdrop'\nimport FocusTrap from './util/focustrap'\nimport { enableDismissTrigger } from './util/component-functions'\n\n/**\n * Constants\n */\n\nconst NAME = 'modal'\nconst DATA_KEY = 'bs.modal'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst ESCAPE_KEY = 'Escape'\n\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_RESIZE = `resize${EVENT_KEY}`\nconst EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`\nconst EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_OPEN = 'modal-open'\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_STATIC = 'modal-static'\n\nconst OPEN_SELECTOR = '.modal.show'\nconst SELECTOR_DIALOG = '.modal-dialog'\nconst SELECTOR_MODAL_BODY = '.modal-body'\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"modal\"]'\n\nconst Default = {\n backdrop: true,\n keyboard: true,\n focus: true\n}\n\nconst DefaultType = {\n backdrop: '(boolean|string)',\n keyboard: 'boolean',\n focus: 'boolean'\n}\n\n/**\n * Class definition\n */\n\nclass Modal extends BaseComponent {\n constructor(element, config) {\n super(element, config)\n\n this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, this._element)\n this._backdrop = this._initializeBackDrop()\n this._focustrap = this._initializeFocusTrap()\n this._isShown = false\n this._isTransitioning = false\n this._scrollBar = new ScrollBarHelper()\n\n this._addEventListeners()\n }\n\n // Getters\n static get Default() {\n return Default\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n static get NAME() {\n return NAME\n }\n\n // Public\n toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget)\n }\n\n show(relatedTarget) {\n if (this._isShown || this._isTransitioning) {\n return\n }\n\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW, {\n relatedTarget\n })\n\n if (showEvent.defaultPrevented) {\n return\n }\n\n this._isShown = true\n this._isTransitioning = true\n\n this._scrollBar.hide()\n\n document.body.classList.add(CLASS_NAME_OPEN)\n\n this._adjustDialog()\n\n this._backdrop.show(() => this._showElement(relatedTarget))\n }\n\n hide() {\n if (!this._isShown || this._isTransitioning) {\n return\n }\n\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE)\n\n if (hideEvent.defaultPrevented) {\n return\n }\n\n this._isShown = false\n this._isTransitioning = true\n this._focustrap.deactivate()\n\n this._element.classList.remove(CLASS_NAME_SHOW)\n\n this._queueCallback(() => this._hideModal(), this._element, this._isAnimated())\n }\n\n dispose() {\n for (const htmlElement of [window, this._dialog]) {\n EventHandler.off(htmlElement, EVENT_KEY)\n }\n\n this._backdrop.dispose()\n this._focustrap.deactivate()\n super.dispose()\n }\n\n handleUpdate() {\n this._adjustDialog()\n }\n\n // Private\n _initializeBackDrop() {\n return new Backdrop({\n isVisible: Boolean(this._config.backdrop), // 'static' option will be translated to true, and booleans will keep their value,\n isAnimated: this._isAnimated()\n })\n }\n\n _initializeFocusTrap() {\n return new FocusTrap({\n trapElement: this._element\n })\n }\n\n _showElement(relatedTarget) {\n // try to append dynamic modal\n if (!document.body.contains(this._element)) {\n document.body.append(this._element)\n }\n\n this._element.style.display = 'block'\n this._element.removeAttribute('aria-hidden')\n this._element.setAttribute('aria-modal', true)\n this._element.setAttribute('role', 'dialog')\n this._element.scrollTop = 0\n\n const modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog)\n if (modalBody) {\n modalBody.scrollTop = 0\n }\n\n reflow(this._element)\n\n this._element.classList.add(CLASS_NAME_SHOW)\n\n const transitionComplete = () => {\n if (this._config.focus) {\n this._focustrap.activate()\n }\n\n this._isTransitioning = false\n EventHandler.trigger(this._element, EVENT_SHOWN, {\n relatedTarget\n })\n }\n\n this._queueCallback(transitionComplete, this._dialog, this._isAnimated())\n }\n\n _addEventListeners() {\n EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => {\n if (event.key !== ESCAPE_KEY) {\n return\n }\n\n if (this._config.keyboard) {\n event.preventDefault()\n this.hide()\n return\n }\n\n this._triggerBackdropTransition()\n })\n\n EventHandler.on(window, EVENT_RESIZE, () => {\n if (this._isShown && !this._isTransitioning) {\n this._adjustDialog()\n }\n })\n\n EventHandler.on(this._element, EVENT_CLICK_DISMISS, event => {\n if (event.target !== event.currentTarget) { // click is inside modal-dialog\n return\n }\n\n if (this._config.backdrop === 'static') {\n this._triggerBackdropTransition()\n return\n }\n\n if (this._config.backdrop) {\n this.hide()\n }\n })\n }\n\n _hideModal() {\n this._element.style.display = 'none'\n this._element.setAttribute('aria-hidden', true)\n this._element.removeAttribute('aria-modal')\n this._element.removeAttribute('role')\n this._isTransitioning = false\n\n this._backdrop.hide(() => {\n document.body.classList.remove(CLASS_NAME_OPEN)\n this._resetAdjustments()\n this._scrollBar.reset()\n EventHandler.trigger(this._element, EVENT_HIDDEN)\n })\n }\n\n _isAnimated() {\n return this._element.classList.contains(CLASS_NAME_FADE)\n }\n\n _triggerBackdropTransition() {\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED)\n if (hideEvent.defaultPrevented) {\n return\n }\n\n const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight\n const initialOverflowY = this._element.style.overflowY\n // return if the following background transition hasn't yet completed\n if (initialOverflowY === 'hidden' || this._element.classList.contains(CLASS_NAME_STATIC)) {\n return\n }\n\n if (!isModalOverflowing) {\n this._element.style.overflowY = 'hidden'\n }\n\n this._element.classList.add(CLASS_NAME_STATIC)\n this._queueCallback(() => {\n this._element.classList.remove(CLASS_NAME_STATIC)\n this._queueCallback(() => {\n this._element.style.overflowY = initialOverflowY\n }, this._dialog)\n }, this._dialog)\n\n this._element.focus()\n }\n\n /**\n * The following methods are used to handle overflowing modals\n */\n\n _adjustDialog() {\n const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight\n const scrollbarWidth = this._scrollBar.getWidth()\n const isBodyOverflowing = scrollbarWidth > 0\n\n if (isBodyOverflowing && !isModalOverflowing) {\n const property = isRTL() ? 'paddingLeft' : 'paddingRight'\n this._element.style[property] = `${scrollbarWidth}px`\n }\n\n if (!isBodyOverflowing && isModalOverflowing) {\n const property = isRTL() ? 'paddingRight' : 'paddingLeft'\n this._element.style[property] = `${scrollbarWidth}px`\n }\n }\n\n _resetAdjustments() {\n this._element.style.paddingLeft = ''\n this._element.style.paddingRight = ''\n }\n\n // Static\n static jQueryInterface(config, relatedTarget) {\n return this.each(function () {\n const data = Modal.getOrCreateInstance(this, config)\n\n if (typeof config !== 'string') {\n return\n }\n\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config](relatedTarget)\n })\n }\n}\n\n/**\n * Data API implementation\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n const target = getElementFromSelector(this)\n\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault()\n }\n\n EventHandler.one(target, EVENT_SHOW, showEvent => {\n if (showEvent.defaultPrevented) {\n // only register focus restorer if modal will actually get shown\n return\n }\n\n EventHandler.one(target, EVENT_HIDDEN, () => {\n if (isVisible(this)) {\n this.focus()\n }\n })\n })\n\n // avoid conflict when clicking modal toggler while another one is open\n const alreadyOpen = SelectorEngine.findOne(OPEN_SELECTOR)\n if (alreadyOpen) {\n Modal.getInstance(alreadyOpen).hide()\n }\n\n const data = Modal.getOrCreateInstance(target)\n\n data.toggle(this)\n})\n\nenableDismissTrigger(Modal)\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Modal)\n\nexport default Modal\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.0-beta1): offcanvas.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport {\n defineJQueryPlugin,\n getElementFromSelector,\n isDisabled,\n isVisible\n} from './util/index'\nimport ScrollBarHelper from './util/scrollbar'\nimport EventHandler from './dom/event-handler'\nimport BaseComponent from './base-component'\nimport SelectorEngine from './dom/selector-engine'\nimport Backdrop from './util/backdrop'\nimport FocusTrap from './util/focustrap'\nimport { enableDismissTrigger } from './util/component-functions'\n\n/**\n * Constants\n */\n\nconst NAME = 'offcanvas'\nconst DATA_KEY = 'bs.offcanvas'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`\nconst ESCAPE_KEY = 'Escape'\n\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_SHOWING = 'showing'\nconst CLASS_NAME_HIDING = 'hiding'\nconst CLASS_NAME_BACKDROP = 'offcanvas-backdrop'\nconst OPEN_SELECTOR = '.offcanvas.show'\n\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_RESIZE = `resize${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY}`\n\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"offcanvas\"]'\n\nconst Default = {\n backdrop: true,\n keyboard: true,\n scroll: false\n}\n\nconst DefaultType = {\n backdrop: '(boolean|string)',\n keyboard: 'boolean',\n scroll: 'boolean'\n}\n\n/**\n * Class definition\n */\n\nclass Offcanvas extends BaseComponent {\n constructor(element, config) {\n super(element, config)\n\n this._isShown = false\n this._backdrop = this._initializeBackDrop()\n this._focustrap = this._initializeFocusTrap()\n this._addEventListeners()\n }\n\n // Getters\n static get Default() {\n return Default\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n static get NAME() {\n return NAME\n }\n\n // Public\n toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget)\n }\n\n show(relatedTarget) {\n if (this._isShown) {\n return\n }\n\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW, { relatedTarget })\n\n if (showEvent.defaultPrevented) {\n return\n }\n\n this._isShown = true\n this._backdrop.show()\n\n if (!this._config.scroll) {\n new ScrollBarHelper().hide()\n }\n\n this._element.setAttribute('aria-modal', true)\n this._element.setAttribute('role', 'dialog')\n this._element.classList.add(CLASS_NAME_SHOWING)\n\n const completeCallBack = () => {\n if (!this._config.scroll) {\n this._focustrap.activate()\n }\n\n this._element.classList.add(CLASS_NAME_SHOW)\n this._element.classList.remove(CLASS_NAME_SHOWING)\n EventHandler.trigger(this._element, EVENT_SHOWN, { relatedTarget })\n }\n\n this._queueCallback(completeCallBack, this._element, true)\n }\n\n hide() {\n if (!this._isShown) {\n return\n }\n\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE)\n\n if (hideEvent.defaultPrevented) {\n return\n }\n\n this._focustrap.deactivate()\n this._element.blur()\n this._isShown = false\n this._element.classList.add(CLASS_NAME_HIDING)\n this._backdrop.hide()\n\n const completeCallback = () => {\n this._element.classList.remove(CLASS_NAME_SHOW, CLASS_NAME_HIDING)\n this._element.removeAttribute('aria-modal')\n this._element.removeAttribute('role')\n\n if (!this._config.scroll) {\n new ScrollBarHelper().reset()\n }\n\n EventHandler.trigger(this._element, EVENT_HIDDEN)\n }\n\n this._queueCallback(completeCallback, this._element, true)\n }\n\n dispose() {\n this._backdrop.dispose()\n this._focustrap.deactivate()\n super.dispose()\n }\n\n // Private\n _initializeBackDrop() {\n const clickCallback = () => {\n if (this._config.backdrop === 'static') {\n EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED)\n return\n }\n\n this.hide()\n }\n\n // 'static' option will be translated to true, and booleans will keep their value\n const isVisible = Boolean(this._config.backdrop)\n\n return new Backdrop({\n className: CLASS_NAME_BACKDROP,\n isVisible,\n isAnimated: true,\n rootElement: this._element.parentNode,\n clickCallback: isVisible ? clickCallback : null\n })\n }\n\n _initializeFocusTrap() {\n return new FocusTrap({\n trapElement: this._element\n })\n }\n\n _addEventListeners() {\n EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => {\n if (event.key !== ESCAPE_KEY) {\n return\n }\n\n if (!this._config.keyboard) {\n EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED)\n return\n }\n\n this.hide()\n })\n }\n\n // Static\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Offcanvas.getOrCreateInstance(this, config)\n\n if (typeof config !== 'string') {\n return\n }\n\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config](this)\n })\n }\n}\n\n/**\n * Data API implementation\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n const target = getElementFromSelector(this)\n\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault()\n }\n\n if (isDisabled(this)) {\n return\n }\n\n EventHandler.one(target, EVENT_HIDDEN, () => {\n // focus on trigger when it is closed\n if (isVisible(this)) {\n this.focus()\n }\n })\n\n // avoid conflict when clicking a toggler of an offcanvas, while another is open\n const alreadyOpen = SelectorEngine.findOne(OPEN_SELECTOR)\n if (alreadyOpen && alreadyOpen !== target) {\n Offcanvas.getInstance(alreadyOpen).hide()\n }\n\n const data = Offcanvas.getOrCreateInstance(target)\n data.toggle(this)\n})\n\nEventHandler.on(window, EVENT_LOAD_DATA_API, () => {\n for (const selector of SelectorEngine.find(OPEN_SELECTOR)) {\n Offcanvas.getOrCreateInstance(selector).show()\n }\n})\n\nEventHandler.on(window, EVENT_RESIZE, () => {\n for (const element of SelectorEngine.find('[aria-modal][class*=show][class*=offcanvas-]')) {\n if (getComputedStyle(element).position !== 'fixed') {\n Offcanvas.getOrCreateInstance(element).hide()\n }\n }\n})\n\nenableDismissTrigger(Offcanvas)\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Offcanvas)\n\nexport default Offcanvas\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.0-beta1): util/sanitizer.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst uriAttributes = new Set([\n 'background',\n 'cite',\n 'href',\n 'itemtype',\n 'longdesc',\n 'poster',\n 'src',\n 'xlink:href'\n])\n\nconst ARIA_ATTRIBUTE_PATTERN = /^aria-[\\w-]*$/i\n\n/**\n * A pattern that recognizes a commonly useful subset of URLs that are safe.\n *\n * Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts\n */\nconst SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i\n\n/**\n * A pattern that matches safe data URLs. Only matches image, video and audio types.\n *\n * Shoutout to Angular https://github.com/angular/angular/blob/12.2.x/packages/core/src/sanitization/url_sanitizer.ts\n */\nconst DATA_URL_PATTERN = /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[\\d+/a-z]+=*$/i\n\nconst allowedAttribute = (attribute, allowedAttributeList) => {\n const attributeName = attribute.nodeName.toLowerCase()\n\n if (allowedAttributeList.includes(attributeName)) {\n if (uriAttributes.has(attributeName)) {\n return Boolean(SAFE_URL_PATTERN.test(attribute.nodeValue) || DATA_URL_PATTERN.test(attribute.nodeValue))\n }\n\n return true\n }\n\n // Check if a regular expression validates the attribute.\n return allowedAttributeList.filter(attributeRegex => attributeRegex instanceof RegExp)\n .some(regex => regex.test(attributeName))\n}\n\nexport const DefaultAllowlist = {\n // Global attributes allowed on any supplied element below.\n '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],\n a: ['target', 'href', 'title', 'rel'],\n area: [],\n b: [],\n br: [],\n col: [],\n code: [],\n div: [],\n em: [],\n hr: [],\n h1: [],\n h2: [],\n h3: [],\n h4: [],\n h5: [],\n h6: [],\n i: [],\n img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],\n li: [],\n ol: [],\n p: [],\n pre: [],\n s: [],\n small: [],\n span: [],\n sub: [],\n sup: [],\n strong: [],\n u: [],\n ul: []\n}\n\nexport function sanitizeHtml(unsafeHtml, allowList, sanitizeFunction) {\n if (!unsafeHtml.length) {\n return unsafeHtml\n }\n\n if (sanitizeFunction && typeof sanitizeFunction === 'function') {\n return sanitizeFunction(unsafeHtml)\n }\n\n const domParser = new window.DOMParser()\n const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html')\n const elements = [].concat(...createdDocument.body.querySelectorAll('*'))\n\n for (const element of elements) {\n const elementName = element.nodeName.toLowerCase()\n\n if (!Object.keys(allowList).includes(elementName)) {\n element.remove()\n\n continue\n }\n\n const attributeList = [].concat(...element.attributes)\n const allowedAttributes = [].concat(allowList['*'] || [], allowList[elementName] || [])\n\n for (const attribute of attributeList) {\n if (!allowedAttribute(attribute, allowedAttributes)) {\n element.removeAttribute(attribute.nodeName)\n }\n }\n }\n\n return createdDocument.body.innerHTML\n}\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.0-beta1): util/template-factory.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { DefaultAllowlist, sanitizeHtml } from './sanitizer'\nimport { getElement, isElement } from '../util/index'\nimport SelectorEngine from '../dom/selector-engine'\nimport Config from './config'\n\n/**\n * Constants\n */\n\nconst NAME = 'TemplateFactory'\n\nconst Default = {\n extraClass: '',\n template: '
    ',\n content: {}, // { selector : text , selector2 : text2 , }\n html: false,\n sanitize: true,\n sanitizeFn: null,\n allowList: DefaultAllowlist\n}\n\nconst DefaultType = {\n extraClass: '(string|function)',\n template: 'string',\n content: 'object',\n html: 'boolean',\n sanitize: 'boolean',\n sanitizeFn: '(null|function)',\n allowList: 'object'\n}\n\nconst DefaultContentType = {\n selector: '(string|element)',\n entry: '(string|element|function|null)'\n}\n\n/**\n * Class definition\n */\n\nclass TemplateFactory extends Config {\n constructor(config) {\n super()\n this._config = this._getConfig(config)\n }\n\n // Getters\n static get Default() {\n return Default\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n static get NAME() {\n return NAME\n }\n\n // Public\n getContent() {\n return Object.values(this._config.content)\n .map(config => this._resolvePossibleFunction(config))\n .filter(Boolean)\n }\n\n hasContent() {\n return this.getContent().length > 0\n }\n\n changeContent(content) {\n this._checkContent(content)\n this._config.content = { ...this._config.content, ...content }\n return this\n }\n\n toHtml() {\n const templateWrapper = document.createElement('div')\n templateWrapper.innerHTML = this._maybeSanitize(this._config.template)\n\n for (const [selector, text] of Object.entries(this._config.content)) {\n this._setContent(templateWrapper, text, selector)\n }\n\n const template = templateWrapper.children[0]\n const extraClass = this._resolvePossibleFunction(this._config.extraClass)\n\n if (extraClass) {\n template.classList.add(...extraClass.split(' '))\n }\n\n return template\n }\n\n // Private\n _typeCheckConfig(config) {\n super._typeCheckConfig(config)\n this._checkContent(config.content)\n }\n\n _checkContent(arg) {\n for (const [selector, content] of Object.entries(arg)) {\n super._typeCheckConfig({ selector, entry: content }, DefaultContentType)\n }\n }\n\n _setContent(template, content, selector) {\n const templateElement = SelectorEngine.findOne(selector, template)\n\n if (!templateElement) {\n return\n }\n\n content = this._resolvePossibleFunction(content)\n\n if (!content) {\n templateElement.remove()\n return\n }\n\n if (isElement(content)) {\n this._putElementInTemplate(getElement(content), templateElement)\n return\n }\n\n if (this._config.html) {\n templateElement.innerHTML = this._maybeSanitize(content)\n return\n }\n\n templateElement.textContent = content\n }\n\n _maybeSanitize(arg) {\n return this._config.sanitize ? sanitizeHtml(arg, this._config.allowList, this._config.sanitizeFn) : arg\n }\n\n _resolvePossibleFunction(arg) {\n return typeof arg === 'function' ? arg(this) : arg\n }\n\n _putElementInTemplate(element, templateElement) {\n if (this._config.html) {\n templateElement.innerHTML = ''\n templateElement.append(element)\n return\n }\n\n templateElement.textContent = element.textContent\n }\n}\n\nexport default TemplateFactory\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.0-beta1): tooltip.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport * as Popper from '@popperjs/core'\nimport { defineJQueryPlugin, findShadowRoot, getElement, getUID, isRTL, noop } from './util/index'\nimport { DefaultAllowlist } from './util/sanitizer'\nimport EventHandler from './dom/event-handler'\nimport Manipulator from './dom/manipulator'\nimport BaseComponent from './base-component'\nimport TemplateFactory from './util/template-factory'\n\n/**\n * Constants\n */\n\nconst NAME = 'tooltip'\nconst DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn'])\n\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_MODAL = 'modal'\nconst CLASS_NAME_SHOW = 'show'\n\nconst SELECTOR_TOOLTIP_INNER = '.tooltip-inner'\nconst SELECTOR_MODAL = `.${CLASS_NAME_MODAL}`\n\nconst EVENT_MODAL_HIDE = 'hide.bs.modal'\n\nconst TRIGGER_HOVER = 'hover'\nconst TRIGGER_FOCUS = 'focus'\nconst TRIGGER_CLICK = 'click'\nconst TRIGGER_MANUAL = 'manual'\n\nconst EVENT_HIDE = 'hide'\nconst EVENT_HIDDEN = 'hidden'\nconst EVENT_SHOW = 'show'\nconst EVENT_SHOWN = 'shown'\nconst EVENT_INSERTED = 'inserted'\nconst EVENT_CLICK = 'click'\nconst EVENT_FOCUSIN = 'focusin'\nconst EVENT_FOCUSOUT = 'focusout'\nconst EVENT_MOUSEENTER = 'mouseenter'\nconst EVENT_MOUSELEAVE = 'mouseleave'\n\nconst AttachmentMap = {\n AUTO: 'auto',\n TOP: 'top',\n RIGHT: isRTL() ? 'left' : 'right',\n BOTTOM: 'bottom',\n LEFT: isRTL() ? 'right' : 'left'\n}\n\nconst Default = {\n animation: true,\n template: '
    ' +\n '
    ' +\n '
    ' +\n '
    ',\n trigger: 'hover focus',\n title: '',\n delay: 0,\n html: false,\n selector: false,\n placement: 'top',\n offset: [0, 0],\n container: false,\n fallbackPlacements: ['top', 'right', 'bottom', 'left'],\n boundary: 'clippingParents',\n customClass: '',\n sanitize: true,\n sanitizeFn: null,\n allowList: DefaultAllowlist,\n popperConfig: null\n}\n\nconst DefaultType = {\n animation: 'boolean',\n template: 'string',\n title: '(string|element|function)',\n trigger: 'string',\n delay: '(number|object)',\n html: 'boolean',\n selector: '(string|boolean)',\n placement: '(string|function)',\n offset: '(array|string|function)',\n container: '(string|element|boolean)',\n fallbackPlacements: 'array',\n boundary: '(string|element)',\n customClass: '(string|function)',\n sanitize: 'boolean',\n sanitizeFn: '(null|function)',\n allowList: 'object',\n popperConfig: '(null|object|function)'\n}\n\n/**\n * Class definition\n */\n\nclass Tooltip extends BaseComponent {\n constructor(element, config) {\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s tooltips require Popper (https://popper.js.org)')\n }\n\n super(element, config)\n\n // Private\n this._isEnabled = true\n this._timeout = 0\n this._isHovered = false\n this._activeTrigger = {}\n this._popper = null\n this._templateFactory = null\n\n // Protected\n this.tip = null\n\n this._setListeners()\n }\n\n // Getters\n static get Default() {\n return Default\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n static get NAME() {\n return NAME\n }\n\n // Public\n enable() {\n this._isEnabled = true\n }\n\n disable() {\n this._isEnabled = false\n }\n\n toggleEnabled() {\n this._isEnabled = !this._isEnabled\n }\n\n toggle(event) {\n if (!this._isEnabled) {\n return\n }\n\n if (event) {\n const context = this._initializeOnDelegatedTarget(event)\n\n context._activeTrigger.click = !context._activeTrigger.click\n\n if (context._isWithActiveTrigger()) {\n context._enter()\n } else {\n context._leave()\n }\n\n return\n }\n\n if (this._isShown()) {\n this._leave()\n return\n }\n\n this._enter()\n }\n\n dispose() {\n clearTimeout(this._timeout)\n\n EventHandler.off(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler)\n\n if (this.tip) {\n this.tip.remove()\n }\n\n this._disposePopper()\n super.dispose()\n }\n\n show() {\n if (this._element.style.display === 'none') {\n throw new Error('Please use show on visible elements')\n }\n\n if (!(this._isWithContent() && this._isEnabled)) {\n return\n }\n\n const showEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOW))\n const shadowRoot = findShadowRoot(this._element)\n const isInTheDom = (shadowRoot || this._element.ownerDocument.documentElement).contains(this._element)\n\n if (showEvent.defaultPrevented || !isInTheDom) {\n return\n }\n\n const tip = this._getTipElement()\n\n this._element.setAttribute('aria-describedby', tip.getAttribute('id'))\n\n const { container } = this._config\n\n if (!this._element.ownerDocument.documentElement.contains(this.tip)) {\n container.append(tip)\n EventHandler.trigger(this._element, this.constructor.eventName(EVENT_INSERTED))\n }\n\n if (this._popper) {\n this._popper.update()\n } else {\n this._createPopper(tip)\n }\n\n tip.classList.add(CLASS_NAME_SHOW)\n\n // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n if ('ontouchstart' in document.documentElement) {\n for (const element of [].concat(...document.body.children)) {\n EventHandler.on(element, 'mouseover', noop)\n }\n }\n\n const complete = () => {\n const previousHoverState = this._isHovered\n\n this._isHovered = false\n EventHandler.trigger(this._element, this.constructor.eventName(EVENT_SHOWN))\n\n if (previousHoverState) {\n this._leave()\n }\n }\n\n this._queueCallback(complete, this.tip, this._isAnimated())\n }\n\n hide() {\n if (!this._isShown()) {\n return\n }\n\n const hideEvent = EventHandler.trigger(this._element, this.constructor.eventName(EVENT_HIDE))\n if (hideEvent.defaultPrevented) {\n return\n }\n\n const tip = this._getTipElement()\n tip.classList.remove(CLASS_NAME_SHOW)\n\n // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n if ('ontouchstart' in document.documentElement) {\n for (const element of [].concat(...document.body.children)) {\n EventHandler.off(element, 'mouseover', noop)\n }\n }\n\n this._activeTrigger[TRIGGER_CLICK] = false\n this._activeTrigger[TRIGGER_FOCUS] = false\n this._activeTrigger[TRIGGER_HOVER] = false\n this._isHovered = false\n\n const complete = () => {\n if (this._isWithActiveTrigger()) {\n return\n }\n\n if (!this._isHovered) {\n tip.remove()\n }\n\n this._element.removeAttribute('aria-describedby')\n EventHandler.trigger(this._element, this.constructor.eventName(EVENT_HIDDEN))\n\n this._disposePopper()\n }\n\n this._queueCallback(complete, this.tip, this._isAnimated())\n }\n\n update() {\n if (this._popper) {\n this._popper.update()\n }\n }\n\n // Protected\n _isWithContent() {\n return Boolean(this._getTitle())\n }\n\n _getTipElement() {\n if (!this.tip) {\n this.tip = this._createTipElement(this._getContentForTemplate())\n }\n\n return this.tip\n }\n\n _createTipElement(content) {\n const tip = this._getTemplateFactory(content).toHtml()\n\n // todo: remove this check on v6\n if (!tip) {\n return null\n }\n\n tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW)\n // todo: on v6 the following can be achieved with CSS only\n tip.classList.add(`bs-${this.constructor.NAME}-auto`)\n\n const tipId = getUID(this.constructor.NAME).toString()\n\n tip.setAttribute('id', tipId)\n\n if (this._isAnimated()) {\n tip.classList.add(CLASS_NAME_FADE)\n }\n\n return tip\n }\n\n setContent(content) {\n let isShown = false\n if (this.tip) {\n isShown = this._isShown()\n this.tip.remove()\n this.tip = null\n }\n\n this._disposePopper()\n this.tip = this._createTipElement(content)\n\n if (isShown) {\n this.show()\n }\n }\n\n _getTemplateFactory(content) {\n if (this._templateFactory) {\n this._templateFactory.changeContent(content)\n } else {\n this._templateFactory = new TemplateFactory({\n ...this._config,\n // the `content` var has to be after `this._config`\n // to override config.content in case of popover\n content,\n extraClass: this._resolvePossibleFunction(this._config.customClass)\n })\n }\n\n return this._templateFactory\n }\n\n _getContentForTemplate() {\n return {\n [SELECTOR_TOOLTIP_INNER]: this._getTitle()\n }\n }\n\n _getTitle() {\n return this._config.title\n }\n\n // Private\n _initializeOnDelegatedTarget(event) {\n return this.constructor.getOrCreateInstance(event.delegateTarget, this._getDelegateConfig())\n }\n\n _isAnimated() {\n return this._config.animation || (this.tip && this.tip.classList.contains(CLASS_NAME_FADE))\n }\n\n _isShown() {\n return this.tip && this.tip.classList.contains(CLASS_NAME_SHOW)\n }\n\n _createPopper(tip) {\n const placement = typeof this._config.placement === 'function' ?\n this._config.placement.call(this, tip, this._element) :\n this._config.placement\n const attachment = AttachmentMap[placement.toUpperCase()]\n this._popper = Popper.createPopper(this._element, tip, this._getPopperConfig(attachment))\n }\n\n _getOffset() {\n const { offset } = this._config\n\n if (typeof offset === 'string') {\n return offset.split(',').map(value => Number.parseInt(value, 10))\n }\n\n if (typeof offset === 'function') {\n return popperData => offset(popperData, this._element)\n }\n\n return offset\n }\n\n _resolvePossibleFunction(arg) {\n return typeof arg === 'function' ? arg.call(this._element) : arg\n }\n\n _getPopperConfig(attachment) {\n const defaultBsPopperConfig = {\n placement: attachment,\n modifiers: [\n {\n name: 'flip',\n options: {\n fallbackPlacements: this._config.fallbackPlacements\n }\n },\n {\n name: 'offset',\n options: {\n offset: this._getOffset()\n }\n },\n {\n name: 'preventOverflow',\n options: {\n boundary: this._config.boundary\n }\n },\n {\n name: 'arrow',\n options: {\n element: `.${this.constructor.NAME}-arrow`\n }\n },\n {\n name: 'preSetPlacement',\n enabled: true,\n phase: 'beforeMain',\n fn: data => {\n // Pre-set Popper's placement attribute in order to read the arrow sizes properly.\n // Otherwise, Popper mixes up the width and height dimensions since the initial arrow style is for top placement\n this._getTipElement().setAttribute('data-popper-placement', data.state.placement)\n }\n }\n ]\n }\n\n return {\n ...defaultBsPopperConfig,\n ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)\n }\n }\n\n _setListeners() {\n const triggers = this._config.trigger.split(' ')\n\n for (const trigger of triggers) {\n if (trigger === 'click') {\n EventHandler.on(this._element, this.constructor.eventName(EVENT_CLICK), this._config.selector, event => this.toggle(event))\n } else if (trigger !== TRIGGER_MANUAL) {\n const eventIn = trigger === TRIGGER_HOVER ?\n this.constructor.eventName(EVENT_MOUSEENTER) :\n this.constructor.eventName(EVENT_FOCUSIN)\n const eventOut = trigger === TRIGGER_HOVER ?\n this.constructor.eventName(EVENT_MOUSELEAVE) :\n this.constructor.eventName(EVENT_FOCUSOUT)\n\n EventHandler.on(this._element, eventIn, this._config.selector, event => {\n const context = this._initializeOnDelegatedTarget(event)\n context._activeTrigger[event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER] = true\n context._enter()\n })\n EventHandler.on(this._element, eventOut, this._config.selector, event => {\n const context = this._initializeOnDelegatedTarget(event)\n context._activeTrigger[event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER] =\n context._element.contains(event.relatedTarget)\n\n context._leave()\n })\n }\n }\n\n this._hideModalHandler = () => {\n if (this._element) {\n this.hide()\n }\n }\n\n EventHandler.on(this._element.closest(SELECTOR_MODAL), EVENT_MODAL_HIDE, this._hideModalHandler)\n\n if (this._config.selector) {\n this._config = {\n ...this._config,\n trigger: 'manual',\n selector: ''\n }\n } else {\n this._fixTitle()\n }\n }\n\n _fixTitle() {\n const title = this._config.originalTitle\n\n if (!title) {\n return\n }\n\n if (!this._element.getAttribute('aria-label') && !this._element.textContent) {\n this._element.setAttribute('aria-label', title)\n }\n\n this._element.removeAttribute('title')\n }\n\n _enter() {\n if (this._isShown() || this._isHovered) {\n this._isHovered = true\n return\n }\n\n this._isHovered = true\n\n this._setTimeout(() => {\n if (this._isHovered) {\n this.show()\n }\n }, this._config.delay.show)\n }\n\n _leave() {\n if (this._isWithActiveTrigger()) {\n return\n }\n\n this._isHovered = false\n\n this._setTimeout(() => {\n if (!this._isHovered) {\n this.hide()\n }\n }, this._config.delay.hide)\n }\n\n _setTimeout(handler, timeout) {\n clearTimeout(this._timeout)\n this._timeout = setTimeout(handler, timeout)\n }\n\n _isWithActiveTrigger() {\n return Object.values(this._activeTrigger).includes(true)\n }\n\n _getConfig(config) {\n const dataAttributes = Manipulator.getDataAttributes(this._element)\n\n for (const dataAttribute of Object.keys(dataAttributes)) {\n if (DISALLOWED_ATTRIBUTES.has(dataAttribute)) {\n delete dataAttributes[dataAttribute]\n }\n }\n\n config = {\n ...dataAttributes,\n ...(typeof config === 'object' && config ? config : {})\n }\n config = this._mergeConfigObj(config)\n config = this._configAfterMerge(config)\n this._typeCheckConfig(config)\n return config\n }\n\n _configAfterMerge(config) {\n config.container = config.container === false ? document.body : getElement(config.container)\n\n if (typeof config.delay === 'number') {\n config.delay = {\n show: config.delay,\n hide: config.delay\n }\n }\n\n config.originalTitle = this._element.getAttribute('title') || ''\n config.title = this._resolvePossibleFunction(config.title) || config.originalTitle\n if (typeof config.title === 'number') {\n config.title = config.title.toString()\n }\n\n if (typeof config.content === 'number') {\n config.content = config.content.toString()\n }\n\n return config\n }\n\n _getDelegateConfig() {\n const config = {}\n\n for (const key in this._config) {\n if (this.constructor.Default[key] !== this._config[key]) {\n config[key] = this._config[key]\n }\n }\n\n // In the future can be replaced with:\n // const keysWithDifferentValues = Object.entries(this._config).filter(entry => this.constructor.Default[entry[0]] !== this._config[entry[0]])\n // `Object.fromEntries(keysWithDifferentValues)`\n return config\n }\n\n _disposePopper() {\n if (this._popper) {\n this._popper.destroy()\n this._popper = null\n }\n }\n\n // Static\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Tooltip.getOrCreateInstance(this, config)\n\n if (typeof config !== 'string') {\n return\n }\n\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n })\n }\n}\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Tooltip)\n\nexport default Tooltip\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.0-beta1): popover.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { defineJQueryPlugin } from './util/index'\nimport Tooltip from './tooltip'\n\n/**\n * Constants\n */\n\nconst NAME = 'popover'\n\nconst SELECTOR_TITLE = '.popover-header'\nconst SELECTOR_CONTENT = '.popover-body'\n\nconst Default = {\n ...Tooltip.Default,\n placement: 'right',\n offset: [0, 8],\n trigger: 'click',\n content: '',\n template: '
    ' +\n '
    ' +\n '

    ' +\n '
    ' +\n '
    '\n}\n\nconst DefaultType = {\n ...Tooltip.DefaultType,\n content: '(null|string|element|function)'\n}\n\n/**\n * Class definition\n */\n\nclass Popover extends Tooltip {\n // Getters\n static get Default() {\n return Default\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n static get NAME() {\n return NAME\n }\n\n // Overrides\n _isWithContent() {\n return this._getTitle() || this._getContent()\n }\n\n // Private\n _getContentForTemplate() {\n return {\n [SELECTOR_TITLE]: this._getTitle(),\n [SELECTOR_CONTENT]: this._getContent()\n }\n }\n\n _getContent() {\n return this._resolvePossibleFunction(this._config.content)\n }\n\n // Static\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Popover.getOrCreateInstance(this, config)\n\n if (typeof config !== 'string') {\n return\n }\n\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n })\n }\n}\n\n/**\n * jQuery\n */\n\ndefineJQueryPlugin(Popover)\n\nexport default Popover\n","/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.2.0-beta1): scrollspy.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { defineJQueryPlugin, getElement, isDisabled, isVisible } from './util/index'\nimport EventHandler from './dom/event-handler'\nimport SelectorEngine from './dom/selector-engine'\nimport BaseComponent from './base-component'\n\n/**\n * Constants\n */\n\nconst NAME = 'scrollspy'\nconst DATA_KEY = 'bs.scrollspy'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst EVENT_ACTIVATE = `activate${EVENT_KEY}`\nconst EVENT_CLICK = `click${EVENT_KEY}`\nconst EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item'\nconst CLASS_NAME_ACTIVE = 'active'\n\nconst SELECTOR_DATA_SPY = '[data-bs-spy=\"scroll\"]'\nconst SELECTOR_TARGET_LINKS = '[href]'\nconst SELECTOR_NAV_LIST_GROUP = '.nav, .list-group'\nconst SELECTOR_NAV_LINKS = '.nav-link'\nconst SELECTOR_NAV_ITEMS = '.nav-item'\nconst SELECTOR_LIST_ITEMS = '.list-group-item'\nconst SELECTOR_LINK_ITEMS = `${SELECTOR_NAV_LINKS}, ${SELECTOR_NAV_ITEMS} > ${SELECTOR_NAV_LINKS}, ${SELECTOR_LIST_ITEMS}`\nconst SELECTOR_DROPDOWN = '.dropdown'\nconst SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'\n\nconst Default = {\n offset: null, // TODO: v6 @deprecated, keep it for backwards compatibility reasons\n rootMargin: '0px 0px -25%',\n smoothScroll: false,\n target: null\n}\n\nconst DefaultType = {\n offset: '(number|null)', // TODO v6 @deprecated, keep it for backwards compatibility reasons\n rootMargin: 'string',\n smoothScroll: 'boolean',\n target: 'element'\n}\n\n/**\n * Class definition\n */\n\nclass ScrollSpy extends BaseComponent {\n constructor(element, config) {\n super(element, config)\n\n // this._element is the observablesContainer and config.target the menu links wrapper\n this._targetLinks = new Map()\n this._observableSections = new Map()\n this._rootElement = getComputedStyle(this._element).overflowY === 'visible' ? null : this._element\n this._activeTarget = null\n this._observer = null\n this._previousScrollData = {\n visibleEntryTop: 0,\n parentScrollTop: 0\n }\n this.refresh() // initialize\n }\n\n // Getters\n static get Default() {\n return Default\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n static get NAME() {\n return NAME\n }\n\n // Public\n refresh() {\n this._initializeTargetsAndObservables()\n this._maybeEnableSmoothScroll()\n\n if (this._observer) {\n this._observer.disconnect()\n } else {\n this._observer = this._getNewObserver()\n }\n\n for (const section of this._observableSections.values()) {\n this._observer.observe(section)\n }\n }\n\n dispose() {\n this._observer.disconnect()\n super.dispose()\n }\n\n // Private\n _configAfterMerge(config) {\n // TODO: on v6 target should be given explicitly & remove the {target: 'ss-target'} case\n config.target = getElement(config.target) || document.body\n\n return config\n }\n\n _maybeEnableSmoothScroll() {\n if (!this._config.smoothScroll) {\n return\n }\n\n // unregister any previous listeners\n EventHandler.off(this._config.target, EVENT_CLICK)\n\n EventHandler.on(this._config.target, EVENT_CLICK, SELECTOR_TARGET_LINKS, event => {\n const observableSection = this._observableSections.get(event.target.hash)\n if (observableSection) {\n event.preventDefault()\n const root = this._rootElement || window\n const height = observableSection.offsetTop - this._element.offsetTop\n if (root.scrollTo) {\n root.scrollTo({ top: height })\n return\n }\n\n // Chrome 60 doesn't support `scrollTo`\n root.scrollTop = height\n }\n })\n }\n\n _getNewObserver() {\n const options = {\n root: this._rootElement,\n threshold: [0.1, 0.5, 1],\n rootMargin: this._getRootMargin()\n }\n\n return new IntersectionObserver(entries => this._observerCallback(entries), options)\n }\n\n // The logic of selection\n _observerCallback(entries) {\n const targetElement = entry => this._targetLinks.get(`#${entry.target.id}`)\n const activate = entry => {\n this._previousScrollData.visibleEntryTop = entry.target.offsetTop\n this._process(targetElement(entry))\n }\n\n const parentScrollTop = (this._rootElement || document.documentElement).scrollTop\n const userScrollsDown = parentScrollTop >= this._previousScrollData.parentScrollTop\n this._previousScrollData.parentScrollTop = parentScrollTop\n\n for (const entry of entries) {\n if (!entry.isIntersecting) {\n this._activeTarget = null\n this._clearActiveClass(targetElement(entry))\n\n continue\n }\n\n const entryIsLowerThanPrevious = entry.target.offsetTop >= this._previousScrollData.visibleEntryTop\n // if we are scrolling down, pick the bigger offsetTop\n if (userScrollsDown && entryIsLowerThanPrevious) {\n activate(entry)\n // if parent isn't scrolled, let's keep the first visible item, breaking the iteration\n if (!parentScrollTop) {\n return\n }\n\n continue\n }\n\n // if we are scrolling up, pick the smallest offsetTop\n if (!userScrollsDown && !entryIsLowerThanPrevious) {\n activate(entry)\n }\n }\n }\n\n // TODO: v6 Only for backwards compatibility reasons. Use rootMargin only\n _getRootMargin() {\n return this._config.offset ? `${this._config.offset}px 0px -30%` : this._config.rootMargin\n }\n\n _initializeTargetsAndObservables() {\n this._targetLinks = new Map()\n this._observableSections = new Map()\n\n const targetLinks = SelectorEngine.find(SELECTOR_TARGET_LINKS, this._config.target)\n\n for (const anchor of targetLinks) {\n // ensure that the anchor has an id and is not disabled\n if (!anchor.hash || isDisabled(anchor)) {\n continue\n }\n\n const observableSection = SelectorEngine.findOne(anchor.hash, this._element)\n\n // ensure that the observableSection exists & is visible\n if (isVisible(observableSection)) {\n this._targetLinks.set(anchor.hash, anchor)\n this._observableSections.set(anchor.hash, observableSection)\n }\n }\n }\n\n _process(target) {\n if (this._activeTarget === target) {\n return\n }\n\n this._clearActiveClass(this._config.target)\n this._activeTarget = target\n target.classList.add(CLASS_NAME_ACTIVE)\n this._activateParents(target)\n\n EventHandler.trigger(this._element, EVENT_ACTIVATE, { relatedTarget: target })\n }\n\n _activateParents(target) {\n // Activate dropdown parents\n if (target.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {\n SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE, target.closest(SELECTOR_DROPDOWN))\n .classList.add(CLASS_NAME_ACTIVE)\n return\n }\n\n for (const listGroup of SelectorEngine.parents(target, SELECTOR_NAV_LIST_GROUP)) {\n // Set triggered links parents as active\n // With both