diff --git a/js/index-BahqIHTU.mjs.map b/js/index-BahqIHTU.mjs.map index a9f090356..7664d69eb 100644 --- a/js/index-BahqIHTU.mjs.map +++ b/js/index-BahqIHTU.mjs.map @@ -1 +1 @@ -{"version":3,"file":"index-BahqIHTU.mjs","sources":["../node_modules/@babel/runtime/helpers/esm/typeof.js","../node_modules/@babel/runtime/helpers/esm/classCallCheck.js","../node_modules/@babel/runtime/helpers/esm/toPrimitive.js","../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","../node_modules/@babel/runtime/helpers/esm/createClass.js","../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../node_modules/@babel/runtime/helpers/esm/classApplyDescriptorGet.js","../node_modules/@babel/runtime/helpers/esm/assertClassBrand.js","../node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet2.js","../node_modules/@babel/runtime/helpers/esm/classPrivateFieldGet.js","../node_modules/@babel/runtime/helpers/esm/classApplyDescriptorSet.js","../node_modules/@babel/runtime/helpers/esm/classPrivateFieldSet.js","../node_modules/react/cjs/react.production.min.js","../node_modules/react/index.js","../node_modules/scheduler/cjs/scheduler.production.min.js","../node_modules/scheduler/index.js","../node_modules/react-dom/cjs/react-dom.production.min.js","../node_modules/react-dom/index.js","../node_modules/react-dom/client.js","../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../node_modules/@babel/runtime/helpers/esm/objectWithoutProperties.js","../node_modules/prop-types/lib/ReactPropTypesSecret.js","../node_modules/prop-types/factoryWithThrowingShims.js","../node_modules/prop-types/index.js","../node_modules/react-is/cjs/react-is.production.min.js","../node_modules/react-is/index.js","../node_modules/@emotion/stylis/dist/stylis.browser.esm.js","../node_modules/@emotion/unitless/dist/unitless.browser.esm.js","../node_modules/@emotion/memoize/dist/emotion-memoize.esm.js","../node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js","../node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js","../node_modules/hoist-non-react-statics/node_modules/react-is/index.js","../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","../node_modules/styled-components/dist/styled-components.browser.esm.js","../node_modules/lodash.merge/index.js","../node_modules/@scaleflex/ui/utils/types/prop-types/record.js","../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js","../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","../node_modules/@babel/runtime/helpers/esm/iterableToArray.js","../node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js","../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","../node_modules/@scaleflex/ui/utils/functions/generate-class-names.js","../node_modules/@scaleflex/ui/utils/functions/intrinsic-component.js","../node_modules/@scaleflex/ui/utils/functions/object-keys.js","../node_modules/@scaleflex/ui/utils/functions/object-values.js","../node_modules/@scaleflex/ui/utils/functions/apply-polymorphic-function-prop.js","../node_modules/@scaleflex/ui/utils/functions/apply-display-names.js","../node_modules/@scaleflex/ui/utils/functions/set-ref.js","../node_modules/@scaleflex/ui/utils/functions/use-fork-ref.js","../node_modules/@scaleflex/ui/utils/functions/color-picker/restrict-number.js","../node_modules/@scaleflex/ui/utils/functions/color-picker/map-number.js","../node_modules/@scaleflex/ui/utils/functions/color-picker/color-converters.js","../node_modules/@scaleflex/ui/utils/functions/get-elem-document-coords.js","../node_modules/@scaleflex/ui/utils/functions/slider/utils.js","../node_modules/@scaleflex/ui/utils/types/palette/color.js","../node_modules/@scaleflex/ui/utils/functions/scrollbar.js","../node_modules/@scaleflex/ui/utils/types/css/breakpoint.js","../node_modules/@scaleflex/ui/utils/types/shadows/shadows.js","../node_modules/@scaleflex/ui/utils/types/typography/font-weight.js","../node_modules/@scaleflex/ui/utils/types/typography/font-variant.js","../node_modules/@scaleflex/ui/utils/types/shape/border-radius-size.js","../node_modules/@scaleflex/ui/theme/roots/typography/typography.component.js","../node_modules/@scaleflex/ui/theme/roots/typography/entity/default-typography.js","../node_modules/@scaleflex/ui/theme/roots/common-styles.js","../node_modules/@scaleflex/ui/theme/roots/palette/entity/default-palette.js","../node_modules/@scaleflex/ui/theme/roots/shadows/entity/default-shadows.js","../node_modules/@scaleflex/ui/theme/roots/breakpoints/entity/default-breakpoints.js","../node_modules/@scaleflex/ui/theme/roots/breakpoints/entity/create-breakpoints.js","../node_modules/@scaleflex/ui/theme/theme-provider/theme-provider.context.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/slicedToArray.js","../node_modules/@babel/runtime/helpers/esm/extends.js","../node_modules/konva/lib/Global.js","../node_modules/konva/lib/Util.js","../node_modules/konva/lib/Validators.js","../node_modules/konva/lib/Factory.js","../node_modules/konva/lib/Context.js","../node_modules/konva/lib/Canvas.js","../node_modules/konva/lib/DragAndDrop.js","../node_modules/konva/lib/Node.js","../node_modules/konva/lib/Container.js","../node_modules/konva/lib/PointerEvents.js","../node_modules/konva/lib/Stage.js","../node_modules/konva/lib/Shape.js","../node_modules/konva/lib/Layer.js","../node_modules/konva/lib/FastLayer.js","../node_modules/konva/lib/Group.js","../node_modules/konva/lib/Animation.js","../node_modules/konva/lib/Tween.js","../node_modules/konva/lib/_CoreInternals.js","../node_modules/konva/lib/shapes/Arc.js","../node_modules/konva/lib/shapes/Line.js","../node_modules/konva/lib/shapes/Path.js","../node_modules/konva/lib/shapes/Arrow.js","../node_modules/konva/lib/shapes/Circle.js","../node_modules/konva/lib/shapes/Ellipse.js","../node_modules/konva/lib/shapes/Image.js","../node_modules/konva/lib/shapes/Label.js","../node_modules/konva/lib/shapes/Rect.js","../node_modules/konva/lib/shapes/RegularPolygon.js","../node_modules/konva/lib/shapes/Ring.js","../node_modules/konva/lib/shapes/Sprite.js","../node_modules/konva/lib/shapes/Star.js","../node_modules/konva/lib/shapes/Text.js","../node_modules/konva/lib/shapes/TextPath.js","../node_modules/konva/lib/shapes/Transformer.js","../node_modules/konva/lib/shapes/Wedge.js","../node_modules/konva/lib/filters/Blur.js","../node_modules/konva/lib/filters/Brighten.js","../node_modules/konva/lib/filters/Contrast.js","../node_modules/konva/lib/filters/Emboss.js","../node_modules/konva/lib/filters/Enhance.js","../node_modules/konva/lib/filters/Grayscale.js","../node_modules/konva/lib/filters/HSL.js","../node_modules/konva/lib/filters/HSV.js","../node_modules/konva/lib/filters/Invert.js","../node_modules/konva/lib/filters/Kaleidoscope.js","../node_modules/konva/lib/filters/Mask.js","../node_modules/konva/lib/filters/Noise.js","../node_modules/konva/lib/filters/Pixelate.js","../node_modules/konva/lib/filters/Posterize.js","../node_modules/konva/lib/filters/RGB.js","../node_modules/konva/lib/filters/RGBA.js","../node_modules/konva/lib/filters/Sepia.js","../node_modules/konva/lib/filters/Solarize.js","../node_modules/konva/lib/filters/Threshold.js","../node_modules/konva/lib/_FullInternals.js","../node_modules/react-reconciler/cjs/react-reconciler.production.min.js","../node_modules/react-reconciler/index.js","../node_modules/react-reconciler/cjs/react-reconciler-constants.production.min.js","../node_modules/react-reconciler/constants.js","../node_modules/react-konva/es/makeUpdates.js","../node_modules/react-konva/es/ReactKonvaHostConfig.js","../node_modules/its-fine/dist/index.js","../node_modules/react-konva/es/ReactKonvaCore.js","../node_modules/react-filerobot-image-editor/lib/utils/getDimensionsMinimalRatio.js","../node_modules/react-filerobot-image-editor/lib/utils/constants.js","../node_modules/react-filerobot-image-editor/lib/utils/cropImage.js","../node_modules/react-filerobot-image-editor/lib/actions/addFilter.js","../node_modules/react-filerobot-image-editor/lib/actions/hideLoader.js","../node_modules/@babel/runtime/helpers/esm/toArray.js","../node_modules/react-filerobot-image-editor/lib/context/defaultConfig.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/BaseFilters.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/BlackAndWhite.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Clarendon.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Gingham.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Moon.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Lark.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Reyes.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Juno.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Slumber.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Crema.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Ludwig.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Aden.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Perpetua.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Amaro.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Mayfair.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Rise.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Hudson.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Valencia.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/XPro2.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Sierra.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Willow.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/LoFi.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Hefe.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Nashville.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Stinson.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Vesper.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Earlybird.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Brannan.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Sutro.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Toaster.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Walden.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/NinteenSeventySeven.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Kelvin.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Maven.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Ginza.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Skyline.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Dogpatch.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Brooklyn.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Helena.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Ashby.js","../node_modules/react-filerobot-image-editor/lib/custom/filters/Charmes.js","../node_modules/react-filerobot-image-editor/lib/utils/filterStrToClass.js","../node_modules/react-filerobot-image-editor/lib/custom/finetunes/Warmth.js","../node_modules/react-filerobot-image-editor/lib/custom/finetunes/CustomThreshold.js","../node_modules/react-filerobot-image-editor/lib/utils/finetunesStrsToClasses.js","../node_modules/react-filerobot-image-editor/lib/context/getInitialAppState.js","../node_modules/react-filerobot-image-editor/lib/utils/extractCurrentDesignState.js","../node_modules/react-filerobot-image-editor/lib/actions/redo.js","../node_modules/react-filerobot-image-editor/lib/actions/reset.js","../node_modules/react-filerobot-image-editor/lib/actions/setFeedback.js","../node_modules/react-filerobot-image-editor/lib/actions/showLoader.js","../node_modules/@scaleflex/icons/utils/functions/intrinsic-component.js","../node_modules/@scaleflex/icons/brightness.js","../node_modules/react-filerobot-image-editor/lib/context/AppContext.js","../node_modules/@scaleflex/ui/theme/hooks/use-theme.js","../node_modules/@scaleflex/ui/theme/hooks/use-media-query.js","../node_modules/react-filerobot-image-editor/lib/context/defaultTranslations.js","../node_modules/react-filerobot-image-editor/lib/utils/translator.js","../node_modules/react-filerobot-image-editor/lib/context/appReducer.js","../node_modules/react-filerobot-image-editor/lib/context/AppProvider.js","../node_modules/react-filerobot-image-editor/lib/context/AppProviderOverridenValue.js","../node_modules/react-filerobot-image-editor/lib/hooks/useStore.js","../node_modules/react-filerobot-image-editor/lib/hooks/useFinetune.js","../node_modules/react-filerobot-image-editor/lib/hooks/useFilter.js","../node_modules/react-filerobot-image-editor/lib/utils/randomId.js","../node_modules/react-filerobot-image-editor/lib/utils/debounce.js","../node_modules/react-filerobot-image-editor/lib/utils/getScrollOffset.js","../node_modules/react-filerobot-image-editor/lib/utils/getElemDocumentCoords.js","../node_modules/react-filerobot-image-editor/lib/utils/restrictNumber.js","../node_modules/react-filerobot-image-editor/lib/utils/getPointerOffsetPositionBoundedToObject.js","../node_modules/react-filerobot-image-editor/lib/hooks/useAnnotation/getBoundingRectUnScaled.js","../node_modules/react-filerobot-image-editor/lib/hooks/useAnnotation/getNewAnnotationPreview.js","../node_modules/react-filerobot-image-editor/lib/hooks/useAnnotation/previewThenCallAnnotationAdding.js","../node_modules/react-filerobot-image-editor/lib/hooks/useDebouncedCallback.js","../node_modules/react-filerobot-image-editor/lib/hooks/useAnnotation/index.js","../node_modules/react-filerobot-image-editor/lib/hooks/useAppReducer.js","../node_modules/react-filerobot-image-editor/lib/hooks/useAnnotationEvents.js","../node_modules/react-filerobot-image-editor/lib/hooks/useResizeObserver.js","../node_modules/react-filerobot-image-editor/lib/hooks/usePhoneScreen.js","../node_modules/react-filerobot-image-editor/lib/utils/mapNumber.js","../node_modules/react-filerobot-image-editor/lib/utils/mapCropBox.js","../node_modules/react-filerobot-image-editor/lib/utils/getSizeAfterRotation.js","../node_modules/react-filerobot-image-editor/lib/utils/imageToBase64.js","../node_modules/react-filerobot-image-editor/lib/utils/getFileFullName.js","../node_modules/react-filerobot-image-editor/lib/utils/sha1.js","../node_modules/react-filerobot-image-editor/lib/utils/getImageSealingParams.js","../node_modules/react-filerobot-image-editor/lib/utils/rgbaToHexa.js","../node_modules/react-filerobot-image-editor/lib/utils/toPrecisedFloat.js","../node_modules/react-filerobot-image-editor/lib/utils/operationsToCloudimageUrl.js","../node_modules/react-filerobot-image-editor/lib/hooks/useTransformedImgData.js","../node_modules/@scaleflex/ui/utils/types/position/position.js","../node_modules/@scaleflex/ui/utils/types/color/badge-color.js","../node_modules/@scaleflex/ui/utils/types/color/button-color.js","../node_modules/@scaleflex/ui/utils/types/color/icon-button-color.js","../node_modules/@scaleflex/ui/utils/types/size/button-size.js","../node_modules/@scaleflex/ui/utils/types/size/input-size.js","../node_modules/@scaleflex/ui/core/label/types/type.js","../node_modules/@scaleflex/ui/core/label/label.mixin.js","../node_modules/@scaleflex/ui/core/input/input.mixin.js","../node_modules/@scaleflex/ui/core/label/label.styles.js","../node_modules/@scaleflex/ui/core/label/label.component.js","../node_modules/react-filerobot-image-editor/lib/components/ToolsBar/ToolsBar.styled.js","../node_modules/react-filerobot-image-editor/lib/components/ToolsBar/ToolsBarItemButton.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Brightness/Brightness.js","../node_modules/@scaleflex/ui/hooks/use-controlled.js","../node_modules/@scaleflex/ui/hooks/use-enhanced-effect.js","../node_modules/@scaleflex/ui/hooks/use-event-callback.js","../node_modules/@scaleflex/ui/core/slider/types/label-tooltip.js","../node_modules/@scaleflex/ui/core/slider/slider.styles.js","../node_modules/@scaleflex/ui/core/slider/slider.component.js","../node_modules/react-filerobot-image-editor/lib/components/common/Slider/Slider.styled.js","../node_modules/react-filerobot-image-editor/lib/components/common/Slider/index.js","../node_modules/@scaleflex/icons/icon.prop-types.js","../node_modules/@scaleflex/icons/arrow-bottom.js","../node_modules/@scaleflex/ui/core/arrow-tick/arrow-tick.mixin.js","../node_modules/@scaleflex/ui/core/arrow-tick/arrow-tick.styles.js","../node_modules/@scaleflex/ui/core/arrow-tick/arrow-tick.component.js","../node_modules/@scaleflex/ui/core/accordion-header/accordion-header.styles.js","../node_modules/@scaleflex/ui/core/accordion-header/accordion-header.component.js","../node_modules/@scaleflex/ui/core/accordion-details/accordion-details.styles.js","../node_modules/@scaleflex/ui/core/accordion-details/accordion-details.component.js","../node_modules/@scaleflex/ui/core/accordion/accordion.styles.js","../node_modules/@scaleflex/ui/core/accordion/accordion.component.js","../node_modules/@scaleflex/icons/arrow.js","../node_modules/@scaleflex/icons/tick.js","../node_modules/@scaleflex/icons/copy-outline.js","../node_modules/@scaleflex/icons/eye-open.js","../node_modules/@scaleflex/icons/eye-closed.js","../node_modules/@scaleflex/ui/core/input/input.utils.js","../node_modules/@scaleflex/ui/core/input/types/type.js","../node_modules/@scaleflex/ui/core/input/input.styles.js","../node_modules/@scaleflex/ui/core/input/input.component.js","../node_modules/@scaleflex/ui/core/form-hint/form-hint.mixin.js","../node_modules/@scaleflex/ui/core/form-hint/form-hint.styles.js","../node_modules/@scaleflex/ui/core/form-hint/form-hint.component.js","../node_modules/@popperjs/core/lib/enums.js","../node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","../node_modules/@popperjs/core/lib/dom-utils/getWindow.js","../node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","../node_modules/@popperjs/core/lib/modifiers/applyStyles.js","../node_modules/@popperjs/core/lib/utils/getBasePlacement.js","../node_modules/@popperjs/core/lib/utils/math.js","../node_modules/@popperjs/core/lib/utils/userAgent.js","../node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js","../node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","../node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","../node_modules/@popperjs/core/lib/dom-utils/contains.js","../node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","../node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","../node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","../node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","../node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","../node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","../node_modules/@popperjs/core/lib/utils/within.js","../node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","../node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","../node_modules/@popperjs/core/lib/utils/expandToHashMap.js","../node_modules/@popperjs/core/lib/modifiers/arrow.js","../node_modules/@popperjs/core/lib/utils/getVariation.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/dom-utils/getWindowScroll.js","../node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js","../node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","../node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.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/utils/rectToClientRect.js","../node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","../node_modules/@popperjs/core/lib/utils/computeOffsets.js","../node_modules/@popperjs/core/lib/utils/detectOverflow.js","../node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","../node_modules/@popperjs/core/lib/modifiers/flip.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/utils/getAltAxis.js","../node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","../node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","../node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","../node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","../node_modules/@popperjs/core/lib/utils/orderModifiers.js","../node_modules/@popperjs/core/lib/utils/debounce.js","../node_modules/@popperjs/core/lib/utils/mergeByName.js","../node_modules/@popperjs/core/lib/createPopper.js","../node_modules/@popperjs/core/lib/popper.js","../node_modules/@scaleflex/ui/hooks/use-portal.js","../node_modules/@scaleflex/ui/core/popper/types/position.js","../node_modules/@scaleflex/ui/core/popper/types/strategy.js","../node_modules/@scaleflex/ui/core/popper/popper.mixin.js","../node_modules/@scaleflex/ui/core/popper/popper.styles.js","../node_modules/@scaleflex/ui/core/popper/popper.component.js","../node_modules/@scaleflex/ui/core/menu/menu.styles.js","../node_modules/@scaleflex/ui/core/menu/menu.component.js","../node_modules/@scaleflex/ui/core/menu-item/types/size.js","../node_modules/@scaleflex/ui/core/menu-item/menu-item.mixin.js","../node_modules/@scaleflex/ui/core/menu-item/menu-item.styles.js","../node_modules/@scaleflex/ui/core/menu-item/menu-item.component.js","../node_modules/@scaleflex/ui/core/menu-item/menu-item-icon.component.js","../node_modules/@scaleflex/ui/core/menu-item/menu-item-label.component.js","../node_modules/@scaleflex/ui/core/menu-item/menu-item-actions.component.js","../node_modules/@scaleflex/icons/cross-outline.js","../node_modules/@scaleflex/ui/core/badge/badge.mixin.js","../node_modules/@scaleflex/ui/core/badge/badge.styles.js","../node_modules/@scaleflex/ui/core/badge/badge.component.js","../node_modules/@scaleflex/icons/spinner.js","../node_modules/@scaleflex/icons/two-arrows-right.js","../node_modules/@scaleflex/icons/two-arrows-left.js","../node_modules/@scaleflex/ui/core/button/types/type.js","../node_modules/@scaleflex/ui/core/button/types/side-bar.js","../node_modules/@scaleflex/ui/core/button/button.utils.js","../node_modules/@scaleflex/ui/core/button/button.mixin.js","../node_modules/@scaleflex/ui/core/button/button.styles.js","../node_modules/@scaleflex/ui/core/button/button.component.js","../node_modules/@scaleflex/icons/image-2.js","../node_modules/@scaleflex/icons/undo.js","../node_modules/@scaleflex/icons/redo.js","../node_modules/@scaleflex/icons/line.js","../node_modules/@scaleflex/icons/image-filters.js","../node_modules/@scaleflex/icons/crop.js","../node_modules/@scaleflex/icons/crop-landscape.js","../node_modules/@scaleflex/icons/resize.js","../node_modules/@scaleflex/icons/watermark.js","../node_modules/@scaleflex/icons/images.js","../node_modules/@scaleflex/icons/reset.js","../node_modules/@scaleflex/icons/text.js","../node_modules/@scaleflex/icons/text-align-left.js","../node_modules/@scaleflex/icons/text-align-center.js","../node_modules/@scaleflex/icons/rotation-left.js","../node_modules/@scaleflex/icons/rotation-right.js","../node_modules/@scaleflex/icons/lock-outline.js","../node_modules/@scaleflex/icons/unlock-outline.js","../node_modules/@scaleflex/icons/point.js","../node_modules/@scaleflex/icons/about.js","../node_modules/@scaleflex/icons/warning.js","../node_modules/@scaleflex/icons/info-outline.js","../node_modules/@scaleflex/icons/image-outline.js","../node_modules/@scaleflex/icons/custom.js","../node_modules/@scaleflex/icons/flip-y.js","../node_modules/@scaleflex/icons/flip-x.js","../node_modules/@scaleflex/icons/ellipse.js","../node_modules/@scaleflex/icons/landscape.js","../node_modules/@scaleflex/icons/stroke.js","../node_modules/@scaleflex/icons/transparency.js","../node_modules/@scaleflex/icons/shadow.js","../node_modules/@scaleflex/icons/radius-corner.js","../node_modules/@scaleflex/icons/position.js","../node_modules/@scaleflex/icons/spacing.js","../node_modules/@scaleflex/icons/padding.js","../node_modules/@scaleflex/icons/polygon.js","../node_modules/@scaleflex/icons/polygon-sides.js","../node_modules/@scaleflex/icons/arrow-right.js","../node_modules/@scaleflex/icons/font-italic.js","../node_modules/@scaleflex/icons/font-bold.js","../node_modules/@scaleflex/icons/upload-outline.js","../node_modules/@scaleflex/icons/arrow-left-outline.js","../node_modules/@scaleflex/icons/arrow-right-outline.js","../node_modules/@scaleflex/icons/plus-outline.js","../node_modules/@scaleflex/icons/arrow-tool.js","../node_modules/@scaleflex/icons/compare.js","../node_modules/@scaleflex/icons/minus-outline.js","../node_modules/@scaleflex/icons/tempreture.js","../node_modules/@scaleflex/icons/contrast.js","../node_modules/@scaleflex/icons/finetune.js","../node_modules/@scaleflex/icons/saturation.js","../node_modules/@scaleflex/icons/annotate.js","../node_modules/@scaleflex/icons/blur.js","../node_modules/@scaleflex/icons/pin-outline.js","../node_modules/@scaleflex/icons/duplicate.js","../node_modules/@scaleflex/icons/delete-outline.js","../node_modules/@scaleflex/icons/crop-frame.js","../node_modules/@scaleflex/icons/portrait.js","../node_modules/@scaleflex/icons/warning-outline.js","../node_modules/@scaleflex/icons/success.js","../node_modules/@scaleflex/icons/error.js","../node_modules/@scaleflex/icons/error-outline.js","../node_modules/@scaleflex/icons/loading.js","../node_modules/@scaleflex/icons/color-picker.js","../node_modules/@scaleflex/icons/menu.js","../node_modules/@scaleflex/icons/move-down-outline.js","../node_modules/@scaleflex/icons/move-up-outline.js","../node_modules/@scaleflex/icons/arrow-sidebar-left-outline.js","../node_modules/@scaleflex/icons/arrow-sidebar-right-outline.js","../node_modules/@scaleflex/icons/annotation.js","../node_modules/@scaleflex/icons/rotate-90.js","../node_modules/@scaleflex/ui/core/select/select.styles.js","../node_modules/@scaleflex/ui/core/select/select.utils.js","../node_modules/@scaleflex/ui/core/select/select.component.js","../node_modules/@scaleflex/ui/hooks/use-drag.js","../node_modules/@scaleflex/ui/core/color-picker/color-picker.styles.js","../node_modules/@scaleflex/ui/core/color-picker/color-item.component.js","../node_modules/@scaleflex/ui/core/color-picker/color-picker.component.js","../node_modules/@scaleflex/ui/core/icon-button/icon-button.mixin.js","../node_modules/@scaleflex/ui/core/icon-button/icon-button.styles.js","../node_modules/@scaleflex/ui/core/icon-button/icon-button.component.js","../node_modules/@scaleflex/ui/core/textarea/textarea.mixin.js","../node_modules/@scaleflex/ui/core/textarea/textarea.styles.js","../node_modules/@scaleflex/ui/core/textarea/textarea.component.js","../node_modules/@scaleflex/ui/core/input-group/types/type.js","../node_modules/@scaleflex/ui/core/input-group/input-group.styles.js","../node_modules/@scaleflex/ui/core/input-group/input-group.component.js","../node_modules/@babel/runtime/helpers/esm/objectDestructuringEmpty.js","../node_modules/@scaleflex/ui/core/modal/types/size.js","../node_modules/@scaleflex/ui/core/modal/modal-menu-context.js","../node_modules/@scaleflex/ui/core/modal/modal.mixin.js","../node_modules/@scaleflex/ui/core/modal/modal.styles.js","../node_modules/@scaleflex/ui/core/modal/modal.component.js","../node_modules/@scaleflex/ui/core/modal-actions/types/align.js","../node_modules/@scaleflex/ui/core/modal-actions/modal-actions.styles.js","../node_modules/@scaleflex/ui/core/modal-actions/modal-actions.component.js","../node_modules/@scaleflex/ui/core/modal-content/modal-content.styles.js","../node_modules/@scaleflex/ui/core/modal-content/modal-content.component.js","../node_modules/@scaleflex/ui/core/cross-button/types/size.js","../node_modules/@scaleflex/ui/core/cross-button/cross-button.styles.js","../node_modules/@scaleflex/ui/core/cross-button/cross-button.component.js","../node_modules/@scaleflex/ui/core/modal-title/types/variant.js","../node_modules/@scaleflex/ui/core/modal-title/modal-title.styles.js","../node_modules/@scaleflex/ui/core/modal-title/modal-title.component.js","../node_modules/@scaleflex/ui/core/popup-status/types/status.js","../node_modules/@scaleflex/ui/core/popup-status/popup-status.styles.js","../node_modules/@scaleflex/ui/core/popup-status/popup-status.component.js","../node_modules/@scaleflex/ui/core/popup-content/popup-content.mixin.js","../node_modules/@scaleflex/ui/core/popup-content/popup-content.styles.js","../node_modules/@scaleflex/ui/core/popup-content/popup-content.component.js","../node_modules/@scaleflex/ui/core/popup/types/horizontal.js","../node_modules/@scaleflex/ui/core/popup/types/vertical.js","../node_modules/@scaleflex/ui/core/popup/popup.mixin.js","../node_modules/@scaleflex/ui/core/popup/popup.styles.js","../node_modules/@scaleflex/ui/core/popup/popup.component.js","../node_modules/@scaleflex/ui/core/rotation-slider/rotation-slider.styles.js","../node_modules/@scaleflex/ui/core/rotation-slider/rotation-slider.component.js","../node_modules/@scaleflex/ui/core/select-group/select-group.styles.js","../node_modules/@scaleflex/ui/core/select-group/select-group.component.js","../node_modules/@scaleflex/ui/core/backdrop/backdrop.styles.js","../node_modules/@scaleflex/ui/core/backdrop/backdrop.component.js","../node_modules/@scaleflex/ui/core/drawer/drawer.styles.js","../node_modules/@scaleflex/ui/core/drawer/drawer.context.js","../node_modules/@scaleflex/ui/core/drawer/drawer-item-text-component.js","../node_modules/@scaleflex/ui/core/drawer/drawer-item-icon.component.js","../node_modules/@scaleflex/ui/core/drawer/types/variant.js","../node_modules/@scaleflex/ui/core/drawer/drawer.component.js","../node_modules/@scaleflex/ui/core/drawer/drawer-header.component.js","../node_modules/@scaleflex/ui/core/drawer/drawer-body.component.js","../node_modules/@scaleflex/ui/core/drawer/drawer-list.component.js","../node_modules/@scaleflex/ui/core/drawer/drawer-item.component.js","../node_modules/react-filerobot-image-editor/lib/components/tools/tools.styled.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Brightness/BrightnessOptions.js","../node_modules/react-filerobot-image-editor/lib/utils/getZoomFitFactor.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Crop/Crop.constants.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Crop/Crop.styled.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Crop/CropPresetItem.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Crop/CropPresetGroup.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Crop/CropPresetGroupsFolder.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Crop/CropPresetsOption.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Crop/Crop.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Flip/FlipX.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Flip/FlipY.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Rotate/RotateButton.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Rotate/Rotate.styled.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Rotate/RotateOptions.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Contrast/Contrast.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Contrast/ContrastOptions.js","../node_modules/react-filerobot-image-editor/lib/components/tools/HSV/HSV.js","../node_modules/react-filerobot-image-editor/lib/components/tools/HSV/HSVOptions.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Blur/Blur.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Blur/BlurOptions.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Warmth/Warmth.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Warmth/WarmthOptions.js","../node_modules/react-filerobot-image-editor/lib/components/common/Carousel/Carousel.styled.js","../node_modules/react-filerobot-image-editor/lib/components/common/Carousel/index.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Filters/Filters.styled.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Filters/FilterItem.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Filters/Filters.constants.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Filters/Filters.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Text/TextButton.js","../node_modules/react-filerobot-image-editor/lib/components/common/AnnotationOptions/AnnotationOptions.styled.js","../node_modules/react-filerobot-image-editor/lib/components/common/AnnotationOptions/OpacityField.js","../node_modules/react-filerobot-image-editor/lib/components/common/ColorPickerModal/ColorPickerModal.styled.js","../node_modules/react-filerobot-image-editor/lib/components/common/ColorPickerModal/index.js","../node_modules/react-filerobot-image-editor/lib/components/common/ColorInput/ColorInput.styled.js","../node_modules/react-filerobot-image-editor/lib/components/common/ColorInput/index.js","../node_modules/react-filerobot-image-editor/lib/components/common/AnnotationOptions/StrokeFields.js","../node_modules/react-filerobot-image-editor/lib/components/common/AnnotationOptions/ShadowFields.js","../node_modules/react-filerobot-image-editor/lib/utils/mapPositionStringToPoint.js","../node_modules/react-filerobot-image-editor/lib/components/common/AnnotationOptions/AnnotationOptions.constants.js","../node_modules/react-filerobot-image-editor/lib/components/common/AnnotationOptions/PositionFields.js","../node_modules/react-filerobot-image-editor/lib/components/common/AnnotationOptions/index.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Text/TextOptions/TextOptions.styled.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Text/TextOptions/TextSpacingsFields.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Text/TextOptions/TextAlignmentFields.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Text/TextOptions/TextOptions.constants.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Text/TextOptions/handleTextChangeArea.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Text/TextOptions/TextControls.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Text/TextOptions/index.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Image/ImageButton.js","../node_modules/react-filerobot-image-editor/lib/components/common/HiddenUploadInput/HiddenUploadInput.styled.js","../node_modules/react-filerobot-image-editor/lib/components/common/HiddenUploadInput/index.js","../node_modules/react-filerobot-image-editor/lib/components/common/ButtonWithMenu/ButtonWithMenu.styled.js","../node_modules/react-filerobot-image-editor/lib/components/common/ButtonWithMenu/index.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Image/ImageControls.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Image/Image.styled.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Image/ImagesGallery.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Image/ImageOptions.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Rect/RectButton.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Rect/RectCornerField.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Rect/Rect.constants.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Rect/RectOptions.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Ellipse/EllipseButton.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Ellipse/EllipseOptions.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Pen/PenButton.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Pen/PenOptions.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Line/LineButton.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Line/LineOptions.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Arrow/ArrowButton.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Arrow/ArrowOptions.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Polygon/PolygonButton.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Polygon/PolygonSidesField.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Polygon/Polygon.constants.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Polygon/PolygonOptions.js","../node_modules/react-filerobot-image-editor/lib/utils/getProperDimensions.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Resize/Resize.styled.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Resize/Resize.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Watermark/Watermark.styled.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Watermark/WatermarksGallery.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Watermark/WatermarkPadding.js","../node_modules/react-filerobot-image-editor/lib/components/tools/Watermark/Watermark.js","../node_modules/react-filerobot-image-editor/lib/components/tools/tools.constants.js","../node_modules/react-filerobot-image-editor/lib/actions/selectTab.js","../node_modules/react-filerobot-image-editor/lib/actions/undo.js","../node_modules/react-filerobot-image-editor/lib/actions/setFinetune.js","../node_modules/react-filerobot-image-editor/lib/actions/setAnnotation.js","../node_modules/react-filerobot-image-editor/lib/actions/changePointerIcon.js","../node_modules/react-filerobot-image-editor/lib/actions/selectAnnotation.js","../node_modules/react-filerobot-image-editor/lib/actions/clearAnnotationsSelections.js","../node_modules/react-filerobot-image-editor/lib/actions/toggleOriginalImageDisplay.js","../node_modules/react-filerobot-image-editor/lib/actions/selectTool.js","../node_modules/react-filerobot-image-editor/lib/actions/toggleFlip.js","../node_modules/react-filerobot-image-editor/lib/actions/setCrop.js","../node_modules/react-filerobot-image-editor/lib/actions/changeRotation.js","../node_modules/react-filerobot-image-editor/lib/utils/calculateZoomData.js","../node_modules/react-filerobot-image-editor/lib/actions/zoomCanvas.js","../node_modules/react-filerobot-image-editor/lib/actions/setCanvasSize.js","../node_modules/react-filerobot-image-editor/lib/actions/setOriginalImage.js","../node_modules/react-filerobot-image-editor/lib/actions/setShownImageDimensions.js","../node_modules/react-filerobot-image-editor/lib/actions/removeAnnotations.js","../node_modules/react-filerobot-image-editor/lib/actions/duplicateAnnotations.js","../node_modules/react-filerobot-image-editor/lib/actions/enableTextContentEdit.js","../node_modules/react-filerobot-image-editor/lib/actions/setResize.js","../node_modules/react-filerobot-image-editor/lib/actions/setSaved.js","../node_modules/react-filerobot-image-editor/lib/utils/deepMerge.js","../node_modules/react-filerobot-image-editor/lib/actions/updateState.js","../node_modules/react-filerobot-image-editor/lib/actions/setLatestColor.js","../node_modules/react-filerobot-image-editor/lib/actions/setShowTabsMenu.js","../node_modules/react-filerobot-image-editor/lib/actions/index.js","../node_modules/react-filerobot-image-editor/lib/utils/getProperImageToCanvasSpacing.js","../node_modules/react-filerobot-image-editor/lib/utils/getCenterRotatedPoint.js","../node_modules/react-filerobot-image-editor/lib/components/Layers/DesignLayer/nodesCommonPropTypes.js","../node_modules/react-filerobot-image-editor/lib/components/Layers/DesignLayer/AnnotationNodes/RectNode.js","../node_modules/react-filerobot-image-editor/lib/components/Layers/DesignLayer/AnnotationNodes/EllipseNode.js","../node_modules/react-filerobot-image-editor/lib/components/Layers/DesignLayer/AnnotationNodes/PolygonNode.js","../node_modules/react-filerobot-image-editor/lib/components/Layers/DesignLayer/AnnotationNodes/TextNode.js","../node_modules/react-filerobot-image-editor/lib/utils/extractNameFromUrl.js","../node_modules/react-filerobot-image-editor/lib/utils/loadImage.js","../node_modules/react-filerobot-image-editor/lib/components/Layers/DesignLayer/AnnotationNodes/ImageNode.js","../node_modules/react-filerobot-image-editor/lib/components/Layers/DesignLayer/AnnotationNodes/LineNode.js","../node_modules/react-filerobot-image-editor/lib/components/Layers/DesignLayer/AnnotationNodes/ArrowNode.js","../node_modules/react-filerobot-image-editor/lib/components/Layers/DesignLayer/AnnotationNodes/AnnotationNodes.constants.js","../node_modules/react-filerobot-image-editor/lib/components/Layers/DesignLayer/AnnotationNodes/MemoizedAnnotation.js","../node_modules/react-filerobot-image-editor/lib/components/Layers/DesignLayer/AnnotationNodes/index.js","../node_modules/react-filerobot-image-editor/lib/components/Layers/DesignLayer/PreviewGroup.js","../node_modules/react-filerobot-image-editor/lib/components/Layers/DesignLayer/index.js","../node_modules/react-filerobot-image-editor/lib/utils/compareRatios.js","../node_modules/react-filerobot-image-editor/lib/components/Layers/TransformersLayer/TransformersLayer.utils.js","../node_modules/react-filerobot-image-editor/lib/components/Layers/TransformersLayer/CropTransformer.js","../node_modules/react-filerobot-image-editor/lib/components/Layers/TransformersLayer/NodesTransformer.js","../node_modules/react-filerobot-image-editor/lib/components/Layers/TransformersLayer/index.js","../node_modules/react-filerobot-image-editor/lib/components/NodeControls/NodeControls.styled.js","../node_modules/react-filerobot-image-editor/lib/components/NodeControls/index.js","../node_modules/react-filerobot-image-editor/lib/components/MainCanvas/touchZoomingEvents.js","../node_modules/react-filerobot-image-editor/lib/components/MainCanvas/MainCanvas.styled.js","../node_modules/react-filerobot-image-editor/lib/components/MainCanvas/CanvasNode.js","../node_modules/react-filerobot-image-editor/lib/components/MainCanvas/index.js","../node_modules/react-filerobot-image-editor/lib/components/common/Separator/Separator.styled.js","../node_modules/react-filerobot-image-editor/lib/components/common/Separator/index.js","../node_modules/react-filerobot-image-editor/lib/components/Topbar/Topbar.styled.js","../node_modules/react-filerobot-image-editor/lib/components/common/Modal/Modal.styled.js","../node_modules/react-filerobot-image-editor/lib/components/common/Modal/index.js","../node_modules/react-filerobot-image-editor/lib/components/Topbar/ConfirmationModal.js","../node_modules/react-filerobot-image-editor/lib/components/Topbar/CloseButton.js","../node_modules/react-filerobot-image-editor/lib/utils/getDefaultSaveQuality.js","../node_modules/react-filerobot-image-editor/lib/components/Topbar/SaveButton.js","../node_modules/react-filerobot-image-editor/lib/components/Topbar/ResetButton.js","../node_modules/react-filerobot-image-editor/lib/components/Topbar/UndoButton.js","../node_modules/react-filerobot-image-editor/lib/components/Topbar/RedoButton.js","../node_modules/react-filerobot-image-editor/lib/components/Topbar/Topbar.constants.js","../node_modules/react-filerobot-image-editor/lib/components/Topbar/CanvasZooming.js","../node_modules/react-filerobot-image-editor/lib/components/Topbar/ImageDimensionsAndDisplayToggle.js","../node_modules/react-filerobot-image-editor/lib/components/Topbar/BackButton.js","../node_modules/react-filerobot-image-editor/lib/components/Topbar/index.js","../node_modules/react-filerobot-image-editor/lib/components/Tabs/Tabs.styled.js","../node_modules/react-filerobot-image-editor/lib/components/Tabs/TabItem.js","../node_modules/react-filerobot-image-editor/lib/components/Tabs/Tabs.constants.js","../node_modules/react-filerobot-image-editor/lib/components/Tabs/index.js","../node_modules/react-filerobot-image-editor/lib/components/ToolsBar/ToolsBarItemOptionsWrapper.js","../node_modules/react-filerobot-image-editor/lib/components/ToolsBar/index.js","../node_modules/react-filerobot-image-editor/lib/components/FeedbackPopup/index.js","../node_modules/react-filerobot-image-editor/lib/components/common/Spinner/Spinner.styled.js","../node_modules/react-filerobot-image-editor/lib/components/common/Spinner/index.js","../node_modules/react-filerobot-image-editor/lib/utils/cloudimageQueryToDesignState.js","../node_modules/react-filerobot-image-editor/lib/utils/isSameImage.js","../node_modules/react-filerobot-image-editor/lib/components/App/App.styled.js","../node_modules/react-filerobot-image-editor/lib/components/TabsDrawer/index.js","../node_modules/react-filerobot-image-editor/lib/components/App/index.js","../node_modules/react-filerobot-image-editor/lib/components/AssemblyPoint/globalStyles.js","../node_modules/react-filerobot-image-editor/lib/components/AssemblyPoint/index.js","../node_modules/filerobot-image-editor/lib/index.js"],"sourcesContent":["export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","import _typeof from \"./typeof.js\";\nexport default function toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","import toPropertyKey from \"./toPropertyKey.js\";\nexport default function _defineProperty(obj, key, value) {\n key = toPropertyKey(key);\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n}","export default function _classApplyDescriptorGet(receiver, descriptor) {\n if (descriptor.get) {\n return descriptor.get.call(receiver);\n }\n return descriptor.value;\n}","export default function _assertClassBrand(e, t, n) {\n if (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;\n throw new TypeError(\"Private element is not present on this object\");\n}","import assertClassBrand from \"./assertClassBrand.js\";\nexport default function _classPrivateFieldGet2(s, a) {\n return s.get(assertClassBrand(s, a));\n}","import classApplyDescriptorGet from \"./classApplyDescriptorGet.js\";\nimport classPrivateFieldGet2 from \"./classPrivateFieldGet2.js\";\nexport default function _classPrivateFieldGet(receiver, privateMap) {\n var descriptor = classPrivateFieldGet2(privateMap, receiver);\n return classApplyDescriptorGet(receiver, descriptor);\n}","export default function _classApplyDescriptorSet(receiver, descriptor, value) {\n if (descriptor.set) {\n descriptor.set.call(receiver, value);\n } else {\n if (!descriptor.writable) {\n throw new TypeError(\"attempted to set read only private field\");\n }\n descriptor.value = value;\n }\n}","import classApplyDescriptorSet from \"./classApplyDescriptorSet.js\";\nimport classPrivateFieldGet2 from \"./classPrivateFieldGet2.js\";\nexport default function _classPrivateFieldSet(receiver, privateMap, value) {\n var descriptor = classPrivateFieldGet2(privateMap, receiver);\n classApplyDescriptorSet(receiver, descriptor, value);\n return value;\n}","/**\n * @license React\n * react.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var l=Symbol.for(\"react.element\"),n=Symbol.for(\"react.portal\"),p=Symbol.for(\"react.fragment\"),q=Symbol.for(\"react.strict_mode\"),r=Symbol.for(\"react.profiler\"),t=Symbol.for(\"react.provider\"),u=Symbol.for(\"react.context\"),v=Symbol.for(\"react.forward_ref\"),w=Symbol.for(\"react.suspense\"),x=Symbol.for(\"react.memo\"),y=Symbol.for(\"react.lazy\"),z=Symbol.iterator;function A(a){if(null===a||\"object\"!==typeof a)return null;a=z&&a[z]||a[\"@@iterator\"];return\"function\"===typeof a?a:null}\nvar B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,D={};function E(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}E.prototype.isReactComponent={};\nE.prototype.setState=function(a,b){if(\"object\"!==typeof a&&\"function\"!==typeof a&&null!=a)throw Error(\"setState(...): takes an object of state variables to update or a function which returns an object of state variables.\");this.updater.enqueueSetState(this,a,b,\"setState\")};E.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,\"forceUpdate\")};function F(){}F.prototype=E.prototype;function G(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B}var H=G.prototype=new F;\nH.constructor=G;C(H,E.prototype);H.isPureReactComponent=!0;var I=Array.isArray,J=Object.prototype.hasOwnProperty,K={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};\nfunction M(a,b,e){var d,c={},k=null,h=null;if(null!=b)for(d in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=\"\"+b.key),b)J.call(b,d)&&!L.hasOwnProperty(d)&&(c[d]=b[d]);var g=arguments.length-2;if(1===g)c.children=e;else if(1>>1,e=a[d];if(0>>1;dg(C,c))ng(x,C)?(a[d]=x,a[n]=c,d=n):(a[d]=C,a[m]=c,d=m);else if(ng(x,c))a[d]=x,a[n]=c,d=n;else break a}}return b}\nfunction g(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}if(\"object\"===typeof performance&&\"function\"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now()}}else{var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q}}var r=[],t=[],u=1,v=null,y=3,z=!1,A=!1,B=!1,D=\"function\"===typeof setTimeout?setTimeout:null,E=\"function\"===typeof clearTimeout?clearTimeout:null,F=\"undefined\"!==typeof setImmediate?setImmediate:null;\n\"undefined\"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function G(a){for(var b=h(t);null!==b;){if(null===b.callback)k(t);else if(b.startTime<=a)k(t),b.sortIndex=b.expirationTime,f(r,b);else break;b=h(t)}}function H(a){B=!1;G(a);if(!A)if(null!==h(r))A=!0,I(J);else{var b=h(t);null!==b&&K(H,b.startTime-a)}}\nfunction J(a,b){A=!1;B&&(B=!1,E(L),L=-1);z=!0;var c=y;try{G(b);for(v=h(r);null!==v&&(!(v.expirationTime>b)||a&&!M());){var d=v.callback;if(\"function\"===typeof d){v.callback=null;y=v.priorityLevel;var e=d(v.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?v.callback=e:v===h(r)&&k(r);G(b)}else k(r);v=h(r)}if(null!==v)var w=!0;else{var m=h(t);null!==m&&K(H,m.startTime-b);w=!1}return w}finally{v=null,y=c,z=!1}}var N=!1,O=null,L=-1,P=5,Q=-1;\nfunction M(){return exports.unstable_now()-Qa||125d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a};\nexports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c}}};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n","/**\n * @license React\n * react-dom.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n/*\n Modernizr 3.0.0pre (Custom Build) | MIT\n*/\n'use strict';var aa=require(\"react\"),ca=require(\"scheduler\");function p(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;cb}return!1}function v(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var z={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){z[a]=new v(a,0,!1,a,null,!1,!1)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];z[b]=new v(b,1,!1,a[1],null,!1,!1)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){z[a]=new v(a,2,!1,a.toLowerCase(),null,!1,!1)});\n[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(a){z[a]=new v(a,2,!1,a,null,!1,!1)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){z[a]=new v(a,3,!1,a.toLowerCase(),null,!1,!1)});\n[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){z[a]=new v(a,3,!0,a,null,!1,!1)});[\"capture\",\"download\"].forEach(function(a){z[a]=new v(a,4,!1,a,null,!1,!1)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){z[a]=new v(a,6,!1,a,null,!1,!1)});[\"rowSpan\",\"start\"].forEach(function(a){z[a]=new v(a,5,!1,a.toLowerCase(),null,!1,!1)});var ra=/[\\-:]([a-z])/g;function sa(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(ra,\nsa);z[b]=new v(b,1,!1,a,null,!1,!1)});\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,\"http://www.w3.org/1999/xlink\",!1,!1)});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\",!1,!1)});[\"tabIndex\",\"crossOrigin\"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!1,!1)});\nz.xlinkHref=new v(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1);[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!0,!0)});\nfunction ta(a,b,c,d){var e=z.hasOwnProperty(b)?z[b]:null;if(null!==e?0!==e.type:d||!(2h||e[g]!==f[h]){var k=\"\\n\"+e[g].replace(\" at new \",\" at \");a.displayName&&k.includes(\"\")&&(k=k.replace(\"\",a.displayName));return k}while(1<=g&&0<=h)}break}}}finally{Na=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:\"\")?Ma(a):\"\"}\nfunction Pa(a){switch(a.tag){case 5:return Ma(a.type);case 16:return Ma(\"Lazy\");case 13:return Ma(\"Suspense\");case 19:return Ma(\"SuspenseList\");case 0:case 2:case 15:return a=Oa(a.type,!1),a;case 11:return a=Oa(a.type.render,!1),a;case 1:return a=Oa(a.type,!0),a;default:return\"\"}}\nfunction Qa(a){if(null==a)return null;if(\"function\"===typeof a)return a.displayName||a.name||null;if(\"string\"===typeof a)return a;switch(a){case ya:return\"Fragment\";case wa:return\"Portal\";case Aa:return\"Profiler\";case za:return\"StrictMode\";case Ea:return\"Suspense\";case Fa:return\"SuspenseList\"}if(\"object\"===typeof a)switch(a.$$typeof){case Ca:return(a.displayName||\"Context\")+\".Consumer\";case Ba:return(a._context.displayName||\"Context\")+\".Provider\";case Da:var b=a.render;a=a.displayName;a||(a=b.displayName||\nb.name||\"\",a=\"\"!==a?\"ForwardRef(\"+a+\")\":\"ForwardRef\");return a;case Ga:return b=a.displayName||null,null!==b?b:Qa(a.type)||\"Memo\";case Ha:b=a._payload;a=a._init;try{return Qa(a(b))}catch(c){}}return null}\nfunction Ra(a){var b=a.type;switch(a.tag){case 24:return\"Cache\";case 9:return(b.displayName||\"Context\")+\".Consumer\";case 10:return(b._context.displayName||\"Context\")+\".Provider\";case 18:return\"DehydratedFragment\";case 11:return a=b.render,a=a.displayName||a.name||\"\",b.displayName||(\"\"!==a?\"ForwardRef(\"+a+\")\":\"ForwardRef\");case 7:return\"Fragment\";case 5:return b;case 4:return\"Portal\";case 3:return\"Root\";case 6:return\"Text\";case 16:return Qa(b);case 8:return b===za?\"StrictMode\":\"Mode\";case 22:return\"Offscreen\";\ncase 12:return\"Profiler\";case 21:return\"Scope\";case 13:return\"Suspense\";case 19:return\"SuspenseList\";case 25:return\"TracingMarker\";case 1:case 0:case 17:case 2:case 14:case 15:if(\"function\"===typeof b)return b.displayName||b.name||null;if(\"string\"===typeof b)return b}return null}function Sa(a){switch(typeof a){case \"boolean\":case \"number\":case \"string\":case \"undefined\":return a;case \"object\":return a;default:return\"\"}}\nfunction Ta(a){var b=a.type;return(a=a.nodeName)&&\"input\"===a.toLowerCase()&&(\"checkbox\"===b||\"radio\"===b)}\nfunction Ua(a){var b=Ta(a)?\"checked\":\"value\",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=\"\"+a[b];if(!a.hasOwnProperty(b)&&\"undefined\"!==typeof c&&\"function\"===typeof c.get&&\"function\"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=\"\"+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=\"\"+a},stopTracking:function(){a._valueTracker=\nnull;delete a[b]}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a))}function Wa(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d=\"\";a&&(d=Ta(a)?a.checked?\"true\":\"false\":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Xa(a){a=a||(\"undefined\"!==typeof document?document:void 0);if(\"undefined\"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}\nfunction Ya(a,b){var c=b.checked;return A({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?\"\":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:\"checkbox\"===b.type||\"radio\"===b.type?null!=b.checked:null!=b.value}}function ab(a,b){b=b.checked;null!=b&&ta(a,\"checked\",b,!1)}\nfunction bb(a,b){ab(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if(\"number\"===d){if(0===c&&\"\"===a.value||a.value!=c)a.value=\"\"+c}else a.value!==\"\"+c&&(a.value=\"\"+c);else if(\"submit\"===d||\"reset\"===d){a.removeAttribute(\"value\");return}b.hasOwnProperty(\"value\")?cb(a,b.type,c):b.hasOwnProperty(\"defaultValue\")&&cb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}\nfunction db(a,b,c){if(b.hasOwnProperty(\"value\")||b.hasOwnProperty(\"defaultValue\")){var d=b.type;if(!(\"submit\"!==d&&\"reset\"!==d||void 0!==b.value&&null!==b.value))return;b=\"\"+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;\"\"!==c&&(a.name=\"\");a.defaultChecked=!!a._wrapperState.initialChecked;\"\"!==c&&(a.name=c)}\nfunction cb(a,b,c){if(\"number\"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=\"\"+a._wrapperState.initialValue:a.defaultValue!==\"\"+c&&(a.defaultValue=\"\"+c)}var eb=Array.isArray;\nfunction fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e\"+b.valueOf().toString()+\"\";for(b=mb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction ob(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar pb={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,\nzoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qb=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(pb).forEach(function(a){qb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);pb[b]=pb[a]})});function rb(a,b,c){return null==b||\"boolean\"===typeof b||\"\"===b?\"\":c||\"number\"!==typeof b||0===b||pb.hasOwnProperty(a)&&pb[a]?(\"\"+b).trim():b+\"px\"}\nfunction sb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\"),e=rb(c,b[c],d);\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var tb=A({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction ub(a,b){if(b){if(tb[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(p(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(p(60));if(\"object\"!==typeof b.dangerouslySetInnerHTML||!(\"__html\"in b.dangerouslySetInnerHTML))throw Error(p(61));}if(null!=b.style&&\"object\"!==typeof b.style)throw Error(p(62));}}\nfunction vb(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){case \"annotation-xml\":case \"color-profile\":case \"font-face\":case \"font-face-src\":case \"font-face-uri\":case \"font-face-format\":case \"font-face-name\":case \"missing-glyph\":return!1;default:return!0}}var wb=null;function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null;\nfunction Bb(a){if(a=Cb(a)){if(\"function\"!==typeof yb)throw Error(p(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b))}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;a>>=0;return 0===a?32:31-(pc(a)/qc|0)|0}var rc=64,sc=4194304;\nfunction tc(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;\ndefault:return a}}function uc(a,b){var c=a.pendingLanes;if(0===c)return 0;var d=0,e=a.suspendedLanes,f=a.pingedLanes,g=c&268435455;if(0!==g){var h=g&~e;0!==h?d=tc(h):(f&=g,0!==f&&(d=tc(f)))}else g=c&~e,0!==g?d=tc(g):0!==f&&(d=tc(f));if(0===d)return 0;if(0!==b&&b!==d&&0===(b&e)&&(e=d&-d,f=b&-b,e>=f||16===e&&0!==(f&4194240)))return b;0!==(d&4)&&(d|=c&16);b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0c;c++)b.push(a);return b}\nfunction Ac(a,b,c){a.pendingLanes|=b;536870912!==b&&(a.suspendedLanes=0,a.pingedLanes=0);a=a.eventTimes;b=31-oc(b);a[b]=c}function Bc(a,b){var c=a.pendingLanes&~b;a.pendingLanes=b;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=b;a.mutableReadLanes&=b;a.entangledLanes&=b;b=a.entanglements;var d=a.eventTimes;for(a=a.expirationTimes;0=be),ee=String.fromCharCode(32),fe=!1;\nfunction ge(a,b){switch(a){case \"keyup\":return-1!==$d.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"focusout\":return!0;default:return!1}}function he(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var ie=!1;function je(a,b){switch(a){case \"compositionend\":return he(b);case \"keypress\":if(32!==b.which)return null;fe=!0;return ee;case \"textInput\":return a=b.data,a===ee&&fe?null:a;default:return null}}\nfunction ke(a,b){if(ie)return\"compositionend\"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Je(c)}}function Le(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Le(a,b.parentNode):\"contains\"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}\nfunction Me(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c=\"string\"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Xa(a.document)}return b}function Ne(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}\nfunction Oe(a){var b=Me(),c=a.focusedElem,d=a.selectionRange;if(b!==c&&c&&c.ownerDocument&&Le(c.ownerDocument.documentElement,c)){if(null!==d&&Ne(c))if(b=d.start,a=d.end,void 0===a&&(a=b),\"selectionStart\"in c)c.selectionStart=b,c.selectionEnd=Math.min(a,c.value.length);else if(a=(b=c.ownerDocument||document)&&b.defaultView||window,a.getSelection){a=a.getSelection();var e=c.textContent.length,f=Math.min(d.start,e);d=void 0===d.end?f:Math.min(d.end,e);!a.extend&&f>d&&(e=d,d=f,f=e);e=Ke(c,f);var g=Ke(c,\nd);e&&g&&(1!==a.rangeCount||a.anchorNode!==e.node||a.anchorOffset!==e.offset||a.focusNode!==g.node||a.focusOffset!==g.offset)&&(b=b.createRange(),b.setStart(e.node,e.offset),a.removeAllRanges(),f>d?(a.addRange(b),a.extend(g.node,g.offset)):(b.setEnd(g.node,g.offset),a.addRange(b)))}b=[];for(a=c;a=a.parentNode;)1===a.nodeType&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});\"function\"===typeof c.focus&&c.focus();for(c=0;c=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;\nfunction Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,\"selectionStart\"in d&&Ne(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Ie(Se,d)||(Se=d,d=oe(Re,\"onSelect\"),0Tf||(a.current=Sf[Tf],Sf[Tf]=null,Tf--)}function G(a,b){Tf++;Sf[Tf]=a.current;a.current=b}var Vf={},H=Uf(Vf),Wf=Uf(!1),Xf=Vf;function Yf(a,b){var c=a.type.contextTypes;if(!c)return Vf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}\nfunction Zf(a){a=a.childContextTypes;return null!==a&&void 0!==a}function $f(){E(Wf);E(H)}function ag(a,b,c){if(H.current!==Vf)throw Error(p(168));G(H,b);G(Wf,c)}function bg(a,b,c){var d=a.stateNode;b=b.childContextTypes;if(\"function\"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in b))throw Error(p(108,Ra(a)||\"Unknown\",e));return A({},c,d)}\nfunction cg(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Vf;Xf=H.current;G(H,a);G(Wf,Wf.current);return!0}function dg(a,b,c){var d=a.stateNode;if(!d)throw Error(p(169));c?(a=bg(a,b,Xf),d.__reactInternalMemoizedMergedChildContext=a,E(Wf),E(H),G(H,a)):E(Wf);G(Wf,c)}var eg=null,fg=!1,gg=!1;function hg(a){null===eg?eg=[a]:eg.push(a)}function ig(a){fg=!0;hg(a)}\nfunction jg(){if(!gg&&null!==eg){gg=!0;var a=0,b=C;try{var c=eg;for(C=1;a>=g;e-=g;rg=1<<32-oc(b)+e|c<w?(x=u,u=null):x=u.sibling;var n=r(e,u,h[w],k);if(null===n){null===u&&(u=x);break}a&&u&&null===n.alternate&&b(e,u);g=f(n,g,w);null===m?l=n:m.sibling=n;m=n;u=x}if(w===h.length)return c(e,u),I&&tg(e,w),l;if(null===u){for(;ww?(x=m,m=null):x=m.sibling;var t=r(e,m,n.value,k);if(null===t){null===m&&(m=x);break}a&&m&&null===t.alternate&&b(e,m);g=f(t,g,w);null===u?l=t:u.sibling=t;u=t;m=x}if(n.done)return c(e,\nm),I&&tg(e,w),l;if(null===m){for(;!n.done;w++,n=h.next())n=q(e,n.value,k),null!==n&&(g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);I&&tg(e,w);return l}for(m=d(e,m);!n.done;w++,n=h.next())n=y(m,e,w,n.value,k),null!==n&&(a&&null!==n.alternate&&m.delete(null===n.key?w:n.key),g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);a&&m.forEach(function(a){return b(e,a)});I&&tg(e,w);return l}function J(a,d,f,h){\"object\"===typeof f&&null!==f&&f.type===ya&&null===f.key&&(f=f.props.children);if(\"object\"===typeof f&&null!==f){switch(f.$$typeof){case va:a:{for(var k=\nf.key,l=d;null!==l;){if(l.key===k){k=f.type;if(k===ya){if(7===l.tag){c(a,l.sibling);d=e(l,f.props.children);d.return=a;a=d;break a}}else if(l.elementType===k||\"object\"===typeof k&&null!==k&&k.$$typeof===Ha&&uh(k)===l.type){c(a,l.sibling);d=e(l,f.props);d.ref=sh(a,l,f);d.return=a;a=d;break a}c(a,l);break}else b(a,l);l=l.sibling}f.type===ya?(d=Ah(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=yh(f.type,f.key,f.props,null,a.mode,h),h.ref=sh(a,d,f),h.return=a,a=h)}return g(a);case wa:a:{for(l=f.key;null!==\nd;){if(d.key===l)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=zh(f,a.mode,h);d.return=a;a=d}return g(a);case Ha:return l=f._init,J(a,d,l(f._payload),h)}if(eb(f))return n(a,d,f,h);if(Ka(f))return t(a,d,f,h);th(a,f)}return\"string\"===typeof f&&\"\"!==f||\"number\"===typeof f?(f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):\n(c(a,d),d=xh(f,a.mode,h),d.return=a,a=d),g(a)):c(a,d)}return J}var Bh=vh(!0),Ch=vh(!1),Dh={},Eh=Uf(Dh),Fh=Uf(Dh),Gh=Uf(Dh);function Hh(a){if(a===Dh)throw Error(p(174));return a}function Ih(a,b){G(Gh,b);G(Fh,a);G(Eh,Dh);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:lb(null,\"\");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=lb(b,a)}E(Eh);G(Eh,b)}function Jh(){E(Eh);E(Fh);E(Gh)}\nfunction Kh(a){Hh(Gh.current);var b=Hh(Eh.current);var c=lb(b,a.type);b!==c&&(G(Fh,a),G(Eh,c))}function Lh(a){Fh.current===a&&(E(Eh),E(Fh))}var M=Uf(0);\nfunction Mh(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||\"$?\"===c.data||\"$!\"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&128))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var Nh=[];\nfunction Oh(){for(var a=0;ac?c:4;a(!0);var d=Qh.transition;Qh.transition={};try{a(!1),b()}finally{C=c,Qh.transition=d}}function Fi(){return di().memoizedState}\nfunction Gi(a,b,c){var d=lh(a);c={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(b,c);else if(c=Yg(a,b,c,d),null!==c){var e=L();mh(c,a,d,e);Ji(c,b,d)}}\nfunction ri(a,b,c){var d=lh(a),e={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(b,e);else{var f=a.alternate;if(0===a.lanes&&(null===f||0===f.lanes)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.hasEagerState=!0;e.eagerState=h;if(He(h,g)){var k=b.interleaved;null===k?(e.next=e,Xg(b)):(e.next=k.next,k.next=e);b.interleaved=e;return}}catch(l){}finally{}c=Yg(a,b,e,d);null!==c&&(e=L(),mh(c,a,d,e),Ji(c,b,d))}}\nfunction Hi(a){var b=a.alternate;return a===N||null!==b&&b===N}function Ii(a,b){Th=Sh=!0;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}function Ji(a,b,c){if(0!==(c&4194240)){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Cc(a,c)}}\nvar ai={readContext:Vg,useCallback:Q,useContext:Q,useEffect:Q,useImperativeHandle:Q,useInsertionEffect:Q,useLayoutEffect:Q,useMemo:Q,useReducer:Q,useRef:Q,useState:Q,useDebugValue:Q,useDeferredValue:Q,useTransition:Q,useMutableSource:Q,useSyncExternalStore:Q,useId:Q,unstable_isNewReconciler:!1},Yh={readContext:Vg,useCallback:function(a,b){ci().memoizedState=[a,void 0===b?null:b];return a},useContext:Vg,useEffect:vi,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return ti(4194308,\n4,yi.bind(null,b,a),c)},useLayoutEffect:function(a,b){return ti(4194308,4,a,b)},useInsertionEffect:function(a,b){return ti(4,2,a,b)},useMemo:function(a,b){var c=ci();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=ci();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};d.queue=a;a=a.dispatch=Gi.bind(null,N,a);return[d.memoizedState,a]},useRef:function(a){var b=\nci();a={current:a};return b.memoizedState=a},useState:qi,useDebugValue:Ai,useDeferredValue:function(a){return ci().memoizedState=a},useTransition:function(){var a=qi(!1),b=a[0];a=Ei.bind(null,a[1]);ci().memoizedState=a;return[b,a]},useMutableSource:function(){},useSyncExternalStore:function(a,b,c){var d=N,e=ci();if(I){if(void 0===c)throw Error(p(407));c=c()}else{c=b();if(null===R)throw Error(p(349));0!==(Rh&30)||ni(d,b,c)}e.memoizedState=c;var f={value:c,getSnapshot:b};e.queue=f;vi(ki.bind(null,d,\nf,a),[a]);d.flags|=2048;li(9,mi.bind(null,d,f,c,b),void 0,null);return c},useId:function(){var a=ci(),b=R.identifierPrefix;if(I){var c=sg;var d=rg;c=(d&~(1<<32-oc(d)-1)).toString(32)+c;b=\":\"+b+\"R\"+c;c=Uh++;0\\x3c/script>\",a=a.removeChild(a.firstChild)):\n\"string\"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),\"select\"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[Of]=b;a[Pf]=d;Aj(a,b,!1,!1);b.stateNode=a;a:{g=vb(c,d);switch(c){case \"dialog\":D(\"cancel\",a);D(\"close\",a);e=d;break;case \"iframe\":case \"object\":case \"embed\":D(\"load\",a);e=d;break;case \"video\":case \"audio\":for(e=0;eHj&&(b.flags|=128,d=!0,Ej(f,!1),b.lanes=4194304)}else{if(!d)if(a=Mh(g),null!==a){if(b.flags|=128,d=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Ej(f,!0),null===f.tail&&\"hidden\"===f.tailMode&&!g.alternate&&!I)return S(b),null}else 2*B()-f.renderingStartTime>Hj&&1073741824!==c&&(b.flags|=128,d=!0,Ej(f,!1),b.lanes=4194304);f.isBackwards?(g.sibling=b.child,b.child=g):(c=f.last,null!==c?c.sibling=g:b.child=g,f.last=g)}if(null!==f.tail)return b=f.tail,f.rendering=\nb,f.tail=b.sibling,f.renderingStartTime=B(),b.sibling=null,c=M.current,G(M,d?c&1|2:c&1),b;S(b);return null;case 22:case 23:return Ij(),d=null!==b.memoizedState,null!==a&&null!==a.memoizedState!==d&&(b.flags|=8192),d&&0!==(b.mode&1)?0!==(gj&1073741824)&&(S(b),b.subtreeFlags&6&&(b.flags|=8192)):S(b),null;case 24:return null;case 25:return null}throw Error(p(156,b.tag));}\nfunction Jj(a,b){wg(b);switch(b.tag){case 1:return Zf(b.type)&&$f(),a=b.flags,a&65536?(b.flags=a&-65537|128,b):null;case 3:return Jh(),E(Wf),E(H),Oh(),a=b.flags,0!==(a&65536)&&0===(a&128)?(b.flags=a&-65537|128,b):null;case 5:return Lh(b),null;case 13:E(M);a=b.memoizedState;if(null!==a&&null!==a.dehydrated){if(null===b.alternate)throw Error(p(340));Ig()}a=b.flags;return a&65536?(b.flags=a&-65537|128,b):null;case 19:return E(M),null;case 4:return Jh(),null;case 10:return Rg(b.type._context),null;case 22:case 23:return Ij(),\nnull;case 24:return null;default:return null}}var Kj=!1,U=!1,Lj=\"function\"===typeof WeakSet?WeakSet:Set,V=null;function Mj(a,b){var c=a.ref;if(null!==c)if(\"function\"===typeof c)try{c(null)}catch(d){W(a,b,d)}else c.current=null}function Nj(a,b,c){try{c()}catch(d){W(a,b,d)}}var Oj=!1;\nfunction Pj(a,b){Cf=dd;a=Me();if(Ne(a)){if(\"selectionStart\"in a)var c={start:a.selectionStart,end:a.selectionEnd};else a:{c=(c=a.ownerDocument)&&c.defaultView||window;var d=c.getSelection&&c.getSelection();if(d&&0!==d.rangeCount){c=d.anchorNode;var e=d.anchorOffset,f=d.focusNode;d=d.focusOffset;try{c.nodeType,f.nodeType}catch(F){c=null;break a}var g=0,h=-1,k=-1,l=0,m=0,q=a,r=null;b:for(;;){for(var y;;){q!==c||0!==e&&3!==q.nodeType||(h=g+e);q!==f||0!==d&&3!==q.nodeType||(k=g+d);3===q.nodeType&&(g+=\nq.nodeValue.length);if(null===(y=q.firstChild))break;r=q;q=y}for(;;){if(q===a)break b;r===c&&++l===e&&(h=g);r===f&&++m===d&&(k=g);if(null!==(y=q.nextSibling))break;q=r;r=q.parentNode}q=y}c=-1===h||-1===k?null:{start:h,end:k}}else c=null}c=c||{start:0,end:0}}else c=null;Df={focusedElem:a,selectionRange:c};dd=!1;for(V=b;null!==V;)if(b=V,a=b.child,0!==(b.subtreeFlags&1028)&&null!==a)a.return=b,V=a;else for(;null!==V;){b=V;try{var n=b.alternate;if(0!==(b.flags&1024))switch(b.tag){case 0:case 11:case 15:break;\ncase 1:if(null!==n){var t=n.memoizedProps,J=n.memoizedState,x=b.stateNode,w=x.getSnapshotBeforeUpdate(b.elementType===b.type?t:Lg(b.type,t),J);x.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var u=b.stateNode.containerInfo;1===u.nodeType?u.textContent=\"\":9===u.nodeType&&u.documentElement&&u.removeChild(u.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p(163));}}catch(F){W(b,b.return,F)}a=b.sibling;if(null!==a){a.return=b.return;V=a;break}V=b.return}n=Oj;Oj=!1;return n}\nfunction Qj(a,b,c){var d=b.updateQueue;d=null!==d?d.lastEffect:null;if(null!==d){var e=d=d.next;do{if((e.tag&a)===a){var f=e.destroy;e.destroy=void 0;void 0!==f&&Nj(b,c,f)}e=e.next}while(e!==d)}}function Rj(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}function Sj(a){var b=a.ref;if(null!==b){var c=a.stateNode;switch(a.tag){case 5:a=c;break;default:a=c}\"function\"===typeof b?b(a):b.current=a}}\nfunction Tj(a){var b=a.alternate;null!==b&&(a.alternate=null,Tj(b));a.child=null;a.deletions=null;a.sibling=null;5===a.tag&&(b=a.stateNode,null!==b&&(delete b[Of],delete b[Pf],delete b[of],delete b[Qf],delete b[Rf]));a.stateNode=null;a.return=null;a.dependencies=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.stateNode=null;a.updateQueue=null}function Uj(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction Vj(a){a:for(;;){for(;null===a.sibling;){if(null===a.return||Uj(a.return))return null;a=a.return}a.sibling.return=a.return;for(a=a.sibling;5!==a.tag&&6!==a.tag&&18!==a.tag;){if(a.flags&2)continue a;if(null===a.child||4===a.tag)continue a;else a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}\nfunction Wj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=Bf));else if(4!==d&&(a=a.child,null!==a))for(Wj(a,b,c),a=a.sibling;null!==a;)Wj(a,b,c),a=a.sibling}\nfunction Xj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(Xj(a,b,c),a=a.sibling;null!==a;)Xj(a,b,c),a=a.sibling}var X=null,Yj=!1;function Zj(a,b,c){for(c=c.child;null!==c;)ak(a,b,c),c=c.sibling}\nfunction ak(a,b,c){if(lc&&\"function\"===typeof lc.onCommitFiberUnmount)try{lc.onCommitFiberUnmount(kc,c)}catch(h){}switch(c.tag){case 5:U||Mj(c,b);case 6:var d=X,e=Yj;X=null;Zj(a,b,c);X=d;Yj=e;null!==X&&(Yj?(a=X,c=c.stateNode,8===a.nodeType?a.parentNode.removeChild(c):a.removeChild(c)):X.removeChild(c.stateNode));break;case 18:null!==X&&(Yj?(a=X,c=c.stateNode,8===a.nodeType?Kf(a.parentNode,c):1===a.nodeType&&Kf(a,c),bd(a)):Kf(X,c.stateNode));break;case 4:d=X;e=Yj;X=c.stateNode.containerInfo;Yj=!0;\nZj(a,b,c);X=d;Yj=e;break;case 0:case 11:case 14:case 15:if(!U&&(d=c.updateQueue,null!==d&&(d=d.lastEffect,null!==d))){e=d=d.next;do{var f=e,g=f.destroy;f=f.tag;void 0!==g&&(0!==(f&2)?Nj(c,b,g):0!==(f&4)&&Nj(c,b,g));e=e.next}while(e!==d)}Zj(a,b,c);break;case 1:if(!U&&(Mj(c,b),d=c.stateNode,\"function\"===typeof d.componentWillUnmount))try{d.props=c.memoizedProps,d.state=c.memoizedState,d.componentWillUnmount()}catch(h){W(c,b,h)}Zj(a,b,c);break;case 21:Zj(a,b,c);break;case 22:c.mode&1?(U=(d=U)||null!==\nc.memoizedState,Zj(a,b,c),U=d):Zj(a,b,c);break;default:Zj(a,b,c)}}function bk(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Lj);b.forEach(function(b){var d=ck.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}\nfunction dk(a,b){var c=b.deletions;if(null!==c)for(var d=0;de&&(e=g);d&=~f}d=e;d=B()-d;d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*mk(d/1960))-d;if(10a?16:a;if(null===xk)var d=!1;else{a=xk;xk=null;yk=0;if(0!==(K&6))throw Error(p(331));var e=K;K|=4;for(V=a.current;null!==V;){var f=V,g=f.child;if(0!==(V.flags&16)){var h=f.deletions;if(null!==h){for(var k=0;kB()-gk?Lk(a,0):sk|=c);Ek(a,b)}function Zk(a,b){0===b&&(0===(a.mode&1)?b=1:(b=sc,sc<<=1,0===(sc&130023424)&&(sc=4194304)));var c=L();a=Zg(a,b);null!==a&&(Ac(a,b,c),Ek(a,c))}function vj(a){var b=a.memoizedState,c=0;null!==b&&(c=b.retryLane);Zk(a,c)}\nfunction ck(a,b){var c=0;switch(a.tag){case 13:var d=a.stateNode;var e=a.memoizedState;null!==e&&(c=e.retryLane);break;case 19:d=a.stateNode;break;default:throw Error(p(314));}null!==d&&d.delete(b);Zk(a,c)}var Wk;\nWk=function(a,b,c){if(null!==a)if(a.memoizedProps!==b.pendingProps||Wf.current)Ug=!0;else{if(0===(a.lanes&c)&&0===(b.flags&128))return Ug=!1,zj(a,b,c);Ug=0!==(a.flags&131072)?!0:!1}else Ug=!1,I&&0!==(b.flags&1048576)&&ug(b,ng,b.index);b.lanes=0;switch(b.tag){case 2:var d=b.type;jj(a,b);a=b.pendingProps;var e=Yf(b,H.current);Tg(b,c);e=Xh(null,b,d,a,e,c);var f=bi();b.flags|=1;\"object\"===typeof e&&null!==e&&\"function\"===typeof e.render&&void 0===e.$$typeof?(b.tag=1,b.memoizedState=null,b.updateQueue=\nnull,Zf(d)?(f=!0,cg(b)):f=!1,b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,ah(b),e.updater=nh,b.stateNode=e,e._reactInternals=b,rh(b,d,a,c),b=kj(null,b,d,!0,f,c)):(b.tag=0,I&&f&&vg(b),Yi(null,b,e,c),b=b.child);return b;case 16:d=b.elementType;a:{jj(a,b);a=b.pendingProps;e=d._init;d=e(d._payload);b.type=d;e=b.tag=$k(d);a=Lg(d,a);switch(e){case 0:b=dj(null,b,d,a,c);break a;case 1:b=ij(null,b,d,a,c);break a;case 11:b=Zi(null,b,d,a,c);break a;case 14:b=aj(null,b,d,Lg(d.type,a),c);break a}throw Error(p(306,\nd,\"\"));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),dj(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),ij(a,b,d,e,c);case 3:a:{lj(b);if(null===a)throw Error(p(387));d=b.pendingProps;f=b.memoizedState;e=f.element;bh(a,b);gh(b,d,null,c);var g=b.memoizedState;d=g.element;if(f.isDehydrated)if(f={element:d,isDehydrated:!1,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},b.updateQueue.baseState=\nf,b.memoizedState=f,b.flags&256){e=Ki(Error(p(423)),b);b=mj(a,b,d,c,e);break a}else if(d!==e){e=Ki(Error(p(424)),b);b=mj(a,b,d,c,e);break a}else for(yg=Lf(b.stateNode.containerInfo.firstChild),xg=b,I=!0,zg=null,c=Ch(b,null,d,c),b.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{Ig();if(d===e){b=$i(a,b,c);break a}Yi(a,b,d,c)}b=b.child}return b;case 5:return Kh(b),null===a&&Eg(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Ef(d,e)?g=null:null!==f&&Ef(d,f)&&(b.flags|=32),\nhj(a,b),Yi(a,b,g,c),b.child;case 6:return null===a&&Eg(b),null;case 13:return pj(a,b,c);case 4:return Ih(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Bh(b,null,d,c):Yi(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),Zi(a,b,d,e,c);case 7:return Yi(a,b,b.pendingProps,c),b.child;case 8:return Yi(a,b,b.pendingProps.children,c),b.child;case 12:return Yi(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;f=b.memoizedProps;\ng=e.value;G(Mg,d._currentValue);d._currentValue=g;if(null!==f)if(He(f.value,g)){if(f.children===e.children&&!Wf.current){b=$i(a,b,c);break a}}else for(f=b.child,null!==f&&(f.return=b);null!==f;){var h=f.dependencies;if(null!==h){g=f.child;for(var k=h.firstContext;null!==k;){if(k.context===d){if(1===f.tag){k=ch(-1,c&-c);k.tag=2;var l=f.updateQueue;if(null!==l){l=l.shared;var m=l.pending;null===m?k.next=k:(k.next=m.next,m.next=k);l.pending=k}}f.lanes|=c;k=f.alternate;null!==k&&(k.lanes|=c);Sg(f.return,\nc,b);h.lanes|=c;break}k=k.next}}else if(10===f.tag)g=f.type===b.type?null:f.child;else if(18===f.tag){g=f.return;if(null===g)throw Error(p(341));g.lanes|=c;h=g.alternate;null!==h&&(h.lanes|=c);Sg(g,c,b);g=f.sibling}else g=f.child;if(null!==g)g.return=f;else for(g=f;null!==g;){if(g===b){g=null;break}f=g.sibling;if(null!==f){f.return=g.return;g=f;break}g=g.return}f=g}Yi(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,d=b.pendingProps.children,Tg(b,c),e=Vg(e),d=d(e),b.flags|=1,Yi(a,b,d,c),\nb.child;case 14:return d=b.type,e=Lg(d,b.pendingProps),e=Lg(d.type,e),aj(a,b,d,e,c);case 15:return cj(a,b,b.type,b.pendingProps,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),jj(a,b),b.tag=1,Zf(d)?(a=!0,cg(b)):a=!1,Tg(b,c),ph(b,d,e),rh(b,d,e,c),kj(null,b,d,!0,a,c);case 19:return yj(a,b,c);case 22:return ej(a,b,c)}throw Error(p(156,b.tag));};function Gk(a,b){return ac(a,b)}\nfunction al(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null}function Bg(a,b,c,d){return new al(a,b,c,d)}function bj(a){a=a.prototype;return!(!a||!a.isReactComponent)}\nfunction $k(a){if(\"function\"===typeof a)return bj(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Da)return 11;if(a===Ga)return 14}return 2}\nfunction wh(a,b){var c=a.alternate;null===c?(c=Bg(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null);c.flags=a.flags&14680064;c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext};\nc.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}\nfunction yh(a,b,c,d,e,f){var g=2;d=a;if(\"function\"===typeof a)bj(a)&&(g=1);else if(\"string\"===typeof a)g=5;else a:switch(a){case ya:return Ah(c.children,e,f,b);case za:g=8;e|=8;break;case Aa:return a=Bg(12,c,b,e|2),a.elementType=Aa,a.lanes=f,a;case Ea:return a=Bg(13,c,b,e),a.elementType=Ea,a.lanes=f,a;case Fa:return a=Bg(19,c,b,e),a.elementType=Fa,a.lanes=f,a;case Ia:return qj(c,e,f,b);default:if(\"object\"===typeof a&&null!==a)switch(a.$$typeof){case Ba:g=10;break a;case Ca:g=9;break a;case Da:g=11;\nbreak a;case Ga:g=14;break a;case Ha:g=16;d=null;break a}throw Error(p(130,null==a?a:typeof a,\"\"));}b=Bg(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function Ah(a,b,c,d){a=Bg(7,a,d,b);a.lanes=c;return a}function qj(a,b,c,d){a=Bg(22,a,d,b);a.elementType=Ia;a.lanes=c;a.stateNode={isHidden:!1};return a}function xh(a,b,c){a=Bg(6,a,null,b);a.lanes=c;return a}\nfunction zh(a,b,c){b=Bg(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}\nfunction bl(a,b,c,d,e){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.callbackNode=this.pendingContext=this.context=null;this.callbackPriority=0;this.eventTimes=zc(0);this.expirationTimes=zc(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=zc(0);this.identifierPrefix=d;this.onRecoverableError=e;this.mutableSourceEagerHydrationData=\nnull}function cl(a,b,c,d,e,f,g,h,k){a=new bl(a,b,c,h,k);1===b?(b=1,!0===f&&(b|=8)):b=0;f=Bg(3,null,null,b);a.current=f;f.stateNode=a;f.memoizedState={element:d,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null};ah(f);return a}function dl(a,b,c){var d=3= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\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'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\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'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\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\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * @license React\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var b=Symbol.for(\"react.element\"),c=Symbol.for(\"react.portal\"),d=Symbol.for(\"react.fragment\"),e=Symbol.for(\"react.strict_mode\"),f=Symbol.for(\"react.profiler\"),g=Symbol.for(\"react.provider\"),h=Symbol.for(\"react.context\"),k=Symbol.for(\"react.server_context\"),l=Symbol.for(\"react.forward_ref\"),m=Symbol.for(\"react.suspense\"),n=Symbol.for(\"react.suspense_list\"),p=Symbol.for(\"react.memo\"),q=Symbol.for(\"react.lazy\"),t=Symbol.for(\"react.offscreen\"),u;u=Symbol.for(\"react.module.reference\");\nfunction v(a){if(\"object\"===typeof a&&null!==a){var r=a.$$typeof;switch(r){case b:switch(a=a.type,a){case d:case f:case e:case m:case n:return a;default:switch(a=a&&a.$$typeof,a){case k:case h:case l:case q:case p:case g:return a;default:return r}}case c:return r}}}exports.ContextConsumer=h;exports.ContextProvider=g;exports.Element=b;exports.ForwardRef=l;exports.Fragment=d;exports.Lazy=q;exports.Memo=p;exports.Portal=c;exports.Profiler=f;exports.StrictMode=e;exports.Suspense=m;\nexports.SuspenseList=n;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return v(a)===h};exports.isContextProvider=function(a){return v(a)===g};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return v(a)===l};exports.isFragment=function(a){return v(a)===d};exports.isLazy=function(a){return v(a)===q};exports.isMemo=function(a){return v(a)===p};\nexports.isPortal=function(a){return v(a)===c};exports.isProfiler=function(a){return v(a)===f};exports.isStrictMode=function(a){return v(a)===e};exports.isSuspense=function(a){return v(a)===m};exports.isSuspenseList=function(a){return v(a)===n};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===d||a===f||a===e||a===m||a===n||a===t||\"object\"===typeof a&&null!==a&&(a.$$typeof===q||a.$$typeof===p||a.$$typeof===g||a.$$typeof===h||a.$$typeof===l||a.$$typeof===u||void 0!==a.getModuleId)?!0:!1};exports.typeOf=v;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","function stylis_min (W) {\n function M(d, c, e, h, a) {\n for (var m = 0, b = 0, v = 0, n = 0, q, g, x = 0, K = 0, k, u = k = q = 0, l = 0, r = 0, I = 0, t = 0, B = e.length, J = B - 1, y, f = '', p = '', F = '', G = '', C; l < B;) {\n g = e.charCodeAt(l);\n l === J && 0 !== b + n + v + m && (0 !== b && (g = 47 === b ? 10 : 47), n = v = m = 0, B++, J++);\n\n if (0 === b + n + v + m) {\n if (l === J && (0 < r && (f = f.replace(N, '')), 0 < f.trim().length)) {\n switch (g) {\n case 32:\n case 9:\n case 59:\n case 13:\n case 10:\n break;\n\n default:\n f += e.charAt(l);\n }\n\n g = 59;\n }\n\n switch (g) {\n case 123:\n f = f.trim();\n q = f.charCodeAt(0);\n k = 1;\n\n for (t = ++l; l < B;) {\n switch (g = e.charCodeAt(l)) {\n case 123:\n k++;\n break;\n\n case 125:\n k--;\n break;\n\n case 47:\n switch (g = e.charCodeAt(l + 1)) {\n case 42:\n case 47:\n a: {\n for (u = l + 1; u < J; ++u) {\n switch (e.charCodeAt(u)) {\n case 47:\n if (42 === g && 42 === e.charCodeAt(u - 1) && l + 2 !== u) {\n l = u + 1;\n break a;\n }\n\n break;\n\n case 10:\n if (47 === g) {\n l = u + 1;\n break a;\n }\n\n }\n }\n\n l = u;\n }\n\n }\n\n break;\n\n case 91:\n g++;\n\n case 40:\n g++;\n\n case 34:\n case 39:\n for (; l++ < J && e.charCodeAt(l) !== g;) {\n }\n\n }\n\n if (0 === k) break;\n l++;\n }\n\n k = e.substring(t, l);\n 0 === q && (q = (f = f.replace(ca, '').trim()).charCodeAt(0));\n\n switch (q) {\n case 64:\n 0 < r && (f = f.replace(N, ''));\n g = f.charCodeAt(1);\n\n switch (g) {\n case 100:\n case 109:\n case 115:\n case 45:\n r = c;\n break;\n\n default:\n r = O;\n }\n\n k = M(c, r, k, g, a + 1);\n t = k.length;\n 0 < A && (r = X(O, f, I), C = H(3, k, r, c, D, z, t, g, a, h), f = r.join(''), void 0 !== C && 0 === (t = (k = C.trim()).length) && (g = 0, k = ''));\n if (0 < t) switch (g) {\n case 115:\n f = f.replace(da, ea);\n\n case 100:\n case 109:\n case 45:\n k = f + '{' + k + '}';\n break;\n\n case 107:\n f = f.replace(fa, '$1 $2');\n k = f + '{' + k + '}';\n k = 1 === w || 2 === w && L('@' + k, 3) ? '@-webkit-' + k + '@' + k : '@' + k;\n break;\n\n default:\n k = f + k, 112 === h && (k = (p += k, ''));\n } else k = '';\n break;\n\n default:\n k = M(c, X(c, f, I), k, h, a + 1);\n }\n\n F += k;\n k = I = r = u = q = 0;\n f = '';\n g = e.charCodeAt(++l);\n break;\n\n case 125:\n case 59:\n f = (0 < r ? f.replace(N, '') : f).trim();\n if (1 < (t = f.length)) switch (0 === u && (q = f.charCodeAt(0), 45 === q || 96 < q && 123 > q) && (t = (f = f.replace(' ', ':')).length), 0 < A && void 0 !== (C = H(1, f, c, d, D, z, p.length, h, a, h)) && 0 === (t = (f = C.trim()).length) && (f = '\\x00\\x00'), q = f.charCodeAt(0), g = f.charCodeAt(1), q) {\n case 0:\n break;\n\n case 64:\n if (105 === g || 99 === g) {\n G += f + e.charAt(l);\n break;\n }\n\n default:\n 58 !== f.charCodeAt(t - 1) && (p += P(f, q, g, f.charCodeAt(2)));\n }\n I = r = u = q = 0;\n f = '';\n g = e.charCodeAt(++l);\n }\n }\n\n switch (g) {\n case 13:\n case 10:\n 47 === b ? b = 0 : 0 === 1 + q && 107 !== h && 0 < f.length && (r = 1, f += '\\x00');\n 0 < A * Y && H(0, f, c, d, D, z, p.length, h, a, h);\n z = 1;\n D++;\n break;\n\n case 59:\n case 125:\n if (0 === b + n + v + m) {\n z++;\n break;\n }\n\n default:\n z++;\n y = e.charAt(l);\n\n switch (g) {\n case 9:\n case 32:\n if (0 === n + m + b) switch (x) {\n case 44:\n case 58:\n case 9:\n case 32:\n y = '';\n break;\n\n default:\n 32 !== g && (y = ' ');\n }\n break;\n\n case 0:\n y = '\\\\0';\n break;\n\n case 12:\n y = '\\\\f';\n break;\n\n case 11:\n y = '\\\\v';\n break;\n\n case 38:\n 0 === n + b + m && (r = I = 1, y = '\\f' + y);\n break;\n\n case 108:\n if (0 === n + b + m + E && 0 < u) switch (l - u) {\n case 2:\n 112 === x && 58 === e.charCodeAt(l - 3) && (E = x);\n\n case 8:\n 111 === K && (E = K);\n }\n break;\n\n case 58:\n 0 === n + b + m && (u = l);\n break;\n\n case 44:\n 0 === b + v + n + m && (r = 1, y += '\\r');\n break;\n\n case 34:\n case 39:\n 0 === b && (n = n === g ? 0 : 0 === n ? g : n);\n break;\n\n case 91:\n 0 === n + b + v && m++;\n break;\n\n case 93:\n 0 === n + b + v && m--;\n break;\n\n case 41:\n 0 === n + b + m && v--;\n break;\n\n case 40:\n if (0 === n + b + m) {\n if (0 === q) switch (2 * x + 3 * K) {\n case 533:\n break;\n\n default:\n q = 1;\n }\n v++;\n }\n\n break;\n\n case 64:\n 0 === b + v + n + m + u + k && (k = 1);\n break;\n\n case 42:\n case 47:\n if (!(0 < n + m + v)) switch (b) {\n case 0:\n switch (2 * g + 3 * e.charCodeAt(l + 1)) {\n case 235:\n b = 47;\n break;\n\n case 220:\n t = l, b = 42;\n }\n\n break;\n\n case 42:\n 47 === g && 42 === x && t + 2 !== l && (33 === e.charCodeAt(t + 2) && (p += e.substring(t, l + 1)), y = '', b = 0);\n }\n }\n\n 0 === b && (f += y);\n }\n\n K = x;\n x = g;\n l++;\n }\n\n t = p.length;\n\n if (0 < t) {\n r = c;\n if (0 < A && (C = H(2, p, r, d, D, z, t, h, a, h), void 0 !== C && 0 === (p = C).length)) return G + p + F;\n p = r.join(',') + '{' + p + '}';\n\n if (0 !== w * E) {\n 2 !== w || L(p, 2) || (E = 0);\n\n switch (E) {\n case 111:\n p = p.replace(ha, ':-moz-$1') + p;\n break;\n\n case 112:\n p = p.replace(Q, '::-webkit-input-$1') + p.replace(Q, '::-moz-$1') + p.replace(Q, ':-ms-input-$1') + p;\n }\n\n E = 0;\n }\n }\n\n return G + p + F;\n }\n\n function X(d, c, e) {\n var h = c.trim().split(ia);\n c = h;\n var a = h.length,\n m = d.length;\n\n switch (m) {\n case 0:\n case 1:\n var b = 0;\n\n for (d = 0 === m ? '' : d[0] + ' '; b < a; ++b) {\n c[b] = Z(d, c[b], e).trim();\n }\n\n break;\n\n default:\n var v = b = 0;\n\n for (c = []; b < a; ++b) {\n for (var n = 0; n < m; ++n) {\n c[v++] = Z(d[n] + ' ', h[b], e).trim();\n }\n }\n\n }\n\n return c;\n }\n\n function Z(d, c, e) {\n var h = c.charCodeAt(0);\n 33 > h && (h = (c = c.trim()).charCodeAt(0));\n\n switch (h) {\n case 38:\n return c.replace(F, '$1' + d.trim());\n\n case 58:\n return d.trim() + c.replace(F, '$1' + d.trim());\n\n default:\n if (0 < 1 * e && 0 < c.indexOf('\\f')) return c.replace(F, (58 === d.charCodeAt(0) ? '' : '$1') + d.trim());\n }\n\n return d + c;\n }\n\n function P(d, c, e, h) {\n var a = d + ';',\n m = 2 * c + 3 * e + 4 * h;\n\n if (944 === m) {\n d = a.indexOf(':', 9) + 1;\n var b = a.substring(d, a.length - 1).trim();\n b = a.substring(0, d).trim() + b + ';';\n return 1 === w || 2 === w && L(b, 1) ? '-webkit-' + b + b : b;\n }\n\n if (0 === w || 2 === w && !L(a, 1)) return a;\n\n switch (m) {\n case 1015:\n return 97 === a.charCodeAt(10) ? '-webkit-' + a + a : a;\n\n case 951:\n return 116 === a.charCodeAt(3) ? '-webkit-' + a + a : a;\n\n case 963:\n return 110 === a.charCodeAt(5) ? '-webkit-' + a + a : a;\n\n case 1009:\n if (100 !== a.charCodeAt(4)) break;\n\n case 969:\n case 942:\n return '-webkit-' + a + a;\n\n case 978:\n return '-webkit-' + a + '-moz-' + a + a;\n\n case 1019:\n case 983:\n return '-webkit-' + a + '-moz-' + a + '-ms-' + a + a;\n\n case 883:\n if (45 === a.charCodeAt(8)) return '-webkit-' + a + a;\n if (0 < a.indexOf('image-set(', 11)) return a.replace(ja, '$1-webkit-$2') + a;\n break;\n\n case 932:\n if (45 === a.charCodeAt(4)) switch (a.charCodeAt(5)) {\n case 103:\n return '-webkit-box-' + a.replace('-grow', '') + '-webkit-' + a + '-ms-' + a.replace('grow', 'positive') + a;\n\n case 115:\n return '-webkit-' + a + '-ms-' + a.replace('shrink', 'negative') + a;\n\n case 98:\n return '-webkit-' + a + '-ms-' + a.replace('basis', 'preferred-size') + a;\n }\n return '-webkit-' + a + '-ms-' + a + a;\n\n case 964:\n return '-webkit-' + a + '-ms-flex-' + a + a;\n\n case 1023:\n if (99 !== a.charCodeAt(8)) break;\n b = a.substring(a.indexOf(':', 15)).replace('flex-', '').replace('space-between', 'justify');\n return '-webkit-box-pack' + b + '-webkit-' + a + '-ms-flex-pack' + b + a;\n\n case 1005:\n return ka.test(a) ? a.replace(aa, ':-webkit-') + a.replace(aa, ':-moz-') + a : a;\n\n case 1e3:\n b = a.substring(13).trim();\n c = b.indexOf('-') + 1;\n\n switch (b.charCodeAt(0) + b.charCodeAt(c)) {\n case 226:\n b = a.replace(G, 'tb');\n break;\n\n case 232:\n b = a.replace(G, 'tb-rl');\n break;\n\n case 220:\n b = a.replace(G, 'lr');\n break;\n\n default:\n return a;\n }\n\n return '-webkit-' + a + '-ms-' + b + a;\n\n case 1017:\n if (-1 === a.indexOf('sticky', 9)) break;\n\n case 975:\n c = (a = d).length - 10;\n b = (33 === a.charCodeAt(c) ? a.substring(0, c) : a).substring(d.indexOf(':', 7) + 1).trim();\n\n switch (m = b.charCodeAt(0) + (b.charCodeAt(7) | 0)) {\n case 203:\n if (111 > b.charCodeAt(8)) break;\n\n case 115:\n a = a.replace(b, '-webkit-' + b) + ';' + a;\n break;\n\n case 207:\n case 102:\n a = a.replace(b, '-webkit-' + (102 < m ? 'inline-' : '') + 'box') + ';' + a.replace(b, '-webkit-' + b) + ';' + a.replace(b, '-ms-' + b + 'box') + ';' + a;\n }\n\n return a + ';';\n\n case 938:\n if (45 === a.charCodeAt(5)) switch (a.charCodeAt(6)) {\n case 105:\n return b = a.replace('-items', ''), '-webkit-' + a + '-webkit-box-' + b + '-ms-flex-' + b + a;\n\n case 115:\n return '-webkit-' + a + '-ms-flex-item-' + a.replace(ba, '') + a;\n\n default:\n return '-webkit-' + a + '-ms-flex-line-pack' + a.replace('align-content', '').replace(ba, '') + a;\n }\n break;\n\n case 973:\n case 989:\n if (45 !== a.charCodeAt(3) || 122 === a.charCodeAt(4)) break;\n\n case 931:\n case 953:\n if (!0 === la.test(d)) return 115 === (b = d.substring(d.indexOf(':') + 1)).charCodeAt(0) ? P(d.replace('stretch', 'fill-available'), c, e, h).replace(':fill-available', ':stretch') : a.replace(b, '-webkit-' + b) + a.replace(b, '-moz-' + b.replace('fill-', '')) + a;\n break;\n\n case 962:\n if (a = '-webkit-' + a + (102 === a.charCodeAt(5) ? '-ms-' + a : '') + a, 211 === e + h && 105 === a.charCodeAt(13) && 0 < a.indexOf('transform', 10)) return a.substring(0, a.indexOf(';', 27) + 1).replace(ma, '$1-webkit-$2') + a;\n }\n\n return a;\n }\n\n function L(d, c) {\n var e = d.indexOf(1 === c ? ':' : '{'),\n h = d.substring(0, 3 !== c ? e : 10);\n e = d.substring(e + 1, d.length - 1);\n return R(2 !== c ? h : h.replace(na, '$1'), e, c);\n }\n\n function ea(d, c) {\n var e = P(c, c.charCodeAt(0), c.charCodeAt(1), c.charCodeAt(2));\n return e !== c + ';' ? e.replace(oa, ' or ($1)').substring(4) : '(' + c + ')';\n }\n\n function H(d, c, e, h, a, m, b, v, n, q) {\n for (var g = 0, x = c, w; g < A; ++g) {\n switch (w = S[g].call(B, d, x, e, h, a, m, b, v, n, q)) {\n case void 0:\n case !1:\n case !0:\n case null:\n break;\n\n default:\n x = w;\n }\n }\n\n if (x !== c) return x;\n }\n\n function T(d) {\n switch (d) {\n case void 0:\n case null:\n A = S.length = 0;\n break;\n\n default:\n if ('function' === typeof d) S[A++] = d;else if ('object' === typeof d) for (var c = 0, e = d.length; c < e; ++c) {\n T(d[c]);\n } else Y = !!d | 0;\n }\n\n return T;\n }\n\n function U(d) {\n d = d.prefix;\n void 0 !== d && (R = null, d ? 'function' !== typeof d ? w = 1 : (w = 2, R = d) : w = 0);\n return U;\n }\n\n function B(d, c) {\n var e = d;\n 33 > e.charCodeAt(0) && (e = e.trim());\n V = e;\n e = [V];\n\n if (0 < A) {\n var h = H(-1, c, e, e, D, z, 0, 0, 0, 0);\n void 0 !== h && 'string' === typeof h && (c = h);\n }\n\n var a = M(O, e, c, 0, 0);\n 0 < A && (h = H(-2, a, e, e, D, z, a.length, 0, 0, 0), void 0 !== h && (a = h));\n V = '';\n E = 0;\n z = D = 1;\n return a;\n }\n\n var ca = /^\\0+/g,\n N = /[\\0\\r\\f]/g,\n aa = /: */g,\n ka = /zoo|gra/,\n ma = /([,: ])(transform)/g,\n ia = /,\\r+?/g,\n F = /([\\t\\r\\n ])*\\f?&/g,\n fa = /@(k\\w+)\\s*(\\S*)\\s*/,\n Q = /::(place)/g,\n ha = /:(read-only)/g,\n G = /[svh]\\w+-[tblr]{2}/,\n da = /\\(\\s*(.*)\\s*\\)/g,\n oa = /([\\s\\S]*?);/g,\n ba = /-self|flex-/g,\n na = /[^]*?(:[rp][el]a[\\w-]+)[^]*/,\n la = /stretch|:\\s*\\w+\\-(?:conte|avail)/,\n ja = /([^-])(image-set\\()/,\n z = 1,\n D = 1,\n E = 0,\n w = 1,\n O = [],\n S = [],\n A = 0,\n R = null,\n Y = 0,\n V = '';\n B.use = T;\n B.set = U;\n void 0 !== W && U(W);\n return B;\n}\n\nexport default stylis_min;\n","var unitlessKeys = {\n animationIterationCount: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n boxFlex: 1,\n boxFlexGroup: 1,\n boxOrdinalGroup: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexPositive: 1,\n flexShrink: 1,\n flexNegative: 1,\n flexOrder: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n msGridRow: 1,\n msGridRowSpan: 1,\n msGridColumn: 1,\n msGridColumnSpan: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n // SVG-related properties\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1\n};\n\nexport default unitlessKeys;\n","function memoize(fn) {\n var cache = Object.create(null);\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport { memoize as default };\n","import memoize from '@emotion/memoize';\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar isPropValid = /* #__PURE__ */memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport { isPropValid as default };\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","import{typeOf as e,isElement as t,isValidElementType as n}from\"react-is\";import r,{useState as o,useContext as s,useMemo as i,useEffect as a,useRef as c,createElement as u,useLayoutEffect as l}from\"react\";import d from\"shallowequal\";import h from\"@emotion/stylis\";import p from\"@emotion/unitless\";import f from\"@emotion/is-prop-valid\";import m from\"hoist-non-react-statics\";function y(){return(y=Object.assign||function(e){for(var t=1;t ({})}\\n```\\n\\n',8:'ThemeProvider: Please make your \"theme\" prop an object.\\n\\n',9:\"Missing document ``\\n\\n\",10:\"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\\n\\n\",11:\"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\\n\\n\",12:\"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\\\`\\\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\\n\\n\",13:\"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\\n\\n\",14:'ThemeProvider: \"theme\" prop is required.\\n\\n',15:\"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to ``, please make sure each plugin is uniquely-named, e.g.\\n\\n```js\\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\\n```\\n\\n\",16:\"Reached the limit of how many styled components may be created at group %s.\\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\\nas for instance in your render method then you may be running into this limitation.\\n\\n\",17:\"CSSStyleSheet could not be found on HTMLStyleElement.\\nHas styled-components' style tag been unmounted or altered by another script?\\n\"}:{};function R(){for(var e=arguments.length<=0?void 0:arguments[0],t=[],n=1,r=arguments.length;n1?t-1:0),r=1;r0?\" Args: \"+n.join(\", \"):\"\")):new Error(R.apply(void 0,[O[e]].concat(n)).trim())}var j=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&D(16,\"\"+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;s=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s1<<30)&&D(16,\"\"+t),T.set(e,t),x.set(t,e),t},B=function(e){return x.get(e)},z=function(e,t){t>=k&&(k=t+1),T.set(e,t),x.set(t,e)},M=\"style[\"+N+'][data-styled-version=\"5.3.11\"]',G=new RegExp(\"^\"+N+'\\\\.g(\\\\d+)\\\\[id=\"([\\\\w\\\\d-]+)\"\\\\].*?\"([^\"]*)'),L=function(e,t,n){for(var r,o=n.split(\",\"),s=0,i=o.length;s=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(N))return r}}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(N,\"active\"),r.setAttribute(\"data-styled-version\",\"5.3.11\");var i=Y();return i&&r.setAttribute(\"nonce\",i),n.insertBefore(r,s),r},H=function(){function e(e){var t=this.element=q(e);t.appendChild(document.createTextNode(\"\")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e0&&(u+=e+\",\")})),r+=\"\"+a+c+'{content:\"'+u+'\"}/*!sc*/\\n'}}}return r}(this)},e}(),Z=/(a)(d)/gi,K=function(e){return String.fromCharCode(e+(e>25?39:97))};function Q(e){var t,n=\"\";for(t=Math.abs(e);t>52;t=t/52|0)n=K(t%52)+n;return(K(t%52)+n).replace(Z,\"$1-$2\")}var ee=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},te=function(e){return ee(5381,e)};function ne(e){for(var t=0;t>>0);if(!t.hasNameForId(r,i)){var a=n(s,\".\"+i,void 0,r);t.insertRules(r,i,a)}o.push(i),this.staticRulesId=i}else{for(var c=this.rules.length,u=ee(this.baseHash,n.hash),l=\"\",d=0;d>>0);if(!t.hasNameForId(r,m)){var y=n(l,\".\"+m,void 0,r);t.insertRules(r,m,y)}o.push(m)}}return o.join(\" \")},e}(),se=/^\\s*\\/\\/.*$/gm,ie=[\":\",\"[\",\".\",\"#\"];function ae(e){var t,n,r,o,s=void 0===e?w:e,i=s.options,a=void 0===i?w:i,c=s.plugins,u=void 0===c?S:c,l=new h(a),d=[],p=function(e){function t(t){if(t)try{e(t+\"}\")}catch(e){}}return function(n,r,o,s,i,a,c,u,l,d){switch(n){case 1:if(0===l&&64===r.charCodeAt(0))return e(r+\";\"),\"\";break;case 2:if(0===u)return r+\"/*|*/\";break;case 3:switch(u){case 102:case 112:return e(o[0]+r),\"\";default:return r+(0===d?\"/*|*/\":\"\")}case-2:r.split(\"/*|*/}\").forEach(t)}}}((function(e){d.push(e)})),f=function(e,r,s){return 0===r&&-1!==ie.indexOf(s[n.length])||s.match(o)?e:\".\"+t};function m(e,s,i,a){void 0===a&&(a=\"&\");var c=e.replace(se,\"\"),u=s&&i?i+\" \"+s+\" { \"+c+\" }\":c;return t=a,n=s,r=new RegExp(\"\\\\\"+n+\"\\\\b\",\"g\"),o=new RegExp(\"(\\\\\"+n+\"\\\\b){2,}\"),l(i||!s?\"\":s,u)}return l.use([].concat(u,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(n)>0&&(o[0]=o[0].replace(r,f))},p,function(e){if(-2===e){var t=d;return d=[],t}}])),m.hash=u.length?u.reduce((function(e,t){return t.name||D(15),ee(e,t.name)}),5381).toString():\"\",m}var ce=r.createContext(),ue=ce.Consumer,le=r.createContext(),de=(le.Consumer,new X),he=ae();function pe(){return s(ce)||de}function fe(){return s(le)||he}function me(e){var t=o(e.stylisPlugins),n=t[0],s=t[1],c=pe(),u=i((function(){var t=c;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),l=i((function(){return ae({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return a((function(){d(n,e.stylisPlugins)||s(e.stylisPlugins)}),[e.stylisPlugins]),r.createElement(ce.Provider,{value:u},r.createElement(le.Provider,{value:l},\"production\"!==process.env.NODE_ENV?r.Children.only(e.children):e.children))}var ye=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=he);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,\"@keyframes\"))},this.toString=function(){return D(12,String(n.name))},this.name=e,this.id=\"sc-keyframes-\"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=he),this.name+e.hash},e}(),ve=/([A-Z])/,ge=/([A-Z])/g,Se=/^ms-/,we=function(e){return\"-\"+e.toLowerCase()};function Ee(e){return ve.test(e)?e.replace(ge,we).replace(Se,\"-ms-\"):e}var be=function(e){return null==e||!1===e||\"\"===e};function _e(e,n,r,o){if(Array.isArray(e)){for(var s,i=[],a=0,c=e.length;a1?t-1:0),r=1;r1?t-1:0),i=1;i?@[\\\\\\]^`{|}~-]+/g,De=/(^-|-$)/g;function je(e){return e.replace(Re,\"-\").replace(De,\"\")}var Te=function(e){return Q(te(e)>>>0)};function xe(e){return\"string\"==typeof e&&(\"production\"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var ke=function(e){return\"function\"==typeof e||\"object\"==typeof e&&null!==e&&!Array.isArray(e)},Ve=function(e){return\"__proto__\"!==e&&\"constructor\"!==e&&\"prototype\"!==e};function Be(e,t,n){var r=e[n];ke(t)&&ke(r)?ze(r,t):e[n]=t}function ze(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0||(o[n]=e[n]);return o}(t,[\"componentId\"]),s=r&&r+\"-\"+(xe(e)?e:je(b(e)));return Ye(e,y({},o,{attrs:g,componentId:s}),n)},Object.defineProperty(A,\"defaultProps\",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=o?ze({},e.defaultProps,t):t}}),\"production\"!==process.env.NODE_ENV&&(Pe(p,v),A.warnTooManyClasses=function(e,t){var n={},r=!1;return function(o){if(!r&&(n[o]=!0,Object.keys(n).length>=200)){var s=t?' with the id of \"'+t+'\"':\"\";console.warn(\"Over 200 classes were generated for component \"+e+s+\".\\nConsider using the attrs method, together with a style object for frequently changed styles.\\nExample:\\n const Component = styled.div.attrs(props => ({\\n style: {\\n background: props.background,\\n },\\n }))`width: 100%;`\\n\\n \"),r=!0,n={}}}}(p,v)),Object.defineProperty(A,\"toString\",{value:function(){return\".\"+A.styledComponentId}}),i&&m(A,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),A}var qe=function(e){return function e(t,r,o){if(void 0===o&&(o=w),!n(r))return D(1,String(r));var s=function(){return t(r,o,Ae.apply(void 0,arguments))};return s.withConfig=function(n){return e(t,r,y({},o,{},n))},s.attrs=function(n){return e(t,r,y({},o,{attrs:Array.prototype.concat(o.attrs,n).filter(Boolean)}))},s}(Ye,e)};[\"a\",\"abbr\",\"address\",\"area\",\"article\",\"aside\",\"audio\",\"b\",\"base\",\"bdi\",\"bdo\",\"big\",\"blockquote\",\"body\",\"br\",\"button\",\"canvas\",\"caption\",\"cite\",\"code\",\"col\",\"colgroup\",\"data\",\"datalist\",\"dd\",\"del\",\"details\",\"dfn\",\"dialog\",\"div\",\"dl\",\"dt\",\"em\",\"embed\",\"fieldset\",\"figcaption\",\"figure\",\"footer\",\"form\",\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"head\",\"header\",\"hgroup\",\"hr\",\"html\",\"i\",\"iframe\",\"img\",\"input\",\"ins\",\"kbd\",\"keygen\",\"label\",\"legend\",\"li\",\"link\",\"main\",\"map\",\"mark\",\"marquee\",\"menu\",\"menuitem\",\"meta\",\"meter\",\"nav\",\"noscript\",\"object\",\"ol\",\"optgroup\",\"option\",\"output\",\"p\",\"param\",\"picture\",\"pre\",\"progress\",\"q\",\"rp\",\"rt\",\"ruby\",\"s\",\"samp\",\"script\",\"section\",\"select\",\"small\",\"source\",\"span\",\"strong\",\"style\",\"sub\",\"summary\",\"sup\",\"table\",\"tbody\",\"td\",\"textarea\",\"tfoot\",\"th\",\"thead\",\"time\",\"title\",\"tr\",\"track\",\"u\",\"ul\",\"var\",\"video\",\"wbr\",\"circle\",\"clipPath\",\"defs\",\"ellipse\",\"foreignObject\",\"g\",\"image\",\"line\",\"linearGradient\",\"marker\",\"mask\",\"path\",\"pattern\",\"polygon\",\"polyline\",\"radialGradient\",\"rect\",\"stop\",\"svg\",\"text\",\"textPath\",\"tspan\"].forEach((function(e){qe[e]=qe(e)}));var He=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=ne(e),X.registerId(this.componentId+1)}var t=e.prototype;return t.createStyles=function(e,t,n,r){var o=r(_e(this.rules,t,n,r).join(\"\"),\"\"),s=this.componentId+e;n.insertRules(s,s,o)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){e>2&&X.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function $e(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o meta tag to the stylesheet, or simply embedding it manually in your index.html section for a simpler app.\"),t.server&&h(d,e,t,o,n),l((function(){if(!t.server)return h(d,e,t,o,n),function(){return u.removeStyles(d,t)}}),[d,e,t,o,n]),null}function h(e,t,n,r,o){if(u.isStatic)u.renderStyles(e,P,n,o);else{var s=y({},t,{theme:Oe(t,r,d.defaultProps)});u.renderStyles(e,s,n,o)}}return\"production\"!==process.env.NODE_ENV&&Pe(a),r.memo(d)}function We(e){\"production\"!==process.env.NODE_ENV&&\"undefined\"!=typeof navigator&&\"ReactNative\"===navigator.product&&console.warn(\"`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.\");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r\"+t+\"\"},this.getStyleTags=function(){return e.sealed?D(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return D(2);var n=((t={})[N]=\"\",t[\"data-styled-version\"]=\"5.3.11\",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),o=Y();return o&&(n.nonce=o),[r.createElement(\"style\",y({},n,{key:\"sc-0-0\"}))]},this.seal=function(){e.sealed=!0},this.instance=new X({isServer:!0}),this.sealed=!1}var t=e.prototype;return t.collectStyles=function(e){return this.sealed?D(2):r.createElement(me,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return D(3)},e}(),Je=function(e){var t=r.forwardRef((function(t,n){var o=s(Me),i=e.defaultProps,a=Oe(t,o,i);return\"production\"!==process.env.NODE_ENV&&void 0===a&&console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class \"'+b(e)+'\"'),r.createElement(e,y({},t,{theme:a,ref:n}))}));return m(t,e),t.displayName=\"WithTheme(\"+b(e)+\")\",t},Xe=function(){return s(Me)},Ze={StyleSheet:X,masterSheet:de};\"production\"!==process.env.NODE_ENV&&\"undefined\"!=typeof navigator&&\"ReactNative\"===navigator.product&&console.warn(\"It looks like you've imported 'styled-components' on React Native.\\nPerhaps you're looking to import 'styled-components/native'?\\nRead more about this at https://www.styled-components.com/docs/basics#react-native\"),\"production\"!==process.env.NODE_ENV&&\"test\"!==process.env.NODE_ENV&&\"undefined\"!=typeof window&&(window[\"__styled-components-init__\"]=window[\"__styled-components-init__\"]||0,1===window[\"__styled-components-init__\"]&&console.warn(\"It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\\n\\nSee https://s-c.sh/2BAXzed for more info.\"),window[\"__styled-components-init__\"]+=1);export default qe;export{Ue as ServerStyleSheet,ue as StyleSheetConsumer,ce as StyleSheetContext,me as StyleSheetManager,Ge as ThemeConsumer,Me as ThemeContext,Le as ThemeProvider,Ze as __PRIVATE__,$e as createGlobalStyle,Ae as css,_ as isStyledComponent,We as keyframes,Xe as useTheme,A as version,Je as withTheme};\n//# sourceMappingURL=styled-components.browser.esm.js.map\n","/**\n * Lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright OpenJS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n objectCreate = Object.create,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeMax = Math.max,\n nativeNow = Date.now;\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map'),\n nativeCreate = getNative(Object, 'create');\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n}\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n}\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\n/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\n/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\n/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n}\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\n/**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\nvar merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n});\n\n/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\n/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = merge;\n","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nexport var record = function record(keys, valueType) {\n return keys.reduce(function (toObject, key) {\n return Object.assign(toObject, _defineProperty({}, key, valueType));\n }, {});\n};","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import _toConsumableArray from \"@babel/runtime/helpers/toConsumableArray\";\nexport function generateClassNames(componentName, subClassNames) {\n var generateClassName = function generateClassName(subClassName) {\n return \"Sfx\".concat(componentName).concat(subClassName ? \"-\".concat(subClassName) : '');\n };\n var classNameArray = [];\n if (subClassNames) {\n if (Array.isArray(subClassNames)) {\n classNameArray.push.apply(classNameArray, _toConsumableArray(subClassNames.filter(function (subClassName) {\n return typeof subClassName === 'string';\n }).map(function (subClassName) {\n return generateClassName(subClassName);\n })));\n } else if (typeof subClassNames === 'string') {\n classNameArray.push(generateClassName(subClassNames));\n }\n }\n if (classNameArray.length === 0) {\n classNameArray.push(generateClassName());\n }\n return classNameArray.join(' ');\n}","import { forwardRef } from 'react';\n/**\r\n * Wrapper around React's `forwardRef` function, which adds a `displayName` to each component\r\n * created using it\r\n */\nexport function intrinsicComponent(render, displayName) {\n var component = /*#__PURE__*/forwardRef(render);\n // eslint-disable-next-line immutable/no-mutation\n component.displayName = displayName || render.name;\n return component;\n}","/**\r\n * Type-safe Object.keys\r\n */\nexport function objectKeys(object) {\n return Object.keys(object);\n}","/**\r\n * Type-safe Object.values\r\n */\nexport function objectValues(object) {\n return Object.values(object);\n}","/**\r\n * If your prop can be either a function or a plain value, this function handles\r\n * its usage for you – just provide the reference for a 'maybe function' and the arguments\r\n * to call it with\r\n */\nexport function applyPolymorphicFunctionProp(prop) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n return typeof prop === 'function' ? prop.apply(void 0, args) : prop;\n}","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\n/**\r\n * If you are using a namespace for your styled components, this can come in handy giving each\r\n * styled component in this namespace a displayName which gives better debugging experience\r\n */\nexport function applyDisplayNames(styledObject) {\n return Object.keys(styledObject).reduce(function (newStyledObject, styledComponentName) {\n var styledComponent = styledObject[styledComponentName];\n styledComponent.displayName = \"\".concat(styledComponentName);\n return Object.assign(newStyledObject, _defineProperty({}, styledComponentName, styledComponent));\n }, {});\n}","/**\r\n * passes {value} to {ref}\r\n * Useful if you want to expose the ref of an inner component to the public API\r\n * while still using it inside the component.\r\n * @param ref A ref callback or ref object. If anything falsy, this is a no-op.\r\n */\nexport default function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}","import * as React from 'react';\nimport setRef from './set-ref';\nexport function useForkRef(refA, refB) {\n /**\r\n * This will create a new function if the ref props change and are defined.\r\n * This means react will call the old forkRef with `null` and the new forkRef\r\n * with the ref. Cleanup naturally emerges from this behavior.\r\n */\n return React.useMemo(function () {\n if (refA == null && refB == null) {\n return null;\n }\n return function (refValue) {\n setRef(refA, refValue);\n setRef(refB, refValue);\n };\n }, [refA, refB]);\n}","export function restrictNumber(number) {\n var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var max = arguments.length > 2 ? arguments[2] : undefined;\n // we are not assigning default value for it as if max was null it will override the default value.\n var currentMax = max || 1000000;\n var convertedNumber = +number;\n return Math.min(Math.max(min, convertedNumber), currentMax);\n}","export function mapNumber(number, oldMin, oldMax, newMin, newMax) {\n return (number - oldMin) * (newMax - newMin) / (oldMax - oldMin) + newMin;\n}","import _toConsumableArray from \"@babel/runtime/helpers/toConsumableArray\";\nexport var rgbStringToArray = function rgbStringToArray(rgbColorString) {\n return rgbColorString.replaceAll(/[^\\d,]/gi, '').split(',').map(function (n) {\n return +n;\n });\n};\nexport var hexToRgb = function hexToRgb(hexColor) {\n // if (!hexColor) return { r: 0, g: 0, b: 0 };\n if (!hexColor) return [0, 0, 0];\n return [Number.parseInt(hexColor.slice(1, 3), 16), Number.parseInt(hexColor.slice(3, 5), 16), Number.parseInt(hexColor.slice(5, 7), 16)];\n};\nvar rgbChannelToHex = function rgbChannelToHex(channel) {\n return channel.toString(16).padStart(2, '0');\n};\nexport var rgbToHex = function rgbToHex() {\n for (var _len = arguments.length, rgbColor = new Array(_len), _key = 0; _key < _len; _key++) {\n rgbColor[_key] = arguments[_key];\n }\n return \"#\".concat(rgbColor.map(rgbChannelToHex).join(''));\n};\nexport var hslToHex = function hslToHex(h, s, l) {\n var dividedL = l / 100;\n var a = s * Math.min(dividedL, 1 - dividedL) / 100;\n var f = function f(n) {\n var k = (n + h / 30) % 12;\n var color = dividedL - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n return rgbChannelToHex(Math.round(255 * color));\n };\n return \"#\".concat(f(0)).concat(f(8)).concat(f(4));\n};\nexport var rgbToHsl = function rgbToHsl() {\n for (var _len2 = arguments.length, rgbColor = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n rgbColor[_key2] = arguments[_key2];\n }\n var r = rgbColor[0],\n g = rgbColor[1],\n b = rgbColor[2];\n r /= 255;\n g /= 255;\n b /= 255;\n var min = Math.min(r, g, b);\n var max = Math.max(r, g, b);\n var h;\n var s;\n var l = (max + min) / 2;\n if (max === min) {\n h = 0;\n s = 0;\n } else {\n var diff = max - min;\n s = l > 0.5 ? diff / (2 - max - min) : diff / (max + min);\n switch (max) {\n case r:\n h = (g - b) / diff + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / diff + 2;\n break;\n case b:\n h = (r - g) / diff + 4;\n break;\n default:\n h = 0;\n }\n h /= 6;\n }\n\n // * 360 for having the hue in degrees\n return [Math.round(h * 360), Math.round(s * 100), Math.round(l * 100)];\n};\nexport var colorToHsl = function colorToHsl(color) {\n if (color.startsWith('#')) {\n var hex = color;\n if (color.length === 4) {\n hex = \"#\".concat(color[1]).concat(color[1]).concat(color[2]).concat(color[2]).concat(color[3]).concat(color[3]);\n }\n return rgbToHsl.apply(void 0, _toConsumableArray(hexToRgb(hex)));\n }\n if (color.startsWith('rgb')) {\n var colorInRgb = rgbStringToArray(color);\n return rgbToHsl.apply(void 0, _toConsumableArray(colorInRgb));\n }\n\n // if the color is in text and no one from previous then return the default color which is black\n if (typeof color === 'string') {\n return [0, 0, 0];\n }\n return color;\n};\nexport var colorToRgb = function colorToRgb(color) {\n // we are not handling (hsl/color name) here cause we are accepting only HEX and RGB colors as default colors from user.\n if (color.startsWith('#')) {\n return hexToRgb(color);\n }\n if (color.startsWith('rgb')) {\n return rgbStringToArray(color);\n }\n if (typeof color === 'string') {\n return [0, 0, 0];\n }\n return color;\n};\nexport var colorToHex = function colorToHex(color) {\n if (color.startsWith('#')) {\n if (color.length === 7) {\n return color;\n }\n return \"#\".concat(color[0]).concat(color[0]).concat(color[1]).concat(color[1]).concat(color[2]).concat(color[2]);\n }\n if (color.startsWith('rgb')) {\n return rgbToHex.apply(void 0, _toConsumableArray(rgbStringToArray(color)));\n }\n if (typeof color === 'string') {\n return '#000000';\n }\n return color;\n};\nvar checkIsBlack = function checkIsBlack(s, l) {\n return l === 0 && (s === 0 || s === 1);\n};\nvar checkIsWhite = function checkIsWhite(s, l) {\n return s === 0 && l === 1;\n};\n\n// both hsv and hsl values are in [0, 1] except h is in [0, 360]\nexport var hsvToHsl = function hsvToHsl(h, s, v) {\n var newS = s;\n var l = (2 - s) * v / 2;\n if (l !== 0) {\n if (l === 1) {\n newS = 0;\n } else if (l < 0.5) {\n newS = newS * v / (l * 2);\n } else {\n newS = newS * v / (2 - l * 2);\n }\n }\n var isBlack = checkIsBlack(newS, l);\n return [isBlack || checkIsWhite(newS, l) ? 0 : h, isBlack ? 0 : Math.round(newS * 100), Math.round(l * 100)];\n};\n\n// both hsv and hsl values are in [0, 1] except h is in [0, 360]\nexport var hslToHsv = function hslToHsv(h, s, l) {\n var newS = s;\n var newL = l * 2;\n newS *= newL <= 1 ? newL : 2 - newL;\n var v = (newL + newS) / 2;\n newS = 2 * newS / (newL + newS);\n\n // return [h, newS, v];\n var isBlack = checkIsBlack(newS, l);\n return [isBlack || checkIsWhite(newS, l) ? 0 : h, isBlack ? 0 : Math.round(newS * 100), Math.round(v * 100)];\n};\n\n// TODO: validating 3 color code for Hex\n// /^#([\\da-f]{3}){1,2}$/i.test(color)colorToHex\nexport var validateHex = function validateHex(color) {\n return /^#[\\da-f]{6}$/i.test(color);\n};","export function getElemDocumentCoords(elem) {\n if (!elem) {\n return null;\n }\n var box = elem.getBoundingClientRect();\n var _document = document,\n body = _document.body;\n var docEl = document.documentElement;\n var scrollTop = window.pageYOffset || docEl.scrollTop || body.scrollTop;\n var scrollLeft = window.pageXOffset || docEl.scrollLeft || body.scrollLeft;\n var clientTop = docEl.clientTop || body.clientTop || 0;\n var clientLeft = docEl.clientLeft || body.clientLeft || 0;\n var top = box.top + scrollTop - clientTop;\n var left = box.left + scrollLeft - clientLeft;\n return {\n top: Math.round(top),\n left: Math.round(left),\n width: box.width,\n height: box.height\n };\n}","export function asc(a, b) {\n return a - b;\n}\nexport function valueToPercent(value, min, max) {\n return (value - min) * 100 / (max - min);\n}\nexport function percentToValue(percent, min, max) {\n return (max - min) * percent + min;\n}\nfunction getDecimalPrecision(num) {\n // This handles the case when num is very small (0.00000001), js will turn this into 1e-8.\n // When num is bigger than 1 or less than -1 it won't get converted to this notation so it's fine.\n if (Math.abs(num) < 1) {\n var parts = num.toExponential().split('e-');\n var matissaDecimalPart = parts[0].split('.')[1];\n return (matissaDecimalPart ? matissaDecimalPart.length : 0) + Number.parseInt(parts[1], 10);\n }\n var decimalPart = num.toString().split('.')[1];\n return decimalPart ? decimalPart.length : 0;\n}\nexport function roundValueToStep(value, step, min) {\n var nearest = Math.round((value - min) / step) * step + min;\n return Number(nearest.toFixed(getDecimalPrecision(step)));\n}\nexport function setValueIndex(_ref) {\n var values = _ref.values,\n newValue = _ref.newValue,\n index = _ref.index;\n var output = values.slice();\n output[index] = newValue;\n return output.sort(asc);\n}\nexport function findClosest(values, currentValue) {\n var _values$reduce = values.reduce(function (acc, value, index) {\n var distance = Math.abs(currentValue - value);\n if (acc === null || distance < acc.distance || distance === acc.distance) {\n return {\n distance: distance,\n index: index\n };\n }\n return acc;\n }, null),\n closestIndex = _values$reduce.index;\n return closestIndex;\n}\nexport function ownerDocument(node) {\n return node && node.ownerDocument || document;\n}\nexport function clamp(value, min, max) {\n if (value == null) {\n return min;\n }\n return Math.min(Math.max(min, value), max);\n}\nexport function trackFinger(event, touchId) {\n if (touchId.current !== undefined && event.changedTouches) {\n for (var i = 0; i < event.changedTouches.length; i += 1) {\n var touch = event.changedTouches[i];\n if (touch.identifier === touchId.current) {\n return {\n x: touch.clientX,\n y: touch.clientY\n };\n }\n }\n return false;\n }\n return {\n x: event.clientX,\n y: event.clientY\n };\n}\nexport var axisProps = {\n horizontal: {\n offset: function offset(percent) {\n return {\n left: \"\".concat(percent, \"%\")\n };\n },\n leap: function leap(percent) {\n return {\n width: \"\".concat(percent, \"%\")\n };\n }\n },\n 'horizontal-reverse': {\n offset: function offset(percent) {\n return {\n right: \"\".concat(percent, \"%\")\n };\n },\n leap: function leap(percent) {\n return {\n width: \"\".concat(percent, \"%\")\n };\n }\n },\n vertical: {\n offset: function offset(percent) {\n return {\n bottom: \"\".concat(percent, \"%\")\n };\n },\n leap: function leap(percent) {\n return {\n height: \"\".concat(percent, \"%\")\n };\n }\n }\n};\nexport function focusThumb(_ref2) {\n var sliderRef = _ref2.sliderRef,\n activeIndex = _ref2.activeIndex,\n setActive = _ref2.setActive;\n var doc = ownerDocument(sliderRef.current);\n if (!sliderRef.current.contains(doc.activeElement) || Number(doc.activeElement.getAttribute('data-index')) !== activeIndex) {\n var _sliderRef$current$qu;\n (_sliderRef$current$qu = sliderRef.current.querySelector(\"[type=\\\"range\\\"][data-index=\\\"\".concat(activeIndex, \"\\\"]\"))) === null || _sliderRef$current$qu === void 0 ? void 0 : _sliderRef$current$qu.focus();\n }\n if (setActive) {\n setActive(activeIndex);\n }\n}","export var Color = {\n TextPrimary: 'txt-primary',\n TextSecondary: 'txt-secondary',\n TextSecondaryInvert: 'txt-secondary-invert',\n TextPlaceholder: 'txt-placeholder',\n TextWarning: 'txt-warning',\n TextError: 'txt-error',\n TextInfo: 'txt-info',\n AccentPrimary: 'accent-primary',\n AccentPrimaryHover: 'accent-primary-hover',\n AccentPrimaryActive: 'accent-primary-active',\n AccentPrimaryDisabled: 'accent-primary-disabled',\n AccentSecondaryDisabled: 'accent-secondary-disabled',\n AccentStateless: 'accent-stateless',\n AccentStateless_0_4_Opacity: 'accent-stateless_0_4_opacity',\n Accent_0_5_Opacity: 'accent_0_5_opacity',\n Accent_1_2_Opacity: 'accent_1_2_opacity',\n Accent_1_8_Opacity: 'accent_1_8_opacity',\n Accent_2_8_Opacity: 'accent_2_8_opacity',\n Accent_4_0_Opacity: 'accent_4_0_opacity',\n BackgroundGrey: 'bg-grey',\n BackgroundStateless: 'bg-stateless',\n BackgroundActive: 'bg-active',\n BackgroundBaseLight: 'bg-base-light',\n BackgroundBaseMedium: 'bg-base-medium',\n BackgroundPrimary: 'bg-primary',\n BackgroundPrimaryLight: 'bg-primary-light',\n BackgroundPrimaryHover: 'bg-primary-hover',\n BackgroundPrimaryActive: 'bg-primary-active',\n BackgroundPrimaryStateless: 'bg-primary-stateless',\n BackgroundPrimary_0_5_Opacity: 'bg-primary-0-5-opacity',\n BackgroundSecondary: 'bg-secondary',\n BackgroundHover: 'bg-hover',\n BackgroundGreen: 'bg-green',\n BackgroundGreenMedium: 'bg-green-medium',\n BackgroundBlue: 'bg-blue',\n BackgroundRed: 'bg-red',\n BackgroundRedMedium: 'background-red-medium',\n BackgroundOrange: 'bg-orange',\n BackgroundTooltip: 'bg-tooltip',\n IconsPrimary: 'icon-primary',\n IconsPrimaryOpacity_0_6: 'icons-primary-opacity-0-6',\n IconsSecondary: 'icons-secondary',\n IconsPlaceholder: 'icons-placeholder',\n IconsInvert: 'icons-invert',\n IconsMuted: 'icons-muted',\n IconsPrimaryHover: 'icons-primary-hover',\n IconsSecondaryHover: 'icons-secondary-hover',\n ButtonPrimaryText: 'btn-primary-text',\n ButtonPrimaryText_0_6: 'btn-primary-text-0-6',\n ButtonPrimaryText_0_4: 'btn-primary-text-0-4',\n ButtonDisabledText: 'btn-disabled-text',\n ButtonSecondaryText: 'btn-secondary-text',\n LinkPrimary: 'link-primary',\n LinkStateless: 'link-stateless',\n LinkHover: 'link-hover',\n LinkActive: 'link-active',\n LinkMuted: 'link-muted',\n LinkPressed: 'link-pressed',\n BordersPrimary: 'borders-primary',\n BordersPrimaryHover: 'borders-primary-hover',\n BordersSecondary: 'borders-secondary',\n BordersStrong: 'borders-strong',\n BordersInvert: 'borders-invert',\n BorderHoverBottom: 'border-hover-bottom',\n BorderActiveBottom: 'border-active-bottom',\n BorderPrimaryStateless: 'border-primary-stateless',\n BordersDisabled: 'borders-disabled',\n BordersButton: 'borders-button',\n BordersItem: 'borders-item',\n BordersBaseLight: 'borders-base-light',\n BordersBaseMedium: 'borders-base-medium',\n BordersGreen: 'borders-green',\n BordersGreenMedium: 'borders-green-medium',\n BordersRed: 'borders-red',\n ActiveSecondary: 'active-secondary',\n ActiveSecondaryHover: 'active-secondary-hover',\n Tag: 'tag',\n StatesErrorDisabledText: 'states-error-disabled-text',\n Error: 'error',\n Error_0_28_Opacity: 'error-0-28-opacity',\n Error_0_12_Opacity: 'error-0-12-opacity',\n ErrorHover: 'error-hover',\n ErrorActive: 'error-active',\n Success: 'success',\n SuccessHover: 'success-hover',\n SuccessActive: 'success-Active',\n Warning: 'warning',\n WarningHover: 'warning-hover',\n WarningActive: 'warning-active',\n Info: 'info',\n Modified: 'modified',\n Red: 'red',\n Orange: 'orange',\n Salad: 'salad',\n Green: 'green',\n Blue: 'blue',\n Indigo: 'indigo',\n Violet: 'violet',\n Pink: 'pink',\n GradientRight: 'gradient-right',\n Extra_0_3_Overlay: 'extra-0-3-overlay',\n GradientRightActive: 'gradient-right-active',\n GradientRightHover: 'gradient-right-hover',\n Extra_0_5_Overlay: 'extra-0-5-overlay',\n Extra_0_7_Overlay: 'extra-0-7-overlay',\n Extra_0_9_Overlay: 'extra-0-9-overlay',\n Red_0_1_Overlay: 'red-0-1-overlay',\n Orange_0_1_Overlay: 'orange-0-1-overlay',\n Accent_0_8_Overlay: 'accent-0-8-overlay',\n Link: 'link',\n Camera: 'camera',\n GoogleDrive: 'google-drive',\n Dropbox: 'dropbox',\n OneDrive: 'one-drive',\n Device: 'device',\n Instagram: 'instagram',\n FreeImages: 'free-images',\n FreeIcons: 'free-icons',\n Canvas: 'canvas',\n Box: 'box',\n ScreenCast: 'screen-cast',\n LightShadow: 'light-shadow',\n MediumShadow: 'medium-shadow',\n LargeShadow: 'large-shadow',\n XLargeShadow: 'x-large-shadow'\n};","import { css } from 'styled-components';\nimport { Color as PaletteColor } from '../types/palette';\nexport var scrollBar = function scrollBar(_ref) {\n var palette = _ref.theme.palette;\n return css([\"scrollbar-color:\", \" \", \";scrollbar-width:thin;::-webkit-scrollbar{width:12px;}::-webkit-scrollbar-track{margin-block:6px;}::-webkit-scrollbar-thumb{background:\", \";border:4px solid \", \";border-radius:99px;padding:4px 6px;background-clip:padding-box;}\"], palette[PaletteColor.IconsMuted], palette[PaletteColor.ActiveSecondary], palette[PaletteColor.Extra_0_3_Overlay], palette[PaletteColor.ActiveSecondary]);\n};","export var Breakpoint = {\n Xs: 'xs',\n Sm: 'sm',\n Md: 'md',\n Lg: 'lg',\n Xl: 'xl',\n Xxl: 'xxl',\n Xxxl: 'xxxl'\n};\nexport var BreakpointClass = {\n Xs: '.sfx-breakpoint-xs',\n Sm: '.sfx-breakpoint-sm',\n Md: '.sfx-breakpoint-md',\n Lg: '.sfx-breakpoint-lg',\n Xl: '.sfx-breakpoint-xl',\n Xxl: '.sfx-breakpoint-xxl',\n Xxxl: '.sfx-breakpoint-xxxl'\n};","export var Shadows = {\n ShadowSm: 'shadow-sm',\n ShadowMd: 'shadow-md',\n ShadowLg: 'shadow-lg',\n ShadowXl: 'shadow-xl',\n Label: 'label',\n Header: 'header',\n HeaderPopup: 'header-popup',\n FooterPopup: 'footer-popup',\n LeftPanelMd: 'left-panel-md',\n RightPanelMd: 'right-panel-md',\n LeftPanelSm: 'left-panel-sm',\n RightPanelSm: 'right-panel-sm'\n};","export var FontWeight = {\n Thin: 100,\n ExtraLight: 200,\n Light: 300,\n Regular: 400,\n Medium: 500,\n SemiBold: 600,\n Bold: 700,\n ExtraBold: 800,\n Black: 900\n};","export var FontVariant = {\n TextExtraSmall: 'text-extra-small',\n TextSmall: 'text-small',\n TextSmallUp: 'text-small-up',\n TextMedium: 'text-medium',\n TextLarge: 'text-large',\n TextExtraLarge: 'text-extra-large',\n TextXExtraLarge: 'text-x-extra-large',\n TitleH6: 'title-h6',\n TitleH5: 'title-h5',\n TitleH4: 'title-h4',\n TitleH3: 'title-h3',\n TitleH2: 'title-h2',\n TitleH1: 'title-h1',\n LabelExtraSmall: 'label-extra-small',\n LabelExtraSmallEmphasis: 'label-extra-small-emphasis',\n LabelExtraSmallUp: 'label-extra-small-up',\n LabelSmall: 'label-small',\n LabelSmallEmphasis: 'label-small-emphasis',\n LabelSmallUp: 'label-small-up',\n LabelSmallUpEmphasis: 'label-small-up-emphasis',\n LabelMedium: 'label-medium',\n LabelMediumEmphasis: 'label-medium-emphasis',\n LabelLarge: 'label-large',\n LabelLargeEmphasis: 'label-large-emphasis',\n LabelLargeUp: 'label-large-up',\n LabelExtraLargeEmphasis: 'label-extra-large-emphasis',\n LabelExtraLarge: 'label-extra-large',\n LabelXExtraLargeEmphasis: 'label-x-extra-large-emphasis',\n LabelXExtraLarge: 'label-x-extra-large',\n LabelXXExtraLargeEmphasis: 'label-x-x-extra-large-emphasis',\n LabelXXExtraLarge: 'label-x-x-extra-large',\n LabelXXXExtraLarge: 'label-x-x-x-extra-large',\n ButtonSmEmphasis: 'btn-sm-emphasis',\n ButtonSm: 'btn-sm',\n ButtonSmUpEmphasis: 'btn-sm-up-emphasis',\n ButtonSmUp: 'btn-sm-up',\n ButtonMdEmphasis: 'btn-md-emphasis',\n ButtonMd: 'btn-md',\n ButtonLgEmphasis: 'btn-lg-emphasis',\n ButtonLg: 'btn-lg',\n ButtonLgUpEmphasis: 'btn-lg-up-emphasis',\n ButtonLgUp: 'btn-lg-up',\n LinkSmall: 'link-small',\n LinkSmallEmphasis: 'link-small-emphasis',\n LinkSmallUp: 'link-small-up',\n LinkSmallUpEmphasis: 'link-small-up-emphasis',\n LinkMedium: 'link-medium',\n LinkMediumEmphasis: 'link-medium-emphasis',\n LinkLarge: 'link-large',\n LinkLargeEmphasis: 'link-large-emphasis',\n LinkLargeUp: 'link-large-up',\n LinkLargeUpEmphasis: 'link-large-up-emphasis',\n InputSm: 'input-sm',\n InputSmUp: 'input-sm-up',\n InputMd: 'input-md',\n InputLg: 'input-lg'\n};","export var BorderRadiusSize = {\n Sm: 'sm',\n Md: 'md',\n Lg: 'lg'\n};","import { createGlobalStyle, css } from 'styled-components';\nvar Typography = /*#__PURE__*/createGlobalStyle([\"\", \";\"], function (_ref) {\n var theme = _ref.theme;\n var baseLineHeight = theme.typography.baseLineHeight;\n return css([\"h1,h2,h3,h4,h5,h6,p,small{line-height:\", \";}\"], baseLineHeight);\n});\nexport default Typography;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _labelFontVariants, _textFontVariants, _buttonFontVariants, _linkFontVariants, _inputFontVariants, _titleFontVariants;\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n/* eslint-disable sonarjs/no-duplicate-string */\nimport { FontVariant, FontWeight } from '../../../../utils/types/typography';\nvar fontFamily = '\"Roboto\"';\nvar defaultFontValue = {\n fontFamily: fontFamily,\n fontStyle: 'normal',\n fontWeight: FontWeight.Regular\n};\nvar labelFontVariants = (_labelFontVariants = {}, _defineProperty(_labelFontVariants, FontVariant.LabelExtraSmall, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '10px',\n lineHeight: '12px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelExtraSmallEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: 'Bold',\n fontSize: '10px',\n lineHeight: '12px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelExtraSmallUp, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '11px',\n lineHeight: '12px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelSmall, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '12px',\n lineHeight: '14px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelSmallEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '12px',\n lineHeight: '14px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelSmallUp, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '13px',\n lineHeight: '16px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelSmallUpEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '13px',\n lineHeight: '16px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelMedium, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '14px',\n lineHeight: '16px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelMediumEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '14px',\n lineHeight: '16px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelLarge, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '16px',\n lineHeight: '18px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelLargeEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '16px',\n lineHeight: '18px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelLargeUp, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Regular,\n fontSize: '18px',\n lineHeight: '20px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelExtraLargeEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '24px',\n lineHeight: '28px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelExtraLarge, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Regular,\n fontSize: '24px',\n lineHeight: '28px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelXExtraLargeEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '32px',\n lineHeight: '36px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelXExtraLarge, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '32px',\n lineHeight: '36px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelXXExtraLargeEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '48px',\n lineHeight: '54px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelXXExtraLarge, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '48px',\n lineHeight: '54px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelXXXExtraLarge, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '60px',\n lineHeight: '68px'\n})), _labelFontVariants);\nvar textFontVariants = (_textFontVariants = {}, _defineProperty(_textFontVariants, FontVariant.TextExtraSmall, _objectSpread(_objectSpread({}, labelFontVariants[FontVariant.LabelExtraSmallUp]), {}, {\n lineHeight: '14px'\n})), _defineProperty(_textFontVariants, FontVariant.TextSmall, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '12px',\n lineHeight: '18px'\n})), _defineProperty(_textFontVariants, FontVariant.TextSmallUp, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '13px',\n lineHeight: '18px'\n})), _defineProperty(_textFontVariants, FontVariant.TextMedium, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '14px',\n lineHeight: '20px'\n})), _defineProperty(_textFontVariants, FontVariant.TextLarge, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '16px',\n lineHeight: '22px'\n})), _defineProperty(_textFontVariants, FontVariant.TextExtraLarge, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '18px',\n lineHeight: '26px'\n})), _defineProperty(_textFontVariants, FontVariant.TextXExtraLarge, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '28px',\n lineHeight: '40px'\n})), _textFontVariants);\nvar buttonFontVariants = (_buttonFontVariants = {}, _defineProperty(_buttonFontVariants, FontVariant.ButtonSmEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '12px',\n lineHeight: '14px'\n})), _defineProperty(_buttonFontVariants, FontVariant.ButtonSm, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '12px',\n lineHeight: '14px'\n})), _defineProperty(_buttonFontVariants, FontVariant.ButtonSmUpEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '13px',\n lineHeight: '16px'\n})), _defineProperty(_buttonFontVariants, FontVariant.ButtonSmUp, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '13px',\n lineHeight: '16px'\n})), _defineProperty(_buttonFontVariants, FontVariant.ButtonMdEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '14px',\n lineHeight: '16px'\n})), _defineProperty(_buttonFontVariants, FontVariant.ButtonMd, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '14px',\n lineHeight: '16px'\n})), _defineProperty(_buttonFontVariants, FontVariant.ButtonLgEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '16px',\n lineHeight: '18px'\n})), _defineProperty(_buttonFontVariants, FontVariant.ButtonLg, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '16px',\n lineHeight: '18px'\n})), _defineProperty(_buttonFontVariants, FontVariant.ButtonLgUpEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '18px',\n lineHeight: '20px'\n})), _defineProperty(_buttonFontVariants, FontVariant.ButtonLgUp, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '18px',\n lineHeight: '20px'\n})), _buttonFontVariants);\nvar linkFontVariants = (_linkFontVariants = {}, _defineProperty(_linkFontVariants, FontVariant.LinkSmall, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '12px',\n lineHeight: '14px'\n})), _defineProperty(_linkFontVariants, FontVariant.LinkSmallEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '12px',\n lineHeight: '14px'\n})), _defineProperty(_linkFontVariants, FontVariant.LinkSmallUp, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '13px',\n lineHeight: '16px'\n})), _defineProperty(_linkFontVariants, FontVariant.LinkSmallUpEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '13px',\n lineHeight: '16px'\n})), _defineProperty(_linkFontVariants, FontVariant.LinkMedium, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '14px',\n lineHeight: '16px'\n})), _defineProperty(_linkFontVariants, FontVariant.LinkMediumEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '14px',\n lineHeight: '16px'\n})), _defineProperty(_linkFontVariants, FontVariant.LinkLarge, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '16px',\n lineHeight: '18px'\n})), _defineProperty(_linkFontVariants, FontVariant.LinkLargeEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '16px',\n lineHeight: '18px'\n})), _defineProperty(_linkFontVariants, FontVariant.LinkLargeUp, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '18px',\n lineHeight: '20px'\n})), _defineProperty(_linkFontVariants, FontVariant.LinkLargeUpEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '18px',\n lineHeight: '20px'\n})), _linkFontVariants);\nvar inputFontVariants = (_inputFontVariants = {}, _defineProperty(_inputFontVariants, FontVariant.InputSm, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '12px',\n lineHeight: '14px'\n})), _defineProperty(_inputFontVariants, FontVariant.InputSmUp, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '13px',\n lineHeight: '16px'\n})), _defineProperty(_inputFontVariants, FontVariant.InputMd, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '14px',\n lineHeight: '16px'\n})), _defineProperty(_inputFontVariants, FontVariant.InputLg, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '16px',\n lineHeight: '18px'\n})), _inputFontVariants);\nvar titleFontVariants = (_titleFontVariants = {}, _defineProperty(_titleFontVariants, FontVariant.TitleH6, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '12px',\n lineHeight: '18px'\n})), _defineProperty(_titleFontVariants, FontVariant.TitleH5, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '14px',\n lineHeight: '21px'\n})), _defineProperty(_titleFontVariants, FontVariant.TitleH4, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '16px',\n lineHeight: '24px'\n})), _defineProperty(_titleFontVariants, FontVariant.TitleH3, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '18px',\n lineHeight: '27px'\n})), _defineProperty(_titleFontVariants, FontVariant.TitleH2, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '20px',\n lineHeight: '30px'\n})), _defineProperty(_titleFontVariants, FontVariant.TitleH1, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '28px',\n lineHeight: '42px'\n})), _titleFontVariants);\nexport var defaultTypography = {\n // htmlFontSize: '14px',\n fontFamily: fontFamily,\n baseLineHeight: 1.375,\n font: _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, labelFontVariants), textFontVariants), buttonFontVariants), linkFontVariants), inputFontVariants), titleFontVariants)\n};","import { createGlobalStyle /* , css */ } from 'styled-components';\n\n// Example with theme: ${({ theme }) => css``;\n\nvar CommonStyles = /*#__PURE__*/createGlobalStyle([\"@keyframes spinner{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}.Menu-open{overflow:hidden;}.Modal-open{overflow:hidden;}\"]);\nexport default CommonStyles;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _lightPalette;\n/* eslint-disable sonarjs/no-duplicate-string */\nimport { Color } from '../../../../utils/types/palette';\nexport var lightPalette = (_lightPalette = {}, _defineProperty(_lightPalette, Color.TextPrimary, 'rgba(55, 65, 75, 1)'), _defineProperty(_lightPalette, Color.TextSecondary, 'rgba(118, 138, 159, 1)'), _defineProperty(_lightPalette, Color.TextSecondaryInvert, 'rgba(213, 216, 220, 1)'), _defineProperty(_lightPalette, Color.TextPlaceholder, 'rgba(169, 182, 194, 1)'), _defineProperty(_lightPalette, Color.TextWarning, 'rgba(196, 110, 0, 1)'), _defineProperty(_lightPalette, Color.TextError, 'rgba(170, 32, 0, 1)'), _defineProperty(_lightPalette, Color.TextInfo, 'rgba(35, 117, 171, 1)'), _defineProperty(_lightPalette, Color.AccentPrimary, 'rgba(104, 121, 235, 1)'), _defineProperty(_lightPalette, Color.AccentPrimaryHover, 'rgba(96, 111, 209, 1)'), _defineProperty(_lightPalette, Color.AccentPrimaryActive, 'rgba(73, 88, 188, 1)'), _defineProperty(_lightPalette, Color.AccentPrimaryDisabled, 'rgba(233, 238, 242, 1)'), _defineProperty(_lightPalette, Color.AccentSecondaryDisabled, '#F9FBFC'), _defineProperty(_lightPalette, Color.AccentStateless, 'rgba(104, 121, 235, 1)'), _defineProperty(_lightPalette, Color.AccentStateless_0_4_Opacity, 'rgba(104, 121, 235, 0.4)'), _defineProperty(_lightPalette, Color.Accent_0_5_Opacity, 'rgba(104, 121, 235, 0.05)'), _defineProperty(_lightPalette, Color.Accent_1_2_Opacity, 'rgba(104, 121, 235, 0.12)'), _defineProperty(_lightPalette, Color.Accent_1_8_Opacity, 'rgba(104, 121, 235, 0.18)'), _defineProperty(_lightPalette, Color.Accent_2_8_Opacity, 'rgba(104, 121, 235, 0.28)'), _defineProperty(_lightPalette, Color.Accent_4_0_Opacity, 'rgba(104, 121, 235, 0.4)'), _defineProperty(_lightPalette, Color.BackgroundGrey, 'rgba(216, 224, 232, 1)'), _defineProperty(_lightPalette, Color.BackgroundStateless, 'rgba(255, 255, 255, 1)'), _defineProperty(_lightPalette, Color.BackgroundActive, 'rgba(243, 247, 250, 1)'), _defineProperty(_lightPalette, Color.BackgroundBaseLight, 'rgba(235, 239, 252, 1)'), _defineProperty(_lightPalette, Color.BackgroundBaseMedium, 'rgba(227, 231, 251, 1)'), _defineProperty(_lightPalette, Color.BackgroundPrimary, 'rgba(248, 250, 251, 1)'), _defineProperty(_lightPalette, Color.BackgroundPrimaryLight, 'rgba(243, 245, 247, 1)'), _defineProperty(_lightPalette, Color.BackgroundPrimaryHover, 'rgba(239, 243, 246, 1)'), _defineProperty(_lightPalette, Color.BackgroundPrimaryActive, 'rgba(93, 109, 126, 1)'), _defineProperty(_lightPalette, Color.BackgroundPrimary_0_5_Opacity, 'rgba(255, 255, 255, 0.500)'), _defineProperty(_lightPalette, Color.BackgroundPrimaryStateless, '#CCD6DE'), _defineProperty(_lightPalette, Color.BackgroundSecondary, 'rgba(255, 255, 255, 1)'), _defineProperty(_lightPalette, Color.BackgroundHover, 'rgba(249, 251, 252, 1)'), _defineProperty(_lightPalette, Color.BackgroundGreen, 'rgba(237, 250, 244, 1)'), _defineProperty(_lightPalette, Color.BackgroundGreenMedium, 'rgba(227, 250, 239, 1)'), _defineProperty(_lightPalette, Color.BackgroundBlue, 'rgba(244, 249, 255, 1)'), _defineProperty(_lightPalette, Color.BackgroundRed, 'rgba(253, 244, 242, 1)'), _defineProperty(_lightPalette, Color.BackgroundRedMedium, 'rgba(247, 228, 230, 1)'), _defineProperty(_lightPalette, Color.BackgroundOrange, 'rgba(255, 249, 242, 1)'), _defineProperty(_lightPalette, Color.BackgroundTooltip, 'rgba(79, 98, 118, 1)'), _defineProperty(_lightPalette, Color.IconsPrimary, 'rgba(118, 138, 159, 1)'), _defineProperty(_lightPalette, Color.IconsPrimaryOpacity_0_6, 'rgba(93, 109, 126, 0.600)'), _defineProperty(_lightPalette, Color.IconsSecondary, 'rgba(151, 166, 182, 1)'), _defineProperty(_lightPalette, Color.IconsPlaceholder, 'rgba(223, 231, 237, 1)'), _defineProperty(_lightPalette, Color.IconsInvert, 'rgba(255, 255, 255, 1)'), _defineProperty(_lightPalette, Color.IconsMuted, 'rgba(169, 182, 194, 1)'), _defineProperty(_lightPalette, Color.IconsPrimaryHover, 'rgba(79, 98, 118, 1)'), _defineProperty(_lightPalette, Color.IconsSecondaryHover, 'rgba(118, 138, 159, 1)'), _defineProperty(_lightPalette, Color.ButtonPrimaryText, 'rgba(255, 255, 255, 1)'), _defineProperty(_lightPalette, Color.ButtonPrimaryText_0_6, 'rgba(255, 255, 255, 0.6)'), _defineProperty(_lightPalette, Color.ButtonPrimaryText_0_4, 'rgba(255, 255, 255, 0.4)'), _defineProperty(_lightPalette, Color.ButtonDisabledText, 'rgba(169, 182, 194, 1)'), _defineProperty(_lightPalette, Color.ButtonSecondaryText, 'rgba(0, 0, 0, 1)'), _defineProperty(_lightPalette, Color.LinkPrimary, 'rgba(118, 138, 159, 1)'), _defineProperty(_lightPalette, Color.LinkStateless, 'rgba(118, 138, 159, 1)'), _defineProperty(_lightPalette, Color.LinkHover, 'rgba(79, 98, 118, 1)'), _defineProperty(_lightPalette, Color.LinkActive, 'rgba(55, 65, 75, 1)'), _defineProperty(_lightPalette, Color.LinkPressed, 'rgba(104, 121, 235, 1)'), _defineProperty(_lightPalette, Color.LinkMuted, 'rgba(169, 182, 194, 1)'), _defineProperty(_lightPalette, Color.BordersPrimary, 'rgba(204, 214, 222, 1)'), _defineProperty(_lightPalette, Color.BordersPrimaryHover, 'rgba(104, 118, 134, 1)'), _defineProperty(_lightPalette, Color.BordersSecondary, 'rgba(236, 240, 243, 1)'), _defineProperty(_lightPalette, Color.BordersStrong, 'rgba(204, 214, 222, 1)'), _defineProperty(_lightPalette, Color.BordersInvert, 'rgba(85, 99, 115, 1)'), _defineProperty(_lightPalette, Color.BorderHoverBottom, 'rgba(104, 121, 235, 0.18)'), _defineProperty(_lightPalette, Color.BorderActiveBottom, '#4958BC'), _defineProperty(_lightPalette, Color.BorderPrimaryStateless, 'rgba(204, 214, 222, 1)'), _defineProperty(_lightPalette, Color.BordersDisabled, 'rgba(73, 88, 188, 0.4)'), _defineProperty(_lightPalette, Color.BordersButton, 'rgba(151, 166, 182, 1)'), _defineProperty(_lightPalette, Color.BordersItem, 'rgba(226, 232, 236, 1)'), _defineProperty(_lightPalette, Color.BordersBaseLight, 'rgba(211, 219, 250, 1)'), _defineProperty(_lightPalette, Color.BordersBaseMedium, 'rgba(164, 175, 227, 1)'), _defineProperty(_lightPalette, Color.BordersGreen, 'rgba(27, 161, 99, 0.22)'), _defineProperty(_lightPalette, Color.BordersGreenMedium, 'rgba(27, 161, 99, 0.4)'), _defineProperty(_lightPalette, Color.BordersRed, 'rgba(185, 33, 46, 0.4)'), _defineProperty(_lightPalette, Color.ActiveSecondary, '#FFFFFF'), _defineProperty(_lightPalette, Color.ActiveSecondaryHover, 'rgba(104, 121, 235, 0.05)'), _defineProperty(_lightPalette, Color.Error, 'rgba(246, 61, 61, 1)'), _defineProperty(_lightPalette, Color.Error_0_28_Opacity, 'rgba(185, 33, 46, 0.28)'), _defineProperty(_lightPalette, Color.Error_0_12_Opacity, 'rgba(255, 86, 78, 0.1)'), _defineProperty(_lightPalette, Color.ErrorHover, 'rgba(216, 46, 46, 1)'), _defineProperty(_lightPalette, Color.ErrorActive, 'rgba(185, 33, 46, 1)'), _defineProperty(_lightPalette, Color.Success, 'rgba(38, 193, 122, 1)'), _defineProperty(_lightPalette, Color.SuccessHover, 'rgba(30, 154, 98, 1)'), _defineProperty(_lightPalette, Color.SuccessActive, 'rgba(23, 116, 73, 1)'), _defineProperty(_lightPalette, Color.Warning, 'rgba(255, 172, 74, 1)'), _defineProperty(_lightPalette, Color.WarningHover, 'rgba(237, 145, 7, 1)'), _defineProperty(_lightPalette, Color.WarningActive, 'rgba(224, 135, 0, 1)'), _defineProperty(_lightPalette, Color.Info, 'rgba(41, 127, 184, 1)'), _defineProperty(_lightPalette, Color.Modified, 'rgba(165, 166, 246, 1)'), _defineProperty(_lightPalette, Color.Red, 'rgba(219, 46, 50, 1)'), _defineProperty(_lightPalette, Color.Orange, 'rgba(255, 168, 0, 1)'), _defineProperty(_lightPalette, Color.Salad, 'rgba(143, 176, 33, 1)'), _defineProperty(_lightPalette, Color.Green, 'rgba(22, 160, 134, 1)'), _defineProperty(_lightPalette, Color.Blue, 'rgba(41, 127, 184, 1)'), _defineProperty(_lightPalette, Color.Indigo, 'rgba(91, 72, 162, 1)'), _defineProperty(_lightPalette, Color.Violet, 'rgba(141, 68, 173, 1)'), _defineProperty(_lightPalette, Color.Pink, 'rgba(211, 92, 158, 1)'), _defineProperty(_lightPalette, Color.GradientRight, 'linear-gradient(270deg, #FFFFFF 1.56%, rgba(255, 255, 255, 0.89) 52.4%, rgba(255, 255, 255, 0.532165) 76.04%, rgba(255, 255, 255, 0) 100%)'), _defineProperty(_lightPalette, Color.Extra_0_3_Overlay, 'rgba(79, 98, 118, 0.3)'), _defineProperty(_lightPalette, Color.GradientRightActive, 'linear-gradient(270deg, #F3F7FA 1.56%, #F3F7FA 52.4%, rgba(243, 247, 250, 0.53) 76.04%, rgba(243, 247, 250, 0) 100%)'), _defineProperty(_lightPalette, Color.GradientRightHover, 'linear-gradient(270deg, #F9FBFC 1.56%, #F9FBFC 52.4%, rgba(249, 251, 252, 0.53) 76.04%, rgba(249, 251, 252, 0) 100%)'), _defineProperty(_lightPalette, Color.Extra_0_5_Overlay, 'rgba(79, 98, 118, 0.5)'), _defineProperty(_lightPalette, Color.Extra_0_7_Overlay, 'rgba(79, 98, 118, 0.7)'), _defineProperty(_lightPalette, Color.Extra_0_9_Overlay, 'rgba(79, 98, 118, 0.9)'), _defineProperty(_lightPalette, Color.Red_0_1_Overlay, 'rgba(232, 91, 70, 0.1)'), _defineProperty(_lightPalette, Color.Orange_0_1_Overlay, 'rgba(250, 157, 47, 0.1)'), _defineProperty(_lightPalette, Color.Accent_0_8_Overlay, 'rgba(104, 121, 235, 0.08)'), _defineProperty(_lightPalette, Color.Link, 'rgba(250, 166, 68, 1)'), _defineProperty(_lightPalette, Color.Camera, 'rgba(73, 186, 224, 1)'), _defineProperty(_lightPalette, Color.GoogleDrive, 'rgba(81, 136, 238, 1)'), _defineProperty(_lightPalette, Color.Dropbox, 'rgba(17, 40, 124, 1)'), _defineProperty(_lightPalette, Color.OneDrive, 'rgba(40, 100, 186, 1)'), _defineProperty(_lightPalette, Color.Device, 'rgba(102, 73, 209, 1)'), _defineProperty(_lightPalette, Color.Instagram, 'rgba(173, 38, 220, 1)'), _defineProperty(_lightPalette, Color.FreeImages, 'rgba(16, 163, 135, 1)'), _defineProperty(_lightPalette, Color.FreeIcons, 'rgba(62, 207, 139, 1)'), _defineProperty(_lightPalette, Color.Canvas, 'rgba(36, 190, 202, 1)'), _defineProperty(_lightPalette, Color.Box, 'rgba(0, 97, 213, 1)'), _defineProperty(_lightPalette, Color.ScreenCast, 'rgba(48, 61, 78, 1)'), _defineProperty(_lightPalette, Color.Tag, '#889AAC'), _defineProperty(_lightPalette, Color.StatesErrorDisabledText, 'rgba(185, 33, 46, 0.3)'), _defineProperty(_lightPalette, Color.LightShadow, 'rgba(146, 166, 188, 0.2)'), _defineProperty(_lightPalette, Color.MediumShadow, 'rgba(146, 166, 188, 0.24)'), _defineProperty(_lightPalette, Color.LargeShadow, 'rgba(146, 166, 188, 0.32)'), _defineProperty(_lightPalette, Color.XLargeShadow, 'rgba(146, 166, 188, 0.5)'), _lightPalette);\nexport var defaultPalette = lightPalette;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _shadows;\nimport { Shadows } from '../../../../utils/types/shadows';\nexport var shadows = (_shadows = {}, _defineProperty(_shadows, Shadows.ShadowSm, '0px 1px 2px 0px rgba(146, 166, 188, 0.2)'), _defineProperty(_shadows, Shadows.ShadowMd, ' 0px 1px 4px 0px rgba(146, 166, 188, 0.24)'), _defineProperty(_shadows, Shadows.ShadowLg, ' 0px 2px 6px 0px rgba(146, 166, 188, 0.32)'), _defineProperty(_shadows, Shadows.ShadowXl, ' 0px 2px 6px 0px rgba(146, 166, 188, 0.5)'), _defineProperty(_shadows, Shadows.Label, ' 0px 1px 3px 0px rgba(77, 78, 78, 0.15)'), _defineProperty(_shadows, Shadows.Header, ' 0px 6px 10px 0px rgba(146, 166, 188, 0.2)'), _defineProperty(_shadows, Shadows.HeaderPopup, ' 0px 3px 7px 0px rgba(146, 166, 188, 0.16)'), _defineProperty(_shadows, Shadows.FooterPopup, ' 0px -4px 8px 0px rgba(208, 215, 220, 0.22)'), _defineProperty(_shadows, Shadows.LeftPanelMd, ' 6px 8px 12px 0px rgba(146, 166, 188, 0.14)'), _defineProperty(_shadows, Shadows.RightPanelMd, '-6px 8px 12px 0px rgba(146, 166, 188, 0.14)'), _defineProperty(_shadows, Shadows.LeftPanelSm, '6px -4px 12px 0px rgba(146, 166, 188, 0.14)'), _defineProperty(_shadows, Shadows.RightPanelSm, '-6px -4px 12px 0px rgba(146, 166, 188, 0.14)'), _shadows);\nexport var defaultShadows = shadows;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _values, _classes;\nimport { Breakpoint } from '../../../../utils/types/css';\nexport var defaultBreakpoints = {\n keys: [Breakpoint.Xs, Breakpoint.Sm, Breakpoint.Md, Breakpoint.Lg, Breakpoint.Xl],\n values: (_values = {}, _defineProperty(_values, Breakpoint.Xs, 0), _defineProperty(_values, Breakpoint.Sm, 576), _defineProperty(_values, Breakpoint.Md, 768), _defineProperty(_values, Breakpoint.Lg, 1084), _defineProperty(_values, Breakpoint.Xl, 1342), _defineProperty(_values, Breakpoint.Xxl, 1600), _defineProperty(_values, Breakpoint.Xxxl, 1920), _values),\n classes: (_classes = {}, _defineProperty(_classes, Breakpoint.Xs, '.sfx-breakpoint-xs'), _defineProperty(_classes, Breakpoint.Sm, '.sfx-breakpoint-sm'), _defineProperty(_classes, Breakpoint.Md, '.sfx-breakpoint-md'), _defineProperty(_classes, Breakpoint.Lg, '.sfx-breakpoint-lg'), _defineProperty(_classes, Breakpoint.Xl, '.sfx-breakpoint-xl'), _defineProperty(_classes, Breakpoint.Xxl, '.sfx-breakpoint-xxl'), _defineProperty(_classes, Breakpoint.Xxxl, '.sfx-breakpoint-xxxl'), _classes),\n getBreakpointClass: function getBreakpointClass() {\n return '';\n },\n up: function up() {\n return '';\n },\n down: function down() {\n return '';\n },\n between: function between() {\n return '';\n },\n only: function only() {\n return '';\n }\n};","import { defaultBreakpoints } from './default-breakpoints';\nvar createBreakpoints = function createBreakpoints(breakpoints) {\n var _breakpoints$values = breakpoints.values,\n values = _breakpoints$values === void 0 ? defaultBreakpoints.values : _breakpoints$values,\n _breakpoints$classes = breakpoints.classes,\n classes = _breakpoints$classes === void 0 ? defaultBreakpoints.classes : _breakpoints$classes;\n var unit = 'px';\n var keys = Object.keys(values);\n var up = function up(key) {\n var value = typeof values[key] === 'number' ? values[key] : key;\n return \"@media (min-width:\".concat(value).concat(unit, \")\");\n };\n var down = function down(key) {\n var value = values[key];\n return \"@media (max-width:\".concat(value).concat(unit, \")\");\n };\n var between = function between(start, end) {\n var endIndex = keys.indexOf(end);\n return \"@media (min-width:\".concat(values[start]).concat(unit, \") and (max-width:\").concat(values[keys[endIndex]]).concat(unit, \")\");\n };\n var only = function only(key) {\n if (keys.indexOf(key) + 1 < keys.length) {\n return between(key, keys[keys.indexOf(key) + 1]);\n }\n return up(key);\n };\n var getBreakpointClass = function getBreakpointClass(width, hideSelector) {\n var removeSelector = function removeSelector(str) {\n return str.slice(1);\n };\n if (width >= values.xs && width < values.sm) {\n return hideSelector ? removeSelector(classes.xs) : classes.xs;\n }\n if (width >= values.sm && width < values.md) {\n return hideSelector ? removeSelector(classes.sm) : classes.sm;\n }\n if (width >= values.md && width < values.lg) {\n return hideSelector ? removeSelector(classes.md) : classes.md;\n }\n if (width >= values.lg && width < values.xl) {\n return hideSelector ? removeSelector(classes.lg) : classes.lg;\n }\n if (width >= values.xl && width < values.xxl) {\n return hideSelector ? removeSelector(classes.xl) : classes.xl;\n }\n if (width >= values.xxl && width < values.xxxl) {\n return hideSelector ? removeSelector(classes.xxl) : classes.xxl;\n }\n if (width >= values.xxxl) {\n return hideSelector ? removeSelector(classes.xxxl) : classes.xxxl;\n }\n return hideSelector ? removeSelector(classes.md) : classes.md;\n };\n return {\n keys: keys,\n values: values,\n classes: classes,\n getBreakpointClass: getBreakpointClass,\n up: up,\n down: down,\n between: between,\n only: only\n };\n};\nexport default createBreakpoints;","import _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _borderRadius;\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport React, { useMemo } from 'react';\nimport PT from 'prop-types';\nimport { ThemeProvider as SCThemeProvider } from 'styled-components';\nimport merge from 'lodash.merge';\nimport { record } from '../../utils/types/prop-types';\nimport { applyPolymorphicFunctionProp, objectKeys, objectValues } from '../../utils/functions';\nimport { Breakpoint } from '../../utils/types/css';\nimport { Color } from '../../utils/types/palette';\nimport { Shadows } from '../../utils/types/shadows';\nimport { FontVariant } from '../../utils/types/typography';\nimport { BorderRadiusSize } from '../../utils/types/shape';\nimport { Typography, CommonStyles } from '../roots';\nimport { defaultPalette } from '../roots/palette';\nimport { defaultShadows } from '../roots/shadows';\nimport { defaultTypography } from '../roots/typography';\nimport createBreakpoints from '../roots/breakpoints/entity/create-breakpoints';\nvar defaultShape = {\n borderRadius: (_borderRadius = {}, _defineProperty(_borderRadius, BorderRadiusSize.Sm, '2px'), _defineProperty(_borderRadius, BorderRadiusSize.Md, '4px'), _defineProperty(_borderRadius, BorderRadiusSize.Lg, '8px'), _borderRadius)\n};\nvar ThemeProvider = function ThemeProvider(_ref) {\n var children = _ref.children,\n _ref$theme = _ref.theme,\n theme = _ref$theme === void 0 ? {} : _ref$theme;\n var _theme$palette = theme.palette,\n paletteOverride = _theme$palette === void 0 ? {} : _theme$palette,\n _theme$breakpoints = theme.breakpoints,\n breakpointsOverride = _theme$breakpoints === void 0 ? {} : _theme$breakpoints,\n _theme$typography = theme.typography,\n typographyOverride = _theme$typography === void 0 ? {} : _theme$typography,\n _theme$shape = theme.shape,\n shapeOverride = _theme$shape === void 0 ? {} : _theme$shape,\n _theme$shadows = theme.shadows,\n shadowsOverride = _theme$shadows === void 0 ? {} : _theme$shadows;\n var finalTheme = useMemo(function () {\n var palette = _objectSpread(_objectSpread({}, defaultPalette), paletteOverride);\n var breakpoints = createBreakpoints(breakpointsOverride);\n var shadows = _objectSpread(_objectSpread({}, defaultShadows), shadowsOverride);\n return {\n palette: palette,\n breakpoints: breakpoints,\n typography: _objectSpread({}, merge(_objectSpread({}, defaultTypography), _objectSpread({}, typographyOverride))),\n shape: _objectSpread({}, merge(_objectSpread({}, defaultShape), _objectSpread({}, shapeOverride))),\n shadows: shadows\n };\n return {};\n }, [JSON.stringify(theme)]);\n return /*#__PURE__*/React.createElement(SCThemeProvider, {\n theme: finalTheme\n }, /*#__PURE__*/React.createElement(React.Fragment, null, applyPolymorphicFunctionProp(children, finalTheme), /*#__PURE__*/React.createElement(CommonStyles, null), /*#__PURE__*/React.createElement(Typography, null)));\n};\nvar baseLineHeight = defaultTypography.baseLineHeight,\n font = defaultTypography.font,\n typography = _objectWithoutProperties(defaultTypography, [\"baseLineHeight\", \"font\"]);\nThemeProvider.propTypes = {\n children: PT.oneOfType([PT.node, PT.func, PT.arrayOf(PT.node)]).isRequired,\n theme: PT.exact({\n breakpoints: PT.exact({\n keys: PT.arrayOf(PT.string),\n values: PT.exact(record(objectValues(Breakpoint), PT.number)),\n classes: PT.exact(record(objectValues(Breakpoint), PT.string)),\n getBreakpointClass: PT.func,\n up: PT.func,\n down: PT.func,\n between: PT.func,\n only: PT.func\n }),\n palette: PT.exact(record(objectValues(Color), PT.string)),\n shadows: PT.exact(record(objectValues(Shadows), PT.string)),\n shape: PT.exact({\n borderRadius: PT.exact(record(objectValues(BorderRadiusSize), PT.string))\n }),\n typography: PT.exact(_objectSpread({\n baseLineHeight: PT.oneOfType([PT.string, PT.number]),\n font: PT.exact(record(objectValues(FontVariant), PT.object))\n }, record(objectKeys(typography), PT.string)))\n })\n};\nexport default ThemeProvider;","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","var PI_OVER_180 = Math.PI / 180;\nfunction detectBrowser() {\n return (typeof window !== 'undefined' &&\n ({}.toString.call(window) === '[object Window]' ||\n {}.toString.call(window) === '[object global]'));\n}\nexport const glob = typeof global !== 'undefined'\n ? global\n : typeof window !== 'undefined'\n ? window\n : typeof WorkerGlobalScope !== 'undefined'\n ? self\n : {};\nexport const Konva = {\n _global: glob,\n version: '8.4.3',\n isBrowser: detectBrowser(),\n isUnminified: /param/.test(function (param) { }.toString()),\n dblClickWindow: 400,\n getAngle(angle) {\n return Konva.angleDeg ? angle * PI_OVER_180 : angle;\n },\n enableTrace: false,\n pointerEventsEnabled: true,\n autoDrawEnabled: true,\n hitOnDragEnabled: false,\n capturePointerEventsEnabled: false,\n _mouseListenClick: false,\n _touchListenClick: false,\n _pointerListenClick: false,\n _mouseInDblClickWindow: false,\n _touchInDblClickWindow: false,\n _pointerInDblClickWindow: false,\n _mouseDblClickPointerId: null,\n _touchDblClickPointerId: null,\n _pointerDblClickPointerId: null,\n pixelRatio: (typeof window !== 'undefined' && window.devicePixelRatio) || 1,\n dragDistance: 3,\n angleDeg: true,\n showWarnings: true,\n dragButtons: [0, 1],\n isDragging() {\n return Konva['DD'].isDragging;\n },\n isDragReady() {\n return !!Konva['DD'].node;\n },\n releaseCanvasOnDestroy: true,\n document: glob.document,\n _injectGlobal(Konva) {\n glob.Konva = Konva;\n },\n};\nexport const _registerNode = (NodeClass) => {\n Konva[NodeClass.prototype.getClassName()] = NodeClass;\n};\nKonva._injectGlobal(Konva);\n","import { Konva } from './Global.js';\nexport class Transform {\n constructor(m = [1, 0, 0, 1, 0, 0]) {\n this.dirty = false;\n this.m = (m && m.slice()) || [1, 0, 0, 1, 0, 0];\n }\n reset() {\n this.m[0] = 1;\n this.m[1] = 0;\n this.m[2] = 0;\n this.m[3] = 1;\n this.m[4] = 0;\n this.m[5] = 0;\n }\n copy() {\n return new Transform(this.m);\n }\n copyInto(tr) {\n tr.m[0] = this.m[0];\n tr.m[1] = this.m[1];\n tr.m[2] = this.m[2];\n tr.m[3] = this.m[3];\n tr.m[4] = this.m[4];\n tr.m[5] = this.m[5];\n }\n point(point) {\n var m = this.m;\n return {\n x: m[0] * point.x + m[2] * point.y + m[4],\n y: m[1] * point.x + m[3] * point.y + m[5],\n };\n }\n translate(x, y) {\n this.m[4] += this.m[0] * x + this.m[2] * y;\n this.m[5] += this.m[1] * x + this.m[3] * y;\n return this;\n }\n scale(sx, sy) {\n this.m[0] *= sx;\n this.m[1] *= sx;\n this.m[2] *= sy;\n this.m[3] *= sy;\n return this;\n }\n rotate(rad) {\n var c = Math.cos(rad);\n var s = Math.sin(rad);\n var m11 = this.m[0] * c + this.m[2] * s;\n var m12 = this.m[1] * c + this.m[3] * s;\n var m21 = this.m[0] * -s + this.m[2] * c;\n var m22 = this.m[1] * -s + this.m[3] * c;\n this.m[0] = m11;\n this.m[1] = m12;\n this.m[2] = m21;\n this.m[3] = m22;\n return this;\n }\n getTranslation() {\n return {\n x: this.m[4],\n y: this.m[5],\n };\n }\n skew(sx, sy) {\n var m11 = this.m[0] + this.m[2] * sy;\n var m12 = this.m[1] + this.m[3] * sy;\n var m21 = this.m[2] + this.m[0] * sx;\n var m22 = this.m[3] + this.m[1] * sx;\n this.m[0] = m11;\n this.m[1] = m12;\n this.m[2] = m21;\n this.m[3] = m22;\n return this;\n }\n multiply(matrix) {\n var m11 = this.m[0] * matrix.m[0] + this.m[2] * matrix.m[1];\n var m12 = this.m[1] * matrix.m[0] + this.m[3] * matrix.m[1];\n var m21 = this.m[0] * matrix.m[2] + this.m[2] * matrix.m[3];\n var m22 = this.m[1] * matrix.m[2] + this.m[3] * matrix.m[3];\n var dx = this.m[0] * matrix.m[4] + this.m[2] * matrix.m[5] + this.m[4];\n var dy = this.m[1] * matrix.m[4] + this.m[3] * matrix.m[5] + this.m[5];\n this.m[0] = m11;\n this.m[1] = m12;\n this.m[2] = m21;\n this.m[3] = m22;\n this.m[4] = dx;\n this.m[5] = dy;\n return this;\n }\n invert() {\n var d = 1 / (this.m[0] * this.m[3] - this.m[1] * this.m[2]);\n var m0 = this.m[3] * d;\n var m1 = -this.m[1] * d;\n var m2 = -this.m[2] * d;\n var m3 = this.m[0] * d;\n var m4 = d * (this.m[2] * this.m[5] - this.m[3] * this.m[4]);\n var m5 = d * (this.m[1] * this.m[4] - this.m[0] * this.m[5]);\n this.m[0] = m0;\n this.m[1] = m1;\n this.m[2] = m2;\n this.m[3] = m3;\n this.m[4] = m4;\n this.m[5] = m5;\n return this;\n }\n getMatrix() {\n return this.m;\n }\n decompose() {\n var a = this.m[0];\n var b = this.m[1];\n var c = this.m[2];\n var d = this.m[3];\n var e = this.m[4];\n var f = this.m[5];\n var delta = a * d - b * c;\n let result = {\n x: e,\n y: f,\n rotation: 0,\n scaleX: 0,\n scaleY: 0,\n skewX: 0,\n skewY: 0,\n };\n if (a != 0 || b != 0) {\n var r = Math.sqrt(a * a + b * b);\n result.rotation = b > 0 ? Math.acos(a / r) : -Math.acos(a / r);\n result.scaleX = r;\n result.scaleY = delta / r;\n result.skewX = (a * c + b * d) / delta;\n result.skewY = 0;\n }\n else if (c != 0 || d != 0) {\n var s = Math.sqrt(c * c + d * d);\n result.rotation =\n Math.PI / 2 - (d > 0 ? Math.acos(-c / s) : -Math.acos(c / s));\n result.scaleX = delta / s;\n result.scaleY = s;\n result.skewX = 0;\n result.skewY = (a * c + b * d) / delta;\n }\n else {\n }\n result.rotation = Util._getRotation(result.rotation);\n return result;\n }\n}\nvar OBJECT_ARRAY = '[object Array]', OBJECT_NUMBER = '[object Number]', OBJECT_STRING = '[object String]', OBJECT_BOOLEAN = '[object Boolean]', PI_OVER_DEG180 = Math.PI / 180, DEG180_OVER_PI = 180 / Math.PI, HASH = '#', EMPTY_STRING = '', ZERO = '0', KONVA_WARNING = 'Konva warning: ', KONVA_ERROR = 'Konva error: ', RGB_PAREN = 'rgb(', COLORS = {\n aliceblue: [240, 248, 255],\n antiquewhite: [250, 235, 215],\n aqua: [0, 255, 255],\n aquamarine: [127, 255, 212],\n azure: [240, 255, 255],\n beige: [245, 245, 220],\n bisque: [255, 228, 196],\n black: [0, 0, 0],\n blanchedalmond: [255, 235, 205],\n blue: [0, 0, 255],\n blueviolet: [138, 43, 226],\n brown: [165, 42, 42],\n burlywood: [222, 184, 135],\n cadetblue: [95, 158, 160],\n chartreuse: [127, 255, 0],\n chocolate: [210, 105, 30],\n coral: [255, 127, 80],\n cornflowerblue: [100, 149, 237],\n cornsilk: [255, 248, 220],\n crimson: [220, 20, 60],\n cyan: [0, 255, 255],\n darkblue: [0, 0, 139],\n darkcyan: [0, 139, 139],\n darkgoldenrod: [184, 132, 11],\n darkgray: [169, 169, 169],\n darkgreen: [0, 100, 0],\n darkgrey: [169, 169, 169],\n darkkhaki: [189, 183, 107],\n darkmagenta: [139, 0, 139],\n darkolivegreen: [85, 107, 47],\n darkorange: [255, 140, 0],\n darkorchid: [153, 50, 204],\n darkred: [139, 0, 0],\n darksalmon: [233, 150, 122],\n darkseagreen: [143, 188, 143],\n darkslateblue: [72, 61, 139],\n darkslategray: [47, 79, 79],\n darkslategrey: [47, 79, 79],\n darkturquoise: [0, 206, 209],\n darkviolet: [148, 0, 211],\n deeppink: [255, 20, 147],\n deepskyblue: [0, 191, 255],\n dimgray: [105, 105, 105],\n dimgrey: [105, 105, 105],\n dodgerblue: [30, 144, 255],\n firebrick: [178, 34, 34],\n floralwhite: [255, 255, 240],\n forestgreen: [34, 139, 34],\n fuchsia: [255, 0, 255],\n gainsboro: [220, 220, 220],\n ghostwhite: [248, 248, 255],\n gold: [255, 215, 0],\n goldenrod: [218, 165, 32],\n gray: [128, 128, 128],\n green: [0, 128, 0],\n greenyellow: [173, 255, 47],\n grey: [128, 128, 128],\n honeydew: [240, 255, 240],\n hotpink: [255, 105, 180],\n indianred: [205, 92, 92],\n indigo: [75, 0, 130],\n ivory: [255, 255, 240],\n khaki: [240, 230, 140],\n lavender: [230, 230, 250],\n lavenderblush: [255, 240, 245],\n lawngreen: [124, 252, 0],\n lemonchiffon: [255, 250, 205],\n lightblue: [173, 216, 230],\n lightcoral: [240, 128, 128],\n lightcyan: [224, 255, 255],\n lightgoldenrodyellow: [250, 250, 210],\n lightgray: [211, 211, 211],\n lightgreen: [144, 238, 144],\n lightgrey: [211, 211, 211],\n lightpink: [255, 182, 193],\n lightsalmon: [255, 160, 122],\n lightseagreen: [32, 178, 170],\n lightskyblue: [135, 206, 250],\n lightslategray: [119, 136, 153],\n lightslategrey: [119, 136, 153],\n lightsteelblue: [176, 196, 222],\n lightyellow: [255, 255, 224],\n lime: [0, 255, 0],\n limegreen: [50, 205, 50],\n linen: [250, 240, 230],\n magenta: [255, 0, 255],\n maroon: [128, 0, 0],\n mediumaquamarine: [102, 205, 170],\n mediumblue: [0, 0, 205],\n mediumorchid: [186, 85, 211],\n mediumpurple: [147, 112, 219],\n mediumseagreen: [60, 179, 113],\n mediumslateblue: [123, 104, 238],\n mediumspringgreen: [0, 250, 154],\n mediumturquoise: [72, 209, 204],\n mediumvioletred: [199, 21, 133],\n midnightblue: [25, 25, 112],\n mintcream: [245, 255, 250],\n mistyrose: [255, 228, 225],\n moccasin: [255, 228, 181],\n navajowhite: [255, 222, 173],\n navy: [0, 0, 128],\n oldlace: [253, 245, 230],\n olive: [128, 128, 0],\n olivedrab: [107, 142, 35],\n orange: [255, 165, 0],\n orangered: [255, 69, 0],\n orchid: [218, 112, 214],\n palegoldenrod: [238, 232, 170],\n palegreen: [152, 251, 152],\n paleturquoise: [175, 238, 238],\n palevioletred: [219, 112, 147],\n papayawhip: [255, 239, 213],\n peachpuff: [255, 218, 185],\n peru: [205, 133, 63],\n pink: [255, 192, 203],\n plum: [221, 160, 203],\n powderblue: [176, 224, 230],\n purple: [128, 0, 128],\n rebeccapurple: [102, 51, 153],\n red: [255, 0, 0],\n rosybrown: [188, 143, 143],\n royalblue: [65, 105, 225],\n saddlebrown: [139, 69, 19],\n salmon: [250, 128, 114],\n sandybrown: [244, 164, 96],\n seagreen: [46, 139, 87],\n seashell: [255, 245, 238],\n sienna: [160, 82, 45],\n silver: [192, 192, 192],\n skyblue: [135, 206, 235],\n slateblue: [106, 90, 205],\n slategray: [119, 128, 144],\n slategrey: [119, 128, 144],\n snow: [255, 255, 250],\n springgreen: [0, 255, 127],\n steelblue: [70, 130, 180],\n tan: [210, 180, 140],\n teal: [0, 128, 128],\n thistle: [216, 191, 216],\n transparent: [255, 255, 255, 0],\n tomato: [255, 99, 71],\n turquoise: [64, 224, 208],\n violet: [238, 130, 238],\n wheat: [245, 222, 179],\n white: [255, 255, 255],\n whitesmoke: [245, 245, 245],\n yellow: [255, 255, 0],\n yellowgreen: [154, 205, 5],\n}, RGB_REGEX = /rgb\\((\\d{1,3}),(\\d{1,3}),(\\d{1,3})\\)/, animQueue = [];\nconst req = (typeof requestAnimationFrame !== 'undefined' && requestAnimationFrame) ||\n function (f) {\n setTimeout(f, 60);\n };\nexport const Util = {\n _isElement(obj) {\n return !!(obj && obj.nodeType == 1);\n },\n _isFunction(obj) {\n return !!(obj && obj.constructor && obj.call && obj.apply);\n },\n _isPlainObject(obj) {\n return !!obj && obj.constructor === Object;\n },\n _isArray(obj) {\n return Object.prototype.toString.call(obj) === OBJECT_ARRAY;\n },\n _isNumber(obj) {\n return (Object.prototype.toString.call(obj) === OBJECT_NUMBER &&\n !isNaN(obj) &&\n isFinite(obj));\n },\n _isString(obj) {\n return Object.prototype.toString.call(obj) === OBJECT_STRING;\n },\n _isBoolean(obj) {\n return Object.prototype.toString.call(obj) === OBJECT_BOOLEAN;\n },\n isObject(val) {\n return val instanceof Object;\n },\n isValidSelector(selector) {\n if (typeof selector !== 'string') {\n return false;\n }\n var firstChar = selector[0];\n return (firstChar === '#' ||\n firstChar === '.' ||\n firstChar === firstChar.toUpperCase());\n },\n _sign(number) {\n if (number === 0) {\n return 1;\n }\n if (number > 0) {\n return 1;\n }\n else {\n return -1;\n }\n },\n requestAnimFrame(callback) {\n animQueue.push(callback);\n if (animQueue.length === 1) {\n req(function () {\n const queue = animQueue;\n animQueue = [];\n queue.forEach(function (cb) {\n cb();\n });\n });\n }\n },\n createCanvasElement() {\n var canvas = document.createElement('canvas');\n try {\n canvas.style = canvas.style || {};\n }\n catch (e) { }\n return canvas;\n },\n createImageElement() {\n return document.createElement('img');\n },\n _isInDocument(el) {\n while ((el = el.parentNode)) {\n if (el == document) {\n return true;\n }\n }\n return false;\n },\n _urlToImage(url, callback) {\n var imageObj = Util.createImageElement();\n imageObj.onload = function () {\n callback(imageObj);\n };\n imageObj.src = url;\n },\n _rgbToHex(r, g, b) {\n return ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);\n },\n _hexToRgb(hex) {\n hex = hex.replace(HASH, EMPTY_STRING);\n var bigint = parseInt(hex, 16);\n return {\n r: (bigint >> 16) & 255,\n g: (bigint >> 8) & 255,\n b: bigint & 255,\n };\n },\n getRandomColor() {\n var randColor = ((Math.random() * 0xffffff) << 0).toString(16);\n while (randColor.length < 6) {\n randColor = ZERO + randColor;\n }\n return HASH + randColor;\n },\n getRGB(color) {\n var rgb;\n if (color in COLORS) {\n rgb = COLORS[color];\n return {\n r: rgb[0],\n g: rgb[1],\n b: rgb[2],\n };\n }\n else if (color[0] === HASH) {\n return this._hexToRgb(color.substring(1));\n }\n else if (color.substr(0, 4) === RGB_PAREN) {\n rgb = RGB_REGEX.exec(color.replace(/ /g, ''));\n return {\n r: parseInt(rgb[1], 10),\n g: parseInt(rgb[2], 10),\n b: parseInt(rgb[3], 10),\n };\n }\n else {\n return {\n r: 0,\n g: 0,\n b: 0,\n };\n }\n },\n colorToRGBA(str) {\n str = str || 'black';\n return (Util._namedColorToRBA(str) ||\n Util._hex3ColorToRGBA(str) ||\n Util._hex4ColorToRGBA(str) ||\n Util._hex6ColorToRGBA(str) ||\n Util._hex8ColorToRGBA(str) ||\n Util._rgbColorToRGBA(str) ||\n Util._rgbaColorToRGBA(str) ||\n Util._hslColorToRGBA(str));\n },\n _namedColorToRBA(str) {\n var c = COLORS[str.toLowerCase()];\n if (!c) {\n return null;\n }\n return {\n r: c[0],\n g: c[1],\n b: c[2],\n a: 1,\n };\n },\n _rgbColorToRGBA(str) {\n if (str.indexOf('rgb(') === 0) {\n str = str.match(/rgb\\(([^)]+)\\)/)[1];\n var parts = str.split(/ *, */).map(Number);\n return {\n r: parts[0],\n g: parts[1],\n b: parts[2],\n a: 1,\n };\n }\n },\n _rgbaColorToRGBA(str) {\n if (str.indexOf('rgba(') === 0) {\n str = str.match(/rgba\\(([^)]+)\\)/)[1];\n var parts = str.split(/ *, */).map((n, index) => {\n if (n.slice(-1) === '%') {\n return index === 3 ? parseInt(n) / 100 : (parseInt(n) / 100) * 255;\n }\n return Number(n);\n });\n return {\n r: parts[0],\n g: parts[1],\n b: parts[2],\n a: parts[3],\n };\n }\n },\n _hex8ColorToRGBA(str) {\n if (str[0] === '#' && str.length === 9) {\n return {\n r: parseInt(str.slice(1, 3), 16),\n g: parseInt(str.slice(3, 5), 16),\n b: parseInt(str.slice(5, 7), 16),\n a: parseInt(str.slice(7, 9), 16) / 0xff,\n };\n }\n },\n _hex6ColorToRGBA(str) {\n if (str[0] === '#' && str.length === 7) {\n return {\n r: parseInt(str.slice(1, 3), 16),\n g: parseInt(str.slice(3, 5), 16),\n b: parseInt(str.slice(5, 7), 16),\n a: 1,\n };\n }\n },\n _hex4ColorToRGBA(str) {\n if (str[0] === '#' && str.length === 5) {\n return {\n r: parseInt(str[1] + str[1], 16),\n g: parseInt(str[2] + str[2], 16),\n b: parseInt(str[3] + str[3], 16),\n a: parseInt(str[4] + str[4], 16) / 0xff,\n };\n }\n },\n _hex3ColorToRGBA(str) {\n if (str[0] === '#' && str.length === 4) {\n return {\n r: parseInt(str[1] + str[1], 16),\n g: parseInt(str[2] + str[2], 16),\n b: parseInt(str[3] + str[3], 16),\n a: 1,\n };\n }\n },\n _hslColorToRGBA(str) {\n if (/hsl\\((\\d+),\\s*([\\d.]+)%,\\s*([\\d.]+)%\\)/g.test(str)) {\n const [_, ...hsl] = /hsl\\((\\d+),\\s*([\\d.]+)%,\\s*([\\d.]+)%\\)/g.exec(str);\n const h = Number(hsl[0]) / 360;\n const s = Number(hsl[1]) / 100;\n const l = Number(hsl[2]) / 100;\n let t2;\n let t3;\n let val;\n if (s === 0) {\n val = l * 255;\n return {\n r: Math.round(val),\n g: Math.round(val),\n b: Math.round(val),\n a: 1,\n };\n }\n if (l < 0.5) {\n t2 = l * (1 + s);\n }\n else {\n t2 = l + s - l * s;\n }\n const t1 = 2 * l - t2;\n const rgb = [0, 0, 0];\n for (let i = 0; i < 3; i++) {\n t3 = h + (1 / 3) * -(i - 1);\n if (t3 < 0) {\n t3++;\n }\n if (t3 > 1) {\n t3--;\n }\n if (6 * t3 < 1) {\n val = t1 + (t2 - t1) * 6 * t3;\n }\n else if (2 * t3 < 1) {\n val = t2;\n }\n else if (3 * t3 < 2) {\n val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n }\n else {\n val = t1;\n }\n rgb[i] = val * 255;\n }\n return {\n r: Math.round(rgb[0]),\n g: Math.round(rgb[1]),\n b: Math.round(rgb[2]),\n a: 1,\n };\n }\n },\n haveIntersection(r1, r2) {\n return !(r2.x > r1.x + r1.width ||\n r2.x + r2.width < r1.x ||\n r2.y > r1.y + r1.height ||\n r2.y + r2.height < r1.y);\n },\n cloneObject(obj) {\n var retObj = {};\n for (var key in obj) {\n if (this._isPlainObject(obj[key])) {\n retObj[key] = this.cloneObject(obj[key]);\n }\n else if (this._isArray(obj[key])) {\n retObj[key] = this.cloneArray(obj[key]);\n }\n else {\n retObj[key] = obj[key];\n }\n }\n return retObj;\n },\n cloneArray(arr) {\n return arr.slice(0);\n },\n degToRad(deg) {\n return deg * PI_OVER_DEG180;\n },\n radToDeg(rad) {\n return rad * DEG180_OVER_PI;\n },\n _degToRad(deg) {\n Util.warn('Util._degToRad is removed. Please use public Util.degToRad instead.');\n return Util.degToRad(deg);\n },\n _radToDeg(rad) {\n Util.warn('Util._radToDeg is removed. Please use public Util.radToDeg instead.');\n return Util.radToDeg(rad);\n },\n _getRotation(radians) {\n return Konva.angleDeg ? Util.radToDeg(radians) : radians;\n },\n _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.slice(1);\n },\n throw(str) {\n throw new Error(KONVA_ERROR + str);\n },\n error(str) {\n console.error(KONVA_ERROR + str);\n },\n warn(str) {\n if (!Konva.showWarnings) {\n return;\n }\n console.warn(KONVA_WARNING + str);\n },\n each(obj, func) {\n for (var key in obj) {\n func(key, obj[key]);\n }\n },\n _inRange(val, left, right) {\n return left <= val && val < right;\n },\n _getProjectionToSegment(x1, y1, x2, y2, x3, y3) {\n var x, y, dist;\n var pd2 = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);\n if (pd2 == 0) {\n x = x1;\n y = y1;\n dist = (x3 - x2) * (x3 - x2) + (y3 - y2) * (y3 - y2);\n }\n else {\n var u = ((x3 - x1) * (x2 - x1) + (y3 - y1) * (y2 - y1)) / pd2;\n if (u < 0) {\n x = x1;\n y = y1;\n dist = (x1 - x3) * (x1 - x3) + (y1 - y3) * (y1 - y3);\n }\n else if (u > 1.0) {\n x = x2;\n y = y2;\n dist = (x2 - x3) * (x2 - x3) + (y2 - y3) * (y2 - y3);\n }\n else {\n x = x1 + u * (x2 - x1);\n y = y1 + u * (y2 - y1);\n dist = (x - x3) * (x - x3) + (y - y3) * (y - y3);\n }\n }\n return [x, y, dist];\n },\n _getProjectionToLine(pt, line, isClosed) {\n var pc = Util.cloneObject(pt);\n var dist = Number.MAX_VALUE;\n line.forEach(function (p1, i) {\n if (!isClosed && i === line.length - 1) {\n return;\n }\n var p2 = line[(i + 1) % line.length];\n var proj = Util._getProjectionToSegment(p1.x, p1.y, p2.x, p2.y, pt.x, pt.y);\n var px = proj[0], py = proj[1], pdist = proj[2];\n if (pdist < dist) {\n pc.x = px;\n pc.y = py;\n dist = pdist;\n }\n });\n return pc;\n },\n _prepareArrayForTween(startArray, endArray, isClosed) {\n var n, start = [], end = [];\n if (startArray.length > endArray.length) {\n var temp = endArray;\n endArray = startArray;\n startArray = temp;\n }\n for (n = 0; n < startArray.length; n += 2) {\n start.push({\n x: startArray[n],\n y: startArray[n + 1],\n });\n }\n for (n = 0; n < endArray.length; n += 2) {\n end.push({\n x: endArray[n],\n y: endArray[n + 1],\n });\n }\n var newStart = [];\n end.forEach(function (point) {\n var pr = Util._getProjectionToLine(point, start, isClosed);\n newStart.push(pr.x);\n newStart.push(pr.y);\n });\n return newStart;\n },\n _prepareToStringify(obj) {\n var desc;\n obj.visitedByCircularReferenceRemoval = true;\n for (var key in obj) {\n if (!(obj.hasOwnProperty(key) && obj[key] && typeof obj[key] == 'object')) {\n continue;\n }\n desc = Object.getOwnPropertyDescriptor(obj, key);\n if (obj[key].visitedByCircularReferenceRemoval ||\n Util._isElement(obj[key])) {\n if (desc.configurable) {\n delete obj[key];\n }\n else {\n return null;\n }\n }\n else if (Util._prepareToStringify(obj[key]) === null) {\n if (desc.configurable) {\n delete obj[key];\n }\n else {\n return null;\n }\n }\n }\n delete obj.visitedByCircularReferenceRemoval;\n return obj;\n },\n _assign(target, source) {\n for (var key in source) {\n target[key] = source[key];\n }\n return target;\n },\n _getFirstPointerId(evt) {\n if (!evt.touches) {\n return evt.pointerId || 999;\n }\n else {\n return evt.changedTouches[0].identifier;\n }\n },\n releaseCanvas(...canvases) {\n if (!Konva.releaseCanvasOnDestroy)\n return;\n canvases.forEach(c => {\n c.width = 0;\n c.height = 0;\n });\n },\n drawRoundedRectPath(context, width, height, cornerRadius) {\n let topLeft = 0;\n let topRight = 0;\n let bottomLeft = 0;\n let bottomRight = 0;\n if (typeof cornerRadius === 'number') {\n topLeft = topRight = bottomLeft = bottomRight = Math.min(cornerRadius, width / 2, height / 2);\n }\n else {\n topLeft = Math.min(cornerRadius[0] || 0, width / 2, height / 2);\n topRight = Math.min(cornerRadius[1] || 0, width / 2, height / 2);\n bottomRight = Math.min(cornerRadius[2] || 0, width / 2, height / 2);\n bottomLeft = Math.min(cornerRadius[3] || 0, width / 2, height / 2);\n }\n context.moveTo(topLeft, 0);\n context.lineTo(width - topRight, 0);\n context.arc(width - topRight, topRight, topRight, (Math.PI * 3) / 2, 0, false);\n context.lineTo(width, height - bottomRight);\n context.arc(width - bottomRight, height - bottomRight, bottomRight, 0, Math.PI / 2, false);\n context.lineTo(bottomLeft, height);\n context.arc(bottomLeft, height - bottomLeft, bottomLeft, Math.PI / 2, Math.PI, false);\n context.lineTo(0, topLeft);\n context.arc(topLeft, topLeft, topLeft, Math.PI, (Math.PI * 3) / 2, false);\n }\n};\n","import { Konva } from './Global.js';\nimport { Util } from './Util.js';\nfunction _formatValue(val) {\n if (Util._isString(val)) {\n return '\"' + val + '\"';\n }\n if (Object.prototype.toString.call(val) === '[object Number]') {\n return val;\n }\n if (Util._isBoolean(val)) {\n return val;\n }\n return Object.prototype.toString.call(val);\n}\nexport function RGBComponent(val) {\n if (val > 255) {\n return 255;\n }\n else if (val < 0) {\n return 0;\n }\n return Math.round(val);\n}\nexport function alphaComponent(val) {\n if (val > 1) {\n return 1;\n }\n else if (val < 0.0001) {\n return 0.0001;\n }\n return val;\n}\nexport function getNumberValidator() {\n if (Konva.isUnminified) {\n return function (val, attr) {\n if (!Util._isNumber(val)) {\n Util.warn(_formatValue(val) +\n ' is a not valid value for \"' +\n attr +\n '\" attribute. The value should be a number.');\n }\n return val;\n };\n }\n}\nexport function getNumberOrArrayOfNumbersValidator(noOfElements) {\n if (Konva.isUnminified) {\n return function (val, attr) {\n let isNumber = Util._isNumber(val);\n let isValidArray = Util._isArray(val) && val.length == noOfElements;\n if (!isNumber && !isValidArray) {\n Util.warn(_formatValue(val) +\n ' is a not valid value for \"' +\n attr +\n '\" attribute. The value should be a number or Array(' +\n noOfElements +\n ')');\n }\n return val;\n };\n }\n}\nexport function getNumberOrAutoValidator() {\n if (Konva.isUnminified) {\n return function (val, attr) {\n var isNumber = Util._isNumber(val);\n var isAuto = val === 'auto';\n if (!(isNumber || isAuto)) {\n Util.warn(_formatValue(val) +\n ' is a not valid value for \"' +\n attr +\n '\" attribute. The value should be a number or \"auto\".');\n }\n return val;\n };\n }\n}\nexport function getStringValidator() {\n if (Konva.isUnminified) {\n return function (val, attr) {\n if (!Util._isString(val)) {\n Util.warn(_formatValue(val) +\n ' is a not valid value for \"' +\n attr +\n '\" attribute. The value should be a string.');\n }\n return val;\n };\n }\n}\nexport function getStringOrGradientValidator() {\n if (Konva.isUnminified) {\n return function (val, attr) {\n const isString = Util._isString(val);\n const isGradient = Object.prototype.toString.call(val) === '[object CanvasGradient]' ||\n (val && val.addColorStop);\n if (!(isString || isGradient)) {\n Util.warn(_formatValue(val) +\n ' is a not valid value for \"' +\n attr +\n '\" attribute. The value should be a string or a native gradient.');\n }\n return val;\n };\n }\n}\nexport function getFunctionValidator() {\n if (Konva.isUnminified) {\n return function (val, attr) {\n if (!Util._isFunction(val)) {\n Util.warn(_formatValue(val) +\n ' is a not valid value for \"' +\n attr +\n '\" attribute. The value should be a function.');\n }\n return val;\n };\n }\n}\nexport function getNumberArrayValidator() {\n if (Konva.isUnminified) {\n return function (val, attr) {\n const TypedArray = Int8Array ? Object.getPrototypeOf(Int8Array) : null;\n if (TypedArray && val instanceof TypedArray) {\n return val;\n }\n if (!Util._isArray(val)) {\n Util.warn(_formatValue(val) +\n ' is a not valid value for \"' +\n attr +\n '\" attribute. The value should be a array of numbers.');\n }\n else {\n val.forEach(function (item) {\n if (!Util._isNumber(item)) {\n Util.warn('\"' +\n attr +\n '\" attribute has non numeric element ' +\n item +\n '. Make sure that all elements are numbers.');\n }\n });\n }\n return val;\n };\n }\n}\nexport function getBooleanValidator() {\n if (Konva.isUnminified) {\n return function (val, attr) {\n var isBool = val === true || val === false;\n if (!isBool) {\n Util.warn(_formatValue(val) +\n ' is a not valid value for \"' +\n attr +\n '\" attribute. The value should be a boolean.');\n }\n return val;\n };\n }\n}\nexport function getComponentValidator(components) {\n if (Konva.isUnminified) {\n return function (val, attr) {\n if (val === undefined || val === null) {\n return val;\n }\n if (!Util.isObject(val)) {\n Util.warn(_formatValue(val) +\n ' is a not valid value for \"' +\n attr +\n '\" attribute. The value should be an object with properties ' +\n components);\n }\n return val;\n };\n }\n}\n","import { Util } from './Util.js';\nimport { getComponentValidator } from './Validators.js';\nvar GET = 'get', SET = 'set';\nexport const Factory = {\n addGetterSetter(constructor, attr, def, validator, after) {\n Factory.addGetter(constructor, attr, def);\n Factory.addSetter(constructor, attr, validator, after);\n Factory.addOverloadedGetterSetter(constructor, attr);\n },\n addGetter(constructor, attr, def) {\n var method = GET + Util._capitalize(attr);\n constructor.prototype[method] =\n constructor.prototype[method] ||\n function () {\n var val = this.attrs[attr];\n return val === undefined ? def : val;\n };\n },\n addSetter(constructor, attr, validator, after) {\n var method = SET + Util._capitalize(attr);\n if (!constructor.prototype[method]) {\n Factory.overWriteSetter(constructor, attr, validator, after);\n }\n },\n overWriteSetter(constructor, attr, validator, after) {\n var method = SET + Util._capitalize(attr);\n constructor.prototype[method] = function (val) {\n if (validator && val !== undefined && val !== null) {\n val = validator.call(this, val, attr);\n }\n this._setAttr(attr, val);\n if (after) {\n after.call(this);\n }\n return this;\n };\n },\n addComponentsGetterSetter(constructor, attr, components, validator, after) {\n var len = components.length, capitalize = Util._capitalize, getter = GET + capitalize(attr), setter = SET + capitalize(attr), n, component;\n constructor.prototype[getter] = function () {\n var ret = {};\n for (n = 0; n < len; n++) {\n component = components[n];\n ret[component] = this.getAttr(attr + capitalize(component));\n }\n return ret;\n };\n var basicValidator = getComponentValidator(components);\n constructor.prototype[setter] = function (val) {\n var oldVal = this.attrs[attr], key;\n if (validator) {\n val = validator.call(this, val);\n }\n if (basicValidator) {\n basicValidator.call(this, val, attr);\n }\n for (key in val) {\n if (!val.hasOwnProperty(key)) {\n continue;\n }\n this._setAttr(attr + capitalize(key), val[key]);\n }\n if (!val) {\n components.forEach((component) => {\n this._setAttr(attr + capitalize(component), undefined);\n });\n }\n this._fireChangeEvent(attr, oldVal, val);\n if (after) {\n after.call(this);\n }\n return this;\n };\n Factory.addOverloadedGetterSetter(constructor, attr);\n },\n addOverloadedGetterSetter(constructor, attr) {\n var capitalizedAttr = Util._capitalize(attr), setter = SET + capitalizedAttr, getter = GET + capitalizedAttr;\n constructor.prototype[attr] = function () {\n if (arguments.length) {\n this[setter](arguments[0]);\n return this;\n }\n return this[getter]();\n };\n },\n addDeprecatedGetterSetter(constructor, attr, def, validator) {\n Util.error('Adding deprecated ' + attr);\n var method = GET + Util._capitalize(attr);\n var message = attr +\n ' property is deprecated and will be removed soon. Look at Konva change log for more information.';\n constructor.prototype[method] = function () {\n Util.error(message);\n var val = this.attrs[attr];\n return val === undefined ? def : val;\n };\n Factory.addSetter(constructor, attr, validator, function () {\n Util.error(message);\n });\n Factory.addOverloadedGetterSetter(constructor, attr);\n },\n backCompat(constructor, methods) {\n Util.each(methods, function (oldMethodName, newMethodName) {\n var method = constructor.prototype[newMethodName];\n var oldGetter = GET + Util._capitalize(oldMethodName);\n var oldSetter = SET + Util._capitalize(oldMethodName);\n function deprecated() {\n method.apply(this, arguments);\n Util.error('\"' +\n oldMethodName +\n '\" method is deprecated and will be removed soon. Use \"\"' +\n newMethodName +\n '\" instead.');\n }\n constructor.prototype[oldMethodName] = deprecated;\n constructor.prototype[oldGetter] = deprecated;\n constructor.prototype[oldSetter] = deprecated;\n });\n },\n afterSetFilter() {\n this._filterUpToDate = false;\n },\n};\n","import { Util } from './Util.js';\nimport { Konva } from './Global.js';\nfunction simplifyArray(arr) {\n var retArr = [], len = arr.length, util = Util, n, val;\n for (n = 0; n < len; n++) {\n val = arr[n];\n if (util._isNumber(val)) {\n val = Math.round(val * 1000) / 1000;\n }\n else if (!util._isString(val)) {\n val = val + '';\n }\n retArr.push(val);\n }\n return retArr;\n}\nvar COMMA = ',', OPEN_PAREN = '(', CLOSE_PAREN = ')', OPEN_PAREN_BRACKET = '([', CLOSE_BRACKET_PAREN = '])', SEMICOLON = ';', DOUBLE_PAREN = '()', EQUALS = '=', CONTEXT_METHODS = [\n 'arc',\n 'arcTo',\n 'beginPath',\n 'bezierCurveTo',\n 'clearRect',\n 'clip',\n 'closePath',\n 'createLinearGradient',\n 'createPattern',\n 'createRadialGradient',\n 'drawImage',\n 'ellipse',\n 'fill',\n 'fillText',\n 'getImageData',\n 'createImageData',\n 'lineTo',\n 'moveTo',\n 'putImageData',\n 'quadraticCurveTo',\n 'rect',\n 'restore',\n 'rotate',\n 'save',\n 'scale',\n 'setLineDash',\n 'setTransform',\n 'stroke',\n 'strokeText',\n 'transform',\n 'translate',\n];\nvar CONTEXT_PROPERTIES = [\n 'fillStyle',\n 'strokeStyle',\n 'shadowColor',\n 'shadowBlur',\n 'shadowOffsetX',\n 'shadowOffsetY',\n 'lineCap',\n 'lineDashOffset',\n 'lineJoin',\n 'lineWidth',\n 'miterLimit',\n 'font',\n 'textAlign',\n 'textBaseline',\n 'globalAlpha',\n 'globalCompositeOperation',\n 'imageSmoothingEnabled',\n];\nconst traceArrMax = 100;\nexport class Context {\n constructor(canvas) {\n this.canvas = canvas;\n if (Konva.enableTrace) {\n this.traceArr = [];\n this._enableTrace();\n }\n }\n fillShape(shape) {\n if (shape.fillEnabled()) {\n this._fill(shape);\n }\n }\n _fill(shape) {\n }\n strokeShape(shape) {\n if (shape.hasStroke()) {\n this._stroke(shape);\n }\n }\n _stroke(shape) {\n }\n fillStrokeShape(shape) {\n if (shape.attrs.fillAfterStrokeEnabled) {\n this.strokeShape(shape);\n this.fillShape(shape);\n }\n else {\n this.fillShape(shape);\n this.strokeShape(shape);\n }\n }\n getTrace(relaxed, rounded) {\n var traceArr = this.traceArr, len = traceArr.length, str = '', n, trace, method, args;\n for (n = 0; n < len; n++) {\n trace = traceArr[n];\n method = trace.method;\n if (method) {\n args = trace.args;\n str += method;\n if (relaxed) {\n str += DOUBLE_PAREN;\n }\n else {\n if (Util._isArray(args[0])) {\n str += OPEN_PAREN_BRACKET + args.join(COMMA) + CLOSE_BRACKET_PAREN;\n }\n else {\n if (rounded) {\n args = args.map((a) => typeof a === 'number' ? Math.floor(a) : a);\n }\n str += OPEN_PAREN + args.join(COMMA) + CLOSE_PAREN;\n }\n }\n }\n else {\n str += trace.property;\n if (!relaxed) {\n str += EQUALS + trace.val;\n }\n }\n str += SEMICOLON;\n }\n return str;\n }\n clearTrace() {\n this.traceArr = [];\n }\n _trace(str) {\n var traceArr = this.traceArr, len;\n traceArr.push(str);\n len = traceArr.length;\n if (len >= traceArrMax) {\n traceArr.shift();\n }\n }\n reset() {\n var pixelRatio = this.getCanvas().getPixelRatio();\n this.setTransform(1 * pixelRatio, 0, 0, 1 * pixelRatio, 0, 0);\n }\n getCanvas() {\n return this.canvas;\n }\n clear(bounds) {\n var canvas = this.getCanvas();\n if (bounds) {\n this.clearRect(bounds.x || 0, bounds.y || 0, bounds.width || 0, bounds.height || 0);\n }\n else {\n this.clearRect(0, 0, canvas.getWidth() / canvas.pixelRatio, canvas.getHeight() / canvas.pixelRatio);\n }\n }\n _applyLineCap(shape) {\n const lineCap = shape.attrs.lineCap;\n if (lineCap) {\n this.setAttr('lineCap', lineCap);\n }\n }\n _applyOpacity(shape) {\n var absOpacity = shape.getAbsoluteOpacity();\n if (absOpacity !== 1) {\n this.setAttr('globalAlpha', absOpacity);\n }\n }\n _applyLineJoin(shape) {\n const lineJoin = shape.attrs.lineJoin;\n if (lineJoin) {\n this.setAttr('lineJoin', lineJoin);\n }\n }\n setAttr(attr, val) {\n this._context[attr] = val;\n }\n arc(a0, a1, a2, a3, a4, a5) {\n this._context.arc(a0, a1, a2, a3, a4, a5);\n }\n arcTo(a0, a1, a2, a3, a4) {\n this._context.arcTo(a0, a1, a2, a3, a4);\n }\n beginPath() {\n this._context.beginPath();\n }\n bezierCurveTo(a0, a1, a2, a3, a4, a5) {\n this._context.bezierCurveTo(a0, a1, a2, a3, a4, a5);\n }\n clearRect(a0, a1, a2, a3) {\n this._context.clearRect(a0, a1, a2, a3);\n }\n clip() {\n this._context.clip();\n }\n closePath() {\n this._context.closePath();\n }\n createImageData(a0, a1) {\n var a = arguments;\n if (a.length === 2) {\n return this._context.createImageData(a0, a1);\n }\n else if (a.length === 1) {\n return this._context.createImageData(a0);\n }\n }\n createLinearGradient(a0, a1, a2, a3) {\n return this._context.createLinearGradient(a0, a1, a2, a3);\n }\n createPattern(a0, a1) {\n return this._context.createPattern(a0, a1);\n }\n createRadialGradient(a0, a1, a2, a3, a4, a5) {\n return this._context.createRadialGradient(a0, a1, a2, a3, a4, a5);\n }\n drawImage(a0, a1, a2, a3, a4, a5, a6, a7, a8) {\n var a = arguments, _context = this._context;\n if (a.length === 3) {\n _context.drawImage(a0, a1, a2);\n }\n else if (a.length === 5) {\n _context.drawImage(a0, a1, a2, a3, a4);\n }\n else if (a.length === 9) {\n _context.drawImage(a0, a1, a2, a3, a4, a5, a6, a7, a8);\n }\n }\n ellipse(a0, a1, a2, a3, a4, a5, a6, a7) {\n this._context.ellipse(a0, a1, a2, a3, a4, a5, a6, a7);\n }\n isPointInPath(x, y, path, fillRule) {\n if (path) {\n return this._context.isPointInPath(path, x, y, fillRule);\n }\n return this._context.isPointInPath(x, y, fillRule);\n }\n fill(path2d) {\n if (path2d) {\n this._context.fill(path2d);\n }\n else {\n this._context.fill();\n }\n }\n fillRect(x, y, width, height) {\n this._context.fillRect(x, y, width, height);\n }\n strokeRect(x, y, width, height) {\n this._context.strokeRect(x, y, width, height);\n }\n fillText(text, x, y, maxWidth) {\n if (maxWidth) {\n this._context.fillText(text, x, y, maxWidth);\n }\n else {\n this._context.fillText(text, x, y);\n }\n }\n measureText(text) {\n return this._context.measureText(text);\n }\n getImageData(a0, a1, a2, a3) {\n return this._context.getImageData(a0, a1, a2, a3);\n }\n lineTo(a0, a1) {\n this._context.lineTo(a0, a1);\n }\n moveTo(a0, a1) {\n this._context.moveTo(a0, a1);\n }\n rect(a0, a1, a2, a3) {\n this._context.rect(a0, a1, a2, a3);\n }\n putImageData(a0, a1, a2) {\n this._context.putImageData(a0, a1, a2);\n }\n quadraticCurveTo(a0, a1, a2, a3) {\n this._context.quadraticCurveTo(a0, a1, a2, a3);\n }\n restore() {\n this._context.restore();\n }\n rotate(a0) {\n this._context.rotate(a0);\n }\n save() {\n this._context.save();\n }\n scale(a0, a1) {\n this._context.scale(a0, a1);\n }\n setLineDash(a0) {\n if (this._context.setLineDash) {\n this._context.setLineDash(a0);\n }\n else if ('mozDash' in this._context) {\n this._context['mozDash'] = a0;\n }\n else if ('webkitLineDash' in this._context) {\n this._context['webkitLineDash'] = a0;\n }\n }\n getLineDash() {\n return this._context.getLineDash();\n }\n setTransform(a0, a1, a2, a3, a4, a5) {\n this._context.setTransform(a0, a1, a2, a3, a4, a5);\n }\n stroke(path2d) {\n if (path2d) {\n this._context.stroke(path2d);\n }\n else {\n this._context.stroke();\n }\n }\n strokeText(a0, a1, a2, a3) {\n this._context.strokeText(a0, a1, a2, a3);\n }\n transform(a0, a1, a2, a3, a4, a5) {\n this._context.transform(a0, a1, a2, a3, a4, a5);\n }\n translate(a0, a1) {\n this._context.translate(a0, a1);\n }\n _enableTrace() {\n var that = this, len = CONTEXT_METHODS.length, origSetter = this.setAttr, n, args;\n var func = function (methodName) {\n var origMethod = that[methodName], ret;\n that[methodName] = function () {\n args = simplifyArray(Array.prototype.slice.call(arguments, 0));\n ret = origMethod.apply(that, arguments);\n that._trace({\n method: methodName,\n args: args,\n });\n return ret;\n };\n };\n for (n = 0; n < len; n++) {\n func(CONTEXT_METHODS[n]);\n }\n that.setAttr = function () {\n origSetter.apply(that, arguments);\n var prop = arguments[0];\n var val = arguments[1];\n if (prop === 'shadowOffsetX' ||\n prop === 'shadowOffsetY' ||\n prop === 'shadowBlur') {\n val = val / this.canvas.getPixelRatio();\n }\n that._trace({\n property: prop,\n val: val,\n });\n };\n }\n _applyGlobalCompositeOperation(node) {\n const op = node.attrs.globalCompositeOperation;\n var def = !op || op === 'source-over';\n if (!def) {\n this.setAttr('globalCompositeOperation', op);\n }\n }\n}\nCONTEXT_PROPERTIES.forEach(function (prop) {\n Object.defineProperty(Context.prototype, prop, {\n get() {\n return this._context[prop];\n },\n set(val) {\n this._context[prop] = val;\n },\n });\n});\nexport class SceneContext extends Context {\n constructor(canvas) {\n super(canvas);\n this._context = canvas._canvas.getContext('2d');\n }\n _fillColor(shape) {\n var fill = shape.fill();\n this.setAttr('fillStyle', fill);\n shape._fillFunc(this);\n }\n _fillPattern(shape) {\n this.setAttr('fillStyle', shape._getFillPattern());\n shape._fillFunc(this);\n }\n _fillLinearGradient(shape) {\n var grd = shape._getLinearGradient();\n if (grd) {\n this.setAttr('fillStyle', grd);\n shape._fillFunc(this);\n }\n }\n _fillRadialGradient(shape) {\n const grd = shape._getRadialGradient();\n if (grd) {\n this.setAttr('fillStyle', grd);\n shape._fillFunc(this);\n }\n }\n _fill(shape) {\n const hasColor = shape.fill(), fillPriority = shape.getFillPriority();\n if (hasColor && fillPriority === 'color') {\n this._fillColor(shape);\n return;\n }\n const hasPattern = shape.getFillPatternImage();\n if (hasPattern && fillPriority === 'pattern') {\n this._fillPattern(shape);\n return;\n }\n const hasLinearGradient = shape.getFillLinearGradientColorStops();\n if (hasLinearGradient && fillPriority === 'linear-gradient') {\n this._fillLinearGradient(shape);\n return;\n }\n const hasRadialGradient = shape.getFillRadialGradientColorStops();\n if (hasRadialGradient && fillPriority === 'radial-gradient') {\n this._fillRadialGradient(shape);\n return;\n }\n if (hasColor) {\n this._fillColor(shape);\n }\n else if (hasPattern) {\n this._fillPattern(shape);\n }\n else if (hasLinearGradient) {\n this._fillLinearGradient(shape);\n }\n else if (hasRadialGradient) {\n this._fillRadialGradient(shape);\n }\n }\n _strokeLinearGradient(shape) {\n const start = shape.getStrokeLinearGradientStartPoint(), end = shape.getStrokeLinearGradientEndPoint(), colorStops = shape.getStrokeLinearGradientColorStops(), grd = this.createLinearGradient(start.x, start.y, end.x, end.y);\n if (colorStops) {\n for (var n = 0; n < colorStops.length; n += 2) {\n grd.addColorStop(colorStops[n], colorStops[n + 1]);\n }\n this.setAttr('strokeStyle', grd);\n }\n }\n _stroke(shape) {\n var dash = shape.dash(), strokeScaleEnabled = shape.getStrokeScaleEnabled();\n if (shape.hasStroke()) {\n if (!strokeScaleEnabled) {\n this.save();\n var pixelRatio = this.getCanvas().getPixelRatio();\n this.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);\n }\n this._applyLineCap(shape);\n if (dash && shape.dashEnabled()) {\n this.setLineDash(dash);\n this.setAttr('lineDashOffset', shape.dashOffset());\n }\n this.setAttr('lineWidth', shape.strokeWidth());\n if (!shape.getShadowForStrokeEnabled()) {\n this.setAttr('shadowColor', 'rgba(0,0,0,0)');\n }\n var hasLinearGradient = shape.getStrokeLinearGradientColorStops();\n if (hasLinearGradient) {\n this._strokeLinearGradient(shape);\n }\n else {\n this.setAttr('strokeStyle', shape.stroke());\n }\n shape._strokeFunc(this);\n if (!strokeScaleEnabled) {\n this.restore();\n }\n }\n }\n _applyShadow(shape) {\n var _a, _b, _c;\n var color = (_a = shape.getShadowRGBA()) !== null && _a !== void 0 ? _a : 'black', blur = (_b = shape.getShadowBlur()) !== null && _b !== void 0 ? _b : 5, offset = (_c = shape.getShadowOffset()) !== null && _c !== void 0 ? _c : {\n x: 0,\n y: 0,\n }, scale = shape.getAbsoluteScale(), ratio = this.canvas.getPixelRatio(), scaleX = scale.x * ratio, scaleY = scale.y * ratio;\n this.setAttr('shadowColor', color);\n this.setAttr('shadowBlur', blur * Math.min(Math.abs(scaleX), Math.abs(scaleY)));\n this.setAttr('shadowOffsetX', offset.x * scaleX);\n this.setAttr('shadowOffsetY', offset.y * scaleY);\n }\n}\nexport class HitContext extends Context {\n constructor(canvas) {\n super(canvas);\n this._context = canvas._canvas.getContext('2d', {\n willReadFrequently: true,\n });\n }\n _fill(shape) {\n this.save();\n this.setAttr('fillStyle', shape.colorKey);\n shape._fillFuncHit(this);\n this.restore();\n }\n strokeShape(shape) {\n if (shape.hasHitStroke()) {\n this._stroke(shape);\n }\n }\n _stroke(shape) {\n if (shape.hasHitStroke()) {\n const strokeScaleEnabled = shape.getStrokeScaleEnabled();\n if (!strokeScaleEnabled) {\n this.save();\n var pixelRatio = this.getCanvas().getPixelRatio();\n this.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);\n }\n this._applyLineCap(shape);\n var hitStrokeWidth = shape.hitStrokeWidth();\n var strokeWidth = hitStrokeWidth === 'auto' ? shape.strokeWidth() : hitStrokeWidth;\n this.setAttr('lineWidth', strokeWidth);\n this.setAttr('strokeStyle', shape.colorKey);\n shape._strokeFuncHit(this);\n if (!strokeScaleEnabled) {\n this.restore();\n }\n }\n }\n}\n","import { Util } from './Util.js';\nimport { SceneContext, HitContext } from './Context.js';\nimport { Konva } from './Global.js';\nimport { Factory } from './Factory.js';\nimport { getNumberValidator } from './Validators.js';\nvar _pixelRatio;\nfunction getDevicePixelRatio() {\n if (_pixelRatio) {\n return _pixelRatio;\n }\n var canvas = Util.createCanvasElement();\n var context = canvas.getContext('2d');\n _pixelRatio = (function () {\n var devicePixelRatio = Konva._global.devicePixelRatio || 1, backingStoreRatio = context.webkitBackingStorePixelRatio ||\n context.mozBackingStorePixelRatio ||\n context.msBackingStorePixelRatio ||\n context.oBackingStorePixelRatio ||\n context.backingStorePixelRatio ||\n 1;\n return devicePixelRatio / backingStoreRatio;\n })();\n Util.releaseCanvas(canvas);\n return _pixelRatio;\n}\nexport class Canvas {\n constructor(config) {\n this.pixelRatio = 1;\n this.width = 0;\n this.height = 0;\n this.isCache = false;\n var conf = config || {};\n var pixelRatio = conf.pixelRatio || Konva.pixelRatio || getDevicePixelRatio();\n this.pixelRatio = pixelRatio;\n this._canvas = Util.createCanvasElement();\n this._canvas.style.padding = '0';\n this._canvas.style.margin = '0';\n this._canvas.style.border = '0';\n this._canvas.style.background = 'transparent';\n this._canvas.style.position = 'absolute';\n this._canvas.style.top = '0';\n this._canvas.style.left = '0';\n }\n getContext() {\n return this.context;\n }\n getPixelRatio() {\n return this.pixelRatio;\n }\n setPixelRatio(pixelRatio) {\n var previousRatio = this.pixelRatio;\n this.pixelRatio = pixelRatio;\n this.setSize(this.getWidth() / previousRatio, this.getHeight() / previousRatio);\n }\n setWidth(width) {\n this.width = this._canvas.width = width * this.pixelRatio;\n this._canvas.style.width = width + 'px';\n var pixelRatio = this.pixelRatio, _context = this.getContext()._context;\n _context.scale(pixelRatio, pixelRatio);\n }\n setHeight(height) {\n this.height = this._canvas.height = height * this.pixelRatio;\n this._canvas.style.height = height + 'px';\n var pixelRatio = this.pixelRatio, _context = this.getContext()._context;\n _context.scale(pixelRatio, pixelRatio);\n }\n getWidth() {\n return this.width;\n }\n getHeight() {\n return this.height;\n }\n setSize(width, height) {\n this.setWidth(width || 0);\n this.setHeight(height || 0);\n }\n toDataURL(mimeType, quality) {\n try {\n return this._canvas.toDataURL(mimeType, quality);\n }\n catch (e) {\n try {\n return this._canvas.toDataURL();\n }\n catch (err) {\n Util.error('Unable to get data URL. ' +\n err.message +\n ' For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html.');\n return '';\n }\n }\n }\n}\nFactory.addGetterSetter(Canvas, 'pixelRatio', undefined, getNumberValidator());\nexport class SceneCanvas extends Canvas {\n constructor(config = { width: 0, height: 0 }) {\n super(config);\n this.context = new SceneContext(this);\n this.setSize(config.width, config.height);\n }\n}\nexport class HitCanvas extends Canvas {\n constructor(config = { width: 0, height: 0 }) {\n super(config);\n this.hitCanvas = true;\n this.context = new HitContext(this);\n this.setSize(config.width, config.height);\n }\n}\n","import { Konva } from './Global.js';\nimport { Util } from './Util.js';\nexport const DD = {\n get isDragging() {\n var flag = false;\n DD._dragElements.forEach((elem) => {\n if (elem.dragStatus === 'dragging') {\n flag = true;\n }\n });\n return flag;\n },\n justDragged: false,\n get node() {\n var node;\n DD._dragElements.forEach((elem) => {\n node = elem.node;\n });\n return node;\n },\n _dragElements: new Map(),\n _drag(evt) {\n const nodesToFireEvents = [];\n DD._dragElements.forEach((elem, key) => {\n const { node } = elem;\n const stage = node.getStage();\n stage.setPointersPositions(evt);\n if (elem.pointerId === undefined) {\n elem.pointerId = Util._getFirstPointerId(evt);\n }\n const pos = stage._changedPointerPositions.find((pos) => pos.id === elem.pointerId);\n if (!pos) {\n return;\n }\n if (elem.dragStatus !== 'dragging') {\n var dragDistance = node.dragDistance();\n var distance = Math.max(Math.abs(pos.x - elem.startPointerPos.x), Math.abs(pos.y - elem.startPointerPos.y));\n if (distance < dragDistance) {\n return;\n }\n node.startDrag({ evt });\n if (!node.isDragging()) {\n return;\n }\n }\n node._setDragPosition(evt, elem);\n nodesToFireEvents.push(node);\n });\n nodesToFireEvents.forEach((node) => {\n node.fire('dragmove', {\n type: 'dragmove',\n target: node,\n evt: evt,\n }, true);\n });\n },\n _endDragBefore(evt) {\n const drawNodes = [];\n DD._dragElements.forEach((elem) => {\n const { node } = elem;\n const stage = node.getStage();\n if (evt) {\n stage.setPointersPositions(evt);\n }\n const pos = stage._changedPointerPositions.find((pos) => pos.id === elem.pointerId);\n if (!pos) {\n return;\n }\n if (elem.dragStatus === 'dragging' || elem.dragStatus === 'stopped') {\n DD.justDragged = true;\n Konva._mouseListenClick = false;\n Konva._touchListenClick = false;\n Konva._pointerListenClick = false;\n elem.dragStatus = 'stopped';\n }\n const drawNode = elem.node.getLayer() ||\n (elem.node instanceof Konva['Stage'] && elem.node);\n if (drawNode && drawNodes.indexOf(drawNode) === -1) {\n drawNodes.push(drawNode);\n }\n });\n drawNodes.forEach((drawNode) => {\n drawNode.draw();\n });\n },\n _endDragAfter(evt) {\n DD._dragElements.forEach((elem, key) => {\n if (elem.dragStatus === 'stopped') {\n elem.node.fire('dragend', {\n type: 'dragend',\n target: elem.node,\n evt: evt,\n }, true);\n }\n if (elem.dragStatus !== 'dragging') {\n DD._dragElements.delete(key);\n }\n });\n },\n};\nif (Konva.isBrowser) {\n window.addEventListener('mouseup', DD._endDragBefore, true);\n window.addEventListener('touchend', DD._endDragBefore, true);\n window.addEventListener('mousemove', DD._drag);\n window.addEventListener('touchmove', DD._drag);\n window.addEventListener('mouseup', DD._endDragAfter, false);\n window.addEventListener('touchend', DD._endDragAfter, false);\n}\n","import { Util, Transform } from './Util.js';\nimport { Factory } from './Factory.js';\nimport { SceneCanvas, HitCanvas } from './Canvas.js';\nimport { Konva } from './Global.js';\nimport { DD } from './DragAndDrop.js';\nimport { getNumberValidator, getStringValidator, getBooleanValidator, } from './Validators.js';\nvar ABSOLUTE_OPACITY = 'absoluteOpacity', ALL_LISTENERS = 'allEventListeners', ABSOLUTE_TRANSFORM = 'absoluteTransform', ABSOLUTE_SCALE = 'absoluteScale', CANVAS = 'canvas', CHANGE = 'Change', CHILDREN = 'children', KONVA = 'konva', LISTENING = 'listening', MOUSEENTER = 'mouseenter', MOUSELEAVE = 'mouseleave', NAME = 'name', SET = 'set', SHAPE = 'Shape', SPACE = ' ', STAGE = 'stage', TRANSFORM = 'transform', UPPER_STAGE = 'Stage', VISIBLE = 'visible', TRANSFORM_CHANGE_STR = [\n 'xChange.konva',\n 'yChange.konva',\n 'scaleXChange.konva',\n 'scaleYChange.konva',\n 'skewXChange.konva',\n 'skewYChange.konva',\n 'rotationChange.konva',\n 'offsetXChange.konva',\n 'offsetYChange.konva',\n 'transformsEnabledChange.konva',\n].join(SPACE);\nlet idCounter = 1;\nexport class Node {\n constructor(config) {\n this._id = idCounter++;\n this.eventListeners = {};\n this.attrs = {};\n this.index = 0;\n this._allEventListeners = null;\n this.parent = null;\n this._cache = new Map();\n this._attachedDepsListeners = new Map();\n this._lastPos = null;\n this._batchingTransformChange = false;\n this._needClearTransformCache = false;\n this._filterUpToDate = false;\n this._isUnderCache = false;\n this._dragEventId = null;\n this._shouldFireChangeEvents = false;\n this.setAttrs(config);\n this._shouldFireChangeEvents = true;\n }\n hasChildren() {\n return false;\n }\n _clearCache(attr) {\n if ((attr === TRANSFORM || attr === ABSOLUTE_TRANSFORM) &&\n this._cache.get(attr)) {\n this._cache.get(attr).dirty = true;\n }\n else if (attr) {\n this._cache.delete(attr);\n }\n else {\n this._cache.clear();\n }\n }\n _getCache(attr, privateGetter) {\n var cache = this._cache.get(attr);\n var isTransform = attr === TRANSFORM || attr === ABSOLUTE_TRANSFORM;\n var invalid = cache === undefined || (isTransform && cache.dirty === true);\n if (invalid) {\n cache = privateGetter.call(this);\n this._cache.set(attr, cache);\n }\n return cache;\n }\n _calculate(name, deps, getter) {\n if (!this._attachedDepsListeners.get(name)) {\n const depsString = deps.map((dep) => dep + 'Change.konva').join(SPACE);\n this.on(depsString, () => {\n this._clearCache(name);\n });\n this._attachedDepsListeners.set(name, true);\n }\n return this._getCache(name, getter);\n }\n _getCanvasCache() {\n return this._cache.get(CANVAS);\n }\n _clearSelfAndDescendantCache(attr) {\n this._clearCache(attr);\n if (attr === ABSOLUTE_TRANSFORM) {\n this.fire('absoluteTransformChange');\n }\n }\n clearCache() {\n if (this._cache.has(CANVAS)) {\n const { scene, filter, hit } = this._cache.get(CANVAS);\n Util.releaseCanvas(scene, filter, hit);\n this._cache.delete(CANVAS);\n }\n this._clearSelfAndDescendantCache();\n this._requestDraw();\n return this;\n }\n cache(config) {\n var conf = config || {};\n var rect = {};\n if (conf.x === undefined ||\n conf.y === undefined ||\n conf.width === undefined ||\n conf.height === undefined) {\n rect = this.getClientRect({\n skipTransform: true,\n relativeTo: this.getParent(),\n });\n }\n var width = Math.ceil(conf.width || rect.width), height = Math.ceil(conf.height || rect.height), pixelRatio = conf.pixelRatio, x = conf.x === undefined ? Math.floor(rect.x) : conf.x, y = conf.y === undefined ? Math.floor(rect.y) : conf.y, offset = conf.offset || 0, drawBorder = conf.drawBorder || false, hitCanvasPixelRatio = conf.hitCanvasPixelRatio || 1;\n if (!width || !height) {\n Util.error('Can not cache the node. Width or height of the node equals 0. Caching is skipped.');\n return;\n }\n width += offset * 2 + 1;\n height += offset * 2 + 1;\n x -= offset;\n y -= offset;\n var cachedSceneCanvas = new SceneCanvas({\n pixelRatio: pixelRatio,\n width: width,\n height: height,\n }), cachedFilterCanvas = new SceneCanvas({\n pixelRatio: pixelRatio,\n width: 0,\n height: 0,\n }), cachedHitCanvas = new HitCanvas({\n pixelRatio: hitCanvasPixelRatio,\n width: width,\n height: height,\n }), sceneContext = cachedSceneCanvas.getContext(), hitContext = cachedHitCanvas.getContext();\n cachedHitCanvas.isCache = true;\n cachedSceneCanvas.isCache = true;\n this._cache.delete(CANVAS);\n this._filterUpToDate = false;\n if (conf.imageSmoothingEnabled === false) {\n cachedSceneCanvas.getContext()._context.imageSmoothingEnabled = false;\n cachedFilterCanvas.getContext()._context.imageSmoothingEnabled = false;\n }\n sceneContext.save();\n hitContext.save();\n sceneContext.translate(-x, -y);\n hitContext.translate(-x, -y);\n this._isUnderCache = true;\n this._clearSelfAndDescendantCache(ABSOLUTE_OPACITY);\n this._clearSelfAndDescendantCache(ABSOLUTE_SCALE);\n this.drawScene(cachedSceneCanvas, this);\n this.drawHit(cachedHitCanvas, this);\n this._isUnderCache = false;\n sceneContext.restore();\n hitContext.restore();\n if (drawBorder) {\n sceneContext.save();\n sceneContext.beginPath();\n sceneContext.rect(0, 0, width, height);\n sceneContext.closePath();\n sceneContext.setAttr('strokeStyle', 'red');\n sceneContext.setAttr('lineWidth', 5);\n sceneContext.stroke();\n sceneContext.restore();\n }\n this._cache.set(CANVAS, {\n scene: cachedSceneCanvas,\n filter: cachedFilterCanvas,\n hit: cachedHitCanvas,\n x: x,\n y: y,\n });\n this._requestDraw();\n return this;\n }\n isCached() {\n return this._cache.has(CANVAS);\n }\n getClientRect(config) {\n throw new Error('abstract \"getClientRect\" method call');\n }\n _transformedRect(rect, top) {\n var points = [\n { x: rect.x, y: rect.y },\n { x: rect.x + rect.width, y: rect.y },\n { x: rect.x + rect.width, y: rect.y + rect.height },\n { x: rect.x, y: rect.y + rect.height },\n ];\n var minX, minY, maxX, maxY;\n var trans = this.getAbsoluteTransform(top);\n points.forEach(function (point) {\n var transformed = trans.point(point);\n if (minX === undefined) {\n minX = maxX = transformed.x;\n minY = maxY = transformed.y;\n }\n minX = Math.min(minX, transformed.x);\n minY = Math.min(minY, transformed.y);\n maxX = Math.max(maxX, transformed.x);\n maxY = Math.max(maxY, transformed.y);\n });\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY,\n };\n }\n _drawCachedSceneCanvas(context) {\n context.save();\n context._applyOpacity(this);\n context._applyGlobalCompositeOperation(this);\n const canvasCache = this._getCanvasCache();\n context.translate(canvasCache.x, canvasCache.y);\n var cacheCanvas = this._getCachedSceneCanvas();\n var ratio = cacheCanvas.pixelRatio;\n context.drawImage(cacheCanvas._canvas, 0, 0, cacheCanvas.width / ratio, cacheCanvas.height / ratio);\n context.restore();\n }\n _drawCachedHitCanvas(context) {\n var canvasCache = this._getCanvasCache(), hitCanvas = canvasCache.hit;\n context.save();\n context.translate(canvasCache.x, canvasCache.y);\n context.drawImage(hitCanvas._canvas, 0, 0, hitCanvas.width / hitCanvas.pixelRatio, hitCanvas.height / hitCanvas.pixelRatio);\n context.restore();\n }\n _getCachedSceneCanvas() {\n var filters = this.filters(), cachedCanvas = this._getCanvasCache(), sceneCanvas = cachedCanvas.scene, filterCanvas = cachedCanvas.filter, filterContext = filterCanvas.getContext(), len, imageData, n, filter;\n if (filters) {\n if (!this._filterUpToDate) {\n var ratio = sceneCanvas.pixelRatio;\n filterCanvas.setSize(sceneCanvas.width / sceneCanvas.pixelRatio, sceneCanvas.height / sceneCanvas.pixelRatio);\n try {\n len = filters.length;\n filterContext.clear();\n filterContext.drawImage(sceneCanvas._canvas, 0, 0, sceneCanvas.getWidth() / ratio, sceneCanvas.getHeight() / ratio);\n imageData = filterContext.getImageData(0, 0, filterCanvas.getWidth(), filterCanvas.getHeight());\n for (n = 0; n < len; n++) {\n filter = filters[n];\n if (typeof filter !== 'function') {\n Util.error('Filter should be type of function, but got ' +\n typeof filter +\n ' instead. Please check correct filters');\n continue;\n }\n filter.call(this, imageData);\n filterContext.putImageData(imageData, 0, 0);\n }\n }\n catch (e) {\n Util.error('Unable to apply filter. ' +\n e.message +\n ' This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.');\n }\n this._filterUpToDate = true;\n }\n return filterCanvas;\n }\n return sceneCanvas;\n }\n on(evtStr, handler) {\n this._cache && this._cache.delete(ALL_LISTENERS);\n if (arguments.length === 3) {\n return this._delegate.apply(this, arguments);\n }\n var events = evtStr.split(SPACE), len = events.length, n, event, parts, baseEvent, name;\n for (n = 0; n < len; n++) {\n event = events[n];\n parts = event.split('.');\n baseEvent = parts[0];\n name = parts[1] || '';\n if (!this.eventListeners[baseEvent]) {\n this.eventListeners[baseEvent] = [];\n }\n this.eventListeners[baseEvent].push({\n name: name,\n handler: handler,\n });\n }\n return this;\n }\n off(evtStr, callback) {\n var events = (evtStr || '').split(SPACE), len = events.length, n, t, event, parts, baseEvent, name;\n this._cache && this._cache.delete(ALL_LISTENERS);\n if (!evtStr) {\n for (t in this.eventListeners) {\n this._off(t);\n }\n }\n for (n = 0; n < len; n++) {\n event = events[n];\n parts = event.split('.');\n baseEvent = parts[0];\n name = parts[1];\n if (baseEvent) {\n if (this.eventListeners[baseEvent]) {\n this._off(baseEvent, name, callback);\n }\n }\n else {\n for (t in this.eventListeners) {\n this._off(t, name, callback);\n }\n }\n }\n return this;\n }\n dispatchEvent(evt) {\n var e = {\n target: this,\n type: evt.type,\n evt: evt,\n };\n this.fire(evt.type, e);\n return this;\n }\n addEventListener(type, handler) {\n this.on(type, function (evt) {\n handler.call(this, evt.evt);\n });\n return this;\n }\n removeEventListener(type) {\n this.off(type);\n return this;\n }\n _delegate(event, selector, handler) {\n var stopNode = this;\n this.on(event, function (evt) {\n var targets = evt.target.findAncestors(selector, true, stopNode);\n for (var i = 0; i < targets.length; i++) {\n evt = Util.cloneObject(evt);\n evt.currentTarget = targets[i];\n handler.call(targets[i], evt);\n }\n });\n }\n remove() {\n if (this.isDragging()) {\n this.stopDrag();\n }\n DD._dragElements.delete(this._id);\n this._remove();\n return this;\n }\n _clearCaches() {\n this._clearSelfAndDescendantCache(ABSOLUTE_TRANSFORM);\n this._clearSelfAndDescendantCache(ABSOLUTE_OPACITY);\n this._clearSelfAndDescendantCache(ABSOLUTE_SCALE);\n this._clearSelfAndDescendantCache(STAGE);\n this._clearSelfAndDescendantCache(VISIBLE);\n this._clearSelfAndDescendantCache(LISTENING);\n }\n _remove() {\n this._clearCaches();\n var parent = this.getParent();\n if (parent && parent.children) {\n parent.children.splice(this.index, 1);\n parent._setChildrenIndices();\n this.parent = null;\n }\n }\n destroy() {\n this.remove();\n this.clearCache();\n return this;\n }\n getAttr(attr) {\n var method = 'get' + Util._capitalize(attr);\n if (Util._isFunction(this[method])) {\n return this[method]();\n }\n return this.attrs[attr];\n }\n getAncestors() {\n var parent = this.getParent(), ancestors = [];\n while (parent) {\n ancestors.push(parent);\n parent = parent.getParent();\n }\n return ancestors;\n }\n getAttrs() {\n return this.attrs || {};\n }\n setAttrs(config) {\n this._batchTransformChanges(() => {\n var key, method;\n if (!config) {\n return this;\n }\n for (key in config) {\n if (key === CHILDREN) {\n continue;\n }\n method = SET + Util._capitalize(key);\n if (Util._isFunction(this[method])) {\n this[method](config[key]);\n }\n else {\n this._setAttr(key, config[key]);\n }\n }\n });\n return this;\n }\n isListening() {\n return this._getCache(LISTENING, this._isListening);\n }\n _isListening(relativeTo) {\n const listening = this.listening();\n if (!listening) {\n return false;\n }\n const parent = this.getParent();\n if (parent && parent !== relativeTo && this !== relativeTo) {\n return parent._isListening(relativeTo);\n }\n else {\n return true;\n }\n }\n isVisible() {\n return this._getCache(VISIBLE, this._isVisible);\n }\n _isVisible(relativeTo) {\n const visible = this.visible();\n if (!visible) {\n return false;\n }\n const parent = this.getParent();\n if (parent && parent !== relativeTo && this !== relativeTo) {\n return parent._isVisible(relativeTo);\n }\n else {\n return true;\n }\n }\n shouldDrawHit(top, skipDragCheck = false) {\n if (top) {\n return this._isVisible(top) && this._isListening(top);\n }\n var layer = this.getLayer();\n var layerUnderDrag = false;\n DD._dragElements.forEach((elem) => {\n if (elem.dragStatus !== 'dragging') {\n return;\n }\n else if (elem.node.nodeType === 'Stage') {\n layerUnderDrag = true;\n }\n else if (elem.node.getLayer() === layer) {\n layerUnderDrag = true;\n }\n });\n var dragSkip = !skipDragCheck && !Konva.hitOnDragEnabled && layerUnderDrag;\n return this.isListening() && this.isVisible() && !dragSkip;\n }\n show() {\n this.visible(true);\n return this;\n }\n hide() {\n this.visible(false);\n return this;\n }\n getZIndex() {\n return this.index || 0;\n }\n getAbsoluteZIndex() {\n var depth = this.getDepth(), that = this, index = 0, nodes, len, n, child;\n function addChildren(children) {\n nodes = [];\n len = children.length;\n for (n = 0; n < len; n++) {\n child = children[n];\n index++;\n if (child.nodeType !== SHAPE) {\n nodes = nodes.concat(child.getChildren().slice());\n }\n if (child._id === that._id) {\n n = len;\n }\n }\n if (nodes.length > 0 && nodes[0].getDepth() <= depth) {\n addChildren(nodes);\n }\n }\n if (that.nodeType !== UPPER_STAGE) {\n addChildren(that.getStage().getChildren());\n }\n return index;\n }\n getDepth() {\n var depth = 0, parent = this.parent;\n while (parent) {\n depth++;\n parent = parent.parent;\n }\n return depth;\n }\n _batchTransformChanges(func) {\n this._batchingTransformChange = true;\n func();\n this._batchingTransformChange = false;\n if (this._needClearTransformCache) {\n this._clearCache(TRANSFORM);\n this._clearSelfAndDescendantCache(ABSOLUTE_TRANSFORM);\n }\n this._needClearTransformCache = false;\n }\n setPosition(pos) {\n this._batchTransformChanges(() => {\n this.x(pos.x);\n this.y(pos.y);\n });\n return this;\n }\n getPosition() {\n return {\n x: this.x(),\n y: this.y(),\n };\n }\n getRelativePointerPosition() {\n if (!this.getStage()) {\n return null;\n }\n var pos = this.getStage().getPointerPosition();\n if (!pos) {\n return null;\n }\n var transform = this.getAbsoluteTransform().copy();\n transform.invert();\n return transform.point(pos);\n }\n getAbsolutePosition(top) {\n let haveCachedParent = false;\n let parent = this.parent;\n while (parent) {\n if (parent.isCached()) {\n haveCachedParent = true;\n break;\n }\n parent = parent.parent;\n }\n if (haveCachedParent && !top) {\n top = true;\n }\n var absoluteMatrix = this.getAbsoluteTransform(top).getMatrix(), absoluteTransform = new Transform(), offset = this.offset();\n absoluteTransform.m = absoluteMatrix.slice();\n absoluteTransform.translate(offset.x, offset.y);\n return absoluteTransform.getTranslation();\n }\n setAbsolutePosition(pos) {\n var origTrans = this._clearTransform();\n this.attrs.x = origTrans.x;\n this.attrs.y = origTrans.y;\n delete origTrans.x;\n delete origTrans.y;\n this._clearCache(TRANSFORM);\n var it = this._getAbsoluteTransform().copy();\n it.invert();\n it.translate(pos.x, pos.y);\n pos = {\n x: this.attrs.x + it.getTranslation().x,\n y: this.attrs.y + it.getTranslation().y,\n };\n this._setTransform(origTrans);\n this.setPosition({ x: pos.x, y: pos.y });\n this._clearCache(TRANSFORM);\n this._clearSelfAndDescendantCache(ABSOLUTE_TRANSFORM);\n return this;\n }\n _setTransform(trans) {\n var key;\n for (key in trans) {\n this.attrs[key] = trans[key];\n }\n }\n _clearTransform() {\n var trans = {\n x: this.x(),\n y: this.y(),\n rotation: this.rotation(),\n scaleX: this.scaleX(),\n scaleY: this.scaleY(),\n offsetX: this.offsetX(),\n offsetY: this.offsetY(),\n skewX: this.skewX(),\n skewY: this.skewY(),\n };\n this.attrs.x = 0;\n this.attrs.y = 0;\n this.attrs.rotation = 0;\n this.attrs.scaleX = 1;\n this.attrs.scaleY = 1;\n this.attrs.offsetX = 0;\n this.attrs.offsetY = 0;\n this.attrs.skewX = 0;\n this.attrs.skewY = 0;\n return trans;\n }\n move(change) {\n var changeX = change.x, changeY = change.y, x = this.x(), y = this.y();\n if (changeX !== undefined) {\n x += changeX;\n }\n if (changeY !== undefined) {\n y += changeY;\n }\n this.setPosition({ x: x, y: y });\n return this;\n }\n _eachAncestorReverse(func, top) {\n var family = [], parent = this.getParent(), len, n;\n if (top && top._id === this._id) {\n return;\n }\n family.unshift(this);\n while (parent && (!top || parent._id !== top._id)) {\n family.unshift(parent);\n parent = parent.parent;\n }\n len = family.length;\n for (n = 0; n < len; n++) {\n func(family[n]);\n }\n }\n rotate(theta) {\n this.rotation(this.rotation() + theta);\n return this;\n }\n moveToTop() {\n if (!this.parent) {\n Util.warn('Node has no parent. moveToTop function is ignored.');\n return false;\n }\n var index = this.index, len = this.parent.getChildren().length;\n if (index < len - 1) {\n this.parent.children.splice(index, 1);\n this.parent.children.push(this);\n this.parent._setChildrenIndices();\n return true;\n }\n return false;\n }\n moveUp() {\n if (!this.parent) {\n Util.warn('Node has no parent. moveUp function is ignored.');\n return false;\n }\n var index = this.index, len = this.parent.getChildren().length;\n if (index < len - 1) {\n this.parent.children.splice(index, 1);\n this.parent.children.splice(index + 1, 0, this);\n this.parent._setChildrenIndices();\n return true;\n }\n return false;\n }\n moveDown() {\n if (!this.parent) {\n Util.warn('Node has no parent. moveDown function is ignored.');\n return false;\n }\n var index = this.index;\n if (index > 0) {\n this.parent.children.splice(index, 1);\n this.parent.children.splice(index - 1, 0, this);\n this.parent._setChildrenIndices();\n return true;\n }\n return false;\n }\n moveToBottom() {\n if (!this.parent) {\n Util.warn('Node has no parent. moveToBottom function is ignored.');\n return false;\n }\n var index = this.index;\n if (index > 0) {\n this.parent.children.splice(index, 1);\n this.parent.children.unshift(this);\n this.parent._setChildrenIndices();\n return true;\n }\n return false;\n }\n setZIndex(zIndex) {\n if (!this.parent) {\n Util.warn('Node has no parent. zIndex parameter is ignored.');\n return this;\n }\n if (zIndex < 0 || zIndex >= this.parent.children.length) {\n Util.warn('Unexpected value ' +\n zIndex +\n ' for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to ' +\n (this.parent.children.length - 1) +\n '.');\n }\n var index = this.index;\n this.parent.children.splice(index, 1);\n this.parent.children.splice(zIndex, 0, this);\n this.parent._setChildrenIndices();\n return this;\n }\n getAbsoluteOpacity() {\n return this._getCache(ABSOLUTE_OPACITY, this._getAbsoluteOpacity);\n }\n _getAbsoluteOpacity() {\n var absOpacity = this.opacity();\n var parent = this.getParent();\n if (parent && !parent._isUnderCache) {\n absOpacity *= parent.getAbsoluteOpacity();\n }\n return absOpacity;\n }\n moveTo(newContainer) {\n if (this.getParent() !== newContainer) {\n this._remove();\n newContainer.add(this);\n }\n return this;\n }\n toObject() {\n var obj = {}, attrs = this.getAttrs(), key, val, getter, defaultValue, nonPlainObject;\n obj.attrs = {};\n for (key in attrs) {\n val = attrs[key];\n nonPlainObject =\n Util.isObject(val) && !Util._isPlainObject(val) && !Util._isArray(val);\n if (nonPlainObject) {\n continue;\n }\n getter = typeof this[key] === 'function' && this[key];\n delete attrs[key];\n defaultValue = getter ? getter.call(this) : null;\n attrs[key] = val;\n if (defaultValue !== val) {\n obj.attrs[key] = val;\n }\n }\n obj.className = this.getClassName();\n return Util._prepareToStringify(obj);\n }\n toJSON() {\n return JSON.stringify(this.toObject());\n }\n getParent() {\n return this.parent;\n }\n findAncestors(selector, includeSelf, stopNode) {\n var res = [];\n if (includeSelf && this._isMatch(selector)) {\n res.push(this);\n }\n var ancestor = this.parent;\n while (ancestor) {\n if (ancestor === stopNode) {\n return res;\n }\n if (ancestor._isMatch(selector)) {\n res.push(ancestor);\n }\n ancestor = ancestor.parent;\n }\n return res;\n }\n isAncestorOf(node) {\n return false;\n }\n findAncestor(selector, includeSelf, stopNode) {\n return this.findAncestors(selector, includeSelf, stopNode)[0];\n }\n _isMatch(selector) {\n if (!selector) {\n return false;\n }\n if (typeof selector === 'function') {\n return selector(this);\n }\n var selectorArr = selector.replace(/ /g, '').split(','), len = selectorArr.length, n, sel;\n for (n = 0; n < len; n++) {\n sel = selectorArr[n];\n if (!Util.isValidSelector(sel)) {\n Util.warn('Selector \"' +\n sel +\n '\" is invalid. Allowed selectors examples are \"#foo\", \".bar\" or \"Group\".');\n Util.warn('If you have a custom shape with such className, please change it to start with upper letter like \"Triangle\".');\n Util.warn('Konva is awesome, right?');\n }\n if (sel.charAt(0) === '#') {\n if (this.id() === sel.slice(1)) {\n return true;\n }\n }\n else if (sel.charAt(0) === '.') {\n if (this.hasName(sel.slice(1))) {\n return true;\n }\n }\n else if (this.className === sel || this.nodeType === sel) {\n return true;\n }\n }\n return false;\n }\n getLayer() {\n var parent = this.getParent();\n return parent ? parent.getLayer() : null;\n }\n getStage() {\n return this._getCache(STAGE, this._getStage);\n }\n _getStage() {\n var parent = this.getParent();\n if (parent) {\n return parent.getStage();\n }\n else {\n return undefined;\n }\n }\n fire(eventType, evt = {}, bubble) {\n evt.target = evt.target || this;\n if (bubble) {\n this._fireAndBubble(eventType, evt);\n }\n else {\n this._fire(eventType, evt);\n }\n return this;\n }\n getAbsoluteTransform(top) {\n if (top) {\n return this._getAbsoluteTransform(top);\n }\n else {\n return this._getCache(ABSOLUTE_TRANSFORM, this._getAbsoluteTransform);\n }\n }\n _getAbsoluteTransform(top) {\n var at;\n if (top) {\n at = new Transform();\n this._eachAncestorReverse(function (node) {\n var transformsEnabled = node.transformsEnabled();\n if (transformsEnabled === 'all') {\n at.multiply(node.getTransform());\n }\n else if (transformsEnabled === 'position') {\n at.translate(node.x() - node.offsetX(), node.y() - node.offsetY());\n }\n }, top);\n return at;\n }\n else {\n at = this._cache.get(ABSOLUTE_TRANSFORM) || new Transform();\n if (this.parent) {\n this.parent.getAbsoluteTransform().copyInto(at);\n }\n else {\n at.reset();\n }\n var transformsEnabled = this.transformsEnabled();\n if (transformsEnabled === 'all') {\n at.multiply(this.getTransform());\n }\n else if (transformsEnabled === 'position') {\n const x = this.attrs.x || 0;\n const y = this.attrs.y || 0;\n const offsetX = this.attrs.offsetX || 0;\n const offsetY = this.attrs.offsetY || 0;\n at.translate(x - offsetX, y - offsetY);\n }\n at.dirty = false;\n return at;\n }\n }\n getAbsoluteScale(top) {\n var parent = this;\n while (parent) {\n if (parent._isUnderCache) {\n top = parent;\n }\n parent = parent.getParent();\n }\n const transform = this.getAbsoluteTransform(top);\n const attrs = transform.decompose();\n return {\n x: attrs.scaleX,\n y: attrs.scaleY,\n };\n }\n getAbsoluteRotation() {\n return this.getAbsoluteTransform().decompose().rotation;\n }\n getTransform() {\n return this._getCache(TRANSFORM, this._getTransform);\n }\n _getTransform() {\n var _a, _b;\n var m = this._cache.get(TRANSFORM) || new Transform();\n m.reset();\n var x = this.x(), y = this.y(), rotation = Konva.getAngle(this.rotation()), scaleX = (_a = this.attrs.scaleX) !== null && _a !== void 0 ? _a : 1, scaleY = (_b = this.attrs.scaleY) !== null && _b !== void 0 ? _b : 1, skewX = this.attrs.skewX || 0, skewY = this.attrs.skewY || 0, offsetX = this.attrs.offsetX || 0, offsetY = this.attrs.offsetY || 0;\n if (x !== 0 || y !== 0) {\n m.translate(x, y);\n }\n if (rotation !== 0) {\n m.rotate(rotation);\n }\n if (skewX !== 0 || skewY !== 0) {\n m.skew(skewX, skewY);\n }\n if (scaleX !== 1 || scaleY !== 1) {\n m.scale(scaleX, scaleY);\n }\n if (offsetX !== 0 || offsetY !== 0) {\n m.translate(-1 * offsetX, -1 * offsetY);\n }\n m.dirty = false;\n return m;\n }\n clone(obj) {\n var attrs = Util.cloneObject(this.attrs), key, allListeners, len, n, listener;\n for (key in obj) {\n attrs[key] = obj[key];\n }\n var node = new this.constructor(attrs);\n for (key in this.eventListeners) {\n allListeners = this.eventListeners[key];\n len = allListeners.length;\n for (n = 0; n < len; n++) {\n listener = allListeners[n];\n if (listener.name.indexOf(KONVA) < 0) {\n if (!node.eventListeners[key]) {\n node.eventListeners[key] = [];\n }\n node.eventListeners[key].push(listener);\n }\n }\n }\n return node;\n }\n _toKonvaCanvas(config) {\n config = config || {};\n var box = this.getClientRect();\n var stage = this.getStage(), x = config.x !== undefined ? config.x : Math.floor(box.x), y = config.y !== undefined ? config.y : Math.floor(box.y), pixelRatio = config.pixelRatio || 1, canvas = new SceneCanvas({\n width: config.width || Math.ceil(box.width) || (stage ? stage.width() : 0),\n height: config.height ||\n Math.ceil(box.height) ||\n (stage ? stage.height() : 0),\n pixelRatio: pixelRatio,\n }), context = canvas.getContext();\n if (config.imageSmoothingEnabled === false) {\n context._context.imageSmoothingEnabled = false;\n }\n context.save();\n if (x || y) {\n context.translate(-1 * x, -1 * y);\n }\n this.drawScene(canvas);\n context.restore();\n return canvas;\n }\n toCanvas(config) {\n return this._toKonvaCanvas(config)._canvas;\n }\n toDataURL(config) {\n config = config || {};\n var mimeType = config.mimeType || null, quality = config.quality || null;\n var url = this._toKonvaCanvas(config).toDataURL(mimeType, quality);\n if (config.callback) {\n config.callback(url);\n }\n return url;\n }\n toImage(config) {\n return new Promise((resolve, reject) => {\n try {\n const callback = config === null || config === void 0 ? void 0 : config.callback;\n if (callback)\n delete config.callback;\n Util._urlToImage(this.toDataURL(config), function (img) {\n resolve(img);\n callback === null || callback === void 0 ? void 0 : callback(img);\n });\n }\n catch (err) {\n reject(err);\n }\n });\n }\n toBlob(config) {\n return new Promise((resolve, reject) => {\n try {\n const callback = config === null || config === void 0 ? void 0 : config.callback;\n if (callback)\n delete config.callback;\n this.toCanvas(config).toBlob((blob) => {\n resolve(blob);\n callback === null || callback === void 0 ? void 0 : callback(blob);\n });\n }\n catch (err) {\n reject(err);\n }\n });\n }\n setSize(size) {\n this.width(size.width);\n this.height(size.height);\n return this;\n }\n getSize() {\n return {\n width: this.width(),\n height: this.height(),\n };\n }\n getClassName() {\n return this.className || this.nodeType;\n }\n getType() {\n return this.nodeType;\n }\n getDragDistance() {\n if (this.attrs.dragDistance !== undefined) {\n return this.attrs.dragDistance;\n }\n else if (this.parent) {\n return this.parent.getDragDistance();\n }\n else {\n return Konva.dragDistance;\n }\n }\n _off(type, name, callback) {\n var evtListeners = this.eventListeners[type], i, evtName, handler;\n for (i = 0; i < evtListeners.length; i++) {\n evtName = evtListeners[i].name;\n handler = evtListeners[i].handler;\n if ((evtName !== 'konva' || name === 'konva') &&\n (!name || evtName === name) &&\n (!callback || callback === handler)) {\n evtListeners.splice(i, 1);\n if (evtListeners.length === 0) {\n delete this.eventListeners[type];\n break;\n }\n i--;\n }\n }\n }\n _fireChangeEvent(attr, oldVal, newVal) {\n this._fire(attr + CHANGE, {\n oldVal: oldVal,\n newVal: newVal,\n });\n }\n addName(name) {\n if (!this.hasName(name)) {\n var oldName = this.name();\n var newName = oldName ? oldName + ' ' + name : name;\n this.name(newName);\n }\n return this;\n }\n hasName(name) {\n if (!name) {\n return false;\n }\n const fullName = this.name();\n if (!fullName) {\n return false;\n }\n var names = (fullName || '').split(/\\s/g);\n return names.indexOf(name) !== -1;\n }\n removeName(name) {\n var names = (this.name() || '').split(/\\s/g);\n var index = names.indexOf(name);\n if (index !== -1) {\n names.splice(index, 1);\n this.name(names.join(' '));\n }\n return this;\n }\n setAttr(attr, val) {\n var func = this[SET + Util._capitalize(attr)];\n if (Util._isFunction(func)) {\n func.call(this, val);\n }\n else {\n this._setAttr(attr, val);\n }\n return this;\n }\n _requestDraw() {\n if (Konva.autoDrawEnabled) {\n const drawNode = this.getLayer() || this.getStage();\n drawNode === null || drawNode === void 0 ? void 0 : drawNode.batchDraw();\n }\n }\n _setAttr(key, val) {\n var oldVal = this.attrs[key];\n if (oldVal === val && !Util.isObject(val)) {\n return;\n }\n if (val === undefined || val === null) {\n delete this.attrs[key];\n }\n else {\n this.attrs[key] = val;\n }\n if (this._shouldFireChangeEvents) {\n this._fireChangeEvent(key, oldVal, val);\n }\n this._requestDraw();\n }\n _setComponentAttr(key, component, val) {\n var oldVal;\n if (val !== undefined) {\n oldVal = this.attrs[key];\n if (!oldVal) {\n this.attrs[key] = this.getAttr(key);\n }\n this.attrs[key][component] = val;\n this._fireChangeEvent(key, oldVal, val);\n }\n }\n _fireAndBubble(eventType, evt, compareShape) {\n if (evt && this.nodeType === SHAPE) {\n evt.target = this;\n }\n var shouldStop = (eventType === MOUSEENTER || eventType === MOUSELEAVE) &&\n ((compareShape &&\n (this === compareShape ||\n (this.isAncestorOf && this.isAncestorOf(compareShape)))) ||\n (this.nodeType === 'Stage' && !compareShape));\n if (!shouldStop) {\n this._fire(eventType, evt);\n var stopBubble = (eventType === MOUSEENTER || eventType === MOUSELEAVE) &&\n compareShape &&\n compareShape.isAncestorOf &&\n compareShape.isAncestorOf(this) &&\n !compareShape.isAncestorOf(this.parent);\n if (((evt && !evt.cancelBubble) || !evt) &&\n this.parent &&\n this.parent.isListening() &&\n !stopBubble) {\n if (compareShape && compareShape.parent) {\n this._fireAndBubble.call(this.parent, eventType, evt, compareShape);\n }\n else {\n this._fireAndBubble.call(this.parent, eventType, evt);\n }\n }\n }\n }\n _getProtoListeners(eventType) {\n let listeners = this._cache.get(ALL_LISTENERS);\n if (!listeners) {\n listeners = {};\n let obj = Object.getPrototypeOf(this);\n while (obj) {\n if (!obj.eventListeners) {\n obj = Object.getPrototypeOf(obj);\n continue;\n }\n for (var event in obj.eventListeners) {\n const newEvents = obj.eventListeners[event];\n const oldEvents = listeners[event] || [];\n listeners[event] = newEvents.concat(oldEvents);\n }\n obj = Object.getPrototypeOf(obj);\n }\n this._cache.set(ALL_LISTENERS, listeners);\n }\n return listeners[eventType];\n }\n _fire(eventType, evt) {\n evt = evt || {};\n evt.currentTarget = this;\n evt.type = eventType;\n const topListeners = this._getProtoListeners(eventType);\n if (topListeners) {\n for (var i = 0; i < topListeners.length; i++) {\n topListeners[i].handler.call(this, evt);\n }\n }\n const selfListeners = this.eventListeners[eventType];\n if (selfListeners) {\n for (var i = 0; i < selfListeners.length; i++) {\n selfListeners[i].handler.call(this, evt);\n }\n }\n }\n draw() {\n this.drawScene();\n this.drawHit();\n return this;\n }\n _createDragElement(evt) {\n var pointerId = evt ? evt.pointerId : undefined;\n var stage = this.getStage();\n var ap = this.getAbsolutePosition();\n var pos = stage._getPointerById(pointerId) ||\n stage._changedPointerPositions[0] ||\n ap;\n DD._dragElements.set(this._id, {\n node: this,\n startPointerPos: pos,\n offset: {\n x: pos.x - ap.x,\n y: pos.y - ap.y,\n },\n dragStatus: 'ready',\n pointerId,\n });\n }\n startDrag(evt, bubbleEvent = true) {\n if (!DD._dragElements.has(this._id)) {\n this._createDragElement(evt);\n }\n const elem = DD._dragElements.get(this._id);\n elem.dragStatus = 'dragging';\n this.fire('dragstart', {\n type: 'dragstart',\n target: this,\n evt: evt && evt.evt,\n }, bubbleEvent);\n }\n _setDragPosition(evt, elem) {\n const pos = this.getStage()._getPointerById(elem.pointerId);\n if (!pos) {\n return;\n }\n var newNodePos = {\n x: pos.x - elem.offset.x,\n y: pos.y - elem.offset.y,\n };\n var dbf = this.dragBoundFunc();\n if (dbf !== undefined) {\n const bounded = dbf.call(this, newNodePos, evt);\n if (!bounded) {\n Util.warn('dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.');\n }\n else {\n newNodePos = bounded;\n }\n }\n if (!this._lastPos ||\n this._lastPos.x !== newNodePos.x ||\n this._lastPos.y !== newNodePos.y) {\n this.setAbsolutePosition(newNodePos);\n this._requestDraw();\n }\n this._lastPos = newNodePos;\n }\n stopDrag(evt) {\n const elem = DD._dragElements.get(this._id);\n if (elem) {\n elem.dragStatus = 'stopped';\n }\n DD._endDragBefore(evt);\n DD._endDragAfter(evt);\n }\n setDraggable(draggable) {\n this._setAttr('draggable', draggable);\n this._dragChange();\n }\n isDragging() {\n const elem = DD._dragElements.get(this._id);\n return elem ? elem.dragStatus === 'dragging' : false;\n }\n _listenDrag() {\n this._dragCleanup();\n this.on('mousedown.konva touchstart.konva', function (evt) {\n var shouldCheckButton = evt.evt['button'] !== undefined;\n var canDrag = !shouldCheckButton || Konva.dragButtons.indexOf(evt.evt['button']) >= 0;\n if (!canDrag) {\n return;\n }\n if (this.isDragging()) {\n return;\n }\n var hasDraggingChild = false;\n DD._dragElements.forEach((elem) => {\n if (this.isAncestorOf(elem.node)) {\n hasDraggingChild = true;\n }\n });\n if (!hasDraggingChild) {\n this._createDragElement(evt);\n }\n });\n }\n _dragChange() {\n if (this.attrs.draggable) {\n this._listenDrag();\n }\n else {\n this._dragCleanup();\n var stage = this.getStage();\n if (!stage) {\n return;\n }\n const dragElement = DD._dragElements.get(this._id);\n const isDragging = dragElement && dragElement.dragStatus === 'dragging';\n const isReady = dragElement && dragElement.dragStatus === 'ready';\n if (isDragging) {\n this.stopDrag();\n }\n else if (isReady) {\n DD._dragElements.delete(this._id);\n }\n }\n }\n _dragCleanup() {\n this.off('mousedown.konva');\n this.off('touchstart.konva');\n }\n isClientRectOnScreen(margin = { x: 0, y: 0 }) {\n const stage = this.getStage();\n if (!stage) {\n return false;\n }\n const screenRect = {\n x: -margin.x,\n y: -margin.y,\n width: stage.width() + 2 * margin.x,\n height: stage.height() + 2 * margin.y,\n };\n return Util.haveIntersection(screenRect, this.getClientRect());\n }\n static create(data, container) {\n if (Util._isString(data)) {\n data = JSON.parse(data);\n }\n return this._createNode(data, container);\n }\n static _createNode(obj, container) {\n var className = Node.prototype.getClassName.call(obj), children = obj.children, no, len, n;\n if (container) {\n obj.attrs.container = container;\n }\n if (!Konva[className]) {\n Util.warn('Can not find a node with class name \"' +\n className +\n '\". Fallback to \"Shape\".');\n className = 'Shape';\n }\n const Class = Konva[className];\n no = new Class(obj.attrs);\n if (children) {\n len = children.length;\n for (n = 0; n < len; n++) {\n no.add(Node._createNode(children[n]));\n }\n }\n return no;\n }\n}\nNode.prototype.nodeType = 'Node';\nNode.prototype._attrsAffectingSize = [];\nNode.prototype.eventListeners = {};\nNode.prototype.on.call(Node.prototype, TRANSFORM_CHANGE_STR, function () {\n if (this._batchingTransformChange) {\n this._needClearTransformCache = true;\n return;\n }\n this._clearCache(TRANSFORM);\n this._clearSelfAndDescendantCache(ABSOLUTE_TRANSFORM);\n});\nNode.prototype.on.call(Node.prototype, 'visibleChange.konva', function () {\n this._clearSelfAndDescendantCache(VISIBLE);\n});\nNode.prototype.on.call(Node.prototype, 'listeningChange.konva', function () {\n this._clearSelfAndDescendantCache(LISTENING);\n});\nNode.prototype.on.call(Node.prototype, 'opacityChange.konva', function () {\n this._clearSelfAndDescendantCache(ABSOLUTE_OPACITY);\n});\nconst addGetterSetter = Factory.addGetterSetter;\naddGetterSetter(Node, 'zIndex');\naddGetterSetter(Node, 'absolutePosition');\naddGetterSetter(Node, 'position');\naddGetterSetter(Node, 'x', 0, getNumberValidator());\naddGetterSetter(Node, 'y', 0, getNumberValidator());\naddGetterSetter(Node, 'globalCompositeOperation', 'source-over', getStringValidator());\naddGetterSetter(Node, 'opacity', 1, getNumberValidator());\naddGetterSetter(Node, 'name', '', getStringValidator());\naddGetterSetter(Node, 'id', '', getStringValidator());\naddGetterSetter(Node, 'rotation', 0, getNumberValidator());\nFactory.addComponentsGetterSetter(Node, 'scale', ['x', 'y']);\naddGetterSetter(Node, 'scaleX', 1, getNumberValidator());\naddGetterSetter(Node, 'scaleY', 1, getNumberValidator());\nFactory.addComponentsGetterSetter(Node, 'skew', ['x', 'y']);\naddGetterSetter(Node, 'skewX', 0, getNumberValidator());\naddGetterSetter(Node, 'skewY', 0, getNumberValidator());\nFactory.addComponentsGetterSetter(Node, 'offset', ['x', 'y']);\naddGetterSetter(Node, 'offsetX', 0, getNumberValidator());\naddGetterSetter(Node, 'offsetY', 0, getNumberValidator());\naddGetterSetter(Node, 'dragDistance', null, getNumberValidator());\naddGetterSetter(Node, 'width', 0, getNumberValidator());\naddGetterSetter(Node, 'height', 0, getNumberValidator());\naddGetterSetter(Node, 'listening', true, getBooleanValidator());\naddGetterSetter(Node, 'preventDefault', true, getBooleanValidator());\naddGetterSetter(Node, 'filters', null, function (val) {\n this._filterUpToDate = false;\n return val;\n});\naddGetterSetter(Node, 'visible', true, getBooleanValidator());\naddGetterSetter(Node, 'transformsEnabled', 'all', getStringValidator());\naddGetterSetter(Node, 'size');\naddGetterSetter(Node, 'dragBoundFunc');\naddGetterSetter(Node, 'draggable', false, getBooleanValidator());\nFactory.backCompat(Node, {\n rotateDeg: 'rotate',\n setRotationDeg: 'setRotation',\n getRotationDeg: 'getRotation',\n});\n","import { Factory } from './Factory.js';\nimport { Node } from './Node.js';\nimport { getNumberValidator } from './Validators.js';\nexport class Container extends Node {\n constructor() {\n super(...arguments);\n this.children = [];\n }\n getChildren(filterFunc) {\n if (!filterFunc) {\n return this.children || [];\n }\n const children = this.children || [];\n var results = [];\n children.forEach(function (child) {\n if (filterFunc(child)) {\n results.push(child);\n }\n });\n return results;\n }\n hasChildren() {\n return this.getChildren().length > 0;\n }\n removeChildren() {\n this.getChildren().forEach((child) => {\n child.parent = null;\n child.index = 0;\n child.remove();\n });\n this.children = [];\n this._requestDraw();\n return this;\n }\n destroyChildren() {\n this.getChildren().forEach((child) => {\n child.parent = null;\n child.index = 0;\n child.destroy();\n });\n this.children = [];\n this._requestDraw();\n return this;\n }\n add(...children) {\n if (children.length === 0) {\n return this;\n }\n if (children.length > 1) {\n for (var i = 0; i < children.length; i++) {\n this.add(children[i]);\n }\n return this;\n }\n const child = children[0];\n if (child.getParent()) {\n child.moveTo(this);\n return this;\n }\n this._validateAdd(child);\n child.index = this.getChildren().length;\n child.parent = this;\n child._clearCaches();\n this.getChildren().push(child);\n this._fire('add', {\n child: child,\n });\n this._requestDraw();\n return this;\n }\n destroy() {\n if (this.hasChildren()) {\n this.destroyChildren();\n }\n super.destroy();\n return this;\n }\n find(selector) {\n return this._generalFind(selector, false);\n }\n findOne(selector) {\n var result = this._generalFind(selector, true);\n return result.length > 0 ? result[0] : undefined;\n }\n _generalFind(selector, findOne) {\n var retArr = [];\n this._descendants((node) => {\n const valid = node._isMatch(selector);\n if (valid) {\n retArr.push(node);\n }\n if (valid && findOne) {\n return true;\n }\n return false;\n });\n return retArr;\n }\n _descendants(fn) {\n let shouldStop = false;\n const children = this.getChildren();\n for (const child of children) {\n shouldStop = fn(child);\n if (shouldStop) {\n return true;\n }\n if (!child.hasChildren()) {\n continue;\n }\n shouldStop = child._descendants(fn);\n if (shouldStop) {\n return true;\n }\n }\n return false;\n }\n toObject() {\n var obj = Node.prototype.toObject.call(this);\n obj.children = [];\n this.getChildren().forEach((child) => {\n obj.children.push(child.toObject());\n });\n return obj;\n }\n isAncestorOf(node) {\n var parent = node.getParent();\n while (parent) {\n if (parent._id === this._id) {\n return true;\n }\n parent = parent.getParent();\n }\n return false;\n }\n clone(obj) {\n var node = Node.prototype.clone.call(this, obj);\n this.getChildren().forEach(function (no) {\n node.add(no.clone());\n });\n return node;\n }\n getAllIntersections(pos) {\n var arr = [];\n this.find('Shape').forEach(function (shape) {\n if (shape.isVisible() && shape.intersects(pos)) {\n arr.push(shape);\n }\n });\n return arr;\n }\n _clearSelfAndDescendantCache(attr) {\n var _a;\n super._clearSelfAndDescendantCache(attr);\n if (this.isCached()) {\n return;\n }\n (_a = this.children) === null || _a === void 0 ? void 0 : _a.forEach(function (node) {\n node._clearSelfAndDescendantCache(attr);\n });\n }\n _setChildrenIndices() {\n var _a;\n (_a = this.children) === null || _a === void 0 ? void 0 : _a.forEach(function (child, n) {\n child.index = n;\n });\n this._requestDraw();\n }\n drawScene(can, top) {\n var layer = this.getLayer(), canvas = can || (layer && layer.getCanvas()), context = canvas && canvas.getContext(), cachedCanvas = this._getCanvasCache(), cachedSceneCanvas = cachedCanvas && cachedCanvas.scene;\n var caching = canvas && canvas.isCache;\n if (!this.isVisible() && !caching) {\n return this;\n }\n if (cachedSceneCanvas) {\n context.save();\n var m = this.getAbsoluteTransform(top).getMatrix();\n context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);\n this._drawCachedSceneCanvas(context);\n context.restore();\n }\n else {\n this._drawChildren('drawScene', canvas, top);\n }\n return this;\n }\n drawHit(can, top) {\n if (!this.shouldDrawHit(top)) {\n return this;\n }\n var layer = this.getLayer(), canvas = can || (layer && layer.hitCanvas), context = canvas && canvas.getContext(), cachedCanvas = this._getCanvasCache(), cachedHitCanvas = cachedCanvas && cachedCanvas.hit;\n if (cachedHitCanvas) {\n context.save();\n var m = this.getAbsoluteTransform(top).getMatrix();\n context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);\n this._drawCachedHitCanvas(context);\n context.restore();\n }\n else {\n this._drawChildren('drawHit', canvas, top);\n }\n return this;\n }\n _drawChildren(drawMethod, canvas, top) {\n var _a;\n var context = canvas && canvas.getContext(), clipWidth = this.clipWidth(), clipHeight = this.clipHeight(), clipFunc = this.clipFunc(), hasClip = (clipWidth && clipHeight) || clipFunc;\n const selfCache = top === this;\n if (hasClip) {\n context.save();\n var transform = this.getAbsoluteTransform(top);\n var m = transform.getMatrix();\n context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);\n context.beginPath();\n if (clipFunc) {\n clipFunc.call(this, context, this);\n }\n else {\n var clipX = this.clipX();\n var clipY = this.clipY();\n context.rect(clipX, clipY, clipWidth, clipHeight);\n }\n context.clip();\n m = transform.copy().invert().getMatrix();\n context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);\n }\n var hasComposition = !selfCache &&\n this.globalCompositeOperation() !== 'source-over' &&\n drawMethod === 'drawScene';\n if (hasComposition) {\n context.save();\n context._applyGlobalCompositeOperation(this);\n }\n (_a = this.children) === null || _a === void 0 ? void 0 : _a.forEach(function (child) {\n child[drawMethod](canvas, top);\n });\n if (hasComposition) {\n context.restore();\n }\n if (hasClip) {\n context.restore();\n }\n }\n getClientRect(config) {\n var _a;\n config = config || {};\n var skipTransform = config.skipTransform;\n var relativeTo = config.relativeTo;\n var minX, minY, maxX, maxY;\n var selfRect = {\n x: Infinity,\n y: Infinity,\n width: 0,\n height: 0,\n };\n var that = this;\n (_a = this.children) === null || _a === void 0 ? void 0 : _a.forEach(function (child) {\n if (!child.visible()) {\n return;\n }\n var rect = child.getClientRect({\n relativeTo: that,\n skipShadow: config.skipShadow,\n skipStroke: config.skipStroke,\n });\n if (rect.width === 0 && rect.height === 0) {\n return;\n }\n if (minX === undefined) {\n minX = rect.x;\n minY = rect.y;\n maxX = rect.x + rect.width;\n maxY = rect.y + rect.height;\n }\n else {\n minX = Math.min(minX, rect.x);\n minY = Math.min(minY, rect.y);\n maxX = Math.max(maxX, rect.x + rect.width);\n maxY = Math.max(maxY, rect.y + rect.height);\n }\n });\n var shapes = this.find('Shape');\n var hasVisible = false;\n for (var i = 0; i < shapes.length; i++) {\n var shape = shapes[i];\n if (shape._isVisible(this)) {\n hasVisible = true;\n break;\n }\n }\n if (hasVisible && minX !== undefined) {\n selfRect = {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY,\n };\n }\n else {\n selfRect = {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n };\n }\n if (!skipTransform) {\n return this._transformedRect(selfRect, relativeTo);\n }\n return selfRect;\n }\n}\nFactory.addComponentsGetterSetter(Container, 'clip', [\n 'x',\n 'y',\n 'width',\n 'height',\n]);\nFactory.addGetterSetter(Container, 'clipX', undefined, getNumberValidator());\nFactory.addGetterSetter(Container, 'clipY', undefined, getNumberValidator());\nFactory.addGetterSetter(Container, 'clipWidth', undefined, getNumberValidator());\nFactory.addGetterSetter(Container, 'clipHeight', undefined, getNumberValidator());\nFactory.addGetterSetter(Container, 'clipFunc');\n","import { Konva } from './Global.js';\nconst Captures = new Map();\nconst SUPPORT_POINTER_EVENTS = Konva._global['PointerEvent'] !== undefined;\nexport function getCapturedShape(pointerId) {\n return Captures.get(pointerId);\n}\nexport function createEvent(evt) {\n return {\n evt,\n pointerId: evt.pointerId,\n };\n}\nexport function hasPointerCapture(pointerId, shape) {\n return Captures.get(pointerId) === shape;\n}\nexport function setPointerCapture(pointerId, shape) {\n releaseCapture(pointerId);\n const stage = shape.getStage();\n if (!stage)\n return;\n Captures.set(pointerId, shape);\n if (SUPPORT_POINTER_EVENTS) {\n shape._fire('gotpointercapture', createEvent(new PointerEvent('gotpointercapture')));\n }\n}\nexport function releaseCapture(pointerId, target) {\n const shape = Captures.get(pointerId);\n if (!shape)\n return;\n const stage = shape.getStage();\n if (stage && stage.content) {\n }\n Captures.delete(pointerId);\n if (SUPPORT_POINTER_EVENTS) {\n shape._fire('lostpointercapture', createEvent(new PointerEvent('lostpointercapture')));\n }\n}\n","import { Util } from './Util.js';\nimport { Factory } from './Factory.js';\nimport { Container } from './Container.js';\nimport { Konva } from './Global.js';\nimport { SceneCanvas, HitCanvas } from './Canvas.js';\nimport { DD } from './DragAndDrop.js';\nimport { _registerNode } from './Global.js';\nimport * as PointerEvents from './PointerEvents.js';\nvar STAGE = 'Stage', STRING = 'string', PX = 'px', MOUSEOUT = 'mouseout', MOUSELEAVE = 'mouseleave', MOUSEOVER = 'mouseover', MOUSEENTER = 'mouseenter', MOUSEMOVE = 'mousemove', MOUSEDOWN = 'mousedown', MOUSEUP = 'mouseup', POINTERMOVE = 'pointermove', POINTERDOWN = 'pointerdown', POINTERUP = 'pointerup', POINTERCANCEL = 'pointercancel', LOSTPOINTERCAPTURE = 'lostpointercapture', POINTEROUT = 'pointerout', POINTERLEAVE = 'pointerleave', POINTEROVER = 'pointerover', POINTERENTER = 'pointerenter', CONTEXTMENU = 'contextmenu', TOUCHSTART = 'touchstart', TOUCHEND = 'touchend', TOUCHMOVE = 'touchmove', TOUCHCANCEL = 'touchcancel', WHEEL = 'wheel', MAX_LAYERS_NUMBER = 5, EVENTS = [\n [MOUSEENTER, '_pointerenter'],\n [MOUSEDOWN, '_pointerdown'],\n [MOUSEMOVE, '_pointermove'],\n [MOUSEUP, '_pointerup'],\n [MOUSELEAVE, '_pointerleave'],\n [TOUCHSTART, '_pointerdown'],\n [TOUCHMOVE, '_pointermove'],\n [TOUCHEND, '_pointerup'],\n [TOUCHCANCEL, '_pointercancel'],\n [MOUSEOVER, '_pointerover'],\n [WHEEL, '_wheel'],\n [CONTEXTMENU, '_contextmenu'],\n [POINTERDOWN, '_pointerdown'],\n [POINTERMOVE, '_pointermove'],\n [POINTERUP, '_pointerup'],\n [POINTERCANCEL, '_pointercancel'],\n [LOSTPOINTERCAPTURE, '_lostpointercapture'],\n];\nconst EVENTS_MAP = {\n mouse: {\n [POINTEROUT]: MOUSEOUT,\n [POINTERLEAVE]: MOUSELEAVE,\n [POINTEROVER]: MOUSEOVER,\n [POINTERENTER]: MOUSEENTER,\n [POINTERMOVE]: MOUSEMOVE,\n [POINTERDOWN]: MOUSEDOWN,\n [POINTERUP]: MOUSEUP,\n [POINTERCANCEL]: 'mousecancel',\n pointerclick: 'click',\n pointerdblclick: 'dblclick',\n },\n touch: {\n [POINTEROUT]: 'touchout',\n [POINTERLEAVE]: 'touchleave',\n [POINTEROVER]: 'touchover',\n [POINTERENTER]: 'touchenter',\n [POINTERMOVE]: TOUCHMOVE,\n [POINTERDOWN]: TOUCHSTART,\n [POINTERUP]: TOUCHEND,\n [POINTERCANCEL]: TOUCHCANCEL,\n pointerclick: 'tap',\n pointerdblclick: 'dbltap',\n },\n pointer: {\n [POINTEROUT]: POINTEROUT,\n [POINTERLEAVE]: POINTERLEAVE,\n [POINTEROVER]: POINTEROVER,\n [POINTERENTER]: POINTERENTER,\n [POINTERMOVE]: POINTERMOVE,\n [POINTERDOWN]: POINTERDOWN,\n [POINTERUP]: POINTERUP,\n [POINTERCANCEL]: POINTERCANCEL,\n pointerclick: 'pointerclick',\n pointerdblclick: 'pointerdblclick',\n },\n};\nconst getEventType = (type) => {\n if (type.indexOf('pointer') >= 0) {\n return 'pointer';\n }\n if (type.indexOf('touch') >= 0) {\n return 'touch';\n }\n return 'mouse';\n};\nconst getEventsMap = (eventType) => {\n const type = getEventType(eventType);\n if (type === 'pointer') {\n return Konva.pointerEventsEnabled && EVENTS_MAP.pointer;\n }\n if (type === 'touch') {\n return EVENTS_MAP.touch;\n }\n if (type === 'mouse') {\n return EVENTS_MAP.mouse;\n }\n};\nfunction checkNoClip(attrs = {}) {\n if (attrs.clipFunc || attrs.clipWidth || attrs.clipHeight) {\n Util.warn('Stage does not support clipping. Please use clip for Layers or Groups.');\n }\n return attrs;\n}\nconst NO_POINTERS_MESSAGE = `Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);`;\nexport const stages = [];\nexport class Stage extends Container {\n constructor(config) {\n super(checkNoClip(config));\n this._pointerPositions = [];\n this._changedPointerPositions = [];\n this._buildDOM();\n this._bindContentEvents();\n stages.push(this);\n this.on('widthChange.konva heightChange.konva', this._resizeDOM);\n this.on('visibleChange.konva', this._checkVisibility);\n this.on('clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva', () => {\n checkNoClip(this.attrs);\n });\n this._checkVisibility();\n }\n _validateAdd(child) {\n const isLayer = child.getType() === 'Layer';\n const isFastLayer = child.getType() === 'FastLayer';\n const valid = isLayer || isFastLayer;\n if (!valid) {\n Util.throw('You may only add layers to the stage.');\n }\n }\n _checkVisibility() {\n if (!this.content) {\n return;\n }\n const style = this.visible() ? '' : 'none';\n this.content.style.display = style;\n }\n setContainer(container) {\n if (typeof container === STRING) {\n if (container.charAt(0) === '.') {\n var className = container.slice(1);\n container = document.getElementsByClassName(className)[0];\n }\n else {\n var id;\n if (container.charAt(0) !== '#') {\n id = container;\n }\n else {\n id = container.slice(1);\n }\n container = document.getElementById(id);\n }\n if (!container) {\n throw 'Can not find container in document with id ' + id;\n }\n }\n this._setAttr('container', container);\n if (this.content) {\n if (this.content.parentElement) {\n this.content.parentElement.removeChild(this.content);\n }\n container.appendChild(this.content);\n }\n return this;\n }\n shouldDrawHit() {\n return true;\n }\n clear() {\n var layers = this.children, len = layers.length, n;\n for (n = 0; n < len; n++) {\n layers[n].clear();\n }\n return this;\n }\n clone(obj) {\n if (!obj) {\n obj = {};\n }\n obj.container =\n typeof document !== 'undefined' && document.createElement('div');\n return Container.prototype.clone.call(this, obj);\n }\n destroy() {\n super.destroy();\n var content = this.content;\n if (content && Util._isInDocument(content)) {\n this.container().removeChild(content);\n }\n var index = stages.indexOf(this);\n if (index > -1) {\n stages.splice(index, 1);\n }\n Util.releaseCanvas(this.bufferCanvas._canvas, this.bufferHitCanvas._canvas);\n return this;\n }\n getPointerPosition() {\n const pos = this._pointerPositions[0] || this._changedPointerPositions[0];\n if (!pos) {\n Util.warn(NO_POINTERS_MESSAGE);\n return null;\n }\n return {\n x: pos.x,\n y: pos.y,\n };\n }\n _getPointerById(id) {\n return this._pointerPositions.find((p) => p.id === id);\n }\n getPointersPositions() {\n return this._pointerPositions;\n }\n getStage() {\n return this;\n }\n getContent() {\n return this.content;\n }\n _toKonvaCanvas(config) {\n config = config || {};\n config.x = config.x || 0;\n config.y = config.y || 0;\n config.width = config.width || this.width();\n config.height = config.height || this.height();\n var canvas = new SceneCanvas({\n width: config.width,\n height: config.height,\n pixelRatio: config.pixelRatio || 1,\n });\n var _context = canvas.getContext()._context;\n var layers = this.children;\n if (config.x || config.y) {\n _context.translate(-1 * config.x, -1 * config.y);\n }\n layers.forEach(function (layer) {\n if (!layer.isVisible()) {\n return;\n }\n var layerCanvas = layer._toKonvaCanvas(config);\n _context.drawImage(layerCanvas._canvas, config.x, config.y, layerCanvas.getWidth() / layerCanvas.getPixelRatio(), layerCanvas.getHeight() / layerCanvas.getPixelRatio());\n });\n return canvas;\n }\n getIntersection(pos) {\n if (!pos) {\n return null;\n }\n var layers = this.children, len = layers.length, end = len - 1, n;\n for (n = end; n >= 0; n--) {\n const shape = layers[n].getIntersection(pos);\n if (shape) {\n return shape;\n }\n }\n return null;\n }\n _resizeDOM() {\n var width = this.width();\n var height = this.height();\n if (this.content) {\n this.content.style.width = width + PX;\n this.content.style.height = height + PX;\n }\n this.bufferCanvas.setSize(width, height);\n this.bufferHitCanvas.setSize(width, height);\n this.children.forEach((layer) => {\n layer.setSize({ width, height });\n layer.draw();\n });\n }\n add(layer, ...rest) {\n if (arguments.length > 1) {\n for (var i = 0; i < arguments.length; i++) {\n this.add(arguments[i]);\n }\n return this;\n }\n super.add(layer);\n var length = this.children.length;\n if (length > MAX_LAYERS_NUMBER) {\n Util.warn('The stage has ' +\n length +\n ' layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group.');\n }\n layer.setSize({ width: this.width(), height: this.height() });\n layer.draw();\n if (Konva.isBrowser) {\n this.content.appendChild(layer.canvas._canvas);\n }\n return this;\n }\n getParent() {\n return null;\n }\n getLayer() {\n return null;\n }\n hasPointerCapture(pointerId) {\n return PointerEvents.hasPointerCapture(pointerId, this);\n }\n setPointerCapture(pointerId) {\n PointerEvents.setPointerCapture(pointerId, this);\n }\n releaseCapture(pointerId) {\n PointerEvents.releaseCapture(pointerId, this);\n }\n getLayers() {\n return this.children;\n }\n _bindContentEvents() {\n if (!Konva.isBrowser) {\n return;\n }\n EVENTS.forEach(([event, methodName]) => {\n this.content.addEventListener(event, (evt) => {\n this[methodName](evt);\n }, { passive: false });\n });\n }\n _pointerenter(evt) {\n this.setPointersPositions(evt);\n const events = getEventsMap(evt.type);\n this._fire(events.pointerenter, {\n evt: evt,\n target: this,\n currentTarget: this,\n });\n }\n _pointerover(evt) {\n this.setPointersPositions(evt);\n const events = getEventsMap(evt.type);\n this._fire(events.pointerover, {\n evt: evt,\n target: this,\n currentTarget: this,\n });\n }\n _getTargetShape(evenType) {\n let shape = this[evenType + 'targetShape'];\n if (shape && !shape.getStage()) {\n shape = null;\n }\n return shape;\n }\n _pointerleave(evt) {\n const events = getEventsMap(evt.type);\n const eventType = getEventType(evt.type);\n if (!events) {\n return;\n }\n this.setPointersPositions(evt);\n var targetShape = this._getTargetShape(eventType);\n var eventsEnabled = !DD.isDragging || Konva.hitOnDragEnabled;\n if (targetShape && eventsEnabled) {\n targetShape._fireAndBubble(events.pointerout, { evt: evt });\n targetShape._fireAndBubble(events.pointerleave, { evt: evt });\n this._fire(events.pointerleave, {\n evt: evt,\n target: this,\n currentTarget: this,\n });\n this[eventType + 'targetShape'] = null;\n }\n else if (eventsEnabled) {\n this._fire(events.pointerleave, {\n evt: evt,\n target: this,\n currentTarget: this,\n });\n this._fire(events.pointerout, {\n evt: evt,\n target: this,\n currentTarget: this,\n });\n }\n this.pointerPos = undefined;\n this._pointerPositions = [];\n }\n _pointerdown(evt) {\n const events = getEventsMap(evt.type);\n const eventType = getEventType(evt.type);\n if (!events) {\n return;\n }\n this.setPointersPositions(evt);\n var triggeredOnShape = false;\n this._changedPointerPositions.forEach((pos) => {\n var shape = this.getIntersection(pos);\n DD.justDragged = false;\n Konva['_' + eventType + 'ListenClick'] = true;\n const hasShape = shape && shape.isListening();\n if (!hasShape) {\n return;\n }\n if (Konva.capturePointerEventsEnabled) {\n shape.setPointerCapture(pos.id);\n }\n this[eventType + 'ClickStartShape'] = shape;\n shape._fireAndBubble(events.pointerdown, {\n evt: evt,\n pointerId: pos.id,\n });\n triggeredOnShape = true;\n const isTouch = evt.type.indexOf('touch') >= 0;\n if (shape.preventDefault() && evt.cancelable && isTouch) {\n evt.preventDefault();\n }\n });\n if (!triggeredOnShape) {\n this._fire(events.pointerdown, {\n evt: evt,\n target: this,\n currentTarget: this,\n pointerId: this._pointerPositions[0].id,\n });\n }\n }\n _pointermove(evt) {\n const events = getEventsMap(evt.type);\n const eventType = getEventType(evt.type);\n if (!events) {\n return;\n }\n if (DD.isDragging && DD.node.preventDefault() && evt.cancelable) {\n evt.preventDefault();\n }\n this.setPointersPositions(evt);\n var eventsEnabled = !DD.isDragging || Konva.hitOnDragEnabled;\n if (!eventsEnabled) {\n return;\n }\n var processedShapesIds = {};\n let triggeredOnShape = false;\n var targetShape = this._getTargetShape(eventType);\n this._changedPointerPositions.forEach((pos) => {\n const shape = (PointerEvents.getCapturedShape(pos.id) ||\n this.getIntersection(pos));\n const pointerId = pos.id;\n const event = { evt: evt, pointerId };\n var differentTarget = targetShape !== shape;\n if (differentTarget && targetShape) {\n targetShape._fireAndBubble(events.pointerout, Object.assign({}, event), shape);\n targetShape._fireAndBubble(events.pointerleave, Object.assign({}, event), shape);\n }\n if (shape) {\n if (processedShapesIds[shape._id]) {\n return;\n }\n processedShapesIds[shape._id] = true;\n }\n if (shape && shape.isListening()) {\n triggeredOnShape = true;\n if (differentTarget) {\n shape._fireAndBubble(events.pointerover, Object.assign({}, event), targetShape);\n shape._fireAndBubble(events.pointerenter, Object.assign({}, event), targetShape);\n this[eventType + 'targetShape'] = shape;\n }\n shape._fireAndBubble(events.pointermove, Object.assign({}, event));\n }\n else {\n if (targetShape) {\n this._fire(events.pointerover, {\n evt: evt,\n target: this,\n currentTarget: this,\n pointerId,\n });\n this[eventType + 'targetShape'] = null;\n }\n }\n });\n if (!triggeredOnShape) {\n this._fire(events.pointermove, {\n evt: evt,\n target: this,\n currentTarget: this,\n pointerId: this._changedPointerPositions[0].id,\n });\n }\n }\n _pointerup(evt) {\n const events = getEventsMap(evt.type);\n const eventType = getEventType(evt.type);\n if (!events) {\n return;\n }\n this.setPointersPositions(evt);\n const clickStartShape = this[eventType + 'ClickStartShape'];\n const clickEndShape = this[eventType + 'ClickEndShape'];\n var processedShapesIds = {};\n let triggeredOnShape = false;\n this._changedPointerPositions.forEach((pos) => {\n const shape = (PointerEvents.getCapturedShape(pos.id) ||\n this.getIntersection(pos));\n if (shape) {\n shape.releaseCapture(pos.id);\n if (processedShapesIds[shape._id]) {\n return;\n }\n processedShapesIds[shape._id] = true;\n }\n const pointerId = pos.id;\n const event = { evt: evt, pointerId };\n let fireDblClick = false;\n if (Konva['_' + eventType + 'InDblClickWindow']) {\n fireDblClick = true;\n clearTimeout(this[eventType + 'DblTimeout']);\n }\n else if (!DD.justDragged) {\n Konva['_' + eventType + 'InDblClickWindow'] = true;\n clearTimeout(this[eventType + 'DblTimeout']);\n }\n this[eventType + 'DblTimeout'] = setTimeout(function () {\n Konva['_' + eventType + 'InDblClickWindow'] = false;\n }, Konva.dblClickWindow);\n if (shape && shape.isListening()) {\n triggeredOnShape = true;\n this[eventType + 'ClickEndShape'] = shape;\n shape._fireAndBubble(events.pointerup, Object.assign({}, event));\n if (Konva['_' + eventType + 'ListenClick'] &&\n clickStartShape &&\n clickStartShape === shape) {\n shape._fireAndBubble(events.pointerclick, Object.assign({}, event));\n if (fireDblClick && clickEndShape && clickEndShape === shape) {\n shape._fireAndBubble(events.pointerdblclick, Object.assign({}, event));\n }\n }\n }\n else {\n this[eventType + 'ClickEndShape'] = null;\n if (Konva['_' + eventType + 'ListenClick']) {\n this._fire(events.pointerclick, {\n evt: evt,\n target: this,\n currentTarget: this,\n pointerId,\n });\n }\n if (fireDblClick) {\n this._fire(events.pointerdblclick, {\n evt: evt,\n target: this,\n currentTarget: this,\n pointerId,\n });\n }\n }\n });\n if (!triggeredOnShape) {\n this._fire(events.pointerup, {\n evt: evt,\n target: this,\n currentTarget: this,\n pointerId: this._changedPointerPositions[0].id,\n });\n }\n Konva['_' + eventType + 'ListenClick'] = false;\n if (evt.cancelable && eventType !== 'touch') {\n evt.preventDefault();\n }\n }\n _contextmenu(evt) {\n this.setPointersPositions(evt);\n var shape = this.getIntersection(this.getPointerPosition());\n if (shape && shape.isListening()) {\n shape._fireAndBubble(CONTEXTMENU, { evt: evt });\n }\n else {\n this._fire(CONTEXTMENU, {\n evt: evt,\n target: this,\n currentTarget: this,\n });\n }\n }\n _wheel(evt) {\n this.setPointersPositions(evt);\n var shape = this.getIntersection(this.getPointerPosition());\n if (shape && shape.isListening()) {\n shape._fireAndBubble(WHEEL, { evt: evt });\n }\n else {\n this._fire(WHEEL, {\n evt: evt,\n target: this,\n currentTarget: this,\n });\n }\n }\n _pointercancel(evt) {\n this.setPointersPositions(evt);\n const shape = PointerEvents.getCapturedShape(evt.pointerId) ||\n this.getIntersection(this.getPointerPosition());\n if (shape) {\n shape._fireAndBubble(POINTERUP, PointerEvents.createEvent(evt));\n }\n PointerEvents.releaseCapture(evt.pointerId);\n }\n _lostpointercapture(evt) {\n PointerEvents.releaseCapture(evt.pointerId);\n }\n setPointersPositions(evt) {\n var contentPosition = this._getContentPosition(), x = null, y = null;\n evt = evt ? evt : window.event;\n if (evt.touches !== undefined) {\n this._pointerPositions = [];\n this._changedPointerPositions = [];\n Array.prototype.forEach.call(evt.touches, (touch) => {\n this._pointerPositions.push({\n id: touch.identifier,\n x: (touch.clientX - contentPosition.left) / contentPosition.scaleX,\n y: (touch.clientY - contentPosition.top) / contentPosition.scaleY,\n });\n });\n Array.prototype.forEach.call(evt.changedTouches || evt.touches, (touch) => {\n this._changedPointerPositions.push({\n id: touch.identifier,\n x: (touch.clientX - contentPosition.left) / contentPosition.scaleX,\n y: (touch.clientY - contentPosition.top) / contentPosition.scaleY,\n });\n });\n }\n else {\n x = (evt.clientX - contentPosition.left) / contentPosition.scaleX;\n y = (evt.clientY - contentPosition.top) / contentPosition.scaleY;\n this.pointerPos = {\n x: x,\n y: y,\n };\n this._pointerPositions = [{ x, y, id: Util._getFirstPointerId(evt) }];\n this._changedPointerPositions = [\n { x, y, id: Util._getFirstPointerId(evt) },\n ];\n }\n }\n _setPointerPosition(evt) {\n Util.warn('Method _setPointerPosition is deprecated. Use \"stage.setPointersPositions(event)\" instead.');\n this.setPointersPositions(evt);\n }\n _getContentPosition() {\n if (!this.content || !this.content.getBoundingClientRect) {\n return {\n top: 0,\n left: 0,\n scaleX: 1,\n scaleY: 1,\n };\n }\n var rect = this.content.getBoundingClientRect();\n return {\n top: rect.top,\n left: rect.left,\n scaleX: rect.width / this.content.clientWidth || 1,\n scaleY: rect.height / this.content.clientHeight || 1,\n };\n }\n _buildDOM() {\n this.bufferCanvas = new SceneCanvas({\n width: this.width(),\n height: this.height(),\n });\n this.bufferHitCanvas = new HitCanvas({\n pixelRatio: 1,\n width: this.width(),\n height: this.height(),\n });\n if (!Konva.isBrowser) {\n return;\n }\n var container = this.container();\n if (!container) {\n throw 'Stage has no container. A container is required.';\n }\n container.innerHTML = '';\n this.content = document.createElement('div');\n this.content.style.position = 'relative';\n this.content.style.userSelect = 'none';\n this.content.className = 'konvajs-content';\n this.content.setAttribute('role', 'presentation');\n container.appendChild(this.content);\n this._resizeDOM();\n }\n cache() {\n Util.warn('Cache function is not allowed for stage. You may use cache only for layers, groups and shapes.');\n return this;\n }\n clearCache() {\n return this;\n }\n batchDraw() {\n this.getChildren().forEach(function (layer) {\n layer.batchDraw();\n });\n return this;\n }\n}\nStage.prototype.nodeType = STAGE;\n_registerNode(Stage);\nFactory.addGetterSetter(Stage, 'container');\n","import { Konva } from './Global.js';\nimport { Transform, Util } from './Util.js';\nimport { Factory } from './Factory.js';\nimport { Node } from './Node.js';\nimport { getNumberValidator, getNumberOrAutoValidator, getStringValidator, getBooleanValidator, getStringOrGradientValidator, } from './Validators.js';\nimport { _registerNode } from './Global.js';\nimport * as PointerEvents from './PointerEvents.js';\nvar HAS_SHADOW = 'hasShadow';\nvar SHADOW_RGBA = 'shadowRGBA';\nvar patternImage = 'patternImage';\nvar linearGradient = 'linearGradient';\nvar radialGradient = 'radialGradient';\nlet dummyContext;\nfunction getDummyContext() {\n if (dummyContext) {\n return dummyContext;\n }\n dummyContext = Util.createCanvasElement().getContext('2d');\n return dummyContext;\n}\nexport const shapes = {};\nfunction _fillFunc(context) {\n context.fill();\n}\nfunction _strokeFunc(context) {\n context.stroke();\n}\nfunction _fillFuncHit(context) {\n context.fill();\n}\nfunction _strokeFuncHit(context) {\n context.stroke();\n}\nfunction _clearHasShadowCache() {\n this._clearCache(HAS_SHADOW);\n}\nfunction _clearGetShadowRGBACache() {\n this._clearCache(SHADOW_RGBA);\n}\nfunction _clearFillPatternCache() {\n this._clearCache(patternImage);\n}\nfunction _clearLinearGradientCache() {\n this._clearCache(linearGradient);\n}\nfunction _clearRadialGradientCache() {\n this._clearCache(radialGradient);\n}\nexport class Shape extends Node {\n constructor(config) {\n super(config);\n let key;\n while (true) {\n key = Util.getRandomColor();\n if (key && !(key in shapes)) {\n break;\n }\n }\n this.colorKey = key;\n shapes[key] = this;\n }\n getContext() {\n Util.warn('shape.getContext() method is deprecated. Please do not use it.');\n return this.getLayer().getContext();\n }\n getCanvas() {\n Util.warn('shape.getCanvas() method is deprecated. Please do not use it.');\n return this.getLayer().getCanvas();\n }\n getSceneFunc() {\n return this.attrs.sceneFunc || this['_sceneFunc'];\n }\n getHitFunc() {\n return this.attrs.hitFunc || this['_hitFunc'];\n }\n hasShadow() {\n return this._getCache(HAS_SHADOW, this._hasShadow);\n }\n _hasShadow() {\n return (this.shadowEnabled() &&\n this.shadowOpacity() !== 0 &&\n !!(this.shadowColor() ||\n this.shadowBlur() ||\n this.shadowOffsetX() ||\n this.shadowOffsetY()));\n }\n _getFillPattern() {\n return this._getCache(patternImage, this.__getFillPattern);\n }\n __getFillPattern() {\n if (this.fillPatternImage()) {\n var ctx = getDummyContext();\n const pattern = ctx.createPattern(this.fillPatternImage(), this.fillPatternRepeat() || 'repeat');\n if (pattern && pattern.setTransform) {\n const tr = new Transform();\n tr.translate(this.fillPatternX(), this.fillPatternY());\n tr.rotate(Konva.getAngle(this.fillPatternRotation()));\n tr.scale(this.fillPatternScaleX(), this.fillPatternScaleY());\n tr.translate(-1 * this.fillPatternOffsetX(), -1 * this.fillPatternOffsetY());\n const m = tr.getMatrix();\n const matrix = typeof DOMMatrix === 'undefined'\n ? {\n a: m[0],\n b: m[1],\n c: m[2],\n d: m[3],\n e: m[4],\n f: m[5],\n }\n : new DOMMatrix(m);\n pattern.setTransform(matrix);\n }\n return pattern;\n }\n }\n _getLinearGradient() {\n return this._getCache(linearGradient, this.__getLinearGradient);\n }\n __getLinearGradient() {\n var colorStops = this.fillLinearGradientColorStops();\n if (colorStops) {\n var ctx = getDummyContext();\n var start = this.fillLinearGradientStartPoint();\n var end = this.fillLinearGradientEndPoint();\n var grd = ctx.createLinearGradient(start.x, start.y, end.x, end.y);\n for (var n = 0; n < colorStops.length; n += 2) {\n grd.addColorStop(colorStops[n], colorStops[n + 1]);\n }\n return grd;\n }\n }\n _getRadialGradient() {\n return this._getCache(radialGradient, this.__getRadialGradient);\n }\n __getRadialGradient() {\n var colorStops = this.fillRadialGradientColorStops();\n if (colorStops) {\n var ctx = getDummyContext();\n var start = this.fillRadialGradientStartPoint();\n var end = this.fillRadialGradientEndPoint();\n var grd = ctx.createRadialGradient(start.x, start.y, this.fillRadialGradientStartRadius(), end.x, end.y, this.fillRadialGradientEndRadius());\n for (var n = 0; n < colorStops.length; n += 2) {\n grd.addColorStop(colorStops[n], colorStops[n + 1]);\n }\n return grd;\n }\n }\n getShadowRGBA() {\n return this._getCache(SHADOW_RGBA, this._getShadowRGBA);\n }\n _getShadowRGBA() {\n if (!this.hasShadow()) {\n return;\n }\n var rgba = Util.colorToRGBA(this.shadowColor());\n if (rgba) {\n return ('rgba(' +\n rgba.r +\n ',' +\n rgba.g +\n ',' +\n rgba.b +\n ',' +\n rgba.a * (this.shadowOpacity() || 1) +\n ')');\n }\n }\n hasFill() {\n return this._calculate('hasFill', [\n 'fillEnabled',\n 'fill',\n 'fillPatternImage',\n 'fillLinearGradientColorStops',\n 'fillRadialGradientColorStops',\n ], () => {\n return (this.fillEnabled() &&\n !!(this.fill() ||\n this.fillPatternImage() ||\n this.fillLinearGradientColorStops() ||\n this.fillRadialGradientColorStops()));\n });\n }\n hasStroke() {\n return this._calculate('hasStroke', [\n 'strokeEnabled',\n 'strokeWidth',\n 'stroke',\n 'strokeLinearGradientColorStops',\n ], () => {\n return (this.strokeEnabled() &&\n this.strokeWidth() &&\n !!(this.stroke() || this.strokeLinearGradientColorStops()));\n });\n }\n hasHitStroke() {\n const width = this.hitStrokeWidth();\n if (width === 'auto') {\n return this.hasStroke();\n }\n return this.strokeEnabled() && !!width;\n }\n intersects(point) {\n var stage = this.getStage(), bufferHitCanvas = stage.bufferHitCanvas, p;\n bufferHitCanvas.getContext().clear();\n this.drawHit(bufferHitCanvas, null, true);\n p = bufferHitCanvas.context.getImageData(Math.round(point.x), Math.round(point.y), 1, 1).data;\n return p[3] > 0;\n }\n destroy() {\n Node.prototype.destroy.call(this);\n delete shapes[this.colorKey];\n delete this.colorKey;\n return this;\n }\n _useBufferCanvas(forceFill) {\n var _a;\n if (!this.getStage()) {\n return false;\n }\n const perfectDrawEnabled = (_a = this.attrs.perfectDrawEnabled) !== null && _a !== void 0 ? _a : true;\n if (!perfectDrawEnabled) {\n return false;\n }\n const hasFill = forceFill || this.hasFill();\n const hasStroke = this.hasStroke();\n const isTransparent = this.getAbsoluteOpacity() !== 1;\n if (hasFill && hasStroke && isTransparent) {\n return true;\n }\n const hasShadow = this.hasShadow();\n const strokeForShadow = this.shadowForStrokeEnabled();\n if (hasFill && hasStroke && hasShadow && strokeForShadow) {\n return true;\n }\n return false;\n }\n setStrokeHitEnabled(val) {\n Util.warn('strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead.');\n if (val) {\n this.hitStrokeWidth('auto');\n }\n else {\n this.hitStrokeWidth(0);\n }\n }\n getStrokeHitEnabled() {\n if (this.hitStrokeWidth() === 0) {\n return false;\n }\n else {\n return true;\n }\n }\n getSelfRect() {\n var size = this.size();\n return {\n x: this._centroid ? -size.width / 2 : 0,\n y: this._centroid ? -size.height / 2 : 0,\n width: size.width,\n height: size.height,\n };\n }\n getClientRect(config = {}) {\n const skipTransform = config.skipTransform;\n const relativeTo = config.relativeTo;\n const fillRect = this.getSelfRect();\n const applyStroke = !config.skipStroke && this.hasStroke();\n const strokeWidth = (applyStroke && this.strokeWidth()) || 0;\n const fillAndStrokeWidth = fillRect.width + strokeWidth;\n const fillAndStrokeHeight = fillRect.height + strokeWidth;\n const applyShadow = !config.skipShadow && this.hasShadow();\n const shadowOffsetX = applyShadow ? this.shadowOffsetX() : 0;\n const shadowOffsetY = applyShadow ? this.shadowOffsetY() : 0;\n const preWidth = fillAndStrokeWidth + Math.abs(shadowOffsetX);\n const preHeight = fillAndStrokeHeight + Math.abs(shadowOffsetY);\n const blurRadius = (applyShadow && this.shadowBlur()) || 0;\n const width = preWidth + blurRadius * 2;\n const height = preHeight + blurRadius * 2;\n const rect = {\n width: width,\n height: height,\n x: -(strokeWidth / 2 + blurRadius) +\n Math.min(shadowOffsetX, 0) +\n fillRect.x,\n y: -(strokeWidth / 2 + blurRadius) +\n Math.min(shadowOffsetY, 0) +\n fillRect.y,\n };\n if (!skipTransform) {\n return this._transformedRect(rect, relativeTo);\n }\n return rect;\n }\n drawScene(can, top) {\n var layer = this.getLayer(), canvas = can || layer.getCanvas(), context = canvas.getContext(), cachedCanvas = this._getCanvasCache(), drawFunc = this.getSceneFunc(), hasShadow = this.hasShadow(), stage, bufferCanvas, bufferContext;\n var skipBuffer = canvas.isCache;\n var cachingSelf = top === this;\n if (!this.isVisible() && !cachingSelf) {\n return this;\n }\n if (cachedCanvas) {\n context.save();\n var m = this.getAbsoluteTransform(top).getMatrix();\n context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);\n this._drawCachedSceneCanvas(context);\n context.restore();\n return this;\n }\n if (!drawFunc) {\n return this;\n }\n context.save();\n if (this._useBufferCanvas() && !skipBuffer) {\n stage = this.getStage();\n bufferCanvas = stage.bufferCanvas;\n bufferContext = bufferCanvas.getContext();\n bufferContext.clear();\n bufferContext.save();\n bufferContext._applyLineJoin(this);\n var o = this.getAbsoluteTransform(top).getMatrix();\n bufferContext.transform(o[0], o[1], o[2], o[3], o[4], o[5]);\n drawFunc.call(this, bufferContext, this);\n bufferContext.restore();\n var ratio = bufferCanvas.pixelRatio;\n if (hasShadow) {\n context._applyShadow(this);\n }\n context._applyOpacity(this);\n context._applyGlobalCompositeOperation(this);\n context.drawImage(bufferCanvas._canvas, 0, 0, bufferCanvas.width / ratio, bufferCanvas.height / ratio);\n }\n else {\n context._applyLineJoin(this);\n if (!cachingSelf) {\n var o = this.getAbsoluteTransform(top).getMatrix();\n context.transform(o[0], o[1], o[2], o[3], o[4], o[5]);\n context._applyOpacity(this);\n context._applyGlobalCompositeOperation(this);\n }\n if (hasShadow) {\n context._applyShadow(this);\n }\n drawFunc.call(this, context, this);\n }\n context.restore();\n return this;\n }\n drawHit(can, top, skipDragCheck = false) {\n if (!this.shouldDrawHit(top, skipDragCheck)) {\n return this;\n }\n var layer = this.getLayer(), canvas = can || layer.hitCanvas, context = canvas && canvas.getContext(), drawFunc = this.hitFunc() || this.sceneFunc(), cachedCanvas = this._getCanvasCache(), cachedHitCanvas = cachedCanvas && cachedCanvas.hit;\n if (!this.colorKey) {\n Util.warn('Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()');\n }\n if (cachedHitCanvas) {\n context.save();\n var m = this.getAbsoluteTransform(top).getMatrix();\n context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);\n this._drawCachedHitCanvas(context);\n context.restore();\n return this;\n }\n if (!drawFunc) {\n return this;\n }\n context.save();\n context._applyLineJoin(this);\n const selfCache = this === top;\n if (!selfCache) {\n var o = this.getAbsoluteTransform(top).getMatrix();\n context.transform(o[0], o[1], o[2], o[3], o[4], o[5]);\n }\n drawFunc.call(this, context, this);\n context.restore();\n return this;\n }\n drawHitFromCache(alphaThreshold = 0) {\n var cachedCanvas = this._getCanvasCache(), sceneCanvas = this._getCachedSceneCanvas(), hitCanvas = cachedCanvas.hit, hitContext = hitCanvas.getContext(), hitWidth = hitCanvas.getWidth(), hitHeight = hitCanvas.getHeight(), hitImageData, hitData, len, rgbColorKey, i, alpha;\n hitContext.clear();\n hitContext.drawImage(sceneCanvas._canvas, 0, 0, hitWidth, hitHeight);\n try {\n hitImageData = hitContext.getImageData(0, 0, hitWidth, hitHeight);\n hitData = hitImageData.data;\n len = hitData.length;\n rgbColorKey = Util._hexToRgb(this.colorKey);\n for (i = 0; i < len; i += 4) {\n alpha = hitData[i + 3];\n if (alpha > alphaThreshold) {\n hitData[i] = rgbColorKey.r;\n hitData[i + 1] = rgbColorKey.g;\n hitData[i + 2] = rgbColorKey.b;\n hitData[i + 3] = 255;\n }\n else {\n hitData[i + 3] = 0;\n }\n }\n hitContext.putImageData(hitImageData, 0, 0);\n }\n catch (e) {\n Util.error('Unable to draw hit graph from cached scene canvas. ' + e.message);\n }\n return this;\n }\n hasPointerCapture(pointerId) {\n return PointerEvents.hasPointerCapture(pointerId, this);\n }\n setPointerCapture(pointerId) {\n PointerEvents.setPointerCapture(pointerId, this);\n }\n releaseCapture(pointerId) {\n PointerEvents.releaseCapture(pointerId, this);\n }\n}\nShape.prototype._fillFunc = _fillFunc;\nShape.prototype._strokeFunc = _strokeFunc;\nShape.prototype._fillFuncHit = _fillFuncHit;\nShape.prototype._strokeFuncHit = _strokeFuncHit;\nShape.prototype._centroid = false;\nShape.prototype.nodeType = 'Shape';\n_registerNode(Shape);\nShape.prototype.eventListeners = {};\nShape.prototype.on.call(Shape.prototype, 'shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva', _clearHasShadowCache);\nShape.prototype.on.call(Shape.prototype, 'shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva', _clearGetShadowRGBACache);\nShape.prototype.on.call(Shape.prototype, 'fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva', _clearFillPatternCache);\nShape.prototype.on.call(Shape.prototype, 'fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva', _clearLinearGradientCache);\nShape.prototype.on.call(Shape.prototype, 'fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva', _clearRadialGradientCache);\nFactory.addGetterSetter(Shape, 'stroke', undefined, getStringOrGradientValidator());\nFactory.addGetterSetter(Shape, 'strokeWidth', 2, getNumberValidator());\nFactory.addGetterSetter(Shape, 'fillAfterStrokeEnabled', false);\nFactory.addGetterSetter(Shape, 'hitStrokeWidth', 'auto', getNumberOrAutoValidator());\nFactory.addGetterSetter(Shape, 'strokeHitEnabled', true, getBooleanValidator());\nFactory.addGetterSetter(Shape, 'perfectDrawEnabled', true, getBooleanValidator());\nFactory.addGetterSetter(Shape, 'shadowForStrokeEnabled', true, getBooleanValidator());\nFactory.addGetterSetter(Shape, 'lineJoin');\nFactory.addGetterSetter(Shape, 'lineCap');\nFactory.addGetterSetter(Shape, 'sceneFunc');\nFactory.addGetterSetter(Shape, 'hitFunc');\nFactory.addGetterSetter(Shape, 'dash');\nFactory.addGetterSetter(Shape, 'dashOffset', 0, getNumberValidator());\nFactory.addGetterSetter(Shape, 'shadowColor', undefined, getStringValidator());\nFactory.addGetterSetter(Shape, 'shadowBlur', 0, getNumberValidator());\nFactory.addGetterSetter(Shape, 'shadowOpacity', 1, getNumberValidator());\nFactory.addComponentsGetterSetter(Shape, 'shadowOffset', ['x', 'y']);\nFactory.addGetterSetter(Shape, 'shadowOffsetX', 0, getNumberValidator());\nFactory.addGetterSetter(Shape, 'shadowOffsetY', 0, getNumberValidator());\nFactory.addGetterSetter(Shape, 'fillPatternImage');\nFactory.addGetterSetter(Shape, 'fill', undefined, getStringOrGradientValidator());\nFactory.addGetterSetter(Shape, 'fillPatternX', 0, getNumberValidator());\nFactory.addGetterSetter(Shape, 'fillPatternY', 0, getNumberValidator());\nFactory.addGetterSetter(Shape, 'fillLinearGradientColorStops');\nFactory.addGetterSetter(Shape, 'strokeLinearGradientColorStops');\nFactory.addGetterSetter(Shape, 'fillRadialGradientStartRadius', 0);\nFactory.addGetterSetter(Shape, 'fillRadialGradientEndRadius', 0);\nFactory.addGetterSetter(Shape, 'fillRadialGradientColorStops');\nFactory.addGetterSetter(Shape, 'fillPatternRepeat', 'repeat');\nFactory.addGetterSetter(Shape, 'fillEnabled', true);\nFactory.addGetterSetter(Shape, 'strokeEnabled', true);\nFactory.addGetterSetter(Shape, 'shadowEnabled', true);\nFactory.addGetterSetter(Shape, 'dashEnabled', true);\nFactory.addGetterSetter(Shape, 'strokeScaleEnabled', true);\nFactory.addGetterSetter(Shape, 'fillPriority', 'color');\nFactory.addComponentsGetterSetter(Shape, 'fillPatternOffset', ['x', 'y']);\nFactory.addGetterSetter(Shape, 'fillPatternOffsetX', 0, getNumberValidator());\nFactory.addGetterSetter(Shape, 'fillPatternOffsetY', 0, getNumberValidator());\nFactory.addComponentsGetterSetter(Shape, 'fillPatternScale', ['x', 'y']);\nFactory.addGetterSetter(Shape, 'fillPatternScaleX', 1, getNumberValidator());\nFactory.addGetterSetter(Shape, 'fillPatternScaleY', 1, getNumberValidator());\nFactory.addComponentsGetterSetter(Shape, 'fillLinearGradientStartPoint', [\n 'x',\n 'y',\n]);\nFactory.addComponentsGetterSetter(Shape, 'strokeLinearGradientStartPoint', [\n 'x',\n 'y',\n]);\nFactory.addGetterSetter(Shape, 'fillLinearGradientStartPointX', 0);\nFactory.addGetterSetter(Shape, 'strokeLinearGradientStartPointX', 0);\nFactory.addGetterSetter(Shape, 'fillLinearGradientStartPointY', 0);\nFactory.addGetterSetter(Shape, 'strokeLinearGradientStartPointY', 0);\nFactory.addComponentsGetterSetter(Shape, 'fillLinearGradientEndPoint', [\n 'x',\n 'y',\n]);\nFactory.addComponentsGetterSetter(Shape, 'strokeLinearGradientEndPoint', [\n 'x',\n 'y',\n]);\nFactory.addGetterSetter(Shape, 'fillLinearGradientEndPointX', 0);\nFactory.addGetterSetter(Shape, 'strokeLinearGradientEndPointX', 0);\nFactory.addGetterSetter(Shape, 'fillLinearGradientEndPointY', 0);\nFactory.addGetterSetter(Shape, 'strokeLinearGradientEndPointY', 0);\nFactory.addComponentsGetterSetter(Shape, 'fillRadialGradientStartPoint', [\n 'x',\n 'y',\n]);\nFactory.addGetterSetter(Shape, 'fillRadialGradientStartPointX', 0);\nFactory.addGetterSetter(Shape, 'fillRadialGradientStartPointY', 0);\nFactory.addComponentsGetterSetter(Shape, 'fillRadialGradientEndPoint', [\n 'x',\n 'y',\n]);\nFactory.addGetterSetter(Shape, 'fillRadialGradientEndPointX', 0);\nFactory.addGetterSetter(Shape, 'fillRadialGradientEndPointY', 0);\nFactory.addGetterSetter(Shape, 'fillPatternRotation', 0);\nFactory.backCompat(Shape, {\n dashArray: 'dash',\n getDashArray: 'getDash',\n setDashArray: 'getDash',\n drawFunc: 'sceneFunc',\n getDrawFunc: 'getSceneFunc',\n setDrawFunc: 'setSceneFunc',\n drawHitFunc: 'hitFunc',\n getDrawHitFunc: 'getHitFunc',\n setDrawHitFunc: 'setHitFunc',\n});\n","import { Util } from './Util.js';\nimport { Container } from './Container.js';\nimport { Node } from './Node.js';\nimport { Factory } from './Factory.js';\nimport { SceneCanvas, HitCanvas } from './Canvas.js';\nimport { getBooleanValidator } from './Validators.js';\nimport { shapes } from './Shape.js';\nimport { _registerNode } from './Global.js';\nvar HASH = '#', BEFORE_DRAW = 'beforeDraw', DRAW = 'draw', INTERSECTION_OFFSETS = [\n { x: 0, y: 0 },\n { x: -1, y: -1 },\n { x: 1, y: -1 },\n { x: 1, y: 1 },\n { x: -1, y: 1 },\n], INTERSECTION_OFFSETS_LEN = INTERSECTION_OFFSETS.length;\nexport class Layer extends Container {\n constructor(config) {\n super(config);\n this.canvas = new SceneCanvas();\n this.hitCanvas = new HitCanvas({\n pixelRatio: 1,\n });\n this._waitingForDraw = false;\n this.on('visibleChange.konva', this._checkVisibility);\n this._checkVisibility();\n this.on('imageSmoothingEnabledChange.konva', this._setSmoothEnabled);\n this._setSmoothEnabled();\n }\n createPNGStream() {\n const c = this.canvas._canvas;\n return c.createPNGStream();\n }\n getCanvas() {\n return this.canvas;\n }\n getNativeCanvasElement() {\n return this.canvas._canvas;\n }\n getHitCanvas() {\n return this.hitCanvas;\n }\n getContext() {\n return this.getCanvas().getContext();\n }\n clear(bounds) {\n this.getContext().clear(bounds);\n this.getHitCanvas().getContext().clear(bounds);\n return this;\n }\n setZIndex(index) {\n super.setZIndex(index);\n var stage = this.getStage();\n if (stage && stage.content) {\n stage.content.removeChild(this.getNativeCanvasElement());\n if (index < stage.children.length - 1) {\n stage.content.insertBefore(this.getNativeCanvasElement(), stage.children[index + 1].getCanvas()._canvas);\n }\n else {\n stage.content.appendChild(this.getNativeCanvasElement());\n }\n }\n return this;\n }\n moveToTop() {\n Node.prototype.moveToTop.call(this);\n var stage = this.getStage();\n if (stage && stage.content) {\n stage.content.removeChild(this.getNativeCanvasElement());\n stage.content.appendChild(this.getNativeCanvasElement());\n }\n return true;\n }\n moveUp() {\n var moved = Node.prototype.moveUp.call(this);\n if (!moved) {\n return false;\n }\n var stage = this.getStage();\n if (!stage || !stage.content) {\n return false;\n }\n stage.content.removeChild(this.getNativeCanvasElement());\n if (this.index < stage.children.length - 1) {\n stage.content.insertBefore(this.getNativeCanvasElement(), stage.children[this.index + 1].getCanvas()._canvas);\n }\n else {\n stage.content.appendChild(this.getNativeCanvasElement());\n }\n return true;\n }\n moveDown() {\n if (Node.prototype.moveDown.call(this)) {\n var stage = this.getStage();\n if (stage) {\n var children = stage.children;\n if (stage.content) {\n stage.content.removeChild(this.getNativeCanvasElement());\n stage.content.insertBefore(this.getNativeCanvasElement(), children[this.index + 1].getCanvas()._canvas);\n }\n }\n return true;\n }\n return false;\n }\n moveToBottom() {\n if (Node.prototype.moveToBottom.call(this)) {\n var stage = this.getStage();\n if (stage) {\n var children = stage.children;\n if (stage.content) {\n stage.content.removeChild(this.getNativeCanvasElement());\n stage.content.insertBefore(this.getNativeCanvasElement(), children[1].getCanvas()._canvas);\n }\n }\n return true;\n }\n return false;\n }\n getLayer() {\n return this;\n }\n remove() {\n var _canvas = this.getNativeCanvasElement();\n Node.prototype.remove.call(this);\n if (_canvas && _canvas.parentNode && Util._isInDocument(_canvas)) {\n _canvas.parentNode.removeChild(_canvas);\n }\n return this;\n }\n getStage() {\n return this.parent;\n }\n setSize({ width, height }) {\n this.canvas.setSize(width, height);\n this.hitCanvas.setSize(width, height);\n this._setSmoothEnabled();\n return this;\n }\n _validateAdd(child) {\n var type = child.getType();\n if (type !== 'Group' && type !== 'Shape') {\n Util.throw('You may only add groups and shapes to a layer.');\n }\n }\n _toKonvaCanvas(config) {\n config = config || {};\n config.width = config.width || this.getWidth();\n config.height = config.height || this.getHeight();\n config.x = config.x !== undefined ? config.x : this.x();\n config.y = config.y !== undefined ? config.y : this.y();\n return Node.prototype._toKonvaCanvas.call(this, config);\n }\n _checkVisibility() {\n const visible = this.visible();\n if (visible) {\n this.canvas._canvas.style.display = 'block';\n }\n else {\n this.canvas._canvas.style.display = 'none';\n }\n }\n _setSmoothEnabled() {\n this.getContext()._context.imageSmoothingEnabled =\n this.imageSmoothingEnabled();\n }\n getWidth() {\n if (this.parent) {\n return this.parent.width();\n }\n }\n setWidth() {\n Util.warn('Can not change width of layer. Use \"stage.width(value)\" function instead.');\n }\n getHeight() {\n if (this.parent) {\n return this.parent.height();\n }\n }\n setHeight() {\n Util.warn('Can not change height of layer. Use \"stage.height(value)\" function instead.');\n }\n batchDraw() {\n if (!this._waitingForDraw) {\n this._waitingForDraw = true;\n Util.requestAnimFrame(() => {\n this.draw();\n this._waitingForDraw = false;\n });\n }\n return this;\n }\n getIntersection(pos) {\n if (!this.isListening() || !this.isVisible()) {\n return null;\n }\n var spiralSearchDistance = 1;\n var continueSearch = false;\n while (true) {\n for (let i = 0; i < INTERSECTION_OFFSETS_LEN; i++) {\n const intersectionOffset = INTERSECTION_OFFSETS[i];\n const obj = this._getIntersection({\n x: pos.x + intersectionOffset.x * spiralSearchDistance,\n y: pos.y + intersectionOffset.y * spiralSearchDistance,\n });\n const shape = obj.shape;\n if (shape) {\n return shape;\n }\n continueSearch = !!obj.antialiased;\n if (!obj.antialiased) {\n break;\n }\n }\n if (continueSearch) {\n spiralSearchDistance += 1;\n }\n else {\n return null;\n }\n }\n }\n _getIntersection(pos) {\n const ratio = this.hitCanvas.pixelRatio;\n const p = this.hitCanvas.context.getImageData(Math.round(pos.x * ratio), Math.round(pos.y * ratio), 1, 1).data;\n const p3 = p[3];\n if (p3 === 255) {\n const colorKey = Util._rgbToHex(p[0], p[1], p[2]);\n const shape = shapes[HASH + colorKey];\n if (shape) {\n return {\n shape: shape,\n };\n }\n return {\n antialiased: true,\n };\n }\n else if (p3 > 0) {\n return {\n antialiased: true,\n };\n }\n return {};\n }\n drawScene(can, top) {\n var layer = this.getLayer(), canvas = can || (layer && layer.getCanvas());\n this._fire(BEFORE_DRAW, {\n node: this,\n });\n if (this.clearBeforeDraw()) {\n canvas.getContext().clear();\n }\n Container.prototype.drawScene.call(this, canvas, top);\n this._fire(DRAW, {\n node: this,\n });\n return this;\n }\n drawHit(can, top) {\n var layer = this.getLayer(), canvas = can || (layer && layer.hitCanvas);\n if (layer && layer.clearBeforeDraw()) {\n layer.getHitCanvas().getContext().clear();\n }\n Container.prototype.drawHit.call(this, canvas, top);\n return this;\n }\n enableHitGraph() {\n this.hitGraphEnabled(true);\n return this;\n }\n disableHitGraph() {\n this.hitGraphEnabled(false);\n return this;\n }\n setHitGraphEnabled(val) {\n Util.warn('hitGraphEnabled method is deprecated. Please use layer.listening() instead.');\n this.listening(val);\n }\n getHitGraphEnabled(val) {\n Util.warn('hitGraphEnabled method is deprecated. Please use layer.listening() instead.');\n return this.listening();\n }\n toggleHitCanvas() {\n if (!this.parent || !this.parent['content']) {\n return;\n }\n var parent = this.parent;\n var added = !!this.hitCanvas._canvas.parentNode;\n if (added) {\n parent.content.removeChild(this.hitCanvas._canvas);\n }\n else {\n parent.content.appendChild(this.hitCanvas._canvas);\n }\n }\n destroy() {\n Util.releaseCanvas(this.getNativeCanvasElement(), this.getHitCanvas()._canvas);\n return super.destroy();\n }\n}\nLayer.prototype.nodeType = 'Layer';\n_registerNode(Layer);\nFactory.addGetterSetter(Layer, 'imageSmoothingEnabled', true);\nFactory.addGetterSetter(Layer, 'clearBeforeDraw', true);\nFactory.addGetterSetter(Layer, 'hitGraphEnabled', true, getBooleanValidator());\n","import { Util } from './Util.js';\nimport { Layer } from './Layer.js';\nimport { _registerNode } from './Global.js';\nexport class FastLayer extends Layer {\n constructor(attrs) {\n super(attrs);\n this.listening(false);\n Util.warn('Konva.Fast layer is deprecated. Please use \"new Konva.Layer({ listening: false })\" instead.');\n }\n}\nFastLayer.prototype.nodeType = 'FastLayer';\n_registerNode(FastLayer);\n","import { Util } from './Util.js';\nimport { Container } from './Container.js';\nimport { _registerNode } from './Global.js';\nexport class Group extends Container {\n _validateAdd(child) {\n var type = child.getType();\n if (type !== 'Group' && type !== 'Shape') {\n Util.throw('You may only add groups and shapes to groups.');\n }\n }\n}\nGroup.prototype.nodeType = 'Group';\n_registerNode(Group);\n","import { glob } from './Global.js';\nimport { Util } from './Util.js';\nvar now = (function () {\n if (glob.performance && glob.performance.now) {\n return function () {\n return glob.performance.now();\n };\n }\n return function () {\n return new Date().getTime();\n };\n})();\nexport class Animation {\n constructor(func, layers) {\n this.id = Animation.animIdCounter++;\n this.frame = {\n time: 0,\n timeDiff: 0,\n lastTime: now(),\n frameRate: 0,\n };\n this.func = func;\n this.setLayers(layers);\n }\n setLayers(layers) {\n var lays = [];\n if (!layers) {\n lays = [];\n }\n else if (layers.length > 0) {\n lays = layers;\n }\n else {\n lays = [layers];\n }\n this.layers = lays;\n return this;\n }\n getLayers() {\n return this.layers;\n }\n addLayer(layer) {\n var layers = this.layers, len = layers.length, n;\n for (n = 0; n < len; n++) {\n if (layers[n]._id === layer._id) {\n return false;\n }\n }\n this.layers.push(layer);\n return true;\n }\n isRunning() {\n var a = Animation, animations = a.animations, len = animations.length, n;\n for (n = 0; n < len; n++) {\n if (animations[n].id === this.id) {\n return true;\n }\n }\n return false;\n }\n start() {\n this.stop();\n this.frame.timeDiff = 0;\n this.frame.lastTime = now();\n Animation._addAnimation(this);\n return this;\n }\n stop() {\n Animation._removeAnimation(this);\n return this;\n }\n _updateFrameObject(time) {\n this.frame.timeDiff = time - this.frame.lastTime;\n this.frame.lastTime = time;\n this.frame.time += this.frame.timeDiff;\n this.frame.frameRate = 1000 / this.frame.timeDiff;\n }\n static _addAnimation(anim) {\n this.animations.push(anim);\n this._handleAnimation();\n }\n static _removeAnimation(anim) {\n var id = anim.id, animations = this.animations, len = animations.length, n;\n for (n = 0; n < len; n++) {\n if (animations[n].id === id) {\n this.animations.splice(n, 1);\n break;\n }\n }\n }\n static _runFrames() {\n var layerHash = {}, animations = this.animations, anim, layers, func, n, i, layersLen, layer, key, needRedraw;\n for (n = 0; n < animations.length; n++) {\n anim = animations[n];\n layers = anim.layers;\n func = anim.func;\n anim._updateFrameObject(now());\n layersLen = layers.length;\n if (func) {\n needRedraw = func.call(anim, anim.frame) !== false;\n }\n else {\n needRedraw = true;\n }\n if (!needRedraw) {\n continue;\n }\n for (i = 0; i < layersLen; i++) {\n layer = layers[i];\n if (layer._id !== undefined) {\n layerHash[layer._id] = layer;\n }\n }\n }\n for (key in layerHash) {\n if (!layerHash.hasOwnProperty(key)) {\n continue;\n }\n layerHash[key].batchDraw();\n }\n }\n static _animationLoop() {\n var Anim = Animation;\n if (Anim.animations.length) {\n Anim._runFrames();\n Util.requestAnimFrame(Anim._animationLoop);\n }\n else {\n Anim.animRunning = false;\n }\n }\n static _handleAnimation() {\n if (!this.animRunning) {\n this.animRunning = true;\n Util.requestAnimFrame(this._animationLoop);\n }\n }\n}\nAnimation.animations = [];\nAnimation.animIdCounter = 0;\nAnimation.animRunning = false;\n","import { Util } from './Util.js';\nimport { Animation } from './Animation.js';\nimport { Node } from './Node.js';\nimport { Konva } from './Global.js';\nvar blacklist = {\n node: 1,\n duration: 1,\n easing: 1,\n onFinish: 1,\n yoyo: 1,\n}, PAUSED = 1, PLAYING = 2, REVERSING = 3, idCounter = 0, colorAttrs = ['fill', 'stroke', 'shadowColor'];\nclass TweenEngine {\n constructor(prop, propFunc, func, begin, finish, duration, yoyo) {\n this.prop = prop;\n this.propFunc = propFunc;\n this.begin = begin;\n this._pos = begin;\n this.duration = duration;\n this._change = 0;\n this.prevPos = 0;\n this.yoyo = yoyo;\n this._time = 0;\n this._position = 0;\n this._startTime = 0;\n this._finish = 0;\n this.func = func;\n this._change = finish - this.begin;\n this.pause();\n }\n fire(str) {\n var handler = this[str];\n if (handler) {\n handler();\n }\n }\n setTime(t) {\n if (t > this.duration) {\n if (this.yoyo) {\n this._time = this.duration;\n this.reverse();\n }\n else {\n this.finish();\n }\n }\n else if (t < 0) {\n if (this.yoyo) {\n this._time = 0;\n this.play();\n }\n else {\n this.reset();\n }\n }\n else {\n this._time = t;\n this.update();\n }\n }\n getTime() {\n return this._time;\n }\n setPosition(p) {\n this.prevPos = this._pos;\n this.propFunc(p);\n this._pos = p;\n }\n getPosition(t) {\n if (t === undefined) {\n t = this._time;\n }\n return this.func(t, this.begin, this._change, this.duration);\n }\n play() {\n this.state = PLAYING;\n this._startTime = this.getTimer() - this._time;\n this.onEnterFrame();\n this.fire('onPlay');\n }\n reverse() {\n this.state = REVERSING;\n this._time = this.duration - this._time;\n this._startTime = this.getTimer() - this._time;\n this.onEnterFrame();\n this.fire('onReverse');\n }\n seek(t) {\n this.pause();\n this._time = t;\n this.update();\n this.fire('onSeek');\n }\n reset() {\n this.pause();\n this._time = 0;\n this.update();\n this.fire('onReset');\n }\n finish() {\n this.pause();\n this._time = this.duration;\n this.update();\n this.fire('onFinish');\n }\n update() {\n this.setPosition(this.getPosition(this._time));\n this.fire('onUpdate');\n }\n onEnterFrame() {\n var t = this.getTimer() - this._startTime;\n if (this.state === PLAYING) {\n this.setTime(t);\n }\n else if (this.state === REVERSING) {\n this.setTime(this.duration - t);\n }\n }\n pause() {\n this.state = PAUSED;\n this.fire('onPause');\n }\n getTimer() {\n return new Date().getTime();\n }\n}\nexport class Tween {\n constructor(config) {\n var that = this, node = config.node, nodeId = node._id, duration, easing = config.easing || Easings.Linear, yoyo = !!config.yoyo, key;\n if (typeof config.duration === 'undefined') {\n duration = 0.3;\n }\n else if (config.duration === 0) {\n duration = 0.001;\n }\n else {\n duration = config.duration;\n }\n this.node = node;\n this._id = idCounter++;\n var layers = node.getLayer() ||\n (node instanceof Konva['Stage'] ? node.getLayers() : null);\n if (!layers) {\n Util.error('Tween constructor have `node` that is not in a layer. Please add node into layer first.');\n }\n this.anim = new Animation(function () {\n that.tween.onEnterFrame();\n }, layers);\n this.tween = new TweenEngine(key, function (i) {\n that._tweenFunc(i);\n }, easing, 0, 1, duration * 1000, yoyo);\n this._addListeners();\n if (!Tween.attrs[nodeId]) {\n Tween.attrs[nodeId] = {};\n }\n if (!Tween.attrs[nodeId][this._id]) {\n Tween.attrs[nodeId][this._id] = {};\n }\n if (!Tween.tweens[nodeId]) {\n Tween.tweens[nodeId] = {};\n }\n for (key in config) {\n if (blacklist[key] === undefined) {\n this._addAttr(key, config[key]);\n }\n }\n this.reset();\n this.onFinish = config.onFinish;\n this.onReset = config.onReset;\n this.onUpdate = config.onUpdate;\n }\n _addAttr(key, end) {\n var node = this.node, nodeId = node._id, start, diff, tweenId, n, len, trueEnd, trueStart, endRGBA;\n tweenId = Tween.tweens[nodeId][key];\n if (tweenId) {\n delete Tween.attrs[nodeId][tweenId][key];\n }\n start = node.getAttr(key);\n if (Util._isArray(end)) {\n diff = [];\n len = Math.max(end.length, start.length);\n if (key === 'points' && end.length !== start.length) {\n if (end.length > start.length) {\n trueStart = start;\n start = Util._prepareArrayForTween(start, end, node.closed());\n }\n else {\n trueEnd = end;\n end = Util._prepareArrayForTween(end, start, node.closed());\n }\n }\n if (key.indexOf('fill') === 0) {\n for (n = 0; n < len; n++) {\n if (n % 2 === 0) {\n diff.push(end[n] - start[n]);\n }\n else {\n var startRGBA = Util.colorToRGBA(start[n]);\n endRGBA = Util.colorToRGBA(end[n]);\n start[n] = startRGBA;\n diff.push({\n r: endRGBA.r - startRGBA.r,\n g: endRGBA.g - startRGBA.g,\n b: endRGBA.b - startRGBA.b,\n a: endRGBA.a - startRGBA.a,\n });\n }\n }\n }\n else {\n for (n = 0; n < len; n++) {\n diff.push(end[n] - start[n]);\n }\n }\n }\n else if (colorAttrs.indexOf(key) !== -1) {\n start = Util.colorToRGBA(start);\n endRGBA = Util.colorToRGBA(end);\n diff = {\n r: endRGBA.r - start.r,\n g: endRGBA.g - start.g,\n b: endRGBA.b - start.b,\n a: endRGBA.a - start.a,\n };\n }\n else {\n diff = end - start;\n }\n Tween.attrs[nodeId][this._id][key] = {\n start: start,\n diff: diff,\n end: end,\n trueEnd: trueEnd,\n trueStart: trueStart,\n };\n Tween.tweens[nodeId][key] = this._id;\n }\n _tweenFunc(i) {\n var node = this.node, attrs = Tween.attrs[node._id][this._id], key, attr, start, diff, newVal, n, len, end;\n for (key in attrs) {\n attr = attrs[key];\n start = attr.start;\n diff = attr.diff;\n end = attr.end;\n if (Util._isArray(start)) {\n newVal = [];\n len = Math.max(start.length, end.length);\n if (key.indexOf('fill') === 0) {\n for (n = 0; n < len; n++) {\n if (n % 2 === 0) {\n newVal.push((start[n] || 0) + diff[n] * i);\n }\n else {\n newVal.push('rgba(' +\n Math.round(start[n].r + diff[n].r * i) +\n ',' +\n Math.round(start[n].g + diff[n].g * i) +\n ',' +\n Math.round(start[n].b + diff[n].b * i) +\n ',' +\n (start[n].a + diff[n].a * i) +\n ')');\n }\n }\n }\n else {\n for (n = 0; n < len; n++) {\n newVal.push((start[n] || 0) + diff[n] * i);\n }\n }\n }\n else if (colorAttrs.indexOf(key) !== -1) {\n newVal =\n 'rgba(' +\n Math.round(start.r + diff.r * i) +\n ',' +\n Math.round(start.g + diff.g * i) +\n ',' +\n Math.round(start.b + diff.b * i) +\n ',' +\n (start.a + diff.a * i) +\n ')';\n }\n else {\n newVal = start + diff * i;\n }\n node.setAttr(key, newVal);\n }\n }\n _addListeners() {\n this.tween.onPlay = () => {\n this.anim.start();\n };\n this.tween.onReverse = () => {\n this.anim.start();\n };\n this.tween.onPause = () => {\n this.anim.stop();\n };\n this.tween.onFinish = () => {\n var node = this.node;\n var attrs = Tween.attrs[node._id][this._id];\n if (attrs.points && attrs.points.trueEnd) {\n node.setAttr('points', attrs.points.trueEnd);\n }\n if (this.onFinish) {\n this.onFinish.call(this);\n }\n };\n this.tween.onReset = () => {\n var node = this.node;\n var attrs = Tween.attrs[node._id][this._id];\n if (attrs.points && attrs.points.trueStart) {\n node.points(attrs.points.trueStart);\n }\n if (this.onReset) {\n this.onReset();\n }\n };\n this.tween.onUpdate = () => {\n if (this.onUpdate) {\n this.onUpdate.call(this);\n }\n };\n }\n play() {\n this.tween.play();\n return this;\n }\n reverse() {\n this.tween.reverse();\n return this;\n }\n reset() {\n this.tween.reset();\n return this;\n }\n seek(t) {\n this.tween.seek(t * 1000);\n return this;\n }\n pause() {\n this.tween.pause();\n return this;\n }\n finish() {\n this.tween.finish();\n return this;\n }\n destroy() {\n var nodeId = this.node._id, thisId = this._id, attrs = Tween.tweens[nodeId], key;\n this.pause();\n for (key in attrs) {\n delete Tween.tweens[nodeId][key];\n }\n delete Tween.attrs[nodeId][thisId];\n }\n}\nTween.attrs = {};\nTween.tweens = {};\nNode.prototype.to = function (params) {\n var onFinish = params.onFinish;\n params.node = this;\n params.onFinish = function () {\n this.destroy();\n if (onFinish) {\n onFinish();\n }\n };\n var tween = new Tween(params);\n tween.play();\n};\nexport const Easings = {\n BackEaseIn(t, b, c, d) {\n var s = 1.70158;\n return c * (t /= d) * t * ((s + 1) * t - s) + b;\n },\n BackEaseOut(t, b, c, d) {\n var s = 1.70158;\n return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;\n },\n BackEaseInOut(t, b, c, d) {\n var s = 1.70158;\n if ((t /= d / 2) < 1) {\n return (c / 2) * (t * t * (((s *= 1.525) + 1) * t - s)) + b;\n }\n return (c / 2) * ((t -= 2) * t * (((s *= 1.525) + 1) * t + s) + 2) + b;\n },\n ElasticEaseIn(t, b, c, d, a, p) {\n var s = 0;\n if (t === 0) {\n return b;\n }\n if ((t /= d) === 1) {\n return b + c;\n }\n if (!p) {\n p = d * 0.3;\n }\n if (!a || a < Math.abs(c)) {\n a = c;\n s = p / 4;\n }\n else {\n s = (p / (2 * Math.PI)) * Math.asin(c / a);\n }\n return (-(a *\n Math.pow(2, 10 * (t -= 1)) *\n Math.sin(((t * d - s) * (2 * Math.PI)) / p)) + b);\n },\n ElasticEaseOut(t, b, c, d, a, p) {\n var s = 0;\n if (t === 0) {\n return b;\n }\n if ((t /= d) === 1) {\n return b + c;\n }\n if (!p) {\n p = d * 0.3;\n }\n if (!a || a < Math.abs(c)) {\n a = c;\n s = p / 4;\n }\n else {\n s = (p / (2 * Math.PI)) * Math.asin(c / a);\n }\n return (a * Math.pow(2, -10 * t) * Math.sin(((t * d - s) * (2 * Math.PI)) / p) +\n c +\n b);\n },\n ElasticEaseInOut(t, b, c, d, a, p) {\n var s = 0;\n if (t === 0) {\n return b;\n }\n if ((t /= d / 2) === 2) {\n return b + c;\n }\n if (!p) {\n p = d * (0.3 * 1.5);\n }\n if (!a || a < Math.abs(c)) {\n a = c;\n s = p / 4;\n }\n else {\n s = (p / (2 * Math.PI)) * Math.asin(c / a);\n }\n if (t < 1) {\n return (-0.5 *\n (a *\n Math.pow(2, 10 * (t -= 1)) *\n Math.sin(((t * d - s) * (2 * Math.PI)) / p)) +\n b);\n }\n return (a *\n Math.pow(2, -10 * (t -= 1)) *\n Math.sin(((t * d - s) * (2 * Math.PI)) / p) *\n 0.5 +\n c +\n b);\n },\n BounceEaseOut(t, b, c, d) {\n if ((t /= d) < 1 / 2.75) {\n return c * (7.5625 * t * t) + b;\n }\n else if (t < 2 / 2.75) {\n return c * (7.5625 * (t -= 1.5 / 2.75) * t + 0.75) + b;\n }\n else if (t < 2.5 / 2.75) {\n return c * (7.5625 * (t -= 2.25 / 2.75) * t + 0.9375) + b;\n }\n else {\n return c * (7.5625 * (t -= 2.625 / 2.75) * t + 0.984375) + b;\n }\n },\n BounceEaseIn(t, b, c, d) {\n return c - Easings.BounceEaseOut(d - t, 0, c, d) + b;\n },\n BounceEaseInOut(t, b, c, d) {\n if (t < d / 2) {\n return Easings.BounceEaseIn(t * 2, 0, c, d) * 0.5 + b;\n }\n else {\n return Easings.BounceEaseOut(t * 2 - d, 0, c, d) * 0.5 + c * 0.5 + b;\n }\n },\n EaseIn(t, b, c, d) {\n return c * (t /= d) * t + b;\n },\n EaseOut(t, b, c, d) {\n return -c * (t /= d) * (t - 2) + b;\n },\n EaseInOut(t, b, c, d) {\n if ((t /= d / 2) < 1) {\n return (c / 2) * t * t + b;\n }\n return (-c / 2) * (--t * (t - 2) - 1) + b;\n },\n StrongEaseIn(t, b, c, d) {\n return c * (t /= d) * t * t * t * t + b;\n },\n StrongEaseOut(t, b, c, d) {\n return c * ((t = t / d - 1) * t * t * t * t + 1) + b;\n },\n StrongEaseInOut(t, b, c, d) {\n if ((t /= d / 2) < 1) {\n return (c / 2) * t * t * t * t * t + b;\n }\n return (c / 2) * ((t -= 2) * t * t * t * t + 2) + b;\n },\n Linear(t, b, c, d) {\n return (c * t) / d + b;\n },\n};\n","import { Konva as Global } from './Global.js';\nimport { Util, Transform } from './Util.js';\nimport { Node } from './Node.js';\nimport { Container } from './Container.js';\nimport { Stage, stages } from './Stage.js';\nimport { Layer } from './Layer.js';\nimport { FastLayer } from './FastLayer.js';\nimport { Group } from './Group.js';\nimport { DD } from './DragAndDrop.js';\nimport { Shape, shapes } from './Shape.js';\nimport { Animation } from './Animation.js';\nimport { Tween, Easings } from './Tween.js';\nimport { Context } from './Context.js';\nimport { Canvas } from './Canvas.js';\nexport const Konva = Util._assign(Global, {\n Util,\n Transform,\n Node,\n Container,\n Stage,\n stages,\n Layer,\n FastLayer,\n Group,\n DD,\n Shape,\n shapes,\n Animation,\n Tween,\n Easings,\n Context,\n Canvas,\n});\nexport default Konva;\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { Konva } from '../Global.js';\nimport { getNumberValidator, getBooleanValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nexport class Arc extends Shape {\n _sceneFunc(context) {\n var angle = Konva.getAngle(this.angle()), clockwise = this.clockwise();\n context.beginPath();\n context.arc(0, 0, this.outerRadius(), 0, angle, clockwise);\n context.arc(0, 0, this.innerRadius(), angle, 0, !clockwise);\n context.closePath();\n context.fillStrokeShape(this);\n }\n getWidth() {\n return this.outerRadius() * 2;\n }\n getHeight() {\n return this.outerRadius() * 2;\n }\n setWidth(width) {\n this.outerRadius(width / 2);\n }\n setHeight(height) {\n this.outerRadius(height / 2);\n }\n getSelfRect() {\n const innerRadius = this.innerRadius();\n const outerRadius = this.outerRadius();\n const clockwise = this.clockwise();\n const angle = Konva.getAngle(clockwise ? 360 - this.angle() : this.angle());\n const boundLeftRatio = Math.cos(Math.min(angle, Math.PI));\n const boundRightRatio = 1;\n const boundTopRatio = Math.sin(Math.min(Math.max(Math.PI, angle), (3 * Math.PI) / 2));\n const boundBottomRatio = Math.sin(Math.min(angle, Math.PI / 2));\n const boundLeft = boundLeftRatio * (boundLeftRatio > 0 ? innerRadius : outerRadius);\n const boundRight = boundRightRatio * (boundRightRatio > 0 ? outerRadius : innerRadius);\n const boundTop = boundTopRatio * (boundTopRatio > 0 ? innerRadius : outerRadius);\n const boundBottom = boundBottomRatio * (boundBottomRatio > 0 ? outerRadius : innerRadius);\n return {\n x: boundLeft,\n y: clockwise ? -1 * boundBottom : boundTop,\n width: boundRight - boundLeft,\n height: boundBottom - boundTop,\n };\n }\n}\nArc.prototype._centroid = true;\nArc.prototype.className = 'Arc';\nArc.prototype._attrsAffectingSize = ['innerRadius', 'outerRadius'];\n_registerNode(Arc);\nFactory.addGetterSetter(Arc, 'innerRadius', 0, getNumberValidator());\nFactory.addGetterSetter(Arc, 'outerRadius', 0, getNumberValidator());\nFactory.addGetterSetter(Arc, 'angle', 0, getNumberValidator());\nFactory.addGetterSetter(Arc, 'clockwise', false, getBooleanValidator());\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { getNumberValidator, getNumberArrayValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nfunction getControlPoints(x0, y0, x1, y1, x2, y2, t) {\n var d01 = Math.sqrt(Math.pow(x1 - x0, 2) + Math.pow(y1 - y0, 2)), d12 = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2)), fa = (t * d01) / (d01 + d12), fb = (t * d12) / (d01 + d12), p1x = x1 - fa * (x2 - x0), p1y = y1 - fa * (y2 - y0), p2x = x1 + fb * (x2 - x0), p2y = y1 + fb * (y2 - y0);\n return [p1x, p1y, p2x, p2y];\n}\nfunction expandPoints(p, tension) {\n var len = p.length, allPoints = [], n, cp;\n for (n = 2; n < len - 2; n += 2) {\n cp = getControlPoints(p[n - 2], p[n - 1], p[n], p[n + 1], p[n + 2], p[n + 3], tension);\n if (isNaN(cp[0])) {\n continue;\n }\n allPoints.push(cp[0]);\n allPoints.push(cp[1]);\n allPoints.push(p[n]);\n allPoints.push(p[n + 1]);\n allPoints.push(cp[2]);\n allPoints.push(cp[3]);\n }\n return allPoints;\n}\nexport class Line extends Shape {\n constructor(config) {\n super(config);\n this.on('pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva', function () {\n this._clearCache('tensionPoints');\n });\n }\n _sceneFunc(context) {\n var points = this.points(), length = points.length, tension = this.tension(), closed = this.closed(), bezier = this.bezier(), tp, len, n;\n if (!length) {\n return;\n }\n context.beginPath();\n context.moveTo(points[0], points[1]);\n if (tension !== 0 && length > 4) {\n tp = this.getTensionPoints();\n len = tp.length;\n n = closed ? 0 : 4;\n if (!closed) {\n context.quadraticCurveTo(tp[0], tp[1], tp[2], tp[3]);\n }\n while (n < len - 2) {\n context.bezierCurveTo(tp[n++], tp[n++], tp[n++], tp[n++], tp[n++], tp[n++]);\n }\n if (!closed) {\n context.quadraticCurveTo(tp[len - 2], tp[len - 1], points[length - 2], points[length - 1]);\n }\n }\n else if (bezier) {\n n = 2;\n while (n < length) {\n context.bezierCurveTo(points[n++], points[n++], points[n++], points[n++], points[n++], points[n++]);\n }\n }\n else {\n for (n = 2; n < length; n += 2) {\n context.lineTo(points[n], points[n + 1]);\n }\n }\n if (closed) {\n context.closePath();\n context.fillStrokeShape(this);\n }\n else {\n context.strokeShape(this);\n }\n }\n getTensionPoints() {\n return this._getCache('tensionPoints', this._getTensionPoints);\n }\n _getTensionPoints() {\n if (this.closed()) {\n return this._getTensionPointsClosed();\n }\n else {\n return expandPoints(this.points(), this.tension());\n }\n }\n _getTensionPointsClosed() {\n var p = this.points(), len = p.length, tension = this.tension(), firstControlPoints = getControlPoints(p[len - 2], p[len - 1], p[0], p[1], p[2], p[3], tension), lastControlPoints = getControlPoints(p[len - 4], p[len - 3], p[len - 2], p[len - 1], p[0], p[1], tension), middle = expandPoints(p, tension), tp = [firstControlPoints[2], firstControlPoints[3]]\n .concat(middle)\n .concat([\n lastControlPoints[0],\n lastControlPoints[1],\n p[len - 2],\n p[len - 1],\n lastControlPoints[2],\n lastControlPoints[3],\n firstControlPoints[0],\n firstControlPoints[1],\n p[0],\n p[1],\n ]);\n return tp;\n }\n getWidth() {\n return this.getSelfRect().width;\n }\n getHeight() {\n return this.getSelfRect().height;\n }\n getSelfRect() {\n var points = this.points();\n if (points.length < 4) {\n return {\n x: points[0] || 0,\n y: points[1] || 0,\n width: 0,\n height: 0,\n };\n }\n if (this.tension() !== 0) {\n points = [\n points[0],\n points[1],\n ...this._getTensionPoints(),\n points[points.length - 2],\n points[points.length - 1],\n ];\n }\n else {\n points = this.points();\n }\n var minX = points[0];\n var maxX = points[0];\n var minY = points[1];\n var maxY = points[1];\n var x, y;\n for (var i = 0; i < points.length / 2; i++) {\n x = points[i * 2];\n y = points[i * 2 + 1];\n minX = Math.min(minX, x);\n maxX = Math.max(maxX, x);\n minY = Math.min(minY, y);\n maxY = Math.max(maxY, y);\n }\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY,\n };\n }\n}\nLine.prototype.className = 'Line';\nLine.prototype._attrsAffectingSize = ['points', 'bezier', 'tension'];\n_registerNode(Line);\nFactory.addGetterSetter(Line, 'closed', false);\nFactory.addGetterSetter(Line, 'bezier', false);\nFactory.addGetterSetter(Line, 'tension', 0, getNumberValidator());\nFactory.addGetterSetter(Line, 'points', [], getNumberArrayValidator());\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { _registerNode } from '../Global.js';\nexport class Path extends Shape {\n constructor(config) {\n super(config);\n this.dataArray = [];\n this.pathLength = 0;\n this.dataArray = Path.parsePathData(this.data());\n this.pathLength = 0;\n for (var i = 0; i < this.dataArray.length; ++i) {\n this.pathLength += this.dataArray[i].pathLength;\n }\n this.on('dataChange.konva', function () {\n this.dataArray = Path.parsePathData(this.data());\n this.pathLength = 0;\n for (var i = 0; i < this.dataArray.length; ++i) {\n this.pathLength += this.dataArray[i].pathLength;\n }\n });\n }\n _sceneFunc(context) {\n var ca = this.dataArray;\n context.beginPath();\n var isClosed = false;\n for (var n = 0; n < ca.length; n++) {\n var c = ca[n].command;\n var p = ca[n].points;\n switch (c) {\n case 'L':\n context.lineTo(p[0], p[1]);\n break;\n case 'M':\n context.moveTo(p[0], p[1]);\n break;\n case 'C':\n context.bezierCurveTo(p[0], p[1], p[2], p[3], p[4], p[5]);\n break;\n case 'Q':\n context.quadraticCurveTo(p[0], p[1], p[2], p[3]);\n break;\n case 'A':\n var cx = p[0], cy = p[1], rx = p[2], ry = p[3], theta = p[4], dTheta = p[5], psi = p[6], fs = p[7];\n var r = rx > ry ? rx : ry;\n var scaleX = rx > ry ? 1 : rx / ry;\n var scaleY = rx > ry ? ry / rx : 1;\n context.translate(cx, cy);\n context.rotate(psi);\n context.scale(scaleX, scaleY);\n context.arc(0, 0, r, theta, theta + dTheta, 1 - fs);\n context.scale(1 / scaleX, 1 / scaleY);\n context.rotate(-psi);\n context.translate(-cx, -cy);\n break;\n case 'z':\n isClosed = true;\n context.closePath();\n break;\n }\n }\n if (!isClosed && !this.hasFill()) {\n context.strokeShape(this);\n }\n else {\n context.fillStrokeShape(this);\n }\n }\n getSelfRect() {\n var points = [];\n this.dataArray.forEach(function (data) {\n if (data.command === 'A') {\n var start = data.points[4];\n var dTheta = data.points[5];\n var end = data.points[4] + dTheta;\n var inc = Math.PI / 180.0;\n if (Math.abs(start - end) < inc) {\n inc = Math.abs(start - end);\n }\n if (dTheta < 0) {\n for (let t = start - inc; t > end; t -= inc) {\n const point = Path.getPointOnEllipticalArc(data.points[0], data.points[1], data.points[2], data.points[3], t, 0);\n points.push(point.x, point.y);\n }\n }\n else {\n for (let t = start + inc; t < end; t += inc) {\n const point = Path.getPointOnEllipticalArc(data.points[0], data.points[1], data.points[2], data.points[3], t, 0);\n points.push(point.x, point.y);\n }\n }\n }\n else if (data.command === 'C') {\n for (let t = 0.0; t <= 1; t += 0.01) {\n const point = Path.getPointOnCubicBezier(t, data.start.x, data.start.y, data.points[0], data.points[1], data.points[2], data.points[3], data.points[4], data.points[5]);\n points.push(point.x, point.y);\n }\n }\n else {\n points = points.concat(data.points);\n }\n });\n var minX = points[0];\n var maxX = points[0];\n var minY = points[1];\n var maxY = points[1];\n var x, y;\n for (var i = 0; i < points.length / 2; i++) {\n x = points[i * 2];\n y = points[i * 2 + 1];\n if (!isNaN(x)) {\n minX = Math.min(minX, x);\n maxX = Math.max(maxX, x);\n }\n if (!isNaN(y)) {\n minY = Math.min(minY, y);\n maxY = Math.max(maxY, y);\n }\n }\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY,\n };\n }\n getLength() {\n return this.pathLength;\n }\n getPointAtLength(length) {\n var point, i = 0, ii = this.dataArray.length;\n if (!ii) {\n return null;\n }\n while (i < ii && length > this.dataArray[i].pathLength) {\n length -= this.dataArray[i].pathLength;\n ++i;\n }\n if (i === ii) {\n point = this.dataArray[i - 1].points.slice(-2);\n return {\n x: point[0],\n y: point[1],\n };\n }\n if (length < 0.01) {\n point = this.dataArray[i].points.slice(0, 2);\n return {\n x: point[0],\n y: point[1],\n };\n }\n var cp = this.dataArray[i];\n var p = cp.points;\n switch (cp.command) {\n case 'L':\n return Path.getPointOnLine(length, cp.start.x, cp.start.y, p[0], p[1]);\n case 'C':\n return Path.getPointOnCubicBezier(length / cp.pathLength, cp.start.x, cp.start.y, p[0], p[1], p[2], p[3], p[4], p[5]);\n case 'Q':\n return Path.getPointOnQuadraticBezier(length / cp.pathLength, cp.start.x, cp.start.y, p[0], p[1], p[2], p[3]);\n case 'A':\n var cx = p[0], cy = p[1], rx = p[2], ry = p[3], theta = p[4], dTheta = p[5], psi = p[6];\n theta += (dTheta * length) / cp.pathLength;\n return Path.getPointOnEllipticalArc(cx, cy, rx, ry, theta, psi);\n }\n return null;\n }\n static getLineLength(x1, y1, x2, y2) {\n return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n }\n static getPointOnLine(dist, P1x, P1y, P2x, P2y, fromX, fromY) {\n if (fromX === undefined) {\n fromX = P1x;\n }\n if (fromY === undefined) {\n fromY = P1y;\n }\n var m = (P2y - P1y) / (P2x - P1x + 0.00000001);\n var run = Math.sqrt((dist * dist) / (1 + m * m));\n if (P2x < P1x) {\n run *= -1;\n }\n var rise = m * run;\n var pt;\n if (P2x === P1x) {\n pt = {\n x: fromX,\n y: fromY + rise,\n };\n }\n else if ((fromY - P1y) / (fromX - P1x + 0.00000001) === m) {\n pt = {\n x: fromX + run,\n y: fromY + rise,\n };\n }\n else {\n var ix, iy;\n var len = this.getLineLength(P1x, P1y, P2x, P2y);\n var u = (fromX - P1x) * (P2x - P1x) + (fromY - P1y) * (P2y - P1y);\n u = u / (len * len);\n ix = P1x + u * (P2x - P1x);\n iy = P1y + u * (P2y - P1y);\n var pRise = this.getLineLength(fromX, fromY, ix, iy);\n var pRun = Math.sqrt(dist * dist - pRise * pRise);\n run = Math.sqrt((pRun * pRun) / (1 + m * m));\n if (P2x < P1x) {\n run *= -1;\n }\n rise = m * run;\n pt = {\n x: ix + run,\n y: iy + rise,\n };\n }\n return pt;\n }\n static getPointOnCubicBezier(pct, P1x, P1y, P2x, P2y, P3x, P3y, P4x, P4y) {\n function CB1(t) {\n return t * t * t;\n }\n function CB2(t) {\n return 3 * t * t * (1 - t);\n }\n function CB3(t) {\n return 3 * t * (1 - t) * (1 - t);\n }\n function CB4(t) {\n return (1 - t) * (1 - t) * (1 - t);\n }\n var x = P4x * CB1(pct) + P3x * CB2(pct) + P2x * CB3(pct) + P1x * CB4(pct);\n var y = P4y * CB1(pct) + P3y * CB2(pct) + P2y * CB3(pct) + P1y * CB4(pct);\n return {\n x: x,\n y: y,\n };\n }\n static getPointOnQuadraticBezier(pct, P1x, P1y, P2x, P2y, P3x, P3y) {\n function QB1(t) {\n return t * t;\n }\n function QB2(t) {\n return 2 * t * (1 - t);\n }\n function QB3(t) {\n return (1 - t) * (1 - t);\n }\n var x = P3x * QB1(pct) + P2x * QB2(pct) + P1x * QB3(pct);\n var y = P3y * QB1(pct) + P2y * QB2(pct) + P1y * QB3(pct);\n return {\n x: x,\n y: y,\n };\n }\n static getPointOnEllipticalArc(cx, cy, rx, ry, theta, psi) {\n var cosPsi = Math.cos(psi), sinPsi = Math.sin(psi);\n var pt = {\n x: rx * Math.cos(theta),\n y: ry * Math.sin(theta),\n };\n return {\n x: cx + (pt.x * cosPsi - pt.y * sinPsi),\n y: cy + (pt.x * sinPsi + pt.y * cosPsi),\n };\n }\n static parsePathData(data) {\n if (!data) {\n return [];\n }\n var cs = data;\n var cc = [\n 'm',\n 'M',\n 'l',\n 'L',\n 'v',\n 'V',\n 'h',\n 'H',\n 'z',\n 'Z',\n 'c',\n 'C',\n 'q',\n 'Q',\n 't',\n 'T',\n 's',\n 'S',\n 'a',\n 'A',\n ];\n cs = cs.replace(new RegExp(' ', 'g'), ',');\n for (var n = 0; n < cc.length; n++) {\n cs = cs.replace(new RegExp(cc[n], 'g'), '|' + cc[n]);\n }\n var arr = cs.split('|');\n var ca = [];\n var coords = [];\n var cpx = 0;\n var cpy = 0;\n var re = /([-+]?((\\d+\\.\\d+)|((\\d+)|(\\.\\d+)))(?:e[-+]?\\d+)?)/gi;\n var match;\n for (n = 1; n < arr.length; n++) {\n var str = arr[n];\n var c = str.charAt(0);\n str = str.slice(1);\n coords.length = 0;\n while ((match = re.exec(str))) {\n coords.push(match[0]);\n }\n var p = [];\n for (var j = 0, jlen = coords.length; j < jlen; j++) {\n if (coords[j] === '00') {\n p.push(0, 0);\n continue;\n }\n var parsed = parseFloat(coords[j]);\n if (!isNaN(parsed)) {\n p.push(parsed);\n }\n else {\n p.push(0);\n }\n }\n while (p.length > 0) {\n if (isNaN(p[0])) {\n break;\n }\n var cmd = null;\n var points = [];\n var startX = cpx, startY = cpy;\n var prevCmd, ctlPtx, ctlPty;\n var rx, ry, psi, fa, fs, x1, y1;\n switch (c) {\n case 'l':\n cpx += p.shift();\n cpy += p.shift();\n cmd = 'L';\n points.push(cpx, cpy);\n break;\n case 'L':\n cpx = p.shift();\n cpy = p.shift();\n points.push(cpx, cpy);\n break;\n case 'm':\n var dx = p.shift();\n var dy = p.shift();\n cpx += dx;\n cpy += dy;\n cmd = 'M';\n if (ca.length > 2 && ca[ca.length - 1].command === 'z') {\n for (var idx = ca.length - 2; idx >= 0; idx--) {\n if (ca[idx].command === 'M') {\n cpx = ca[idx].points[0] + dx;\n cpy = ca[idx].points[1] + dy;\n break;\n }\n }\n }\n points.push(cpx, cpy);\n c = 'l';\n break;\n case 'M':\n cpx = p.shift();\n cpy = p.shift();\n cmd = 'M';\n points.push(cpx, cpy);\n c = 'L';\n break;\n case 'h':\n cpx += p.shift();\n cmd = 'L';\n points.push(cpx, cpy);\n break;\n case 'H':\n cpx = p.shift();\n cmd = 'L';\n points.push(cpx, cpy);\n break;\n case 'v':\n cpy += p.shift();\n cmd = 'L';\n points.push(cpx, cpy);\n break;\n case 'V':\n cpy = p.shift();\n cmd = 'L';\n points.push(cpx, cpy);\n break;\n case 'C':\n points.push(p.shift(), p.shift(), p.shift(), p.shift());\n cpx = p.shift();\n cpy = p.shift();\n points.push(cpx, cpy);\n break;\n case 'c':\n points.push(cpx + p.shift(), cpy + p.shift(), cpx + p.shift(), cpy + p.shift());\n cpx += p.shift();\n cpy += p.shift();\n cmd = 'C';\n points.push(cpx, cpy);\n break;\n case 'S':\n ctlPtx = cpx;\n ctlPty = cpy;\n prevCmd = ca[ca.length - 1];\n if (prevCmd.command === 'C') {\n ctlPtx = cpx + (cpx - prevCmd.points[2]);\n ctlPty = cpy + (cpy - prevCmd.points[3]);\n }\n points.push(ctlPtx, ctlPty, p.shift(), p.shift());\n cpx = p.shift();\n cpy = p.shift();\n cmd = 'C';\n points.push(cpx, cpy);\n break;\n case 's':\n ctlPtx = cpx;\n ctlPty = cpy;\n prevCmd = ca[ca.length - 1];\n if (prevCmd.command === 'C') {\n ctlPtx = cpx + (cpx - prevCmd.points[2]);\n ctlPty = cpy + (cpy - prevCmd.points[3]);\n }\n points.push(ctlPtx, ctlPty, cpx + p.shift(), cpy + p.shift());\n cpx += p.shift();\n cpy += p.shift();\n cmd = 'C';\n points.push(cpx, cpy);\n break;\n case 'Q':\n points.push(p.shift(), p.shift());\n cpx = p.shift();\n cpy = p.shift();\n points.push(cpx, cpy);\n break;\n case 'q':\n points.push(cpx + p.shift(), cpy + p.shift());\n cpx += p.shift();\n cpy += p.shift();\n cmd = 'Q';\n points.push(cpx, cpy);\n break;\n case 'T':\n ctlPtx = cpx;\n ctlPty = cpy;\n prevCmd = ca[ca.length - 1];\n if (prevCmd.command === 'Q') {\n ctlPtx = cpx + (cpx - prevCmd.points[0]);\n ctlPty = cpy + (cpy - prevCmd.points[1]);\n }\n cpx = p.shift();\n cpy = p.shift();\n cmd = 'Q';\n points.push(ctlPtx, ctlPty, cpx, cpy);\n break;\n case 't':\n ctlPtx = cpx;\n ctlPty = cpy;\n prevCmd = ca[ca.length - 1];\n if (prevCmd.command === 'Q') {\n ctlPtx = cpx + (cpx - prevCmd.points[0]);\n ctlPty = cpy + (cpy - prevCmd.points[1]);\n }\n cpx += p.shift();\n cpy += p.shift();\n cmd = 'Q';\n points.push(ctlPtx, ctlPty, cpx, cpy);\n break;\n case 'A':\n rx = p.shift();\n ry = p.shift();\n psi = p.shift();\n fa = p.shift();\n fs = p.shift();\n x1 = cpx;\n y1 = cpy;\n cpx = p.shift();\n cpy = p.shift();\n cmd = 'A';\n points = this.convertEndpointToCenterParameterization(x1, y1, cpx, cpy, fa, fs, rx, ry, psi);\n break;\n case 'a':\n rx = p.shift();\n ry = p.shift();\n psi = p.shift();\n fa = p.shift();\n fs = p.shift();\n x1 = cpx;\n y1 = cpy;\n cpx += p.shift();\n cpy += p.shift();\n cmd = 'A';\n points = this.convertEndpointToCenterParameterization(x1, y1, cpx, cpy, fa, fs, rx, ry, psi);\n break;\n }\n ca.push({\n command: cmd || c,\n points: points,\n start: {\n x: startX,\n y: startY,\n },\n pathLength: this.calcLength(startX, startY, cmd || c, points),\n });\n }\n if (c === 'z' || c === 'Z') {\n ca.push({\n command: 'z',\n points: [],\n start: undefined,\n pathLength: 0,\n });\n }\n }\n return ca;\n }\n static calcLength(x, y, cmd, points) {\n var len, p1, p2, t;\n var path = Path;\n switch (cmd) {\n case 'L':\n return path.getLineLength(x, y, points[0], points[1]);\n case 'C':\n len = 0.0;\n p1 = path.getPointOnCubicBezier(0, x, y, points[0], points[1], points[2], points[3], points[4], points[5]);\n for (t = 0.01; t <= 1; t += 0.01) {\n p2 = path.getPointOnCubicBezier(t, x, y, points[0], points[1], points[2], points[3], points[4], points[5]);\n len += path.getLineLength(p1.x, p1.y, p2.x, p2.y);\n p1 = p2;\n }\n return len;\n case 'Q':\n len = 0.0;\n p1 = path.getPointOnQuadraticBezier(0, x, y, points[0], points[1], points[2], points[3]);\n for (t = 0.01; t <= 1; t += 0.01) {\n p2 = path.getPointOnQuadraticBezier(t, x, y, points[0], points[1], points[2], points[3]);\n len += path.getLineLength(p1.x, p1.y, p2.x, p2.y);\n p1 = p2;\n }\n return len;\n case 'A':\n len = 0.0;\n var start = points[4];\n var dTheta = points[5];\n var end = points[4] + dTheta;\n var inc = Math.PI / 180.0;\n if (Math.abs(start - end) < inc) {\n inc = Math.abs(start - end);\n }\n p1 = path.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], start, 0);\n if (dTheta < 0) {\n for (t = start - inc; t > end; t -= inc) {\n p2 = path.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], t, 0);\n len += path.getLineLength(p1.x, p1.y, p2.x, p2.y);\n p1 = p2;\n }\n }\n else {\n for (t = start + inc; t < end; t += inc) {\n p2 = path.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], t, 0);\n len += path.getLineLength(p1.x, p1.y, p2.x, p2.y);\n p1 = p2;\n }\n }\n p2 = path.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], end, 0);\n len += path.getLineLength(p1.x, p1.y, p2.x, p2.y);\n return len;\n }\n return 0;\n }\n static convertEndpointToCenterParameterization(x1, y1, x2, y2, fa, fs, rx, ry, psiDeg) {\n var psi = psiDeg * (Math.PI / 180.0);\n var xp = (Math.cos(psi) * (x1 - x2)) / 2.0 + (Math.sin(psi) * (y1 - y2)) / 2.0;\n var yp = (-1 * Math.sin(psi) * (x1 - x2)) / 2.0 +\n (Math.cos(psi) * (y1 - y2)) / 2.0;\n var lambda = (xp * xp) / (rx * rx) + (yp * yp) / (ry * ry);\n if (lambda > 1) {\n rx *= Math.sqrt(lambda);\n ry *= Math.sqrt(lambda);\n }\n var f = Math.sqrt((rx * rx * (ry * ry) - rx * rx * (yp * yp) - ry * ry * (xp * xp)) /\n (rx * rx * (yp * yp) + ry * ry * (xp * xp)));\n if (fa === fs) {\n f *= -1;\n }\n if (isNaN(f)) {\n f = 0;\n }\n var cxp = (f * rx * yp) / ry;\n var cyp = (f * -ry * xp) / rx;\n var cx = (x1 + x2) / 2.0 + Math.cos(psi) * cxp - Math.sin(psi) * cyp;\n var cy = (y1 + y2) / 2.0 + Math.sin(psi) * cxp + Math.cos(psi) * cyp;\n var vMag = function (v) {\n return Math.sqrt(v[0] * v[0] + v[1] * v[1]);\n };\n var vRatio = function (u, v) {\n return (u[0] * v[0] + u[1] * v[1]) / (vMag(u) * vMag(v));\n };\n var vAngle = function (u, v) {\n return (u[0] * v[1] < u[1] * v[0] ? -1 : 1) * Math.acos(vRatio(u, v));\n };\n var theta = vAngle([1, 0], [(xp - cxp) / rx, (yp - cyp) / ry]);\n var u = [(xp - cxp) / rx, (yp - cyp) / ry];\n var v = [(-1 * xp - cxp) / rx, (-1 * yp - cyp) / ry];\n var dTheta = vAngle(u, v);\n if (vRatio(u, v) <= -1) {\n dTheta = Math.PI;\n }\n if (vRatio(u, v) >= 1) {\n dTheta = 0;\n }\n if (fs === 0 && dTheta > 0) {\n dTheta = dTheta - 2 * Math.PI;\n }\n if (fs === 1 && dTheta < 0) {\n dTheta = dTheta + 2 * Math.PI;\n }\n return [cx, cy, rx, ry, theta, dTheta, psi, fs];\n }\n}\nPath.prototype.className = 'Path';\nPath.prototype._attrsAffectingSize = ['data'];\n_registerNode(Path);\nFactory.addGetterSetter(Path, 'data');\n","import { Factory } from '../Factory.js';\nimport { Line } from './Line.js';\nimport { getNumberValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nimport { Path } from './Path.js';\nexport class Arrow extends Line {\n _sceneFunc(ctx) {\n super._sceneFunc(ctx);\n var PI2 = Math.PI * 2;\n var points = this.points();\n var tp = points;\n var fromTension = this.tension() !== 0 && points.length > 4;\n if (fromTension) {\n tp = this.getTensionPoints();\n }\n var length = this.pointerLength();\n var n = points.length;\n var dx, dy;\n if (fromTension) {\n const lp = [\n tp[tp.length - 4],\n tp[tp.length - 3],\n tp[tp.length - 2],\n tp[tp.length - 1],\n points[n - 2],\n points[n - 1],\n ];\n const lastLength = Path.calcLength(tp[tp.length - 4], tp[tp.length - 3], 'C', lp);\n const previous = Path.getPointOnQuadraticBezier(Math.min(1, 1 - length / lastLength), lp[0], lp[1], lp[2], lp[3], lp[4], lp[5]);\n dx = points[n - 2] - previous.x;\n dy = points[n - 1] - previous.y;\n }\n else {\n dx = points[n - 2] - points[n - 4];\n dy = points[n - 1] - points[n - 3];\n }\n var radians = (Math.atan2(dy, dx) + PI2) % PI2;\n var width = this.pointerWidth();\n if (this.pointerAtEnding()) {\n ctx.save();\n ctx.beginPath();\n ctx.translate(points[n - 2], points[n - 1]);\n ctx.rotate(radians);\n ctx.moveTo(0, 0);\n ctx.lineTo(-length, width / 2);\n ctx.lineTo(-length, -width / 2);\n ctx.closePath();\n ctx.restore();\n this.__fillStroke(ctx);\n }\n if (this.pointerAtBeginning()) {\n ctx.save();\n ctx.beginPath();\n ctx.translate(points[0], points[1]);\n if (fromTension) {\n dx = (tp[0] + tp[2]) / 2 - points[0];\n dy = (tp[1] + tp[3]) / 2 - points[1];\n }\n else {\n dx = points[2] - points[0];\n dy = points[3] - points[1];\n }\n ctx.rotate((Math.atan2(-dy, -dx) + PI2) % PI2);\n ctx.moveTo(0, 0);\n ctx.lineTo(-length, width / 2);\n ctx.lineTo(-length, -width / 2);\n ctx.closePath();\n ctx.restore();\n this.__fillStroke(ctx);\n }\n }\n __fillStroke(ctx) {\n var isDashEnabled = this.dashEnabled();\n if (isDashEnabled) {\n this.attrs.dashEnabled = false;\n ctx.setLineDash([]);\n }\n ctx.fillStrokeShape(this);\n if (isDashEnabled) {\n this.attrs.dashEnabled = true;\n }\n }\n getSelfRect() {\n const lineRect = super.getSelfRect();\n const offset = this.pointerWidth() / 2;\n return {\n x: lineRect.x - offset,\n y: lineRect.y - offset,\n width: lineRect.width + offset * 2,\n height: lineRect.height + offset * 2,\n };\n }\n}\nArrow.prototype.className = 'Arrow';\n_registerNode(Arrow);\nFactory.addGetterSetter(Arrow, 'pointerLength', 10, getNumberValidator());\nFactory.addGetterSetter(Arrow, 'pointerWidth', 10, getNumberValidator());\nFactory.addGetterSetter(Arrow, 'pointerAtBeginning', false);\nFactory.addGetterSetter(Arrow, 'pointerAtEnding', true);\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { getNumberValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nexport class Circle extends Shape {\n _sceneFunc(context) {\n context.beginPath();\n context.arc(0, 0, this.attrs.radius || 0, 0, Math.PI * 2, false);\n context.closePath();\n context.fillStrokeShape(this);\n }\n getWidth() {\n return this.radius() * 2;\n }\n getHeight() {\n return this.radius() * 2;\n }\n setWidth(width) {\n if (this.radius() !== width / 2) {\n this.radius(width / 2);\n }\n }\n setHeight(height) {\n if (this.radius() !== height / 2) {\n this.radius(height / 2);\n }\n }\n}\nCircle.prototype._centroid = true;\nCircle.prototype.className = 'Circle';\nCircle.prototype._attrsAffectingSize = ['radius'];\n_registerNode(Circle);\nFactory.addGetterSetter(Circle, 'radius', 0, getNumberValidator());\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { getNumberValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nexport class Ellipse extends Shape {\n _sceneFunc(context) {\n var rx = this.radiusX(), ry = this.radiusY();\n context.beginPath();\n context.save();\n if (rx !== ry) {\n context.scale(1, ry / rx);\n }\n context.arc(0, 0, rx, 0, Math.PI * 2, false);\n context.restore();\n context.closePath();\n context.fillStrokeShape(this);\n }\n getWidth() {\n return this.radiusX() * 2;\n }\n getHeight() {\n return this.radiusY() * 2;\n }\n setWidth(width) {\n this.radiusX(width / 2);\n }\n setHeight(height) {\n this.radiusY(height / 2);\n }\n}\nEllipse.prototype.className = 'Ellipse';\nEllipse.prototype._centroid = true;\nEllipse.prototype._attrsAffectingSize = ['radiusX', 'radiusY'];\n_registerNode(Ellipse);\nFactory.addComponentsGetterSetter(Ellipse, 'radius', ['x', 'y']);\nFactory.addGetterSetter(Ellipse, 'radiusX', 0, getNumberValidator());\nFactory.addGetterSetter(Ellipse, 'radiusY', 0, getNumberValidator());\n","import { Util } from '../Util.js';\nimport { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { _registerNode } from '../Global.js';\nimport { getNumberOrArrayOfNumbersValidator, getNumberValidator, } from '../Validators.js';\nexport class Image extends Shape {\n constructor(attrs) {\n super(attrs);\n this.on('imageChange.konva', () => {\n this._setImageLoad();\n });\n this._setImageLoad();\n }\n _setImageLoad() {\n const image = this.image();\n if (image && image.complete) {\n return;\n }\n if (image && image.readyState === 4) {\n return;\n }\n if (image && image['addEventListener']) {\n image['addEventListener']('load', () => {\n this._requestDraw();\n });\n }\n }\n _useBufferCanvas() {\n return super._useBufferCanvas(true);\n }\n _sceneFunc(context) {\n const width = this.getWidth();\n const height = this.getHeight();\n const cornerRadius = this.cornerRadius();\n const image = this.attrs.image;\n let params;\n if (image) {\n const cropWidth = this.attrs.cropWidth;\n const cropHeight = this.attrs.cropHeight;\n if (cropWidth && cropHeight) {\n params = [\n image,\n this.cropX(),\n this.cropY(),\n cropWidth,\n cropHeight,\n 0,\n 0,\n width,\n height,\n ];\n }\n else {\n params = [image, 0, 0, width, height];\n }\n }\n if (this.hasFill() || this.hasStroke() || cornerRadius) {\n context.beginPath();\n cornerRadius\n ? Util.drawRoundedRectPath(context, width, height, cornerRadius)\n : context.rect(0, 0, width, height);\n context.closePath();\n context.fillStrokeShape(this);\n }\n if (image) {\n if (cornerRadius) {\n context.clip();\n }\n context.drawImage.apply(context, params);\n }\n }\n _hitFunc(context) {\n var width = this.width(), height = this.height(), cornerRadius = this.cornerRadius();\n context.beginPath();\n if (!cornerRadius) {\n context.rect(0, 0, width, height);\n }\n else {\n Util.drawRoundedRectPath(context, width, height, cornerRadius);\n }\n context.closePath();\n context.fillStrokeShape(this);\n }\n getWidth() {\n var _a, _b;\n return (_a = this.attrs.width) !== null && _a !== void 0 ? _a : (_b = this.image()) === null || _b === void 0 ? void 0 : _b.width;\n }\n getHeight() {\n var _a, _b;\n return (_a = this.attrs.height) !== null && _a !== void 0 ? _a : (_b = this.image()) === null || _b === void 0 ? void 0 : _b.height;\n }\n static fromURL(url, callback, onError = null) {\n var img = Util.createImageElement();\n img.onload = function () {\n var image = new Image({\n image: img,\n });\n callback(image);\n };\n img.onerror = onError;\n img.crossOrigin = 'Anonymous';\n img.src = url;\n }\n}\nImage.prototype.className = 'Image';\n_registerNode(Image);\nFactory.addGetterSetter(Image, 'cornerRadius', 0, getNumberOrArrayOfNumbersValidator(4));\nFactory.addGetterSetter(Image, 'image');\nFactory.addComponentsGetterSetter(Image, 'crop', ['x', 'y', 'width', 'height']);\nFactory.addGetterSetter(Image, 'cropX', 0, getNumberValidator());\nFactory.addGetterSetter(Image, 'cropY', 0, getNumberValidator());\nFactory.addGetterSetter(Image, 'cropWidth', 0, getNumberValidator());\nFactory.addGetterSetter(Image, 'cropHeight', 0, getNumberValidator());\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { Group } from '../Group.js';\nimport { getNumberOrArrayOfNumbersValidator, getNumberValidator, } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nvar ATTR_CHANGE_LIST = [\n 'fontFamily',\n 'fontSize',\n 'fontStyle',\n 'padding',\n 'lineHeight',\n 'text',\n 'width',\n 'height',\n 'pointerDirection',\n 'pointerWidth',\n 'pointerHeight',\n], CHANGE_KONVA = 'Change.konva', NONE = 'none', UP = 'up', RIGHT = 'right', DOWN = 'down', LEFT = 'left', attrChangeListLen = ATTR_CHANGE_LIST.length;\nexport class Label extends Group {\n constructor(config) {\n super(config);\n this.on('add.konva', function (evt) {\n this._addListeners(evt.child);\n this._sync();\n });\n }\n getText() {\n return this.find('Text')[0];\n }\n getTag() {\n return this.find('Tag')[0];\n }\n _addListeners(text) {\n var that = this, n;\n var func = function () {\n that._sync();\n };\n for (n = 0; n < attrChangeListLen; n++) {\n text.on(ATTR_CHANGE_LIST[n] + CHANGE_KONVA, func);\n }\n }\n getWidth() {\n return this.getText().width();\n }\n getHeight() {\n return this.getText().height();\n }\n _sync() {\n var text = this.getText(), tag = this.getTag(), width, height, pointerDirection, pointerWidth, x, y, pointerHeight;\n if (text && tag) {\n width = text.width();\n height = text.height();\n pointerDirection = tag.pointerDirection();\n pointerWidth = tag.pointerWidth();\n pointerHeight = tag.pointerHeight();\n x = 0;\n y = 0;\n switch (pointerDirection) {\n case UP:\n x = width / 2;\n y = -1 * pointerHeight;\n break;\n case RIGHT:\n x = width + pointerWidth;\n y = height / 2;\n break;\n case DOWN:\n x = width / 2;\n y = height + pointerHeight;\n break;\n case LEFT:\n x = -1 * pointerWidth;\n y = height / 2;\n break;\n }\n tag.setAttrs({\n x: -1 * x,\n y: -1 * y,\n width: width,\n height: height,\n });\n text.setAttrs({\n x: -1 * x,\n y: -1 * y,\n });\n }\n }\n}\nLabel.prototype.className = 'Label';\n_registerNode(Label);\nexport class Tag extends Shape {\n _sceneFunc(context) {\n var width = this.width(), height = this.height(), pointerDirection = this.pointerDirection(), pointerWidth = this.pointerWidth(), pointerHeight = this.pointerHeight(), cornerRadius = this.cornerRadius();\n let topLeft = 0;\n let topRight = 0;\n let bottomLeft = 0;\n let bottomRight = 0;\n if (typeof cornerRadius === 'number') {\n topLeft =\n topRight =\n bottomLeft =\n bottomRight =\n Math.min(cornerRadius, width / 2, height / 2);\n }\n else {\n topLeft = Math.min(cornerRadius[0] || 0, width / 2, height / 2);\n topRight = Math.min(cornerRadius[1] || 0, width / 2, height / 2);\n bottomRight = Math.min(cornerRadius[2] || 0, width / 2, height / 2);\n bottomLeft = Math.min(cornerRadius[3] || 0, width / 2, height / 2);\n }\n context.beginPath();\n context.moveTo(topLeft, 0);\n if (pointerDirection === UP) {\n context.lineTo((width - pointerWidth) / 2, 0);\n context.lineTo(width / 2, -1 * pointerHeight);\n context.lineTo((width + pointerWidth) / 2, 0);\n }\n context.lineTo(width - topRight, 0);\n context.arc(width - topRight, topRight, topRight, (Math.PI * 3) / 2, 0, false);\n if (pointerDirection === RIGHT) {\n context.lineTo(width, (height - pointerHeight) / 2);\n context.lineTo(width + pointerWidth, height / 2);\n context.lineTo(width, (height + pointerHeight) / 2);\n }\n context.lineTo(width, height - bottomRight);\n context.arc(width - bottomRight, height - bottomRight, bottomRight, 0, Math.PI / 2, false);\n if (pointerDirection === DOWN) {\n context.lineTo((width + pointerWidth) / 2, height);\n context.lineTo(width / 2, height + pointerHeight);\n context.lineTo((width - pointerWidth) / 2, height);\n }\n context.lineTo(bottomLeft, height);\n context.arc(bottomLeft, height - bottomLeft, bottomLeft, Math.PI / 2, Math.PI, false);\n if (pointerDirection === LEFT) {\n context.lineTo(0, (height + pointerHeight) / 2);\n context.lineTo(-1 * pointerWidth, height / 2);\n context.lineTo(0, (height - pointerHeight) / 2);\n }\n context.lineTo(0, topLeft);\n context.arc(topLeft, topLeft, topLeft, Math.PI, (Math.PI * 3) / 2, false);\n context.closePath();\n context.fillStrokeShape(this);\n }\n getSelfRect() {\n var x = 0, y = 0, pointerWidth = this.pointerWidth(), pointerHeight = this.pointerHeight(), direction = this.pointerDirection(), width = this.width(), height = this.height();\n if (direction === UP) {\n y -= pointerHeight;\n height += pointerHeight;\n }\n else if (direction === DOWN) {\n height += pointerHeight;\n }\n else if (direction === LEFT) {\n x -= pointerWidth * 1.5;\n width += pointerWidth;\n }\n else if (direction === RIGHT) {\n width += pointerWidth * 1.5;\n }\n return {\n x: x,\n y: y,\n width: width,\n height: height,\n };\n }\n}\nTag.prototype.className = 'Tag';\n_registerNode(Tag);\nFactory.addGetterSetter(Tag, 'pointerDirection', NONE);\nFactory.addGetterSetter(Tag, 'pointerWidth', 0, getNumberValidator());\nFactory.addGetterSetter(Tag, 'pointerHeight', 0, getNumberValidator());\nFactory.addGetterSetter(Tag, 'cornerRadius', 0, getNumberOrArrayOfNumbersValidator(4));\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { _registerNode } from '../Global.js';\nimport { Util } from '../Util.js';\nimport { getNumberOrArrayOfNumbersValidator } from '../Validators.js';\nexport class Rect extends Shape {\n _sceneFunc(context) {\n var cornerRadius = this.cornerRadius(), width = this.width(), height = this.height();\n context.beginPath();\n if (!cornerRadius) {\n context.rect(0, 0, width, height);\n }\n else {\n Util.drawRoundedRectPath(context, width, height, cornerRadius);\n }\n context.closePath();\n context.fillStrokeShape(this);\n }\n}\nRect.prototype.className = 'Rect';\n_registerNode(Rect);\nFactory.addGetterSetter(Rect, 'cornerRadius', 0, getNumberOrArrayOfNumbersValidator(4));\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { getNumberValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nexport class RegularPolygon extends Shape {\n _sceneFunc(context) {\n const points = this._getPoints();\n context.beginPath();\n context.moveTo(points[0].x, points[0].y);\n for (var n = 1; n < points.length; n++) {\n context.lineTo(points[n].x, points[n].y);\n }\n context.closePath();\n context.fillStrokeShape(this);\n }\n _getPoints() {\n const sides = this.attrs.sides;\n const radius = this.attrs.radius || 0;\n const points = [];\n for (var n = 0; n < sides; n++) {\n points.push({\n x: radius * Math.sin((n * 2 * Math.PI) / sides),\n y: -1 * radius * Math.cos((n * 2 * Math.PI) / sides),\n });\n }\n return points;\n }\n getSelfRect() {\n const points = this._getPoints();\n var minX = points[0].x;\n var maxX = points[0].y;\n var minY = points[0].x;\n var maxY = points[0].y;\n points.forEach((point) => {\n minX = Math.min(minX, point.x);\n maxX = Math.max(maxX, point.x);\n minY = Math.min(minY, point.y);\n maxY = Math.max(maxY, point.y);\n });\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY,\n };\n }\n getWidth() {\n return this.radius() * 2;\n }\n getHeight() {\n return this.radius() * 2;\n }\n setWidth(width) {\n this.radius(width / 2);\n }\n setHeight(height) {\n this.radius(height / 2);\n }\n}\nRegularPolygon.prototype.className = 'RegularPolygon';\nRegularPolygon.prototype._centroid = true;\nRegularPolygon.prototype._attrsAffectingSize = ['radius'];\n_registerNode(RegularPolygon);\nFactory.addGetterSetter(RegularPolygon, 'radius', 0, getNumberValidator());\nFactory.addGetterSetter(RegularPolygon, 'sides', 0, getNumberValidator());\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { getNumberValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nvar PIx2 = Math.PI * 2;\nexport class Ring extends Shape {\n _sceneFunc(context) {\n context.beginPath();\n context.arc(0, 0, this.innerRadius(), 0, PIx2, false);\n context.moveTo(this.outerRadius(), 0);\n context.arc(0, 0, this.outerRadius(), PIx2, 0, true);\n context.closePath();\n context.fillStrokeShape(this);\n }\n getWidth() {\n return this.outerRadius() * 2;\n }\n getHeight() {\n return this.outerRadius() * 2;\n }\n setWidth(width) {\n this.outerRadius(width / 2);\n }\n setHeight(height) {\n this.outerRadius(height / 2);\n }\n}\nRing.prototype.className = 'Ring';\nRing.prototype._centroid = true;\nRing.prototype._attrsAffectingSize = ['innerRadius', 'outerRadius'];\n_registerNode(Ring);\nFactory.addGetterSetter(Ring, 'innerRadius', 0, getNumberValidator());\nFactory.addGetterSetter(Ring, 'outerRadius', 0, getNumberValidator());\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { Animation } from '../Animation.js';\nimport { getNumberValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nexport class Sprite extends Shape {\n constructor(config) {\n super(config);\n this._updated = true;\n this.anim = new Animation(() => {\n var updated = this._updated;\n this._updated = false;\n return updated;\n });\n this.on('animationChange.konva', function () {\n this.frameIndex(0);\n });\n this.on('frameIndexChange.konva', function () {\n this._updated = true;\n });\n this.on('frameRateChange.konva', function () {\n if (!this.anim.isRunning()) {\n return;\n }\n clearInterval(this.interval);\n this._setInterval();\n });\n }\n _sceneFunc(context) {\n var anim = this.animation(), index = this.frameIndex(), ix4 = index * 4, set = this.animations()[anim], offsets = this.frameOffsets(), x = set[ix4 + 0], y = set[ix4 + 1], width = set[ix4 + 2], height = set[ix4 + 3], image = this.image();\n if (this.hasFill() || this.hasStroke()) {\n context.beginPath();\n context.rect(0, 0, width, height);\n context.closePath();\n context.fillStrokeShape(this);\n }\n if (image) {\n if (offsets) {\n var offset = offsets[anim], ix2 = index * 2;\n context.drawImage(image, x, y, width, height, offset[ix2 + 0], offset[ix2 + 1], width, height);\n }\n else {\n context.drawImage(image, x, y, width, height, 0, 0, width, height);\n }\n }\n }\n _hitFunc(context) {\n var anim = this.animation(), index = this.frameIndex(), ix4 = index * 4, set = this.animations()[anim], offsets = this.frameOffsets(), width = set[ix4 + 2], height = set[ix4 + 3];\n context.beginPath();\n if (offsets) {\n var offset = offsets[anim];\n var ix2 = index * 2;\n context.rect(offset[ix2 + 0], offset[ix2 + 1], width, height);\n }\n else {\n context.rect(0, 0, width, height);\n }\n context.closePath();\n context.fillShape(this);\n }\n _useBufferCanvas() {\n return super._useBufferCanvas(true);\n }\n _setInterval() {\n var that = this;\n this.interval = setInterval(function () {\n that._updateIndex();\n }, 1000 / this.frameRate());\n }\n start() {\n if (this.isRunning()) {\n return;\n }\n var layer = this.getLayer();\n this.anim.setLayers(layer);\n this._setInterval();\n this.anim.start();\n }\n stop() {\n this.anim.stop();\n clearInterval(this.interval);\n }\n isRunning() {\n return this.anim.isRunning();\n }\n _updateIndex() {\n var index = this.frameIndex(), animation = this.animation(), animations = this.animations(), anim = animations[animation], len = anim.length / 4;\n if (index < len - 1) {\n this.frameIndex(index + 1);\n }\n else {\n this.frameIndex(0);\n }\n }\n}\nSprite.prototype.className = 'Sprite';\n_registerNode(Sprite);\nFactory.addGetterSetter(Sprite, 'animation');\nFactory.addGetterSetter(Sprite, 'animations');\nFactory.addGetterSetter(Sprite, 'frameOffsets');\nFactory.addGetterSetter(Sprite, 'image');\nFactory.addGetterSetter(Sprite, 'frameIndex', 0, getNumberValidator());\nFactory.addGetterSetter(Sprite, 'frameRate', 17, getNumberValidator());\nFactory.backCompat(Sprite, {\n index: 'frameIndex',\n getIndex: 'getFrameIndex',\n setIndex: 'setFrameIndex',\n});\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { getNumberValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nexport class Star extends Shape {\n _sceneFunc(context) {\n var innerRadius = this.innerRadius(), outerRadius = this.outerRadius(), numPoints = this.numPoints();\n context.beginPath();\n context.moveTo(0, 0 - outerRadius);\n for (var n = 1; n < numPoints * 2; n++) {\n var radius = n % 2 === 0 ? outerRadius : innerRadius;\n var x = radius * Math.sin((n * Math.PI) / numPoints);\n var y = -1 * radius * Math.cos((n * Math.PI) / numPoints);\n context.lineTo(x, y);\n }\n context.closePath();\n context.fillStrokeShape(this);\n }\n getWidth() {\n return this.outerRadius() * 2;\n }\n getHeight() {\n return this.outerRadius() * 2;\n }\n setWidth(width) {\n this.outerRadius(width / 2);\n }\n setHeight(height) {\n this.outerRadius(height / 2);\n }\n}\nStar.prototype.className = 'Star';\nStar.prototype._centroid = true;\nStar.prototype._attrsAffectingSize = ['innerRadius', 'outerRadius'];\n_registerNode(Star);\nFactory.addGetterSetter(Star, 'numPoints', 5, getNumberValidator());\nFactory.addGetterSetter(Star, 'innerRadius', 0, getNumberValidator());\nFactory.addGetterSetter(Star, 'outerRadius', 0, getNumberValidator());\n","import { Util } from '../Util.js';\nimport { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { getNumberValidator, getStringValidator, getNumberOrAutoValidator, getBooleanValidator, } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nexport function stringToArray(string) {\n return Array.from(string);\n}\nvar AUTO = 'auto', CENTER = 'center', JUSTIFY = 'justify', CHANGE_KONVA = 'Change.konva', CONTEXT_2D = '2d', DASH = '-', LEFT = 'left', TEXT = 'text', TEXT_UPPER = 'Text', TOP = 'top', BOTTOM = 'bottom', MIDDLE = 'middle', NORMAL = 'normal', PX_SPACE = 'px ', SPACE = ' ', RIGHT = 'right', WORD = 'word', CHAR = 'char', NONE = 'none', ELLIPSIS = '…', ATTR_CHANGE_LIST = [\n 'fontFamily',\n 'fontSize',\n 'fontStyle',\n 'fontVariant',\n 'padding',\n 'align',\n 'verticalAlign',\n 'lineHeight',\n 'text',\n 'width',\n 'height',\n 'wrap',\n 'ellipsis',\n 'letterSpacing',\n], attrChangeListLen = ATTR_CHANGE_LIST.length;\nfunction normalizeFontFamily(fontFamily) {\n return fontFamily\n .split(',')\n .map((family) => {\n family = family.trim();\n const hasSpace = family.indexOf(' ') >= 0;\n const hasQuotes = family.indexOf('\"') >= 0 || family.indexOf(\"'\") >= 0;\n if (hasSpace && !hasQuotes) {\n family = `\"${family}\"`;\n }\n return family;\n })\n .join(', ');\n}\nvar dummyContext;\nfunction getDummyContext() {\n if (dummyContext) {\n return dummyContext;\n }\n dummyContext = Util.createCanvasElement().getContext(CONTEXT_2D);\n return dummyContext;\n}\nfunction _fillFunc(context) {\n context.fillText(this._partialText, this._partialTextX, this._partialTextY);\n}\nfunction _strokeFunc(context) {\n context.strokeText(this._partialText, this._partialTextX, this._partialTextY);\n}\nfunction checkDefaultFill(config) {\n config = config || {};\n if (!config.fillLinearGradientColorStops &&\n !config.fillRadialGradientColorStops &&\n !config.fillPatternImage) {\n config.fill = config.fill || 'black';\n }\n return config;\n}\nexport class Text extends Shape {\n constructor(config) {\n super(checkDefaultFill(config));\n this._partialTextX = 0;\n this._partialTextY = 0;\n for (var n = 0; n < attrChangeListLen; n++) {\n this.on(ATTR_CHANGE_LIST[n] + CHANGE_KONVA, this._setTextData);\n }\n this._setTextData();\n }\n _sceneFunc(context) {\n var textArr = this.textArr, textArrLen = textArr.length;\n if (!this.text()) {\n return;\n }\n var padding = this.padding(), fontSize = this.fontSize(), lineHeightPx = this.lineHeight() * fontSize, verticalAlign = this.verticalAlign(), alignY = 0, align = this.align(), totalWidth = this.getWidth(), letterSpacing = this.letterSpacing(), fill = this.fill(), textDecoration = this.textDecoration(), shouldUnderline = textDecoration.indexOf('underline') !== -1, shouldLineThrough = textDecoration.indexOf('line-through') !== -1, n;\n var translateY = 0;\n var translateY = lineHeightPx / 2;\n var lineTranslateX = 0;\n var lineTranslateY = 0;\n context.setAttr('font', this._getContextFont());\n context.setAttr('textBaseline', MIDDLE);\n context.setAttr('textAlign', LEFT);\n if (verticalAlign === MIDDLE) {\n alignY = (this.getHeight() - textArrLen * lineHeightPx - padding * 2) / 2;\n }\n else if (verticalAlign === BOTTOM) {\n alignY = this.getHeight() - textArrLen * lineHeightPx - padding * 2;\n }\n context.translate(padding, alignY + padding);\n for (n = 0; n < textArrLen; n++) {\n var lineTranslateX = 0;\n var lineTranslateY = 0;\n var obj = textArr[n], text = obj.text, width = obj.width, lastLine = obj.lastInParagraph, spacesNumber, oneWord, lineWidth;\n context.save();\n if (align === RIGHT) {\n lineTranslateX += totalWidth - width - padding * 2;\n }\n else if (align === CENTER) {\n lineTranslateX += (totalWidth - width - padding * 2) / 2;\n }\n if (shouldUnderline) {\n context.save();\n context.beginPath();\n context.moveTo(lineTranslateX, translateY + lineTranslateY + Math.round(fontSize / 2));\n spacesNumber = text.split(' ').length - 1;\n oneWord = spacesNumber === 0;\n lineWidth =\n align === JUSTIFY && !lastLine ? totalWidth - padding * 2 : width;\n context.lineTo(lineTranslateX + Math.round(lineWidth), translateY + lineTranslateY + Math.round(fontSize / 2));\n context.lineWidth = fontSize / 15;\n const gradient = this._getLinearGradient();\n context.strokeStyle = gradient || fill;\n context.stroke();\n context.restore();\n }\n if (shouldLineThrough) {\n context.save();\n context.beginPath();\n context.moveTo(lineTranslateX, translateY + lineTranslateY);\n spacesNumber = text.split(' ').length - 1;\n oneWord = spacesNumber === 0;\n lineWidth =\n align === JUSTIFY && lastLine && !oneWord\n ? totalWidth - padding * 2\n : width;\n context.lineTo(lineTranslateX + Math.round(lineWidth), translateY + lineTranslateY);\n context.lineWidth = fontSize / 15;\n const gradient = this._getLinearGradient();\n context.strokeStyle = gradient || fill;\n context.stroke();\n context.restore();\n }\n if (letterSpacing !== 0 || align === JUSTIFY) {\n spacesNumber = text.split(' ').length - 1;\n var array = stringToArray(text);\n for (var li = 0; li < array.length; li++) {\n var letter = array[li];\n if (letter === ' ' && !lastLine && align === JUSTIFY) {\n lineTranslateX += (totalWidth - padding * 2 - width) / spacesNumber;\n }\n this._partialTextX = lineTranslateX;\n this._partialTextY = translateY + lineTranslateY;\n this._partialText = letter;\n context.fillStrokeShape(this);\n lineTranslateX += this.measureSize(letter).width + letterSpacing;\n }\n }\n else {\n this._partialTextX = lineTranslateX;\n this._partialTextY = translateY + lineTranslateY;\n this._partialText = text;\n context.fillStrokeShape(this);\n }\n context.restore();\n if (textArrLen > 1) {\n translateY += lineHeightPx;\n }\n }\n }\n _hitFunc(context) {\n var width = this.getWidth(), height = this.getHeight();\n context.beginPath();\n context.rect(0, 0, width, height);\n context.closePath();\n context.fillStrokeShape(this);\n }\n setText(text) {\n var str = Util._isString(text)\n ? text\n : text === null || text === undefined\n ? ''\n : text + '';\n this._setAttr(TEXT, str);\n return this;\n }\n getWidth() {\n var isAuto = this.attrs.width === AUTO || this.attrs.width === undefined;\n return isAuto ? this.getTextWidth() + this.padding() * 2 : this.attrs.width;\n }\n getHeight() {\n var isAuto = this.attrs.height === AUTO || this.attrs.height === undefined;\n return isAuto\n ? this.fontSize() * this.textArr.length * this.lineHeight() +\n this.padding() * 2\n : this.attrs.height;\n }\n getTextWidth() {\n return this.textWidth;\n }\n getTextHeight() {\n Util.warn('text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height.');\n return this.textHeight;\n }\n measureSize(text) {\n var _context = getDummyContext(), fontSize = this.fontSize(), metrics;\n _context.save();\n _context.font = this._getContextFont();\n metrics = _context.measureText(text);\n _context.restore();\n return {\n width: metrics.width,\n height: fontSize,\n };\n }\n _getContextFont() {\n return (this.fontStyle() +\n SPACE +\n this.fontVariant() +\n SPACE +\n (this.fontSize() + PX_SPACE) +\n normalizeFontFamily(this.fontFamily()));\n }\n _addTextLine(line) {\n const align = this.align();\n if (align === JUSTIFY) {\n line = line.trim();\n }\n var width = this._getTextWidth(line);\n return this.textArr.push({\n text: line,\n width: width,\n lastInParagraph: false,\n });\n }\n _getTextWidth(text) {\n var letterSpacing = this.letterSpacing();\n var length = text.length;\n return (getDummyContext().measureText(text).width +\n (length ? letterSpacing * (length - 1) : 0));\n }\n _setTextData() {\n var lines = this.text().split('\\n'), fontSize = +this.fontSize(), textWidth = 0, lineHeightPx = this.lineHeight() * fontSize, width = this.attrs.width, height = this.attrs.height, fixedWidth = width !== AUTO && width !== undefined, fixedHeight = height !== AUTO && height !== undefined, padding = this.padding(), maxWidth = width - padding * 2, maxHeightPx = height - padding * 2, currentHeightPx = 0, wrap = this.wrap(), shouldWrap = wrap !== NONE, wrapAtWord = wrap !== CHAR && shouldWrap, shouldAddEllipsis = this.ellipsis();\n this.textArr = [];\n getDummyContext().font = this._getContextFont();\n var additionalWidth = shouldAddEllipsis ? this._getTextWidth(ELLIPSIS) : 0;\n for (var i = 0, max = lines.length; i < max; ++i) {\n var line = lines[i];\n var lineWidth = this._getTextWidth(line);\n if (fixedWidth && lineWidth > maxWidth) {\n while (line.length > 0) {\n var low = 0, high = line.length, match = '', matchWidth = 0;\n while (low < high) {\n var mid = (low + high) >>> 1, substr = line.slice(0, mid + 1), substrWidth = this._getTextWidth(substr) + additionalWidth;\n if (substrWidth <= maxWidth) {\n low = mid + 1;\n match = substr;\n matchWidth = substrWidth;\n }\n else {\n high = mid;\n }\n }\n if (match) {\n if (wrapAtWord) {\n var wrapIndex;\n var nextChar = line[match.length];\n var nextIsSpaceOrDash = nextChar === SPACE || nextChar === DASH;\n if (nextIsSpaceOrDash && matchWidth <= maxWidth) {\n wrapIndex = match.length;\n }\n else {\n wrapIndex =\n Math.max(match.lastIndexOf(SPACE), match.lastIndexOf(DASH)) +\n 1;\n }\n if (wrapIndex > 0) {\n low = wrapIndex;\n match = match.slice(0, low);\n matchWidth = this._getTextWidth(match);\n }\n }\n match = match.trimRight();\n this._addTextLine(match);\n textWidth = Math.max(textWidth, matchWidth);\n currentHeightPx += lineHeightPx;\n var shouldHandleEllipsis = this._shouldHandleEllipsis(currentHeightPx);\n if (shouldHandleEllipsis) {\n this._tryToAddEllipsisToLastLine();\n break;\n }\n line = line.slice(low);\n line = line.trimLeft();\n if (line.length > 0) {\n lineWidth = this._getTextWidth(line);\n if (lineWidth <= maxWidth) {\n this._addTextLine(line);\n currentHeightPx += lineHeightPx;\n textWidth = Math.max(textWidth, lineWidth);\n break;\n }\n }\n }\n else {\n break;\n }\n }\n }\n else {\n this._addTextLine(line);\n currentHeightPx += lineHeightPx;\n textWidth = Math.max(textWidth, lineWidth);\n if (this._shouldHandleEllipsis(currentHeightPx) && i < max - 1) {\n this._tryToAddEllipsisToLastLine();\n }\n }\n if (this.textArr[this.textArr.length - 1]) {\n this.textArr[this.textArr.length - 1].lastInParagraph = true;\n }\n if (fixedHeight && currentHeightPx + lineHeightPx > maxHeightPx) {\n break;\n }\n }\n this.textHeight = fontSize;\n this.textWidth = textWidth;\n }\n _shouldHandleEllipsis(currentHeightPx) {\n var fontSize = +this.fontSize(), lineHeightPx = this.lineHeight() * fontSize, height = this.attrs.height, fixedHeight = height !== AUTO && height !== undefined, padding = this.padding(), maxHeightPx = height - padding * 2, wrap = this.wrap(), shouldWrap = wrap !== NONE;\n return (!shouldWrap ||\n (fixedHeight && currentHeightPx + lineHeightPx > maxHeightPx));\n }\n _tryToAddEllipsisToLastLine() {\n var width = this.attrs.width, fixedWidth = width !== AUTO && width !== undefined, padding = this.padding(), maxWidth = width - padding * 2, shouldAddEllipsis = this.ellipsis();\n var lastLine = this.textArr[this.textArr.length - 1];\n if (!lastLine || !shouldAddEllipsis) {\n return;\n }\n if (fixedWidth) {\n var haveSpace = this._getTextWidth(lastLine.text + ELLIPSIS) < maxWidth;\n if (!haveSpace) {\n lastLine.text = lastLine.text.slice(0, lastLine.text.length - 3);\n }\n }\n this.textArr.splice(this.textArr.length - 1, 1);\n this._addTextLine(lastLine.text + ELLIPSIS);\n }\n getStrokeScaleEnabled() {\n return true;\n }\n}\nText.prototype._fillFunc = _fillFunc;\nText.prototype._strokeFunc = _strokeFunc;\nText.prototype.className = TEXT_UPPER;\nText.prototype._attrsAffectingSize = [\n 'text',\n 'fontSize',\n 'padding',\n 'wrap',\n 'lineHeight',\n 'letterSpacing',\n];\n_registerNode(Text);\nFactory.overWriteSetter(Text, 'width', getNumberOrAutoValidator());\nFactory.overWriteSetter(Text, 'height', getNumberOrAutoValidator());\nFactory.addGetterSetter(Text, 'fontFamily', 'Arial');\nFactory.addGetterSetter(Text, 'fontSize', 12, getNumberValidator());\nFactory.addGetterSetter(Text, 'fontStyle', NORMAL);\nFactory.addGetterSetter(Text, 'fontVariant', NORMAL);\nFactory.addGetterSetter(Text, 'padding', 0, getNumberValidator());\nFactory.addGetterSetter(Text, 'align', LEFT);\nFactory.addGetterSetter(Text, 'verticalAlign', TOP);\nFactory.addGetterSetter(Text, 'lineHeight', 1, getNumberValidator());\nFactory.addGetterSetter(Text, 'wrap', WORD);\nFactory.addGetterSetter(Text, 'ellipsis', false, getBooleanValidator());\nFactory.addGetterSetter(Text, 'letterSpacing', 0, getNumberValidator());\nFactory.addGetterSetter(Text, 'text', '', getStringValidator());\nFactory.addGetterSetter(Text, 'textDecoration', '');\n","import { Util } from '../Util.js';\nimport { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { Path } from './Path.js';\nimport { Text, stringToArray } from './Text.js';\nimport { getNumberValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nvar EMPTY_STRING = '', NORMAL = 'normal';\nfunction _fillFunc(context) {\n context.fillText(this.partialText, 0, 0);\n}\nfunction _strokeFunc(context) {\n context.strokeText(this.partialText, 0, 0);\n}\nexport class TextPath extends Shape {\n constructor(config) {\n super(config);\n this.dummyCanvas = Util.createCanvasElement();\n this.dataArray = [];\n this.dataArray = Path.parsePathData(this.attrs.data);\n this.on('dataChange.konva', function () {\n this.dataArray = Path.parsePathData(this.attrs.data);\n this._setTextData();\n });\n this.on('textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva', this._setTextData);\n this._setTextData();\n }\n _sceneFunc(context) {\n context.setAttr('font', this._getContextFont());\n context.setAttr('textBaseline', this.textBaseline());\n context.setAttr('textAlign', 'left');\n context.save();\n var textDecoration = this.textDecoration();\n var fill = this.fill();\n var fontSize = this.fontSize();\n var glyphInfo = this.glyphInfo;\n if (textDecoration === 'underline') {\n context.beginPath();\n }\n for (var i = 0; i < glyphInfo.length; i++) {\n context.save();\n var p0 = glyphInfo[i].p0;\n context.translate(p0.x, p0.y);\n context.rotate(glyphInfo[i].rotation);\n this.partialText = glyphInfo[i].text;\n context.fillStrokeShape(this);\n if (textDecoration === 'underline') {\n if (i === 0) {\n context.moveTo(0, fontSize / 2 + 1);\n }\n context.lineTo(fontSize, fontSize / 2 + 1);\n }\n context.restore();\n }\n if (textDecoration === 'underline') {\n context.strokeStyle = fill;\n context.lineWidth = fontSize / 20;\n context.stroke();\n }\n context.restore();\n }\n _hitFunc(context) {\n context.beginPath();\n var glyphInfo = this.glyphInfo;\n if (glyphInfo.length >= 1) {\n var p0 = glyphInfo[0].p0;\n context.moveTo(p0.x, p0.y);\n }\n for (var i = 0; i < glyphInfo.length; i++) {\n var p1 = glyphInfo[i].p1;\n context.lineTo(p1.x, p1.y);\n }\n context.setAttr('lineWidth', this.fontSize());\n context.setAttr('strokeStyle', this.colorKey);\n context.stroke();\n }\n getTextWidth() {\n return this.textWidth;\n }\n getTextHeight() {\n Util.warn('text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height.');\n return this.textHeight;\n }\n setText(text) {\n return Text.prototype.setText.call(this, text);\n }\n _getContextFont() {\n return Text.prototype._getContextFont.call(this);\n }\n _getTextSize(text) {\n var dummyCanvas = this.dummyCanvas;\n var _context = dummyCanvas.getContext('2d');\n _context.save();\n _context.font = this._getContextFont();\n var metrics = _context.measureText(text);\n _context.restore();\n return {\n width: metrics.width,\n height: parseInt(this.attrs.fontSize, 10),\n };\n }\n _setTextData() {\n var that = this;\n var size = this._getTextSize(this.attrs.text);\n var letterSpacing = this.letterSpacing();\n var align = this.align();\n var kerningFunc = this.kerningFunc();\n this.textWidth = size.width;\n this.textHeight = size.height;\n var textFullWidth = Math.max(this.textWidth + ((this.attrs.text || '').length - 1) * letterSpacing, 0);\n this.glyphInfo = [];\n var fullPathWidth = 0;\n for (var l = 0; l < that.dataArray.length; l++) {\n if (that.dataArray[l].pathLength > 0) {\n fullPathWidth += that.dataArray[l].pathLength;\n }\n }\n var offset = 0;\n if (align === 'center') {\n offset = Math.max(0, fullPathWidth / 2 - textFullWidth / 2);\n }\n if (align === 'right') {\n offset = Math.max(0, fullPathWidth - textFullWidth);\n }\n var charArr = stringToArray(this.text());\n var spacesNumber = this.text().split(' ').length - 1;\n var p0, p1, pathCmd;\n var pIndex = -1;\n var currentT = 0;\n var getNextPathSegment = function () {\n currentT = 0;\n var pathData = that.dataArray;\n for (var j = pIndex + 1; j < pathData.length; j++) {\n if (pathData[j].pathLength > 0) {\n pIndex = j;\n return pathData[j];\n }\n else if (pathData[j].command === 'M') {\n p0 = {\n x: pathData[j].points[0],\n y: pathData[j].points[1],\n };\n }\n }\n return {};\n };\n var findSegmentToFitCharacter = function (c) {\n var glyphWidth = that._getTextSize(c).width + letterSpacing;\n if (c === ' ' && align === 'justify') {\n glyphWidth += (fullPathWidth - textFullWidth) / spacesNumber;\n }\n var currLen = 0;\n var attempts = 0;\n p1 = undefined;\n while (Math.abs(glyphWidth - currLen) / glyphWidth > 0.01 &&\n attempts < 20) {\n attempts++;\n var cumulativePathLength = currLen;\n while (pathCmd === undefined) {\n pathCmd = getNextPathSegment();\n if (pathCmd &&\n cumulativePathLength + pathCmd.pathLength < glyphWidth) {\n cumulativePathLength += pathCmd.pathLength;\n pathCmd = undefined;\n }\n }\n if (Object.keys(pathCmd).length === 0 || p0 === undefined) {\n return undefined;\n }\n var needNewSegment = false;\n switch (pathCmd.command) {\n case 'L':\n if (Path.getLineLength(p0.x, p0.y, pathCmd.points[0], pathCmd.points[1]) > glyphWidth) {\n p1 = Path.getPointOnLine(glyphWidth, p0.x, p0.y, pathCmd.points[0], pathCmd.points[1], p0.x, p0.y);\n }\n else {\n pathCmd = undefined;\n }\n break;\n case 'A':\n var start = pathCmd.points[4];\n var dTheta = pathCmd.points[5];\n var end = pathCmd.points[4] + dTheta;\n if (currentT === 0) {\n currentT = start + 0.00000001;\n }\n else if (glyphWidth > currLen) {\n currentT += ((Math.PI / 180.0) * dTheta) / Math.abs(dTheta);\n }\n else {\n currentT -= ((Math.PI / 360.0) * dTheta) / Math.abs(dTheta);\n }\n if ((dTheta < 0 && currentT < end) ||\n (dTheta >= 0 && currentT > end)) {\n currentT = end;\n needNewSegment = true;\n }\n p1 = Path.getPointOnEllipticalArc(pathCmd.points[0], pathCmd.points[1], pathCmd.points[2], pathCmd.points[3], currentT, pathCmd.points[6]);\n break;\n case 'C':\n if (currentT === 0) {\n if (glyphWidth > pathCmd.pathLength) {\n currentT = 0.00000001;\n }\n else {\n currentT = glyphWidth / pathCmd.pathLength;\n }\n }\n else if (glyphWidth > currLen) {\n currentT += (glyphWidth - currLen) / pathCmd.pathLength / 2;\n }\n else {\n currentT = Math.max(currentT - (currLen - glyphWidth) / pathCmd.pathLength / 2, 0);\n }\n if (currentT > 1.0) {\n currentT = 1.0;\n needNewSegment = true;\n }\n p1 = Path.getPointOnCubicBezier(currentT, pathCmd.start.x, pathCmd.start.y, pathCmd.points[0], pathCmd.points[1], pathCmd.points[2], pathCmd.points[3], pathCmd.points[4], pathCmd.points[5]);\n break;\n case 'Q':\n if (currentT === 0) {\n currentT = glyphWidth / pathCmd.pathLength;\n }\n else if (glyphWidth > currLen) {\n currentT += (glyphWidth - currLen) / pathCmd.pathLength;\n }\n else {\n currentT -= (currLen - glyphWidth) / pathCmd.pathLength;\n }\n if (currentT > 1.0) {\n currentT = 1.0;\n needNewSegment = true;\n }\n p1 = Path.getPointOnQuadraticBezier(currentT, pathCmd.start.x, pathCmd.start.y, pathCmd.points[0], pathCmd.points[1], pathCmd.points[2], pathCmd.points[3]);\n break;\n }\n if (p1 !== undefined) {\n currLen = Path.getLineLength(p0.x, p0.y, p1.x, p1.y);\n }\n if (needNewSegment) {\n needNewSegment = false;\n pathCmd = undefined;\n }\n }\n };\n var testChar = 'C';\n var glyphWidth = that._getTextSize(testChar).width + letterSpacing;\n var lettersInOffset = offset / glyphWidth - 1;\n for (var k = 0; k < lettersInOffset; k++) {\n findSegmentToFitCharacter(testChar);\n if (p0 === undefined || p1 === undefined) {\n break;\n }\n p0 = p1;\n }\n for (var i = 0; i < charArr.length; i++) {\n findSegmentToFitCharacter(charArr[i]);\n if (p0 === undefined || p1 === undefined) {\n break;\n }\n var width = Path.getLineLength(p0.x, p0.y, p1.x, p1.y);\n var kern = 0;\n if (kerningFunc) {\n try {\n kern = kerningFunc(charArr[i - 1], charArr[i]) * this.fontSize();\n }\n catch (e) {\n kern = 0;\n }\n }\n p0.x += kern;\n p1.x += kern;\n this.textWidth += kern;\n var midpoint = Path.getPointOnLine(kern + width / 2.0, p0.x, p0.y, p1.x, p1.y);\n var rotation = Math.atan2(p1.y - p0.y, p1.x - p0.x);\n this.glyphInfo.push({\n transposeX: midpoint.x,\n transposeY: midpoint.y,\n text: charArr[i],\n rotation: rotation,\n p0: p0,\n p1: p1,\n });\n p0 = p1;\n }\n }\n getSelfRect() {\n if (!this.glyphInfo.length) {\n return {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n };\n }\n var points = [];\n this.glyphInfo.forEach(function (info) {\n points.push(info.p0.x);\n points.push(info.p0.y);\n points.push(info.p1.x);\n points.push(info.p1.y);\n });\n var minX = points[0] || 0;\n var maxX = points[0] || 0;\n var minY = points[1] || 0;\n var maxY = points[1] || 0;\n var x, y;\n for (var i = 0; i < points.length / 2; i++) {\n x = points[i * 2];\n y = points[i * 2 + 1];\n minX = Math.min(minX, x);\n maxX = Math.max(maxX, x);\n minY = Math.min(minY, y);\n maxY = Math.max(maxY, y);\n }\n var fontSize = this.fontSize();\n return {\n x: minX - fontSize / 2,\n y: minY - fontSize / 2,\n width: maxX - minX + fontSize,\n height: maxY - minY + fontSize,\n };\n }\n destroy() {\n Util.releaseCanvas(this.dummyCanvas);\n return super.destroy();\n }\n}\nTextPath.prototype._fillFunc = _fillFunc;\nTextPath.prototype._strokeFunc = _strokeFunc;\nTextPath.prototype._fillFuncHit = _fillFunc;\nTextPath.prototype._strokeFuncHit = _strokeFunc;\nTextPath.prototype.className = 'TextPath';\nTextPath.prototype._attrsAffectingSize = ['text', 'fontSize', 'data'];\n_registerNode(TextPath);\nFactory.addGetterSetter(TextPath, 'data');\nFactory.addGetterSetter(TextPath, 'fontFamily', 'Arial');\nFactory.addGetterSetter(TextPath, 'fontSize', 12, getNumberValidator());\nFactory.addGetterSetter(TextPath, 'fontStyle', NORMAL);\nFactory.addGetterSetter(TextPath, 'align', 'left');\nFactory.addGetterSetter(TextPath, 'letterSpacing', 0, getNumberValidator());\nFactory.addGetterSetter(TextPath, 'textBaseline', 'middle');\nFactory.addGetterSetter(TextPath, 'fontVariant', NORMAL);\nFactory.addGetterSetter(TextPath, 'text', EMPTY_STRING);\nFactory.addGetterSetter(TextPath, 'textDecoration', null);\nFactory.addGetterSetter(TextPath, 'kerningFunc', null);\n","import { Util, Transform } from '../Util.js';\nimport { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { Shape } from '../Shape.js';\nimport { Rect } from './Rect.js';\nimport { Group } from '../Group.js';\nimport { Konva } from '../Global.js';\nimport { getBooleanValidator, getNumberValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nvar EVENTS_NAME = 'tr-konva';\nvar ATTR_CHANGE_LIST = [\n 'resizeEnabledChange',\n 'rotateAnchorOffsetChange',\n 'rotateEnabledChange',\n 'enabledAnchorsChange',\n 'anchorSizeChange',\n 'borderEnabledChange',\n 'borderStrokeChange',\n 'borderStrokeWidthChange',\n 'borderDashChange',\n 'anchorStrokeChange',\n 'anchorStrokeWidthChange',\n 'anchorFillChange',\n 'anchorCornerRadiusChange',\n 'ignoreStrokeChange',\n]\n .map((e) => e + `.${EVENTS_NAME}`)\n .join(' ');\nvar NODES_RECT = 'nodesRect';\nvar TRANSFORM_CHANGE_STR = [\n 'widthChange',\n 'heightChange',\n 'scaleXChange',\n 'scaleYChange',\n 'skewXChange',\n 'skewYChange',\n 'rotationChange',\n 'offsetXChange',\n 'offsetYChange',\n 'transformsEnabledChange',\n 'strokeWidthChange',\n];\nvar ANGLES = {\n 'top-left': -45,\n 'top-center': 0,\n 'top-right': 45,\n 'middle-right': -90,\n 'middle-left': 90,\n 'bottom-left': -135,\n 'bottom-center': 180,\n 'bottom-right': 135,\n};\nconst TOUCH_DEVICE = 'ontouchstart' in Konva._global;\nfunction getCursor(anchorName, rad) {\n if (anchorName === 'rotater') {\n return 'crosshair';\n }\n rad += Util.degToRad(ANGLES[anchorName] || 0);\n var angle = ((Util.radToDeg(rad) % 360) + 360) % 360;\n if (Util._inRange(angle, 315 + 22.5, 360) || Util._inRange(angle, 0, 22.5)) {\n return 'ns-resize';\n }\n else if (Util._inRange(angle, 45 - 22.5, 45 + 22.5)) {\n return 'nesw-resize';\n }\n else if (Util._inRange(angle, 90 - 22.5, 90 + 22.5)) {\n return 'ew-resize';\n }\n else if (Util._inRange(angle, 135 - 22.5, 135 + 22.5)) {\n return 'nwse-resize';\n }\n else if (Util._inRange(angle, 180 - 22.5, 180 + 22.5)) {\n return 'ns-resize';\n }\n else if (Util._inRange(angle, 225 - 22.5, 225 + 22.5)) {\n return 'nesw-resize';\n }\n else if (Util._inRange(angle, 270 - 22.5, 270 + 22.5)) {\n return 'ew-resize';\n }\n else if (Util._inRange(angle, 315 - 22.5, 315 + 22.5)) {\n return 'nwse-resize';\n }\n else {\n Util.error('Transformer has unknown angle for cursor detection: ' + angle);\n return 'pointer';\n }\n}\nvar ANCHORS_NAMES = [\n 'top-left',\n 'top-center',\n 'top-right',\n 'middle-right',\n 'middle-left',\n 'bottom-left',\n 'bottom-center',\n 'bottom-right',\n];\nvar MAX_SAFE_INTEGER = 100000000;\nfunction getCenter(shape) {\n return {\n x: shape.x +\n (shape.width / 2) * Math.cos(shape.rotation) +\n (shape.height / 2) * Math.sin(-shape.rotation),\n y: shape.y +\n (shape.height / 2) * Math.cos(shape.rotation) +\n (shape.width / 2) * Math.sin(shape.rotation),\n };\n}\nfunction rotateAroundPoint(shape, angleRad, point) {\n const x = point.x +\n (shape.x - point.x) * Math.cos(angleRad) -\n (shape.y - point.y) * Math.sin(angleRad);\n const y = point.y +\n (shape.x - point.x) * Math.sin(angleRad) +\n (shape.y - point.y) * Math.cos(angleRad);\n return Object.assign(Object.assign({}, shape), { rotation: shape.rotation + angleRad, x,\n y });\n}\nfunction rotateAroundCenter(shape, deltaRad) {\n const center = getCenter(shape);\n return rotateAroundPoint(shape, deltaRad, center);\n}\nfunction getSnap(snaps, newRotationRad, tol) {\n let snapped = newRotationRad;\n for (let i = 0; i < snaps.length; i++) {\n const angle = Konva.getAngle(snaps[i]);\n const absDiff = Math.abs(angle - newRotationRad) % (Math.PI * 2);\n const dif = Math.min(absDiff, Math.PI * 2 - absDiff);\n if (dif < tol) {\n snapped = angle;\n }\n }\n return snapped;\n}\nexport class Transformer extends Group {\n constructor(config) {\n super(config);\n this._transforming = false;\n this._createElements();\n this._handleMouseMove = this._handleMouseMove.bind(this);\n this._handleMouseUp = this._handleMouseUp.bind(this);\n this.update = this.update.bind(this);\n this.on(ATTR_CHANGE_LIST, this.update);\n if (this.getNode()) {\n this.update();\n }\n }\n attachTo(node) {\n this.setNode(node);\n return this;\n }\n setNode(node) {\n Util.warn('tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead.');\n return this.setNodes([node]);\n }\n getNode() {\n return this._nodes && this._nodes[0];\n }\n _getEventNamespace() {\n return EVENTS_NAME + this._id;\n }\n setNodes(nodes = []) {\n if (this._nodes && this._nodes.length) {\n this.detach();\n }\n const filteredNodes = nodes.filter((node) => {\n if (node.isAncestorOf(this)) {\n Util.error('Konva.Transformer cannot be an a child of the node you are trying to attach');\n return false;\n }\n return true;\n });\n this._nodes = nodes = filteredNodes;\n if (nodes.length === 1 && this.useSingleNodeRotation()) {\n this.rotation(nodes[0].getAbsoluteRotation());\n }\n else {\n this.rotation(0);\n }\n this._nodes.forEach((node) => {\n const onChange = () => {\n if (this.nodes().length === 1 && this.useSingleNodeRotation()) {\n this.rotation(this.nodes()[0].getAbsoluteRotation());\n }\n this._resetTransformCache();\n if (!this._transforming && !this.isDragging()) {\n this.update();\n }\n };\n const additionalEvents = node._attrsAffectingSize\n .map((prop) => prop + 'Change.' + this._getEventNamespace())\n .join(' ');\n node.on(additionalEvents, onChange);\n node.on(TRANSFORM_CHANGE_STR.map((e) => e + `.${this._getEventNamespace()}`).join(' '), onChange);\n node.on(`absoluteTransformChange.${this._getEventNamespace()}`, onChange);\n this._proxyDrag(node);\n });\n this._resetTransformCache();\n var elementsCreated = !!this.findOne('.top-left');\n if (elementsCreated) {\n this.update();\n }\n return this;\n }\n _proxyDrag(node) {\n let lastPos;\n node.on(`dragstart.${this._getEventNamespace()}`, (e) => {\n lastPos = node.getAbsolutePosition();\n if (!this.isDragging() && node !== this.findOne('.back')) {\n this.startDrag(e, false);\n }\n });\n node.on(`dragmove.${this._getEventNamespace()}`, (e) => {\n if (!lastPos) {\n return;\n }\n const abs = node.getAbsolutePosition();\n const dx = abs.x - lastPos.x;\n const dy = abs.y - lastPos.y;\n this.nodes().forEach((otherNode) => {\n if (otherNode === node) {\n return;\n }\n if (otherNode.isDragging()) {\n return;\n }\n const otherAbs = otherNode.getAbsolutePosition();\n otherNode.setAbsolutePosition({\n x: otherAbs.x + dx,\n y: otherAbs.y + dy,\n });\n otherNode.startDrag(e);\n });\n lastPos = null;\n });\n }\n getNodes() {\n return this._nodes || [];\n }\n getActiveAnchor() {\n return this._movingAnchorName;\n }\n detach() {\n if (this._nodes) {\n this._nodes.forEach((node) => {\n node.off('.' + this._getEventNamespace());\n });\n }\n this._nodes = [];\n this._resetTransformCache();\n }\n _resetTransformCache() {\n this._clearCache(NODES_RECT);\n this._clearCache('transform');\n this._clearSelfAndDescendantCache('absoluteTransform');\n }\n _getNodeRect() {\n return this._getCache(NODES_RECT, this.__getNodeRect);\n }\n __getNodeShape(node, rot = this.rotation(), relative) {\n var rect = node.getClientRect({\n skipTransform: true,\n skipShadow: true,\n skipStroke: this.ignoreStroke(),\n });\n var absScale = node.getAbsoluteScale(relative);\n var absPos = node.getAbsolutePosition(relative);\n var dx = rect.x * absScale.x - node.offsetX() * absScale.x;\n var dy = rect.y * absScale.y - node.offsetY() * absScale.y;\n const rotation = (Konva.getAngle(node.getAbsoluteRotation()) + Math.PI * 2) %\n (Math.PI * 2);\n const box = {\n x: absPos.x + dx * Math.cos(rotation) + dy * Math.sin(-rotation),\n y: absPos.y + dy * Math.cos(rotation) + dx * Math.sin(rotation),\n width: rect.width * absScale.x,\n height: rect.height * absScale.y,\n rotation: rotation,\n };\n return rotateAroundPoint(box, -Konva.getAngle(rot), {\n x: 0,\n y: 0,\n });\n }\n __getNodeRect() {\n var node = this.getNode();\n if (!node) {\n return {\n x: -MAX_SAFE_INTEGER,\n y: -MAX_SAFE_INTEGER,\n width: 0,\n height: 0,\n rotation: 0,\n };\n }\n const totalPoints = [];\n this.nodes().map((node) => {\n const box = node.getClientRect({\n skipTransform: true,\n skipShadow: true,\n skipStroke: this.ignoreStroke(),\n });\n var points = [\n { x: box.x, y: box.y },\n { x: box.x + box.width, y: box.y },\n { x: box.x + box.width, y: box.y + box.height },\n { x: box.x, y: box.y + box.height },\n ];\n var trans = node.getAbsoluteTransform();\n points.forEach(function (point) {\n var transformed = trans.point(point);\n totalPoints.push(transformed);\n });\n });\n const tr = new Transform();\n tr.rotate(-Konva.getAngle(this.rotation()));\n var minX, minY, maxX, maxY;\n totalPoints.forEach(function (point) {\n var transformed = tr.point(point);\n if (minX === undefined) {\n minX = maxX = transformed.x;\n minY = maxY = transformed.y;\n }\n minX = Math.min(minX, transformed.x);\n minY = Math.min(minY, transformed.y);\n maxX = Math.max(maxX, transformed.x);\n maxY = Math.max(maxY, transformed.y);\n });\n tr.invert();\n const p = tr.point({ x: minX, y: minY });\n return {\n x: p.x,\n y: p.y,\n width: maxX - minX,\n height: maxY - minY,\n rotation: Konva.getAngle(this.rotation()),\n };\n }\n getX() {\n return this._getNodeRect().x;\n }\n getY() {\n return this._getNodeRect().y;\n }\n getWidth() {\n return this._getNodeRect().width;\n }\n getHeight() {\n return this._getNodeRect().height;\n }\n _createElements() {\n this._createBack();\n ANCHORS_NAMES.forEach(function (name) {\n this._createAnchor(name);\n }.bind(this));\n this._createAnchor('rotater');\n }\n _createAnchor(name) {\n var anchor = new Rect({\n stroke: 'rgb(0, 161, 255)',\n fill: 'white',\n strokeWidth: 1,\n name: name + ' _anchor',\n dragDistance: 0,\n draggable: true,\n hitStrokeWidth: TOUCH_DEVICE ? 10 : 'auto',\n });\n var self = this;\n anchor.on('mousedown touchstart', function (e) {\n self._handleMouseDown(e);\n });\n anchor.on('dragstart', (e) => {\n anchor.stopDrag();\n e.cancelBubble = true;\n });\n anchor.on('dragend', (e) => {\n e.cancelBubble = true;\n });\n anchor.on('mouseenter', () => {\n var rad = Konva.getAngle(this.rotation());\n var cursor = getCursor(name, rad);\n anchor.getStage().content &&\n (anchor.getStage().content.style.cursor = cursor);\n this._cursorChange = true;\n });\n anchor.on('mouseout', () => {\n anchor.getStage().content &&\n (anchor.getStage().content.style.cursor = '');\n this._cursorChange = false;\n });\n this.add(anchor);\n }\n _createBack() {\n var back = new Shape({\n name: 'back',\n width: 0,\n height: 0,\n draggable: true,\n sceneFunc(ctx) {\n var tr = this.getParent();\n var padding = tr.padding();\n ctx.beginPath();\n ctx.rect(-padding, -padding, this.width() + padding * 2, this.height() + padding * 2);\n ctx.moveTo(this.width() / 2, -padding);\n if (tr.rotateEnabled()) {\n ctx.lineTo(this.width() / 2, -tr.rotateAnchorOffset() * Util._sign(this.height()) - padding);\n }\n ctx.fillStrokeShape(this);\n },\n hitFunc: (ctx, shape) => {\n if (!this.shouldOverdrawWholeArea()) {\n return;\n }\n var padding = this.padding();\n ctx.beginPath();\n ctx.rect(-padding, -padding, shape.width() + padding * 2, shape.height() + padding * 2);\n ctx.fillStrokeShape(shape);\n },\n });\n this.add(back);\n this._proxyDrag(back);\n back.on('dragstart', (e) => {\n e.cancelBubble = true;\n });\n back.on('dragmove', (e) => {\n e.cancelBubble = true;\n });\n back.on('dragend', (e) => {\n e.cancelBubble = true;\n });\n this.on('dragmove', (e) => {\n this.update();\n });\n }\n _handleMouseDown(e) {\n this._movingAnchorName = e.target.name().split(' ')[0];\n var attrs = this._getNodeRect();\n var width = attrs.width;\n var height = attrs.height;\n var hypotenuse = Math.sqrt(Math.pow(width, 2) + Math.pow(height, 2));\n this.sin = Math.abs(height / hypotenuse);\n this.cos = Math.abs(width / hypotenuse);\n if (typeof window !== 'undefined') {\n window.addEventListener('mousemove', this._handleMouseMove);\n window.addEventListener('touchmove', this._handleMouseMove);\n window.addEventListener('mouseup', this._handleMouseUp, true);\n window.addEventListener('touchend', this._handleMouseUp, true);\n }\n this._transforming = true;\n var ap = e.target.getAbsolutePosition();\n var pos = e.target.getStage().getPointerPosition();\n this._anchorDragOffset = {\n x: pos.x - ap.x,\n y: pos.y - ap.y,\n };\n this._fire('transformstart', { evt: e.evt, target: this.getNode() });\n this._nodes.forEach((target) => {\n target._fire('transformstart', { evt: e.evt, target });\n });\n }\n _handleMouseMove(e) {\n var x, y, newHypotenuse;\n var anchorNode = this.findOne('.' + this._movingAnchorName);\n var stage = anchorNode.getStage();\n stage.setPointersPositions(e);\n const pp = stage.getPointerPosition();\n let newNodePos = {\n x: pp.x - this._anchorDragOffset.x,\n y: pp.y - this._anchorDragOffset.y,\n };\n const oldAbs = anchorNode.getAbsolutePosition();\n if (this.anchorDragBoundFunc()) {\n newNodePos = this.anchorDragBoundFunc()(oldAbs, newNodePos, e);\n }\n anchorNode.setAbsolutePosition(newNodePos);\n const newAbs = anchorNode.getAbsolutePosition();\n if (oldAbs.x === newAbs.x && oldAbs.y === newAbs.y) {\n return;\n }\n if (this._movingAnchorName === 'rotater') {\n var attrs = this._getNodeRect();\n x = anchorNode.x() - attrs.width / 2;\n y = -anchorNode.y() + attrs.height / 2;\n let delta = Math.atan2(-y, x) + Math.PI / 2;\n if (attrs.height < 0) {\n delta -= Math.PI;\n }\n var oldRotation = Konva.getAngle(this.rotation());\n const newRotation = oldRotation + delta;\n const tol = Konva.getAngle(this.rotationSnapTolerance());\n const snappedRot = getSnap(this.rotationSnaps(), newRotation, tol);\n const diff = snappedRot - attrs.rotation;\n const shape = rotateAroundCenter(attrs, diff);\n this._fitNodesInto(shape, e);\n return;\n }\n var keepProportion = this.keepRatio() || e.shiftKey;\n var centeredScaling = this.centeredScaling() || e.altKey;\n if (this._movingAnchorName === 'top-left') {\n if (keepProportion) {\n var comparePoint = centeredScaling\n ? {\n x: this.width() / 2,\n y: this.height() / 2,\n }\n : {\n x: this.findOne('.bottom-right').x(),\n y: this.findOne('.bottom-right').y(),\n };\n newHypotenuse = Math.sqrt(Math.pow(comparePoint.x - anchorNode.x(), 2) +\n Math.pow(comparePoint.y - anchorNode.y(), 2));\n var reverseX = this.findOne('.top-left').x() > comparePoint.x ? -1 : 1;\n var reverseY = this.findOne('.top-left').y() > comparePoint.y ? -1 : 1;\n x = newHypotenuse * this.cos * reverseX;\n y = newHypotenuse * this.sin * reverseY;\n this.findOne('.top-left').x(comparePoint.x - x);\n this.findOne('.top-left').y(comparePoint.y - y);\n }\n }\n else if (this._movingAnchorName === 'top-center') {\n this.findOne('.top-left').y(anchorNode.y());\n }\n else if (this._movingAnchorName === 'top-right') {\n if (keepProportion) {\n var comparePoint = centeredScaling\n ? {\n x: this.width() / 2,\n y: this.height() / 2,\n }\n : {\n x: this.findOne('.bottom-left').x(),\n y: this.findOne('.bottom-left').y(),\n };\n newHypotenuse = Math.sqrt(Math.pow(anchorNode.x() - comparePoint.x, 2) +\n Math.pow(comparePoint.y - anchorNode.y(), 2));\n var reverseX = this.findOne('.top-right').x() < comparePoint.x ? -1 : 1;\n var reverseY = this.findOne('.top-right').y() > comparePoint.y ? -1 : 1;\n x = newHypotenuse * this.cos * reverseX;\n y = newHypotenuse * this.sin * reverseY;\n this.findOne('.top-right').x(comparePoint.x + x);\n this.findOne('.top-right').y(comparePoint.y - y);\n }\n var pos = anchorNode.position();\n this.findOne('.top-left').y(pos.y);\n this.findOne('.bottom-right').x(pos.x);\n }\n else if (this._movingAnchorName === 'middle-left') {\n this.findOne('.top-left').x(anchorNode.x());\n }\n else if (this._movingAnchorName === 'middle-right') {\n this.findOne('.bottom-right').x(anchorNode.x());\n }\n else if (this._movingAnchorName === 'bottom-left') {\n if (keepProportion) {\n var comparePoint = centeredScaling\n ? {\n x: this.width() / 2,\n y: this.height() / 2,\n }\n : {\n x: this.findOne('.top-right').x(),\n y: this.findOne('.top-right').y(),\n };\n newHypotenuse = Math.sqrt(Math.pow(comparePoint.x - anchorNode.x(), 2) +\n Math.pow(anchorNode.y() - comparePoint.y, 2));\n var reverseX = comparePoint.x < anchorNode.x() ? -1 : 1;\n var reverseY = anchorNode.y() < comparePoint.y ? -1 : 1;\n x = newHypotenuse * this.cos * reverseX;\n y = newHypotenuse * this.sin * reverseY;\n anchorNode.x(comparePoint.x - x);\n anchorNode.y(comparePoint.y + y);\n }\n pos = anchorNode.position();\n this.findOne('.top-left').x(pos.x);\n this.findOne('.bottom-right').y(pos.y);\n }\n else if (this._movingAnchorName === 'bottom-center') {\n this.findOne('.bottom-right').y(anchorNode.y());\n }\n else if (this._movingAnchorName === 'bottom-right') {\n if (keepProportion) {\n var comparePoint = centeredScaling\n ? {\n x: this.width() / 2,\n y: this.height() / 2,\n }\n : {\n x: this.findOne('.top-left').x(),\n y: this.findOne('.top-left').y(),\n };\n newHypotenuse = Math.sqrt(Math.pow(anchorNode.x() - comparePoint.x, 2) +\n Math.pow(anchorNode.y() - comparePoint.y, 2));\n var reverseX = this.findOne('.bottom-right').x() < comparePoint.x ? -1 : 1;\n var reverseY = this.findOne('.bottom-right').y() < comparePoint.y ? -1 : 1;\n x = newHypotenuse * this.cos * reverseX;\n y = newHypotenuse * this.sin * reverseY;\n this.findOne('.bottom-right').x(comparePoint.x + x);\n this.findOne('.bottom-right').y(comparePoint.y + y);\n }\n }\n else {\n console.error(new Error('Wrong position argument of selection resizer: ' +\n this._movingAnchorName));\n }\n var centeredScaling = this.centeredScaling() || e.altKey;\n if (centeredScaling) {\n var topLeft = this.findOne('.top-left');\n var bottomRight = this.findOne('.bottom-right');\n var topOffsetX = topLeft.x();\n var topOffsetY = topLeft.y();\n var bottomOffsetX = this.getWidth() - bottomRight.x();\n var bottomOffsetY = this.getHeight() - bottomRight.y();\n bottomRight.move({\n x: -topOffsetX,\n y: -topOffsetY,\n });\n topLeft.move({\n x: bottomOffsetX,\n y: bottomOffsetY,\n });\n }\n var absPos = this.findOne('.top-left').getAbsolutePosition();\n x = absPos.x;\n y = absPos.y;\n var width = this.findOne('.bottom-right').x() - this.findOne('.top-left').x();\n var height = this.findOne('.bottom-right').y() - this.findOne('.top-left').y();\n this._fitNodesInto({\n x: x,\n y: y,\n width: width,\n height: height,\n rotation: Konva.getAngle(this.rotation()),\n }, e);\n }\n _handleMouseUp(e) {\n this._removeEvents(e);\n }\n getAbsoluteTransform() {\n return this.getTransform();\n }\n _removeEvents(e) {\n if (this._transforming) {\n this._transforming = false;\n if (typeof window !== 'undefined') {\n window.removeEventListener('mousemove', this._handleMouseMove);\n window.removeEventListener('touchmove', this._handleMouseMove);\n window.removeEventListener('mouseup', this._handleMouseUp, true);\n window.removeEventListener('touchend', this._handleMouseUp, true);\n }\n var node = this.getNode();\n this._fire('transformend', { evt: e, target: node });\n if (node) {\n this._nodes.forEach((target) => {\n target._fire('transformend', { evt: e, target });\n });\n }\n this._movingAnchorName = null;\n }\n }\n _fitNodesInto(newAttrs, evt) {\n var oldAttrs = this._getNodeRect();\n const minSize = 1;\n if (Util._inRange(newAttrs.width, -this.padding() * 2 - minSize, minSize)) {\n this.update();\n return;\n }\n if (Util._inRange(newAttrs.height, -this.padding() * 2 - minSize, minSize)) {\n this.update();\n return;\n }\n const allowNegativeScale = this.flipEnabled();\n var t = new Transform();\n t.rotate(Konva.getAngle(this.rotation()));\n if (this._movingAnchorName &&\n newAttrs.width < 0 &&\n this._movingAnchorName.indexOf('left') >= 0) {\n const offset = t.point({\n x: -this.padding() * 2,\n y: 0,\n });\n newAttrs.x += offset.x;\n newAttrs.y += offset.y;\n newAttrs.width += this.padding() * 2;\n this._movingAnchorName = this._movingAnchorName.replace('left', 'right');\n this._anchorDragOffset.x -= offset.x;\n this._anchorDragOffset.y -= offset.y;\n if (!allowNegativeScale) {\n this.update();\n return;\n }\n }\n else if (this._movingAnchorName &&\n newAttrs.width < 0 &&\n this._movingAnchorName.indexOf('right') >= 0) {\n const offset = t.point({\n x: this.padding() * 2,\n y: 0,\n });\n this._movingAnchorName = this._movingAnchorName.replace('right', 'left');\n this._anchorDragOffset.x -= offset.x;\n this._anchorDragOffset.y -= offset.y;\n newAttrs.width += this.padding() * 2;\n if (!allowNegativeScale) {\n this.update();\n return;\n }\n }\n if (this._movingAnchorName &&\n newAttrs.height < 0 &&\n this._movingAnchorName.indexOf('top') >= 0) {\n const offset = t.point({\n x: 0,\n y: -this.padding() * 2,\n });\n newAttrs.x += offset.x;\n newAttrs.y += offset.y;\n this._movingAnchorName = this._movingAnchorName.replace('top', 'bottom');\n this._anchorDragOffset.x -= offset.x;\n this._anchorDragOffset.y -= offset.y;\n newAttrs.height += this.padding() * 2;\n if (!allowNegativeScale) {\n this.update();\n return;\n }\n }\n else if (this._movingAnchorName &&\n newAttrs.height < 0 &&\n this._movingAnchorName.indexOf('bottom') >= 0) {\n const offset = t.point({\n x: 0,\n y: this.padding() * 2,\n });\n this._movingAnchorName = this._movingAnchorName.replace('bottom', 'top');\n this._anchorDragOffset.x -= offset.x;\n this._anchorDragOffset.y -= offset.y;\n newAttrs.height += this.padding() * 2;\n if (!allowNegativeScale) {\n this.update();\n return;\n }\n }\n if (this.boundBoxFunc()) {\n const bounded = this.boundBoxFunc()(oldAttrs, newAttrs);\n if (bounded) {\n newAttrs = bounded;\n }\n else {\n Util.warn('boundBoxFunc returned falsy. You should return new bound rect from it!');\n }\n }\n const baseSize = 10000000;\n const oldTr = new Transform();\n oldTr.translate(oldAttrs.x, oldAttrs.y);\n oldTr.rotate(oldAttrs.rotation);\n oldTr.scale(oldAttrs.width / baseSize, oldAttrs.height / baseSize);\n const newTr = new Transform();\n newTr.translate(newAttrs.x, newAttrs.y);\n newTr.rotate(newAttrs.rotation);\n newTr.scale(newAttrs.width / baseSize, newAttrs.height / baseSize);\n const delta = newTr.multiply(oldTr.invert());\n this._nodes.forEach((node) => {\n var _a;\n const parentTransform = node.getParent().getAbsoluteTransform();\n const localTransform = node.getTransform().copy();\n localTransform.translate(node.offsetX(), node.offsetY());\n const newLocalTransform = new Transform();\n newLocalTransform\n .multiply(parentTransform.copy().invert())\n .multiply(delta)\n .multiply(parentTransform)\n .multiply(localTransform);\n const attrs = newLocalTransform.decompose();\n node.setAttrs(attrs);\n this._fire('transform', { evt: evt, target: node });\n node._fire('transform', { evt: evt, target: node });\n (_a = node.getLayer()) === null || _a === void 0 ? void 0 : _a.batchDraw();\n });\n this.rotation(Util._getRotation(newAttrs.rotation));\n this._resetTransformCache();\n this.update();\n this.getLayer().batchDraw();\n }\n forceUpdate() {\n this._resetTransformCache();\n this.update();\n }\n _batchChangeChild(selector, attrs) {\n const anchor = this.findOne(selector);\n anchor.setAttrs(attrs);\n }\n update() {\n var _a;\n var attrs = this._getNodeRect();\n this.rotation(Util._getRotation(attrs.rotation));\n var width = attrs.width;\n var height = attrs.height;\n var enabledAnchors = this.enabledAnchors();\n var resizeEnabled = this.resizeEnabled();\n var padding = this.padding();\n var anchorSize = this.anchorSize();\n this.find('._anchor').forEach((node) => {\n node.setAttrs({\n width: anchorSize,\n height: anchorSize,\n offsetX: anchorSize / 2,\n offsetY: anchorSize / 2,\n stroke: this.anchorStroke(),\n strokeWidth: this.anchorStrokeWidth(),\n fill: this.anchorFill(),\n cornerRadius: this.anchorCornerRadius(),\n });\n });\n this._batchChangeChild('.top-left', {\n x: 0,\n y: 0,\n offsetX: anchorSize / 2 + padding,\n offsetY: anchorSize / 2 + padding,\n visible: resizeEnabled && enabledAnchors.indexOf('top-left') >= 0,\n });\n this._batchChangeChild('.top-center', {\n x: width / 2,\n y: 0,\n offsetY: anchorSize / 2 + padding,\n visible: resizeEnabled && enabledAnchors.indexOf('top-center') >= 0,\n });\n this._batchChangeChild('.top-right', {\n x: width,\n y: 0,\n offsetX: anchorSize / 2 - padding,\n offsetY: anchorSize / 2 + padding,\n visible: resizeEnabled && enabledAnchors.indexOf('top-right') >= 0,\n });\n this._batchChangeChild('.middle-left', {\n x: 0,\n y: height / 2,\n offsetX: anchorSize / 2 + padding,\n visible: resizeEnabled && enabledAnchors.indexOf('middle-left') >= 0,\n });\n this._batchChangeChild('.middle-right', {\n x: width,\n y: height / 2,\n offsetX: anchorSize / 2 - padding,\n visible: resizeEnabled && enabledAnchors.indexOf('middle-right') >= 0,\n });\n this._batchChangeChild('.bottom-left', {\n x: 0,\n y: height,\n offsetX: anchorSize / 2 + padding,\n offsetY: anchorSize / 2 - padding,\n visible: resizeEnabled && enabledAnchors.indexOf('bottom-left') >= 0,\n });\n this._batchChangeChild('.bottom-center', {\n x: width / 2,\n y: height,\n offsetY: anchorSize / 2 - padding,\n visible: resizeEnabled && enabledAnchors.indexOf('bottom-center') >= 0,\n });\n this._batchChangeChild('.bottom-right', {\n x: width,\n y: height,\n offsetX: anchorSize / 2 - padding,\n offsetY: anchorSize / 2 - padding,\n visible: resizeEnabled && enabledAnchors.indexOf('bottom-right') >= 0,\n });\n this._batchChangeChild('.rotater', {\n x: width / 2,\n y: -this.rotateAnchorOffset() * Util._sign(height) - padding,\n visible: this.rotateEnabled(),\n });\n this._batchChangeChild('.back', {\n width: width,\n height: height,\n visible: this.borderEnabled(),\n stroke: this.borderStroke(),\n strokeWidth: this.borderStrokeWidth(),\n dash: this.borderDash(),\n x: 0,\n y: 0,\n });\n (_a = this.getLayer()) === null || _a === void 0 ? void 0 : _a.batchDraw();\n }\n isTransforming() {\n return this._transforming;\n }\n stopTransform() {\n if (this._transforming) {\n this._removeEvents();\n var anchorNode = this.findOne('.' + this._movingAnchorName);\n if (anchorNode) {\n anchorNode.stopDrag();\n }\n }\n }\n destroy() {\n if (this.getStage() && this._cursorChange) {\n this.getStage().content && (this.getStage().content.style.cursor = '');\n }\n Group.prototype.destroy.call(this);\n this.detach();\n this._removeEvents();\n return this;\n }\n toObject() {\n return Node.prototype.toObject.call(this);\n }\n clone(obj) {\n var node = Node.prototype.clone.call(this, obj);\n return node;\n }\n getClientRect() {\n if (this.nodes().length > 0) {\n return super.getClientRect();\n }\n else {\n return { x: 0, y: 0, width: 0, height: 0 };\n }\n }\n}\nfunction validateAnchors(val) {\n if (!(val instanceof Array)) {\n Util.warn('enabledAnchors value should be an array');\n }\n if (val instanceof Array) {\n val.forEach(function (name) {\n if (ANCHORS_NAMES.indexOf(name) === -1) {\n Util.warn('Unknown anchor name: ' +\n name +\n '. Available names are: ' +\n ANCHORS_NAMES.join(', '));\n }\n });\n }\n return val || [];\n}\nTransformer.prototype.className = 'Transformer';\n_registerNode(Transformer);\nFactory.addGetterSetter(Transformer, 'enabledAnchors', ANCHORS_NAMES, validateAnchors);\nFactory.addGetterSetter(Transformer, 'flipEnabled', true, getBooleanValidator());\nFactory.addGetterSetter(Transformer, 'resizeEnabled', true);\nFactory.addGetterSetter(Transformer, 'anchorSize', 10, getNumberValidator());\nFactory.addGetterSetter(Transformer, 'rotateEnabled', true);\nFactory.addGetterSetter(Transformer, 'rotationSnaps', []);\nFactory.addGetterSetter(Transformer, 'rotateAnchorOffset', 50, getNumberValidator());\nFactory.addGetterSetter(Transformer, 'rotationSnapTolerance', 5, getNumberValidator());\nFactory.addGetterSetter(Transformer, 'borderEnabled', true);\nFactory.addGetterSetter(Transformer, 'anchorStroke', 'rgb(0, 161, 255)');\nFactory.addGetterSetter(Transformer, 'anchorStrokeWidth', 1, getNumberValidator());\nFactory.addGetterSetter(Transformer, 'anchorFill', 'white');\nFactory.addGetterSetter(Transformer, 'anchorCornerRadius', 0, getNumberValidator());\nFactory.addGetterSetter(Transformer, 'borderStroke', 'rgb(0, 161, 255)');\nFactory.addGetterSetter(Transformer, 'borderStrokeWidth', 1, getNumberValidator());\nFactory.addGetterSetter(Transformer, 'borderDash');\nFactory.addGetterSetter(Transformer, 'keepRatio', true);\nFactory.addGetterSetter(Transformer, 'centeredScaling', false);\nFactory.addGetterSetter(Transformer, 'ignoreStroke', false);\nFactory.addGetterSetter(Transformer, 'padding', 0, getNumberValidator());\nFactory.addGetterSetter(Transformer, 'node');\nFactory.addGetterSetter(Transformer, 'nodes');\nFactory.addGetterSetter(Transformer, 'boundBoxFunc');\nFactory.addGetterSetter(Transformer, 'anchorDragBoundFunc');\nFactory.addGetterSetter(Transformer, 'shouldOverdrawWholeArea', false);\nFactory.addGetterSetter(Transformer, 'useSingleNodeRotation', true);\nFactory.backCompat(Transformer, {\n lineEnabled: 'borderEnabled',\n rotateHandlerOffset: 'rotateAnchorOffset',\n enabledHandlers: 'enabledAnchors',\n});\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { Konva } from '../Global.js';\nimport { getNumberValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nexport class Wedge extends Shape {\n _sceneFunc(context) {\n context.beginPath();\n context.arc(0, 0, this.radius(), 0, Konva.getAngle(this.angle()), this.clockwise());\n context.lineTo(0, 0);\n context.closePath();\n context.fillStrokeShape(this);\n }\n getWidth() {\n return this.radius() * 2;\n }\n getHeight() {\n return this.radius() * 2;\n }\n setWidth(width) {\n this.radius(width / 2);\n }\n setHeight(height) {\n this.radius(height / 2);\n }\n}\nWedge.prototype.className = 'Wedge';\nWedge.prototype._centroid = true;\nWedge.prototype._attrsAffectingSize = ['radius'];\n_registerNode(Wedge);\nFactory.addGetterSetter(Wedge, 'radius', 0, getNumberValidator());\nFactory.addGetterSetter(Wedge, 'angle', 0, getNumberValidator());\nFactory.addGetterSetter(Wedge, 'clockwise', false);\nFactory.backCompat(Wedge, {\n angleDeg: 'angle',\n getAngleDeg: 'getAngle',\n setAngleDeg: 'setAngle',\n});\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { getNumberValidator } from '../Validators.js';\nfunction BlurStack() {\n this.r = 0;\n this.g = 0;\n this.b = 0;\n this.a = 0;\n this.next = null;\n}\nvar mul_table = [\n 512,\n 512,\n 456,\n 512,\n 328,\n 456,\n 335,\n 512,\n 405,\n 328,\n 271,\n 456,\n 388,\n 335,\n 292,\n 512,\n 454,\n 405,\n 364,\n 328,\n 298,\n 271,\n 496,\n 456,\n 420,\n 388,\n 360,\n 335,\n 312,\n 292,\n 273,\n 512,\n 482,\n 454,\n 428,\n 405,\n 383,\n 364,\n 345,\n 328,\n 312,\n 298,\n 284,\n 271,\n 259,\n 496,\n 475,\n 456,\n 437,\n 420,\n 404,\n 388,\n 374,\n 360,\n 347,\n 335,\n 323,\n 312,\n 302,\n 292,\n 282,\n 273,\n 265,\n 512,\n 497,\n 482,\n 468,\n 454,\n 441,\n 428,\n 417,\n 405,\n 394,\n 383,\n 373,\n 364,\n 354,\n 345,\n 337,\n 328,\n 320,\n 312,\n 305,\n 298,\n 291,\n 284,\n 278,\n 271,\n 265,\n 259,\n 507,\n 496,\n 485,\n 475,\n 465,\n 456,\n 446,\n 437,\n 428,\n 420,\n 412,\n 404,\n 396,\n 388,\n 381,\n 374,\n 367,\n 360,\n 354,\n 347,\n 341,\n 335,\n 329,\n 323,\n 318,\n 312,\n 307,\n 302,\n 297,\n 292,\n 287,\n 282,\n 278,\n 273,\n 269,\n 265,\n 261,\n 512,\n 505,\n 497,\n 489,\n 482,\n 475,\n 468,\n 461,\n 454,\n 447,\n 441,\n 435,\n 428,\n 422,\n 417,\n 411,\n 405,\n 399,\n 394,\n 389,\n 383,\n 378,\n 373,\n 368,\n 364,\n 359,\n 354,\n 350,\n 345,\n 341,\n 337,\n 332,\n 328,\n 324,\n 320,\n 316,\n 312,\n 309,\n 305,\n 301,\n 298,\n 294,\n 291,\n 287,\n 284,\n 281,\n 278,\n 274,\n 271,\n 268,\n 265,\n 262,\n 259,\n 257,\n 507,\n 501,\n 496,\n 491,\n 485,\n 480,\n 475,\n 470,\n 465,\n 460,\n 456,\n 451,\n 446,\n 442,\n 437,\n 433,\n 428,\n 424,\n 420,\n 416,\n 412,\n 408,\n 404,\n 400,\n 396,\n 392,\n 388,\n 385,\n 381,\n 377,\n 374,\n 370,\n 367,\n 363,\n 360,\n 357,\n 354,\n 350,\n 347,\n 344,\n 341,\n 338,\n 335,\n 332,\n 329,\n 326,\n 323,\n 320,\n 318,\n 315,\n 312,\n 310,\n 307,\n 304,\n 302,\n 299,\n 297,\n 294,\n 292,\n 289,\n 287,\n 285,\n 282,\n 280,\n 278,\n 275,\n 273,\n 271,\n 269,\n 267,\n 265,\n 263,\n 261,\n 259,\n];\nvar shg_table = [\n 9,\n 11,\n 12,\n 13,\n 13,\n 14,\n 14,\n 15,\n 15,\n 15,\n 15,\n 16,\n 16,\n 16,\n 16,\n 17,\n 17,\n 17,\n 17,\n 17,\n 17,\n 17,\n 18,\n 18,\n 18,\n 18,\n 18,\n 18,\n 18,\n 18,\n 18,\n 19,\n 19,\n 19,\n 19,\n 19,\n 19,\n 19,\n 19,\n 19,\n 19,\n 19,\n 19,\n 19,\n 19,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n];\nfunction filterGaussBlurRGBA(imageData, radius) {\n var pixels = imageData.data, width = imageData.width, height = imageData.height;\n var x, y, i, p, yp, yi, yw, r_sum, g_sum, b_sum, a_sum, r_out_sum, g_out_sum, b_out_sum, a_out_sum, r_in_sum, g_in_sum, b_in_sum, a_in_sum, pr, pg, pb, pa, rbs;\n var div = radius + radius + 1, widthMinus1 = width - 1, heightMinus1 = height - 1, radiusPlus1 = radius + 1, sumFactor = (radiusPlus1 * (radiusPlus1 + 1)) / 2, stackStart = new BlurStack(), stackEnd = null, stack = stackStart, stackIn = null, stackOut = null, mul_sum = mul_table[radius], shg_sum = shg_table[radius];\n for (i = 1; i < div; i++) {\n stack = stack.next = new BlurStack();\n if (i === radiusPlus1) {\n stackEnd = stack;\n }\n }\n stack.next = stackStart;\n yw = yi = 0;\n for (y = 0; y < height; y++) {\n r_in_sum = g_in_sum = b_in_sum = a_in_sum = r_sum = g_sum = b_sum = a_sum = 0;\n r_out_sum = radiusPlus1 * (pr = pixels[yi]);\n g_out_sum = radiusPlus1 * (pg = pixels[yi + 1]);\n b_out_sum = radiusPlus1 * (pb = pixels[yi + 2]);\n a_out_sum = radiusPlus1 * (pa = pixels[yi + 3]);\n r_sum += sumFactor * pr;\n g_sum += sumFactor * pg;\n b_sum += sumFactor * pb;\n a_sum += sumFactor * pa;\n stack = stackStart;\n for (i = 0; i < radiusPlus1; i++) {\n stack.r = pr;\n stack.g = pg;\n stack.b = pb;\n stack.a = pa;\n stack = stack.next;\n }\n for (i = 1; i < radiusPlus1; i++) {\n p = yi + ((widthMinus1 < i ? widthMinus1 : i) << 2);\n r_sum += (stack.r = pr = pixels[p]) * (rbs = radiusPlus1 - i);\n g_sum += (stack.g = pg = pixels[p + 1]) * rbs;\n b_sum += (stack.b = pb = pixels[p + 2]) * rbs;\n a_sum += (stack.a = pa = pixels[p + 3]) * rbs;\n r_in_sum += pr;\n g_in_sum += pg;\n b_in_sum += pb;\n a_in_sum += pa;\n stack = stack.next;\n }\n stackIn = stackStart;\n stackOut = stackEnd;\n for (x = 0; x < width; x++) {\n pixels[yi + 3] = pa = (a_sum * mul_sum) >> shg_sum;\n if (pa !== 0) {\n pa = 255 / pa;\n pixels[yi] = ((r_sum * mul_sum) >> shg_sum) * pa;\n pixels[yi + 1] = ((g_sum * mul_sum) >> shg_sum) * pa;\n pixels[yi + 2] = ((b_sum * mul_sum) >> shg_sum) * pa;\n }\n else {\n pixels[yi] = pixels[yi + 1] = pixels[yi + 2] = 0;\n }\n r_sum -= r_out_sum;\n g_sum -= g_out_sum;\n b_sum -= b_out_sum;\n a_sum -= a_out_sum;\n r_out_sum -= stackIn.r;\n g_out_sum -= stackIn.g;\n b_out_sum -= stackIn.b;\n a_out_sum -= stackIn.a;\n p = (yw + ((p = x + radius + 1) < widthMinus1 ? p : widthMinus1)) << 2;\n r_in_sum += stackIn.r = pixels[p];\n g_in_sum += stackIn.g = pixels[p + 1];\n b_in_sum += stackIn.b = pixels[p + 2];\n a_in_sum += stackIn.a = pixels[p + 3];\n r_sum += r_in_sum;\n g_sum += g_in_sum;\n b_sum += b_in_sum;\n a_sum += a_in_sum;\n stackIn = stackIn.next;\n r_out_sum += pr = stackOut.r;\n g_out_sum += pg = stackOut.g;\n b_out_sum += pb = stackOut.b;\n a_out_sum += pa = stackOut.a;\n r_in_sum -= pr;\n g_in_sum -= pg;\n b_in_sum -= pb;\n a_in_sum -= pa;\n stackOut = stackOut.next;\n yi += 4;\n }\n yw += width;\n }\n for (x = 0; x < width; x++) {\n g_in_sum = b_in_sum = a_in_sum = r_in_sum = g_sum = b_sum = a_sum = r_sum = 0;\n yi = x << 2;\n r_out_sum = radiusPlus1 * (pr = pixels[yi]);\n g_out_sum = radiusPlus1 * (pg = pixels[yi + 1]);\n b_out_sum = radiusPlus1 * (pb = pixels[yi + 2]);\n a_out_sum = radiusPlus1 * (pa = pixels[yi + 3]);\n r_sum += sumFactor * pr;\n g_sum += sumFactor * pg;\n b_sum += sumFactor * pb;\n a_sum += sumFactor * pa;\n stack = stackStart;\n for (i = 0; i < radiusPlus1; i++) {\n stack.r = pr;\n stack.g = pg;\n stack.b = pb;\n stack.a = pa;\n stack = stack.next;\n }\n yp = width;\n for (i = 1; i <= radius; i++) {\n yi = (yp + x) << 2;\n r_sum += (stack.r = pr = pixels[yi]) * (rbs = radiusPlus1 - i);\n g_sum += (stack.g = pg = pixels[yi + 1]) * rbs;\n b_sum += (stack.b = pb = pixels[yi + 2]) * rbs;\n a_sum += (stack.a = pa = pixels[yi + 3]) * rbs;\n r_in_sum += pr;\n g_in_sum += pg;\n b_in_sum += pb;\n a_in_sum += pa;\n stack = stack.next;\n if (i < heightMinus1) {\n yp += width;\n }\n }\n yi = x;\n stackIn = stackStart;\n stackOut = stackEnd;\n for (y = 0; y < height; y++) {\n p = yi << 2;\n pixels[p + 3] = pa = (a_sum * mul_sum) >> shg_sum;\n if (pa > 0) {\n pa = 255 / pa;\n pixels[p] = ((r_sum * mul_sum) >> shg_sum) * pa;\n pixels[p + 1] = ((g_sum * mul_sum) >> shg_sum) * pa;\n pixels[p + 2] = ((b_sum * mul_sum) >> shg_sum) * pa;\n }\n else {\n pixels[p] = pixels[p + 1] = pixels[p + 2] = 0;\n }\n r_sum -= r_out_sum;\n g_sum -= g_out_sum;\n b_sum -= b_out_sum;\n a_sum -= a_out_sum;\n r_out_sum -= stackIn.r;\n g_out_sum -= stackIn.g;\n b_out_sum -= stackIn.b;\n a_out_sum -= stackIn.a;\n p =\n (x +\n ((p = y + radiusPlus1) < heightMinus1 ? p : heightMinus1) * width) <<\n 2;\n r_sum += r_in_sum += stackIn.r = pixels[p];\n g_sum += g_in_sum += stackIn.g = pixels[p + 1];\n b_sum += b_in_sum += stackIn.b = pixels[p + 2];\n a_sum += a_in_sum += stackIn.a = pixels[p + 3];\n stackIn = stackIn.next;\n r_out_sum += pr = stackOut.r;\n g_out_sum += pg = stackOut.g;\n b_out_sum += pb = stackOut.b;\n a_out_sum += pa = stackOut.a;\n r_in_sum -= pr;\n g_in_sum -= pg;\n b_in_sum -= pb;\n a_in_sum -= pa;\n stackOut = stackOut.next;\n yi += width;\n }\n }\n}\nexport const Blur = function Blur(imageData) {\n var radius = Math.round(this.blurRadius());\n if (radius > 0) {\n filterGaussBlurRGBA(imageData, radius);\n }\n};\nFactory.addGetterSetter(Node, 'blurRadius', 0, getNumberValidator(), Factory.afterSetFilter);\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { getNumberValidator } from '../Validators.js';\nexport const Brighten = function (imageData) {\n var brightness = this.brightness() * 255, data = imageData.data, len = data.length, i;\n for (i = 0; i < len; i += 4) {\n data[i] += brightness;\n data[i + 1] += brightness;\n data[i + 2] += brightness;\n }\n};\nFactory.addGetterSetter(Node, 'brightness', 0, getNumberValidator(), Factory.afterSetFilter);\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { getNumberValidator } from '../Validators.js';\nexport const Contrast = function (imageData) {\n var adjust = Math.pow((this.contrast() + 100) / 100, 2);\n var data = imageData.data, nPixels = data.length, red = 150, green = 150, blue = 150, i;\n for (i = 0; i < nPixels; i += 4) {\n red = data[i];\n green = data[i + 1];\n blue = data[i + 2];\n red /= 255;\n red -= 0.5;\n red *= adjust;\n red += 0.5;\n red *= 255;\n green /= 255;\n green -= 0.5;\n green *= adjust;\n green += 0.5;\n green *= 255;\n blue /= 255;\n blue -= 0.5;\n blue *= adjust;\n blue += 0.5;\n blue *= 255;\n red = red < 0 ? 0 : red > 255 ? 255 : red;\n green = green < 0 ? 0 : green > 255 ? 255 : green;\n blue = blue < 0 ? 0 : blue > 255 ? 255 : blue;\n data[i] = red;\n data[i + 1] = green;\n data[i + 2] = blue;\n }\n};\nFactory.addGetterSetter(Node, 'contrast', 0, getNumberValidator(), Factory.afterSetFilter);\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { Util } from '../Util.js';\nimport { getNumberValidator } from '../Validators.js';\nexport const Emboss = function (imageData) {\n var strength = this.embossStrength() * 10, greyLevel = this.embossWhiteLevel() * 255, direction = this.embossDirection(), blend = this.embossBlend(), dirY = 0, dirX = 0, data = imageData.data, w = imageData.width, h = imageData.height, w4 = w * 4, y = h;\n switch (direction) {\n case 'top-left':\n dirY = -1;\n dirX = -1;\n break;\n case 'top':\n dirY = -1;\n dirX = 0;\n break;\n case 'top-right':\n dirY = -1;\n dirX = 1;\n break;\n case 'right':\n dirY = 0;\n dirX = 1;\n break;\n case 'bottom-right':\n dirY = 1;\n dirX = 1;\n break;\n case 'bottom':\n dirY = 1;\n dirX = 0;\n break;\n case 'bottom-left':\n dirY = 1;\n dirX = -1;\n break;\n case 'left':\n dirY = 0;\n dirX = -1;\n break;\n default:\n Util.error('Unknown emboss direction: ' + direction);\n }\n do {\n var offsetY = (y - 1) * w4;\n var otherY = dirY;\n if (y + otherY < 1) {\n otherY = 0;\n }\n if (y + otherY > h) {\n otherY = 0;\n }\n var offsetYOther = (y - 1 + otherY) * w * 4;\n var x = w;\n do {\n var offset = offsetY + (x - 1) * 4;\n var otherX = dirX;\n if (x + otherX < 1) {\n otherX = 0;\n }\n if (x + otherX > w) {\n otherX = 0;\n }\n var offsetOther = offsetYOther + (x - 1 + otherX) * 4;\n var dR = data[offset] - data[offsetOther];\n var dG = data[offset + 1] - data[offsetOther + 1];\n var dB = data[offset + 2] - data[offsetOther + 2];\n var dif = dR;\n var absDif = dif > 0 ? dif : -dif;\n var absG = dG > 0 ? dG : -dG;\n var absB = dB > 0 ? dB : -dB;\n if (absG > absDif) {\n dif = dG;\n }\n if (absB > absDif) {\n dif = dB;\n }\n dif *= strength;\n if (blend) {\n var r = data[offset] + dif;\n var g = data[offset + 1] + dif;\n var b = data[offset + 2] + dif;\n data[offset] = r > 255 ? 255 : r < 0 ? 0 : r;\n data[offset + 1] = g > 255 ? 255 : g < 0 ? 0 : g;\n data[offset + 2] = b > 255 ? 255 : b < 0 ? 0 : b;\n }\n else {\n var grey = greyLevel - dif;\n if (grey < 0) {\n grey = 0;\n }\n else if (grey > 255) {\n grey = 255;\n }\n data[offset] = data[offset + 1] = data[offset + 2] = grey;\n }\n } while (--x);\n } while (--y);\n};\nFactory.addGetterSetter(Node, 'embossStrength', 0.5, getNumberValidator(), Factory.afterSetFilter);\nFactory.addGetterSetter(Node, 'embossWhiteLevel', 0.5, getNumberValidator(), Factory.afterSetFilter);\nFactory.addGetterSetter(Node, 'embossDirection', 'top-left', null, Factory.afterSetFilter);\nFactory.addGetterSetter(Node, 'embossBlend', false, null, Factory.afterSetFilter);\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { getNumberValidator } from '../Validators.js';\nfunction remap(fromValue, fromMin, fromMax, toMin, toMax) {\n var fromRange = fromMax - fromMin, toRange = toMax - toMin, toValue;\n if (fromRange === 0) {\n return toMin + toRange / 2;\n }\n if (toRange === 0) {\n return toMin;\n }\n toValue = (fromValue - fromMin) / fromRange;\n toValue = toRange * toValue + toMin;\n return toValue;\n}\nexport const Enhance = function (imageData) {\n var data = imageData.data, nSubPixels = data.length, rMin = data[0], rMax = rMin, r, gMin = data[1], gMax = gMin, g, bMin = data[2], bMax = bMin, b, i;\n var enhanceAmount = this.enhance();\n if (enhanceAmount === 0) {\n return;\n }\n for (i = 0; i < nSubPixels; i += 4) {\n r = data[i + 0];\n if (r < rMin) {\n rMin = r;\n }\n else if (r > rMax) {\n rMax = r;\n }\n g = data[i + 1];\n if (g < gMin) {\n gMin = g;\n }\n else if (g > gMax) {\n gMax = g;\n }\n b = data[i + 2];\n if (b < bMin) {\n bMin = b;\n }\n else if (b > bMax) {\n bMax = b;\n }\n }\n if (rMax === rMin) {\n rMax = 255;\n rMin = 0;\n }\n if (gMax === gMin) {\n gMax = 255;\n gMin = 0;\n }\n if (bMax === bMin) {\n bMax = 255;\n bMin = 0;\n }\n var rMid, rGoalMax, rGoalMin, gMid, gGoalMax, gGoalMin, bMid, bGoalMax, bGoalMin;\n if (enhanceAmount > 0) {\n rGoalMax = rMax + enhanceAmount * (255 - rMax);\n rGoalMin = rMin - enhanceAmount * (rMin - 0);\n gGoalMax = gMax + enhanceAmount * (255 - gMax);\n gGoalMin = gMin - enhanceAmount * (gMin - 0);\n bGoalMax = bMax + enhanceAmount * (255 - bMax);\n bGoalMin = bMin - enhanceAmount * (bMin - 0);\n }\n else {\n rMid = (rMax + rMin) * 0.5;\n rGoalMax = rMax + enhanceAmount * (rMax - rMid);\n rGoalMin = rMin + enhanceAmount * (rMin - rMid);\n gMid = (gMax + gMin) * 0.5;\n gGoalMax = gMax + enhanceAmount * (gMax - gMid);\n gGoalMin = gMin + enhanceAmount * (gMin - gMid);\n bMid = (bMax + bMin) * 0.5;\n bGoalMax = bMax + enhanceAmount * (bMax - bMid);\n bGoalMin = bMin + enhanceAmount * (bMin - bMid);\n }\n for (i = 0; i < nSubPixels; i += 4) {\n data[i + 0] = remap(data[i + 0], rMin, rMax, rGoalMin, rGoalMax);\n data[i + 1] = remap(data[i + 1], gMin, gMax, gGoalMin, gGoalMax);\n data[i + 2] = remap(data[i + 2], bMin, bMax, bGoalMin, bGoalMax);\n }\n};\nFactory.addGetterSetter(Node, 'enhance', 0, getNumberValidator(), Factory.afterSetFilter);\n","export const Grayscale = function (imageData) {\n var data = imageData.data, len = data.length, i, brightness;\n for (i = 0; i < len; i += 4) {\n brightness = 0.34 * data[i] + 0.5 * data[i + 1] + 0.16 * data[i + 2];\n data[i] = brightness;\n data[i + 1] = brightness;\n data[i + 2] = brightness;\n }\n};\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { getNumberValidator } from '../Validators.js';\nFactory.addGetterSetter(Node, 'hue', 0, getNumberValidator(), Factory.afterSetFilter);\nFactory.addGetterSetter(Node, 'saturation', 0, getNumberValidator(), Factory.afterSetFilter);\nFactory.addGetterSetter(Node, 'luminance', 0, getNumberValidator(), Factory.afterSetFilter);\nexport const HSL = function (imageData) {\n var data = imageData.data, nPixels = data.length, v = 1, s = Math.pow(2, this.saturation()), h = Math.abs(this.hue() + 360) % 360, l = this.luminance() * 127, i;\n var vsu = v * s * Math.cos((h * Math.PI) / 180), vsw = v * s * Math.sin((h * Math.PI) / 180);\n var rr = 0.299 * v + 0.701 * vsu + 0.167 * vsw, rg = 0.587 * v - 0.587 * vsu + 0.33 * vsw, rb = 0.114 * v - 0.114 * vsu - 0.497 * vsw;\n var gr = 0.299 * v - 0.299 * vsu - 0.328 * vsw, gg = 0.587 * v + 0.413 * vsu + 0.035 * vsw, gb = 0.114 * v - 0.114 * vsu + 0.293 * vsw;\n var br = 0.299 * v - 0.3 * vsu + 1.25 * vsw, bg = 0.587 * v - 0.586 * vsu - 1.05 * vsw, bb = 0.114 * v + 0.886 * vsu - 0.2 * vsw;\n var r, g, b, a;\n for (i = 0; i < nPixels; i += 4) {\n r = data[i + 0];\n g = data[i + 1];\n b = data[i + 2];\n a = data[i + 3];\n data[i + 0] = rr * r + rg * g + rb * b + l;\n data[i + 1] = gr * r + gg * g + gb * b + l;\n data[i + 2] = br * r + bg * g + bb * b + l;\n data[i + 3] = a;\n }\n};\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { getNumberValidator } from '../Validators.js';\nexport const HSV = function (imageData) {\n var data = imageData.data, nPixels = data.length, v = Math.pow(2, this.value()), s = Math.pow(2, this.saturation()), h = Math.abs(this.hue() + 360) % 360, i;\n var vsu = v * s * Math.cos((h * Math.PI) / 180), vsw = v * s * Math.sin((h * Math.PI) / 180);\n var rr = 0.299 * v + 0.701 * vsu + 0.167 * vsw, rg = 0.587 * v - 0.587 * vsu + 0.33 * vsw, rb = 0.114 * v - 0.114 * vsu - 0.497 * vsw;\n var gr = 0.299 * v - 0.299 * vsu - 0.328 * vsw, gg = 0.587 * v + 0.413 * vsu + 0.035 * vsw, gb = 0.114 * v - 0.114 * vsu + 0.293 * vsw;\n var br = 0.299 * v - 0.3 * vsu + 1.25 * vsw, bg = 0.587 * v - 0.586 * vsu - 1.05 * vsw, bb = 0.114 * v + 0.886 * vsu - 0.2 * vsw;\n var r, g, b, a;\n for (i = 0; i < nPixels; i += 4) {\n r = data[i + 0];\n g = data[i + 1];\n b = data[i + 2];\n a = data[i + 3];\n data[i + 0] = rr * r + rg * g + rb * b;\n data[i + 1] = gr * r + gg * g + gb * b;\n data[i + 2] = br * r + bg * g + bb * b;\n data[i + 3] = a;\n }\n};\nFactory.addGetterSetter(Node, 'hue', 0, getNumberValidator(), Factory.afterSetFilter);\nFactory.addGetterSetter(Node, 'saturation', 0, getNumberValidator(), Factory.afterSetFilter);\nFactory.addGetterSetter(Node, 'value', 0, getNumberValidator(), Factory.afterSetFilter);\n","export const Invert = function (imageData) {\n var data = imageData.data, len = data.length, i;\n for (i = 0; i < len; i += 4) {\n data[i] = 255 - data[i];\n data[i + 1] = 255 - data[i + 1];\n data[i + 2] = 255 - data[i + 2];\n }\n};\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { Util } from '../Util.js';\nimport { getNumberValidator } from '../Validators.js';\nvar ToPolar = function (src, dst, opt) {\n var srcPixels = src.data, dstPixels = dst.data, xSize = src.width, ySize = src.height, xMid = opt.polarCenterX || xSize / 2, yMid = opt.polarCenterY || ySize / 2, i, x, y, r = 0, g = 0, b = 0, a = 0;\n var rad, rMax = Math.sqrt(xMid * xMid + yMid * yMid);\n x = xSize - xMid;\n y = ySize - yMid;\n rad = Math.sqrt(x * x + y * y);\n rMax = rad > rMax ? rad : rMax;\n var rSize = ySize, tSize = xSize, radius, theta;\n var conversion = ((360 / tSize) * Math.PI) / 180, sin, cos;\n for (theta = 0; theta < tSize; theta += 1) {\n sin = Math.sin(theta * conversion);\n cos = Math.cos(theta * conversion);\n for (radius = 0; radius < rSize; radius += 1) {\n x = Math.floor(xMid + ((rMax * radius) / rSize) * cos);\n y = Math.floor(yMid + ((rMax * radius) / rSize) * sin);\n i = (y * xSize + x) * 4;\n r = srcPixels[i + 0];\n g = srcPixels[i + 1];\n b = srcPixels[i + 2];\n a = srcPixels[i + 3];\n i = (theta + radius * xSize) * 4;\n dstPixels[i + 0] = r;\n dstPixels[i + 1] = g;\n dstPixels[i + 2] = b;\n dstPixels[i + 3] = a;\n }\n }\n};\nvar FromPolar = function (src, dst, opt) {\n var srcPixels = src.data, dstPixels = dst.data, xSize = src.width, ySize = src.height, xMid = opt.polarCenterX || xSize / 2, yMid = opt.polarCenterY || ySize / 2, i, x, y, dx, dy, r = 0, g = 0, b = 0, a = 0;\n var rad, rMax = Math.sqrt(xMid * xMid + yMid * yMid);\n x = xSize - xMid;\n y = ySize - yMid;\n rad = Math.sqrt(x * x + y * y);\n rMax = rad > rMax ? rad : rMax;\n var rSize = ySize, tSize = xSize, radius, theta, phaseShift = opt.polarRotation || 0;\n var x1, y1;\n for (x = 0; x < xSize; x += 1) {\n for (y = 0; y < ySize; y += 1) {\n dx = x - xMid;\n dy = y - yMid;\n radius = (Math.sqrt(dx * dx + dy * dy) * rSize) / rMax;\n theta = ((Math.atan2(dy, dx) * 180) / Math.PI + 360 + phaseShift) % 360;\n theta = (theta * tSize) / 360;\n x1 = Math.floor(theta);\n y1 = Math.floor(radius);\n i = (y1 * xSize + x1) * 4;\n r = srcPixels[i + 0];\n g = srcPixels[i + 1];\n b = srcPixels[i + 2];\n a = srcPixels[i + 3];\n i = (y * xSize + x) * 4;\n dstPixels[i + 0] = r;\n dstPixels[i + 1] = g;\n dstPixels[i + 2] = b;\n dstPixels[i + 3] = a;\n }\n }\n};\nexport const Kaleidoscope = function (imageData) {\n var xSize = imageData.width, ySize = imageData.height;\n var x, y, xoff, i, r, g, b, a, srcPos, dstPos;\n var power = Math.round(this.kaleidoscopePower());\n var angle = Math.round(this.kaleidoscopeAngle());\n var offset = Math.floor((xSize * (angle % 360)) / 360);\n if (power < 1) {\n return;\n }\n var tempCanvas = Util.createCanvasElement();\n tempCanvas.width = xSize;\n tempCanvas.height = ySize;\n var scratchData = tempCanvas\n .getContext('2d')\n .getImageData(0, 0, xSize, ySize);\n Util.releaseCanvas(tempCanvas);\n ToPolar(imageData, scratchData, {\n polarCenterX: xSize / 2,\n polarCenterY: ySize / 2,\n });\n var minSectionSize = xSize / Math.pow(2, power);\n while (minSectionSize <= 8) {\n minSectionSize = minSectionSize * 2;\n power -= 1;\n }\n minSectionSize = Math.ceil(minSectionSize);\n var sectionSize = minSectionSize;\n var xStart = 0, xEnd = sectionSize, xDelta = 1;\n if (offset + minSectionSize > xSize) {\n xStart = sectionSize;\n xEnd = 0;\n xDelta = -1;\n }\n for (y = 0; y < ySize; y += 1) {\n for (x = xStart; x !== xEnd; x += xDelta) {\n xoff = Math.round(x + offset) % xSize;\n srcPos = (xSize * y + xoff) * 4;\n r = scratchData.data[srcPos + 0];\n g = scratchData.data[srcPos + 1];\n b = scratchData.data[srcPos + 2];\n a = scratchData.data[srcPos + 3];\n dstPos = (xSize * y + x) * 4;\n scratchData.data[dstPos + 0] = r;\n scratchData.data[dstPos + 1] = g;\n scratchData.data[dstPos + 2] = b;\n scratchData.data[dstPos + 3] = a;\n }\n }\n for (y = 0; y < ySize; y += 1) {\n sectionSize = Math.floor(minSectionSize);\n for (i = 0; i < power; i += 1) {\n for (x = 0; x < sectionSize + 1; x += 1) {\n srcPos = (xSize * y + x) * 4;\n r = scratchData.data[srcPos + 0];\n g = scratchData.data[srcPos + 1];\n b = scratchData.data[srcPos + 2];\n a = scratchData.data[srcPos + 3];\n dstPos = (xSize * y + sectionSize * 2 - x - 1) * 4;\n scratchData.data[dstPos + 0] = r;\n scratchData.data[dstPos + 1] = g;\n scratchData.data[dstPos + 2] = b;\n scratchData.data[dstPos + 3] = a;\n }\n sectionSize *= 2;\n }\n }\n FromPolar(scratchData, imageData, { polarRotation: 0 });\n};\nFactory.addGetterSetter(Node, 'kaleidoscopePower', 2, getNumberValidator(), Factory.afterSetFilter);\nFactory.addGetterSetter(Node, 'kaleidoscopeAngle', 0, getNumberValidator(), Factory.afterSetFilter);\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { getNumberValidator } from '../Validators.js';\nfunction pixelAt(idata, x, y) {\n var idx = (y * idata.width + x) * 4;\n var d = [];\n d.push(idata.data[idx++], idata.data[idx++], idata.data[idx++], idata.data[idx++]);\n return d;\n}\nfunction rgbDistance(p1, p2) {\n return Math.sqrt(Math.pow(p1[0] - p2[0], 2) +\n Math.pow(p1[1] - p2[1], 2) +\n Math.pow(p1[2] - p2[2], 2));\n}\nfunction rgbMean(pTab) {\n var m = [0, 0, 0];\n for (var i = 0; i < pTab.length; i++) {\n m[0] += pTab[i][0];\n m[1] += pTab[i][1];\n m[2] += pTab[i][2];\n }\n m[0] /= pTab.length;\n m[1] /= pTab.length;\n m[2] /= pTab.length;\n return m;\n}\nfunction backgroundMask(idata, threshold) {\n var rgbv_no = pixelAt(idata, 0, 0);\n var rgbv_ne = pixelAt(idata, idata.width - 1, 0);\n var rgbv_so = pixelAt(idata, 0, idata.height - 1);\n var rgbv_se = pixelAt(idata, idata.width - 1, idata.height - 1);\n var thres = threshold || 10;\n if (rgbDistance(rgbv_no, rgbv_ne) < thres &&\n rgbDistance(rgbv_ne, rgbv_se) < thres &&\n rgbDistance(rgbv_se, rgbv_so) < thres &&\n rgbDistance(rgbv_so, rgbv_no) < thres) {\n var mean = rgbMean([rgbv_ne, rgbv_no, rgbv_se, rgbv_so]);\n var mask = [];\n for (var i = 0; i < idata.width * idata.height; i++) {\n var d = rgbDistance(mean, [\n idata.data[i * 4],\n idata.data[i * 4 + 1],\n idata.data[i * 4 + 2],\n ]);\n mask[i] = d < thres ? 0 : 255;\n }\n return mask;\n }\n}\nfunction applyMask(idata, mask) {\n for (var i = 0; i < idata.width * idata.height; i++) {\n idata.data[4 * i + 3] = mask[i];\n }\n}\nfunction erodeMask(mask, sw, sh) {\n var weights = [1, 1, 1, 1, 0, 1, 1, 1, 1];\n var side = Math.round(Math.sqrt(weights.length));\n var halfSide = Math.floor(side / 2);\n var maskResult = [];\n for (var y = 0; y < sh; y++) {\n for (var x = 0; x < sw; x++) {\n var so = y * sw + x;\n var a = 0;\n for (var cy = 0; cy < side; cy++) {\n for (var cx = 0; cx < side; cx++) {\n var scy = y + cy - halfSide;\n var scx = x + cx - halfSide;\n if (scy >= 0 && scy < sh && scx >= 0 && scx < sw) {\n var srcOff = scy * sw + scx;\n var wt = weights[cy * side + cx];\n a += mask[srcOff] * wt;\n }\n }\n }\n maskResult[so] = a === 255 * 8 ? 255 : 0;\n }\n }\n return maskResult;\n}\nfunction dilateMask(mask, sw, sh) {\n var weights = [1, 1, 1, 1, 1, 1, 1, 1, 1];\n var side = Math.round(Math.sqrt(weights.length));\n var halfSide = Math.floor(side / 2);\n var maskResult = [];\n for (var y = 0; y < sh; y++) {\n for (var x = 0; x < sw; x++) {\n var so = y * sw + x;\n var a = 0;\n for (var cy = 0; cy < side; cy++) {\n for (var cx = 0; cx < side; cx++) {\n var scy = y + cy - halfSide;\n var scx = x + cx - halfSide;\n if (scy >= 0 && scy < sh && scx >= 0 && scx < sw) {\n var srcOff = scy * sw + scx;\n var wt = weights[cy * side + cx];\n a += mask[srcOff] * wt;\n }\n }\n }\n maskResult[so] = a >= 255 * 4 ? 255 : 0;\n }\n }\n return maskResult;\n}\nfunction smoothEdgeMask(mask, sw, sh) {\n var weights = [1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9];\n var side = Math.round(Math.sqrt(weights.length));\n var halfSide = Math.floor(side / 2);\n var maskResult = [];\n for (var y = 0; y < sh; y++) {\n for (var x = 0; x < sw; x++) {\n var so = y * sw + x;\n var a = 0;\n for (var cy = 0; cy < side; cy++) {\n for (var cx = 0; cx < side; cx++) {\n var scy = y + cy - halfSide;\n var scx = x + cx - halfSide;\n if (scy >= 0 && scy < sh && scx >= 0 && scx < sw) {\n var srcOff = scy * sw + scx;\n var wt = weights[cy * side + cx];\n a += mask[srcOff] * wt;\n }\n }\n }\n maskResult[so] = a;\n }\n }\n return maskResult;\n}\nexport const Mask = function (imageData) {\n var threshold = this.threshold(), mask = backgroundMask(imageData, threshold);\n if (mask) {\n mask = erodeMask(mask, imageData.width, imageData.height);\n mask = dilateMask(mask, imageData.width, imageData.height);\n mask = smoothEdgeMask(mask, imageData.width, imageData.height);\n applyMask(imageData, mask);\n }\n return imageData;\n};\nFactory.addGetterSetter(Node, 'threshold', 0, getNumberValidator(), Factory.afterSetFilter);\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { getNumberValidator } from '../Validators.js';\nexport const Noise = function (imageData) {\n var amount = this.noise() * 255, data = imageData.data, nPixels = data.length, half = amount / 2, i;\n for (i = 0; i < nPixels; i += 4) {\n data[i + 0] += half - 2 * half * Math.random();\n data[i + 1] += half - 2 * half * Math.random();\n data[i + 2] += half - 2 * half * Math.random();\n }\n};\nFactory.addGetterSetter(Node, 'noise', 0.2, getNumberValidator(), Factory.afterSetFilter);\n","import { Factory } from '../Factory.js';\nimport { Util } from '../Util.js';\nimport { Node } from '../Node.js';\nimport { getNumberValidator } from '../Validators.js';\nexport const Pixelate = function (imageData) {\n var pixelSize = Math.ceil(this.pixelSize()), width = imageData.width, height = imageData.height, x, y, i, red, green, blue, alpha, nBinsX = Math.ceil(width / pixelSize), nBinsY = Math.ceil(height / pixelSize), xBinStart, xBinEnd, yBinStart, yBinEnd, xBin, yBin, pixelsInBin, data = imageData.data;\n if (pixelSize <= 0) {\n Util.error('pixelSize value can not be <= 0');\n return;\n }\n for (xBin = 0; xBin < nBinsX; xBin += 1) {\n for (yBin = 0; yBin < nBinsY; yBin += 1) {\n red = 0;\n green = 0;\n blue = 0;\n alpha = 0;\n xBinStart = xBin * pixelSize;\n xBinEnd = xBinStart + pixelSize;\n yBinStart = yBin * pixelSize;\n yBinEnd = yBinStart + pixelSize;\n pixelsInBin = 0;\n for (x = xBinStart; x < xBinEnd; x += 1) {\n if (x >= width) {\n continue;\n }\n for (y = yBinStart; y < yBinEnd; y += 1) {\n if (y >= height) {\n continue;\n }\n i = (width * y + x) * 4;\n red += data[i + 0];\n green += data[i + 1];\n blue += data[i + 2];\n alpha += data[i + 3];\n pixelsInBin += 1;\n }\n }\n red = red / pixelsInBin;\n green = green / pixelsInBin;\n blue = blue / pixelsInBin;\n alpha = alpha / pixelsInBin;\n for (x = xBinStart; x < xBinEnd; x += 1) {\n if (x >= width) {\n continue;\n }\n for (y = yBinStart; y < yBinEnd; y += 1) {\n if (y >= height) {\n continue;\n }\n i = (width * y + x) * 4;\n data[i + 0] = red;\n data[i + 1] = green;\n data[i + 2] = blue;\n data[i + 3] = alpha;\n }\n }\n }\n }\n};\nFactory.addGetterSetter(Node, 'pixelSize', 8, getNumberValidator(), Factory.afterSetFilter);\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { getNumberValidator } from '../Validators.js';\nexport const Posterize = function (imageData) {\n var levels = Math.round(this.levels() * 254) + 1, data = imageData.data, len = data.length, scale = 255 / levels, i;\n for (i = 0; i < len; i += 1) {\n data[i] = Math.floor(data[i] / scale) * scale;\n }\n};\nFactory.addGetterSetter(Node, 'levels', 0.5, getNumberValidator(), Factory.afterSetFilter);\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { RGBComponent } from '../Validators.js';\nexport const RGB = function (imageData) {\n var data = imageData.data, nPixels = data.length, red = this.red(), green = this.green(), blue = this.blue(), i, brightness;\n for (i = 0; i < nPixels; i += 4) {\n brightness =\n (0.34 * data[i] + 0.5 * data[i + 1] + 0.16 * data[i + 2]) / 255;\n data[i] = brightness * red;\n data[i + 1] = brightness * green;\n data[i + 2] = brightness * blue;\n data[i + 3] = data[i + 3];\n }\n};\nFactory.addGetterSetter(Node, 'red', 0, function (val) {\n this._filterUpToDate = false;\n if (val > 255) {\n return 255;\n }\n else if (val < 0) {\n return 0;\n }\n else {\n return Math.round(val);\n }\n});\nFactory.addGetterSetter(Node, 'green', 0, function (val) {\n this._filterUpToDate = false;\n if (val > 255) {\n return 255;\n }\n else if (val < 0) {\n return 0;\n }\n else {\n return Math.round(val);\n }\n});\nFactory.addGetterSetter(Node, 'blue', 0, RGBComponent, Factory.afterSetFilter);\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { RGBComponent } from '../Validators.js';\nexport const RGBA = function (imageData) {\n var data = imageData.data, nPixels = data.length, red = this.red(), green = this.green(), blue = this.blue(), alpha = this.alpha(), i, ia;\n for (i = 0; i < nPixels; i += 4) {\n ia = 1 - alpha;\n data[i] = red * alpha + data[i] * ia;\n data[i + 1] = green * alpha + data[i + 1] * ia;\n data[i + 2] = blue * alpha + data[i + 2] * ia;\n }\n};\nFactory.addGetterSetter(Node, 'red', 0, function (val) {\n this._filterUpToDate = false;\n if (val > 255) {\n return 255;\n }\n else if (val < 0) {\n return 0;\n }\n else {\n return Math.round(val);\n }\n});\nFactory.addGetterSetter(Node, 'green', 0, function (val) {\n this._filterUpToDate = false;\n if (val > 255) {\n return 255;\n }\n else if (val < 0) {\n return 0;\n }\n else {\n return Math.round(val);\n }\n});\nFactory.addGetterSetter(Node, 'blue', 0, RGBComponent, Factory.afterSetFilter);\nFactory.addGetterSetter(Node, 'alpha', 1, function (val) {\n this._filterUpToDate = false;\n if (val > 1) {\n return 1;\n }\n else if (val < 0) {\n return 0;\n }\n else {\n return val;\n }\n});\n","export const Sepia = function (imageData) {\n var data = imageData.data, nPixels = data.length, i, r, g, b;\n for (i = 0; i < nPixels; i += 4) {\n r = data[i + 0];\n g = data[i + 1];\n b = data[i + 2];\n data[i + 0] = Math.min(255, r * 0.393 + g * 0.769 + b * 0.189);\n data[i + 1] = Math.min(255, r * 0.349 + g * 0.686 + b * 0.168);\n data[i + 2] = Math.min(255, r * 0.272 + g * 0.534 + b * 0.131);\n }\n};\n","export const Solarize = function (imageData) {\n var data = imageData.data, w = imageData.width, h = imageData.height, w4 = w * 4, y = h;\n do {\n var offsetY = (y - 1) * w4;\n var x = w;\n do {\n var offset = offsetY + (x - 1) * 4;\n var r = data[offset];\n var g = data[offset + 1];\n var b = data[offset + 2];\n if (r > 127) {\n r = 255 - r;\n }\n if (g > 127) {\n g = 255 - g;\n }\n if (b > 127) {\n b = 255 - b;\n }\n data[offset] = r;\n data[offset + 1] = g;\n data[offset + 2] = b;\n } while (--x);\n } while (--y);\n};\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { getNumberValidator } from '../Validators.js';\nexport const Threshold = function (imageData) {\n var level = this.threshold() * 255, data = imageData.data, len = data.length, i;\n for (i = 0; i < len; i += 1) {\n data[i] = data[i] < level ? 0 : 255;\n }\n};\nFactory.addGetterSetter(Node, 'threshold', 0.5, getNumberValidator(), Factory.afterSetFilter);\n","import { Konva as Core } from './_CoreInternals.js';\nimport { Arc } from './shapes/Arc.js';\nimport { Arrow } from './shapes/Arrow.js';\nimport { Circle } from './shapes/Circle.js';\nimport { Ellipse } from './shapes/Ellipse.js';\nimport { Image } from './shapes/Image.js';\nimport { Label, Tag } from './shapes/Label.js';\nimport { Line } from './shapes/Line.js';\nimport { Path } from './shapes/Path.js';\nimport { Rect } from './shapes/Rect.js';\nimport { RegularPolygon } from './shapes/RegularPolygon.js';\nimport { Ring } from './shapes/Ring.js';\nimport { Sprite } from './shapes/Sprite.js';\nimport { Star } from './shapes/Star.js';\nimport { Text } from './shapes/Text.js';\nimport { TextPath } from './shapes/TextPath.js';\nimport { Transformer } from './shapes/Transformer.js';\nimport { Wedge } from './shapes/Wedge.js';\nimport { Blur } from './filters/Blur.js';\nimport { Brighten } from './filters/Brighten.js';\nimport { Contrast } from './filters/Contrast.js';\nimport { Emboss } from './filters/Emboss.js';\nimport { Enhance } from './filters/Enhance.js';\nimport { Grayscale } from './filters/Grayscale.js';\nimport { HSL } from './filters/HSL.js';\nimport { HSV } from './filters/HSV.js';\nimport { Invert } from './filters/Invert.js';\nimport { Kaleidoscope } from './filters/Kaleidoscope.js';\nimport { Mask } from './filters/Mask.js';\nimport { Noise } from './filters/Noise.js';\nimport { Pixelate } from './filters/Pixelate.js';\nimport { Posterize } from './filters/Posterize.js';\nimport { RGB } from './filters/RGB.js';\nimport { RGBA } from './filters/RGBA.js';\nimport { Sepia } from './filters/Sepia.js';\nimport { Solarize } from './filters/Solarize.js';\nimport { Threshold } from './filters/Threshold.js';\nexport const Konva = Core.Util._assign(Core, {\n Arc,\n Arrow,\n Circle,\n Ellipse,\n Image,\n Label,\n Tag,\n Line,\n Path,\n Rect,\n RegularPolygon,\n Ring,\n Sprite,\n Star,\n Text,\n TextPath,\n Transformer,\n Wedge,\n Filters: {\n Blur,\n Brighten,\n Contrast,\n Emboss,\n Enhance,\n Grayscale,\n HSL,\n HSV,\n Invert,\n Kaleidoscope,\n Mask,\n Noise,\n Pixelate,\n Posterize,\n RGB,\n RGBA,\n Sepia,\n Solarize,\n Threshold,\n },\n});\n","/**\n * @license React\n * react-reconciler.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nmodule.exports = function $$$reconciler($$$hostConfig) {\n var exports = {};\n'use strict';var aa=require(\"react\"),ba=require(\"scheduler\"),ca=Object.assign;function m(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;ch||e[g]!==f[h]){var k=\"\\n\"+e[g].replace(\" at new \",\" at \");a.displayName&&k.includes(\"\")&&(k=k.replace(\"\",a.displayName));return k}while(1<=g&&0<=h)}break}}}finally{dc=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:\"\")?cc(a):\"\"}var fc=Object.prototype.hasOwnProperty,gc=[],hc=-1;function ic(a){return{current:a}}\nfunction q(a){0>hc||(a.current=gc[hc],gc[hc]=null,hc--)}function v(a,b){hc++;gc[hc]=a.current;a.current=b}var jc={},x=ic(jc),z=ic(!1),kc=jc;function lc(a,b){var c=a.type.contextTypes;if(!c)return jc;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}\nfunction A(a){a=a.childContextTypes;return null!==a&&void 0!==a}function mc(){q(z);q(x)}function nc(a,b,c){if(x.current!==jc)throw Error(m(168));v(x,b);v(z,c)}function oc(a,b,c){var d=a.stateNode;b=b.childContextTypes;if(\"function\"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in b))throw Error(m(108,va(a)||\"Unknown\",e));return ca({},c,d)}\nfunction pc(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||jc;kc=x.current;v(x,a);v(z,z.current);return!0}function rc(a,b,c){var d=a.stateNode;if(!d)throw Error(m(169));c?(a=oc(a,b,kc),d.__reactInternalMemoizedMergedChildContext=a,q(z),q(x),v(x,a)):q(z);v(z,c)}var tc=Math.clz32?Math.clz32:sc,uc=Math.log,vc=Math.LN2;function sc(a){a>>>=0;return 0===a?32:31-(uc(a)/vc|0)|0}var wc=64,xc=4194304;\nfunction yc(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;\ndefault:return a}}function zc(a,b){var c=a.pendingLanes;if(0===c)return 0;var d=0,e=a.suspendedLanes,f=a.pingedLanes,g=c&268435455;if(0!==g){var h=g&~e;0!==h?d=yc(h):(f&=g,0!==f&&(d=yc(f)))}else g=c&~e,0!==g?d=yc(g):0!==f&&(d=yc(f));if(0===d)return 0;if(0!==b&&b!==d&&0===(b&e)&&(e=d&-d,f=b&-b,e>=f||16===e&&0!==(f&4194240)))return b;0!==(d&4)&&(d|=c&16);b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0c;c++)b.push(a);return b}\nfunction Fc(a,b,c){a.pendingLanes|=b;536870912!==b&&(a.suspendedLanes=0,a.pingedLanes=0);a=a.eventTimes;b=31-tc(b);a[b]=c}function Gc(a,b){var c=a.pendingLanes&~b;a.pendingLanes=b;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=b;a.mutableReadLanes&=b;a.entangledLanes&=b;b=a.entanglements;var d=a.eventTimes;for(a=a.expirationTimes;0>=g;e-=g;id=1<<32-tc(b)+e|c<u?(E=r,r=null):E=r.sibling;var y=p(e,r,h[u],k);if(null===y){null===r&&(r=E);break}a&&r&&null===y.alternate&&b(e,r);g=f(y,g,u);null===n?l=y:n.sibling=y;n=y;r=E}if(u===h.length)return c(e,r),F&&kd(e,u),l;if(null===r){for(;uu?(E=r,r=null):E=r.sibling;var w=p(e,r,y.value,k);if(null===w){null===r&&(r=E);break}a&&r&&null===w.alternate&&b(e,r);g=f(w,g,u);null===n?l=w:n.sibling=w;n=w;r=E}if(y.done)return c(e,\nr),F&&kd(e,u),l;if(null===r){for(;!y.done;u++,y=h.next())y=t(e,y.value,k),null!==y&&(g=f(y,g,u),null===n?l=y:n.sibling=y,n=y);F&&kd(e,u);return l}for(r=d(e,r);!y.done;u++,y=h.next())y=B(r,e,u,y.value,k),null!==y&&(a&&null!==y.alternate&&r.delete(null===y.key?u:y.key),g=f(y,g,u),null===n?l=y:n.sibling=y,n=y);a&&r.forEach(function(a){return b(e,a)});F&&kd(e,u);return l}function za(a,d,f,h){\"object\"===typeof f&&null!==f&&f.type===ha&&null===f.key&&(f=f.props.children);if(\"object\"===typeof f&&null!==\nf){switch(f.$$typeof){case ea:a:{for(var k=f.key,l=d;null!==l;){if(l.key===k){k=f.type;if(k===ha){if(7===l.tag){c(a,l.sibling);d=e(l,f.props.children);d.return=a;a=d;break a}}else if(l.elementType===k||\"object\"===typeof k&&null!==k&&k.$$typeof===qa&&oe(k)===l.type){c(a,l.sibling);d=e(l,f.props);d.ref=me(a,l,f);d.return=a;a=d;break a}c(a,l);break}else b(a,l);l=l.sibling}f.type===ha?(d=ue(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=se(f.type,f.key,f.props,null,a.mode,h),h.ref=me(a,d,f),h.return=\na,a=h)}return g(a);case fa:a:{for(l=f.key;null!==d;){if(d.key===l)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=te(f,a.mode,h);d.return=a;a=d}return g(a);case qa:return l=f._init,za(a,d,l(f._payload),h)}if(Da(f))return w(a,d,f,h);if(ta(f))return Z(a,d,f,h);ne(a,f)}return\"string\"===typeof f&&\"\"!==f||\"number\"===typeof f?(f=\"\"+f,null!==d&&\n6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=re(f,a.mode,h),d.return=a,a=d),g(a)):c(a,d)}return za}var ve=pe(!0),we=pe(!1),xe={},ye=ic(xe),ze=ic(xe),Ae=ic(xe);function Be(a){if(a===xe)throw Error(m(174));return a}function Ce(a,b){v(Ae,b);v(ze,a);v(ye,xe);a=Fa(b);q(ye);v(ye,a)}function De(){q(ye);q(ze);q(Ae)}function Ee(a){var b=Be(Ae.current),c=Be(ye.current);b=Ga(c,a.type,b);c!==b&&(v(ze,a),v(ye,b))}function Fe(a){ze.current===a&&(q(ye),q(ze))}var J=ic(0);\nfunction Ge(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||Jb(c)||Kb(c)))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&128))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var He=[];\nfunction Ie(){for(var a=0;ac?c:4;a(!0);var d=Ke.transition;Ke.transition={};try{a(!1),b()}finally{C=c,Ke.transition=d}}function Af(){return Ye().memoizedState}\nfunction Bf(a,b,c){var d=fe(a);c={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Cf(a))Df(b,c);else if(c=Sd(a,b,c,d),null!==c){var e=I();ge(c,a,d,e);Ef(c,b,d)}}\nfunction mf(a,b,c){var d=fe(a),e={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Cf(a))Df(b,e);else{var f=a.alternate;if(0===a.lanes&&(null===f||0===f.lanes)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.hasEagerState=!0;e.eagerState=h;if(Vc(h,g)){var k=b.interleaved;null===k?(e.next=e,Rd(b)):(e.next=k.next,k.next=e);b.interleaved=e;return}}catch(l){}finally{}c=Sd(a,b,e,d);null!==c&&(e=I(),ge(c,a,d,e),Ef(c,b,d))}}\nfunction Cf(a){var b=a.alternate;return a===K||null!==b&&b===K}function Df(a,b){Ne=Me=!0;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}function Ef(a,b,c){if(0!==(c&4194240)){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Hc(a,c)}}\nvar Ve={readContext:Pd,useCallback:N,useContext:N,useEffect:N,useImperativeHandle:N,useInsertionEffect:N,useLayoutEffect:N,useMemo:N,useReducer:N,useRef:N,useState:N,useDebugValue:N,useDeferredValue:N,useTransition:N,useMutableSource:N,useSyncExternalStore:N,useId:N,unstable_isNewReconciler:!1},Se={readContext:Pd,useCallback:function(a,b){Xe().memoizedState=[a,void 0===b?null:b];return a},useContext:Pd,useEffect:qf,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return of(4194308,\n4,tf.bind(null,b,a),c)},useLayoutEffect:function(a,b){return of(4194308,4,a,b)},useInsertionEffect:function(a,b){return of(4,2,a,b)},useMemo:function(a,b){var c=Xe();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=Xe();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};d.queue=a;a=a.dispatch=Bf.bind(null,K,a);return[d.memoizedState,a]},useRef:function(a){var b=\nXe();a={current:a};return b.memoizedState=a},useState:lf,useDebugValue:vf,useDeferredValue:function(a){return Xe().memoizedState=a},useTransition:function(){var a=lf(!1),b=a[0];a=zf.bind(null,a[1]);Xe().memoizedState=a;return[b,a]},useMutableSource:function(){},useSyncExternalStore:function(a,b,c){var d=K,e=Xe();if(F){if(void 0===c)throw Error(m(407));c=c()}else{c=b();if(null===O)throw Error(m(349));0!==(Le&30)||hf(d,b,c)}e.memoizedState=c;var f={value:c,getSnapshot:b};e.queue=f;qf(ef.bind(null,d,\nf,a),[a]);d.flags|=2048;ff(9,gf.bind(null,d,f,c,b),void 0,null);return c},useId:function(){var a=Xe(),b=O.identifierPrefix;if(F){var c=jd;var d=id;c=(d&~(1<<32-tc(d)-1)).toString(32)+c;b=\":\"+b+\"R\"+c;c=Oe++;0Eg&&(b.flags|=128,d=!0,Bg(e,!1),b.lanes=4194304)}else{if(!d)if(a=Ge(f),null!==a){if(b.flags|=128,d=!0,a=a.updateQueue,null!==a&&(b.updateQueue=a,b.flags|=4),Bg(e,!0),null===e.tail&&\"hidden\"===e.tailMode&&!f.alternate&&!F)return Q(b),null}else 2*D()-e.renderingStartTime>Eg&&1073741824!==c&&(b.flags|=128,d=!0,Bg(e,!1),b.lanes=\n4194304);e.isBackwards?(f.sibling=b.child,b.child=f):(a=e.last,null!==a?a.sibling=f:b.child=f,e.last=f)}if(null!==e.tail)return b=e.tail,e.rendering=b,e.tail=b.sibling,e.renderingStartTime=D(),b.sibling=null,a=J.current,v(J,d?a&1|2:a&1),b;Q(b);return null;case 22:case 23:return Fg(),c=null!==b.memoizedState,null!==a&&null!==a.memoizedState!==c&&(b.flags|=8192),c&&0!==(b.mode&1)?0!==(ag&1073741824)&&(Q(b),Ta&&b.subtreeFlags&6&&(b.flags|=8192)):Q(b),null;case 24:return null;case 25:return null}throw Error(m(156,\nb.tag));}\nfunction Gg(a,b){nd(b);switch(b.tag){case 1:return A(b.type)&&mc(),a=b.flags,a&65536?(b.flags=a&-65537|128,b):null;case 3:return De(),q(z),q(x),Ie(),a=b.flags,0!==(a&65536)&&0===(a&128)?(b.flags=a&-65537|128,b):null;case 5:return Fe(b),null;case 13:q(J);a=b.memoizedState;if(null!==a&&null!==a.dehydrated){if(null===b.alternate)throw Error(m(340));Ad()}a=b.flags;return a&65536?(b.flags=a&-65537|128,b):null;case 19:return q(J),null;case 4:return De(),null;case 10:return Md(b.type._context),null;case 22:case 23:return Fg(),\nnull;case 24:return null;default:return null}}var Hg=!1,S=!1,Ig=\"function\"===typeof WeakSet?WeakSet:Set,T=null;function Jg(a,b){var c=a.ref;if(null!==c)if(\"function\"===typeof c)try{c(null)}catch(d){U(a,b,d)}else c.current=null}function Kg(a,b,c){try{c()}catch(d){U(a,b,d)}}var Lg=!1;\nfunction Mg(a,b){Ha(a.containerInfo);for(T=b;null!==T;)if(a=T,b=a.child,0!==(a.subtreeFlags&1028)&&null!==b)b.return=a,T=b;else for(;null!==T;){a=T;try{var c=a.alternate;if(0!==(a.flags&1024))switch(a.tag){case 0:case 11:case 15:break;case 1:if(null!==c){var d=c.memoizedProps,e=c.memoizedState,f=a.stateNode,g=f.getSnapshotBeforeUpdate(a.elementType===a.type?d:Fd(a.type,d),e);f.__reactInternalSnapshotBeforeUpdate=g}break;case 3:Ta&&xb(a.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;\ndefault:throw Error(m(163));}}catch(h){U(a,a.return,h)}b=a.sibling;if(null!==b){b.return=a.return;T=b;break}T=a.return}c=Lg;Lg=!1;return c}function Ng(a,b,c){var d=b.updateQueue;d=null!==d?d.lastEffect:null;if(null!==d){var e=d=d.next;do{if((e.tag&a)===a){var f=e.destroy;e.destroy=void 0;void 0!==f&&Kg(b,c,f)}e=e.next}while(e!==d)}}function Og(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}\nfunction Pg(a){var b=a.ref;if(null!==b){var c=a.stateNode;switch(a.tag){case 5:a=Ea(c);break;default:a=c}\"function\"===typeof b?b(a):b.current=a}}function Qg(a){var b=a.alternate;null!==b&&(a.alternate=null,Qg(b));a.child=null;a.deletions=null;a.sibling=null;5===a.tag&&(b=a.stateNode,null!==b&&Za(b));a.stateNode=null;a.return=null;a.dependencies=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.stateNode=null;a.updateQueue=null}\nfunction Rg(a){return 5===a.tag||3===a.tag||4===a.tag}function Sg(a){a:for(;;){for(;null===a.sibling;){if(null===a.return||Rg(a.return))return null;a=a.return}a.sibling.return=a.return;for(a=a.sibling;5!==a.tag&&6!==a.tag&&18!==a.tag;){if(a.flags&2)continue a;if(null===a.child||4===a.tag)continue a;else a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}\nfunction Tg(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?pb(c,a,b):kb(c,a);else if(4!==d&&(a=a.child,null!==a))for(Tg(a,b,c),a=a.sibling;null!==a;)Tg(a,b,c),a=a.sibling}function Ug(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?ob(c,a,b):jb(c,a);else if(4!==d&&(a=a.child,null!==a))for(Ug(a,b,c),a=a.sibling;null!==a;)Ug(a,b,c),a=a.sibling}var V=null,Vg=!1;function Wg(a,b,c){for(c=c.child;null!==c;)Xg(a,b,c),c=c.sibling}\nfunction Xg(a,b,c){if(Sc&&\"function\"===typeof Sc.onCommitFiberUnmount)try{Sc.onCommitFiberUnmount(Rc,c)}catch(h){}switch(c.tag){case 5:S||Jg(c,b);case 6:if(Ta){var d=V,e=Vg;V=null;Wg(a,b,c);V=d;Vg=e;null!==V&&(Vg?rb(V,c.stateNode):qb(V,c.stateNode))}else Wg(a,b,c);break;case 18:Ta&&null!==V&&(Vg?Yb(V,c.stateNode):Xb(V,c.stateNode));break;case 4:Ta?(d=V,e=Vg,V=c.stateNode.containerInfo,Vg=!0,Wg(a,b,c),V=d,Vg=e):(Ua&&(d=c.stateNode.containerInfo,e=zb(d),Cb(d,e)),Wg(a,b,c));break;case 0:case 11:case 14:case 15:if(!S&&\n(d=c.updateQueue,null!==d&&(d=d.lastEffect,null!==d))){e=d=d.next;do{var f=e,g=f.destroy;f=f.tag;void 0!==g&&(0!==(f&2)?Kg(c,b,g):0!==(f&4)&&Kg(c,b,g));e=e.next}while(e!==d)}Wg(a,b,c);break;case 1:if(!S&&(Jg(c,b),d=c.stateNode,\"function\"===typeof d.componentWillUnmount))try{d.props=c.memoizedProps,d.state=c.memoizedState,d.componentWillUnmount()}catch(h){U(c,b,h)}Wg(a,b,c);break;case 21:Wg(a,b,c);break;case 22:c.mode&1?(S=(d=S)||null!==c.memoizedState,Wg(a,b,c),S=d):Wg(a,b,c);break;default:Wg(a,b,\nc)}}function Yg(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Ig);b.forEach(function(b){var d=Zg.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}\nfunction $g(a,b){var c=b.deletions;if(null!==c)for(var d=0;d\";case jh:return\":has(\"+(qh(a)||\"\")+\")\";case kh:return'[role=\"'+a.value+'\"]';case mh:return'\"'+a.value+'\"';case lh:return'[data-testname=\"'+a.value+'\"]';default:throw Error(m(365));}}\nfunction rh(a,b){var c=[];a=[a,0];for(var d=0;de&&(e=g);d&=~f}d=e;d=D()-d;d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*th(d/1960))-d;if(10a?16:a;if(null===Eh)var d=!1;else{a=Eh;Eh=null;Fh=0;if(0!==(H&6))throw Error(m(331));var e=H;H|=4;for(T=a.current;null!==T;){var f=T,g=f.child;if(0!==(T.flags&16)){var h=f.deletions;if(null!==h){for(var k=0;kD()-ch?Sh(a,0):yh|=c);Lh(a,b)}function ei(a,b){0===b&&(0===(a.mode&1)?b=1:(b=xc,xc<<=1,0===(xc&130023424)&&(xc=4194304)));var c=I();a=Td(a,b);null!==a&&(Fc(a,b,c),Lh(a,c))}function pg(a){var b=a.memoizedState,c=0;null!==b&&(c=b.retryLane);ei(a,c)}\nfunction Zg(a,b){var c=0;switch(a.tag){case 13:var d=a.stateNode;var e=a.memoizedState;null!==e&&(c=e.retryLane);break;case 19:d=a.stateNode;break;default:throw Error(m(314));}null!==d&&d.delete(b);ei(a,c)}var bi;\nbi=function(a,b,c){if(null!==a)if(a.memoizedProps!==b.pendingProps||z.current)G=!0;else{if(0===(a.lanes&c)&&0===(b.flags&128))return G=!1,tg(a,b,c);G=0!==(a.flags&131072)?!0:!1}else G=!1,F&&0!==(b.flags&1048576)&&ld(b,ed,b.index);b.lanes=0;switch(b.tag){case 2:var d=b.type;dg(a,b);a=b.pendingProps;var e=lc(b,x.current);Od(b,c);e=Re(null,b,d,a,e,c);var f=We();b.flags|=1;\"object\"===typeof e&&null!==e&&\"function\"===typeof e.render&&void 0===e.$$typeof?(b.tag=1,b.memoizedState=null,b.updateQueue=null,\nA(d)?(f=!0,pc(b)):f=!1,b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,Vd(b),e.updater=he,b.stateNode=e,e._reactInternals=b,le(b,d,a,c),b=eg(null,b,d,!0,f,c)):(b.tag=0,F&&f&&md(b),P(null,b,e,c),b=b.child);return b;case 16:d=b.elementType;a:{dg(a,b);a=b.pendingProps;e=d._init;d=e(d._payload);b.type=d;e=b.tag=fi(d);a=Fd(d,a);switch(e){case 0:b=Yf(null,b,d,a,c);break a;case 1:b=cg(null,b,d,a,c);break a;case 11:b=Tf(null,b,d,a,c);break a;case 14:b=Vf(null,b,d,Fd(d.type,a),c);break a}throw Error(m(306,\nd,\"\"));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Fd(d,e),Yf(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Fd(d,e),cg(a,b,d,e,c);case 3:a:{fg(b);if(null===a)throw Error(m(387));d=b.pendingProps;f=b.memoizedState;e=f.element;Wd(a,b);ae(b,d,null,c);var g=b.memoizedState;d=g.element;if(Va&&f.isDehydrated)if(f={element:d,isDehydrated:!1,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},b.updateQueue.baseState=\nf,b.memoizedState=f,b.flags&256){e=Ff(Error(m(423)),b);b=gg(a,b,d,c,e);break a}else if(d!==e){e=Ff(Error(m(424)),b);b=gg(a,b,d,c,e);break a}else for(Va&&(pd=Pb(b.stateNode.containerInfo),od=b,F=!0,rd=null,qd=!1),c=we(b,null,d,c),b.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{Ad();if(d===e){b=Uf(a,b,c);break a}P(a,b,d,c)}b=b.child}return b;case 5:return Ee(b),null===a&&wd(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Na(d,e)?g=null:null!==f&&Na(d,f)&&(b.flags|=32),\nbg(a,b),P(a,b,g,c),b.child;case 6:return null===a&&wd(b),null;case 13:return jg(a,b,c);case 4:return Ce(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=ve(b,null,d,c):P(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Fd(d,e),Tf(a,b,d,e,c);case 7:return P(a,b,b.pendingProps,c),b.child;case 8:return P(a,b,b.pendingProps.children,c),b.child;case 12:return P(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;f=b.memoizedProps;\ng=e.value;Ld(b,d,g);if(null!==f)if(Vc(f.value,g)){if(f.children===e.children&&!z.current){b=Uf(a,b,c);break a}}else for(f=b.child,null!==f&&(f.return=b);null!==f;){var h=f.dependencies;if(null!==h){g=f.child;for(var k=h.firstContext;null!==k;){if(k.context===d){if(1===f.tag){k=Xd(-1,c&-c);k.tag=2;var l=f.updateQueue;if(null!==l){l=l.shared;var n=l.pending;null===n?k.next=k:(k.next=n.next,n.next=k);l.pending=k}}f.lanes|=c;k=f.alternate;null!==k&&(k.lanes|=c);Nd(f.return,c,b);h.lanes|=c;break}k=k.next}}else if(10===\nf.tag)g=f.type===b.type?null:f.child;else if(18===f.tag){g=f.return;if(null===g)throw Error(m(341));g.lanes|=c;h=g.alternate;null!==h&&(h.lanes|=c);Nd(g,c,b);g=f.sibling}else g=f.child;if(null!==g)g.return=f;else for(g=f;null!==g;){if(g===b){g=null;break}f=g.sibling;if(null!==f){f.return=g.return;g=f;break}g=g.return}f=g}P(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,d=b.pendingProps.children,Od(b,c),e=Pd(e),d=d(e),b.flags|=1,P(a,b,d,c),b.child;case 14:return d=b.type,e=Fd(d,b.pendingProps),\ne=Fd(d.type,e),Vf(a,b,d,e,c);case 15:return Xf(a,b,b.type,b.pendingProps,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Fd(d,e),dg(a,b),b.tag=1,A(d)?(a=!0,pc(b)):a=!1,Od(b,c),je(b,d,e),le(b,d,e,c),eg(null,b,d,!0,a,c);case 19:return sg(a,b,c);case 22:return Zf(a,b,c)}throw Error(m(156,b.tag));};function Nh(a,b){return Jc(a,b)}\nfunction gi(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null}function td(a,b,c,d){return new gi(a,b,c,d)}function Wf(a){a=a.prototype;return!(!a||!a.isReactComponent)}\nfunction fi(a){if(\"function\"===typeof a)return Wf(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===ma)return 11;if(a===pa)return 14}return 2}\nfunction qe(a,b){var c=a.alternate;null===c?(c=td(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null);c.flags=a.flags&14680064;c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext};\nc.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}\nfunction se(a,b,c,d,e,f){var g=2;d=a;if(\"function\"===typeof a)Wf(a)&&(g=1);else if(\"string\"===typeof a)g=5;else a:switch(a){case ha:return ue(c.children,e,f,b);case ia:g=8;e|=8;break;case ja:return a=td(12,c,b,e|2),a.elementType=ja,a.lanes=f,a;case na:return a=td(13,c,b,e),a.elementType=na,a.lanes=f,a;case oa:return a=td(19,c,b,e),a.elementType=oa,a.lanes=f,a;case ra:return kg(c,e,f,b);default:if(\"object\"===typeof a&&null!==a)switch(a.$$typeof){case ka:g=10;break a;case la:g=9;break a;case ma:g=11;\nbreak a;case pa:g=14;break a;case qa:g=16;d=null;break a}throw Error(m(130,null==a?a:typeof a,\"\"));}b=td(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function ue(a,b,c,d){a=td(7,a,d,b);a.lanes=c;return a}function kg(a,b,c,d){a=td(22,a,d,b);a.elementType=ra;a.lanes=c;a.stateNode={isHidden:!1};return a}function re(a,b,c){a=td(6,a,null,b);a.lanes=c;return a}\nfunction te(a,b,c){b=td(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}\nfunction hi(a,b,c,d,e){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=Ra;this.callbackNode=this.pendingContext=this.context=null;this.callbackPriority=0;this.eventTimes=Ec(0);this.expirationTimes=Ec(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=Ec(0);this.identifierPrefix=d;this.onRecoverableError=e;Va&&(this.mutableSourceEagerHydrationData=\nnull)}function ii(a,b,c,d,e,f,g,h,k){a=new hi(a,b,c,h,k);1===b?(b=1,!0===f&&(b|=8)):b=0;f=td(3,null,null,b);a.current=f;f.stateNode=a;f.memoizedState={element:d,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null};Vd(f);return a}\nfunction ji(a){if(!a)return jc;a=a._reactInternals;a:{if(wa(a)!==a||1!==a.tag)throw Error(m(170));var b=a;do{switch(b.tag){case 3:b=b.stateNode.context;break a;case 1:if(A(b.type)){b=b.stateNode.__reactInternalMemoizedMergedChildContext;break a}}b=b.return}while(null!==b);throw Error(m(171));}if(1===a.tag){var c=a.type;if(A(c))return oc(a,c,b)}return b}\nfunction ki(a){var b=a._reactInternals;if(void 0===b){if(\"function\"===typeof a.render)throw Error(m(188));a=Object.keys(a).join(\",\");throw Error(m(268,a));}a=Aa(b);return null===a?null:a.stateNode}function li(a,b){a=a.memoizedState;if(null!==a&&null!==a.dehydrated){var c=a.retryLane;a.retryLane=0!==c&&c=l&&f>=t&&e<=n&&g<=p){a.splice(b,1);break}else if(!(d!==l||c.width!==k.width||pg)){t>f&&(k.height+=t-f,k.y=f);pe)){l>d&&(k.width+=\nl-d,k.x=d);nc&&(c=g)),g \")+\"\\n\\nNo matching component was found for:\\n \")+a.join(\" > \")}return null};\nexports.getPublicRootInstance=function(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return Ea(a.child.stateNode);default:return a.child.stateNode}};\nexports.injectIntoDevTools=function(a){a={bundleType:a.bundleType,version:a.version,rendererPackageName:a.rendererPackageName,rendererConfig:a.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:da.ReactCurrentDispatcher,findHostInstanceByFiber:ni,findFiberByHostInstance:a.findFiberByHostInstance||\noi,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:\"18.2.0\"};if(\"undefined\"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)a=!1;else{var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)a=!0;else{try{Rc=b.inject(a),Sc=b}catch(c){}a=b.checkDCE?!0:!1}}return a};exports.isAlreadyRendering=function(){return!1};\nexports.observeVisibleRects=function(a,b,c,d){if(!bb)throw Error(m(363));a=sh(a,b);var e=ib(a,c,d).disconnect;return{disconnect:function(){e()}}};exports.registerMutableSourceForHydration=function(a,b){var c=b._getVersion;c=c(b._source);null==a.mutableSourceEagerHydrationData?a.mutableSourceEagerHydrationData=[b,c]:a.mutableSourceEagerHydrationData.push(b,c)};exports.runWithPriority=function(a,b){var c=C;try{return C=a,b()}finally{C=c}};exports.shouldError=function(){return null};\nexports.shouldSuspend=function(){return!1};exports.updateContainer=function(a,b,c,d){var e=b.current,f=I(),g=fe(e);c=ji(c);null===b.context?b.context=c:b.pendingContext=c;b=Xd(f,g);b.payload={element:a};d=void 0===d?null:d;null!==d&&(b.callback=d);a=Yd(e,b,g);null!==a&&(ge(a,e,g,f),Zd(a,e,g));return g};\n\n return exports;\n};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-reconciler.production.min.js');\n} else {\n module.exports = require('./cjs/react-reconciler.development.js');\n}\n","/**\n * @license React\n * react-reconciler-constants.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';exports.ConcurrentRoot=1;exports.ContinuousEventPriority=4;exports.DefaultEventPriority=16;exports.DiscreteEventPriority=1;exports.IdleEventPriority=536870912;exports.LegacyRoot=0;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-reconciler-constants.production.min.js');\n} else {\n module.exports = require('./cjs/react-reconciler-constants.development.js');\n}\n","import { Konva } from 'konva/lib/Global.js';\nconst propsToSkip = {\n children: true,\n ref: true,\n key: true,\n style: true,\n forwardedRef: true,\n unstable_applyCache: true,\n unstable_applyDrawHitFromCache: true,\n};\nlet zIndexWarningShowed = false;\nlet dragWarningShowed = false;\nexport const EVENTS_NAMESPACE = '.react-konva-event';\nlet useStrictMode = false;\nexport function toggleStrictMode(value) {\n useStrictMode = value;\n}\nconst DRAGGABLE_WARNING = `ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled.\nPosition of a node will be changed during drag&drop, so you should update state of the react app as well.\nConsider to add onDragMove or onDragEnd events.\nFor more info see: https://github.com/konvajs/react-konva/issues/256\n`;\nconst Z_INDEX_WARNING = `ReactKonva: You are using \"zIndex\" attribute for a Konva node.\nreact-konva may get confused with ordering. Just define correct order of elements in your render function of a component.\nFor more info see: https://github.com/konvajs/react-konva/issues/194\n`;\nconst EMPTY_PROPS = {};\nexport function applyNodeProps(instance, props, oldProps = EMPTY_PROPS) {\n // don't use zIndex in react-konva\n if (!zIndexWarningShowed && 'zIndex' in props) {\n console.warn(Z_INDEX_WARNING);\n zIndexWarningShowed = true;\n }\n // check correct draggable usage\n if (!dragWarningShowed && props.draggable) {\n var hasPosition = props.x !== undefined || props.y !== undefined;\n var hasEvents = props.onDragEnd || props.onDragMove;\n if (hasPosition && !hasEvents) {\n console.warn(DRAGGABLE_WARNING);\n dragWarningShowed = true;\n }\n }\n // check old props\n // we need to unset properties that are not in new props\n // and remove all events\n for (var key in oldProps) {\n if (propsToSkip[key]) {\n continue;\n }\n var isEvent = key.slice(0, 2) === 'on';\n var propChanged = oldProps[key] !== props[key];\n // if that is a changed event, we need to remove it\n if (isEvent && propChanged) {\n var eventName = key.substr(2).toLowerCase();\n if (eventName.substr(0, 7) === 'content') {\n eventName =\n 'content' +\n eventName.substr(7, 1).toUpperCase() +\n eventName.substr(8);\n }\n instance.off(eventName, oldProps[key]);\n }\n var toRemove = !props.hasOwnProperty(key);\n if (toRemove) {\n instance.setAttr(key, undefined);\n }\n }\n var strictUpdate = useStrictMode || props._useStrictMode;\n var updatedProps = {};\n var hasUpdates = false;\n const newEvents = {};\n for (var key in props) {\n if (propsToSkip[key]) {\n continue;\n }\n var isEvent = key.slice(0, 2) === 'on';\n var toAdd = oldProps[key] !== props[key];\n if (isEvent && toAdd) {\n var eventName = key.substr(2).toLowerCase();\n if (eventName.substr(0, 7) === 'content') {\n eventName =\n 'content' +\n eventName.substr(7, 1).toUpperCase() +\n eventName.substr(8);\n }\n // check that event is not undefined\n if (props[key]) {\n newEvents[eventName] = props[key];\n }\n }\n if (!isEvent &&\n (props[key] !== oldProps[key] ||\n (strictUpdate && props[key] !== instance.getAttr(key)))) {\n hasUpdates = true;\n updatedProps[key] = props[key];\n }\n }\n if (hasUpdates) {\n instance.setAttrs(updatedProps);\n updatePicture(instance);\n }\n // subscribe to events AFTER we set attrs\n // we need it to fix https://github.com/konvajs/react-konva/issues/471\n // settings attrs may add events. Like \"draggable: true\" will add \"mousedown\" listener\n for (var eventName in newEvents) {\n instance.on(eventName + EVENTS_NAMESPACE, newEvents[eventName]);\n }\n}\nexport function updatePicture(node) {\n if (!Konva.autoDrawEnabled) {\n var drawingNode = node.getLayer() || node.getStage();\n drawingNode && drawingNode.batchDraw();\n }\n}\n","import Konva from 'konva/lib/Core.js';\nimport { applyNodeProps, updatePicture, EVENTS_NAMESPACE } from './makeUpdates.js';\nexport { unstable_now as now, unstable_IdlePriority as idlePriority, unstable_runWithPriority as run, } from 'scheduler';\nimport { DefaultEventPriority } from 'react-reconciler/constants.js';\nconst NO_CONTEXT = {};\nconst UPDATE_SIGNAL = {};\n// for react-spring capability\nKonva.Node.prototype._applyProps = applyNodeProps;\nexport function appendInitialChild(parentInstance, child) {\n if (typeof child === 'string') {\n // Noop for string children of Text (eg foo)\n console.error(`Do not use plain text as child of Konva.Node. You are using text: ${child}`);\n return;\n }\n parentInstance.add(child);\n updatePicture(parentInstance);\n}\nexport function createInstance(type, props, internalInstanceHandle) {\n let NodeClass = Konva[type];\n if (!NodeClass) {\n console.error(`Konva has no node with the type ${type}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: \"import \"konva/lib/shapes/${type}\" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`);\n NodeClass = Konva.Group;\n }\n // we need to split props into events and non events\n // we we can pass non events into constructor directly\n // that way the performance should be better\n // we we apply change \"applyNodeProps\"\n // then it will trigger change events on first run\n // but we don't need them!\n const propsWithoutEvents = {};\n const propsWithOnlyEvents = {};\n for (var key in props) {\n var isEvent = key.slice(0, 2) === 'on';\n if (isEvent) {\n propsWithOnlyEvents[key] = props[key];\n }\n else {\n propsWithoutEvents[key] = props[key];\n }\n }\n const instance = new NodeClass(propsWithoutEvents);\n applyNodeProps(instance, propsWithOnlyEvents);\n return instance;\n}\nexport function createTextInstance(text, rootContainerInstance, internalInstanceHandle) {\n console.error(`Text components are not supported for now in ReactKonva. Your text is: \"${text}\"`);\n}\nexport function finalizeInitialChildren(domElement, type, props) {\n return false;\n}\nexport function getPublicInstance(instance) {\n return instance;\n}\nexport function prepareForCommit() {\n return null;\n}\nexport function preparePortalMount() {\n return null;\n}\nexport function prepareUpdate(domElement, type, oldProps, newProps) {\n return UPDATE_SIGNAL;\n}\nexport function resetAfterCommit() {\n // Noop\n}\nexport function resetTextContent(domElement) {\n // Noop\n}\nexport function shouldDeprioritizeSubtree(type, props) {\n return false;\n}\nexport function getRootHostContext() {\n return NO_CONTEXT;\n}\nexport function getChildHostContext() {\n return NO_CONTEXT;\n}\nexport const scheduleTimeout = setTimeout;\nexport const cancelTimeout = clearTimeout;\nexport const noTimeout = -1;\n// export const schedulePassiveEffects = scheduleDeferredCallback;\n// export const cancelPassiveEffects = cancelDeferredCallback;\nexport function shouldSetTextContent(type, props) {\n return false;\n}\n// The Konva renderer is secondary to the React DOM renderer.\nexport const isPrimaryRenderer = false;\nexport const warnsIfNotActing = true;\nexport const supportsMutation = true;\nexport function appendChild(parentInstance, child) {\n if (child.parent === parentInstance) {\n child.moveToTop();\n }\n else {\n parentInstance.add(child);\n }\n updatePicture(parentInstance);\n}\nexport function appendChildToContainer(parentInstance, child) {\n if (child.parent === parentInstance) {\n child.moveToTop();\n }\n else {\n parentInstance.add(child);\n }\n updatePicture(parentInstance);\n}\nexport function insertBefore(parentInstance, child, beforeChild) {\n // child._remove() will not stop dragging\n // but child.remove() will stop it, but we don't need it\n // removing will reset zIndexes\n child._remove();\n parentInstance.add(child);\n child.setZIndex(beforeChild.getZIndex());\n updatePicture(parentInstance);\n}\nexport function insertInContainerBefore(parentInstance, child, beforeChild) {\n insertBefore(parentInstance, child, beforeChild);\n}\nexport function removeChild(parentInstance, child) {\n child.destroy();\n child.off(EVENTS_NAMESPACE);\n updatePicture(parentInstance);\n}\nexport function removeChildFromContainer(parentInstance, child) {\n child.destroy();\n child.off(EVENTS_NAMESPACE);\n updatePicture(parentInstance);\n}\nexport function commitTextUpdate(textInstance, oldText, newText) {\n console.error(`Text components are not yet supported in ReactKonva. You text is: \"${newText}\"`);\n}\nexport function commitMount(instance, type, newProps) {\n // Noop\n}\nexport function commitUpdate(instance, updatePayload, type, oldProps, newProps) {\n applyNodeProps(instance, newProps, oldProps);\n}\nexport function hideInstance(instance) {\n instance.hide();\n updatePicture(instance);\n}\nexport function hideTextInstance(textInstance) {\n // Noop\n}\nexport function unhideInstance(instance, props) {\n if (props.visible == null || props.visible) {\n instance.show();\n }\n}\nexport function unhideTextInstance(textInstance, text) {\n // Noop\n}\nexport function clearContainer(container) {\n // Noop\n}\nexport function detachDeletedInstance() { }\nexport const getCurrentEventPriority = () => DefaultEventPriority;\n","import * as React from \"react\";\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nfunction traverseFiber(fiber, ascending, selector) {\n if (!fiber)\n return;\n if (selector(fiber) === true)\n return fiber;\n let child = ascending ? fiber.return : fiber.child;\n while (child) {\n const match = traverseFiber(child, ascending, selector);\n if (match)\n return match;\n child = ascending ? null : child.sibling;\n }\n}\nfunction wrapContext(context) {\n try {\n return Object.defineProperties(context, {\n _currentRenderer: {\n get() {\n return null;\n },\n set() {\n }\n },\n _currentRenderer2: {\n get() {\n return null;\n },\n set() {\n }\n }\n });\n } catch (_) {\n return context;\n }\n}\nconst FiberContext = wrapContext(React.createContext(null));\nclass FiberProvider extends React.Component {\n render() {\n return /* @__PURE__ */ React.createElement(FiberContext.Provider, {\n value: this._reactInternals\n }, this.props.children);\n }\n}\nconst { ReactCurrentOwner, ReactCurrentDispatcher } = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\nfunction useFiber() {\n const root = React.useContext(FiberContext);\n if (root === null)\n throw new Error(\"its-fine: useFiber must be called within a !\");\n const id = React.useId();\n const fiber = React.useMemo(() => {\n for (const maybeFiber of [ReactCurrentOwner == null ? void 0 : ReactCurrentOwner.current, root, root == null ? void 0 : root.alternate]) {\n if (!maybeFiber)\n continue;\n const fiber2 = traverseFiber(maybeFiber, false, (node) => {\n let state = node.memoizedState;\n while (state) {\n if (state.memoizedState === id)\n return true;\n state = state.next;\n }\n });\n if (fiber2)\n return fiber2;\n }\n }, [root, id]);\n return fiber;\n}\nfunction useContainer() {\n const fiber = useFiber();\n const root = React.useMemo(\n () => traverseFiber(fiber, true, (node) => {\n var _a;\n return ((_a = node.stateNode) == null ? void 0 : _a.containerInfo) != null;\n }),\n [fiber]\n );\n return root == null ? void 0 : root.stateNode.containerInfo;\n}\nfunction useNearestChild(type) {\n const fiber = useFiber();\n const childRef = React.useRef();\n React.useLayoutEffect(() => {\n var _a;\n childRef.current = (_a = traverseFiber(\n fiber,\n false,\n (node) => typeof node.type === \"string\" && (type === void 0 || node.type === type)\n )) == null ? void 0 : _a.stateNode;\n }, [fiber]);\n return childRef;\n}\nfunction useNearestParent(type) {\n const fiber = useFiber();\n const parentRef = React.useRef();\n React.useLayoutEffect(() => {\n var _a;\n parentRef.current = (_a = traverseFiber(\n fiber,\n true,\n (node) => typeof node.type === \"string\" && (type === void 0 || node.type === type)\n )) == null ? void 0 : _a.stateNode;\n }, [fiber]);\n return parentRef;\n}\nfunction useContextMap() {\n var _a;\n const fiber = useFiber();\n const [contextMap] = React.useState(() => /* @__PURE__ */ new Map());\n contextMap.clear();\n let node = fiber;\n while (node) {\n if (node.type && typeof node.type === \"object\") {\n const context = \"Provider\" in node.type ? node.type : node.type._context;\n if (context && context !== FiberContext && !contextMap.has(context)) {\n contextMap.set(context, (_a = ReactCurrentDispatcher == null ? void 0 : ReactCurrentDispatcher.current) == null ? void 0 : _a.readContext(wrapContext(context)));\n }\n }\n node = node.return;\n }\n return contextMap;\n}\nfunction useContextBridge() {\n const contextMap = useContextMap();\n return React.useMemo(\n () => Array.from(contextMap.keys()).reduce(\n (Prev, context) => (props) => /* @__PURE__ */ React.createElement(Prev, null, /* @__PURE__ */ React.createElement(context.Provider, __spreadProps(__spreadValues({}, props), {\n value: contextMap.get(context)\n }))),\n (props) => /* @__PURE__ */ React.createElement(FiberProvider, __spreadValues({}, props))\n ),\n [contextMap]\n );\n}\nexport {\n FiberProvider,\n traverseFiber,\n useContainer,\n useContextBridge,\n useContextMap,\n useFiber,\n useNearestChild,\n useNearestParent\n};\n//# sourceMappingURL=index.js.map\n","/**\n * Based on ReactArt.js\n * Copyright (c) 2017-present Lavrenov Anton.\n * All rights reserved.\n *\n * MIT\n */\n'use strict';\nimport React from 'react';\nimport Konva from 'konva/lib/Core.js';\nimport ReactFiberReconciler from 'react-reconciler';\nimport { LegacyRoot } from 'react-reconciler/constants.js';\nimport * as HostConfig from './ReactKonvaHostConfig.js';\nimport { applyNodeProps, toggleStrictMode } from './makeUpdates.js';\nimport { useContextBridge, FiberProvider } from 'its-fine';\nfunction usePrevious(value) {\n const ref = React.useRef({});\n React.useLayoutEffect(() => {\n ref.current = value;\n });\n React.useLayoutEffect(() => {\n return () => {\n // when using suspense it is possible that stage is unmounted\n // but React still keep component ref\n // in that case we need to manually flush props\n // we have a special test for that\n ref.current = {};\n };\n }, []);\n return ref.current;\n}\nconst StageWrap = (props) => {\n const container = React.useRef();\n const stage = React.useRef();\n const fiberRef = React.useRef();\n const oldProps = usePrevious(props);\n const Bridge = useContextBridge();\n const _setRef = (stage) => {\n const { forwardedRef } = props;\n if (!forwardedRef) {\n return;\n }\n if (typeof forwardedRef === 'function') {\n forwardedRef(stage);\n }\n else {\n forwardedRef.current = stage;\n }\n };\n React.useLayoutEffect(() => {\n stage.current = new Konva.Stage({\n width: props.width,\n height: props.height,\n container: container.current,\n });\n _setRef(stage.current);\n // @ts-ignore\n fiberRef.current = KonvaRenderer.createContainer(stage.current, LegacyRoot, false, null);\n KonvaRenderer.updateContainer(React.createElement(Bridge, {}, props.children), fiberRef.current);\n return () => {\n if (!Konva.isBrowser) {\n return;\n }\n _setRef(null);\n KonvaRenderer.updateContainer(null, fiberRef.current, null);\n stage.current.destroy();\n };\n }, []);\n React.useLayoutEffect(() => {\n _setRef(stage.current);\n applyNodeProps(stage.current, props, oldProps);\n KonvaRenderer.updateContainer(React.createElement(Bridge, {}, props.children), fiberRef.current, null);\n });\n return React.createElement('div', {\n ref: container,\n id: props.id,\n accessKey: props.accessKey,\n className: props.className,\n role: props.role,\n style: props.style,\n tabIndex: props.tabIndex,\n title: props.title,\n });\n};\nexport const Layer = 'Layer';\nexport const FastLayer = 'FastLayer';\nexport const Group = 'Group';\nexport const Label = 'Label';\nexport const Rect = 'Rect';\nexport const Circle = 'Circle';\nexport const Ellipse = 'Ellipse';\nexport const Wedge = 'Wedge';\nexport const Line = 'Line';\nexport const Sprite = 'Sprite';\nexport const Image = 'Image';\nexport const Text = 'Text';\nexport const TextPath = 'TextPath';\nexport const Star = 'Star';\nexport const Ring = 'Ring';\nexport const Arc = 'Arc';\nexport const Tag = 'Tag';\nexport const Path = 'Path';\nexport const RegularPolygon = 'RegularPolygon';\nexport const Arrow = 'Arrow';\nexport const Shape = 'Shape';\nexport const Transformer = 'Transformer';\n// @ts-ignore\nexport const KonvaRenderer = ReactFiberReconciler(HostConfig);\nKonvaRenderer.injectIntoDevTools({\n // @ts-ignore\n findHostInstanceByFiber: () => null,\n bundleType: process.env.NODE_ENV !== 'production' ? 1 : 0,\n version: React.version,\n rendererPackageName: 'react-konva',\n});\nexport const Stage = React.forwardRef((props, ref) => {\n return React.createElement(FiberProvider, {}, React.createElement(StageWrap, { ...props, forwardedRef: ref }));\n});\nexport const useStrictMode = toggleStrictMode;\n","var getDimensionsMinimalRatio=function(a,b,c,d){return Math.min(a/c,b/d)||1};export default getDimensionsMinimalRatio;","export var ROOT_CONTAINER_CLASS_NAME=\"FIE_root\";export var DESIGN_LAYER_ID=\"FIE_design-layer\";export var TRANSFORMERS_LAYER_ID=\"FIE_transformers-layer\";export var IMAGE_NODE_ID=\"FIE_original-image\";export var NODES_TRANSFORMER_ID=\"FIE_nodes-transformer\";export var WATERMARK_ANNOTATION_ID=\"watermark\";export var TRANSLATIONS_GRID_UUID=\"353297d2-40b4-4684-a875-45a2178a8157\";export var DEFAULT_SAVE_QUALITY=.92;export var TABS_IDS={FINETUNE:\"Finetune\",FILTERS:\"Filters\",ADJUST:\"Adjust\",WATERMARK:\"Watermark\",ANNOTATE:\"Annotate\",RESIZE:\"Resize\"};export var TOOLS_IDS={CROP:\"Crop\",ROTATE:\"Rotate\",FLIP_X:\"Flip_X\",FLIP_Y:\"Flip_Y\",BRIGHTNESS:\"Brightness\",CONTRAST:\"Contrast\",HSV:\"HueSaturationValue\",WARMTH:\"Warmth\",BLUR:\"Blur\",THRESHOLD:\"Threshold\",POSTERIZE:\"Posterize\",PIXELATE:\"Pixelate\",NOISE:\"Noise\",FILTERS:\"Filters\",RECT:\"Rect\",ELLIPSE:\"Ellipse\",POLYGON:\"Polygon\",TEXT:\"Text\",LINE:\"Line\",IMAGE:\"Image\",ARROW:\"Arrow\",WATERMARK:\"Watermark\",PEN:\"Pen\",RESIZE:\"Resize\"};export var FLIP_DIRECTIONS={X:\"X\",Y:\"Y\"};export var DEFAULT_ZOOM_FACTOR=1;export var SUPPORTED_IMAGE_TYPES=[\"png\",\"jpeg\",\"jpg\",\"webp\"];export var POSSIBLE_IMAGE_TYPES=[].concat(SUPPORTED_IMAGE_TYPES,[\"svg\",\"gif\",\"avif\",\"apng\"]);export var DEFAULT_IMAGE_TYPE=SUPPORTED_IMAGE_TYPES[0];export var POINTER_ICONS={DEFAULT:\"default\",DRAW:\"crosshair\",SELECT:\"pointer\",MOVE:\"move\",DRAG:\"GRAB\"};export var DEFAULT_ENABLED_ANCHORS=[\"top-left\",\"top-center\",\"top-right\",\"middle-right\",\"middle-left\",\"bottom-left\",\"bottom-center\",\"bottom-right\"];export var ORIGINAL_CROP=\"Crop\";export var CUSTOM_CROP=\"custom\";export var ELLIPSE_CROP=\"ellipse\";export var POSITIONS={TOP_LEFT:\"top-left\",TOP_CENTER:\"top-center\",TOP_RIGHT:\"top-right\",MIDDLE_LEFT:\"middle-left\",MIDDLE_CENTER:\"middle-center\",MIDDLE_RIGHT:\"middle-right\",BOTTOM_LEFT:\"bottom-left\",BOTTOM_CENTER:\"bottom-center\",BOTTOM_RIGHT:\"bottom-right\"};export var MIN_CROP={WIDTH:14,HEIGHT:14};export var CLOSING_REASONS={AFTER_SAVE:\"after-saving\",CLOSE_BUTTON:\"close-button-clicked\",BACK_BUTTON:\"back-button-clicked\"};export var FEEDBACK_STATUSES={WARNING:\"warning\",ERROR:\"error\"};export var EDITOR_TO_CLOUDIMG_POSITIONS={top:\"north\",bottom:\"south\",left:\"west\",center:\"center\",right:\"east\"};export var CLOUDIMG_TO_EDITOR_POSITIONS={northwest:\"top-left\",northcenter:\"top-center\",northeast:\"top-right\",centerwest:\"center-left\",centercenter:\"center-center\",centereast:\"center-right\",southwest:\"bottom-left\",southcenter:\"bottom-center\",southeast:\"bottom-right\"};","import{ELLIPSE_CROP}from\"./constants\";var cropImage=function(a,b){var c=!!(2=a.length?{done:!0}:{done:!1,value:a[d++]}},e:function e(a){throw a},f:e}}throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}var f,g=!0,h=!1;return{s:function s(){c=c.call(a)},n:function n(){var a=c.next();return g=a.done,a},e:function e(a){h=!0,f=a},f:function f(){try{g||null==c[\"return\"]||c[\"return\"]()}finally{if(h)throw f}}}}function _unsupportedIterableToArray(a,b){if(a){if(\"string\"==typeof a)return _arrayLikeToArray(a,b);var c=Object.prototype.toString.call(a).slice(8,-1);return\"Object\"===c&&a.constructor&&(c=a.constructor.name),\"Map\"===c||\"Set\"===c?Array.from(a):\"Arguments\"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?_arrayLikeToArray(a,b):void 0}}function _arrayLikeToArray(a,b){(null==b||b>a.length)&&(b=a.length);for(var c=0,d=Array(b);cc?-1:c,c=~~(255*c),[b[0]+c,b[1]+c,b[2]+c]}},contrast:function contrast(a){return function(b){var c=a;c*=255;var d=259*(c+255)/(255*(259-c));return[d*(b[0]-128)+128,d*(b[1]-128)+128,d*(b[2]-128)+128]}},saturation:function saturation(a){return function(c){var d=a;d=-1>d?-1:d;var e=c[0],f=c[1],g=c[2],b=.2989*e+.587*f+.114*g;return[-b*d+e*(1+d),-b*d+f*(1+d),-b*d+g*(1+d)]}},grayscale:function grayscale(){return function(a){var c=a[0],d=a[1],e=a[2];return[,,,].fill(.2126*c+.7152*d+.0722*e)}},sepia:function sepia(a){return function(c){var d=c[0],e=c[1],f=c[2];return[d*(1-.607*a)+.769*e*a+.189*f*a,.349*d*a+e*(1-.314*a)+.168*f*a,.272*d*a+.534*e*a+f*(1-.869*a)]}},adjustRGB:function adjustRGB(a){return function(b){return[b[0]*a[0],b[1]*a[1],b[2]*a[2]]}},colorFilter:function colorFilter(a){return function(c){var d=c[0],e=c[1],f=c[2],b=a[3];return[d-(d-a[0])*b,e-(e-a[1])*b,f-(f-a[2])*b]}}};export default BaseFilters;","import BaseFilters from\"./BaseFilters\";function BlackAndWhite(a){BaseFilters.apply(a,function(a){var b=(a[0]+a[1]+a[2])/3>100,c=b?255:0;return[c,c,c]})}BlackAndWhite.filterName=\"BlackAndWhite\";export default BlackAndWhite;","import BaseFilters from\"./BaseFilters\";var BRIGHTNESS_CONST=.1,CONTRAST_CONST=.1,SATURATION_CONST=.15;function Clarendon(a){BaseFilters.apply(a,BaseFilters.brightness(BRIGHTNESS_CONST),BaseFilters.contrast(CONTRAST_CONST),BaseFilters.saturation(SATURATION_CONST))}Clarendon.filterName=\"Clarendon\";export default Clarendon;","import BaseFilters from\"./BaseFilters\";var SEPIA_CONST=.04,CONTRAST_CONST=-.15;function Gingham(a){BaseFilters.apply(a,BaseFilters.sepia(SEPIA_CONST),BaseFilters.contrast(CONTRAST_CONST))}Gingham.filterName=\"Gingham\";export default Gingham;","import BaseFilters from\"./BaseFilters\";var BRIGHTNESS_CONST=.1;function Moon(a){BaseFilters.apply(a,BaseFilters.grayscale(),BaseFilters.brightness(BRIGHTNESS_CONST));var b=a.data,c=b.length}Moon.filterName=\"Moon\";export default Moon;","import BaseFilters from\"./BaseFilters\";var BRIGHTNESS_CONST=.08,ADJUST_RGB_CONST=[1,1.03,1.05],SATURATION_CONST=.12;function Lark(a){BaseFilters.apply(a,BaseFilters.brightness(BRIGHTNESS_CONST),BaseFilters.adjustRGB(ADJUST_RGB_CONST),BaseFilters.saturation(SATURATION_CONST))}Lark.filterName=\"Lark\";export default Lark;","import BaseFilters from\"./BaseFilters\";var SEPIA_CONST=.4,BRIGHTNESS_CONST=.13,CONTRAST_CONST=-.05;function Reyes(a){BaseFilters.apply(a,BaseFilters.sepia(SEPIA_CONST),BaseFilters.brightness(BRIGHTNESS_CONST),BaseFilters.contrast(CONTRAST_CONST))}Reyes.filterName=\"Reyes\";export default Reyes;","import BaseFilters from\"./BaseFilters\";var ADJUST_RGB_CONST=[1.01,1.04,1],SATURATION_CONST=.3;function Juno(a){BaseFilters.apply(a,BaseFilters.adjustRGB(ADJUST_RGB_CONST),BaseFilters.saturation(SATURATION_CONST))}Juno.filterName=\"Juno\";export default Juno;","import BaseFilters from\"./BaseFilters\";var BRIGHTNESS_CONST=.1,SATURATION_CONST=-.5;function Slumber(a){BaseFilters.apply(a,BaseFilters.brightness(BRIGHTNESS_CONST),BaseFilters.saturation(SATURATION_CONST))}Slumber.filterName=\"Slumber\";export default Slumber;","import BaseFilters from\"./BaseFilters\";var ADJUST_RGB_CONST=[1.04,1,1.02],SATURATION_CONST=-.05;function Crema(a){BaseFilters.apply(a,BaseFilters.adjustRGB(ADJUST_RGB_CONST),BaseFilters.saturation(SATURATION_CONST))}Crema.filterName=\"Crema\";export default Crema;","import BaseFilters from\"./BaseFilters\";var BRIGHTNESS_CONST=.05,SATURATION_CONST=-.03;function Ludwig(a){BaseFilters.apply(a,BaseFilters.brightness(BRIGHTNESS_CONST),BaseFilters.saturation(SATURATION_CONST))}Ludwig.filterName=\"Ludwig\";export default Ludwig;","import BaseFilters from\"./BaseFilters\";var COLOR_FILTER_CONST=[228,130,225,.13],SATURATION_CONST=-.2;function Aden(a){BaseFilters.apply(a,BaseFilters.colorFilter(COLOR_FILTER_CONST),BaseFilters.saturation(SATURATION_CONST))}Aden.filterName=\"Aden\";export default Aden;","import BaseFilters from\"./BaseFilters\";var ADJUST_RGB_CONST=[1.05,1.1,1];function Perpetua(a){BaseFilters.apply(a,BaseFilters.adjustRGB(ADJUST_RGB_CONST))}Perpetua.filterName=\"Perpetua\";export default Perpetua;","import BaseFilters from\"./BaseFilters\";var SATURATION_CONST=.3,BRIGHTNESS_CONST=.15;function Amaro(a){BaseFilters.apply(a,BaseFilters.saturation(SATURATION_CONST),BaseFilters.brightness(BRIGHTNESS_CONST))}Amaro.filterName=\"Amaro\";export default Amaro;","import BaseFilters from\"./BaseFilters\";var COLOR_FILTER_CONST=[230,115,108,.05],SATURATION_CONST=.15;function Mayfair(a){BaseFilters.apply(a,BaseFilters.colorFilter(COLOR_FILTER_CONST),BaseFilters.saturation(SATURATION_CONST))}Mayfair.filterName=\"Mayfair\";export default Mayfair;","import BaseFilters from\"./BaseFilters\";var COLOR_FILTER_CONST=[255,170,0,.1],BRIGHTNESS_CONST=.09,SATURATION_CONST=.1;function Rise(a){BaseFilters.apply(a,BaseFilters.colorFilter(COLOR_FILTER_CONST),BaseFilters.brightness(BRIGHTNESS_CONST),BaseFilters.saturation(SATURATION_CONST))}Rise.filterName=\"Rise\";export default Rise;","import BaseFilters from\"./BaseFilters\";var ADJUST_RGB_CONST=[1,1,1.25],CONTRAST_CONST=.1,BRIGHTNESS_CONST=.15;function Hudson(a){BaseFilters.apply(a,BaseFilters.adjustRGB(ADJUST_RGB_CONST),BaseFilters.contrast(CONTRAST_CONST),BaseFilters.brightness(BRIGHTNESS_CONST))}Hudson.filterName=\"Hudson\";export default Hudson;","import BaseFilters from\"./BaseFilters\";var COLOR_FILTER_CONST=[255,225,80,.08],SATURATION_CONST=.1,CONTRAST_CONST=.05;function Valencia(a){BaseFilters.apply(a,BaseFilters.colorFilter(COLOR_FILTER_CONST),BaseFilters.saturation(SATURATION_CONST),BaseFilters.contrast(CONTRAST_CONST))}Valencia.filterName=\"Valencia\";export default Valencia;","import BaseFilters from\"./BaseFilters\";var COLOR_FILTER_CONST=[255,255,0,.07],SATURATION_CONST=.2,CONTRAST_CONST=.15;function XPro2(a){BaseFilters.apply(a,BaseFilters.colorFilter(COLOR_FILTER_CONST),BaseFilters.saturation(SATURATION_CONST),BaseFilters.contrast(CONTRAST_CONST))}XPro2.filterName=\"XPro2\";export default XPro2;","import BaseFilters from\"./BaseFilters\";var CONTRAST_CONST=-.15,SATURATION_CONST=.1;function Sierra(a){BaseFilters.apply(a,BaseFilters.contrast(CONTRAST_CONST),BaseFilters.saturation(SATURATION_CONST))}Sierra.filterName=\"Sierra\";export default Sierra;","import BaseFilters from\"./BaseFilters\";var COLOR_FILTER_CONST=[100,28,210,.03],BRIGHTNESS_CONST=.1;function Willow(a){BaseFilters.apply(a,BaseFilters.grayscale(),BaseFilters.colorFilter(COLOR_FILTER_CONST),BaseFilters.brightness(BRIGHTNESS_CONST))}Willow.filterName=\"Willow\";export default Willow;","import BaseFilters from\"./BaseFilters\";var CONTRAST_CONST=.15,SATURATION_CONST=.2;function LoFi(a){BaseFilters.apply(a,BaseFilters.contrast(CONTRAST_CONST),BaseFilters.saturation(SATURATION_CONST))}LoFi.filterName=\"LoFi\";export default LoFi;","import BaseFilters from\"./BaseFilters\";var CONTRAST_CONST=.1,SATURATION_CONST=.15;function Hefe(a){BaseFilters.apply(a,BaseFilters.contrast(CONTRAST_CONST),BaseFilters.saturation(SATURATION_CONST))}Hefe.filterName=\"Hefe\";export default Hefe;","import BaseFilters from\"./BaseFilters\";var COLOR_FILTER_CONST=[220,115,188,.12],CONTRAST_CONST=-.05;function Nashville(a){BaseFilters.apply(a,BaseFilters.colorFilter(COLOR_FILTER_CONST),BaseFilters.contrast(CONTRAST_CONST))}Nashville.filterName=\"Nashville\";export default Nashville;","import BaseFilters from\"./BaseFilters\";var BRIGHTNESS_CONST=.1,SEPIA_CONST=.3;function Stinson(a){BaseFilters.apply(a,BaseFilters.brightness(BRIGHTNESS_CONST),BaseFilters.sepia(SEPIA_CONST))}Stinson.filterName=\"Stinson\";export default Stinson;","import BaseFilters from\"./BaseFilters\";var COLOR_FILTER_CONST=[255,225,0,.05],BRIGHTNESS_CONST=.06,CONTRAST_CONST=.06;function Vesper(a){BaseFilters.apply(a,BaseFilters.colorFilter(COLOR_FILTER_CONST),BaseFilters.brightness(BRIGHTNESS_CONST),BaseFilters.contrast(CONTRAST_CONST))}Vesper.filterName=\"Vesper\";export default Vesper;","import BaseFilters from\"./BaseFilters\";var COLOR_FILTER_CONST=[255,165,40,.2];function Earlybird(a){BaseFilters.apply(a,BaseFilters.colorFilter(COLOR_FILTER_CONST))}Earlybird.filterName=\"Earlybird\";export default Earlybird;","import BaseFilters from\"./BaseFilters\";var CONTRAST_CONST=.2,COLOR_FILTER_CONST=[140,10,185,.1];function Brannan(a){BaseFilters.apply(a,BaseFilters.contrast(CONTRAST_CONST),BaseFilters.colorFilter(COLOR_FILTER_CONST))}Brannan.filterName=\"Brannan\";export default Brannan;","import BaseFilters from\"./BaseFilters\";var BRIGHTNESS_CONST=-.1,SATURATION_CONST=-.1;function Sutro(a){BaseFilters.apply(a,BaseFilters.brightness(BRIGHTNESS_CONST),BaseFilters.saturation(SATURATION_CONST))}Sutro.filterName=\"Sutro\";export default Sutro;","import BaseFilters from\"./BaseFilters\";var SEPIA_CONST=.1,COLOR_FILTER_CONST=[255,145,0,.2];function Toaster(a){BaseFilters.apply(a,BaseFilters.sepia(SEPIA_CONST),BaseFilters.colorFilter(COLOR_FILTER_CONST))}Toaster.filterName=\"Toaster\";export default Toaster;","import BaseFilters from\"./BaseFilters\";var BRIGHTNESS_CONST=.1,COLOR_FILTER_CONST=[255,255,0,.2];function Walden(a){BaseFilters.apply(a,BaseFilters.brightness(BRIGHTNESS_CONST),BaseFilters.colorFilter(COLOR_FILTER_CONST))}Walden.filterName=\"Walden\";export default Walden;","import BaseFilters from\"./BaseFilters\";var COLOR_FILTER_CONST=[255,25,0,.15],BRIGHTNESS_CONST=.1;function NinteenSeventySeven(a){BaseFilters.apply(a,BaseFilters.colorFilter(COLOR_FILTER_CONST),BaseFilters.brightness(BRIGHTNESS_CONST))}NinteenSeventySeven.filterName=\"NinteenSeventySeven\";export default NinteenSeventySeven;","import BaseFilters from\"./BaseFilters\";var COLOR_FILTER_CONST=[255,140,0,.1],ADJUST_RGB_CONST=[1.15,1.05,1],SATURATION_CONST=.35;function Kelvin(a){BaseFilters.apply(a,BaseFilters.colorFilter(COLOR_FILTER_CONST),BaseFilters.adjustRGB(ADJUST_RGB_CONST),BaseFilters.saturation(SATURATION_CONST))}Kelvin.filterName=\"Kelvin\";export default Kelvin;","import BaseFilters from\"./BaseFilters\";var COLOR_FILTER_CONST=[225,240,0,.1],SATURATION_CONST=.25,CONTRAST_CONST=.05;function Maven(a){BaseFilters.apply(a,BaseFilters.colorFilter(COLOR_FILTER_CONST),BaseFilters.saturation(SATURATION_CONST),BaseFilters.contrast(CONTRAST_CONST))}Maven.filterName=\"Maven\";export default Maven;","import BaseFilters from\"./BaseFilters\";var SEPIA_CONST=.06,BRIGHTNESS_CONST=.1;function Ginza(a){BaseFilters.apply(a,BaseFilters.sepia(SEPIA_CONST),BaseFilters.brightness(BRIGHTNESS_CONST))}Ginza.filterName=\"Ginza\";export default Ginza;","import BaseFilters from\"./BaseFilters\";var SATURATION_CONST=.35,BRIGHTNESS_CONST=.1;function Skyline(a){BaseFilters.apply(a,BaseFilters.saturation(SATURATION_CONST),BaseFilters.brightness(BRIGHTNESS_CONST))}Skyline.filterName=\"Skyline\";export default Skyline;","import BaseFilters from\"./BaseFilters\";var CONTRAST_CONST=.15,BRIGHTNESS_CONST=.1;function Dogpatch(a){BaseFilters.apply(a,BaseFilters.contrast(CONTRAST_CONST),BaseFilters.brightness(BRIGHTNESS_CONST))}Dogpatch.filterName=\"Dogpatch\";export default Dogpatch;","import BaseFilters from\"./BaseFilters\";var COLOR_FILTER_CONST=[25,240,252,.05],SEPIA_CONST=.3;function Brooklyn(a){BaseFilters.apply(a,BaseFilters.colorFilter(COLOR_FILTER_CONST),BaseFilters.sepia(SEPIA_CONST))}Brooklyn.filterName=\"Brooklyn\";export default Brooklyn;","import BaseFilters from\"./BaseFilters\";var COLOR_FILTER_CONST=[208,208,86,.2],CONTRAST_CONST=.15;function Helena(a){BaseFilters.apply(a,BaseFilters.colorFilter(COLOR_FILTER_CONST),BaseFilters.contrast(CONTRAST_CONST))}Helena.filterName=\"Helena\";export default Helena;","import BaseFilters from\"./BaseFilters\";var COLOR_FILTER_CONST=[255,160,25,.1],BRIGHTNESS_CONST=.1;function Ashby(a){BaseFilters.apply(a,BaseFilters.colorFilter(COLOR_FILTER_CONST),BaseFilters.brightness(BRIGHTNESS_CONST))}Ashby.filterName=\"Ashby\";export default Ashby;","import BaseFilters from\"./BaseFilters\";var COLOR_FILTER_CONST=[255,50,80,.12],CONTRAST_CONST=.05;function Charmes(a){BaseFilters.apply(a,BaseFilters.colorFilter(COLOR_FILTER_CONST),BaseFilters.contrast(CONTRAST_CONST))}Charmes.filterName=\"Charmes\";export default Charmes;","import Konva from\"konva\";import*as CustomFilters from\"../custom/filters\";var filterStrToClass=function(a){return a?CustomFilters[a]||Konva.Filters[a]:null};export default filterStrToClass;","import Konva from\"konva\";import{Factory as KonvaFactory}from\"konva/lib/Factory\";import{getNumberValidator as konvaGetNumberValidator}from\"konva/lib/Validators\";function Warmth(a){for(var b=this.warmth(),c=a.data,d=c.length,e=0;e=b?255:0,c[e+1]=c[e+1]>=b?255:0,c[e+2]=c[e+2]>=b?255:0)}CustomThreshold.finetuneName=\"CustomThreshold\";export default CustomThreshold;KonvaFactory.addGetterSetter(Konva.Image,\"threshold\",0,konvaGetNumberValidator,KonvaFactory.afterSetFilter);","import Konva from\"konva\";import*as CustomFinetunes from\"../custom/finetunes\";var finetunesStrsToClasses=function(a){return Array.isArray(a)&&0d.status)b(d.response);else{var a;console.warn(\"Error in sending translation key to backend \".concat(null===(a=d.response)||void 0===a?void 0:a.hint,\", \").concat(d.status)),c()}},d.onerror=function(){var a;console.warn(\"Error in sending translation key to backend \".concat(null===(a=d.response)||void 0===a?void 0:a.hint,\", \").concat(d.status)),c()};d.open(\"POST\",\"https://neo.wordplex.io/api/import/request-translations?grid_uuid=\".concat(TRANSLATIONS_GRID_UUID)),d.send(JSON.stringify({grid_uuid:TRANSLATIONS_GRID_UUID,translations_requests:a}))})};export var getBackendTranslations=function(){var a=0f.status){(f.response||[]).forEach(function(a){backendTranslations[e]=_objectSpread(_objectSpread({},backendTranslations[e]),{},_defineProperty({},a.translation_key,a.translations[e]))});var a=[];Object.keys(defaultTranslations).forEach(function(b){var c;b&&!(null!==(c=backendTranslations[e])&&void 0!==c&&c[b])&&a.push({key:b,lang:e,default:defaultTranslations[b]})}),0d,l=0>e;switch(b){case TOOLS_IDS.RECT:c?(h.width=Math.sqrt(i*i+j*j),h.height=h.width,h.x-=k?h.width-i:0,h.y-=l?h.height-j:0):(h.width=i,h.height=j);break;case TOOLS_IDS.ELLIPSE:c?(h.radiusX=Math.sqrt(i*i+j*j)/2,h.radiusY=h.radiusX,h.x-=k?2*h.radiusX-i:0,h.y-=l?2*h.radiusY-j:0):(h.radiusX=i/2,h.radiusY=j/2),h.offsetX=-h.radiusX,h.offsetY=-h.radiusY;break;case TOOLS_IDS.POLYGON:h.radius=(i+j)/2,h.x-=k?2*h.radius-i:0,h.y-=l?2*h.radius-j:0,h.offsetX=-h.radius,h.offsetY=-h.radius;break;case TOOLS_IDS.LINE:case TOOLS_IDS.ARROW:h.x=f,h.y=g,h.points=[0,0],c?h.points.push(i>=j?d:0,j>i?e:0):h.points=[0,0,d,e];break;default:h.width=i,h.height=j}return h};export default getNewAnnotationPreview;","import _objectWithoutProperties from\"@babel/runtime/helpers/objectWithoutProperties\";import _defineProperty from\"@babel/runtime/helpers/defineProperty\";var _excluded=[\"id\",\"x\",\"y\",\"points\"],_excluded2=[\"startedX\",\"startedY\",\"offsetX\",\"offsetY\",\"width\",\"height\"];function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c=MIN_PIXELS&&latestAnnotationProps.height>=MIN_PIXELS||latestAnnotationProps.radiusX>=MIN_PIXELS&&latestAnnotationProps.radiusY>=MIN_PIXELS||null!==(c=latestAnnotationProps.points)&&void 0!==c&&c[2]||null!==(e=latestAnnotationProps.points)&&void 0!==e&&e[3]||latestAnnotationProps.radius>=MIN_PIXELS)){var f=latestAnnotationProps,g=f.startedX,h=f.startedY,i=f.offsetX,o=f.offsetY,p=f.width,q=f.height,r=_objectWithoutProperties(f,_excluded2);NO_WIDTH_HEIGHT_ANNOTATIONS.includes(b.name)||(r.width=p,r.height=q),d(r,!0)}shownAnnotationPreview=null,textAnnotationWrappedRect=null,latestAnnotationProps=null,a.setAttrs({isDrawing:!1}),a.off(\"mousemove touchmove\",l),a.off(\"mouseleave touchcancel\",m),document.removeEventListener(\"mouseup\",n,eventsOptions),document.removeEventListener(\"touchend\",n,eventsOptions),document.removeEventListener(\"mouseleave\",n,eventsOptions),document.removeEventListener(\"touchcancel\",n,eventsOptions),document.removeEventListener(\"mousemove\",j,eventsOptions),document.removeEventListener(\"touchmove\",j,eventsOptions),pointerDown.isOutOfCanvas=!1},o=function handlePointerDown(b){var d;if(b.evt.preventDefault(),!(b.target.attrs.draggable||1<(null===(d=b.evt.touches)||void 0===d?void 0:d.length))){k();var e=getPointerOffsetPositionBoundedToObject(c,f());pointerDown.startedX=e.offsetX,pointerDown.startedY=e.offsetY,pointerDown.isOutOfCanvas=!1,a.on(\"mousemove touchmove\",l),a.on(\"mouseleave touchcancel\",m),document.addEventListener(\"mouseup\",n,eventsOptions),document.addEventListener(\"touchend\",n,eventsOptions),document.addEventListener(\"mouseleave\",n,eventsOptions),document.addEventListener(\"touchcancel\",n,eventsOptions)}};return a.on(\"mousedown touchstart\",o),function(){k(),a.off(\"mousedown touchstart\",o)}};export default previewThenCallAnnotationAdding;","import{useCallback}from\"react\";import debounce from\"../utils/debounce\";var useDebouncedCallback=function(a,b){var c=2=e?0:function getTopOffset(){return 0>e&&-90=e&&-90<=e?0:function getLeftOffset(){return 90>>32-b},cvtHex=function(a){var b,c,d=\"\";for(b=7;0<=b;b--)c=15&a>>>4*b,d+=c.toString(16);return d},Utf8Encode=function(a){for(var b,d=a.replace(/\\r\\n/g,\"\\n\"),e=\"\",f=0;fb?e+=String.fromCharCode(b):127b?(e+=String.fromCharCode(192|b>>6),e+=String.fromCharCode(128|63&b)):(e+=String.fromCharCode(224|b>>12),e+=String.fromCharCode(128|63&b>>6),e+=String.fromCharCode(128|63&b));return e},sha1=function(a){var b,c,d,e,f,g,h,k,l,m=a,n=Array(80),o=1732584193,p=4023233417,q=2562383102,r=271733878,s=3285377520;m=Utf8Encode(m);var t=m.length,u=[];for(c=0;c>>29),u.push(4294967295&t<<3),b=0;bc;c++)n[c]=u[b+c];for(c=16;79>=c;c++)n[c]=rotateLeft(n[c-3]^n[c-8]^n[c-14]^n[c-16],1);for(e=o,f=p,g=q,h=r,k=s,c=0;19>=c;c++)l=4294967295&rotateLeft(e,5)+(f&g|~f&h)+k+n[c]+1518500249,k=h,h=g,g=rotateLeft(f,30),f=e,e=l;for(c=20;39>=c;c++)l=4294967295&rotateLeft(e,5)+(f^g^h)+k+n[c]+1859775393,k=h,h=g,g=rotateLeft(f,30),f=e,e=l;for(c=40;59>=c;c++)l=4294967295&rotateLeft(e,5)+(f&g|f&h|g&h)+k+n[c]+2400959708,k=h,h=g,g=rotateLeft(f,30),f=e,e=l;for(c=60;79>=c;c++)l=4294967295&rotateLeft(e,5)+(f^g^h)+k+n[c]+3395469782,k=h,h=g,g=rotateLeft(f,30),f=e,e=l;o=4294967295&o+e,p=4294967295&p+f,q=4294967295&q+g,r=4294967295&r+h,s=4294967295&s+k}return l=cvtHex(o)+cvtHex(p)+cvtHex(q)+cvtHex(r)+cvtHex(s),l.toLowerCase()};export default sha1;","import _slicedToArray from\"@babel/runtime/helpers/slicedToArray\";import sha1 from\"./sha1\";var encodeBase64=function(a){return btoa(a).replace(/=*$/g,\"\")},getSha1=function(a,b){return sha1(a).slice(0,b)},getSealingParams=function(a,b,c,d){var e=encodeBase64(a),f=getSha1(b+e+c,d);return[f?\"ci_seal=\".concat(f):\"\",e?\"ci_eqs=\".concat(e):\"\"].filter(function(a){return a}).join(\"&\")},getImageSealingParams=function(a,b,c){var d=b||{},e=d.salt,f=d.charCount,g=d.includeParams,h=void 0===g?[]:g,i=!h||0===(null===h||void 0===h?void 0:h.length),j=\"\",k=\"\",l=[],m=[];return a.split(\"&\").forEach(function(a){var b=a.split(\"=\"),c=_slicedToArray(b,1),d=c[0];-1<(null===h||void 0===h?void 0:h.indexOf(d))||i?l.push(a):m.push(a)}),0 input{border:0px;clip:rect(0px,0px,0px,0px);height:100%;margin:-1px;overflow:hidden;padding:0px;position:absolute;white-space:nowrap;width:100%;direction:ltr;}&::before{position:absolute;content:'';border-radius:inherit;width:100%;height:100%;box-shadow:0px 3px 1px -2px rgb(0 0 0 / 20%),0px 2px 2px 0px rgb(0 0 0 / 14%),0px 1px 5px 0px rgb(0 0 0 / 12%);}&::after{position:absolute;content:'';border-radius:50%;width:42px;height:42px;top:50%;left:50%;transform:translate(-50%,-50%);}\"]);\nvar LabelTooltip = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'label')\n}).withConfig({\n componentId: \"sc-jjink6-4\"\n})(function (_ref2) {\n var theme = _ref2.theme,\n _ref2$open = _ref2.open,\n open = _ref2$open === void 0 ? false : _ref2$open,\n _ref2$disabled = _ref2.disabled,\n disabled = _ref2$disabled === void 0 ? false : _ref2$disabled;\n return css([\"display:flex;align-items:center;justify-content:center;padding:6px 6px;border-radius:2px;position:absolute;top:-10px;font-size:10px;z-index:1;white-space:nowrap;transition:transform 150ms cubic-bezier(0.4,0,0.2,1) 0ms;transform-origin:bottom center;transform:\", \";background-color:\", \";color:#fff;cursor:pointer;transition:all 100ms ease-out;&::before{position:absolute;content:'';background-color:inherit;width:8px;height:8px;bottom:0px;left:50%;transform:translate(-50%,50%) rotate(45deg);}\"], open ? 'translateY(-100%) scale(1)' : 'translateY(-100%) scale(0)', disabled ? theme.palette[PC.AccentPrimaryDisabled] : theme.palette[PC.LinkStateless]);\n});\nvar SliderAnnotation = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'annotation')\n}).withConfig({\n componentId: \"sc-jjink6-5\"\n})(function (_ref3) {\n var theme = _ref3.theme;\n return css([\"display:flex;justify-content:space-between;margin-top:12px;color:\", \";\"], theme.palette[PC.TextSecondary]);\n});\nvar Styled = applyDisplayNames({\n Slider: Slider,\n Rail: Rail,\n Track: Track,\n Thumb: Thumb,\n SliderAnnotation: SliderAnnotation,\n LabelTooltip: LabelTooltip\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _slicedToArray from \"@babel/runtime/helpers/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"defaultValue\", \"disabled\", \"disableSwap\", \"hideTrack\", \"hideAnnotation\", \"value\", \"min\", \"max\", \"onChange\", \"onMouseDown\", \"onMouseUp\", \"step\", \"labelTooltip\", \"annotation\", \"components\", \"componentsProps\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n/* eslint-disable no-use-before-define */\n\nimport React, { useEffect, useRef, useState, useCallback } from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent, objectValues, asc, valueToPercent, percentToValue, roundValueToStep, setValueIndex, findClosest, ownerDocument, clamp, trackFinger, focusThumb, axisProps, useForkRef } from '../../utils/functions';\nimport useControlled from '../../hooks/use-controlled';\nimport useEventCallback from '../../hooks/use-event-callback';\nimport { LabelTooltip } from './types';\nimport Styled from './slider.styles';\nvar INTENTIONAL_DRAG_COUNT_THRESHOLD = 2;\nvar dataIndex = 'data-index';\nvar Slider = intrinsicComponent(function (_ref,\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nref) {\n var defaultValue = _ref.defaultValue,\n _ref$disabled = _ref.disabled,\n disabled = _ref$disabled === void 0 ? false : _ref$disabled,\n _ref$disableSwap = _ref.disableSwap,\n disableSwap = _ref$disableSwap === void 0 ? false : _ref$disableSwap,\n _ref$hideTrack = _ref.hideTrack,\n hideTrack = _ref$hideTrack === void 0 ? false : _ref$hideTrack,\n _ref$hideAnnotation = _ref.hideAnnotation,\n hideAnnotation = _ref$hideAnnotation === void 0 ? false : _ref$hideAnnotation,\n valueProp = _ref.value,\n _ref$min = _ref.min,\n min = _ref$min === void 0 ? 0 : _ref$min,\n _ref$max = _ref.max,\n max = _ref$max === void 0 ? 100 : _ref$max,\n onChange = _ref.onChange,\n onMouseDown = _ref.onMouseDown,\n onMouseUp = _ref.onMouseUp,\n _ref$step = _ref.step,\n step = _ref$step === void 0 ? 1 : _ref$step,\n _ref$labelTooltip = _ref.labelTooltip,\n labelTooltip = _ref$labelTooltip === void 0 ? LabelTooltip.Off : _ref$labelTooltip,\n _ref$annotation = _ref.annotation,\n annotation = _ref$annotation === void 0 ? '' : _ref$annotation,\n _ref$components = _ref.components,\n components = _ref$components === void 0 ? {} : _ref$components,\n _ref$componentsProps = _ref.componentsProps,\n componentsProps = _ref$componentsProps === void 0 ? {} : _ref$componentsProps,\n rest = _objectWithoutProperties(_ref, _excluded);\n var _useState = useState(-1),\n _useState2 = _slicedToArray(_useState, 2),\n active = _useState2[0],\n setActive = _useState2[1];\n var _useState3 = useState(-1),\n _useState4 = _slicedToArray(_useState3, 2),\n open = _useState4[0],\n setOpen = _useState4[1];\n var _useState5 = useState(false),\n _useState6 = _slicedToArray(_useState5, 2),\n dragging = _useState6[0],\n setDragging = _useState6[1];\n var moveCount = useRef(0);\n var previousIndex = useRef(0);\n var touchId = useRef();\n var sliderRef = useRef(null);\n var handleRef = useForkRef(ref, sliderRef);\n var _useControlled = useControlled({\n controlled: valueProp,\n \"default\": defaultValue !== null && defaultValue !== void 0 ? defaultValue : min\n }),\n _useControlled2 = _slicedToArray(_useControlled, 2),\n valueDerived = _useControlled2[0],\n setValueState = _useControlled2[1];\n var axis = 'horizontal';\n var range = Array.isArray(valueDerived);\n var values = range ? valueDerived.slice().sort(asc) : [valueDerived];\n var getFingerNewValue = function getFingerNewValue(_ref2) {\n var finger = _ref2.finger,\n _ref2$move = _ref2.move,\n move = _ref2$move === void 0 ? false : _ref2$move,\n values2 = _ref2.values;\n var slider = sliderRef.current;\n if (slider) {\n var _slider$getBoundingCl = slider.getBoundingClientRect(),\n width = _slider$getBoundingCl.width,\n height = _slider$getBoundingCl.height,\n bottom = _slider$getBoundingCl.bottom,\n left = _slider$getBoundingCl.left;\n var percent;\n if (axis.indexOf('vertical') === 0) {\n percent = (bottom - finger.y) / height;\n } else {\n percent = (finger.x - left) / width;\n }\n if (axis.includes('-reverse')) {\n percent = 1 - percent;\n }\n var newValue;\n newValue = percentToValue(percent, min, max);\n if (step) {\n newValue = roundValueToStep(newValue, step, min);\n }\n newValue = clamp(newValue, min, max);\n var activeIndex = 0;\n if (range) {\n if (!move) {\n activeIndex = findClosest(values2, newValue);\n } else {\n activeIndex = previousIndex.current;\n }\n if (disableSwap) {\n newValue = clamp(newValue, values2[activeIndex - 1] || -Infinity, values2[activeIndex + 1] || Infinity);\n }\n var previousValue = newValue;\n newValue = setValueIndex({\n values: values2,\n newValue: newValue,\n index: activeIndex\n });\n if (!(disableSwap && move) && Array.isArray(newValue)) {\n activeIndex = newValue.indexOf(previousValue);\n previousIndex.current = activeIndex;\n }\n }\n return {\n newValue: newValue,\n activeIndex: activeIndex\n };\n }\n return null;\n };\n var handleChange = function handleChange(event, value, thumbIndex) {\n if (onChange) {\n onChange(event, value, thumbIndex);\n }\n };\n var handleHiddenInputChange = function handleHiddenInputChange(event) {\n var index = Number(event.currentTarget.getAttribute(dataIndex));\n var newValue = event.target.valueAsNumber;\n if (range) {\n if (disableSwap) {\n newValue = clamp(newValue, values[index - 1] || -Infinity, values[index + 1] || Infinity);\n }\n var previousValue = newValue;\n newValue = setValueIndex({\n values: values,\n newValue: newValue,\n index: index\n });\n var activeIndex = index;\n if (!disableSwap) {\n activeIndex = newValue.indexOf(previousValue);\n }\n focusThumb({\n sliderRef: sliderRef,\n activeIndex: activeIndex\n });\n }\n setValueState(newValue);\n handleChange(event, newValue, index);\n if (onMouseUp) {\n onMouseUp(event);\n }\n };\n var handleTouchMove = useEventCallback(function (nativeEvent) {\n var finger = trackFinger(nativeEvent, touchId);\n if (!finger) {\n return;\n }\n moveCount.current += 1;\n if (nativeEvent.type === 'mousemove' && nativeEvent.buttons === 0) {\n handleTouchEnd(nativeEvent);\n return;\n }\n var _ref3 = getFingerNewValue({\n finger: finger,\n move: true,\n values: values\n }),\n newValue = _ref3.newValue,\n activeIndex = _ref3.activeIndex;\n focusThumb({\n sliderRef: sliderRef,\n activeIndex: activeIndex,\n setActive: setActive\n });\n setValueState(newValue);\n if (!dragging && moveCount.current > INTENTIONAL_DRAG_COUNT_THRESHOLD) {\n setDragging(true);\n }\n handleChange(nativeEvent, newValue, activeIndex);\n });\n var handleTouchEnd = useEventCallback(function (nativeEvent) {\n var finger = trackFinger(nativeEvent, touchId);\n setDragging(false);\n if (!finger) {\n return;\n }\n setActive(-1);\n if (nativeEvent.type === 'touchend') {\n setOpen(-1);\n }\n if (onMouseUp) {\n onMouseUp(nativeEvent);\n }\n touchId.current = undefined;\n stopListening();\n });\n var handleTouchStart = useEventCallback(function (nativeEvent) {\n var touch = nativeEvent.changedTouches[0];\n if (touch != null) {\n touchId.current = touch.identifier;\n }\n var finger = trackFinger(nativeEvent, touchId);\n var _ref4 = getFingerNewValue({\n finger: finger,\n values: values\n }),\n newValue = _ref4.newValue,\n activeIndex = _ref4.activeIndex;\n focusThumb({\n sliderRef: sliderRef,\n activeIndex: activeIndex,\n setActive: setActive\n });\n setValueState(newValue);\n handleChange(nativeEvent, newValue, activeIndex);\n moveCount.current = 0;\n var doc = ownerDocument(sliderRef.current);\n doc.addEventListener('touchmove', handleTouchMove);\n doc.addEventListener('touchend', handleTouchEnd);\n });\n var handleMouseOver = useEventCallback(function (event) {\n var index = Number(event.currentTarget.getAttribute(dataIndex));\n setOpen(index);\n });\n var handleMouseLeave = useEventCallback(function () {\n setOpen(-1);\n });\n var handleMouseDown = useEventCallback(function (event) {\n if (!disabled) {\n if (onMouseDown) {\n onMouseDown(event);\n }\n if (event.button !== 0) {\n return;\n }\n\n // Avoid text selection\n event.preventDefault();\n var finger = trackFinger(event, touchId);\n var _ref5 = getFingerNewValue({\n finger: finger,\n values: values\n }),\n newValue = _ref5.newValue,\n activeIndex = _ref5.activeIndex;\n focusThumb({\n sliderRef: sliderRef,\n activeIndex: activeIndex,\n setActive: setActive\n });\n setValueState(newValue);\n handleChange(event, newValue, activeIndex);\n moveCount.current = 0;\n var doc = ownerDocument(sliderRef.current);\n doc.addEventListener('mousemove', handleTouchMove);\n doc.addEventListener('mouseup', handleTouchEnd);\n } else {\n // Avoid text selection\n event.preventDefault();\n }\n });\n var stopListening = useCallback(function () {\n var doc = ownerDocument(sliderRef.current);\n doc.removeEventListener('mousemove', handleTouchMove);\n doc.removeEventListener('mouseup', handleTouchEnd);\n doc.removeEventListener('touchmove', handleTouchMove);\n doc.removeEventListener('touchend', handleTouchEnd);\n }, [handleTouchEnd, handleTouchMove]);\n useEffect(function () {\n var slider = sliderRef.current;\n if (slider) {\n return function () {\n stopListening();\n };\n }\n }, [stopListening, handleTouchStart]);\n useEffect(function () {\n if (disabled) {\n stopListening();\n }\n }, [disabled, stopListening]);\n if (disabled && active !== -1) {\n setActive(-1);\n }\n var trackOffset = valueToPercent(range ? values[0] : min, min, max);\n var trackLeap = valueToPercent(values[values.length - 1], min, max) - trackOffset;\n var trackStyle = _objectSpread(_objectSpread({}, axisProps[axis].offset(trackOffset)), axisProps[axis].leap(trackLeap));\n var railProps = componentsProps.rail;\n var Rail = typeof components.Rail === 'function' ? /*#__PURE__*/React.createElement(components.Rail, _extends({}, railProps, {\n style: _objectSpread({}, railProps === null || railProps === void 0 ? void 0 : railProps.style)\n })) : /*#__PURE__*/React.createElement(Styled.Rail, _extends({}, railProps, {\n style: _objectSpread({}, railProps === null || railProps === void 0 ? void 0 : railProps.style)\n }));\n var trackProps = componentsProps.track;\n var Track = !hideTrack && (typeof components.Track === 'function' ? /*#__PURE__*/React.createElement(components.Track, _extends({}, trackProps, {\n style: _objectSpread(_objectSpread({}, trackStyle), trackProps === null || trackProps === void 0 ? void 0 : trackProps.style)\n })) : /*#__PURE__*/React.createElement(Styled.Track, _extends({}, trackProps, {\n style: _objectSpread(_objectSpread({}, trackStyle), trackProps === null || trackProps === void 0 ? void 0 : trackProps.style)\n })));\n var thumbProps = componentsProps.thumb;\n var Thumb = components.Thumb || Styled.Thumb;\n var LabelTooltipComponent = components.LabelTooltip || Styled.LabelTooltip;\n var labelTooltipProps = componentsProps.labelTooltip;\n var annotationText = annotation ? \" \".concat(annotation) : '';\n return /*#__PURE__*/React.createElement(Styled.Slider, _extends({\n ref: handleRef,\n disabled: disabled,\n onTouchStart: handleTouchStart,\n onMouseDown: handleMouseDown\n }, rest), Rail, Track, values.map(function (value, index) {\n var percent = valueToPercent(value, min, max);\n var style = axisProps[axis].offset(percent);\n return /*#__PURE__*/React.createElement(React.Fragment, {\n key: index\n }, /*#__PURE__*/React.createElement(Thumb, _extends({\n \"data-index\": index,\n onMouseOver: handleMouseOver,\n onMouseLeave: handleMouseLeave\n }, thumbProps, {\n style: _objectSpread(_objectSpread({}, style), {}, {\n pointerEvents: disableSwap && active !== index ? 'none' : undefined\n }, thumbProps === null || thumbProps === void 0 ? void 0 : thumbProps.style)\n }), /*#__PURE__*/React.createElement(\"input\", {\n \"data-index\": index,\n type: \"range\",\n min: min,\n max: max,\n value: values[index],\n step: step,\n disabled: disabled,\n onChange: handleHiddenInputChange\n }), /*#__PURE__*/React.createElement(LabelTooltipComponent, {\n open: (open === index || active === index || labelTooltip === 'on') && labelTooltip !== 'off',\n disabled: disabled,\n style: _objectSpread({}, labelTooltipProps === null || labelTooltipProps === void 0 ? void 0 : labelTooltipProps.style)\n }, values[index], annotationText)));\n }), !hideAnnotation && /*#__PURE__*/React.createElement(Styled.SliderAnnotation, null, /*#__PURE__*/React.createElement(\"span\", null, min, annotationText), /*#__PURE__*/React.createElement(\"span\", null, max, annotationText)));\n});\nSlider.defaultProps = {\n annotation: 'MB',\n min: 0,\n max: 100,\n step: 1,\n labelTooltip: LabelTooltip.Off\n};\nSlider.propTypes = {\n defaultValue: PT.oneOfType([PT.array, PT.number]),\n value: PT.oneOfType([PT.array, PT.number]),\n min: PT.number,\n max: PT.number,\n onChange: PT.func,\n onMouseDown: PT.func,\n onMouseUp: PT.func,\n step: PT.number,\n annotation: PT.string,\n disabled: PT.bool,\n disableSwap: PT.bool,\n hideTrack: PT.bool,\n hideAnnotation: PT.bool,\n labelTooltip: PT.oneOf(objectValues(LabelTooltip)),\n components: PT.shape({\n Rail: PT.elementType,\n Track: PT.elementType,\n Thumb: PT.elementType,\n LabelTooltip: PT.elementType\n }),\n componentsProps: PT.object\n};\nexport default Slider;","import styled from\"styled-components\";import Slider from\"@scaleflex/ui/core/slider\";import{Color as PC}from\"@scaleflex/ui/utils/types/palette\";var StyledSlider=styled(Slider).withConfig({componentId:\"sc-1wort0h-0\"})([\"width:\",\";max-width:\",\";user-select:none;padding:0;margin-bottom:\",\";.SfxSlider-annotation{display:none;}.SfxSlider-thumb{background-color:\",\";}.SfxSlider-Track{height:2px;color:\",\";}.SfxSlider-rail{height:2px;background-color:\",\";}\"],function(a){var b=a.width;return b||\"104px\"},function(a){var b=a.width;return b||\"104px\"},function(a){var b=a.noMargin;return b?\"\":\"16px\"},function(a){var b=a.theme.palette;return b[PC.AccentStateless]},function(a){var b=a.theme.palette;return b[PC.AccentStateless]},function(a){var b=a.theme.palette;return b[PC.BordersItem]});export{StyledSlider};","import _extends from\"@babel/runtime/helpers/extends\";import _objectWithoutProperties from\"@babel/runtime/helpers/objectWithoutProperties\";var _excluded=[\"onChange\"];import React from\"react\";import{StyledSlider}from\"./Slider.styled\";var Slider=function(a){var b=a.onChange,c=_objectWithoutProperties(a,_excluded);return React.createElement(StyledSlider,_extends({annotation:\"\",onChange:function onChange(a,c){return b?b(c):void 0}},c))};export default Slider;","import PT from 'prop-types';\nexport var iconPropTypes = {\n size: PT.number,\n width: PT.oneOfType([PT.string, PT.number]),\n height: PT.oneOfType([PT.string, PT.number]),\n color: PT.string,\n color2: PT.string,\n stroke: PT.string,\n stroke2: PT.string,\n viewBox: PT.string\n};","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var ArrowBottom = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 11 12\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M10.8468 3.13984C11.0457 3.33138 11.0517 3.64791 10.8602 3.84682L6.04534 8.84682C5.95332 8.94238 5.82709 8.99746 5.69445 8.99991C5.5618 9.00237 5.43362 8.95201 5.33812 8.85992L0.152931 3.85992C-0.0458479 3.66824 -0.0516033 3.35171 0.140078 3.15293C0.331758 2.95415 0.648288 2.9484 0.847067 3.14008L5.67208 7.79277L10.1398 3.15318C10.3314 2.95427 10.6479 2.9483 10.8468 3.13984Z\",\n fill: color\n }));\n});\nexport default ArrowBottom;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _typeArrowTickMixin;\nimport { css } from 'styled-components';\n// import type { WithTheme } from '../../theme/entity';\n// import { Color as PaletteColor } from '../../utils/types/palette';\nimport { Position } from '../../utils/types';\nexport var typeArrowTickMixin = (_typeArrowTickMixin = {}, _defineProperty(_typeArrowTickMixin, Position.Right, css([\"svg{transform:rotate(-90deg);transition:transform 150ms ease-out;}\"])), _defineProperty(_typeArrowTickMixin, Position.Left, css([\"svg{transform:rotate(90deg);transition:transform 150ms ease-out;}\"])), _defineProperty(_typeArrowTickMixin, Position.Top, css([\"svg{transform:rotate(180deg);transition:transform 150ms ease-out;}\"])), _defineProperty(_typeArrowTickMixin, Position.Bottom, css([\"svg{transform:rotate(0);transition:transform 150ms ease-out;}\"])), _typeArrowTickMixin);","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { typeArrowTickMixin } from './arrow-tick.mixin';\nimport { Position } from '../../utils/types';\nvar baseClassName = 'ArrowTick';\nvar ArrowTick = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-tlypde-0\"\n})(function (_ref) {\n var _ref$type = _ref.type,\n type = _ref$type === void 0 ? Position.Right : _ref$type;\n return css([\"display:inline-flex;\", \"\"], typeArrowTickMixin[type]);\n});\nvar Styled = applyDisplayNames({\n ArrowTick: ArrowTick\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"IconProps\"];\nimport React from 'react';\nimport PT from 'prop-types';\nimport ArrowBottom from '@scaleflex/icons/arrow-bottom';\nimport { iconPropTypes } from '@scaleflex/icons/icon.prop-types';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport { Position } from '../../utils/types';\nimport Styled from './arrow-tick.styles';\nvar ArrowTick = intrinsicComponent(function (_ref, ref) {\n var IconPropsData = _ref.IconProps,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Styled.ArrowTick, _extends({}, rest, {\n ref: ref\n }), /*#__PURE__*/React.createElement(ArrowBottom, IconPropsData));\n});\nArrowTick.defaultProps = {\n type: Position.Right\n};\nArrowTick.propTypes = {\n type: PT.oneOf(objectValues(Position)),\n IconProps: PT.exact(iconPropTypes)\n};\nexport default ArrowTick;","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { Color as PColor } from '../../utils/types/palette';\nimport { FontVariant } from '../../utils/types/typography';\nvar baseClassName = 'AccordionHeader';\nvar Icon = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'icon')\n}).withConfig({\n componentId: \"sc-1dtjsgt-0\"\n})(function () {\n return css([\"display:inline-flex;padding-left:8px;\"]);\n});\nvar Label = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'label')\n}).withConfig({\n componentId: \"sc-1dtjsgt-1\"\n})(function (_ref) {\n var theme = _ref.theme;\n return css([\"\", \"\"], theme.typography.font[FontVariant.ButtonSm]);\n});\nvar Header = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-1dtjsgt-2\"\n})(function (_ref2) {\n var theme = _ref2.theme,\n fullWidth = _ref2.fullWidth;\n return css([\"display:inline-flex;align-items:center;justify-content:space-between;box-sizing:border-box;cursor:pointer;width:\", \";color:\", \";user-select:none;\"], fullWidth ? '100%' : 'auto', theme.palette[PColor.LinkPrimary]);\n});\nvar Wrapper = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'wrapper')\n}).withConfig({\n componentId: \"sc-1dtjsgt-3\"\n})(function (_ref3) {\n var theme = _ref3.theme;\n return css([\"color:\", \";\"], theme.palette[PColor.LinkPrimary]);\n});\nvar Styled = applyDisplayNames({\n Header: Header,\n Wrapper: Wrapper,\n Icon: Icon,\n Label: Label\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"expanded\", \"label\", \"onChange\", \"onClick\", \"onContextMenu\", \"hideIcon\", \"fullWidth\", \"iconProps\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport React from 'react';\nimport PT from 'prop-types';\nimport { iconPropTypes } from '@scaleflex/icons/icon.prop-types';\nimport { intrinsicComponent } from '../../utils/functions';\nimport ArrowTick from '../arrow-tick';\nimport { Position as ArrowTickType } from '../../utils/types';\nimport Styled from './accordion-header.styles';\nvar AccordionHeader = intrinsicComponent(function (_ref, ref) {\n var expanded = _ref.expanded,\n label = _ref.label,\n onChange = _ref.onChange,\n _onClick = _ref.onClick,\n onContextMenu = _ref.onContextMenu,\n hideIcon = _ref.hideIcon,\n fullWidth = _ref.fullWidth,\n iconPropsData = _ref.iconProps,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Styled.Header, _extends({\n ref: ref,\n onClick: function onClick(event) {\n if (typeof onChange === 'function') {\n onChange(!expanded);\n }\n if (typeof _onClick === 'function') {\n _onClick(event);\n }\n },\n fullWidth: fullWidth\n }, rest), /*#__PURE__*/React.createElement(Styled.Label, {\n onContextMenu: onContextMenu\n }, label), !hideIcon && /*#__PURE__*/React.createElement(Styled.Icon, {\n onContextMenu: onContextMenu\n }, /*#__PURE__*/React.createElement(ArrowTick, {\n type: expanded ? ArrowTickType.Top : ArrowTickType.Bottom,\n IconProps: _objectSpread({\n size: 11\n }, iconPropsData)\n })));\n});\nAccordionHeader.defaultProps = {\n expanded: false,\n hideIcon: false,\n fullWidth: false\n};\nAccordionHeader.propTypes = {\n label: PT.node.isRequired,\n expanded: PT.bool,\n hideIcon: PT.bool,\n fullWidth: PT.bool,\n onChange: PT.func,\n iconProps: PT.exact(iconPropTypes)\n};\nexport default AccordionHeader;","import styled from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nvar baseClassName = 'AccordionDetails';\nvar AccordionDetails = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-1wr6wpr-0\"\n})([\"margin:16px 0;\"]);\nvar Styled = applyDisplayNames({\n AccordionDetails: AccordionDetails\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"expanded\", \"children\"];\nimport React from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent } from '../../utils/functions';\nimport Styled from './accordion-details.styles';\nvar AccordionDetails = intrinsicComponent(function (_ref, ref) {\n var expanded = _ref.expanded,\n children = _ref.children,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(React.Fragment, null, expanded && /*#__PURE__*/React.createElement(Styled.AccordionDetails, _extends({\n ref: ref\n }, rest), children));\n});\nAccordionDetails.defaultProps = {\n expanded: false\n};\nAccordionDetails.propTypes = {\n expanded: PT.bool\n};\nexport default AccordionDetails;","import styled from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nvar baseClassName = 'Accordion';\nvar Accordion = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-1g4tz7s-0\"\n})([\"\"]);\nvar Styled = applyDisplayNames({\n Accordion: Accordion\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"label\", \"expanded\", \"children\", \"detailStyle\", \"headerStyle\", \"fullWidth\", \"iconProps\", \"onClick\", \"onChange\", \"onContextMenu\", \"hideIcon\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport React from 'react';\nimport PT from 'prop-types';\nimport { iconPropTypes } from '@scaleflex/icons/icon.prop-types';\nimport { intrinsicComponent } from '../../utils/functions';\nimport AccordionHeader from '../accordion-header';\nimport AccordionDetails from '../accordion-details';\nimport Styled from './accordion.styles';\nvar Accordion = intrinsicComponent(function (_ref, ref) {\n var label = _ref.label,\n expanded = _ref.expanded,\n children = _ref.children,\n detailStyle = _ref.detailStyle,\n headerStyle = _ref.headerStyle,\n fullWidth = _ref.fullWidth,\n iconPropsData = _ref.iconProps,\n _onClick = _ref.onClick,\n onChange = _ref.onChange,\n onContextMenu = _ref.onContextMenu,\n hideIcon = _ref.hideIcon,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Styled.Accordion, _extends({\n ref: ref\n }, rest), /*#__PURE__*/React.createElement(AccordionHeader, {\n label: label,\n expanded: expanded,\n style: _objectSpread({}, headerStyle),\n hideIcon: hideIcon,\n onClick: function onClick(event) {\n if (typeof onChange === 'function') {\n onChange(!expanded, event);\n }\n if (typeof _onClick === 'function') {\n _onClick(event);\n }\n },\n onContextMenu: onContextMenu,\n iconProps: iconPropsData,\n fullWidth: fullWidth\n }), /*#__PURE__*/React.createElement(AccordionDetails, {\n expanded: expanded,\n style: _objectSpread({}, detailStyle)\n }, children));\n});\nAccordion.defaultProps = {\n expanded: false,\n hideIcon: false\n};\nAccordion.propTypes = {\n label: PT.node.isRequired,\n expanded: PT.bool,\n detailStyle: PT.object,\n headerStyle: PT.object,\n onChange: PT.func,\n onContextMenu: PT.func,\n hideIcon: PT.bool,\n fullWidth: PT.bool,\n iconProps: PT.exact(iconPropTypes)\n};\nexport default Accordion;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"stroke\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Arrow = intrinsicComponent(function (_ref, ref) {\n var _ref$stroke = _ref.stroke,\n stroke = _ref$stroke === void 0 ? 'currentColor' : _ref$stroke,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 10 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size * (51 / 56),\n height: size,\n viewBox: \"0 0 51 56\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12.2754 3L37.2754 27.0741L12.2754 53\",\n stroke: stroke,\n strokeWidth: \"5\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }));\n});\nexport default Arrow;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Tick = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 14 14\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12.9783 2.30184C12.7972 2.12074 12.586 2 12.3143 2C12.0728 2 11.8314 2.09055 11.6503 2.30184L4.73816 9.84779L2.29327 7.34254C2.11217 7.16143 1.8707 7.07088 1.62923 7.07088C1.38776 7.07088 1.14629 7.19162 0.995367 7.37272C0.663345 7.76511 0.663345 8.36879 1.02555 8.73099L4.13448 11.9003C4.31559 12.0814 4.52687 12.1719 4.76835 12.1719C5.00982 12.1719 5.25129 12.0814 5.43239 11.8701L12.9783 3.62993C13.3406 3.2979 13.3406 2.66404 12.9783 2.30184Z\",\n fill: color\n }));\n});\nexport default Tick;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var CopyOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 16 16\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M2.33984 12.111V2.04761C2.33984 1.49532 2.78756 1.04761 3.33984 1.04761H10.8182C11.3705 1.04761 11.8182 1.49532 11.8182 2.04761V12.111C11.8182 12.6633 11.3705 13.111 10.8182 13.111H3.33984C2.78756 13.111 2.33984 12.6633 2.33984 12.111ZM3.33984 12.111V2.04761L10.8182 2.04761L10.8182 12.111L3.33984 12.111Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13.66 4.97388C13.66 4.69774 13.4361 4.47388 13.16 4.47388C12.8838 4.47388 12.66 4.69774 12.66 4.97388V13.9523H5.40491C5.12876 13.9523 4.90491 14.1761 4.90491 14.4523C4.90491 14.7284 5.12876 14.9523 5.40491 14.9523H13.16C13.4361 14.9523 13.66 14.7284 13.66 14.4523V4.97388Z\",\n fill: color\n }));\n});\nexport default CopyOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var EyeOpen = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 32\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M25 31.625C8.64336 31.625 0.533984 17.3656 0.196875 16.759C-0.065625 16.2867 -0.065625 15.7129 0.196875 15.2406C0.533984 14.6344 8.64336 0.375 25 0.375C41.3566 0.375 49.466 14.6344 49.8031 15.241C50.0656 15.7133 50.0656 16.2871 49.8031 16.7594C49.466 17.3656 41.3566 31.625 25 31.625ZM3.40117 15.9977C5.25977 18.8145 12.557 28.5 25 28.5C37.4824 28.5 44.7473 18.8223 46.5988 16.0023C44.7402 13.1855 37.443 3.5 25 3.5C12.5176 3.5 5.25273 13.1777 3.40117 15.9977ZM25 25.375C19.8305 25.375 15.625 21.1695 15.625 16C15.625 10.8305 19.8305 6.625 25 6.625C30.1695 6.625 34.375 10.8305 34.375 16C34.375 21.1695 30.1695 25.375 25 25.375ZM25 9.75C21.5539 9.75 18.75 12.5539 18.75 16C18.75 19.4461 21.5539 22.25 25 22.25C28.4461 22.25 31.25 19.4461 31.25 16C31.25 12.5539 28.4461 9.75 25 9.75Z\",\n fill: color\n }));\n});\nexport default EyeOpen;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var EyeClosed = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 44 44\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M36.2553 6.05501C36.5966 5.71376 37.1514 5.71376 37.4926 6.05501C37.8339 6.39626 37.8339 6.95103 37.4926 7.29228L32.3765 12.4084C38.3601 15.8067 42.6046 20.7607 42.7917 20.9825C43.0682 21.3097 43.0699 21.7874 42.7936 22.113C42.3893 22.5908 32.7818 33.7978 22.0001 33.7978C18.9909 33.7978 15.9678 33.1203 13.0065 31.7785L7.74272 37.0423C7.57292 37.2121 7.34897 37.2978 7.12495 37.2978C6.90092 37.2978 6.67698 37.212 6.50545 37.0423C6.1642 36.701 6.1642 36.1462 6.50545 35.805L17.0426 25.2678C17.0453 25.265 17.0481 25.2622 17.0509 25.2595C17.0531 25.2573 17.0553 25.2551 17.0575 25.2529L25.7063 16.6041C25.7081 16.6023 25.7098 16.6005 25.7116 16.5987C25.7134 16.5969 25.7152 16.5952 25.717 16.5934L30.2895 12.0208C30.3028 12.0067 30.3164 11.9931 30.3304 11.9799L36.2553 6.05501ZM31.0895 13.6954L27.5301 17.2548C28.4835 18.476 28.9998 19.9721 28.9998 21.5478C28.9998 25.4083 25.8603 28.5478 21.9999 28.5478C20.4242 28.5478 18.9281 28.0314 17.7069 27.078L14.3353 30.4497C16.8728 31.5113 19.445 32.0478 22 32.0478C30.6537 32.0478 38.863 23.8071 40.9489 21.5478C39.6267 20.1195 35.855 16.3016 31.0895 13.6954ZM18.9574 25.8276C19.8392 26.458 20.8929 26.7977 21.9999 26.7977C24.8943 26.7977 27.2499 24.4422 27.2499 21.5477C27.2499 20.4409 26.9092 19.3873 26.2793 18.5056L18.9574 25.8276Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M27.7418 10.3057C25.7504 9.63545 23.8184 9.29773 22.0001 9.29773C11.2183 9.29773 1.61084 20.5047 1.20659 20.9825C0.951064 21.2835 0.930064 21.721 1.15762 22.0482C1.27837 22.2215 4.17111 26.3287 9.18485 29.659C9.33358 29.7587 9.49985 29.806 9.66785 29.806C9.94963 29.806 10.2279 29.6695 10.3959 29.4122C10.6636 29.0115 10.5534 28.4672 10.1509 28.2012C6.46889 25.753 3.94889 22.7973 3.00561 21.595C5.01989 19.4075 13.2834 11.0478 22.0001 11.0478C23.6293 11.0478 25.3741 11.3558 27.1835 11.963C27.642 12.1275 28.139 11.8738 28.2913 11.4135C28.4453 10.955 28.2003 10.4598 27.7418 10.3057Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M23.2197 14.6685C22.8224 14.5985 22.4164 14.5477 22 14.5477C18.1395 14.5477 15 17.6872 15 21.5477C15 21.9642 15.0508 22.3702 15.1225 22.7674C15.1977 23.1909 15.567 23.4902 15.9817 23.4902C16.0325 23.4902 16.0832 23.4867 16.1357 23.4762C16.6099 23.3922 16.9285 22.9371 16.8445 22.4629C16.7902 22.1654 16.75 21.8627 16.75 21.5477C16.75 18.6532 19.1055 16.2977 22 16.2977C22.315 16.2977 22.6177 16.338 22.9152 16.3905C23.3807 16.485 23.8444 16.1559 23.9284 15.6817C24.0124 15.2075 23.694 14.7525 23.2197 14.6685Z\",\n fill: color\n }));\n});\nexport default EyeClosed;","import { lightPalette } from '../../theme/roots/palette';\nimport { Color } from '../../utils/types/palette';\nexport var getInputBackgroundColor = function getInputBackgroundColor(readOnly, disabled) {\n if (readOnly || disabled) {\n return lightPalette[Color.BackgroundHover];\n }\n return lightPalette[Color.BackgroundStateless];\n};\nexport var getInputTextColor = function getInputTextColor(readOnly, disabled) {\n if (readOnly) {\n return lightPalette[Color.AccentPrimaryHover];\n }\n if (disabled) {\n return lightPalette[Color.TextPlaceholder];\n }\n return lightPalette[Color.TextPrimary];\n};\nexport var getInputBorderColor = function getInputBorderColor(readOnly, disabled) {\n if (readOnly) {\n return lightPalette[Color.BordersItem];\n }\n if (disabled) {\n return lightPalette[Color.BordersSecondary];\n }\n return lightPalette[Color.BorderPrimaryStateless];\n};\nexport var handleCopyIcon = function handleCopyIcon(value, setShowCopyMessage) {\n navigator.clipboard.writeText(value);\n setShowCopyMessage(true);\n};","export var Type = {\n Text: 'text',\n Password: 'password'\n};","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { FontVariant as FV } from '../../utils/types/typography';\nimport { Color as PColor } from '../../utils/types/palette';\nimport { BorderRadiusSize as BRSize } from '../../utils/types/shape';\nimport { sizeInputMixin, fontSizeInputMixin, errorMixin } from './input.mixin';\nimport { InputSize } from '../../utils/types';\nimport { getInputBackgroundColor, getInputTextColor, getInputBorderColor } from './input.utils';\nvar baseClassName = 'Input';\nvar Icon = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'Icon')\n}).withConfig({\n componentId: \"sc-150k0cz-0\"\n})(function (_ref) {\n var iconClickStart = _ref.iconClickStart,\n iconClickEnd = _ref.iconClickEnd,\n disabled = _ref.disabled,\n readOnly = _ref.readOnly,\n iconType = _ref.iconType,\n palette = _ref.theme.palette;\n return css([\"display:flex;color:\", \";cursor:\", \";\", \"\"], palette[PColor.IconsPrimary], (iconClickStart || iconClickEnd) && !disabled && !readOnly ? 'pointer' : 'default', iconType === 'end' && css([\"color:\", \";\"], palette[PColor.IconsSecondary]));\n});\nvar CopyIcon = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'CopyIcon')\n}).withConfig({\n componentId: \"sc-150k0cz-1\"\n})(function (_ref2) {\n var palette = _ref2.theme.palette;\n return css([\"display:flex;color:\", \";cursor:pointer;\"], palette[PColor.IconsSecondary]);\n});\nvar PasswordIcon = /*#__PURE__*/styled(CopyIcon).attrs({\n className: generateClassNames(baseClassName, 'PasswordIcon')\n}).withConfig({\n componentId: \"sc-150k0cz-2\"\n})([\"\"]);\nvar Container = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'Container')\n}).withConfig({\n componentId: \"sc-150k0cz-3\"\n})(function () {\n return css([\"display:block;color:inherit;font-size:inherit;width:100%;min-width:0;margin:0;padding:0;border:0;background-color:transparent;outline:none;\"]);\n});\nvar Base = /*#__PURE__*/styled.input.attrs({\n className: generateClassNames(baseClassName, 'Base')\n}).withConfig({\n componentId: \"sc-150k0cz-4\"\n})(function (_ref3) {\n var palette = _ref3.theme.palette,\n _ref3$isEllipsis = _ref3.isEllipsis,\n isEllipsis = _ref3$isEllipsis === void 0 ? false : _ref3$isEllipsis;\n return css([\"display:block;color:inherit;width:100%;min-width:fit-content;margin:0;padding:0;border:0;background-color:transparent;outline:none;\", \" &::placeholder{color:\", \";}\"], isEllipsis && css([\"text-overflow:ellipsis;\"]), palette[PColor.TextPlaceholder]);\n});\nvar Input = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-150k0cz-5\"\n})(function (_ref4) {\n var _ref4$size = _ref4.size,\n size = _ref4$size === void 0 ? InputSize.Md : _ref4$size,\n _ref4$error = _ref4.error,\n error = _ref4$error === void 0 ? false : _ref4$error,\n _ref4$fullWidth = _ref4.fullWidth,\n fullWidth = _ref4$fullWidth === void 0 ? false : _ref4$fullWidth,\n _ref4$readOnly = _ref4.readOnly,\n readOnly = _ref4$readOnly === void 0 ? false : _ref4$readOnly,\n _ref4$disabled = _ref4.disabled,\n disabled = _ref4$disabled === void 0 ? false : _ref4$disabled,\n _ref4$isHovering = _ref4.isHovering,\n isHovering = _ref4$isHovering === void 0 ? false : _ref4$isHovering,\n _ref4$isSelectedItems = _ref4.isSelectedItems,\n isSelectedItems = _ref4$isSelectedItems === void 0 ? false : _ref4$isSelectedItems,\n theme = _ref4.theme;\n return css([\"position:relative;display:inline-flex;align-items:center;box-sizing:border-box;column-gap:8px;cursor:text;transition:all 100ms ease-out;width:\", \";pointer-events:\", \";background-color:\", \";border-radius:\", \";border:1px solid \", \";color:\", \";\", \" \", \";\", \"{\", \"}\", \" \", \" &:hover{color:\", \";}\", \"\"], fullWidth ? '100%' : '300px', disabled ? 'none' : 'auto', getInputBackgroundColor(readOnly, disabled), theme.shape.borderRadius[BRSize.Md], getInputBorderColor(readOnly, disabled), disabled ? theme.palette[PColor.TextPlaceholder] : theme.palette[PColor.TextPrimary], sizeInputMixin[size], isSelectedItems && \"\\n height: fit-content;\\n\\n \".concat(Base, \" {\\n max-width: fit-content;\\n min-width: 20px;\\n flex-grow: 1;\\n width: 40px;\\n }\\n \"), Base, fontSizeInputMixin[size], !readOnly && !disabled && css([\"&:focus-within{background-color:\", \"!important;border:1px solid \", \";&:hover{border:1px solid \", \";\", \"{color:\", \";}}}\", \" &:hover{background-color:\", \";border:1px solid \", \";\", \"{color:\", \";}}\"], theme.palette[PColor.BackgroundSecondary], theme.palette[PColor.AccentStateless], theme.palette[PColor.AccentStateless], Icon, theme.palette[PColor.IconsPrimary], isHovering && css([\"\", \"{color:\", \";}\"], Icon, theme.palette[PColor.IconsPrimaryHover]), theme.palette[PColor.BackgroundStateless], theme.palette[PColor.BordersPrimaryHover], Icon, theme.palette[PColor.IconsPrimaryHover]), disabled && css([\"\", \"{color:\", \";}\"], Icon, theme.palette[PColor.IconsMuted]), getInputTextColor(readOnly, disabled), error && errorMixin);\n});\nvar ClearIcon = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'ClearIcon')\n}).withConfig({\n componentId: \"sc-150k0cz-6\"\n})(function (_ref5) {\n var palette = _ref5.theme.palette;\n return css([\"display:flex;cursor:pointer;color:\", \";\"], palette[PColor.IconsPrimary]);\n});\nvar NotificationBox = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'NotificationBox')\n}).withConfig({\n componentId: \"sc-150k0cz-7\"\n})(function (_ref6) {\n var _ref6$size = _ref6.size,\n size = _ref6$size === void 0 ? InputSize.Md : _ref6$size,\n palette = _ref6.theme.palette;\n return css([\"display:flex;position:absolute;align-items:center;max-height:34px;right:0px;padding:8px 12px;column-gap:6px;bottom:\", \";box-shadow:0px 2px 6px \", \";background-color:\", \";border-radius:4px;\"], size === InputSize.Md ? '45px' : '35px', palette[PColor.LargeShadow], palette[PColor.BackgroundStateless]);\n});\nvar NotificationIcon = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'NotificationIcon')\n}).withConfig({\n componentId: \"sc-150k0cz-8\"\n})(function (_ref7) {\n var palette = _ref7.theme.palette;\n return css([\"color:\", \";\"], palette[PColor.IconsPrimary]);\n});\nvar NotificationText = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'NotificationText')\n}).withConfig({\n componentId: \"sc-150k0cz-9\"\n})(function (_ref8) {\n var _ref8$theme = _ref8.theme,\n palette = _ref8$theme.palette,\n font = _ref8$theme.typography.font;\n return css([\"white-space:nowrap;\", \";color:\", \";\"], font[FV.TextSmall], palette[PColor.TextPrimary]);\n});\nvar FieldWrapper = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'fieldWrapper')\n}).withConfig({\n componentId: \"sc-150k0cz-10\"\n})(function (_ref9) {\n var isSelectedItems = _ref9.isSelectedItems;\n return css([\"width:100%;height:100%;display:inline-flex;flex-wrap:wrap;gap:8px;max-height:120px;\", \";::-webkit-scrollbar{display:none;}\"], isSelectedItems && \"\\n overflow-y: auto;\\n \");\n});\nvar Styled = applyDisplayNames({\n Input: Input,\n Container: Container,\n Base: Base,\n Icon: Icon,\n CopyIcon: CopyIcon,\n PasswordIcon: PasswordIcon,\n ClearIcon: ClearIcon,\n NotificationBox: NotificationBox,\n NotificationIcon: NotificationIcon,\n NotificationText: NotificationText,\n FieldWrapper: FieldWrapper\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"inputType\", \"children\", \"iconStart\", \"iconEnd\", \"iconChange\", \"clearIcon\", \"iconClickStart\", \"iconClickEnd\", \"clearIconClick\", \"size\", \"className\", \"style\", \"fullWidth\", \"readOnly\", \"disabled\", \"hideCopyIcon\", \"focusOnMount\", \"focusOnClick\", \"isEllipsis\", \"copyTextMessage\", \"copySuccessIcon\", \"error\", \"renderTags\", \"showPlaceholder\"];\nimport React, { useState, useRef, useEffect } from 'react';\nimport PT from 'prop-types';\nimport CopyOutline from '@scaleflex/icons/copy-outline';\nimport EyeOpen from '@scaleflex/icons/eye-open';\nimport EyeClosed from '@scaleflex/icons/eye-closed';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport { InputSize } from '../../utils/types';\nimport { handleCopyIcon } from './input.utils';\nimport { Type } from './types';\nimport Styled from './input.styles';\nvar getIconSize = function getIconSize(sizeName, iconType) {\n switch (sizeName) {\n case InputSize.Md:\n return iconType === 'start' ? 15 : 14;\n case InputSize.Sm:\n default:\n return iconType === 'start' ? 13 : 10;\n }\n};\nvar getPasswordIconSize = function getPasswordIconSize(sizeName) {\n switch (sizeName) {\n case InputSize.Md:\n return 16;\n case InputSize.Sm:\n default:\n return 14;\n }\n};\nvar Input = intrinsicComponent(function (_ref, ref) {\n var _rest$selectedItems;\n var inputType = _ref.inputType,\n children = _ref.children,\n iconStart = _ref.iconStart,\n iconEnd = _ref.iconEnd,\n iconChange = _ref.iconChange,\n clearIcon = _ref.clearIcon,\n iconClickStart = _ref.iconClickStart,\n iconClickEnd = _ref.iconClickEnd,\n clearIconClick = _ref.clearIconClick,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? InputSize.Md : _ref$size,\n className = _ref.className,\n style = _ref.style,\n fullWidth = _ref.fullWidth,\n readOnly = _ref.readOnly,\n disabled = _ref.disabled,\n _ref$hideCopyIcon = _ref.hideCopyIcon,\n hideCopyIcon = _ref$hideCopyIcon === void 0 ? false : _ref$hideCopyIcon,\n _ref$focusOnMount = _ref.focusOnMount,\n focusOnMount = _ref$focusOnMount === void 0 ? false : _ref$focusOnMount,\n _ref$focusOnClick = _ref.focusOnClick,\n focusOnClick = _ref$focusOnClick === void 0 ? true : _ref$focusOnClick,\n _ref$isEllipsis = _ref.isEllipsis,\n isEllipsis = _ref$isEllipsis === void 0 ? false : _ref$isEllipsis,\n copyTextMessage = _ref.copyTextMessage,\n copySuccessIcon = _ref.copySuccessIcon,\n error = _ref.error,\n renderTags = _ref.renderTags,\n showPlaceholder = _ref.showPlaceholder,\n rest = _objectWithoutProperties(_ref, _excluded);\n var _useState = useState(false),\n _useState2 = _slicedToArray(_useState, 2),\n isHovering = _useState2[0],\n setIsHovering = _useState2[1];\n var _useState3 = useState(false),\n _useState4 = _slicedToArray(_useState3, 2),\n showCopyMessage = _useState4[0],\n setShowCopyMessage = _useState4[1];\n var _useState5 = useState(false),\n _useState6 = _slicedToArray(_useState5, 2),\n isVisible = _useState6[0],\n setIsVisible = _useState6[1];\n var inputRef = useRef(null);\n var isSelectedItems = (_rest$selectedItems = rest.selectedItems) === null || _rest$selectedItems === void 0 ? void 0 : _rest$selectedItems.length;\n var placeholder = rest.value || isSelectedItems ? '' : rest.placeholder;\n var handleFocus = function handleFocus() {\n var _inputRef$current;\n if (disabled || readOnly) return;\n showPlaceholder === null || showPlaceholder === void 0 ? void 0 : showPlaceholder(false);\n (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();\n };\n useEffect(function () {\n if (focusOnMount) {\n handleFocus();\n }\n }, []);\n useEffect(function () {\n setTimeout(function () {\n return setShowCopyMessage(false);\n }, 2000);\n }, [showCopyMessage]);\n var handleEntering = function handleEntering() {\n setTimeout(function () {\n setIsHovering(true);\n }, 150);\n };\n var handleLeaving = function handleLeaving() {\n setTimeout(function () {\n setIsHovering(false);\n }, 200);\n };\n var handleIconClick = function handleIconClick(event, type) {\n if (disabled || readOnly) return;\n if (focusOnClick) {\n handleFocus();\n }\n if (type === 'start') {\n if (iconClickStart) {\n iconClickStart(event);\n }\n } else if (type === 'end') {\n if (iconClickEnd) {\n iconClickEnd(event);\n }\n } else if (clearIconClick) {\n clearIconClick(event);\n }\n };\n var renderIcon = function renderIcon(_icon, type) {\n return _icon ? /*#__PURE__*/React.createElement(Styled.Icon, {\n onClick: function onClick(event) {\n return handleIconClick(event, type);\n },\n iconClickStart: iconClickStart,\n iconClickEnd: iconClickEnd,\n iconType: type,\n disabled: disabled,\n readOnly: readOnly\n }, typeof _icon === 'function' ? _icon({\n size: getIconSize(size, type)\n }) : _icon) : undefined;\n };\n var renderClearIcon = function renderClearIcon() {\n return disabled || readOnly || !clearIcon ? undefined : /*#__PURE__*/React.createElement(Styled.ClearIcon, {\n onClick: function onClick(event) {\n return handleIconClick(event, 'clear');\n }\n }, typeof clearIcon === 'function' ? clearIcon({\n size: getIconSize(size, 'clear')\n }) : clearIcon);\n };\n var renderCopyIcon = function renderCopyIcon(icon) {\n return isHovering && readOnly && !hideCopyIcon ? /*#__PURE__*/React.createElement(Styled.CopyIcon, {\n onClick: function onClick() {\n return handleCopyIcon(rest.value, setShowCopyMessage);\n }\n }, typeof icon === 'function' ? icon() : icon) : undefined;\n };\n var toggleVisibility = function toggleVisibility(event) {\n event.stopPropagation();\n setIsVisible(!isVisible);\n };\n var renderPasswordIcon = function renderPasswordIcon() {\n return /*#__PURE__*/React.createElement(Styled.PasswordIcon, {\n onClick: function onClick(event) {\n return toggleVisibility(event);\n }\n }, isVisible ? /*#__PURE__*/React.createElement(EyeClosed, {\n size: getPasswordIconSize(size)\n }) : /*#__PURE__*/React.createElement(EyeOpen, {\n size: getPasswordIconSize(size)\n }));\n };\n var getInputType = function getInputType() {\n if (!inputType && rest !== null && rest !== void 0 && rest.type) {\n return rest === null || rest === void 0 ? void 0 : rest.type;\n }\n if (inputType === Type.Password && !isVisible) {\n return Type.Password;\n }\n return Type.Text;\n };\n var renderField = function renderField() {\n return /*#__PURE__*/React.createElement(Styled.FieldWrapper, {\n isSelectedItems: Boolean(isSelectedItems)\n }, renderTags && renderTags(), /*#__PURE__*/React.createElement(Styled.Base, _extends({}, rest, {\n placeholder: placeholder,\n ref: inputRef,\n readOnly: Boolean(readOnly),\n type: getInputType(),\n isEllipsis: isEllipsis\n })));\n };\n var renderCopyText = function renderCopyText() {\n return /*#__PURE__*/React.createElement(Styled.NotificationBox, {\n size: size\n }, /*#__PURE__*/React.createElement(Styled.NotificationIcon, null, copySuccessIcon), /*#__PURE__*/React.createElement(Styled.NotificationText, null, copyTextMessage));\n };\n return /*#__PURE__*/React.createElement(Styled.Input, {\n onClick: focusOnClick ? handleFocus : undefined,\n ref: ref,\n size: size,\n onMouseEnter: handleEntering,\n onMouseLeave: handleLeaving,\n className: className,\n style: style,\n readOnly: readOnly,\n disabled: disabled,\n fullWidth: Boolean(fullWidth),\n error: error,\n clearIcon: clearIcon,\n isHovering: rest.isHovering,\n isSelectedItems: Boolean(isSelectedItems)\n }, renderIcon(iconStart, 'start'), renderField(), renderCopyIcon( /*#__PURE__*/React.createElement(CopyOutline, {\n size: getIconSize(size, 'copy')\n })), showCopyMessage && renderCopyText(), renderClearIcon(), inputType === Type.Password && renderPasswordIcon(), renderIcon(iconEnd, 'end'), renderIcon(iconChange, ''), children && /*#__PURE__*/React.createElement(React.Fragment, null, children));\n});\nexport var defaultProps = {\n size: InputSize.Md,\n error: false,\n fullWidth: false,\n readOnly: false,\n disabled: false,\n copyTextMessage: 'Copied!'\n};\nInput.defaultProps = defaultProps;\nexport var propTypes = {\n size: PT.oneOf(objectValues(InputSize)),\n iconStart: PT.oneOfType([PT.node, PT.func]),\n iconEnd: PT.oneOfType([PT.node, PT.func]),\n iconChange: PT.oneOfType([PT.node, PT.func]),\n copySuccessIcon: PT.oneOfType([PT.node, PT.func]),\n clearIcon: PT.node,\n error: PT.bool,\n fullWidth: PT.bool,\n value: PT.any,\n readOnly: PT.bool,\n disabled: PT.bool,\n iconClickStart: PT.func,\n showPlaceholder: PT.func,\n iconClickEnd: PT.func,\n clearIconClick: PT.func,\n focusOnMount: PT.bool,\n focusOnClick: PT.bool,\n copyTextMessage: PT.string,\n inputType: PT.string,\n renderTags: PT.func\n};\nInput.propTypes = propTypes;\nexport default Input;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _sizeHintMixin;\nimport { css } from 'styled-components';\nimport { FontVariant as FV } from '../../utils/types/typography';\nimport { InputSize } from '../../utils/types';\nexport var sizeHintMixin = (_sizeHintMixin = {}, _defineProperty(_sizeHintMixin, InputSize.Sm, function (_ref) {\n var font = _ref.theme.typography.font;\n return css(font[FV.LabelExtraSmallUp]);\n}), _defineProperty(_sizeHintMixin, InputSize.Md, function (_ref2) {\n var font = _ref2.theme.typography.font;\n return css(font[FV.LabelSmall]);\n}), _sizeHintMixin);","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { InputSize } from '../../utils/types';\nimport { Color as PColor } from '../../utils/types/palette';\nimport { sizeHintMixin } from './form-hint.mixin';\nvar baseClassName = 'FormHint';\nvar FormHint = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-1vu99sv-0\"\n})(function (_ref) {\n var _ref$size = _ref.size,\n size = _ref$size === void 0 ? InputSize.Md : _ref$size,\n _ref$error = _ref.error,\n error = _ref$error === void 0 ? false : _ref$error,\n _ref$disabled = _ref.disabled,\n disabled = _ref$disabled === void 0 ? false : _ref$disabled,\n theme = _ref.theme;\n return css([\"display:flex;align-items:center;color:\", \";\", \" \", \"\"], error ? theme.palette[PColor.Error] : theme.palette[PColor.TextSecondary], disabled && css([\"color:\", \";\"], theme.palette[PColor.ButtonDisabledText]), sizeHintMixin[size]);\n});\nvar Styled = applyDisplayNames({\n FormHint: FormHint\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport React from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport { InputSize } from '../../utils/types';\nimport Styled from './form-hint.styles';\nvar FormHint = intrinsicComponent(function (props, ref) {\n return /*#__PURE__*/React.createElement(Styled.FormHint, _extends({\n ref: ref\n }, props));\n});\nFormHint.defaultProps = {\n error: false\n};\nFormHint.propTypes = {\n error: PT.bool,\n size: PT.oneOf(objectValues(InputSize))\n};\nexport default FormHint;","export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}","import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n};","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;","export default function getUAString() {\n var uaData = navigator.userAgentData;\n\n if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {\n return uaData.brands.map(function (item) {\n return item.brand + \"/\" + item.version;\n }).join(' ');\n }\n\n return navigator.userAgent;\n}","import getUAString from \"../utils/userAgent.js\";\nexport default function isLayoutViewport() {\n return !/^((?!chrome|android).)*safari/i.test(getUAString());\n}","import { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nimport getWindow from \"./getWindow.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n\n var clientRect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1;\n\n if (includeScale && isHTMLElement(element)) {\n scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref, win) {\n var x = _ref.x,\n y = _ref.y;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }, getWindow(popper)) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n });\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref) {\n var name = _ref.name,\n _ref$options = _ref.options,\n options = _ref$options === void 0 ? {} : _ref$options,\n effect = _ref.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","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\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","import { useRef, useEffect } from 'react';\n/**\r\n * Creates DOM element to be used as React root.\r\n */\nfunction createRootElement(id) {\n var rootContainer = document.createElement('div');\n rootContainer.setAttribute('id', id);\n return rootContainer;\n}\n\n/**\r\n * Appends element as last child of body.\r\n */\nfunction addRootElement(rootElem) {\n document.body.append(rootElem);\n}\n\n/**\r\n * Hook to create a React Portal.\r\n * Automatically handles creating and tearing-down the root elements (no SRR\r\n * makes this trivial), so there is no need to ensure the parent target already\r\n * exists.\r\n * @example\r\n * const target = usePortal(id, [id]);\r\n * return createPortal(children, target);\r\n * @param {String} id The id of the target container, e.g 'modal' or 'spotlight'\r\n * @returns {HTMLElement} The DOM node to use as the Portal target.\r\n */\nfunction usePortal(id) {\n var rootElemRef = useRef(null);\n useEffect(function () {\n // Look for existing target dom element to append to\n var existingParent = document.querySelector(\"#\".concat(id));\n // Parent is either a new root or the existing dom element\n var parentElem = existingParent || createRootElement(id);\n\n // If there is no existing DOM element, add a new one.\n if (!existingParent) {\n addRootElement(parentElem);\n }\n\n // Add the detached element to the parent\n if (rootElemRef.current) {\n parentElem.append(rootElemRef.current);\n }\n return function removeElement() {\n if (rootElemRef.current) {\n rootElemRef.current.remove();\n }\n if (parentElem.childNodes.length === -1) {\n parentElem.remove();\n }\n };\n }, []);\n\n /**\r\n * It's important we evaluate this lazily:\r\n * - We need first render to contain the DOM element, so it shouldn't happen\r\n * in useEffect. We would normally put this in the constructor().\r\n * - We can't do 'const rootElemRef = useRef(document.createElement('div))',\r\n * since this will run every single render (that's a lot).\r\n * - We want the ref to consistently point to the same DOM element and only\r\n * ever run once.\r\n * @link https://reactjs.org/docs/hooks-faq.html#how-to-create-expensive-objects-lazily\r\n */\n function getRootElem() {\n if (!rootElemRef.current) {\n rootElemRef.current = document.createElement('div');\n }\n return rootElemRef.current;\n }\n return getRootElem();\n}\nexport default usePortal;\nexport { usePortal };","export var Position = {\n AutoStart: 'auto-start',\n Auto: 'auto',\n AutoEnd: 'auto-end',\n TopStart: 'top-start',\n Top: 'top',\n TopEnd: 'top-end',\n BottomStart: 'bottom-start',\n Bottom: 'bottom',\n BottomEnd: 'bottom-end',\n LeftStart: 'left-start',\n Left: 'left',\n LeftEnd: 'left-end',\n RightStart: 'right-start',\n Right: 'right',\n RightEnd: 'right-end'\n};","export var Strategy = {\n Absloute: 'absolute',\n Fixed: 'fixed'\n};","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _PopperMixin;\nimport { css } from 'styled-components';\nimport { Position } from './types';\nexport var PopperMixin = (_PopperMixin = {}, _defineProperty(_PopperMixin, Position.Auto, css([\"top:0px;bottom:0px;left:0px;right:0px;\"])), _defineProperty(_PopperMixin, Position.AutoEnd, css([\"top:0px;bottom:0px;left:0px;right:0px;\"])), _defineProperty(_PopperMixin, Position.AutoStart, css([\"top:0px;bottom:0px;left:0px;right:0px;\"])), _defineProperty(_PopperMixin, Position.Right, css([\"left:-4px;\"])), _defineProperty(_PopperMixin, Position.RightEnd, css([\"left:-4px;\"])), _defineProperty(_PopperMixin, Position.RightStart, css([\"left:-4px;\"])), _defineProperty(_PopperMixin, Position.Left, css([\"right:-4px;\"])), _defineProperty(_PopperMixin, Position.LeftEnd, css([\"right:-4px;\"])), _defineProperty(_PopperMixin, Position.LeftStart, css([\"right:-4px;\"])), _defineProperty(_PopperMixin, Position.Top, css([\"bottom:-4px;\"])), _defineProperty(_PopperMixin, Position.TopEnd, css([\"bottom:-4px;\"])), _defineProperty(_PopperMixin, Position.TopStart, css([\"bottom:-4px;\"])), _defineProperty(_PopperMixin, Position.Bottom, css([\"top:-4px;\"])), _defineProperty(_PopperMixin, Position.BottomEnd, css([\"top:-4px;\"])), _defineProperty(_PopperMixin, Position.BottomStart, css([\"top:-4px;\"])), _PopperMixin);","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { Color as PColor } from '../../utils/types/palette';\nimport { PopperMixin } from './popper.mixin';\nimport { Position } from './types';\nvar baseClassName = 'Popper';\nvar Popper = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-1373tsp-0\"\n})([\"\"]);\nvar PopperWrapper = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'wrapper')\n}).withConfig({\n componentId: \"sc-1373tsp-1\"\n})(function (_ref) {\n var zIndex = _ref.zIndex;\n return css([\"position:relative;z-index:\", \";\"], zIndex);\n});\nvar Arrow = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'arrow')\n}).withConfig({\n componentId: \"sc-1373tsp-2\"\n})(function (_ref2) {\n var _ref2$warning = _ref2.warning,\n warning = _ref2$warning === void 0 ? false : _ref2$warning,\n _ref2$position = _ref2.position,\n position = _ref2$position === void 0 ? Position.Right : _ref2$position,\n theme = _ref2.theme;\n return css([\"width:8px;height:8px;position:absolute;&::before{content:'';background:\", \";width:8px;height:8px;transform:rotate(45deg);position:absolute;top:0;left:0;z-index:-1;}\", \"\"], warning ? theme.palette[PColor.BackgroundOrange] : theme.palette[PColor.BackgroundGrey], PopperMixin[position]);\n});\nvar Overlay = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'Overlay')\n}).withConfig({\n componentId: \"sc-1373tsp-3\"\n})(function () {\n return css([\"position:fixed;right:0;bottom:0;top:0;left:0;background-color:transparent;\"]);\n});\nvar Styled = applyDisplayNames({\n Popper: Popper,\n Overlay: Overlay,\n Arrow: Arrow,\n PopperWrapper: PopperWrapper\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"anchorEl\", \"children\", \"open\", \"warning\", \"position\", \"arrow\", \"popperOptions\", \"onClick\", \"overlay\", \"zIndex\", \"enableUnderlayingEvent\", \"wrapperStyles\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport React, { useRef, useEffect } from 'react';\nimport { createPortal } from 'react-dom';\nimport PT from 'prop-types';\nimport { createPopper } from '@popperjs/core';\nimport usePortal from '../../hooks/use-portal';\nimport { intrinsicComponent, generateClassNames, useForkRef, objectValues } from '../../utils/functions';\nimport { Position, Strategy } from './types';\nimport Styled from './popper.styles';\nvar Popper = intrinsicComponent(function (_ref, ref) {\n var anchorEl = _ref.anchorEl,\n children = _ref.children,\n open = _ref.open,\n _ref$warning = _ref.warning,\n warning = _ref$warning === void 0 ? false : _ref$warning,\n _ref$position = _ref.position,\n initialPlacement = _ref$position === void 0 ? 'bottom' : _ref$position,\n _ref$arrow = _ref.arrow,\n arrow = _ref$arrow === void 0 ? false : _ref$arrow,\n popperOptions = _ref.popperOptions,\n onClick = _ref.onClick,\n _ref$overlay = _ref.overlay,\n overlay = _ref$overlay === void 0 ? false : _ref$overlay,\n _ref$zIndex = _ref.zIndex,\n zIndex = _ref$zIndex === void 0 ? 1300 : _ref$zIndex,\n enableUnderlayingEvent = _ref.enableUnderlayingEvent,\n _ref$wrapperStyles = _ref.wrapperStyles,\n wrapperStyles = _ref$wrapperStyles === void 0 ? {} : _ref$wrapperStyles,\n rest = _objectWithoutProperties(_ref, _excluded);\n var target = usePortal(generateClassNames('Popper'));\n var popperRef = useRef(null);\n var handlePopperRef = useForkRef(popperRef, ref);\n useEffect(function () {\n if (!anchorEl || !open || popperRef.current === null) {\n return undefined;\n }\n var defaultModifiers = [{\n name: 'arrow',\n options: {\n element: '[data-popper-arrow]'\n }\n }, {\n name: 'offset',\n options: {\n offset: [0, 10]\n }\n }];\n var popperModifiers = arrow ? defaultModifiers : [];\n if (popperOptions && popperOptions.modifiers != null) {\n popperModifiers = popperModifiers.concat(popperOptions.modifiers);\n }\n var popper = createPopper(anchorEl, popperRef.current, _objectSpread(_objectSpread({\n placement: initialPlacement\n }, popperOptions), {}, {\n modifiers: popperModifiers\n }));\n handlePopperRef.current = popper;\n return function () {\n popper.destroy();\n handlePopperRef.current = null;\n };\n }, [anchorEl, open, popperOptions, initialPlacement, arrow]);\n var passEventToUnderlayingEvent = function passEventToUnderlayingEvent(event) {\n setTimeout(function () {\n if (event.clientX && event.clientY) {\n var elem = document.elementFromPoint(event.clientX, event.clientY);\n if (elem) {\n elem.dispatchEvent(event.nativeEvent);\n }\n }\n }, 0);\n };\n var handleOnClicking = function handleOnClicking(event) {\n event.persist();\n event.preventDefault();\n event.stopPropagation();\n if (onClick) {\n onClick(event);\n }\n if (enableUnderlayingEvent) {\n passEventToUnderlayingEvent(event);\n }\n };\n var renderOverlay = function renderOverlay() {\n return /*#__PURE__*/React.createElement(Styled.Overlay, {\n onClick: handleOnClicking,\n onContextMenu: handleOnClicking\n });\n };\n if (!open) {\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: handlePopperRef\n });\n }\n var render = function render() {\n var _handlePopperRef$stat;\n return /*#__PURE__*/React.createElement(Styled.PopperWrapper, {\n zIndex: zIndex,\n style: _objectSpread({}, wrapperStyles)\n }, overlay && renderOverlay(), /*#__PURE__*/React.createElement(Styled.Popper, _extends({\n ref: handlePopperRef\n }, rest), children, arrow && /*#__PURE__*/React.createElement(Styled.Arrow, {\n warning: warning,\n \"data-popper-arrow\": true,\n position: (handlePopperRef === null || handlePopperRef === void 0 ? void 0 : (_handlePopperRef$stat = handlePopperRef.state) === null || _handlePopperRef$stat === void 0 ? void 0 : _handlePopperRef$stat.placement) || initialPlacement\n })));\n };\n return /*#__PURE__*/createPortal(render(), target);\n});\nPopper.defaultProps = {};\nexport var propTypes = {\n anchorEl: PT.oneOfType([PT.instanceOf(Element), PT.object]),\n popperOptions: PT.shape({\n modifiers: PT.arrayOf(PT.shape({\n data: PT.object,\n effect: PT.func,\n enabled: PT.bool,\n fn: PT.func,\n name: PT.any.isRequired,\n options: PT.object,\n phase: PT.oneOf(['afterMain', 'afterRead', 'afterWrite', 'beforeMain', 'beforeRead', 'beforeWrite', 'main', 'read', 'write']),\n requires: PT.arrayOf(PT.string),\n requiresIfExists: PT.arrayOf(PT.string)\n })),\n onFirstUpdate: PT.func,\n placement: PT.oneOf(objectValues(Position)),\n strategy: PT.oneOf(objectValues(Strategy))\n }),\n overlay: PT.bool,\n warning: PT.bool,\n arrow: PT.bool,\n zIndex: PT.number,\n enableUnderlayingEvent: PT.bool,\n wrapperStyles: PT.object\n};\nPopper.propTypes = propTypes;\nexport default Popper;","import styled, { css, keyframes } from 'styled-components';\nimport { generateClassNames, applyDisplayNames, scrollBar } from '../../utils/functions';\nimport { Color as PColor } from '../../utils/types/palette';\nimport { BorderRadiusSize as BRSize } from '../../utils/types/shape';\nvar baseClassName = 'Menu';\nvar Overlay = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'Overlay')\n}).withConfig({\n componentId: \"sc-10okxhw-0\"\n})(function () {\n return css([\"position:fixed;right:0;bottom:0;top:0;left:0;background-color:transparent;z-index:-1;\"]);\n});\nvar opacityKeyframes = /*#__PURE__*/keyframes([\"from{opacity:0;}to{opacity:1;}\"]);\nvar transformKeyframes = /*#__PURE__*/keyframes([\"from{transform:scale(0.97);margin-top:0px;}to{transform:scale(1);margin-top:4px;}\"]);\nvar fadeInAnimation = /*#__PURE__*/css([\"animation:\", \" 250ms 0ms cubic-bezier(0.4,0,0.2,1),\", \" 250ms cubic-bezier(0.4,0,0.2,1);\"], opacityKeyframes, transformKeyframes);\nvar Menu = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-10okxhw-1\"\n})(function (_ref) {\n var rect = _ref.rect,\n theme = _ref.theme,\n scroll = _ref.scroll,\n _ref$maxHeight = _ref.maxHeight,\n maxHeight = _ref$maxHeight === void 0 ? '' : _ref$maxHeight;\n return css([\"min-width:\", \"px;width:195px;min-height:16px;overflow-x:hidden;overflow-y:auto;transition:opacity 250ms cubic-bezier(0.4,0,0,1),transform 250ms cubic-bezier(0.4,0,0,1),margin-top 250ms cubic-bezier(0.4,0,0,1);outline:0;box-shadow:0 2px 4px \", \";border-radius:\", \";\", \" \", \" margin-top:4px;\", \"\"], rect.width, theme.palette[PColor.MediumShadow], theme.shape.borderRadius[BRSize.Md], scroll && scrollBar, maxHeight && css([\"max-height:\", \";\"], Number.isNaN(+maxHeight) ? maxHeight : \"\".concat(maxHeight, \"px\")), fadeInAnimation);\n});\nvar Styled = applyDisplayNames({\n Menu: Menu,\n Overlay: Overlay\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _slicedToArray from \"@babel/runtime/helpers/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"id\", \"children\", \"open\", \"fullWidth\", \"anchorElPosition\", \"anchorEl\", \"onClose\", \"containerProps\", \"alignCenter\", \"maxHeight\", \"position\", \"popperOptions\", \"enableOverlay\", \"zIndex\", \"hideScroll\", \"scroll\", \"enableUnderlayingEvent\", \"popperWrapperStyles\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport React, { useState, useEffect, useCallback, useRef } from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport { propTypes as popperPropTypes } from '../popper/popper.component';\nimport { Position } from '../popper/types';\nimport Popper from '../popper';\nimport Styled from './menu.styles';\nvar Menu = intrinsicComponent(function (_ref, ref) {\n var id = _ref.id,\n children = _ref.children,\n open = _ref.open,\n fullWidth = _ref.fullWidth,\n anchorElPosition = _ref.anchorElPosition,\n anchorEl = _ref.anchorEl,\n onClose = _ref.onClose,\n containerProps = _ref.containerProps,\n alignCenter = _ref.alignCenter,\n maxHeight = _ref.maxHeight,\n position = _ref.position,\n popperOptions = _ref.popperOptions,\n _ref$enableOverlay = _ref.enableOverlay,\n enableOverlay = _ref$enableOverlay === void 0 ? true : _ref$enableOverlay,\n zIndex = _ref.zIndex,\n _ref$hideScroll = _ref.hideScroll,\n hideScroll = _ref$hideScroll === void 0 ? true : _ref$hideScroll,\n _ref$scroll = _ref.scroll,\n scroll = _ref$scroll === void 0 ? true : _ref$scroll,\n _ref$enableUnderlayin = _ref.enableUnderlayingEvent,\n enableUnderlayingEvent = _ref$enableUnderlayin === void 0 ? false : _ref$enableUnderlayin,\n _ref$popperWrapperSty = _ref.popperWrapperStyles,\n popperWrapperStyles = _ref$popperWrapperSty === void 0 ? {} : _ref$popperWrapperSty,\n rest = _objectWithoutProperties(_ref, _excluded);\n var _useState = useState(null),\n _useState2 = _slicedToArray(_useState, 2),\n timeout = _useState2[0],\n setTimeoutState = _useState2[1];\n var _useState3 = useState(new DOMRect()),\n _useState4 = _slicedToArray(_useState3, 2),\n rect = _useState4[0],\n setRect = _useState4[1];\n var menuRef = useRef(null);\n var updateRect = useCallback(function () {\n var _anchorEl$getBounding;\n var defaultPosition = _objectSpread({\n top: 0,\n left: 0,\n height: 0,\n width: 0\n }, anchorElPosition || {});\n var defaultRect = new DOMRect(defaultPosition.left, defaultPosition.top, defaultPosition.width, defaultPosition.height);\n setRect((_anchorEl$getBounding = anchorEl === null || anchorEl === void 0 ? void 0 : anchorEl.getBoundingClientRect()) !== null && _anchorEl$getBounding !== void 0 ? _anchorEl$getBounding : defaultRect);\n }, [open, timeout, anchorEl]);\n var handleWindowSizeChanged = useCallback(function () {\n if (open) {\n if (timeout) {\n clearTimeout(timeout);\n }\n setTimeoutState(setTimeout(updateRect, 300));\n }\n }, [open, timeout]);\n useEffect(function () {\n window.addEventListener('resize', handleWindowSizeChanged);\n return function () {\n window.removeEventListener('resize', handleWindowSizeChanged);\n };\n }, [handleWindowSizeChanged]);\n useEffect(function () {\n updateRect();\n }, [anchorElPosition, updateRect]);\n useEffect(function () {\n if (hideScroll) {\n if (open) {\n document.body.classList.add('Menu-open');\n updateRect();\n } else {\n document.body.classList.remove('Menu-open');\n }\n return function () {\n document.body.classList.remove('Menu-open');\n };\n }\n }, [open, updateRect]);\n var handleClose = function handleClose(event) {\n if (typeof onClose === 'function') {\n onClose(event);\n }\n };\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Popper, {\n ref: menuRef,\n position: position || 'bottom-start',\n open: Boolean(anchorEl),\n anchorEl: anchorEl,\n overlay: Boolean(enableOverlay),\n onClick: handleClose,\n popperOptions: popperOptions,\n zIndex: zIndex,\n enableUnderlayingEvent: enableUnderlayingEvent,\n wrapperStyles: popperWrapperStyles\n }, /*#__PURE__*/React.createElement(Styled.Menu, _extends({}, containerProps, {\n alignCenter: Boolean(alignCenter),\n scroll: scroll,\n rect: rect\n }, rest, {\n ref: ref,\n maxHeight: maxHeight\n }), children)));\n});\nexport var defaultProps = {\n open: false,\n containerProps: {},\n maxHeight: 250,\n position: Position.BottomStart,\n enableOverlay: true,\n hideScroll: true,\n scroll: true\n};\nMenu.defaultProps = defaultProps;\nexport var propTypes = {\n anchorElPosition: PT.shape({\n left: PT.number,\n right: PT.number,\n top: PT.number,\n bottom: PT.number\n }),\n anchorEl: PT.instanceOf(Element),\n open: PT.bool,\n fullWidth: PT.bool,\n onClose: PT.func,\n id: PT.string,\n containerProps: PT.object,\n alignCenter: PT.bool,\n maxHeight: PT.oneOfType([PT.string, PT.number]),\n popperOptions: popperPropTypes.popperOptions,\n position: PT.oneOf(objectValues(Position)),\n enableOverlay: PT.bool,\n zIndex: PT.number,\n hideScroll: PT.bool,\n scroll: PT.bool,\n enableUnderlayingEvent: PT.bool,\n popperWrapperStyles: PT.object\n};\nMenu.propTypes = propTypes;\nexport default Menu;","export var Size = {\n Sm: 'sm',\n Md: 'md'\n};","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _sizeMenuItemMixin;\nimport { css } from 'styled-components';\n// import type { With } from '../../utils/types';\n\n// import { Color as PaletteColor } from '../../utils/types/palette';\nimport { FontVariant as FV } from '../../utils/types/typography';\nimport { Size } from './types';\nexport var sizeMenuItemMixin = (_sizeMenuItemMixin = {}, _defineProperty(_sizeMenuItemMixin, Size.Sm, function (_ref) {\n var font = _ref.theme.typography.font;\n return css([\"padding:8px 16px;min-height:32px;\", \"\"], font[FV.LabelMedium]);\n}), _defineProperty(_sizeMenuItemMixin, Size.Md, function (_ref2) {\n var font = _ref2.theme.typography.font;\n return css([\"padding:11px 16px;min-height:40px;\", \"\"], font[FV.LabelLarge]);\n}), _sizeMenuItemMixin);","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { Color as PColor } from '../../utils/types/palette';\n// import { BorderRadiusSize as BRSize } from '../../utils/types/shape';\n\nimport { sizeMenuItemMixin } from './menu-item.mixin';\nimport { Size } from './types';\nvar baseClassName = 'MenuItem';\nvar Icon = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'Icon')\n}).withConfig({\n componentId: \"sc-rrzye0-0\"\n})(function (_ref) {\n var palette = _ref.theme.palette,\n disabled = _ref.disabled;\n return css([\"flex-shrink:0;margin-right:10px;color:\", \";\"], disabled ? palette[PColor.TextPlaceholder] : palette[PColor.IconsPrimary]);\n});\nvar Actions = /*#__PURE__*/styled(Icon).attrs({\n className: generateClassNames(baseClassName, 'Actions')\n}).withConfig({\n componentId: \"sc-rrzye0-1\"\n})(function () {\n return css([\"margin-right:0px;margin-left:16px;\"]);\n});\nvar Label = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'Label')\n}).withConfig({\n componentId: \"sc-rrzye0-2\"\n})([\"align-items:center;column-gap:4px;flex-grow:1;\"]);\nvar MenuItemWrapper = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'wrapper')\n}).withConfig({\n componentId: \"sc-rrzye0-3\"\n})(function (_ref2) {\n var _ref2$divider = _ref2.divider,\n divider = _ref2$divider === void 0 ? false : _ref2$divider,\n _ref2$noOptionsText = _ref2.noOptionsText,\n noOptionsText = _ref2$noOptionsText === void 0 ? false : _ref2$noOptionsText,\n _ref2$disabled = _ref2.disabled,\n disabled = _ref2$disabled === void 0 ? false : _ref2$disabled,\n theme = _ref2.theme;\n return css([\"\", \" \", \"\"], divider && css([\"width:100%;height:1px;background:\", \";box-sizing:border-box;\"], theme.palette[PColor.BordersSecondary]), (noOptionsText || disabled) && css([\"color:\", \";\"], theme.palette[PColor.ButtonDisabledText]));\n});\nvar MenuItem = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-rrzye0-4\"\n})(function (_ref3) {\n var _ref3$size = _ref3.size,\n size = _ref3$size === void 0 ? Size.Sm : _ref3$size,\n active = _ref3.active,\n theme = _ref3.theme,\n _ref3$disableHover = _ref3.disableHover,\n disableHover = _ref3$disableHover === void 0 ? false : _ref3$disableHover,\n noOptionsText = _ref3.noOptionsText,\n disabled = _ref3.disabled;\n return css([\"display:flex;justify-content:space-between;flex-direction:row;align-items:center;width:100%;background:\", \";color:\", \";cursor:pointer;box-sizing:border-box;transition:all 100ms ease-out;\", \" &:focus-within,&:focus,&:hover{\", \";\", \"}\", \"\"], theme.palette[active ? PColor.BackgroundActive : PColor.BackgroundSecondary], theme.palette[PColor.TextPrimary], sizeMenuItemMixin[size], !disableHover && \"background-color: \".concat(theme.palette[PColor.BackgroundHover]), (noOptionsText || disabled) && css([\"cursor:default;background-color:white;\"]), (noOptionsText || disabled) && css([\"& > svg{path{fill:\", \";}}color:\", \";\"], theme.palette[PColor.ButtonDisabledText], theme.palette[PColor.ButtonDisabledText]));\n});\nvar MenuPrefix = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'prefix')\n}).withConfig({\n componentId: \"sc-rrzye0-5\"\n})(function () {\n return css([\"display:flex;\"]);\n});\nvar MenuContent = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'content')\n}).withConfig({\n componentId: \"sc-rrzye0-6\"\n})(function () {\n return css([\"flex-grow:1;line-height:16px;\"]);\n});\nvar MenuSuffix = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'suffix')\n}).withConfig({\n componentId: \"sc-rrzye0-7\"\n})(function () {\n return css([\"display:flex;margin-left:8px;\"]);\n});\nvar Styled = applyDisplayNames({\n MenuItemWrapper: MenuItemWrapper,\n MenuItem: MenuItem,\n MenuPrefix: MenuPrefix,\n MenuContent: MenuContent,\n MenuSuffix: MenuSuffix,\n Label: Label,\n Icon: Icon,\n Actions: Actions\n});\nexport default Styled;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"list\", \"depth\", \"children\", \"disableHover\", \"noOptionsText\", \"disabled\", \"enableScrollIntoView\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport React, { useRef, useEffect } from 'react';\nimport Arrow from '@scaleflex/icons/arrow';\nimport PT from 'prop-types';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport Menu from '../menu';\nimport { Size } from './types';\nimport Styled from './menu-item.styles';\nvar MenuItem = intrinsicComponent(function (_ref, ref) {\n var list = _ref.list,\n _ref$depth = _ref.depth,\n depth = _ref$depth === void 0 ? 0 : _ref$depth,\n children = _ref.children,\n disableHover = _ref.disableHover,\n noOptionsText = _ref.noOptionsText,\n disabled = _ref.disabled,\n enableScrollIntoView = _ref.enableScrollIntoView,\n props = _objectWithoutProperties(_ref, _excluded);\n var menuItemRef = useRef(null);\n var _React$useState = React.useState(null),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n anchorEl = _React$useState2[0],\n setAnchorEl = _React$useState2[1];\n var _React$useState3 = React.useState([]),\n _React$useState4 = _slicedToArray(_React$useState3, 2),\n selectedIds = _React$useState4[0],\n setSelectedIds = _React$useState4[1];\n var handleOpenMenu = function handleOpenMenu(event) {\n setAnchorEl(event.currentTarget);\n };\n var handleScroll = function handleScroll() {\n var _menuItemRef$current;\n (_menuItemRef$current = menuItemRef.current) === null || _menuItemRef$current === void 0 ? void 0 : _menuItemRef$current.scrollIntoView({\n behavior: 'auto',\n block: 'nearest'\n });\n };\n useEffect(function () {\n if (props.active && enableScrollIntoView) {\n handleScroll();\n }\n }, [props.active]);\n var handleSelectedId = function handleSelectedId(ev, selected, depthLevel) {\n var updatedArray = selectedIds.slice(0);\n updatedArray[depthLevel] = selected;\n setSelectedIds(updatedArray);\n handleOpenMenu(ev);\n };\n var handleCloseSubMenu = function handleCloseSubMenu(depthLevel) {\n var updatedArray = selectedIds.slice(0);\n updatedArray[depthLevel] = '';\n setSelectedIds(updatedArray);\n setAnchorEl(null);\n };\n var renderItems = function renderItems(options) {\n var depthLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return options.map(function (option) {\n var hasOptions = option.subList && option.subList.length > 0;\n var subMenu;\n if (selectedIds[depthLevel] === option.key && hasOptions) {\n var newDepthLevel = depthLevel + 1;\n subMenu = /*#__PURE__*/React.createElement(Menu, _extends({\n key: option.key,\n position: \"right\",\n open: Boolean(anchorEl),\n anchorEl: anchorEl,\n enableOverlay: false\n }, option.subMenuProps), /*#__PURE__*/React.createElement(MenuItem, _extends({\n list: option.subList,\n depth: newDepthLevel\n }, props)));\n }\n if (option.content === 'divider') {\n return /*#__PURE__*/React.createElement(Styled.MenuItemWrapper, {\n divider: true,\n key: option.key\n });\n }\n return /*#__PURE__*/React.createElement(Styled.MenuItemWrapper, _extends({\n disabled: false,\n key: option.key,\n onMouseLeave: function onMouseLeave() {\n return handleCloseSubMenu(depthLevel);\n }\n }, props), /*#__PURE__*/React.createElement(Styled.MenuItem, _extends({}, props, {\n className: option.className,\n ref: ref,\n active: Boolean(option.active),\n onClick: option.onClick ? function (event) {\n return option.onClick(_objectSpread({\n event: event\n }, props));\n } : undefined,\n onMouseEnter: function onMouseEnter(ev) {\n return handleSelectedId(ev, option.key, depthLevel);\n },\n disableHover: disableHover || option.disableHover\n }), option.prefix && /*#__PURE__*/React.createElement(Styled.MenuPrefix, null, typeof option.prefix === 'function' ? option.prefix(props) : option.prefix), option.content && /*#__PURE__*/React.createElement(Styled.MenuContent, null, typeof option.content === 'function' ? option.content(props) : option.content), (option.suffix || option.subList) && /*#__PURE__*/React.createElement(Styled.MenuSuffix, null, typeof option.suffix === 'function' ? option.suffix(props) : option.suffix, option.subList && /*#__PURE__*/React.createElement(Arrow, {\n size: 10,\n color: \"#768A9F\"\n }))), subMenu);\n });\n };\n if (!list) {\n return /*#__PURE__*/React.createElement(Styled.MenuItemWrapper, {\n noOptionsText: Boolean(noOptionsText),\n disabled: Boolean(disabled)\n }, /*#__PURE__*/React.createElement(Styled.MenuItem, _extends({}, props, {\n ref: menuItemRef,\n disableHover: disableHover,\n noOptionsText: noOptionsText,\n disabled: disabled\n }), children));\n }\n return /*#__PURE__*/React.createElement(React.Fragment, null, renderItems(list, depth));\n});\nMenuItem.displayName = 'MenuItem';\nexport var defaultProps = {\n size: Size.Sm,\n active: false\n};\nMenuItem.defaultProps = defaultProps;\nMenuItem.propTypes = {\n size: PT.oneOf(objectValues(Size)),\n children: PT.oneOfType([PT.node, PT.func]),\n active: PT.bool,\n value: PT.oneOfType([PT.string, PT.number, PT.oneOf([null])]),\n depth: PT.number,\n disableHover: PT.bool,\n noOptionsText: PT.bool,\n disabled: PT.bool,\n enableScrollIntoView: PT.bool\n};\nexport default MenuItem;\n// list: PT.arrayOf(\n// PT.shape({\n// key: PT.string.isRequired,\n// content: PT.oneOfType([PT.string, PT.node]).isRequired,\n// prefix: PT.oneOfType([PT.string, PT.node]),\n// subList: PT.arrayOf(PT.object),\n// suffix: PT.oneOfType([PT.string, PT.node]),\n// onClick: PT.func,\n// disabled: PT.bool,\n// })\n// ),","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\", \"disabled\", \"size\"];\nimport React from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport { Size } from './types';\nimport Styled from './menu-item.styles';\nvar getIconSize = function getIconSize(sizeName) {\n switch (sizeName) {\n case Size.Md:\n return 16;\n case Size.Sm:\n default:\n return 14;\n }\n};\nvar MenuItemIcon = intrinsicComponent(function (_ref, ref) {\n var children = _ref.children,\n disabled = _ref.disabled,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? Size.Md : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Styled.Icon, _extends({\n disabled: disabled\n }, rest, {\n ref: ref\n }), children && typeof children === 'function' ? children({\n size: getIconSize(size)\n }) : children);\n});\nMenuItemIcon.defaultProps = {\n size: Size.Md\n};\nMenuItemIcon.propTypes = {\n size: PT.oneOf(objectValues(Size)),\n children: PT.oneOfType([PT.node, PT.func]).isRequired,\n disabled: PT.bool\n};\nexport default MenuItemIcon;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\"];\nimport React from 'react';\nimport { intrinsicComponent } from '../../utils/functions';\nimport Styled from './menu-item.styles';\nvar MenuItemLabel = intrinsicComponent(function (_ref, ref) {\n var children = _ref.children,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Styled.Label, _extends({}, rest, {\n ref: ref\n }), children);\n});\nMenuItemLabel.displayName = 'MenuItemLabel';\nexport default MenuItemLabel;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\"];\nimport React from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport { Size } from './types';\nimport Styled from './menu-item.styles';\nvar MenuItemActions = intrinsicComponent(function (_ref, ref) {\n var children = _ref.children,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Styled.Actions, _extends({}, rest, {\n ref: ref\n }), children && typeof children === 'function' ? children({\n size: rest.size\n }) : children);\n});\nMenuItemActions.displayName = 'MenuItemActions';\nMenuItemActions.defaultProps = {\n size: Size.Md\n};\nMenuItemActions.propTypes = {\n size: PT.oneOf(objectValues(Size)),\n children: PT.oneOfType([PT.node, PT.func]).isRequired\n};\nexport default MenuItemActions;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var CrossOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 44 44\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M43.3196 40.0403C44.2253 40.9461 44.2253 42.4146 43.3196 43.3204C42.4138 44.2262 40.9453 44.2262 40.0396 43.3204L21.9997 25.2802L3.95952 43.3207C3.05376 44.2264 1.58525 44.2264 0.679494 43.3207C-0.226258 42.4149 -0.226258 40.9464 0.679495 40.0406L18.7197 22.0001L0.679313 3.95941C-0.226437 3.05364 -0.226439 1.5851 0.679314 0.679328C1.58507 -0.226442 3.05358 -0.226443 3.95934 0.679328L21.9997 18.72L40.0398 0.679604C40.9455 -0.226163 42.414 -0.226165 43.3198 0.679605C44.2255 1.58537 44.2255 3.05392 43.3198 3.95969L25.2797 22.0001L43.3196 40.0403Z\",\n fill: color\n }));\n});\nexport default CrossOutline;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _colorBadgeMixin;\nimport { css } from 'styled-components';\nimport { Color as PaletteColor } from '../../utils/types/palette';\nimport { BadgeColor } from '../../utils/types';\nexport var colorBadgeMixin = (_colorBadgeMixin = {}, _defineProperty(_colorBadgeMixin, BadgeColor.Primary, function (_ref) {\n var palette = _ref.theme.palette;\n return css([\"background-color:\", \";color:\", \";\"], palette[PaletteColor.AccentPrimary], palette[PaletteColor.ButtonPrimaryText]);\n}), _defineProperty(_colorBadgeMixin, BadgeColor.White, function (_ref2) {\n var palette = _ref2.theme.palette;\n return css([\"background-color:\", \";color:\", \";\"], palette[PaletteColor.ButtonPrimaryText], palette[PaletteColor.AccentPrimary]);\n}), _defineProperty(_colorBadgeMixin, BadgeColor.Secondary, function (_ref3) {\n var palette = _ref3.theme.palette;\n return css([\"background-color:\", \";color:\", \";\"], palette[PaletteColor.Accent_1_2_Opacity], palette[PaletteColor.TextPrimary]);\n}), _colorBadgeMixin);","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { colorBadgeMixin } from './badge.mixin';\nvar baseClassName = 'Badge';\nvar defaultSize = 20;\nvar BadgeRoot = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-1rfm40m-0\"\n})([\"position:relative;display:inline-flex;flex-shrink:0;vertical-align:middle;\"]);\nvar Badge = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName)\n}).withConfig({\n componentId: \"sc-1rfm40m-1\"\n})(function (_ref) {\n var size = _ref.size,\n _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'secondary' : _ref$color,\n fontSize = _ref.fontSize,\n _ref$padding = _ref.padding,\n padding = _ref$padding === void 0 ? '0 6px' : _ref$padding,\n inline = _ref.inline;\n return css([\"\", \" display:flex;flex-wrap:wrap;flex-direction:row;justify-content:center;align-items:center;align-content:center;height:\", \"px;min-width:\", \"px;line-height:1;padding:\", \";font-size:\", \";box-sizing:border-box;transition:transform 225ms cubic-bezier(0.4,0,0.2,1) 0ms;border-radius:\", \"px;z-index:1;\", \"\"], inline ? '' : 'position: absolute;', size || defaultSize, size || defaultSize, typeof padding === 'number' ? \"\".concat(padding, \"px\") : padding, typeof fontSize === 'number' ? \"\".concat(fontSize, \"px\") : fontSize, (size || defaultSize) / 2, colorBadgeMixin[color]);\n});\nvar Styled = applyDisplayNames({\n BadgeRoot: BadgeRoot,\n Badge: Badge\n});\nexport default Styled;","import _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"badgeContent\"];\nimport React from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport { BadgeColor } from '../../utils/types';\nimport Styled from './badge.styles';\nvar Badge = intrinsicComponent(function (_ref, ref) {\n var badgeContent = _ref.badgeContent,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Styled.BadgeRoot, {\n ref: ref\n }, /*#__PURE__*/React.createElement(Styled.Badge, rest, badgeContent));\n});\nBadge.defaultProps = {\n color: BadgeColor.Secondary,\n inline: false\n};\nBadge.propTypes = {\n color: PT.oneOf(objectValues(BadgeColor)),\n badgeContent: PT.node,\n size: PT.oneOfType([PT.number]),\n fontSize: PT.oneOfType([PT.number, PT.string]),\n padding: PT.oneOfType([PT.number, PT.string]),\n inline: PT.bool\n};\nexport default Badge;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Spinner = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 28 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M41.3465 44.355C33.5656 50.7844 22.9687 51.6268 14.3708 47.3665L17.8949 44.4545C24.754 47.117 32.7424 46.1093 38.709 41.1792C44.6755 36.249 47.1546 28.6071 45.8085 21.3893L49.3325 18.4773C51.9291 27.6967 49.1274 37.9256 41.3465 44.355Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M36.1749 2.63356L32.6509 5.54555C25.821 2.91828 17.838 3.86187 11.8366 8.82088C5.87009 13.7511 3.42028 21.4282 4.7372 28.6107L1.21311 31.5227C-1.38344 22.3034 1.45314 12.0456 9.19916 5.64502C16.9801 -0.784402 27.5768 -1.62682 36.1749 2.63356Z\",\n fill: color\n }));\n});\nexport default Spinner;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var TwoArrowsRight = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 12 12\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M5.74299 0.152553C5.95998 -0.056404 6.30528 -0.0498885 6.51424 0.167105C6.7232 0.384099 6.71668 0.7294 6.49969 0.938357L1.43832 5.81227L6.51398 11.0759C6.72309 11.2928 6.71681 11.6381 6.49996 11.8472C6.28311 12.0563 5.9378 12.05 5.7287 11.8332L0.274151 6.1766C0.17369 6.07242 0.118752 5.93258 0.121433 5.78788C0.124113 5.64317 0.184193 5.50547 0.288444 5.40508L5.74299 0.152553Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M10.9549 0.152554C11.1719 -0.0564031 11.5172 -0.0498876 11.7262 0.167106C11.9351 0.3841 11.9286 0.729401 11.7116 0.938357L6.65023 5.81227L11.7259 11.0759C11.935 11.2928 11.9287 11.6381 11.7119 11.8472C11.495 12.0563 11.1497 12.05 10.9406 11.8332L5.48606 6.1766C5.3856 6.07242 5.33067 5.93258 5.33335 5.78788C5.33603 5.64317 5.39611 5.50547 5.50036 5.40508L10.9549 0.152554Z\",\n fill: color\n }));\n});\nexport default TwoArrowsRight;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var TwoArrowsLeft = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 12 12\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M6.25714 11.8474C6.04014 12.0564 5.69484 12.0499 5.48588 11.8329C5.27693 11.6159 5.28344 11.2706 5.50043 11.0616L10.5618 6.18773L5.48614 0.924074C5.27704 0.707224 5.28331 0.361919 5.50016 0.152813C5.71701 -0.0562931 6.06232 -0.0500145 6.27143 0.166835L11.726 5.8234C11.8264 5.92758 11.8814 6.06742 11.8787 6.21212C11.876 6.35683 11.8159 6.49453 11.7117 6.59492L6.25714 11.8474Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M1.04522 11.8474C0.828227 12.0564 0.482925 12.0499 0.273969 11.8329C0.065012 11.6159 0.0715275 11.2706 0.288521 11.0616L5.34989 6.18773L0.274227 0.924074C0.0651226 0.707224 0.0714006 0.361919 0.28825 0.152813C0.5051 -0.0562931 0.850407 -0.0500145 1.05951 0.166835L6.51406 5.8234C6.61452 5.92758 6.66946 6.06742 6.66678 6.21212C6.6641 6.35683 6.60402 6.49453 6.49977 6.59492L1.04522 11.8474Z\",\n fill: color\n }));\n});\nexport default TwoArrowsLeft;","export var ButtonType = {\n Default: 'default',\n Sidebar: 'sidebar'\n};","export var SideBar = {\n Left: 'left',\n Right: 'right'\n};","import { ButtonSize } from '../../utils/types';\nexport var getIconSize = function getIconSize(sizeName) {\n switch (sizeName) {\n case ButtonSize.Lg:\n return 18;\n case ButtonSize.Md:\n return 16;\n case ButtonSize.Sm:\n return 14;\n case ButtonSize.Xs:\n return 12;\n default:\n return 16;\n }\n};\nexport var getSideBarIconSize = function getSideBarIconSize(sizeName) {\n switch (sizeName) {\n case ButtonSize.Lg:\n return 12;\n case ButtonSize.Md:\n return 11;\n case ButtonSize.Sm:\n return 10;\n default:\n return 11;\n }\n};","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _colorButtonMixin, _sizeButtonMixin, _sizeSecondaryButtonM, _sizeSidebarMixin, _sizeSidebarDividerMi, _paddingIconLabelMixi, _sizeButtonLabelMixin;\nimport { css } from 'styled-components';\nimport StyledBadge from '../badge/badge.styles';\nimport { Color as PaletteColor } from '../../utils/types/palette';\nimport { FontVariant } from '../../utils/types/typography';\nimport { ButtonSize, ButtonColor } from '../../utils/types';\nexport var colorButtonMixin = (_colorButtonMixin = {}, _defineProperty(_colorButtonMixin, ButtonColor.Primary, function (_ref) {\n var palette = _ref.theme.palette,\n active = _ref.active;\n return css([\"background-color:\", \";color:\", \";\", \"{color:\", \";background:transparent;}&:hover{background-color:\", \";}&:active{background-color:\", \";}\", \" &:disabled{color:\", \";background:\", \";cursor:default;\", \"{color:\", \";background:transparent;}}\"], palette[PaletteColor.AccentStateless], palette[PaletteColor.ButtonPrimaryText], StyledBadge.Badge, palette[PaletteColor.ButtonPrimaryText], palette[PaletteColor.AccentPrimaryHover], palette[PaletteColor.AccentPrimaryActive], active && css([\"background-color:\", \";&:hover,&:focus{background-color:\", \";}\"], palette[PaletteColor.AccentPrimaryActive], palette[PaletteColor.AccentPrimaryActive]), palette[PaletteColor.BordersDisabled], palette[PaletteColor.Accent_1_2_Opacity], StyledBadge.Badge, palette[PaletteColor.BordersDisabled]);\n}), _defineProperty(_colorButtonMixin, ButtonColor.Secondary, function (_ref2) {\n var palette = _ref2.theme.palette,\n active = _ref2.active;\n return css([\"background-color:\", \";color:\", \";border:1px solid \", \";\", \"{color:\", \";background:transparent;}&:hover{color:\", \";background-color:\", \";\", \"{color:\", \";}}&:focus{color:\", \";background-color:\", \";border:1px solid \", \";\", \"{color:\", \";}}&:active{color:\", \";background-color:\", \";\", \"{color:\", \";}}\", \" &:disabled{color:\", \";background:\", \";border:none;cursor:default;\", \"{color:\", \";}}\"], palette[PaletteColor.BackgroundStateless], palette[PaletteColor.AccentStateless], palette[PaletteColor.AccentStateless], StyledBadge.Badge, palette[PaletteColor.AccentStateless], palette[PaletteColor.ButtonPrimaryText], palette[PaletteColor.AccentPrimaryHover], StyledBadge.Badge, palette[PaletteColor.ButtonPrimaryText], palette[PaletteColor.AccentPrimaryActive], palette[PaletteColor.Accent_1_2_Opacity], palette[PaletteColor.AccentPrimaryActive], StyledBadge.Badge, palette[PaletteColor.AccentPrimaryActive], palette[PaletteColor.ButtonPrimaryText], palette[PaletteColor.AccentPrimaryActive], StyledBadge.Badge, palette[PaletteColor.ButtonPrimaryText], active && css([\"color:\", \";background-color:\", \";\", \"{color:\", \";}&:hover,&:focus{color:\", \";background-color:\", \";\", \"{color:\", \";}}\"], palette[PaletteColor.ButtonPrimaryText], palette[PaletteColor.AccentPrimaryActive], StyledBadge.Badge, palette[PaletteColor.ButtonPrimaryText], palette[PaletteColor.ButtonPrimaryText], palette[PaletteColor.AccentPrimaryActive], StyledBadge.Badge, palette[PaletteColor.ButtonPrimaryText]), palette[PaletteColor.BordersDisabled], palette[PaletteColor.Accent_1_2_Opacity], StyledBadge.Badge, palette[PaletteColor.BordersDisabled]);\n}), _defineProperty(_colorButtonMixin, ButtonColor.Basic, function (_ref3) {\n var palette = _ref3.theme.palette,\n active = _ref3.active;\n return css([\"background-color:transparent;border:1px solid \", \";color:\", \";\", \"{background-color:transparent;color:\", \";}&:hover{background-color:\", \";color:\", \";\", \"{color:\", \";}}&:active{background-color:\", \";color:\", \";\", \"{color:\", \";}}\", \" &:disabled{background-color:\", \";color:\", \";cursor:default;border:none;\", \"{color:\", \";}}\"], palette[PaletteColor.BordersButton], palette[PaletteColor.LinkStateless], StyledBadge.Badge, palette[PaletteColor.LinkStateless], palette[PaletteColor.BackgroundHover], palette[PaletteColor.LinkHover], StyledBadge.Badge, palette[PaletteColor.LinkHover], palette[PaletteColor.BackgroundActive], palette[PaletteColor.LinkHover], StyledBadge.Badge, palette[PaletteColor.LinkHover], active && css([\"background-color:\", \";color:\", \";\", \"{color:\", \";}&:hover,&:focus{background-color:\", \";color:\", \";}\"], palette[PaletteColor.BackgroundActive], palette[PaletteColor.LinkHover], StyledBadge.Badge, palette[PaletteColor.LinkHover], palette[PaletteColor.BackgroundActive], palette[PaletteColor.LinkHover]), palette[PaletteColor.Accent_1_2_Opacity], palette[PaletteColor.BordersDisabled], StyledBadge.Badge, palette[PaletteColor.BordersDisabled]);\n}), _defineProperty(_colorButtonMixin, ButtonColor.LinkPrimary, function (_ref4) {\n var palette = _ref4.theme.palette,\n active = _ref4.active;\n return css([\"color:\", \";background-color:transparent;padding:0px !important;&:hover{background-color:transparent;color:\", \";}&:active{color:\", \";}\", \" &:disabled{background-color:transparent;color:\", \";cursor:default;}\"], palette[PaletteColor.AccentStateless], palette[PaletteColor.AccentPrimaryHover], palette[PaletteColor.AccentPrimaryActive], active && css([\"color:\", \";&:hover,&:focus{color:\", \";\"], palette[PaletteColor.AccentPrimaryActive], palette[PaletteColor.AccentPrimaryActive]), palette[PaletteColor.BordersDisabled]);\n}), _defineProperty(_colorButtonMixin, ButtonColor.LinkSecondary, function (_ref5) {\n var palette = _ref5.theme.palette,\n active = _ref5.active;\n return css([\"color:\", \";background-color:transparent;padding:0px !important;&:hover{background-color:transparent;color:\", \";}&:active{color:\", \";}\", \" &:disabled{background-color:transparent;color:\", \";cursor:default;}\"], palette[PaletteColor.LinkStateless], palette[PaletteColor.AccentPrimaryHover], palette[PaletteColor.AccentPrimaryActive], active && css([\"color:\", \";&:hover,&:focus{color:\", \";}\"], palette[PaletteColor.AccentPrimaryActive], palette[PaletteColor.AccentPrimaryActive]), palette[PaletteColor.BordersDisabled]);\n}), _defineProperty(_colorButtonMixin, ButtonColor.LinkBasicPrimary, function (_ref6) {\n var palette = _ref6.theme.palette,\n active = _ref6.active;\n return css([\"color:\", \";background-color:transparent;padding:0px !important;&:hover{background-color:transparent;color:\", \";}&:active{color:\", \";}\", \" &:disabled{background-color:transparent;color:\", \";cursor:default;}\"], palette[PaletteColor.AccentStateless], palette[PaletteColor.AccentPrimaryHover], palette[PaletteColor.AccentPrimaryActive], active && css([\"color:\", \";&:hover,&:focus{color:\", \";}\"], palette[PaletteColor.AccentPrimaryActive], palette[PaletteColor.AccentPrimaryActive]), palette[PaletteColor.BordersDisabled]);\n}), _defineProperty(_colorButtonMixin, ButtonColor.LinkBasicSecondary, function (_ref7) {\n var palette = _ref7.theme.palette,\n active = _ref7.active;\n return css([\"color:\", \";background-color:transparent;padding:0px !important;&:hover{background-color:transparent;color:\", \";}&:active{color:\", \";}\", \" &:disabled{background-color:transparent;color:\", \";cursor:default;}\"], palette[PaletteColor.LinkStateless], palette[PaletteColor.AccentPrimaryHover], palette[PaletteColor.AccentPrimaryActive], active && css([\"color:\", \";&:hover,&:focus{color:\", \";}\"], palette[PaletteColor.AccentPrimaryActive], palette[PaletteColor.AccentPrimaryActive]), palette[PaletteColor.BordersDisabled]);\n}), _defineProperty(_colorButtonMixin, ButtonColor.ErrorPrimary, function (_ref8) {\n var palette = _ref8.theme.palette,\n active = _ref8.active;\n return css([\"background-color:\", \";color:\", \";\", \"{color:\", \";background:transparent;}&:hover{background-color:\", \";}&:active{background-color:\", \";}\", \" &:disabled{background-color:\", \";color:\", \";cursor:default;\", \"{color:\", \";background:transparent;}}\"], palette[PaletteColor.Error], palette[PaletteColor.ButtonPrimaryText], StyledBadge.Badge, palette[PaletteColor.ButtonPrimaryText], palette[PaletteColor.ErrorHover], palette[PaletteColor.ErrorActive], active && css([\"background-color:\", \";&:hover,&:focus{background-color:\", \";}\"], palette[PaletteColor.ErrorActive], palette[PaletteColor.ErrorActive]), palette[PaletteColor.Accent_1_2_Opacity], palette[PaletteColor.BordersDisabled], StyledBadge.Badge, palette[PaletteColor.BordersDisabled]);\n}), _defineProperty(_colorButtonMixin, ButtonColor.ErrorSecondary, function (_ref9) {\n var palette = _ref9.theme.palette,\n active = _ref9.active;\n return css([\"background-color:\", \";color:\", \";border:1px solid \", \";\", \"{color:\", \";background-color:transparent;}&:hover{background-color:\", \";color:\", \";border:none;\", \"{color:\", \";}}&:active{background-color:\", \";color:\", \";border:none;}\", \" &:disabled{color:\", \";background:\", \";border:none;cursor:default;\", \"{color:\", \";}}\"], palette[PaletteColor.BackgroundStateless], palette[PaletteColor.LinkStateless], palette[PaletteColor.BordersButton], StyledBadge.Badge, palette[PaletteColor.LinkStateless], palette[PaletteColor.ErrorHover], palette[PaletteColor.ButtonPrimaryText], StyledBadge.Badge, palette[PaletteColor.ButtonPrimaryText], palette[PaletteColor.ErrorActive], palette[PaletteColor.ButtonPrimaryText], active && css([\"background-color:\", \";color:\", \";border:none;&:hover,&:focus{background-color:\", \";}\"], palette[PaletteColor.ErrorActive], palette[PaletteColor.ButtonPrimaryText], palette[PaletteColor.ErrorActive]), palette[PaletteColor.BordersDisabled], palette[PaletteColor.Accent_1_2_Opacity], StyledBadge.Badge, palette[PaletteColor.BordersDisabled]);\n}), _defineProperty(_colorButtonMixin, ButtonColor.ErrorBasic, function (_ref10) {\n var palette = _ref10.theme.palette,\n active = _ref10.active;\n return css([\"color:\", \";background-color:transparent;&:hover{color:\", \";}&:active{color:\", \";}\", \" &:disabled{color:\", \";cursor:default;}\"], palette[PaletteColor.LinkStateless], palette[PaletteColor.ErrorHover], palette[PaletteColor.ErrorActive], active && css([\"color:\", \";&:hover,&:focus{color:\", \";}\"], palette[PaletteColor.ErrorActive], palette[PaletteColor.ErrorActive]), palette[PaletteColor.BordersDisabled]);\n}), _defineProperty(_colorButtonMixin, ButtonColor.WarningPrimary, function (_ref11) {\n var palette = _ref11.theme.palette,\n active = _ref11.active;\n return css([\"background-color:\", \";color:\", \";\", \"{color:\", \";background:transparent;}&:hover{background-color:\", \";}&:active{background-color:\", \";}\", \" &:disabled{background-color:\", \";color:\", \";cursor:default;\", \"{color:\", \";background:transparent;}}\"], palette[PaletteColor.Warning], palette[PaletteColor.ButtonPrimaryText], StyledBadge.Badge, palette[PaletteColor.ButtonPrimaryText], palette[PaletteColor.WarningHover], palette[PaletteColor.WarningActive], active && css([\"background-color:\", \";&:hover,&:focus{background-color:\", \";}\"], palette[PaletteColor.WarningActive], palette[PaletteColor.WarningActive]), palette[PaletteColor.Accent_1_2_Opacity], palette[PaletteColor.BordersDisabled], StyledBadge.Badge, palette[PaletteColor.BordersDisabled]);\n}), _defineProperty(_colorButtonMixin, ButtonColor.WarningSecondary, function (_ref12) {\n var palette = _ref12.theme.palette,\n active = _ref12.active;\n return css([\"background-color:\", \";color:\", \";border:1px solid \", \";\", \"{color:\", \";background-color:transparent;}&:hover{background-color:\", \";color:\", \";border:none;\", \"{color:\", \";}}&:active{background-color:\", \";color:\", \";border:none;}\", \" &:disabled{color:\", \";background:\", \";border:none;cursor:default;\", \"{color:\", \";}}\"], palette[PaletteColor.BackgroundStateless], palette[PaletteColor.LinkStateless], palette[PaletteColor.BordersButton], StyledBadge.Badge, palette[PaletteColor.LinkStateless], palette[PaletteColor.WarningHover], palette[PaletteColor.ButtonPrimaryText], StyledBadge.Badge, palette[PaletteColor.ButtonPrimaryText], palette[PaletteColor.WarningActive], palette[PaletteColor.ButtonPrimaryText], active && css([\"background-color:\", \";color:\", \";border:none;\", \"{color:\", \";background-color:transparent;}&:hover,&:focus{background-color:\", \";}\"], palette[PaletteColor.WarningActive], palette[PaletteColor.ButtonPrimaryText], StyledBadge.Badge, palette[PaletteColor.ButtonPrimaryText], palette[PaletteColor.WarningActive]), palette[PaletteColor.BordersDisabled], palette[PaletteColor.Accent_1_2_Opacity], StyledBadge.Badge, palette[PaletteColor.BordersDisabled]);\n}), _defineProperty(_colorButtonMixin, ButtonColor.WarningBasic, function (_ref13) {\n var palette = _ref13.theme.palette,\n active = _ref13.active;\n return css([\"color:\", \";background-color:transparent;&:hover{color:\", \";}&:active{color:\", \";}\", \" &:disabled{color:\", \";cursor:default;}\"], palette[PaletteColor.LinkStateless], palette[PaletteColor.WarningHover], palette[PaletteColor.WarningActive], active && css([\"color:\", \";&:hover,&:focus{color:\", \";}\"], palette[PaletteColor.WarningActive], palette[PaletteColor.WarningActive]), palette[PaletteColor.BordersDisabled]);\n}), _colorButtonMixin);\nexport var sizeButtonMixin = (_sizeButtonMixin = {}, _defineProperty(_sizeButtonMixin, ButtonSize.Xs, css([\"padding:5px 10px;\"])), _defineProperty(_sizeButtonMixin, ButtonSize.Sm, css([\"padding:8px 12px;\"])), _defineProperty(_sizeButtonMixin, ButtonSize.Md, css([\"padding:11px 16px;\"])), _defineProperty(_sizeButtonMixin, ButtonSize.Lg, css([\"padding:14px 24px;\"])), _sizeButtonMixin);\nexport var sizeSecondaryButtonMixin = (_sizeSecondaryButtonM = {}, _defineProperty(_sizeSecondaryButtonM, ButtonSize.Xs, css([\"padding:4px 10px;\"])), _defineProperty(_sizeSecondaryButtonM, ButtonSize.Sm, css([\"padding:7px 12px;\"])), _defineProperty(_sizeSecondaryButtonM, ButtonSize.Md, css([\"padding:10px 16px;\"])), _defineProperty(_sizeSecondaryButtonM, ButtonSize.Lg, css([\"padding:13px 24px;\"])), _sizeSecondaryButtonM);\nexport var sizeSidebarMixin = (_sizeSidebarMixin = {}, _defineProperty(_sizeSidebarMixin, ButtonSize.Xs, css([\"padding:5px 10px;\"])), _defineProperty(_sizeSidebarMixin, ButtonSize.Sm, css([\"padding:8px 12px;\"])), _defineProperty(_sizeSidebarMixin, ButtonSize.Md, css([\"padding:11px 14px;\"])), _defineProperty(_sizeSidebarMixin, ButtonSize.Lg, css([\"padding:14px 16px;\"])), _sizeSidebarMixin);\nexport var sizeSidebarDividerMixin = (_sizeSidebarDividerMi = {}, _defineProperty(_sizeSidebarDividerMi, ButtonSize.Xs, css([\"height:14px;\"])), _defineProperty(_sizeSidebarDividerMi, ButtonSize.Sm, css([\"height:16px;\"])), _defineProperty(_sizeSidebarDividerMi, ButtonSize.Md, css([\"height:18px;\"])), _defineProperty(_sizeSidebarDividerMi, ButtonSize.Lg, css([\"height:20px;\"])), _sizeSidebarDividerMi);\nexport var paddingIconLabelMixin = (_paddingIconLabelMixi = {}, _defineProperty(_paddingIconLabelMixi, ButtonSize.Xs, css([\"margin-right:5px;\"])), _defineProperty(_paddingIconLabelMixi, ButtonSize.Sm, css([\"margin-right:6px;\"])), _defineProperty(_paddingIconLabelMixi, ButtonSize.Md, css([\"margin-right:7px;\"])), _defineProperty(_paddingIconLabelMixi, ButtonSize.Lg, css([\"margin-right:8px;\"])), _paddingIconLabelMixi);\nexport var sizeButtonLabelMixin = (_sizeButtonLabelMixin = {}, _defineProperty(_sizeButtonLabelMixin, ButtonSize.Xs, function (_ref14) {\n var font = _ref14.theme.typography.font;\n return css(font[FontVariant.ButtonSm]);\n}), _defineProperty(_sizeButtonLabelMixin, ButtonSize.Sm, function (_ref15) {\n var font = _ref15.theme.typography.font;\n return css(font[FontVariant.ButtonMd]);\n}), _defineProperty(_sizeButtonLabelMixin, ButtonSize.Md, function (_ref16) {\n var font = _ref16.theme.typography.font;\n return css(font[FontVariant.ButtonLg]);\n}), _defineProperty(_sizeButtonLabelMixin, ButtonSize.Lg, function (_ref17) {\n var font = _ref17.theme.typography.font;\n return css(font[FontVariant.ButtonLgUp]);\n}), _sizeButtonLabelMixin);","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { BorderRadiusSize as BRSize } from '../../utils/types/shape';\nimport { colorButtonMixin, sizeButtonMixin, sizeButtonLabelMixin, sizeSidebarMixin, sizeSidebarDividerMixin, paddingIconLabelMixin, sizeSecondaryButtonMixin } from './button.mixin';\nimport { Color as PaletteColor } from '../../utils/types/palette';\nimport { ButtonSize, ButtonColor } from '../../utils/types';\nimport { ButtonType, SideBar } from './types';\nvar baseClassName = 'Button';\nvar Label = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'Label')\n}).withConfig({\n componentId: \"sc-lxwit0-0\"\n})([\"display:flex;\"]);\nvar Badge = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'Badge')\n}).withConfig({\n componentId: \"sc-lxwit0-1\"\n})([\"display:flex;margin-left:5px;\"]);\nvar Wrapper = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'Body')\n}).withConfig({\n componentId: \"sc-lxwit0-2\"\n})(function () {\n return css([\"display:flex;align-items:center;\"]);\n});\nvar Button = /*#__PURE__*/styled.button.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-lxwit0-3\"\n})(function (_ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? ButtonColor.Secondary : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? ButtonSize.Md : _ref$size,\n buttonType = _ref.buttonType,\n active = _ref.active,\n theme = _ref.theme;\n return css([\"display:inline-flex;flex-shrink:0;flex-direction:row;align-items:center;justify-content:center;border-radius:\", \";transition:all 100ms ease-out;border:0;cursor:pointer;outline:none;\", \" \", \" \", \" \", \"{\", \" \", \"}\", \"{\", \"}\", \"\"], theme.shape.borderRadius[BRSize.Md], buttonType !== ButtonType.Sidebar && colorButtonMixin[color], buttonType === ButtonType.Sidebar ? sizeSidebarMixin[size] : sizeButtonMixin[size], color === ButtonColor.Secondary && sizeSecondaryButtonMixin[size], Label, sizeButtonLabelMixin[size], (color === ButtonColor.LinkBasicPrimary || color === ButtonColor.LinkBasicSecondary) && \"font-weight: 400\", Badge, sizeButtonLabelMixin[size], buttonType === ButtonType.Sidebar && css([\"background-color:\", \";color:\", \";border:1px solid \", \";\", \" \", \" &:disabled{color:\", \";background:\", \";border:none;cursor:default;}\"], theme.palette[PaletteColor.ButtonPrimaryText], theme.palette[PaletteColor.LinkStateless], theme.palette[PaletteColor.BordersButton], !active && css([\"&:hover{color:\", \";background-color:\", \";border:none;}&:active{color:\", \";background-color:\", \";border:none;}\"], theme.palette[PaletteColor.ButtonPrimaryText], theme.palette[PaletteColor.AccentPrimaryHover], theme.palette[PaletteColor.ButtonPrimaryText], theme.palette[PaletteColor.AccentPrimaryActive]), active && css([\"background-color:\", \";color:\", \";border:1px solid \", \";\"], theme.palette[PaletteColor.Accent_1_2_Opacity], theme.palette[PaletteColor.AccentPrimaryActive], theme.palette[PaletteColor.AccentPrimaryActive]), theme.palette[PaletteColor.BordersDisabled], theme.palette[PaletteColor.AccentPrimaryDisabled]));\n});\nvar StartIcon = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'StartIcon')\n}).withConfig({\n componentId: \"sc-lxwit0-4\"\n})(function (_ref2) {\n var $loading = _ref2.$loading,\n _ref2$size = _ref2.size,\n size = _ref2$size === void 0 ? ButtonSize.Md : _ref2$size;\n return css([\"display:flex;svg{animation:\", \";}\", \"\"], $loading ? 'spinner 1.2s linear infinite' : '1.2s', paddingIconLabelMixin[size]);\n});\nvar SideArrows = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'SideBar')\n}).withConfig({\n componentId: \"sc-lxwit0-5\"\n})(function (_ref3) {\n var sideBarType = _ref3.sideBarType;\n return css([\"display:flex;\", \":12px;\"], \"margin-\".concat(sideBarType === SideBar.Left ? 'right' : 'left'));\n});\nvar Divider = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'Divider')\n}).withConfig({\n componentId: \"sc-lxwit0-6\"\n})(function (_ref4) {\n var sideBarType = _ref4.sideBarType,\n _ref4$size = _ref4.size,\n size = _ref4$size === void 0 ? ButtonSize.Md : _ref4$size;\n return css([\"border-left-style:solid;border-width:1px;\", \" \", \":12px;\"], sizeSidebarDividerMixin[size], \"margin-\".concat(sideBarType === SideBar.Left ? 'right' : 'left'));\n});\nvar EndIcon = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'EndIcon')\n}).withConfig({\n componentId: \"sc-lxwit0-7\"\n})([\"display:flex;margin-left:6px;\"]);\nvar Styled = applyDisplayNames({\n Button: Button,\n Wrapper: Wrapper,\n Label: Label,\n SideArrows: SideArrows,\n Divider: Divider,\n StartIcon: StartIcon,\n EndIcon: EndIcon,\n Badge: Badge\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\", \"startIcon\", \"endIcon\", \"badge\", \"color\", \"active\", \"buttonType\", \"sideBarType\", \"size\", \"loading\", \"disabled\"];\nimport React from 'react';\nimport PT from 'prop-types';\nimport SpinnerIcon from '@scaleflex/icons/spinner';\nimport TwoArrowsRight from '@scaleflex/icons/two-arrows-right';\nimport TwoArrowsLeft from '@scaleflex/icons/two-arrows-left';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport Badge from '../badge';\nimport { ButtonSize, ButtonColor } from '../../utils/types';\nimport { ButtonType, SideBar } from './types';\nimport { getIconSize, getSideBarIconSize } from './button.utils';\nimport Styled from './button.styles';\nvar Button = intrinsicComponent(function (_ref, ref) {\n var children = _ref.children,\n startIcon = _ref.startIcon,\n endIcon = _ref.endIcon,\n badge = _ref.badge,\n color = _ref.color,\n active = _ref.active,\n buttonType = _ref.buttonType,\n _ref$sideBarType = _ref.sideBarType,\n sideBarType = _ref$sideBarType === void 0 ? SideBar.Left : _ref$sideBarType,\n size = _ref.size,\n loading = _ref.loading,\n disabled = _ref.disabled,\n rest = _objectWithoutProperties(_ref, _excluded);\n var getSideBarArrows = function getSideBarArrows(props) {\n switch (sideBarType) {\n case SideBar.Right:\n return active ? /*#__PURE__*/React.createElement(TwoArrowsLeft, props) : /*#__PURE__*/React.createElement(TwoArrowsRight, props);\n case SideBar.Left:\n return active ? /*#__PURE__*/React.createElement(TwoArrowsRight, props) : /*#__PURE__*/React.createElement(TwoArrowsLeft, props);\n default:\n }\n };\n var getSideBarSection = function getSideBarSection() {\n var sideBarSection = [/*#__PURE__*/React.createElement(Styled.SideArrows, {\n key: \"arrows\",\n sideBarType: sideBarType\n }, getSideBarArrows({\n size: getSideBarIconSize(size)\n }))];\n var divider = /*#__PURE__*/React.createElement(Styled.Divider, {\n key: \"divider\",\n size: size,\n sideBarType: sideBarType\n });\n if (sideBarType === SideBar.Right) {\n sideBarSection.unshift(divider);\n } else {\n sideBarSection.push(divider);\n }\n return buttonType === ButtonType.Sidebar && sideBarSection;\n };\n return /*#__PURE__*/React.createElement(Styled.Button, _extends({\n type: \"button\",\n buttonType: buttonType\n }, rest, {\n disabled: loading || disabled,\n sideBarType: sideBarType,\n color: color,\n active: active,\n size: size,\n ref: ref\n }), sideBarType === SideBar.Left && getSideBarSection(), /*#__PURE__*/React.createElement(Styled.Wrapper, null, startIcon && /*#__PURE__*/React.createElement(Styled.StartIcon, {\n $loading: loading,\n size: size\n }, typeof startIcon === 'function' ? loading ? /*#__PURE__*/React.createElement(SpinnerIcon, {\n size: getIconSize(size)\n }) : startIcon({\n size: getIconSize(size)\n }) :\n // eslint-disable-next-line unicorn/no-nested-ternary\n loading ? /*#__PURE__*/React.createElement(SpinnerIcon, {\n size: getIconSize(size)\n }) : startIcon), loading && !startIcon && /*#__PURE__*/React.createElement(Styled.StartIcon, {\n $loading: loading\n }, /*#__PURE__*/React.createElement(SpinnerIcon, {\n size: getIconSize(size)\n })), /*#__PURE__*/React.createElement(Styled.Label, null, children), endIcon && /*#__PURE__*/React.createElement(Styled.EndIcon, null, typeof endIcon === 'function' ? endIcon({\n size: getIconSize(size)\n }) : endIcon)), sideBarType === SideBar.Right && getSideBarSection(), badge && /*#__PURE__*/React.createElement(Styled.Badge, null, /*#__PURE__*/React.createElement(Badge, {\n inline: true,\n size: 14,\n padding: \"0 1px\",\n badgeContent: badge,\n color: color === ButtonColor.Primary ? 'white' : 'secondary'\n })));\n});\nButton.defaultProps = {\n size: ButtonSize.Md,\n color: ButtonColor.Secondary,\n buttonType: ButtonType.Default,\n active: false\n};\nButton.propTypes = {\n size: PT.oneOf(objectValues(ButtonSize)),\n color: PT.oneOf(objectValues(ButtonColor)),\n buttonType: PT.oneOf(objectValues(ButtonType)),\n sideBarType: PT.oneOf(objectValues(SideBar)),\n startIcon: PT.oneOfType([PT.node, PT.func]),\n endIcon: PT.oneOfType([PT.node, PT.func]),\n badge: PT.node,\n active: PT.bool,\n loading: PT.bool,\n disabled: PT.bool\n};\nexport default Button;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Image2 = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 42 42\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0.483002 4.49014V37.5097C0.483002 38.5725 0.90519 39.5917 1.65669 40.3432C2.40819 41.0947 3.42745 41.5169 4.49023 41.5169H37.5098C38.5726 41.5169 39.5918 41.0947 40.3433 40.3432C41.0948 39.5917 41.517 38.5725 41.517 37.5097V4.49014C41.517 3.42735 41.0948 2.4081 40.3433 1.6566C39.5918 0.905099 38.5726 0.48291 37.5098 0.48291H4.49023C3.42745 0.48291 2.40819 0.905099 1.65669 1.6566C0.90519 2.4081 0.483002 3.42735 0.483002 4.49014ZM38.9272 5.87776V31.3044L26.3817 19.5446L21.8068 22.3356L14.8048 15.3337L3.07279 23.0543V6.06233C3.07279 5.2695 3.38775 4.50913 3.94836 3.94851C4.50898 3.38789 5.26935 3.07294 6.06218 3.07294H36.1222C36.8661 3.07294 37.5795 3.36844 38.1055 3.89444C38.6316 4.42044 38.9272 5.13385 38.9272 5.87776Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M30.4602 15.6943C33.066 15.6943 35.1784 13.5819 35.1784 10.976C35.1784 8.37021 33.066 6.25777 30.4602 6.25777C27.8543 6.25777 25.7419 8.37021 25.7419 10.976C25.7419 13.5819 27.8543 15.6943 30.4602 15.6943Z\",\n fill: color\n }));\n});\nexport default Image2;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Undo = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 40 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M39.5112 31.2036C39.5112 41.568 31.0785 50 20.7148 50H14.0613C12.9587 50 12.0652 49.1066 12.0652 48.004V47.3386C12.0652 46.2359 12.9586 45.3425 14.0613 45.3425H20.7148C28.5107 45.3425 34.8537 38.9995 34.8537 31.2036C34.8537 23.4078 28.5107 17.0648 20.7148 17.0648H8.4394L16.8935 25.5189C17.8015 26.4266 17.8015 27.9042 16.8935 28.8119C16.0124 29.6923 14.479 29.691 13.5999 28.8119L1.17111 16.3828C0.731285 15.943 0.488892 15.3581 0.488892 14.7359C0.488892 14.1142 0.731285 13.529 1.17111 13.0894L13.6006 0.65976C14.4797 -0.220001 16.0144 -0.220001 16.8936 0.65976C17.8016 1.56722 17.8016 3.04511 16.8936 3.95246L8.43951 12.4072H20.7148C31.0785 12.4072 39.5112 20.8395 39.5112 31.2036Z\",\n fill: color\n }));\n});\nexport default Undo;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Redo = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 40 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0.98 31.2037C0.98 41.568 9.41216 50 19.7752 50H26.4284C27.5309 50 28.4244 49.1066 28.4244 48.004V47.3386C28.4244 46.2359 27.531 45.3425 26.4284 45.3425H19.7752C11.9798 45.3425 5.6372 38.9995 5.6372 31.2037C5.6372 23.4079 11.9798 17.0648 19.7752 17.0648H32.05L23.5964 25.5189C22.6884 26.4266 22.6884 27.9043 23.5964 28.812C24.4774 29.6924 26.0107 29.6911 26.8897 28.812L39.3178 16.3828C39.7576 15.943 40 15.3582 40 14.736C40 14.1142 39.7576 13.5291 39.3178 13.0895L26.8891 0.659821C26.01 -0.21994 24.4754 -0.21994 23.5962 0.659821C22.6883 1.56728 22.6883 3.04517 23.5962 3.95252L32.0498 12.4073H19.7752C9.41216 12.4073 0.98 20.8396 0.98 31.2037Z\",\n fill: color\n }));\n});\nexport default Redo;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Line = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M40.1901 7.27549L7.59689 39.8687C6.83412 40.6315 6.83412 41.8681 7.59689 42.6308C8.35965 43.3936 9.59626 43.3936 10.359 42.6308L42.9522 10.0376C43.715 9.27486 43.715 8.03825 42.9522 7.27549C42.1895 6.51272 40.9529 6.51272 40.1901 7.27549Z\",\n fill: color\n }));\n});\nexport default Line;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var ImageFilters = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M41.2229 16.7653C41.3215 12.426 39.7436 8.284 36.6864 5.02956C33.6292 1.77513 29.4872 -2.09808e-05 25.0493 -2.09808e-05C20.6114 -2.09808e-05 16.3708 1.77513 13.3136 5.02956C10.2564 8.18538 8.6785 12.3274 8.77712 16.7653C3.45168 19.5266 0 25.1479 0 31.1637C0 37.2781 3.25444 42.6035 8.57988 45.4635C11.0454 46.7455 13.7081 47.4359 16.2722 47.4359C19.3294 47.4359 22.288 46.5483 24.9507 44.8718C29.9803 48.1262 36.0947 48.3234 41.4201 45.4635C46.7456 42.6035 50 37.2781 50 31.1637C50 25.0493 46.6469 19.5266 41.2229 16.7653ZM22.7811 43.0966C18.6391 45.3649 13.7081 45.3649 9.56607 42.998C5.22682 40.5325 2.66272 36.1933 2.66272 31.1637C2.66272 26.43 5.12821 22.0907 9.1716 19.6252C10.1578 24.359 13.3136 28.501 17.6529 30.6706C17.4556 35.4043 19.3294 39.8422 22.7811 43.0966ZM32.1499 27.8106C31.4596 24.5562 29.783 21.499 27.3176 19.2307C30.6706 17.357 34.8126 17.0611 38.4615 18.3432C37.7712 22.2879 35.503 25.7396 32.1499 27.8106ZM20.6114 28.1065C21.3018 25.2465 22.8797 22.6824 25.0493 20.8087C27.5148 22.8797 29.1913 25.8382 29.6844 28.9941C26.7258 30.0789 23.4714 30.0789 20.4142 28.9941C20.4142 28.6982 20.5128 28.4023 20.6114 28.1065ZM25.0493 17.4556C23.57 16.4694 21.8935 15.7791 20.1183 15.3846C19.428 15.1874 18.6391 15.6805 18.5404 16.3708C18.4418 16.7653 18.5404 17.0611 18.7377 17.357C18.9349 17.6528 19.2308 17.8501 19.5266 17.9487C20.7101 18.2446 21.7949 18.639 22.7811 19.2307C20.3156 21.499 18.6391 24.4576 17.9487 27.8106C14.5957 25.7396 12.2288 22.2879 11.6371 18.3432C11.9329 18.2446 12.1302 18.1459 12.426 18.0473C12.7219 17.9487 13.0178 17.7515 13.215 17.357C13.4122 17.0611 13.4122 16.6666 13.3136 16.3708C13.1164 15.6805 12.3274 15.286 11.6371 15.4832C11.5385 15.4832 11.5385 15.4832 11.4398 15.5818C11.8343 8.48124 17.7515 2.6627 25.0493 2.6627C32.3471 2.6627 38.2643 8.38262 38.6588 15.5818C34.0237 14.2012 28.9941 14.8915 25.0493 17.4556ZM29.783 31.7554C29.5858 35.5029 27.9093 39.0532 25.0493 41.5187C22.1893 39.0532 20.4142 35.6016 20.3156 31.7554C23.3728 32.7416 26.7258 32.7416 29.783 31.7554ZM32.4458 30.6706C36.785 28.4023 39.8422 24.359 40.927 19.6252C44.9704 22.0907 47.4359 26.43 47.4359 31.1637C47.4359 36.0947 44.8718 40.5325 40.5325 42.998C36.3905 45.3649 31.4596 45.3649 27.3176 43.0966C30.7692 39.8422 32.643 35.4043 32.4458 30.6706Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M15.5819 14.8915C14.9901 14.9901 14.497 15.5818 14.497 16.1735C14.497 16.8639 15.0888 17.5542 15.8777 17.5542C16.6667 17.5542 17.2584 16.9625 17.2584 16.1735C17.2584 15.7791 17.0611 15.3846 16.7653 15.1874C16.3708 14.9901 15.9763 14.8915 15.5819 14.8915Z\",\n fill: color\n }));\n});\nexport default ImageFilters;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Crop = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M5 2.00049C3.34315 2.00049 2 3.34364 2 5.00049V16.7505H5.5V5.50049H16.75V2.00049H5ZM45 2.00049H33.25V5.50049H44.5V16.7505H48V5.00049C48 3.34363 46.6569 2.00049 45 2.00049ZM5.5 33.2505H2V45.0005C2 46.6573 3.34315 48.0005 5 48.0005H16.75V44.5005H5.5V33.2505ZM48 33.2505H44.5V44.5005H33.25V48.0005H45C46.6569 48.0005 48 46.6573 48 45.0005V33.2505Z\",\n fill: color\n }));\n});\nexport default Crop;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var CropLandscape = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 53 37\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M4.11841 3.93799V32.063H47.8684V3.93799H4.11841ZM3.49341 0.812988C2.1127 0.812988 0.993408 1.91229 0.993408 3.26835V32.7326C0.993408 34.0887 2.1127 35.188 3.49341 35.188H48.4934C49.8741 35.188 50.9934 34.0887 50.9934 32.7326V3.26835C50.9934 1.91229 49.8741 0.812988 48.4934 0.812988H3.49341Z\",\n fill: color\n }));\n});\nexport default CropLandscape;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Resize = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0.5 0.5H3V2.375H2.375V3H0.5V0.5Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M0.5 21.125H3V21.2693H24.7308V43H24.875V45.5L0.5 45.5001V21.125ZM22.2308 43L3 43.0001V23.7693H22.2308V43Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M43 45.5H45.5V43H43.625V43.625H43V45.5Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M45.5 3V0.5H43V2.375H43.625V3H45.5Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M6.125 0.5V3H9.875V0.5H6.125Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13.625 0.5V3H17.375V0.5H13.625Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M21.125 0.5V3H24.875V0.5H21.125Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M28.625 0.5V3H32.375V0.5H28.625Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M36.125 0.5V3H39.875V0.5H36.125Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M45.5 6.125H43V9.875H45.5V6.125Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M45.5 13.625H43V17.375H45.5V13.625Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M45.5 21.125H43V24.875H45.5V21.125Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M45.5 28.625H43V32.375H45.5V28.625Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M45.5 36.125H43V39.875H45.5V36.125Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M39.875 45.5V43H36.125V45.5H39.875Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M32.375 45.5V43H28.625V45.5H32.375Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0.5 17.375H3V13.625H0.5V17.375Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0.5 9.875H3V6.125H0.5V9.875Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M35.1391 9.23718L26.3209 17.8619C25.8274 18.3446 25.8186 19.136 26.3013 19.6295C26.784 20.1231 27.5754 20.1319 28.069 19.6492L37.1012 10.815V16.9907C37.1012 17.681 37.6609 18.2407 38.3512 18.2407C39.0416 18.2407 39.6012 17.681 39.6012 16.9907V7.98718C39.6012 7.29683 39.0416 6.73718 38.3512 6.73718L29.3477 6.73718C28.6574 6.73718 28.0977 7.29683 28.0977 7.98718C28.0977 8.67754 28.6574 9.23718 29.3477 9.23718L35.1391 9.23718Z\",\n fill: color\n }));\n});\nexport default Resize;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Watermark = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M42.1323 0.500031H2.73399C1.42693 0.500031 0.399963 1.527 0.399963 2.83406V43.166C0.399963 44.4731 1.42693 45.5 2.73399 45.5H42.1323C43.4394 45.5 44.4664 44.4731 44.4664 43.166V2.83406C44.4664 1.527 43.4394 0.500031 42.1323 0.500031ZM41.6655 3.30086V25.8942L36.624 21.693C36.1572 21.2262 35.4103 21.2262 34.8502 21.5996L28.595 26.2677L15.5244 11.2365C15.3377 10.9565 14.9643 10.7697 14.5908 10.7697C14.2174 10.7697 13.8439 10.9565 13.5639 11.1432L3.20079 21.693V3.30086H41.6655ZM3.20079 42.6992V39.8984C4.22776 40.3652 5.72154 40.832 7.58876 40.832C9.36262 40.832 10.483 40.2718 11.3232 39.805C12.0701 39.4316 12.5369 39.1515 13.3771 39.2448C14.3108 39.3382 14.8709 39.5249 15.4311 39.805C16.2713 40.0851 17.2049 40.4585 18.9788 40.4585V38.3112C17.6717 38.3112 17.0182 38.0312 16.178 37.7511C15.5244 37.471 14.6842 37.1909 13.5639 37.0975C12.0701 36.9108 11.1365 37.471 10.2962 37.8444C9.54934 38.2179 8.80245 38.5913 7.4954 38.5913C5.06801 38.5913 3.6676 37.7511 3.10743 37.2843V35.0436C4.1344 35.5104 5.62818 35.9772 7.4954 35.9772C9.26926 35.9772 10.3896 35.417 11.2298 34.9502C11.9767 34.5768 12.4435 34.2967 13.2838 34.3901C14.2174 34.4834 14.7776 34.6702 15.3377 34.9502C16.178 35.2303 17.1116 35.6038 18.8854 35.6038V33.4565C17.5784 33.4565 16.9249 33.1764 16.0846 32.8963C15.4311 32.6162 14.5908 32.3361 13.4705 32.2428C11.9767 32.056 11.0431 32.6162 10.2029 32.9897C9.45598 33.3631 8.70909 33.7365 7.40204 33.7365C4.97465 33.7365 3.57424 32.8963 3.01407 32.4295V30.1888C4.04104 30.6556 5.53482 31.1224 7.40204 31.1224C9.1759 31.1224 10.2962 30.5623 11.1365 30.0955C11.8834 29.722 12.3502 29.4419 13.1904 29.5353C14.124 29.6287 14.6842 29.8154 15.2444 30.0955C16.0846 30.3755 17.0182 30.749 18.7921 30.749V28.6017C17.485 28.6017 16.8315 28.3216 15.9912 28.0415C15.3377 27.7614 14.4975 27.4814 13.3771 27.388C11.8834 27.2013 10.9498 27.7614 10.1095 28.1349C9.36262 28.5083 8.61573 28.8818 7.30868 28.8818C4.88129 28.8818 3.48088 28.0415 2.92071 27.5747V25.7075L14.124 14.2241L27.1012 29.0685C27.568 29.6287 28.4083 29.722 28.9684 29.2552L35.4103 24.4004L41.3854 29.4419V42.6058H3.20079V42.6992Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M32.7029 15.7179C35.4103 15.7179 37.651 13.4772 37.651 10.7697C37.651 8.06227 35.4103 5.82161 32.7029 5.82161C29.9954 5.82161 27.7547 8.06227 27.7547 10.7697C27.7547 13.4772 29.9954 15.7179 32.7029 15.7179ZM32.7029 8.15563C34.1966 8.15563 35.317 9.36933 35.317 10.7697C35.317 12.1702 34.1033 13.3838 32.7029 13.3838C31.3025 13.3838 30.0888 12.1702 30.0888 10.7697C30.0888 9.36933 31.2091 8.15563 32.7029 8.15563Z\",\n fill: color\n }));\n});\nexport default Watermark;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Images = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M43.4164 5.98527H1.06762C0.533808 5.98527 0 6.53674 0 7.08821V49C0 49.7353 0.533808 50.1029 1.06762 50.1029H43.4164C44.1281 50.1029 44.484 49.7353 44.484 49V7.08821C44.484 6.53674 44.1281 5.98527 43.4164 5.98527ZM35.7651 13.1544C37.9004 13.1544 39.5 15.0809 39.5 17.1029C39.5 19.3088 37.7224 20.6029 35.7651 20.6029C33.8078 20.6029 32 19.125 32 17.1029C31.8221 14.897 33.6299 13.1544 35.7651 13.1544ZM1.9573 45.875C2.13523 45.6912 14.2349 30.9853 16.548 27.8603C16.726 27.4926 17.2598 27.4926 17.4377 27.8603L29.7153 43.4853L35.0534 37.4191C35.4093 37.0514 35.7651 37.2353 35.9431 37.4191L42.5267 45.875H1.9573Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M48.9164 -3.8147e-06H6.74555C6.03381 -3.8147e-06 5.5 0.367643 5.5 1.10294V4.29294H7.5V2.20588H47.6892V39H46.2473V44.1176H48.9164C49.6281 44.1176 49.984 43.75 49.984 43.0147V1.10294C49.984 0.367643 49.6281 -3.8147e-06 48.9164 -3.8147e-06Z\",\n fill: color\n }));\n});\nexport default Images;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Reset = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 52 52\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M25 0C38.8071 0 50 11.1929 50 25C50 38.807 38.8071 50 25 50C14.111 50 4.854 43.0397 1.42326 33.333C0.963005 32.0312 1.6455 30.603 2.94725 30.143C4.249 29.6828 5.67725 30.365 6.1375 31.667C8.88425 39.4382 16.2957 45 25 45C36.0457 45 45 36.0457 45 25C45 13.9543 36.0457 5 25 5C21.121 5 17.8345 6.40292 14.7095 8.6015C12.6078 10.0803 10.663 11.8526 8.6895 13.75H16.25C17.6308 13.75 18.75 14.8693 18.75 16.25C18.75 17.6307 17.6308 18.75 16.25 18.75H2.5C1.11926 18.75 0 17.6307 0 16.25V2.5C0 1.1193 1.11926 0 2.5 0C3.88075 0 5 1.1193 5 2.5V10.3593C7.12075 8.31457 9.38601 6.23342 11.8325 4.51222C15.5128 1.9229 19.7882 0 25 0Z\",\n fill: color\n }));\n});\nexport default Reset;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Text = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M39.4229 8.89453L39.7891 16.6582H38.8613C38.6823 15.291 38.4382 14.3145 38.1289 13.7285C37.6243 12.7845 36.9489 12.0928 36.1025 11.6533C35.2725 11.1976 34.1738 10.9697 32.8066 10.9697H28.1436V36.2627C28.1436 38.2972 28.3633 39.5667 28.8027 40.0713C29.4212 40.7549 30.3734 41.0967 31.6592 41.0967H32.8066V42H18.7686V41.0967H19.9404C21.3402 41.0967 22.333 40.6735 22.9189 39.8271C23.277 39.3063 23.4561 38.1182 23.4561 36.2627V10.9697H19.4766C17.9303 10.9697 16.8317 11.0837 16.1807 11.3115C15.3343 11.6208 14.61 12.2148 14.0078 13.0938C13.4056 13.9727 13.0475 15.1608 12.9336 16.6582H12.0059L12.3965 8.89453H39.4229Z\",\n fill: color\n }));\n});\nexport default Text;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var TextAlignLeft = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 45 29\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0 1.89502C0 1.20466 0.559644 0.64502 1.25 0.64502H28.75C29.4404 0.64502 30 1.20466 30 1.89502C30 2.58538 29.4404 3.14502 28.75 3.14502H1.25C0.559645 3.14502 0 2.58538 0 1.89502Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0 14.395C0 13.7047 0.559644 13.145 1.25 13.145H43.75C44.4404 13.145 45 13.7047 45 14.395C45 15.0854 44.4404 15.645 43.75 15.645H1.25C0.559645 15.645 0 15.0854 0 14.395Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M1.25 25.645C0.559644 25.645 0 26.2047 0 26.895C0 27.5854 0.559645 28.145 1.25 28.145H28.75C29.4404 28.145 30 27.5854 30 26.895C30 26.2047 29.4404 25.645 28.75 25.645H1.25Z\",\n fill: color\n }));\n});\nexport default TextAlignLeft;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var TextAlignCenter = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 46 28\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M38 1.50049C38 0.810132 37.4404 0.250488 36.75 0.250488H9.25C8.55964 0.250488 8 0.810132 8 1.50049C8 2.19084 8.55964 2.75049 9.25 2.75049H36.75C37.4404 2.75049 38 2.19084 38 1.50049Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M45.5 14.0005C45.5 13.3101 44.9404 12.7505 44.25 12.7505H1.75C1.05964 12.7505 0.5 13.3101 0.5 14.0005C0.5 14.6908 1.05964 15.2505 1.75 15.2505H44.25C44.9404 15.2505 45.5 14.6908 45.5 14.0005Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M36.75 25.2505C37.4404 25.2505 38 25.8101 38 26.5005C38 27.1908 37.4404 27.7505 36.75 27.7505H9.25C8.55964 27.7505 8 27.1908 8 26.5005C8 25.8101 8.55964 25.2505 9.25 25.2505H36.75Z\",\n fill: color\n }));\n});\nexport default TextAlignCenter;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var RotationLeft = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 45 43\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M2.66027 14.6997L3.59752 14.4437L3.09232 3.93218C3.05918 3.24262 2.47331 2.71049 1.78375 2.74363C1.09419 2.77677 0.562061 3.36263 0.595202 4.05219L1.16041 15.8123C1.19355 16.5018 1.77942 17.034 2.46898 17.0008L14.2291 16.4356C14.9186 16.4025 15.4508 15.8166 15.4176 15.1271C15.3845 14.4375 14.7986 13.9054 14.1091 13.9385L5.48447 14.353C8.23224 7.41077 15.0052 2.50049 22.925 2.50049C33.2802 2.50049 41.6748 10.8951 41.6748 21.2503C41.6748 22.4035 41.5706 23.5324 41.3713 24.6281L43.7968 25.261C44.0449 23.9622 44.1748 22.6214 44.1748 21.2503C44.1748 9.51435 34.6609 0.000488281 22.925 0.000488281C15.0467 0.000488281 8.16974 4.28779 4.50001 10.6566L2.66027 14.6997Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9.88491 34.708L8.27773 36.6309C8.82614 37.1539 9.40248 37.6479 10.0043 38.1103L11.5276 36.128C10.9528 35.6863 10.4043 35.2121 9.88491 34.708Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12.3142 39.6567C13.9038 40.5764 15.6235 41.2961 17.439 41.7814L18.0846 39.3662C16.4846 38.9385 14.9685 38.3041 13.5662 37.4928L12.3142 39.6567Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M20.1654 42.3209C21.0738 42.4394 22.0002 42.5005 22.9408 42.5005C23.8815 42.5005 24.8079 42.4394 25.7162 42.3209L25.3929 39.8419C24.5915 39.9465 23.7731 40.0005 22.9408 40.0005C22.1086 40.0005 21.2902 39.9465 20.4888 39.8419L20.1654 42.3209Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M28.4427 41.7814C30.2582 41.2961 31.9779 40.5764 33.5674 39.6567L32.3154 37.4928C30.9132 38.3041 29.397 38.9385 27.7971 39.3662L28.4427 41.7814Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M35.8774 38.1103C37.3494 36.9791 38.6692 35.6594 39.8004 34.1873L37.8181 32.664C36.8193 33.9638 35.6538 35.1292 34.354 36.128L35.8774 38.1103Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M41.3468 31.8773C42.2665 30.2878 42.9862 28.5681 43.4715 26.7526L41.0563 26.107C40.6286 27.707 39.9942 29.2231 39.1829 30.6253L41.3468 31.8773Z\",\n fill: color\n }));\n});\nexport default RotationLeft;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var RotationRight = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"g\", {\n clipPath: \"url(#clip0)\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M50.2753 26.8064H24.4689L36.5656 14.7096C32.735 11.0806 28.7027 9.66933 23.6624 9.66933C13.3802 9.66933 6.32372 15.3145 3.50118 25.5967L0.275391 24.7903C3.50118 13.0968 11.9689 6.44355 23.6625 6.44355C29.7109 6.44355 34.348 8.25806 38.9851 12.2903L50.2754 1L50.2753 26.8064Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M34.5495 46.3628L33.1382 44.3467C33.743 43.9435 34.3479 43.3386 34.9527 42.9355L36.5656 44.75C35.9608 45.1532 35.3559 45.758 34.5495 46.3628Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M27.2913 49.387C26.6865 49.5886 26.0817 49.5886 25.4768 49.7903L25.0736 47.3709C26.4848 47.1693 27.8962 46.7661 29.3074 46.3628L30.1139 48.5806C29.1058 48.9838 28.2994 49.1854 27.2913 49.387ZM20.4365 49.9919C18.8235 49.7903 17.2107 49.5886 15.5978 48.9838L16.4042 46.766C17.8155 47.1693 19.2268 47.5724 20.6381 47.5724L20.4365 49.9919ZM11.1623 46.9677C9.75104 46.1612 8.33971 45.1532 7.13003 43.9435L8.74296 42.129C9.75104 43.137 10.9607 43.9435 12.372 44.7499L11.1623 46.9677ZM3.90425 40.3144C2.89617 38.9032 2.08974 37.2903 1.6865 35.879L3.90425 35.0726C4.50909 36.4838 5.11393 37.6935 5.92036 38.9032L3.90425 40.3144Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M3.2996 30.0322L0.880241 30.2338C0.678647 29.2257 0.678647 28.4193 0.678647 27.4112H3.09801C3.09801 28.4193 3.2996 29.2258 3.2996 30.0322Z\",\n fill: color\n })), /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"rect\", {\n width: \"50\",\n height: \"50\",\n fill: \"white\",\n transform: \"translate(0.275391)\"\n })));\n});\nexport default RotationRight;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var LockOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 51 51\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M40.5 20H38V12.5C38 5.6 32.4 0 25.5 0C18.6 0 13 5.6 13 12.5V20H10.5C9.1 20 8 21.1 8 22.5V47.5C8 48.9 9.1 50 10.5 50H40.5C41.9 50 43 48.9 43 47.5V22.5C43 21.1 41.9 20 40.5 20ZM15.5 12.5C15.5 7 20 2.5 25.5 2.5C31 2.5 35.5 7 35.5 12.5V20H15.5V12.5ZM40.5 47.5H10.5V22.5H40.5V47.5Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M24.3 37.3V41.3H26.8V37.3C28.3 36.8 29.3 35.4 29.3 33.8C29.3 31.7 27.6 30 25.5 30C23.4 30 21.7 31.7 21.7 33.8C21.8 35.4 22.8 36.8 24.3 37.3ZM25.5 32.5C26.2 32.5 26.8 33.1 26.8 33.8C26.8 34.5 26.2 35.1 25.5 35.1C24.8 35.1 24.2 34.5 24.2 33.8C24.3 33.1 24.8 32.5 25.5 32.5Z\",\n fill: color\n }));\n});\nexport default LockOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var UnlockOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 52 52\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M36.2754 7.5C34.2754 3.1 29.8754 0 24.7754 0C17.8754 0 12.2754 5.6 12.2754 12.5V20H9.77539C8.37539 20 7.27539 21.1 7.27539 22.5V47.5C7.27539 48.9 8.37539 50 9.77539 50H39.7754C41.1754 50 42.2754 48.9 42.2754 47.5V22.5C42.2754 21.1 41.1754 20 39.7754 20H14.7754V12.5C14.7754 7 19.2754 2.5 24.7754 2.5C28.4754 2.5 31.7754 4.5 33.4754 7.6L36.2754 7.5ZM39.7754 47.5H9.77539V22.5H39.7754V47.5Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M24.7754 30C22.6754 30 20.9754 31.7 20.9754 33.7C20.9754 35.3 21.9754 36.7 23.4754 37.2V41.2H25.9754V37.2C27.4754 36.7 28.4754 35.3 28.4754 33.7C28.5754 31.7 26.8754 30 24.7754 30ZM24.7754 35C24.0754 35 23.4754 34.4 23.4754 33.7C23.4754 33 24.0754 32.4 24.7754 32.4C25.4754 32.4 25.9754 33 25.9754 33.7C25.9754 34.4 25.4754 35 24.7754 35Z\",\n fill: color\n }));\n});\nexport default UnlockOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Point = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"circle\", {\n cx: \"25\",\n cy: \"25\",\n r: \"8.33333\",\n fill: color\n }));\n});\nexport default Point;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var About = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M42.6793 7.32203C32.916 -2.44013 17.0863 -2.44122 7.32197 7.32203C-2.44128 17.0853 -2.4402 32.915 7.32197 42.6793C17.0852 52.4404 32.9149 52.4415 42.6793 42.6793C52.4414 32.915 52.4403 17.0864 42.6793 7.32203ZM28.2605 35.8705C28.2605 37.6716 26.8007 39.1314 24.9995 39.1314C23.1984 39.1314 21.7386 37.6716 21.7386 35.8705V22.8267C21.7386 21.0256 23.1984 19.5658 24.9995 19.5658C26.8007 19.5658 28.2605 21.0256 28.2605 22.8267V35.8705ZM24.9419 17.2527C23.0636 17.2527 21.8114 15.9222 21.8506 14.2798C21.8114 12.558 23.0636 11.2678 24.98 11.2678C26.8974 11.2678 28.1105 12.5591 28.1507 14.2798C28.1496 15.9222 26.8985 17.2527 24.9419 17.2527Z\",\n fill: color\n }));\n});\nexport default About;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Warning = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M48.9856 38.314L31.3034 3.80423C29.9688 1.42247 27.6118 0 24.9985 0C22.3852 0 20.0282 1.42247 18.6936 3.80423C18.6836 3.82245 18.6751 3.84067 18.665 3.8589L1.04158 38.2594C-0.321602 40.6914 -0.347383 43.612 0.971367 46.0713C2.29314 48.5321 4.67439 50 7.345 50H42.5544C45.225 50 47.7041 48.5321 49.0258 46.0713C50.3445 43.6121 50.3188 40.6913 48.9856 38.314ZM22.0659 15.8013C22.0659 14.0842 23.3789 12.6924 24.9985 12.6924C26.6182 12.6924 27.9311 14.0843 27.9311 15.8013V28.2372C27.9311 29.9541 26.6181 31.3462 24.9985 31.3462C23.3789 31.3462 22.0659 29.954 22.0659 28.2372V15.8013ZM24.9985 43.7821C22.5728 43.7821 20.5995 41.6902 20.5995 39.1186C20.5995 36.5471 22.5727 34.4552 24.9985 34.4552C27.4242 34.4552 29.3974 36.5471 29.3974 39.1186C29.3975 41.6901 27.4243 43.7821 24.9985 43.7821Z\",\n fill: color\n }));\n});\nexport default Warning;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var InfoOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M25 50C11.2033 50 0 38.7967 0 25C0 11.2033 11.2033 0 25 0C38.7967 0 50 11.2033 50 25C50 38.7967 38.6929 50 25 50ZM25 3.52697C13.1743 3.52697 3.63071 13.1743 3.63071 24.8963C3.63071 36.6183 13.278 46.2656 25 46.2656C36.8257 46.2656 46.3693 36.6183 46.3693 24.8963C46.3693 13.1743 36.8257 3.52697 25 3.52697Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M28.3755 13.125C28.3755 11.3992 26.9765 10 25.2505 10C23.5245 10 22.1255 11.3992 22.1255 13.125C22.1255 14.8516 23.5245 16.25 25.2505 16.25C26.9765 16.25 28.3755 14.8516 28.3755 13.125Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M20.563 38.5H29.938C30.8009 38.5 31.5005 37.8012 31.5005 36.9375C31.5005 36.0746 30.8009 35.375 29.938 35.375H28.3755V20.9375C28.3755 20.0746 27.6759 19.375 26.813 19.375H20.563C19.7001 19.375 19.0005 20.0746 19.0005 20.9375C19.0005 21.8012 19.7001 22.5 20.563 22.5H22.1255V35.375H20.563C19.7001 35.375 19.0005 36.0746 19.0005 36.9375C19.0005 37.8012 19.7001 38.5 20.563 38.5Z\",\n fill: color\n }));\n});\nexport default InfoOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var ImageOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M31.3032 17.8662C34.0646 17.8662 36.3032 15.6276 36.3032 12.8662C36.3032 10.1048 34.0646 7.86618 31.3032 7.86618C28.5418 7.86618 26.3032 10.1048 26.3032 12.8662C26.3032 15.6276 28.5418 17.8662 31.3032 17.8662ZM31.3032 15.3662C32.6839 15.3662 33.8032 14.2469 33.8032 12.8662C33.8032 11.4855 32.6839 10.3662 31.3032 10.3662C29.9225 10.3662 28.8032 11.4855 28.8032 12.8662C28.8032 14.2469 29.9225 15.3662 31.3032 15.3662Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M15.9372 15.1063C16.3967 15.0794 16.8338 15.3071 17.075 15.6991L25.0831 28.7141L29.8357 24.4289C30.0935 24.1966 30.4362 24.0818 30.7819 24.1121C31.1276 24.1424 31.4452 24.3151 31.6586 24.5887L40.2822 35.6497C40.5759 36.0264 40.6292 36.5376 40.4196 36.9668C40.21 37.396 39.7741 37.6683 39.2964 37.6683H6.70331C6.2766 37.6683 5.87937 37.4506 5.64974 37.091C5.42011 36.7313 5.38981 36.2794 5.56937 35.8923L14.8765 15.8282C15.0702 15.4106 15.4777 15.1333 15.9372 15.1063ZM16.1652 18.991L8.66108 35.1683H36.7368L30.5126 27.1848L25.6422 31.5761C25.3666 31.8246 24.9947 31.9378 24.6274 31.885C24.26 31.8322 23.9351 31.6189 23.7406 31.3027L16.1652 18.991Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M0.5 3C0.5 1.61929 1.61929 0.5 3 0.5H43C44.3807 0.5 45.5 1.61929 45.5 3V43C45.5 44.3807 44.3807 45.5 43 45.5H3C1.61929 45.5 0.5 44.3807 0.5 43V3ZM3 3H43V43H3V3Z\",\n fill: color\n }));\n});\nexport default ImageOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Custom = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M0.562515 0.562512H3.68752V2.90626H2.90627V3.68751H0.562515V0.562512ZM0.562515 44.3125V47.4375H3.68752V45.0938H2.90627V44.3125H0.562515ZM44.3125 47.4375H47.4375V44.3125H45.0938V45.0938H44.3125V47.4375ZM47.4375 3.68751V0.562512H44.3125V2.90626H45.0938V3.68751H47.4375ZM7.59376 0.562512V3.68751H12.2813V0.562512H7.59376ZM16.9688 0.562512V3.68751H21.6563V0.562512H16.9688ZM26.3438 0.562512V3.68751H31.0313V0.562512H26.3438ZM35.7188 0.562512V3.68751H40.4063V0.562512H35.7188ZM47.4375 7.59376H44.3125V12.2813H47.4375V7.59376ZM47.4375 16.9688H44.3125V21.6563H47.4375V16.9688ZM47.4375 26.3438H44.3125V31.0313H47.4375V26.3438ZM47.4375 35.7188H44.3125V40.4063H47.4375V35.7188ZM40.4063 47.4375V44.3125H35.7188V47.4375H40.4063ZM31.0313 47.4375V44.3125H26.3438V47.4375H31.0313ZM21.6563 47.4375V44.3125H16.9688V47.4375H21.6563ZM12.2813 47.4375V44.3125H7.59377V47.4375H12.2813ZM0.562515 40.4063H3.68752V35.7188H0.562515V40.4063ZM0.562515 31.0313H3.68752V26.3438H0.562515V31.0313ZM0.562515 21.6563H3.68752V16.9688H0.562515V21.6563ZM0.562515 12.2813H3.68752V7.59376H0.562515V12.2813Z\",\n fill: color\n }));\n});\nexport default Custom;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var FlipY = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M37.5001 24.0625C38.2086 24.0625 38.8284 23.5858 39.0102 22.901C39.1921 22.2162 38.8904 21.4948 38.2753 21.1433L3.27531 1.14333C2.79171 0.866989 2.19757 0.868973 1.71583 1.14854C1.23409 1.4281 0.937592 1.94298 0.937592 2.49996V22.5C0.937592 23.3629 1.63715 24.0625 2.50009 24.0625L37.5001 24.0625ZM4.06259 20.9375L4.06259 5.19243L31.6164 20.9375L4.06259 20.9375Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M38.2753 28.8566C38.8904 28.5051 39.1921 27.7837 39.0102 27.0989C38.8284 26.4142 38.2086 25.9375 37.5001 25.9375H35.3126V26.9504L34.5374 27.3933L35.3126 28.75V29.0625H35.4912L36.0878 30.1066L38.2753 28.8566Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M27.3378 35.1066L31.7128 32.6066L30.1624 29.8933L25.7874 32.3933L27.3378 35.1066Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M30.9376 25.9375H26.5626L26.5626 29.0625H30.9376L30.9376 25.9375Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M18.5878 40.1066L22.9628 37.6066L21.4124 34.8933L17.0374 37.3933L18.5878 40.1066Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M22.1876 25.9375H17.8126V29.0625H22.1876V25.9375Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9.83781 45.1066L14.2128 42.6066L12.6624 39.8933L8.28738 42.3933L9.83781 45.1066Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13.4376 25.9375H9.0626V29.0625H13.4376V25.9375Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M3.27531 48.8566L5.46281 47.6066L4.06259 45.1562V45H3.97331L3.91238 44.8933L3.72578 45H0.937592V47.5C0.937592 48.0569 1.23409 48.5718 1.71583 48.8514C2.19758 49.1309 2.79171 49.1329 3.27531 48.8566Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M4.6876 25.9375L2.50009 25.9375C1.63715 25.9375 0.937592 26.637 0.937592 27.5V30H4.06259V29.0625H4.6876V25.9375Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0.937592 35V40L4.06259 40V35H0.937592Z\",\n fill: color\n }));\n});\nexport default FlipY;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var FlipX = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M24.0625 1.93758C24.0625 1.22909 23.5858 0.609274 22.901 0.427427C22.2163 0.245581 21.4949 0.547225 21.1434 1.16237L1.14337 39.2874C0.867028 39.771 0.869012 40.3651 1.14858 40.8468C1.42814 41.3286 1.94302 41.6251 2.5 41.6251H22.5C23.3629 41.6251 24.0625 40.9255 24.0625 40.0626V1.93758ZM20.9375 38.5001H5.19247L20.9375 7.82128V38.5001Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M28.8566 1.16237C28.5051 0.547225 27.7837 0.245581 27.099 0.427428C26.4142 0.609274 25.9375 1.22909 25.9375 1.93758V4.12508H26.9504L27.3934 4.9003L28.75 4.12508H29.0625V3.94651L30.1066 3.34986L28.8566 1.16237Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M35.1066 12.0999L32.6066 7.72486L29.8934 9.2753L32.3934 13.6503L35.1066 12.0999Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M25.9375 8.50008V12.8751H29.0625V8.50008H25.9375Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M40.1066 23.9749L37.6066 19.5999L34.8934 21.1503L37.3934 25.5253L40.1066 23.9749Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M25.9375 20.3751V24.7501H29.0625V20.3751H25.9375Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M45.1066 32.7249L42.6066 28.3499L39.8934 29.9003L42.3934 34.2753L45.1066 32.7249Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M25.9375 29.1251V33.5001H29.0625V29.1251H25.9375Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M48.8566 39.2874L47.6066 37.0999L45.1562 38.5001H45V38.5894L44.8934 38.6503L45 38.8369V41.6251H47.5C48.057 41.6251 48.5719 41.3286 48.8514 40.8468C49.131 40.3651 49.133 39.771 48.8566 39.2874Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M25.9375 37.8751V40.0626C25.9375 40.9255 26.6371 41.6251 27.5 41.6251H30V38.5001H29.0625V37.8751H25.9375Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M35 41.6251H40V38.5001H35V41.6251Z\",\n fill: color\n }));\n});\nexport default FlipX;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Ellipse = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 52 52\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M25.2047 46.875C37.2859 46.875 47.0797 37.0812 47.0797 25C47.0797 12.9188 37.2859 3.125 25.2047 3.125C13.1235 3.125 3.32968 12.9188 3.32968 25C3.32968 37.0812 13.1235 46.875 25.2047 46.875ZM25.2047 50C39.0118 50 50.2047 38.8071 50.2047 25C50.2047 11.1929 39.0118 0 25.2047 0C11.3976 0 0.204681 11.1929 0.204681 25C0.204681 38.8071 11.3976 50 25.2047 50Z\",\n fill: color\n }));\n});\nexport default Ellipse;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Landscape = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 51 36\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M4.11841 3.93805V32.063H47.8684V3.93805H4.11841ZM3.49341 0.813049C2.1127 0.813049 0.993408 1.91235 0.993408 3.26841V32.7327C0.993408 34.0887 2.1127 35.188 3.49341 35.188H48.4934C49.8741 35.188 50.9934 34.0887 50.9934 32.7327V3.26841C50.9934 1.91235 49.8741 0.813049 48.4934 0.813049H3.49341Z\",\n fill: color\n }));\n});\nexport default Landscape;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Stroke = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M5.50015 7.9997C5.50015 6.61898 6.61944 5.49969 8.00015 5.49969H38.0002C39.3809 5.49969 40.5002 6.61898 40.5002 7.99969V37.9997C40.5002 39.3804 39.3809 40.4997 38.0002 40.4997H8.00015C6.61944 40.4997 5.50015 39.3804 5.50015 37.9997V7.9997ZM8.00015 7.99969H38.0002V37.9997H8.00015V7.99969Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M0.5 3C0.5 1.61929 1.61929 0.5 3 0.5H43C44.3807 0.5 45.5 1.61929 45.5 3V43C45.5 44.3807 44.3807 45.5 43 45.5H3C1.61929 45.5 0.5 44.3807 0.5 43V3ZM3 3H43V43H3V3Z\",\n fill: color\n }));\n});\nexport default Stroke;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Transparency = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0.166672 0.166664H8.50001V8.5H0.166672V0.166664Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M16.8333 8.5H8.50001V16.8333H0.166672V25.1667H8.50001V33.5H0.166672V41.8333H8.50001V33.5H16.8333V41.8333H25.1667V33.5H33.5V41.8333H41.8333V33.5H33.5V25.1667H41.8333V16.8333H33.5V8.5H41.8333V0.166664H33.5V8.5H25.1667V0.166664H16.8333V8.5ZM16.8333 16.8333V8.5H25.1667V16.8333H16.8333ZM16.8333 25.1667V33.5H25.1667V25.1667H33.5V16.8333H25.1667V25.1667H16.8333ZM16.8333 25.1667H8.50001V16.8333H16.8333V25.1667Z\",\n fill: color\n }));\n});\nexport default Transparency;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Shadow = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M2.95831 0.458374C1.5776 0.458374 0.458313 1.57766 0.458313 2.95837V35.4584C0.458313 36.8391 1.5776 37.9584 2.95831 37.9584H7.54167V43.7917C7.54167 45.8627 9.2206 47.5417 11.2917 47.5417H43.7917C45.8627 47.5417 47.5417 45.8627 47.5417 43.7917V11.2917C47.5417 9.22059 45.8627 7.54166 43.7917 7.54166H37.9583V2.95837C37.9583 1.57766 36.839 0.458374 35.4583 0.458374H2.95831ZM35.4583 2.95837H2.95831L2.95831 35.4584H35.4583V2.95837ZM15.7267 37.9584L10.0417 43.746V37.9584H15.7267ZM11.5135 45.0417L18.4712 37.9584H28.5529L21.4696 45.0417H11.5135ZM24.4159 45.0417H34.2932L45.0417 34.1339V24.0207L37.9583 31.3242V35.4584C37.9583 36.8391 36.839 37.9584 35.4583 37.9584H31.4912C31.4689 37.9859 31.445 38.0126 31.4194 38.0382L24.4159 45.0417ZM45.0417 21.3515L37.9583 28.655V18.9107L45.0417 11.8338V21.3515ZM37.0311 45.0417H43.7917C44.482 45.0417 45.0417 44.482 45.0417 43.7917V36.9124L37.0311 45.0417ZM43.8844 10.045C43.8538 10.0428 43.8229 10.0417 43.7917 10.0417H37.9583V15.9657L43.8844 10.045Z\",\n fill: color\n }));\n});\nexport default Shadow;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var RadiusCorner = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M3 3H23V0.5H3C1.61929 0.5 0.5 1.61929 0.5 3V43C0.5 44.3807 1.61929 45.5 3 45.5H43C44.3807 45.5 45.5 44.3807 45.5 43V23H43V43H3V3Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M45.5 7.25076H43V5.50076C43 5.15718 42.9321 4.83576 42.8113 4.54446L45.1206 3.58682C45.3651 4.17636 45.5 4.82281 45.5 5.50076V7.25076Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M24.75 0.500763V3.00076H28.25V0.500763H24.75Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M31.75 0.500763V3.00076H35.25V0.500763H31.75Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M38.75 0.500763V3.00076H40.5C40.8436 3.00076 41.165 3.06868 41.4563 3.18948L42.414 0.880166C41.8244 0.635694 41.178 0.500763 40.5 0.500763H38.75Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M45.5 10.7508H43V14.2508H45.5V10.7508Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M45.5 17.7508H43V21.2508H45.5V17.7508Z\",\n fill: color\n }));\n});\nexport default RadiusCorner;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Position = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9.25008 9.24878H11.7501V10.9675H10.9688V11.7488H9.25008V9.24878Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9.25008 34.2488V36.7488H11.7501V35.03H10.9688V34.2488H9.25008Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M34.2501 36.7488H36.7501V34.2488H35.0313V35.03H34.2501V36.7488Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M36.7501 11.7488V9.24878H34.2501V10.9675H35.0313V11.7488H36.7501Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M14.4063 9.24878V11.7488H17.8438V9.24878H14.4063Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M21.2813 9.24878V11.7488H24.7188V9.24878H21.2813Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M28.1563 9.24878V11.7488H31.5938V9.24878H28.1563Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M36.7501 14.405H34.2501V17.8425H36.7501V14.405Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M36.7501 21.28H34.2501V24.7175H36.7501V21.28Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M36.7501 28.155H34.2501V31.5925H36.7501V28.155Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M31.5938 36.7488V34.2488H28.1563V36.7488H31.5938Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M24.7188 36.7488V34.2488H21.2813V36.7488H24.7188Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M17.8438 36.7488V34.2488H14.4063V36.7488H17.8438Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9.25008 31.5925H11.7501V28.155H9.25008V31.5925Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9.25008 24.7175H11.7501V21.28H9.25008V24.7175Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9.25008 17.8425H11.7501V14.405H9.25008V17.8425Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M23.0002 26.7497C25.0712 26.7497 26.7502 25.0708 26.7502 22.9997C26.7502 20.9286 25.0712 19.2497 23.0002 19.2497C20.9291 19.2497 19.2502 20.9286 19.2502 22.9997C19.2502 25.0708 20.9291 26.7497 23.0002 26.7497Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M3 0.5C1.61929 0.5 0.5 1.61929 0.5 3V43C0.5 44.3807 1.61929 45.5 3 45.5H43C44.3807 45.5 45.5 44.3807 45.5 43V3C45.5 1.61929 44.3807 0.5 43 0.5H3ZM43 3H3V43H43V3Z\",\n fill: color\n }));\n});\nexport default Position;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Spacing = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M4.29986 0.991788C4.78802 0.503633 5.57947 0.503633 6.06763 0.991788L9.367 4.29116C9.85516 4.77932 9.85516 5.57077 9.367 6.05893C8.87885 6.54708 8.08739 6.54708 7.59924 6.05893L6.43374 4.89344V34.0829L7.59924 32.9174C8.08739 32.4293 8.87885 32.4293 9.367 32.9174C9.85516 33.4056 9.85516 34.197 9.367 34.6852L6.06763 37.9846C5.8332 38.219 5.51524 38.3507 5.18371 38.3507C4.85217 38.3507 4.53422 38.219 4.29981 37.9845L1.00084 34.6851C0.512712 34.1969 0.512761 33.4055 1.00095 32.9174C1.48913 32.4292 2.28059 32.4293 2.76871 32.9175L3.93374 34.0827V4.89344L2.76825 6.05893C2.2801 6.54708 1.48864 6.54708 1.00049 6.05893C0.51233 5.57077 0.51233 4.77932 1.00049 4.29116L4.29986 0.991788ZM13.1588 8.34109V1.49725H46.3156V8.34102H43.398V7.19776C43.398 5.54595 42.0562 4.20442 40.4047 4.20442H31.8516V26.0992C31.8516 28.1387 33.5088 29.7957 35.5481 29.7957H36.5137V32.4599H23.01V29.7957H23.9756C26.0151 29.7957 27.6721 28.1387 27.6721 26.0992V4.20448H19.0697C17.418 4.20448 16.0763 5.54604 16.0763 7.19783V8.34109H13.1588ZM46.9995 39.7088C47.4877 39.2207 47.4877 38.4292 46.9995 37.9411L43.7001 34.6417C43.212 34.1535 42.4205 34.1535 41.9324 34.6417C41.4442 35.1298 41.4442 35.9213 41.9324 36.4095L43.0979 37.5749L15.0832 37.5749L16.2484 36.4099C16.7366 35.9218 16.7366 35.1303 16.2485 34.6421C15.7604 34.154 14.9689 34.1539 14.4807 34.642L11.1814 37.941C10.9469 38.1754 10.8152 38.4934 10.8152 38.8249C10.8152 39.1564 10.9469 39.4744 11.1813 39.7088L14.4807 43.0082C14.9688 43.4964 15.7603 43.4964 16.2485 43.0082C16.7366 42.5201 16.7366 41.7286 16.2485 41.2404L15.083 40.0749L43.0979 40.0749L41.9324 41.2404C41.4442 41.7286 41.4442 42.5201 41.9324 43.0082C42.4205 43.4964 43.212 43.4964 43.7001 43.0082L46.9995 39.7088Z\",\n fill: color\n }));\n});\nexport default Spacing;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Padding = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13.8334 9.19949C13.8334 8.50914 14.3931 7.94949 15.0834 7.94949H31.3334C32.0238 7.94949 32.5834 8.50914 32.5834 9.19949C32.5834 9.88985 32.0238 10.4495 31.3334 10.4495H15.0834C14.3931 10.4495 13.8334 9.88985 13.8334 9.19949Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M15.0834 35.5496C14.3931 35.5496 13.8334 36.1092 13.8334 36.7996C13.8334 37.4899 14.3931 38.0496 15.0834 38.0496H31.3334C32.0238 38.0496 32.5834 37.4899 32.5834 36.7996C32.5834 36.1092 32.0238 35.5496 31.3334 35.5496H15.0834Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M36.8001 13.4163C37.4905 13.4163 38.0501 13.9759 38.0501 14.6663V30.9163C38.0501 31.6066 37.4905 32.1663 36.8001 32.1663C36.1098 32.1663 35.5501 31.6066 35.5501 30.9163V14.6663C35.5501 13.9759 36.1098 13.4163 36.8001 13.4163Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M10.45 14.6663C10.45 13.9759 9.89038 13.4163 9.20003 13.4163C8.50967 13.4163 7.95003 13.9759 7.95003 14.6663L7.95003 30.9163C7.95003 31.6066 8.50967 32.1663 9.20003 32.1663C9.89038 32.1663 10.45 31.6066 10.45 30.9163L10.45 14.6663Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M3 0.5C1.61929 0.5 0.5 1.61929 0.5 3V43C0.5 44.3807 1.61929 45.5 3 45.5H43C44.3807 45.5 45.5 44.3807 45.5 43V3C45.5 1.61929 44.3807 0.5 43 0.5H3ZM43 3H3V43H43V3Z\",\n fill: color\n }));\n});\nexport default Padding;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Polygon = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M44.103 18.4866L24.0002 3.8811L3.89749 18.4866L11.5761 42.1188H36.4244L44.103 18.4866ZM25.8371 1.35293C24.7418 0.557164 23.2587 0.557162 22.1634 1.35292L2.06066 15.9584C0.96539 16.7542 0.507082 18.1647 0.925439 19.4523L8.604 43.0845C9.02236 44.372 10.2222 45.2438 11.5761 45.2438H36.4244C37.7782 45.2438 38.9781 44.372 39.3965 43.0845L47.075 19.4523C47.4934 18.1647 47.0351 16.7542 45.9398 15.9584L25.8371 1.35293Z\",\n fill: color\n }));\n});\nexport default Polygon;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var PolygonSides = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 48\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M23.0078 29.9669H25.835L24.7803 35.9727H27.4609L28.5156 29.9669H32.2363V27.4473H28.9551L29.6875 23.2872H33.3496V20.7383H30.1416L31.2109 14.6446H28.5303L27.4609 20.7383H24.6191L25.6885 14.6446H23.0225L21.9531 20.7383H18.1006V23.2872H21.499L20.7666 27.4473H17.002V29.9669H20.3271L19.2725 35.9727H21.9531L23.0078 29.9669ZM26.2744 27.4473H23.4473L24.165 23.2872H27.0068L26.2744 27.4473Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M23.5448 0.821208C24.421 0.184598 25.6075 0.184597 26.4837 0.821207L48.4803 16.8026C49.3565 17.4392 49.7231 18.5677 49.3885 19.5977L40.9865 45.4562C40.6518 46.4862 39.692 47.1836 38.6089 47.1836H11.4197C10.3366 47.1836 9.37672 46.4862 9.04204 45.4562L0.640107 19.5977C0.305422 18.5677 0.672067 17.4392 1.54829 16.8026L23.5448 0.821208ZM25.0143 2.84375L47.0108 18.8252L38.6089 44.6836H11.4197L3.01775 18.8252L25.0143 2.84375Z\",\n fill: color\n }));\n});\nexport default PolygonSides;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var ArrowRight = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 46 30\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M45.5 15.0005C45.5 15.7079 45.2003 16.3822 44.6753 16.8562L30.8291 29.3562C29.8042 30.2814 28.2234 30.2006 27.2982 29.1758C26.373 28.1509 26.4537 26.57 27.4786 25.6448L36.5 17.5005L3 17.5005C1.61928 17.5005 0.499999 16.3812 0.499999 15.0005C0.499999 13.6198 1.61929 12.5005 3 12.5005L36.5 12.5005L27.4786 4.35618C26.4537 3.43096 26.373 1.85011 27.2982 0.82525C28.2234 -0.199608 29.8042 -0.280382 30.8291 0.644837L44.6753 13.1448C45.2003 13.6189 45.5 14.2931 45.5 15.0005Z\",\n fill: color\n }));\n});\nexport default ArrowRight;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var FontItalic = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M19 48L26.9931 2H31.2019L23.2087 48H19Z\",\n fill: color\n }));\n});\nexport default FontItalic;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var FontBold = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 14 18\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0.214966 17.4813V0.518677H6.61123C8.82693 0.518677 10.5075 0.914783 11.653 1.70699C12.7985 2.49144 13.3712 3.64481 13.3712 5.16709C13.3712 5.99814 13.1413 6.7321 12.6814 7.36898C12.2216 7.99809 11.5819 8.46021 10.7625 8.75535C11.699 8.97282 12.4348 9.41164 12.9699 10.0718C13.5133 10.732 13.7851 11.5397 13.7851 12.4951C13.7851 14.1261 13.2249 15.361 12.1045 16.1998C10.9841 17.0386 9.38713 17.4658 7.31357 17.4813H0.214966ZM3.97748 10.0951V14.6736H7.20069C8.08697 14.6736 8.77677 14.4795 9.27007 14.0911C9.77174 13.695 10.0226 13.1513 10.0226 12.4601C10.0226 10.9067 9.1572 10.1184 7.42644 10.0951H3.97748ZM3.97748 7.62528H6.76173C8.65971 7.59421 9.6087 6.89132 9.6087 5.5166C9.6087 4.74769 9.36623 4.19625 8.88128 3.86228C8.4047 3.52054 7.64801 3.34967 6.61123 3.34967H3.97748V7.62528Z\",\n fill: color\n }));\n});\nexport default FontBold;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var UploadOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M17.5911 1.54582C16.7075 0.680052 15.2937 0.680014 14.4101 1.54573L4.05296 11.6925C3.15635 12.5709 3.14159 14.0098 4.01999 14.9064C4.89839 15.8031 6.33733 15.8178 7.23394 14.9394L13.7278 8.57741V30.4419C13.7278 31.6971 14.7454 32.7147 16.0006 32.7147C17.2558 32.7147 18.2733 31.6971 18.2733 30.4419V8.57782L24.766 14.9393C25.6625 15.8178 27.1015 15.8031 27.9799 14.9065C28.8584 14.01 28.8437 12.571 27.9471 11.6926L17.5911 1.54582Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M2.78827 36.5543C1.53308 36.5543 0.515541 37.5719 0.515541 38.827C0.515541 40.0822 1.53308 41.0998 2.78827 41.0998H29.1519C30.4071 41.0998 31.4246 40.0822 31.4246 38.827C31.4246 37.5719 30.4071 36.5543 29.1519 36.5543H2.78827Z\",\n fill: color\n }));\n});\nexport default UploadOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var ArrowLeftOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 28 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M26.907 0.71085C25.7493 -0.292553 23.9445 -0.224769 22.8758 0.862251L0.931376 23.1837C-0.0773525 24.2097 -0.0773525 25.7913 0.931376 26.8173L22.8758 49.1388C23.9445 50.2258 25.7493 50.2936 26.907 49.2902C28.0647 48.2868 28.1369 46.5921 27.0683 45.5051L6.90997 25.0005L27.0683 4.49589C28.1369 3.40888 28.0647 1.71425 26.907 0.71085Z\",\n fill: color\n }));\n});\nexport default ArrowLeftOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var ArrowRightOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 28 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M1.09286 0.71085C2.25057 -0.292553 4.05541 -0.224769 5.12407 0.862251L27.0685 23.1837C28.0772 24.2097 28.0772 25.7913 27.0685 26.8173L5.12407 49.1388C4.05541 50.2258 2.25057 50.2936 1.09286 49.2902C-0.0648579 48.2868 -0.137051 46.5921 0.93161 45.5051L21.0899 25.0005L0.93161 4.49589C-0.137051 3.40888 -0.0648579 1.71425 1.09286 0.71085Z\",\n fill: color\n }));\n});\nexport default ArrowRightOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var PlusOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 38 38\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M16.9167 21.0838L16.9167 35.6672C16.9167 36.8177 17.8494 37.7505 19 37.7505C20.1506 37.7505 21.0833 36.8177 21.0833 35.6672L21.0833 21.0838H35.6667C36.8173 21.0838 37.75 20.1511 37.75 19.0005C37.75 17.8499 36.8173 16.9172 35.6667 16.9172L21.0833 16.9172L21.0833 2.33382C21.0833 1.18323 20.1506 0.250488 19 0.250488C17.8494 0.250488 16.9167 1.18323 16.9167 2.33382L16.9167 16.9172H2.33333C1.18274 16.9172 0.25 17.8499 0.25 19.0005C0.25 20.1511 1.18274 21.0838 2.33333 21.0838H16.9167Z\",\n fill: color\n }));\n});\nexport default PlusOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var ArrowTool = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M1.04757 38.9503C0.437373 38.3401 0.437373 37.3508 1.04757 36.7406L33.9229 3.86697L23.8354 3.33584C22.9736 3.29047 22.3118 2.5551 22.3572 1.69335C22.4026 0.831601 23.138 0.169794 23.9997 0.215167L37.5909 0.930759C38.3892 0.972794 39.027 1.61063 39.0691 2.40894L39.7846 16.0001C39.83 16.8619 39.1682 17.5972 38.3065 17.6426C37.4447 17.688 36.7093 17.0262 36.664 16.1644L36.1328 6.07651L3.25728 38.9503C2.64708 39.5605 1.65776 39.5605 1.04757 38.9503Z\",\n fill: color\n }));\n});\nexport default ArrowTool;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Compare = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 52 52\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M27.1607 4.16667V2.08333C27.1607 0.93274 26.2279 0 25.0773 0C23.9267 0 22.994 0.932741 22.994 2.08333V4.16667H4.244C1.94281 4.16667 0.0773315 6.03215 0.0773315 8.33333V41.6667C0.0773315 43.9679 1.94281 45.8333 4.244 45.8333H22.994V47.9167C22.994 49.0673 23.9267 50 25.0773 50C26.2279 50 27.1607 49.0673 27.1607 47.9167V45.8333H45.9107C48.2118 45.8333 50.0773 43.9678 50.0773 41.6667V8.33333C50.0773 6.03215 48.2119 4.16667 45.9107 4.16667H27.1607ZM22.994 8.33333H4.244L4.244 41.6667H22.994V8.33333ZM27.1607 41.6667V8.33333H45.9107V41.6667H27.1607Z\",\n fill: color\n }));\n});\nexport default Compare;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var MinusOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 38 6\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M35.835 5.0769L2.16498 5.0769C1.00277 5.0769 0.0606079 4.14726 0.0606079 3.00048C0.060608 1.85371 1.00277 0.924072 2.16498 0.924072L35.835 0.924074C36.9972 0.924074 37.9394 1.85372 37.9394 3.00049C37.9394 4.14726 36.9972 5.0769 35.835 5.0769Z\",\n fill: color\n }));\n});\nexport default MinusOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Temprature = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M9.48799 3.125H17.0311L17.0311 24.4063C17.0311 26.6148 18.1889 28.4084 19.5429 29.5401C21.7011 31.3438 23.0656 34.0456 23.0656 37.069C23.0656 42.4847 18.6753 46.875 13.2595 46.875C7.84382 46.875 3.45351 42.4847 3.45351 37.069C3.45351 34.0456 4.81799 31.3438 6.97617 29.5401C8.33021 28.4084 9.48799 26.6148 9.48799 24.4063V3.125ZM20.1561 3.125C20.1561 1.39911 18.757 0 17.0311 0H9.48799C7.7621 0 6.36299 1.39911 6.36299 3.125V24.4063C6.36299 25.4785 5.79482 26.4547 4.97216 27.1423C2.13398 29.5143 0.328506 33.0808 0.328506 37.069C0.328506 44.2106 6.11793 50 13.2595 50C20.4012 50 26.1906 44.2106 26.1906 37.069C26.1906 33.0808 24.3851 29.5143 21.5469 27.1423C20.7243 26.4547 20.1561 25.4785 20.1561 24.4063V3.125ZM35.6715 1.25C35.6715 0.559645 35.1119 0 34.4215 0H28.1715C27.4812 0 26.9215 0.559644 26.9215 1.25C26.9215 1.94036 27.4812 2.5 28.1715 2.5L34.4215 2.5C35.1119 2.5 35.6715 1.94036 35.6715 1.25ZM35.6715 8.24951C35.6715 7.55916 35.1119 6.99951 34.4215 6.99951H28.1715C27.4812 6.99951 26.9215 7.55916 26.9215 8.24951C26.9215 8.93987 27.4812 9.49951 28.1715 9.49951H34.4215C35.1119 9.49951 35.6715 8.93987 35.6715 8.24951ZM34.4215 13.999C35.1119 13.999 35.6715 14.5587 35.6715 15.249C35.6715 15.9394 35.1119 16.499 34.4215 16.499H28.1715C27.4812 16.499 26.9215 15.9394 26.9215 15.249C26.9215 14.5587 27.4812 13.999 28.1715 13.999H34.4215ZM13.2594 43.7501C16.366 43.7501 18.8844 41.2317 18.8844 38.1251C18.8844 35.4037 16.9519 33.1337 14.3844 32.6126V10.3662C14.3844 9.67582 13.8247 9.11617 13.1344 9.11617C12.444 9.11617 11.8844 9.67582 11.8844 10.3662V32.6694C9.44245 33.2829 7.63441 35.4928 7.63441 38.1251C7.63441 41.2317 10.1528 43.7501 13.2594 43.7501Z\",\n fill: color\n }));\n});\nexport default Temprature;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Contrast = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M20.4376 40.6858V38.5625V4.18746V3.31418C10.8133 4.10816 3.25006 12.1708 3.25006 22C3.25006 31.8292 10.8133 39.8918 20.4376 40.6858ZM40.7501 22C40.7501 31.8292 33.1868 39.8918 23.5626 40.6858V38.5625V4.18746V3.31418C33.1868 4.10816 40.7501 12.1708 40.7501 22ZM43.8751 22C43.8751 34.0812 34.0813 43.875 22.0001 43.875C9.91883 43.875 0.125061 34.0812 0.125061 22C0.125061 9.91877 9.91883 0.125 22.0001 0.125C34.0813 0.125 43.8751 9.91877 43.8751 22Z\",\n fill: color\n }));\n});\nexport default Contrast;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var FineTune = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M16.3679 7.50003C15.7995 10.005 13.5592 11.875 10.8823 11.875C8.20528 11.875 5.96506 10.005 5.39665 7.50003H1.5448C0.854444 7.50003 0.2948 6.94039 0.2948 6.25003C0.2948 5.55967 0.854444 5.00003 1.5448 5.00003H5.39665C5.96506 2.49504 8.20528 0.625031 10.8823 0.625031C13.5592 0.625031 15.7995 2.49504 16.3679 5.00003H48.4557C49.1461 5.00003 49.7057 5.55967 49.7057 6.25003C49.7057 6.94039 49.1461 7.50003 48.4557 7.50003H16.3679ZM14.0073 6.25003C14.0073 7.97592 12.6082 9.37503 10.8823 9.37503C9.15637 9.37503 7.75726 7.97592 7.75726 6.25003C7.75726 4.52414 9.15637 3.12503 10.8823 3.12503C12.6082 3.12503 14.0073 4.52414 14.0073 6.25003Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M34.5715 27.625C37.2485 27.625 39.4887 25.755 40.0571 23.25H48.4554C49.1458 23.25 49.7054 22.6904 49.7054 22C49.7054 21.3096 49.1458 20.75 48.4554 20.75H40.0571C39.4887 18.245 37.2485 16.375 34.5715 16.375C31.8946 16.375 29.6543 18.245 29.0859 20.75H1.5448C0.854444 20.75 0.2948 21.3096 0.2948 22C0.2948 22.6904 0.854444 23.25 1.5448 23.25H29.0859C29.6543 25.755 31.8946 27.625 34.5715 27.625ZM34.5715 25.125C36.2974 25.125 37.6965 23.7259 37.6965 22C37.6965 20.2741 36.2974 18.875 34.5715 18.875C32.8456 18.875 31.4465 20.2741 31.4465 22C31.4465 23.7259 32.8456 25.125 34.5715 25.125Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M22.7702 39C22.2018 41.505 19.9615 43.375 17.2845 43.375C14.6076 43.375 12.3673 41.505 11.7989 39H1.5448C0.854444 39 0.2948 38.4403 0.2948 37.75C0.2948 37.0596 0.854444 36.5 1.5448 36.5H11.7989C12.3673 33.995 14.6076 32.125 17.2845 32.125C19.9615 32.125 22.2018 33.995 22.7702 36.5H48.4554C49.1458 36.5 49.7054 37.0596 49.7054 37.75C49.7054 38.4403 49.1458 39 48.4554 39H22.7702ZM20.4095 37.75C20.4095 39.4759 19.0104 40.875 17.2845 40.875C15.5587 40.875 14.1595 39.4759 14.1595 37.75C14.1595 36.0241 15.5587 34.625 17.2845 34.625C19.0104 34.625 20.4095 36.0241 20.4095 37.75Z\",\n fill: color\n }));\n});\nexport default FineTune;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Saturation = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M37.2341 37.6984H37.5121V37.4237C41.4447 33.4687 43.875 28.0182 43.875 22C43.875 15.9819 41.4447 10.5314 37.5121 6.57632V6.30045H37.2328C33.2942 2.47819 27.9219 0.125031 22 0.125031C9.91877 0.125031 0.125 9.9188 0.125 22C0.125 34.0813 9.91877 43.875 22 43.875C24.718 43.875 27.3203 43.3793 29.7213 42.4733H30.5303V42.1494C33.0389 41.0861 35.308 39.5679 37.2341 37.6984ZM20.4257 3.31519C10.807 4.1148 3.25 12.1749 3.25 22C3.25 31.8252 10.807 39.8853 20.4257 40.6849V3.31519ZM34.3871 36.0759C33.221 37.1029 31.9263 37.9873 30.5303 38.7017V5.29836C31.9263 6.01281 33.221 6.89715 34.3871 7.92411V36.0759ZM37.5121 11.4641C39.5556 14.4669 40.75 18.094 40.75 22C40.75 25.9061 39.5556 29.5332 37.5121 32.536V11.4641ZM23.5507 40.6868C24.8796 40.578 26.1693 40.3307 27.4053 39.9592V4.04089C26.1693 3.66941 24.8796 3.42203 23.5507 3.31324V40.6868Z\",\n fill: color\n }));\n});\nexport default Saturation;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Annotate = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M46.1442 31.379C45.4585 31.379 44.8974 31.9429 44.8974 32.6321V43.7349C44.8974 45.8025 43.2267 47.4817 41.157 47.4943H6.22156C4.16433 47.4943 2.49361 45.8151 2.48114 43.7349V11.1283C2.48114 9.06067 4.15186 7.38147 6.22156 7.36894H17.2807C17.9665 7.36894 18.5275 6.80503 18.5275 6.1158C18.5275 5.42658 17.9665 4.86267 17.2807 4.86267H6.22156C2.79284 4.8752 0 7.66969 0 11.1283V43.7349C0 47.1935 2.79284 50.0005 6.22156 50.0005H41.157C44.5982 50.0005 47.3786 47.1935 47.3786 43.7474V32.6321C47.391 31.9429 46.83 31.379 46.1442 31.379Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M46.8923 1.65462C44.698 -0.55089 41.157 -0.55089 38.9627 1.65462L16.7571 23.9729C16.6075 24.1233 16.4953 24.3113 16.4329 24.5243L13.5154 35.1258C13.3907 35.5644 13.5154 36.0281 13.8396 36.3413C14.1513 36.6546 14.6251 36.7799 15.049 36.6672L25.5969 33.7348C25.8089 33.6722 25.9959 33.5719 26.1455 33.409L48.3636 11.0782C50.5455 8.87267 50.5455 5.31377 48.3636 3.10826L46.8923 1.65462ZM19.4751 24.7875L37.6535 6.51678L43.5135 12.4065L25.3351 30.6897L19.4751 24.7875ZM18.3031 27.1559L22.9911 31.8677L16.5077 33.6722L18.3031 27.1559ZM46.5931 9.31127L45.2715 10.6396L39.4115 4.74986L40.7331 3.42154C41.9425 2.206 43.9249 2.206 45.1343 3.42154L46.5931 4.88771C47.815 6.11578 47.815 8.09573 46.5931 9.31127Z\",\n fill: color\n }));\n});\nexport default Annotate;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Blur = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M18.3626 41.293C17.5103 41.4285 16.7096 40.8474 16.5742 39.9952C16.4387 39.143 17.0198 38.3423 17.872 38.2068C18.2902 38.1403 18.6988 38.0456 19.0958 37.9246C21.9368 37.059 24.1957 34.8468 25.1254 32.0335C25.2671 31.6049 25.378 31.1621 25.4555 30.7076C25.6005 29.857 26.4076 29.2849 27.2583 29.4299C28.109 29.5749 28.681 30.3821 28.536 31.2327C28.432 31.8429 28.283 32.4379 28.0926 33.0142C26.8449 36.7893 23.8206 39.7519 20.0065 40.914C19.4728 41.0766 18.9239 41.2038 18.3626 41.293Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M33.9356 31.0645C33.9356 23.9644 24.1764 8.59028 19.4747 1.59549C18.2785 -0.184172 15.7216 -0.184172 14.5254 1.59548C9.82374 8.59028 0.0645752 23.9644 0.0645752 31.0645C0.0645752 40.4177 7.64685 48 17.0001 48C26.3533 48 33.9356 40.4177 33.9356 31.0645ZM30.8106 31.0645C30.8106 29.8836 30.375 28.0316 29.4236 25.578C28.5 23.1959 27.1988 20.5159 25.7187 17.7756C22.8106 12.3913 19.3287 6.98743 17.0001 3.51586C14.6715 6.98743 11.1895 12.3913 8.28145 17.7756C6.80135 20.5159 5.50017 23.1959 4.57655 25.578C3.62517 28.0316 3.18958 29.8836 3.18958 31.0645C3.18958 38.6918 9.37274 44.875 17.0001 44.875C24.6274 44.875 30.8106 38.6918 30.8106 31.0645Z\",\n fill: color\n }));\n});\nexport default Blur;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var PinOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M43.0081 15.2287L36.7869 17.6214L28.935 29.9601C30.5809 33.9266 30.3662 38.0903 27.1408 41.3158L26.5656 41.8909C25.9554 42.5011 24.9661 42.5011 24.3559 41.8909L14.4122 31.9472L2.99211 43.3673C2.38192 43.9775 1.3926 43.9775 0.782403 43.3673C0.17221 42.7571 0.172211 41.7678 0.782403 41.1576L12.2025 29.7375L2.25883 19.7938C1.64864 19.1836 1.64864 18.1943 2.25883 17.5841L2.50512 17.3378C5.73058 14.1123 10.2231 13.5688 14.1897 15.2147L26.5283 7.36283L28.9211 1.14165C29.327 0.0863053 30.6847 -0.201832 31.4843 0.597706L43.552 12.6655C44.3516 13.465 44.0634 14.8228 43.0081 15.2287ZM29.0752 9.44618L30.9747 4.50752L39.6422 13.1751L34.7035 15.0745L25.4251 29.655L26.0486 31.1577C27.234 34.0146 27.0773 36.5309 25.4342 38.5498L5.64209 18.7576C7.75439 17.2384 10.4304 17.0382 12.992 18.1011L14.4948 18.7246L29.0752 9.44618Z\",\n fill: color\n }));\n});\nexport default PinOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Duplicate = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M0.312012 34.847V3.39883C0.312012 1.67294 1.71112 0.273834 3.43701 0.273834H26.807C28.5329 0.273834 29.932 1.67294 29.932 3.39883V34.847C29.932 36.5729 28.5329 37.972 26.807 37.972H3.43701C1.71112 37.972 0.312012 36.5729 0.312012 34.847ZM3.43701 34.847V3.39883L26.807 3.39883L26.807 34.847L3.43701 34.847Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M35.6874 12.5434C35.6874 11.6805 34.9878 10.9809 34.1249 10.9809C33.2619 10.9809 32.5624 11.6805 32.5624 12.5434V40.6009H9.89033C9.02739 40.6009 8.32783 41.3005 8.32783 42.1634C8.32783 43.0263 9.02739 43.7259 9.89033 43.7259H34.1249C34.9878 43.7259 35.6874 43.0263 35.6874 42.1634V12.5434Z\",\n fill: color\n }));\n});\nexport default Duplicate;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var DeleteOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M15.75 17.3125C15.75 16.4496 16.4496 15.75 17.3125 15.75C18.1754 15.75 18.875 16.4496 18.875 17.3125L18.875 32.9375C18.875 33.8005 18.1754 34.5 17.3125 34.5C16.4496 34.5 15.75 33.8005 15.75 32.9375L15.75 17.3125Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M26.6875 15.75C25.8246 15.75 25.125 16.4496 25.125 17.3125L25.125 32.9375C25.125 33.8005 25.8246 34.5 26.6875 34.5C27.5504 34.5 28.25 33.8005 28.25 32.9375V17.3125C28.25 16.4496 27.5504 15.75 26.6875 15.75Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M12.625 6.37503V3.25003C12.625 1.52414 14.0241 0.125031 15.75 0.125031H28.25C29.9759 0.125031 31.375 1.52414 31.375 3.25003V6.37503H42.3125C43.1754 6.37503 43.875 7.07459 43.875 7.93753C43.875 8.80048 43.1754 9.50003 42.3125 9.50003H39.1875V40.75C39.1875 42.4759 37.7884 43.875 36.0625 43.875H7.9375C6.21161 43.875 4.8125 42.4759 4.8125 40.75V9.50003L1.6875 9.50003C0.824554 9.50003 0.125 8.80048 0.125 7.93753C0.125 7.07459 0.824555 6.37503 1.6875 6.37503H12.625ZM15.75 3.25003H28.25V6.37503H15.75V3.25003ZM7.9375 9.50003L7.9375 40.75H36.0625V9.50003H7.9375Z\",\n fill: color\n }));\n});\nexport default DeleteOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var CropFrame = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M43 3H31.75V0.5H43C44.3807 0.5 45.5 1.61929 45.5 3V14.25H43V3Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M3 14.25V3H14.25V0.5H3C1.61929 0.5 0.5 1.61929 0.5 3V14.25H3Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0.5 31.75V43C0.5 44.3807 1.61929 45.5 3 45.5H14.25V43H3V31.75H0.5Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M43 31.75H45.5V43C45.5 44.3807 44.3807 45.5 43 45.5H31.75V43H43V31.75Z\",\n fill: color\n }));\n});\nexport default CropFrame;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Portrait = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 36 52\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M32.0559 46.8755L32.0559 3.12555L3.93091 3.12555L3.93091 46.8755H32.0559ZM35.1809 3.12555C35.1809 1.39966 33.7818 0.000549316 32.0559 0.000549316H3.93091C2.20502 0.000549316 0.805908 1.39966 0.805908 3.12555V46.8755C0.805908 48.6014 2.20502 50.0005 3.93091 50.0005H32.0559C33.7818 50.0005 35.1809 48.6014 35.1809 46.8755L35.1809 3.12555Z\",\n fill: color\n }));\n});\nexport default Portrait;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var WarningOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M45.961 39.0119L28.2837 7.27185C27.5934 6.17538 26.3971 5.5 24.9981 5.5C23.5956 5.5 22.3967 6.17887 21.7073 7.28034L4.06571 38.9613L4.03009 39.0197C3.33595 40.159 3.32316 41.4697 3.9939 42.6216C4.67405 43.786 5.89 44.5 7.34459 44.5H42.554C44.0596 44.5 45.3464 43.7436 46.0016 42.6231C46.6817 41.4564 46.652 40.1455 45.9968 39.0706L45.961 39.0119ZM49.0254 44.3856C47.7038 46.6495 45.2246 48 42.554 48H7.34459C4.67398 48 2.29272 46.6495 0.970942 44.3856C-0.347811 42.1231 -0.322029 39.4361 1.04116 37.1987L18.6646 5.55018C18.6697 5.5418 18.6743 5.53342 18.6789 5.52504C18.6836 5.51666 18.6882 5.50828 18.6932 5.49989C20.0278 3.30867 22.3849 2 24.9981 2C27.6114 2 29.9685 3.30867 31.303 5.49989L48.9853 37.2489C50.3185 39.436 50.3442 42.1232 49.0254 44.3856Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M22.0001 16C22.0001 14.3431 23.3433 13 25.0001 13C26.657 13 28.0001 14.3431 28.0001 16V28C28.0001 29.6569 26.657 31 25.0001 31C23.3433 31 22.0001 29.6569 22.0001 28V16Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M28.0001 37C28.0001 38.6569 26.657 40 25.0001 40C23.3433 40 22.0001 38.6569 22.0001 37C22.0001 35.3431 23.3433 34 25.0001 34C26.657 34 28.0001 35.3431 28.0001 37Z\",\n fill: color\n }));\n});\nexport default WarningOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Success = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 21 21\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M20.5 10.5001C20.5 16.023 16.0228 20.5001 10.5 20.5001C4.97714 20.5001 0.5 16.023 0.5 10.5001C0.5 4.97727 4.97714 0.500122 10.5 0.500122C16.0228 0.500122 20.5 4.97727 20.5 10.5001ZM7.88239 9.56904C8.00439 9.62145 8.11473 9.69763 8.20698 9.79314L9.49998 11.0861L12.793 7.79314C12.8852 7.69763 12.9956 7.62145 13.1176 7.56904C13.2396 7.51663 13.3708 7.48905 13.5036 7.48789C13.6363 7.48674 13.768 7.51204 13.8909 7.56232C14.0138 7.6126 14.1255 7.68686 14.2194 7.78075C14.3133 7.87464 14.3875 7.98629 14.4378 8.10919C14.4881 8.23208 14.5134 8.36376 14.5122 8.49654C14.5111 8.62932 14.4835 8.76054 14.4311 8.88255C14.3787 9.00455 14.3025 9.1149 14.207 9.20714L10.207 13.2071C10.0194 13.3946 9.76514 13.4999 9.49998 13.4999C9.23482 13.4999 8.98051 13.3946 8.79298 13.2071L6.79298 11.2071C6.69747 11.1149 6.62129 11.0046 6.56888 10.8825C6.51647 10.7605 6.48889 10.6293 6.48773 10.4965C6.48658 10.3638 6.51188 10.2321 6.56216 10.1092C6.61244 9.98629 6.6867 9.87464 6.78059 9.78075C6.87448 9.68686 6.98613 9.6126 7.10903 9.56232C7.23193 9.51204 7.3636 9.48674 7.49638 9.48789C7.62916 9.48905 7.76038 9.51663 7.88239 9.56904Z\",\n fill: color\n }));\n});\nexport default Success;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Error = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 21 21\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M10.5 20.5001C16.0228 20.5001 20.5 16.023 20.5 10.5001C20.5 4.97727 16.0228 0.500122 10.5 0.500122C4.97715 0.500122 0.5 4.97727 0.5 10.5001C0.5 16.023 4.97715 20.5001 10.5 20.5001ZM15.4375 7.0912L11.8155 10.7132L15.4638 14.309C15.6213 14.4665 15.7 14.6503 15.7 14.8865C15.7 15.1227 15.6213 15.3064 15.4638 15.4639C15.3063 15.6214 15.1226 15.7001 14.8864 15.7001C14.6501 15.7001 14.4664 15.6214 14.3089 15.4639L10.6869 11.8419L7.06483 15.4639C6.77612 15.7789 6.25118 15.7789 5.93622 15.4639C5.77874 15.3064 5.7 15.0964 5.7 14.8865C5.7 14.6765 5.77874 14.4928 5.93622 14.3353L9.55827 10.7132L5.93622 7.0912C5.77874 6.93372 5.7 6.72374 5.7 6.51377C5.7 6.3038 5.77874 6.12007 5.93622 5.96259C6.25118 5.64763 6.74987 5.64763 7.06483 5.96259L10.6869 9.58464L14.3089 5.93634C14.5976 5.62138 15.1226 5.62138 15.4375 5.93634C15.595 6.09382 15.6738 6.27755 15.6738 6.51377C15.6738 6.74999 15.595 6.93372 15.4375 7.0912Z\",\n fill: color\n }));\n});\nexport default Error;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var ErrorOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 52 52\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M37.3438 16.4782L28.2887 25.5333L37.4095 34.5228C37.8032 34.9165 38 35.3758 38 35.9664C38 36.5569 37.8032 37.0162 37.4095 37.4099C37.0158 37.8036 36.5564 38.0005 35.9659 38.0005C35.3753 38.0005 34.916 37.8036 34.5223 37.4099L25.4672 28.3548L16.4121 37.4099C15.6903 38.1973 14.378 38.1973 13.5906 37.4099C13.1969 37.0162 13 36.4913 13 35.9664C13 35.4414 13.1969 34.9821 13.5906 34.5884L22.6457 25.5333L13.5906 16.4782C13.1969 16.0845 13 15.5595 13 15.0346C13 14.5097 13.1969 14.0504 13.5906 13.6567C14.378 12.8693 15.6247 12.8693 16.4121 13.6567L25.4672 22.7118L34.5223 13.591C35.2441 12.8036 36.5564 12.8036 37.3438 13.591C37.7375 13.9847 37.9344 14.4441 37.9344 15.0346C37.9344 15.6252 37.7375 16.0845 37.3438 16.4782Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M-0.000488281 25.0005C-0.000488281 38.7972 11.2028 50.0005 24.9995 50.0005C38.6925 50.0005 49.9995 38.7972 49.9995 25.0005C49.9995 11.2038 38.7962 0.000488281 24.9995 0.000488281C11.2028 0.000488281 -0.000488281 11.2038 -0.000488281 25.0005ZM3.63022 24.8968C3.63022 13.1748 13.1738 3.52746 24.9995 3.52746C36.8252 3.52746 46.3688 13.1748 46.3688 24.8968C46.3688 36.6187 36.8252 46.266 24.9995 46.266C13.2775 46.266 3.63022 36.6187 3.63022 24.8968Z\",\n fill: color\n }));\n});\nexport default ErrorOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Loading = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M29.9338 5.26853C27.8524 4.75154 25.7006 4.56814 23.5381 4.72351C22.4874 4.799 21.4379 4.95535 20.4183 5.18855L19.3724 0.636496C20.6245 0.350265 21.9128 0.158175 23.2017 0.065597C25.8579 -0.125223 28.5034 0.100753 31.0653 0.737277L29.9338 5.26853Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n opacity: \"0.9\",\n d: \"M40.6131 11.9278C38.5498 9.48098 35.9044 7.52805 32.963 6.2805L34.7952 1.98303C38.4106 3.51633 41.6615 5.91575 44.1962 8.922L40.6131 11.9278Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n opacity: \"0.8\",\n d: \"M45.3329 23.5739L45.3303 23.5392C45.097 20.3085 44.1359 17.275 42.4734 14.5227L46.4838 12.1129C48.5302 15.501 49.7133 19.2325 50 23.2036L45.3329 23.5739Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n opacity: \"0.7\",\n d: \"M46.2688 38.2308L42.2981 35.7565C43.9958 33.0458 45.0372 29.9357 45.3095 26.7618L49.9744 27.1604C49.639 31.0674 48.3577 34.8958 46.2688 38.2308Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n opacity: \"0.6\",\n d: \"M34.4209 48.1735L32.6626 43.8456C35.6192 42.6505 38.2938 40.7405 40.3975 38.3222L43.9338 41.3828C41.3483 44.3551 38.0588 46.7033 34.4209 48.1735V48.1735Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n opacity: \"0.5\",\n d: \"M26.8033 49.9345C24.1593 50.1242 21.5262 49.9011 18.9766 49.2716L20.1013 44.7386C22.1729 45.25 24.3148 45.4309 26.4673 45.2766C27.5283 45.2004 28.5879 45.0416 29.6165 44.8049L30.6697 49.3551C29.4061 49.6459 28.1052 49.841 26.8033 49.9345V49.9345Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n opacity: \"0.4\",\n d: \"M15.2449 48.0311C11.6272 46.5033 8.37276 44.1086 5.83362 41.1063L9.412 38.0952C11.479 40.5388 14.1272 42.4877 17.0704 43.7306L15.2449 48.0311Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n opacity: \"0.3\",\n d: \"M3.54069 37.9198C1.48217 34.5223 0.292537 30.78 0.00479729 26.7959L0 26.7274L4.66972 26.3918L4.67579 26.478C4.90861 29.7017 5.87511 32.7443 7.54751 35.504L3.54069 37.9198Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n opacity: \"0.2\",\n d: \"M4.69761 23.2075L0.0335693 22.802C0.374666 18.8955 1.66191 15.0691 3.75587 11.7373L7.72274 14.2175C6.02088 16.9257 4.97478 20.0344 4.69761 23.2075V23.2075Z\",\n fill: color\n }));\n});\nexport default Loading;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"color2\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var ColorPicker = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$color2 = _ref.color2,\n color2 = _ref$color2 === void 0 ? '#F8FAFB' : _ref$color2,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 42 42\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M42.0001 6.11477C42.0001 4.48089 41.3639 2.94468 40.2086 1.78931C37.8238 -0.595528 33.9433 -0.595878 31.5582 1.78931L25.666 7.68191L22.9908 5.00654C22.5351 4.5509 21.7965 4.5509 21.3407 5.00654L17.8405 8.50695C17.3849 8.96259 17.3849 9.70141 17.8405 10.1572L20.5157 12.8325L3.63971 29.7097C3.5116 29.8378 3.41511 29.9939 3.35783 30.1658L2.27826 33.4048L1.30626 34.3769C-0.435198 36.1186 -0.435314 38.9525 1.30626 40.6943C3.04783 42.436 5.88157 42.4359 7.62314 40.6943L8.59514 39.7223L11.834 38.6426C12.0058 38.5853 12.1619 38.4888 12.29 38.3607L29.1661 21.4835L31.8413 24.1588C32.297 24.6145 33.0357 24.6145 33.4914 24.1588L36.9916 20.6584C37.4472 20.2028 37.4472 19.464 36.9916 19.0082L34.3164 16.3328L40.2086 10.4402C41.3639 9.28486 42.0001 7.74876 42.0001 6.11477ZM20.5157 26.8341H9.81507L22.1658 14.4826L27.516 19.8333L20.5157 26.8341ZM32.6663 21.6836L20.3156 9.332L22.1657 7.48168L34.5163 19.8333L32.6663 21.6836ZM38.5585 8.79014L32.6663 14.6827L27.316 9.332L33.2081 3.4394C34.6833 1.96421 37.0835 1.96409 38.5584 3.4394C40.0263 4.84774 40.0261 7.3818 38.5585 8.79014Z\",\n fill: color\n }));\n});\nexport default ColorPicker;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Menu = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M0 7.75049C0 6.92206 0.671573 6.25049 1.5 6.25049H48.5C49.3284 6.25049 50 6.92206 50 7.75049V9.43806C50 10.2665 49.3284 10.9381 48.5 10.9381H1.5C0.671571 10.9381 0 10.2665 0 9.43806V7.75049ZM0 24.1567C0 23.3283 0.671573 22.6567 1.5 22.6567H48.5C49.3284 22.6567 50 23.3283 50 24.1567V25.8443C50 26.6727 49.3284 27.3443 48.5 27.3443H1.5C0.671571 27.3443 0 26.6727 0 25.8443V24.1567ZM1.5 39.0629C0.671573 39.0629 0 39.7345 0 40.5629V42.2505C0 43.0789 0.671571 43.7505 1.5 43.7505H48.5C49.3284 43.7505 50 43.0789 50 42.2505V40.5629C50 39.7345 49.3284 39.0629 48.5 39.0629H1.5Z\",\n fill: color\n }));\n});\nexport default Menu;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var MoveDownOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 46 26\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M1.23229 1.23267C2.20863 0.256387 3.79154 0.256434 4.76782 1.23277L22.9989 19.465L41.2323 1.23267C42.2086 0.256387 43.7915 0.256434 44.7678 1.23277C45.7441 2.20911 45.7441 3.79203 44.7677 4.76831L24.7665 24.7683C24.2977 25.2371 23.6618 25.5005 22.9987 25.5005C22.3357 25.5005 21.6998 25.2371 21.231 24.7682L1.23218 4.7682C0.255899 3.79186 0.255946 2.20895 1.23229 1.23267Z\",\n fill: color\n }));\n});\nexport default MoveDownOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var MoveUpOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 46 26\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M21.2326 1.23271C22.2089 0.256404 23.7918 0.256417 24.7681 1.23274L44.7678 21.2327C45.7441 22.2091 45.7441 23.792 44.7678 24.7683C43.7914 25.7446 42.2085 25.7446 41.2322 24.7682L23.0003 6.53602L4.76775 24.7683C3.79143 25.7446 2.20852 25.7446 1.23222 24.7682C0.255916 23.7919 0.255928 22.209 1.23225 21.2327L21.2326 1.23271Z\",\n fill: color\n }));\n});\nexport default MoveUpOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var ArrowSidebarLeftOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M25 47.5006C37.4264 47.5006 47.5 37.427 47.5 25.0006C47.5 12.5742 37.4264 2.50061 25 2.50061C12.5736 2.50061 2.5 12.5742 2.5 25.0006C2.5 37.427 12.5736 47.5006 25 47.5006ZM25 50.0006C38.8071 50.0006 50 38.8077 50 25.0006C50 11.1935 38.8071 0.000610352 25 0.000610352C11.1929 0.000610352 0 11.1935 0 25.0006C0 38.8077 11.1929 50.0006 25 50.0006Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M27.7355 35.1357C27.1751 35.7705 26.2217 35.7926 25.6359 35.1773L17.3026 26.423C17.0301 26.1368 16.8819 25.755 16.8752 25.3647C16.8686 24.9745 17.0037 24.5881 17.2652 24.2923L25.5985 14.8647C26.1593 14.2302 27.1128 14.2089 27.6981 14.8247C28.2539 15.4093 28.2679 16.3516 27.7348 16.9546L20.36 25.2978L27.6974 33.0057C28.2536 33.59 28.2681 34.5323 27.7355 35.1357ZM26.6695 34.3756C26.7058 34.3748 26.753 34.3599 26.7984 34.3085C26.9042 34.1886 26.8989 33.9798 26.792 33.8676L19.0594 25.7444C18.8357 25.5095 18.829 25.1425 19.0438 24.8995L26.7983 16.1268C26.9041 16.007 26.899 15.7983 26.7921 15.6859C26.7464 15.6377 26.7001 15.6249 26.6639 15.6256C26.6276 15.6263 26.5805 15.6412 26.5351 15.6926L18.2017 25.1202C18.1562 25.1717 18.1235 25.2514 18.1251 25.3435C18.1266 25.4356 18.1619 25.5128 18.208 25.5612L26.5413 34.3154C26.5871 34.3635 26.6334 34.3763 26.6695 34.3756Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M26.7984 34.3085C26.753 34.3599 26.7058 34.3748 26.6695 34.3756C26.6334 34.3763 26.5871 34.3635 26.5413 34.3154L18.208 25.5612C18.1619 25.5128 18.1266 25.4356 18.1251 25.3435C18.1235 25.2514 18.1562 25.1717 18.2017 25.1202L26.5351 15.6926C26.5805 15.6412 26.6276 15.6263 26.6639 15.6256C26.7001 15.6249 26.7464 15.6377 26.7921 15.6859C26.899 15.7983 26.9041 16.007 26.7983 16.1268L19.0438 24.8995C18.829 25.1425 18.8357 25.5095 19.0594 25.7444L26.792 33.8676C26.8989 33.9798 26.9042 34.1886 26.7984 34.3085Z\",\n fill: color\n }));\n});\nexport default ArrowSidebarLeftOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var ArrowSidebarRightOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M25 47.5006C37.4264 47.5006 47.5 37.427 47.5 25.0006C47.5 12.5742 37.4264 2.50061 25 2.50061C12.5736 2.50061 2.5 12.5742 2.5 25.0006C2.5 37.427 12.5736 47.5006 25 47.5006ZM25 50.0006C38.8071 50.0006 50 38.8077 50 25.0006C50 11.1935 38.8071 0.000610352 25 0.000610352C11.1929 0.000610352 0 11.1935 0 25.0006C0 38.8077 11.1929 50.0006 25 50.0006Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M22.2645 14.8655C22.8249 14.2307 23.7783 14.2086 24.3641 14.8239L32.6974 23.5781C32.9699 23.8644 33.1181 24.2461 33.1248 24.6364C33.1314 25.0267 32.9963 25.4131 32.7348 25.7089L24.4015 35.1365C23.8406 35.7709 22.8872 35.7923 22.3019 35.1765C21.7461 34.5919 21.7321 33.6496 22.2652 33.0465L29.6399 24.7034L22.3026 16.9954C21.7464 16.4112 21.7319 15.4689 22.2645 14.8655ZM23.3305 15.6256C23.2942 15.6264 23.247 15.6413 23.2016 15.6927C23.0958 15.8126 23.1011 16.0214 23.208 16.1336L30.9406 24.2568C31.1643 24.4917 31.171 24.8586 30.9562 25.1016L23.2017 33.8744C23.0959 33.9942 23.101 34.2029 23.2079 34.3153C23.2536 34.3634 23.2999 34.3763 23.3361 34.3756C23.3724 34.3748 23.4195 34.36 23.4649 34.3086L31.7983 24.881C31.8438 24.8295 31.8765 24.7497 31.8749 24.6577C31.8734 24.5656 31.838 24.4883 31.792 24.44L23.4587 15.6858C23.4129 15.6377 23.3666 15.6249 23.3305 15.6256Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M23.2016 15.6927C23.247 15.6413 23.2942 15.6264 23.3305 15.6256C23.3666 15.6249 23.4129 15.6377 23.4587 15.6858L31.792 24.44C31.838 24.4883 31.8734 24.5656 31.8749 24.6577C31.8765 24.7497 31.8438 24.8295 31.7983 24.881L23.4649 34.3086C23.4195 34.36 23.3724 34.3748 23.3361 34.3756C23.2999 34.3763 23.2536 34.3634 23.2079 34.3153C23.101 34.2029 23.0959 33.9942 23.2017 33.8744L30.9562 25.1016C31.171 24.8586 31.1643 24.4917 30.9406 24.2568L23.208 16.1336C23.1011 16.0214 23.0958 15.8126 23.2016 15.6927Z\",\n fill: color\n }));\n});\nexport default ArrowSidebarRightOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Annotation = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M48.5577 38.9423H34.8557C31.8069 38.9423 29.327 41.4224 29.327 44.4712C29.327 45.9293 28.1406 47.1157 26.6827 47.1157H5.52902C4.07066 47.1157 2.88467 45.9293 2.88467 44.4712V42.5459C2.88467 41.0886 4.07028 39.9025 5.5275 39.9018L9.33952 39.8999C9.34067 39.8999 9.34219 39.8995 9.34334 39.8995C9.38683 39.8995 9.43031 39.8968 9.47418 39.893C9.49211 39.8915 9.50966 39.8884 9.52759 39.8861C9.54628 39.8835 9.56535 39.8819 9.58405 39.8789L19.7636 38.1229C19.7689 38.1217 19.7739 38.1206 19.7788 38.1195C19.7948 38.1164 19.8105 38.113 19.8261 38.1095C19.8517 38.1038 19.8769 38.0981 19.9017 38.0908C19.9192 38.0863 19.9368 38.0809 19.9543 38.0756C19.9776 38.068 20.0008 38.0599 20.0241 38.0512C20.0409 38.0447 20.0581 38.039 20.0748 38.0321C20.1107 38.0168 20.1458 38.0008 20.1805 37.9829C20.1942 37.9756 20.208 37.9672 20.2217 37.9596C20.2461 37.9459 20.2702 37.9321 20.2938 37.9169C20.3083 37.9077 20.3228 37.8978 20.3373 37.8879C20.3602 37.8719 20.3831 37.8551 20.4052 37.8375C20.417 37.8284 20.4292 37.8192 20.4411 37.8093C20.4746 37.7815 20.5074 37.7525 20.5383 37.7212L46.2479 12.0109C48.3097 9.94895 48.3097 6.59377 46.2479 4.53146L43.2632 1.54708C41.2014 -0.515234 37.846 -0.514853 35.7841 1.54708L10.075 27.2574C10.0437 27.2883 10.0147 27.3215 9.9865 27.355C9.97696 27.3665 9.9678 27.3783 9.95865 27.3901C9.9411 27.4127 9.92432 27.4355 9.90829 27.4588C9.89838 27.4729 9.88846 27.4874 9.8793 27.5019C9.86443 27.5252 9.85069 27.5488 9.83734 27.5729C9.82857 27.5885 9.81941 27.6042 9.81102 27.6198C9.79424 27.653 9.77898 27.6862 9.76448 27.7205C9.75723 27.7377 9.75113 27.7556 9.74426 27.7732C9.73625 27.7953 9.72824 27.8178 9.72099 27.8403C9.71527 27.8586 9.70993 27.8769 9.70497 27.8952C9.69849 27.9189 9.69276 27.9429 9.68742 27.9673C9.68361 27.9841 9.67979 28.0009 9.67674 28.0177C9.6756 28.0226 9.67445 28.0272 9.67369 28.0318L8.12378 37.0158L5.52597 37.017C2.47879 37.0185 0 39.4989 0 42.5459V44.4712C0 47.5201 2.48032 50.0005 5.52902 50.0005H26.6827C29.7314 50.0005 32.2117 47.5201 32.2117 44.4712C32.2117 43.0132 33.3977 41.8267 34.8557 41.8267H48.5577C49.3542 41.8267 50 41.1813 50 40.3847C50 39.5878 49.3542 38.9423 48.5577 38.9423ZM12.043 31.2653L16.5306 35.7531L11.1076 36.6885L12.043 31.2653ZM33.5567 7.85382L35.7288 10.026L15.3065 30.4493L13.1344 28.2771L33.5567 7.85382ZM19.5183 34.6613L17.3462 32.4891L37.7689 12.0658L39.941 14.238L19.5183 34.6613ZM37.8239 3.58651C38.7611 2.64958 40.2859 2.64958 41.2235 3.58651L44.2078 6.57126C45.145 7.50858 45.145 9.03376 44.2078 9.97108L41.9804 12.1986L35.5965 5.81401L37.8239 3.58651Z\",\n fill: color\n }));\n});\nexport default Annotation;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Rotate90 = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 52 42\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M46.4326 40.0282C46.1217 40.5666 45.6098 40.9595 45.0093 41.1204C44.4088 41.2813 43.7691 41.197 43.2307 40.8862C42.6923 40.5754 42.2995 40.0634 42.1386 39.463C41.9777 38.8625 42.0619 38.2227 42.3727 37.6843C45.2819 32.6454 46.0703 26.6571 44.5644 21.0369C43.0584 15.4167 39.3816 10.6249 34.3426 7.71563C25.1427 2.4043 13.7736 4.38306 6.93632 12.1744L14.5457 12.0831H14.5744C15.196 12.0795 15.7937 12.3229 16.2358 12.7599C16.678 13.1969 16.9284 13.7916 16.9321 14.4133C16.9357 15.0349 16.6923 15.6326 16.2553 16.0747C15.8183 16.5169 15.2236 16.7673 14.6019 16.771L2.37222 16.9175H2.34409C2.03391 16.9175 1.72681 16.856 1.44059 16.7364C1.15437 16.6169 0.894721 16.4417 0.676697 16.2211C0.458674 16.0004 0.28661 15.7387 0.170478 15.4511C0.0543471 15.1635 -0.00354164 14.8557 0.000167612 14.5455L0.147346 2.31591C0.151046 2.00811 0.215338 1.70404 0.336549 1.42108C0.457761 1.13812 0.633519 0.881802 0.853788 0.666765C1.07406 0.451728 1.33453 0.282182 1.62032 0.167807C1.90611 0.0534328 2.21164 -0.00353076 2.51944 0.000169355C2.82725 0.00386947 3.13132 0.0681609 3.41428 0.189372C3.69724 0.310584 3.95356 0.486342 4.16859 0.706611C4.38363 0.926881 4.55318 1.18735 4.66755 1.47314C4.78193 1.75894 4.83889 2.06446 4.83519 2.37227L4.77171 7.65586C9.37537 3.16334 15.4496 0.489016 21.8718 0.127065C28.2941 -0.234886 34.6303 1.74001 39.7096 5.6868C44.7889 9.63359 48.2679 15.2855 49.5038 21.5981C50.7397 27.9107 49.6485 34.4574 46.4326 40.0282Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M25 28C26.6569 28 28 26.6569 28 25C28 23.3431 26.6569 22 25 22C23.3431 22 22 23.3431 22 25C22 26.6569 23.3431 28 25 28ZM25 32C28.866 32 32 28.866 32 25C32 21.134 28.866 18 25 18C21.134 18 18 21.134 18 25C18 28.866 21.134 32 25 32Z\",\n fill: color\n }));\n});\nexport default Rotate90;","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { Color as PColor } from '../../utils/types/palette';\n// import { BorderRadiusSize as BRSize } from '../../utils/types/shape';\nimport InputStyled from '../input/input.styles';\nimport { fontSizeInputMixin } from '../input/input.mixin';\nimport { Size } from '../menu-item/types';\nvar baseClassName = 'Select';\nvar Icon = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'Icon')\n}).withConfig({\n componentId: \"sc-mfrapg-0\"\n})(function (_ref) {\n var palette = _ref.theme.palette,\n size = _ref.size;\n return css([\"display:flex;flex-shrink:0;color:\", \";padding:\", \";margin-left:6px;\"], palette[PColor.IconsPrimary], size === Size.Md ? '2.5px' : '2px');\n});\nvar TickIcon = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'tickIcon')\n}).withConfig({\n componentId: \"sc-mfrapg-1\"\n})(function (_ref2) {\n var palette = _ref2.theme.palette;\n return css([\"color:\", \";\"], palette[PColor.AccentStateless]);\n});\nvar Container = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'Container')\n}).withConfig({\n componentId: \"sc-mfrapg-2\"\n})(function (_ref3) {\n var _ref3$fullWidth = _ref3.fullWidth,\n fullWidth = _ref3$fullWidth === void 0 ? false : _ref3$fullWidth;\n return css([\"position:relative;display:inline-flex;\", \"\"], fullWidth ? 'width: 100%' : '');\n});\nvar Select = /*#__PURE__*/styled(InputStyled.Input).attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-mfrapg-3\"\n})(function (_ref4) {\n var palette = _ref4.theme.palette,\n disabled = _ref4.disabled,\n readOnly = _ref4.readOnly,\n _ref4$size = _ref4.size,\n size = _ref4$size === void 0 ? 'sm' : _ref4$size;\n return css([\"cursor:\", \";user-select:none;background:\", \";\", \";\"], disabled || readOnly ? 'default' : 'pointer', disabled ? palette[PColor.BackgroundHover] : palette[PColor.BackgroundStateless], fontSizeInputMixin[size]);\n});\nvar Label = /*#__PURE__*/styled.label.attrs({\n className: generateClassNames(baseClassName, 'Label')\n}).withConfig({\n componentId: \"sc-mfrapg-4\"\n})([\"flex-grow:1;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;\"]);\nvar Placeholder = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'Placeholder')\n}).withConfig({\n componentId: \"sc-mfrapg-5\"\n})(function (_ref5) {\n var palette = _ref5.theme.palette,\n size = _ref5.size;\n return css([\"width:100%;color:\", \";margin-right:\", \"px;\"], palette[PColor.TextPlaceholder], size === Size.Md ? 10 : 6);\n});\nvar Input = /*#__PURE__*/styled.input.attrs({\n className: generateClassNames(baseClassName, 'Input'),\n 'aria-hidden': 'true',\n tabindex: '-1'\n}).withConfig({\n componentId: \"sc-mfrapg-6\"\n})([\"left:0;width:100%;bottom:0;opacity:0;position:absolute;pointer-events:none;box-sizing:border-box;\"]);\nvar Styled = applyDisplayNames({\n Container: Container,\n Select: Select,\n Label: Label,\n Icon: Icon,\n TickIcon: TickIcon,\n Input: Input,\n Placeholder: Placeholder\n});\nexport default Styled;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _typeof from \"@babel/runtime/helpers/typeof\";\nimport _toConsumableArray from \"@babel/runtime/helpers/toConsumableArray\";\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport React from 'react';\nimport { Tick } from '@scaleflex/icons/tick';\nimport { MenuItemActions, MenuItemLabel } from '../menu-item';\nimport { InputSize } from '../../utils/types';\nimport Styled from './select.styles';\nexport var getIconSize = function getIconSize(size) {\n switch (size) {\n case InputSize.Md:\n return 11;\n case InputSize.Sm:\n default:\n return 10;\n }\n};\nexport var renderIcon = function renderIcon(_icon, size) {\n return _icon ? /*#__PURE__*/React.createElement(Styled.Icon, null, typeof _icon === 'function' ? _icon({\n size: getIconSize(size)\n }) : _icon) : undefined;\n};\nvar generateChildren = function generateChildren(children) {\n var isActive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var size = arguments.length > 2 ? arguments[2] : undefined;\n var hideMenuItemsActions = arguments.length > 3 ? arguments[3] : undefined;\n var miChildren = /*#__PURE__*/React.createElement(MenuItemLabel, null, children);\n if (isActive && children) {\n var miActions = /*#__PURE__*/React.createElement(MenuItemActions, null, /*#__PURE__*/React.createElement(Styled.TickIcon, null, /*#__PURE__*/React.createElement(Tick, {\n size: getIconSize(size)\n })));\n if (React.Children.count(children) === 1) {\n return /*#__PURE__*/React.createElement(React.Fragment, null, miChildren, !hideMenuItemsActions && miActions);\n }\n if (React.Children.count(children) > 1 && !React.Children.toArray(children).some(function (child) {\n var _child$type;\n return (child === null || child === void 0 ? void 0 : (_child$type = child.type) === null || _child$type === void 0 ? void 0 : _child$type.displayName) === 'MenuItemActions';\n })) {\n return /*#__PURE__*/React.createElement(React.Fragment, null, children, miActions);\n }\n }\n return miChildren;\n};\nexport var renderOption = function renderOption(menuItem, _ref) {\n var _type, _props, _props2, _props3;\n var value = _ref.value,\n _ref$multiple = _ref.multiple,\n multiple = _ref$multiple === void 0 ? false : _ref$multiple,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? InputSize.Md : _ref$size,\n _ref$hideMenuItemsAct = _ref.hideMenuItemsActions,\n hideMenuItemsActions = _ref$hideMenuItemsAct === void 0 ? false : _ref$hideMenuItemsAct,\n onClose = _ref.onClose,\n onChange = _ref.onChange;\n if (! /*#__PURE__*/React.isValidElement(menuItem)) {\n return menuItem;\n }\n if (((_type = menuItem.type) === null || _type === void 0 ? void 0 : _type.displayName) !== 'MenuItem') {\n return /*#__PURE__*/React.cloneElement(menuItem);\n }\n var menuItemValue = menuItem === null || menuItem === void 0 ? void 0 : (_props = menuItem.props) === null || _props === void 0 ? void 0 : _props.value;\n var valueArr = multiple ? Array.isArray(value) ? value : [] : [value];\n var active = valueArr.length > 0 && valueArr.includes(menuItemValue);\n var isDisabledMenuItem = menuItem === null || menuItem === void 0 ? void 0 : (_props2 = menuItem.props) === null || _props2 === void 0 ? void 0 : _props2.disabled;\n return /*#__PURE__*/React.cloneElement(menuItem, {\n active: active,\n size: size,\n children: generateChildren(menuItem === null || menuItem === void 0 ? void 0 : (_props3 = menuItem.props) === null || _props3 === void 0 ? void 0 : _props3.children, active, size, hideMenuItemsActions),\n onClick: function onClick() {\n var _menuItemValue$toStri;\n if (!multiple && typeof onClose === 'function') {\n onClose();\n }\n if (typeof onChange === 'function' && !isDisabledMenuItem && !!(menuItemValue !== null && menuItemValue !== void 0 && (_menuItemValue$toStri = menuItemValue.toString()) !== null && _menuItemValue$toStri !== void 0 && _menuItemValue$toStri.length)) {\n var newValue = menuItemValue;\n if (multiple) {\n newValue = _toConsumableArray(Array.isArray(value) ? value : []);\n var index = newValue.indexOf(menuItemValue);\n if (index > -1) {\n newValue.splice(index, 1);\n } else {\n newValue.push(menuItemValue);\n }\n }\n onChange(newValue);\n }\n }\n });\n};\nvar getOptionValue = function getOptionValue(option) {\n var children = option.props ? option.props.children : option;\n if (Array.isArray(children)) return children.map(function (child) {\n return getOptionValue(child);\n }).join(' ');\n if (_typeof(children) === 'object') return getOptionValue(children.props.children);\n return children;\n};\nvar renderOptionValue = function renderOptionValue(option, showSelectionKey) {\n if (option && option.children) {\n var child = showSelectionKey ? option.value : option.children;\n while (typeof child !== 'string') {\n if (Array.isArray(child)) {\n child = getOptionValue(child[1]);\n } else {\n child = getOptionValue(child);\n }\n }\n return child;\n }\n};\nexport var renderValue = function renderValue(_ref2) {\n var value = _ref2.value,\n _ref2$multiple = _ref2.multiple,\n multiple = _ref2$multiple === void 0 ? false : _ref2$multiple,\n children = _ref2.children,\n _ref2$showSelectionKe = _ref2.showSelectionKey,\n showSelectionKey = _ref2$showSelectionKe === void 0 ? false : _ref2$showSelectionKe;\n var optionsProps = [];\n React.Children.forEach(children, function (child) {\n if ( /*#__PURE__*/React.isValidElement(child)) {\n var _type2 = child === null || child === void 0 ? void 0 : child.type,\n displayName = _type2.displayName;\n if (displayName === 'MenuItem' && Boolean(child.props)) {\n optionsProps.push(_objectSpread({}, child.props));\n }\n }\n });\n var activeOptions = multiple ? optionsProps.filter(function (itemProps) {\n return Array.isArray(value) && value.includes(itemProps.value);\n }) : [optionsProps.find(function (itemProps) {\n return itemProps.value === value;\n })];\n if (activeOptions.length > 0) {\n return activeOptions.map(function (option) {\n return renderOptionValue(option, showSelectionKey);\n }).join(', ');\n }\n return Array.isArray(value) ? value.join(', ') : value;\n};","import _extends from \"@babel/runtime/helpers/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\", \"size\", \"error\", \"multiple\", \"onChange\", \"value\", \"fullWidth\", \"selectProps\", \"MenuProps\", \"readOnly\", \"disabled\", \"scroll\", \"placeholder\", \"showSelectionKey\", \"hideMenuItemsActions\", \"renderLabel\", \"onRequestClose\"];\nimport React, { useState } from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport ArrowTick from '../arrow-tick';\nimport Menu from '../menu';\nimport { propTypes as menuPropTypes } from '../menu/menu.component';\nimport { renderValue, renderOption } from './select.utils';\nimport { InputSize } from '../../utils/types';\nimport Styled from './select.styles';\nimport { Size } from '../menu-item/types';\nvar Select = intrinsicComponent(function (_ref, ref) {\n var _value$toString;\n var children = _ref.children,\n size = _ref.size,\n error = _ref.error,\n multiple = _ref.multiple,\n onChange = _ref.onChange,\n value = _ref.value,\n fullWidth = _ref.fullWidth,\n selectProps = _ref.selectProps,\n MenuProps = _ref.MenuProps,\n readOnly = _ref.readOnly,\n disabled = _ref.disabled,\n _ref$scroll = _ref.scroll,\n scroll = _ref$scroll === void 0 ? true : _ref$scroll,\n placeholder = _ref.placeholder,\n showSelectionKey = _ref.showSelectionKey,\n hideMenuItemsActions = _ref.hideMenuItemsActions,\n renderLabel = _ref.renderLabel,\n onRequestClose = _ref.onRequestClose,\n rest = _objectWithoutProperties(_ref, _excluded);\n var _useState = useState(undefined),\n _useState2 = _slicedToArray(_useState, 2),\n anchorEl = _useState2[0],\n setAnchorEl = _useState2[1];\n var open = Boolean(anchorEl);\n var handleClick = function handleClick(event) {\n return setAnchorEl(event.currentTarget);\n };\n var isValueExists = Array.isArray(value) ? !!value.length : !!(value !== null && value !== void 0 && (_value$toString = value.toString()) !== null && _value$toString !== void 0 && _value$toString.length);\n var handleClose = function handleClose() {\n if (onRequestClose) {\n onRequestClose();\n }\n setAnchorEl(undefined);\n };\n return /*#__PURE__*/React.createElement(Styled.Container, {\n ref: ref,\n fullWidth: Boolean(fullWidth)\n }, /*#__PURE__*/React.createElement(Styled.Select, _extends({}, rest, {\n disabled: disabled,\n size: size,\n error: error,\n fullWidth: Boolean(fullWidth),\n readOnly: readOnly,\n showSelectionKey: showSelectionKey,\n onClick: readOnly || disabled ? undefined : handleClick\n }), isValueExists && /*#__PURE__*/React.createElement(Styled.Label, null, typeof renderLabel === 'function' ? renderLabel(value) : renderValue({\n value: value,\n multiple: multiple,\n children: children,\n showSelectionKey: showSelectionKey\n })), !isValueExists && /*#__PURE__*/React.createElement(Styled.Placeholder, {\n size: size\n }, placeholder), /*#__PURE__*/React.createElement(Styled.Icon, {\n size: size\n }, /*#__PURE__*/React.createElement(ArrowTick, {\n type: open ? 'top' : 'bottom',\n IconProps: {\n size: size === Size.Md ? 11 : 10\n }\n })), /*#__PURE__*/React.createElement(Styled.Input, selectProps)), /*#__PURE__*/React.createElement(Menu, _extends({\n onClose: handleClose,\n scroll: scroll,\n open: open,\n anchorEl: anchorEl\n }, MenuProps), React.Children.map(children, function (child) {\n return renderOption(child, {\n value: value,\n multiple: multiple,\n size: size,\n hideMenuItemsActions: hideMenuItemsActions,\n onClose: handleClose,\n onChange: readOnly || disabled ? undefined : onChange\n });\n })));\n});\nexport var defaultProps = {\n size: InputSize.Md,\n error: false,\n multiple: false,\n fullWidth: false,\n readOnly: false,\n disabled: false,\n scroll: true,\n hideMenuItemsActions: false\n};\nSelect.defaultProps = defaultProps;\nexport var simpleValuePropTypes = PT.oneOfType([PT.string, PT.number, PT.oneOf([null])]);\nexport var propTypes = {\n size: PT.oneOf(objectValues(InputSize)),\n error: PT.bool,\n multiple: PT.bool,\n fullWidth: PT.bool,\n children: PT.oneOfType([PT.element, PT.arrayOf(PT.element)]),\n value: PT.oneOfType([PT.string, PT.number, PT.oneOf([null]), PT.arrayOf(simpleValuePropTypes)]),\n onChange: PT.func,\n MenuProps: PT.exact(menuPropTypes),\n // eslint-disable-next-line react/forbid-prop-types\n selectProps: PT.object,\n readOnly: PT.bool,\n disabled: PT.bool,\n hideMenuItemsActions: PT.bool,\n showSelectionKey: PT.bool,\n scroll: PT.bool,\n renderLabel: PT.func,\n onRequestClose: PT.func\n};\nSelect.propTypes = propTypes;\nexport default Select;","function useDrag(onMove, onStart, onEnd) {\n var onDragging = function onDragging(e) {\n if (typeof onMove === 'function') {\n var _e$touches;\n onMove(((_e$touches = e.touches) === null || _e$touches === void 0 ? void 0 : _e$touches[0]) || e);\n }\n };\n var disableSliding = function disableSliding(e) {\n document.removeEventListener('mousemove', onDragging);\n document.removeEventListener('mouseup', disableSliding);\n document.removeEventListener('mouseleave', disableSliding);\n document.removeEventListener('touchmove', onDragging);\n document.removeEventListener('touchend', disableSliding);\n document.removeEventListener('touchcancel', disableSliding);\n if (typeof onEnd === 'function') {\n var _e$touches2;\n onEnd(((_e$touches2 = e.touches) === null || _e$touches2 === void 0 ? void 0 : _e$touches2[0]) || e);\n }\n };\n var enableDrag = function enableDrag(e) {\n document.addEventListener('mousemove', onDragging);\n document.addEventListener('mouseup', disableSliding);\n document.addEventListener('mouseleave', disableSliding);\n document.addEventListener('touchmove', onDragging);\n document.addEventListener('touchend', disableSliding);\n document.addEventListener('touchcancel', disableSliding);\n if (typeof onStart === 'function') {\n var _e$touches3;\n onStart(((_e$touches3 = e.touches) === null || _e$touches3 === void 0 ? void 0 : _e$touches3[0]) || e);\n }\n };\n return {\n onMouseDown: enableDrag,\n onTouchStart: enableDrag\n };\n}\nexport default useDrag;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { Color as PColor } from '../../utils/types/palette';\nvar baseClassName = 'ColorPicker';\nvar colorItemClassName = 'ColorItem';\n\n// const ColorPicker = styled.div.attrs({\n// className: generateClassNames(baseClassName, 'root'),\n// })`\n// display: flex;\n// flex-direction: column;\n// align-items: center;\n// `;\n\nvar ColorPickerWrapper = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-qj4xo5-0\"\n})([\"background-color:\", \";box-shadow:0px 1px 2px rgba(78,77,77,0.15);border-radius:2px;padding:12px;max-width:300px;\"], function (_ref) {\n var theme = _ref.theme;\n return theme.palette[PColor.BackgroundSecondary];\n});\nvar ColorPickerIcon = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'icon')\n}).withConfig({\n componentId: \"sc-qj4xo5-1\"\n})([\"display:flex;justify-content:space-between;align-items:center;cursor:pointer;\"]);\nvar RangePickerWrapper = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'range-picker')\n}).withConfig({\n componentId: \"sc-qj4xo5-2\"\n})(function (_ref2) {\n var color = _ref2.color;\n return css([\"position:relative;border-radius:2px;width:100%;height:180px;user-select:none;cursor:crosshair;background-color:\", \";\"], color);\n});\nvar WhiteGradient = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'white-gradient')\n}).withConfig({\n componentId: \"sc-qj4xo5-3\"\n})([\"background:linear-gradient(to right,white 0%,rgba(255,255,255,0) 100%);z-index:0;position:absolute;width:100%;height:100%;border-radius:2px;user-select:none;pointer-events:none;top:-1px;\"]);\nvar BlackGradient = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'black-gradient')\n}).withConfig({\n componentId: \"sc-qj4xo5-4\"\n})([\"background:linear-gradient(to bottom,rgba(0,0,0,0) 0%,black 100%);z-index:1;position:absolute;width:100%;height:100%;border-radius:2px;user-select:none;pointer-events:none;\"]);\nvar ColorPointer = /*#__PURE__*/styled.span.attrs(function (_ref3) {\n var _ref3$left = _ref3.left,\n left = _ref3$left === void 0 ? 0 : _ref3$left,\n _ref3$top = _ref3.top,\n top = _ref3$top === void 0 ? 0 : _ref3$top,\n _ref3$considerTopWidt = _ref3.considerTopWidth,\n considerTopWidth = _ref3$considerTopWidt === void 0 ? false : _ref3$considerTopWidt,\n style = _ref3.style;\n return {\n className: generateClassNames(baseClassName, 'pointer'),\n style: _objectSpread({\n left: left - 7,\n // 7\n top: top - (considerTopWidth ? 7 : 0)\n }, style)\n };\n}).withConfig({\n componentId: \"sc-qj4xo5-5\"\n})(function (_ref4) {\n var theme = _ref4.theme,\n pointerColor = _ref4.pointerColor;\n return css([\"display:inline-block;box-sizing:border-box;width:15px;height:15px;border-radius:20px;box-shadow:0px 1px 2px rgba(78,77,77,0.15);border:2px solid \", \";background-color:\", \";position:absolute;cursor:pointer;z-index:11;user-select:none;outline:none;\"], theme.palette[PColor.BackgroundSecondary], pointerColor);\n});\nvar BarWrapper = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'bar-wrapper')\n}).withConfig({\n componentId: \"sc-qj4xo5-6\"\n})([\"margin-top:8px;position:relative;width:100%;height:12px;\"]);\nvar Bar = /*#__PURE__*/styled.table.attrs({\n className: generateClassNames(baseClassName, 'bar')\n}).withConfig({\n componentId: \"sc-qj4xo5-7\"\n})([\"border-radius:4px;width:100%;height:8px;border-collapse:collapse;\"]);\nvar BarColorStop = /*#__PURE__*/styled.td.attrs(function (_ref5) {\n var $color = _ref5.$color;\n return {\n className: generateClassNames(baseClassName, 'stop'),\n style: {\n backgroundColor: $color\n }\n };\n}).withConfig({\n componentId: \"sc-qj4xo5-8\"\n})([\"padding:0;user-select:none;pointer-events:none;&:first-child{width:4px;border-top-left-radius:4px;border-bottom-left-radius:4px;}&:last-child{width:4px;border-top-right-radius:4px;border-bottom-right-radius:4px;}\"]);\nvar ColorPickerAction = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'action')\n}).withConfig({\n componentId: \"sc-qj4xo5-9\"\n})([\"display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:12px;\"]);\nvar ColorItemWrapper = /*#__PURE__*/styled.label.attrs({\n className: generateClassNames(colorItemClassName, 'label')\n}).withConfig({\n componentId: \"sc-qj4xo5-10\"\n})(function (_ref6) {\n var theme = _ref6.theme,\n size = _ref6.size,\n color = _ref6.color,\n stroke = _ref6.stroke,\n value = _ref6.value;\n return css([\"border-radius:2px;border:\", \";box-sizing:border-box;width:\", \"px;height:\", \"px;background-color:\", \";user-select:none;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all 300ms;margin-bottom:8px;background:\", \";input{display:none;}\"], \"1px solid \".concat(stroke), size, size, color, value === 'rgba(0,0,0,0)' && \"repeating-conic-gradient(\".concat(theme.palette[PColor.LinkPrimary], \" 0% 25%, transparent 0% 50%) 50% / 8px 8px\"));\n});\nvar ColorItemsContainer = /*#__PURE__*/styled.div.withConfig({\n componentId: \"sc-qj4xo5-11\"\n})([\"display:flex;flex-wrap:wrap;align-content:space-between;margin-top:14px;margin-left:12px;& > .item{margin-right:8px;display:flex;justify-content:center;}\"]);\nvar Select = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'select')\n}).withConfig({\n componentId: \"sc-qj4xo5-12\"\n})(function (_ref7) {\n var value = _ref7.value;\n return css([\"width:\", \";\"], value === 'rgb' ? '25%' : '35%');\n});\nvar Styled = applyDisplayNames({\n ColorPickerWrapper: ColorPickerWrapper,\n RangePickerWrapper: RangePickerWrapper,\n WhiteGradient: WhiteGradient,\n BlackGradient: BlackGradient,\n ColorPointer: ColorPointer,\n BarWrapper: BarWrapper,\n Bar: Bar,\n BarColorStop: BarColorStop,\n ColorPickerAction: ColorPickerAction,\n ColorPickerIcon: ColorPickerIcon,\n ColorItemsContainer: ColorItemsContainer,\n ColorItemWrapper: ColorItemWrapper,\n Select: Select\n});\nexport default Styled;","import React, { useMemo } from 'react';\nimport PT from 'prop-types';\nimport Tick from '@scaleflex/icons/tick';\nimport { intrinsicComponent } from '../../utils/functions';\nimport Styled from './color-picker.styles';\nvar ColorItem = intrinsicComponent(function (_ref, ref) {\n var value = _ref.value,\n onChange = _ref.onChange,\n checked = _ref.checked,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 24 : _ref$size;\n var checkIconColor = useMemo(function () {\n if (value === '#ffffff' || value === 'rgba(0,0,0,0)') {\n return 'black';\n }\n return 'white';\n }, [value]);\n return /*#__PURE__*/React.createElement(Styled.ColorItemWrapper, {\n ref: ref,\n color: value,\n size: size,\n stroke: value === 'rgba(0,0,0,0)' ? '#a8a8a8' : '#E9EEF2',\n value: value\n }, /*#__PURE__*/React.createElement(\"input\", {\n type: \"radio\",\n value: value,\n checked: checked,\n onChange: onChange\n }), checked && /*#__PURE__*/React.createElement(Tick, {\n color: checkIconColor\n }));\n});\nColorItem.defaultProps = {};\nColorItem.propTypes = {\n value: PT.string.isRequired,\n checked: PT.bool,\n onChange: PT.func.isRequired,\n size: PT.number\n};\nexport default ColorItem;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _toConsumableArray from \"@babel/runtime/helpers/toConsumableArray\";\nimport _slicedToArray from \"@babel/runtime/helpers/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"defaultColor\", \"onChange\", \"pinnedColors\", \"showTransparentColor\", \"containerProps\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport React, { useState, useMemo, useEffect } from 'react';\nimport PT from 'prop-types';\nimport { PinOutline, DeleteOutline } from '@scaleflex/icons';\nimport Select from '../select';\nimport MenuItem from '../menu-item';\nimport Input from '../input';\nimport useDrag from '../../hooks/use-drag';\nimport { intrinsicComponent, colorToHsl, hexToRgb, hslToHex, hslToHsv, hsvToHsl, restrictNumber, mapNumber, colorToHex, getElemDocumentCoords, rgbToHex, validateHex, rgbStringToArray } from '../../utils/functions';\nimport Styled from './color-picker.styles';\nimport ColorItem from './color-item.component';\nvar transparentColor = ['rgba(0,0,0,0)'];\nvar transparentColorHex = '#00000000';\nvar colorsHuesCount = 360;\nvar ColorPicker = intrinsicComponent(function (_ref, ref) {\n var _ref$defaultColor = _ref.defaultColor,\n defaultColor = _ref$defaultColor === void 0 ? '#000000' : _ref$defaultColor,\n onChange = _ref.onChange,\n _ref$pinnedColors = _ref.pinnedColors,\n pinnedColors = _ref$pinnedColors === void 0 ? [] : _ref$pinnedColors,\n _ref$showTransparentC = _ref.showTransparentColor,\n showTransparentColor = _ref$showTransparentC === void 0 ? false : _ref$showTransparentC,\n containerProps = _ref.containerProps,\n rest = _objectWithoutProperties(_ref, _excluded);\n var showedColors = showTransparentColor ? transparentColor.concat(pinnedColors) : pinnedColors;\n var isTransparentColor = function isTransparentColor(color) {\n return color === transparentColorHex || color === transparentColor[0];\n };\n var _useState = useState({\n color: '#ff0000',\n pointerLeft: 0\n }),\n _useState2 = _slicedToArray(_useState, 2),\n bar = _useState2[0],\n setBar = _useState2[1];\n var _useState3 = useState({\n color: isTransparentColor(defaultColor) ? '#00000000' : colorToHex(defaultColor) || '#000000',\n pointer: {\n left: 0,\n top: 0\n }\n }),\n _useState4 = _slicedToArray(_useState3, 2),\n rangePicker = _useState4[0],\n setRangePicker = _useState4[1];\n var _useState5 = useState(showedColors),\n _useState6 = _slicedToArray(_useState5, 2),\n localPinnedColors = _useState6[0],\n setLocalPinnedColors = _useState6[1];\n var _useState7 = useState('hex'),\n _useState8 = _slicedToArray(_useState7, 2),\n inputType = _useState8[0],\n setInputType = _useState8[1];\n var _useState9 = useState([]),\n _useState10 = _slicedToArray(_useState9, 2),\n rgbColorValue = _useState10[0],\n setRgbColorValue = _useState10[1];\n var _useState11 = useState(colorToHex(rangePicker.color)),\n _useState12 = _slicedToArray(_useState11, 2),\n hexInputValue = _useState12[0],\n setHexInputValue = _useState12[1];\n var _useState13 = useState(null),\n _useState14 = _slicedToArray(_useState13, 2),\n barRef = _useState14[0],\n setBarRef = _useState14[1];\n var _useState15 = useState(null),\n _useState16 = _slicedToArray(_useState15, 2),\n rangePickerRef = _useState16[0],\n setRangePickerRef = _useState16[1];\n var isColorChecked = function isColorChecked(checkedColor) {\n if (checkedColor === transparentColor[0] && rangePicker.color === transparentColorHex) {\n return true;\n }\n return checkedColor === rangePicker.color;\n };\n var filterTransparentColor = function filterTransparentColor(colors) {\n return colors.filter(function (item) {\n return item !== 'rgba(0,0,0,0)';\n });\n };\n var getRgbColor = function getRgbColor(color) {\n return isTransparentColor(color) ? transparentColor[0] : \"rgb(\".concat(hexToRgb(color).join(', '), \")\");\n };\n var handlePinnedColors = function handlePinnedColors(hexColor, type) {\n if (type === 'add') {\n var newLocalPinnedColors = [].concat(_toConsumableArray(localPinnedColors), [hexColor]);\n setLocalPinnedColors(newLocalPinnedColors);\n if (typeof onChange === 'function') {\n onChange(rangePicker.color, getRgbColor(hexColor), filterTransparentColor(newLocalPinnedColors));\n }\n } else {\n var _newLocalPinnedColors = localPinnedColors.filter(function (item) {\n return item !== rangePicker.color;\n });\n setLocalPinnedColors(_newLocalPinnedColors);\n if (typeof onChange === 'function') {\n onChange(rangePicker.color, getRgbColor(hexColor), filterTransparentColor(_newLocalPinnedColors));\n }\n }\n };\n var changeBarPosByColor = function changeBarPosByColor(color) {\n if (barRef !== null) {\n var _ref2 = getElemDocumentCoords(barRef),\n left = _ref2.left;\n var _colorToHsl = colorToHsl(color || rangePicker.color),\n _colorToHsl2 = _slicedToArray(_colorToHsl, 1),\n h = _colorToHsl2[0];\n var targetColorElem = barRef.querySelector(\"[data-hue='\".concat(h, \"']\"));\n if (targetColorElem !== null) {\n var targetColorRgb = targetColorElem.style.backgroundColor || bar.color;\n setBar({\n color: targetColorRgb,\n pointerLeft: getElemDocumentCoords(targetColorElem).left - left || bar.pointerLeft\n });\n }\n }\n };\n var handleRgbInput = function handleRgbInput(value, index) {\n if (value > 255 || Number.isNaN(value)) {\n return;\n }\n var rgbArr = rgbColorValue;\n rgbArr[index] = value;\n var newHexColor = rgbToHex.apply(void 0, _toConsumableArray(rgbArr));\n setRgbColorValue(_toConsumableArray(rgbArr));\n if (validateHex(newHexColor)) {\n setRangePicker(_objectSpread(_objectSpread({}, rangePicker), {}, {\n color: newHexColor\n }));\n changeBarPosByColor(newHexColor);\n }\n };\n var updateRgb = function updateRgb(color) {\n if (color.includes('rgb')) {\n setRgbColorValue(rgbStringToArray(color));\n } else {\n setRgbColorValue(hexToRgb(color));\n }\n };\n var getHexColor = function getHexColor(color) {\n return isTransparentColor(color) ? transparentColorHex : color;\n };\n var changeRangePickerPointerPosByColor = function changeRangePickerPointerPosByColor(color) {\n if (rangePickerRef !== null) {\n var _ref3 = getElemDocumentCoords(rangePickerRef),\n width = _ref3.width,\n height = _ref3.height;\n var colorHsl = colorToHsl(color);\n var colorHsv = hslToHsv(colorHsl[0], colorHsl[1] / 100, colorHsl[2] / 100);\n var left = mapNumber(colorHsv[1], 0, 100, 0, width);\n var top = height - mapNumber(colorHsv[2], 0, 100, 0, height);\n setRangePicker({\n color: getHexColor(color),\n pointer: {\n left: left,\n top: top\n }\n });\n changeBarPosByColor(color);\n updateRgb(color);\n if (typeof onChange === 'function') {\n onChange(getHexColor(color), getRgbColor(color), filterTransparentColor(localPinnedColors));\n }\n }\n };\n var changeRangePickerColorByPosition = function changeRangePickerColorByPosition(left, top, barColor) {\n if (rangePickerRef !== null) {\n var _ref4 = getElemDocumentCoords(rangePickerRef),\n width = _ref4.width,\n height = _ref4.height;\n var _colorToHsl3 = colorToHsl(barColor),\n _colorToHsl4 = _slicedToArray(_colorToHsl3, 1),\n barColorHue = _colorToHsl4[0];\n var restrictedLeft = restrictNumber(left, 0, width) || 0;\n var restrictedTop = restrictNumber(top, 0, height) || 0;\n var hsl = hsvToHsl(barColorHue, restrictedLeft / width, (height - restrictedTop) / height);\n var hexColor = hslToHex(hsl[0], hsl[1], hsl[2]);\n setRangePicker({\n color: hexColor,\n pointer: {\n left: restrictedLeft,\n top: restrictedTop\n }\n });\n if (typeof onChange === 'function') {\n onChange(hexColor, \"rgb(\".concat(hexToRgb(hexColor).join(', '), \")\"), filterTransparentColor(localPinnedColors));\n }\n }\n };\n var changeBarColorByPosition = function changeBarColorByPosition(pointerLeft) {\n var barElem = barRef;\n if (barElem !== null) {\n var _ref5 = getElemDocumentCoords(barElem),\n width = _ref5.width;\n var mappedPointerLeft = restrictNumber(Math.round(mapNumber(pointerLeft, 0, width, 0, colorsHuesCount)), 0, colorsHuesCount);\n var targetColorElem = barElem.querySelector(\"[data-hue='\".concat(mappedPointerLeft, \"']\"));\n var targetColorRgb = targetColorElem.style.backgroundColor;\n setBar({\n color: targetColorRgb,\n pointerLeft: restrictNumber(pointerLeft, 0, width)\n });\n return targetColorRgb;\n }\n return bar.color;\n };\n var updateBarColor = function updateBarColor(e) {\n var barElem = barRef;\n if (barElem !== null) {\n var _e$touches;\n var _ref6 = getElemDocumentCoords(barElem),\n left = _ref6.left;\n var pointerEvent = ((_e$touches = e.touches) === null || _e$touches === void 0 ? void 0 : _e$touches[0]) || e;\n var barColor = changeBarColorByPosition(pointerEvent.pageX - left);\n changeRangePickerColorByPosition(rangePicker.pointer.left, rangePicker.pointer.top, barColor);\n }\n };\n var updateRangePickerColor = function updateRangePickerColor(e) {\n var rangePickerElem = rangePickerRef;\n if (rangePickerElem !== null) {\n var _ref7 = getElemDocumentCoords(rangePickerElem),\n left = _ref7.left,\n top = _ref7.top,\n height = _ref7.height,\n width = _ref7.width;\n var pointerLeft = e ? restrictNumber(e.pageX - left, 0, width) : rangePicker.pointer.left || 0;\n var pointerTop = e ? restrictNumber(e.pageY - top, 0, height) : rangePicker.pointer.left || 0;\n changeRangePickerColorByPosition(pointerLeft, pointerTop, bar.color);\n }\n };\n var moveBarPointerByArrows = function moveBarPointerByArrows(e) {\n if (e.key !== 'ArrowLeft' && e.key !== 'ArrowRight') {\n return;\n }\n changeBarColorByPosition(bar.pointerLeft + (e.key === 'ArrowLeft' ? -1 : 1));\n };\n var moveRangePickerPointerByArrows = function moveRangePickerPointerByArrows(e) {\n var currentDirection = 0;\n if (e.key === 'ArrowLeft' || e.key === 'ArrowUp') {\n currentDirection = -1;\n } else if (e.key === 'ArrowRight' || e.key === 'ArrowDown') {\n currentDirection = 1;\n }\n if (currentDirection) {\n changeRangePickerColorByPosition((rangePicker.pointer.left || 0) + (['ArrowLeft', 'ArrowRight'].includes(e.key) ? currentDirection : 0), (rangePicker.pointer.top || 0) + (['ArrowUp', 'ArrowDown'].includes(e.key) ? currentDirection : 0), bar.color);\n }\n };\n var validateHexAndUpdate = function validateHexAndUpdate(color) {\n var testHex = validateHex(color);\n if (testHex) {\n changeRangePickerPointerPosByColor(color);\n }\n setHexInputValue(color);\n };\n useEffect(function () {\n changeBarPosByColor(rangePicker.color);\n changeRangePickerPointerPosByColor(rangePicker.color);\n }, [barRef]);\n useEffect(function () {\n setHexInputValue(rangePicker.color);\n updateRgb(rangePicker.color);\n }, [rangePicker.color]);\n var barColors = useMemo(function () {\n return _toConsumableArray(new Array(colorsHuesCount + 1)).map(function (_, h) {\n return /*#__PURE__*/React.createElement(Styled.BarColorStop, {\n key: h,\n $color: \"hsl(\".concat(h, \", 100%, 50%)\"),\n \"data-hue\": h\n });\n });\n }, []);\n var barPointSliding = useDrag(updateBarColor, updateBarColor, null);\n var rangePickerPointSliding = useDrag(updateRangePickerColor, updateRangePickerColor, null);\n return /*#__PURE__*/React.createElement(Styled.ColorPickerWrapper, _extends({\n ref: ref\n }, rest), /*#__PURE__*/React.createElement(Styled.ColorPickerAction, null, /*#__PURE__*/React.createElement(Styled.Select, {\n value: inputType\n }, /*#__PURE__*/React.createElement(Select, {\n size: \"sm\",\n value: inputType,\n MenuProps: _objectSpread({\n zIndex: 11112\n }, containerProps),\n onChange: function onChange(ev) {\n return setInputType(ev);\n },\n fullWidth: true\n }, /*#__PURE__*/React.createElement(MenuItem, {\n value: \"hex\"\n }, \"Hex\"), /*#__PURE__*/React.createElement(MenuItem, {\n value: \"rgb\"\n }, \"RGB\"))), inputType === 'hex' ? /*#__PURE__*/React.createElement(Input, {\n size: \"sm\",\n error: !/^#([\\da-f]{3}){1,2}$/i.test(rangePicker.color),\n value: hexInputValue,\n onChange: function onChange(e) {\n return validateHexAndUpdate(e.target.value);\n },\n style: {\n width: '45%'\n }\n }) : rgbColorValue.map(function (rgb, index) {\n return /*#__PURE__*/React.createElement(Input, {\n key: index,\n size: \"sm\",\n value: rgb,\n onChange: function onChange(e) {\n var _e$target;\n return handleRgbInput(Number((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value), index);\n },\n style: {\n width: '20%'\n }\n });\n }), rangePicker.color !== transparentColorHex && /*#__PURE__*/React.createElement(Styled.ColorPickerIcon, {\n onClick: function onClick() {\n return localPinnedColors.some(function (checkedColor) {\n return isColorChecked(checkedColor);\n }) ? handlePinnedColors(rangePicker.color, 'delete') : handlePinnedColors(rangePicker.color, 'add');\n }\n }, localPinnedColors.some(function (checkedColor) {\n return isColorChecked(checkedColor);\n }) ? /*#__PURE__*/React.createElement(DeleteOutline, null) : /*#__PURE__*/React.createElement(PinOutline, null))), /*#__PURE__*/React.createElement(Styled.RangePickerWrapper, _extends({\n ref: setRangePickerRef,\n color: bar.color\n }, rangePickerPointSliding), /*#__PURE__*/React.createElement(Styled.WhiteGradient, null), /*#__PURE__*/React.createElement(Styled.BlackGradient, null), /*#__PURE__*/React.createElement(Styled.ColorPointer, {\n tabIndex: -1,\n left: rangePicker.pointer.left || 0,\n top: rangePicker.pointer.top || 0,\n onKeyDown: moveRangePickerPointerByArrows,\n pointerColor: hexInputValue,\n considerTopWidth: true\n })), /*#__PURE__*/React.createElement(Styled.BarWrapper, barPointSliding, /*#__PURE__*/React.createElement(Styled.Bar, {\n ref: setBarRef\n }, /*#__PURE__*/React.createElement(\"tbody\", null, /*#__PURE__*/React.createElement(\"tr\", null, barColors))), /*#__PURE__*/React.createElement(Styled.ColorPointer, {\n tabIndex: -1,\n left: bar.pointerLeft,\n onKeyDown: moveBarPointerByArrows,\n considerTopWidth: false,\n pointerColor: hexInputValue,\n style: {\n top: -3\n }\n })), /*#__PURE__*/React.createElement(Styled.ColorItemsContainer, null, localPinnedColors.map(function (color) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"item\",\n key: color\n }, /*#__PURE__*/React.createElement(ColorItem, {\n value: color,\n checked: isColorChecked(color),\n onChange: function onChange(ev) {\n return changeRangePickerPointerPosByColor(ev.target.value);\n }\n }));\n })));\n});\nColorPicker.defaultProps = {\n defaultColor: '#000000',\n pinnedColors: [],\n showTransparentColor: false\n};\nColorPicker.propTypes = {\n defaultColor: PT.string,\n onChange: PT.func,\n pinnedColors: PT.array,\n showTransparentColor: PT.bool\n};\nexport default ColorPicker;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _colorButtonMixin, _squarePaddingMixin;\nimport { css } from 'styled-components';\nimport { Color as PaletteColor } from '../../utils/types/palette';\nimport { ButtonSize, IconButtonColor } from '../../utils/types';\nexport var colorButtonMixin = (_colorButtonMixin = {}, _defineProperty(_colorButtonMixin, IconButtonColor.Primary, function (_ref) {\n var palette = _ref.theme.palette,\n active = _ref.active;\n return css([\"background-color:\", \";color:\", \";&:hover{background-color:\", \";}&:focus{background-color:\", \";}&:active{background-color:\", \";}\", \" &:disabled{color:\", \";background:\", \";cursor:default;}\"], palette[PaletteColor.AccentStateless], palette[PaletteColor.IconsInvert], palette[PaletteColor.AccentPrimaryHover], palette[PaletteColor.AccentPrimaryActive], palette[PaletteColor.AccentPrimaryActive], active && css([\"background-color:\", \";&:hover,&:focus{background-color:\", \";}\"], palette[PaletteColor.AccentPrimaryActive], palette[PaletteColor.AccentPrimaryActive]), palette[PaletteColor.BordersDisabled], palette[PaletteColor.Accent_1_2_Opacity]);\n}), _defineProperty(_colorButtonMixin, IconButtonColor.Secondary, function (_ref2) {\n var palette = _ref2.theme.palette,\n active = _ref2.active;\n return css([\"background-color:\", \";color:\", \";border:1px solid \", \";&:hover{color:\", \";background-color:\", \";}&:focus{background-color:\", \";color:\", \";border:1px solid \", \";}&:active{color:\", \";background-color:\", \";}\", \" &:disabled{color:\", \";background:\", \";border:none;cursor:default;}\"], palette[PaletteColor.BackgroundStateless], palette[PaletteColor.AccentStateless], palette[PaletteColor.AccentStateless], palette[PaletteColor.IconsInvert], palette[PaletteColor.AccentPrimaryHover], palette[PaletteColor.Accent_1_2_Opacity], palette[PaletteColor.AccentPrimaryActive], palette[PaletteColor.AccentPrimaryActive], palette[PaletteColor.IconsInvert], palette[PaletteColor.AccentPrimaryActive], active && css([\"color:\", \";background-color:\", \";&:hover,&:focus{color:\", \";background-color:\", \";}\"], palette[PaletteColor.IconsInvert], palette[PaletteColor.AccentPrimaryActive], palette[PaletteColor.IconsInvert], palette[PaletteColor.AccentPrimaryActive]), palette[PaletteColor.BordersDisabled], palette[PaletteColor.Accent_1_2_Opacity]);\n}), _defineProperty(_colorButtonMixin, IconButtonColor.Basic, function (_ref3) {\n var palette = _ref3.theme.palette,\n active = _ref3.active;\n return css([\"background-color:transparent;color:\", \";border:none;&:hover{background-color:\", \";color:\", \";}&:focus{background-color:\", \";color:\", \";}&:active{background-color:\", \";color:\", \";}\", \" &:disabled{background-color:transparent;color:\", \";cursor:default;}\"], palette[PaletteColor.IconsPrimary], palette[PaletteColor.BackgroundHover], palette[PaletteColor.IconsPrimaryHover], palette[PaletteColor.BackgroundActive], palette[PaletteColor.LinkActive], palette[PaletteColor.BackgroundActive], palette[PaletteColor.LinkActive], active && css([\"background-color:\", \";color:\", \";&:hover,&:focus{background-color:\", \";color:\", \";}\"], palette[PaletteColor.BackgroundActive], palette[PaletteColor.LinkActive], palette[PaletteColor.BackgroundActive], palette[PaletteColor.LinkActive]), palette[PaletteColor.BordersDisabled]);\n}), _colorButtonMixin);\nexport var squarePaddingMixin = (_squarePaddingMixin = {}, _defineProperty(_squarePaddingMixin, ButtonSize.Xs, css([\"padding:6px;\"])), _defineProperty(_squarePaddingMixin, ButtonSize.Sm, css([\"padding:9px;\"])), _defineProperty(_squarePaddingMixin, ButtonSize.Md, css([\"padding:12px;\"])), _defineProperty(_squarePaddingMixin, ButtonSize.Lg, css([\"padding:11px;\"])), _squarePaddingMixin);","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport ButtonStyled from '../button/button.styles';\nimport { colorButtonMixin, squarePaddingMixin } from './icon-button.mixin';\nimport { ButtonSize, IconButtonColor } from '../../utils/types';\nvar baseClassName = 'IconButton';\nvar IconButton = /*#__PURE__*/styled(ButtonStyled.Button).attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-10edh45-0\"\n})(function (_ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? IconButtonColor.Secondary : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? ButtonSize.Md : _ref$size;\n return css([\"\", \" \", \"\"], squarePaddingMixin[size], colorButtonMixin[color]);\n});\nvar Styled = applyDisplayNames({\n IconButton: IconButton\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\"];\nimport React from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport { getIconSize } from '../button/button.utils';\nimport { ButtonSize, IconButtonColor } from '../../utils/types';\nimport Styled from './icon-button.styles';\nvar IconButton = intrinsicComponent(function (_ref, ref) {\n var children = _ref.children,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Styled.IconButton, _extends({}, rest, {\n ref: ref\n }), children && (typeof children === 'function' ? children({\n size: getIconSize(rest.size)\n }) : children));\n});\nIconButton.defaultProps = {\n size: ButtonSize.Md,\n color: IconButtonColor.Secondary,\n active: false\n};\nIconButton.propTypes = {\n children: PT.oneOfType([PT.node, PT.func]).isRequired,\n size: PT.oneOf(objectValues(ButtonSize)),\n color: PT.oneOf(objectValues(IconButtonColor)),\n disabled: PT.bool,\n active: PT.bool\n};\nexport default IconButton;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _sizeTextAreaMixin;\nimport { css } from 'styled-components';\nimport { InputSize } from '../../utils/types';\nimport { Color as PaletteColor } from '../../utils/types/palette';\nimport { FontVariant as FV } from '../../utils/types/typography';\nexport var errorMixin = function errorMixin(_ref) {\n var palette = _ref.theme.palette;\n return css([\"background:\", \" !important;border:1px solid \", \" !important;\"], palette[PaletteColor.BackgroundSecondary], palette[PaletteColor.Error]);\n};\nexport var sizeTextAreaMixin = (_sizeTextAreaMixin = {}, _defineProperty(_sizeTextAreaMixin, InputSize.Sm, function (_ref2) {\n var font = _ref2.theme.typography.font;\n return css([\"padding:6px 12px;height:64px;\", \"\"], font[FV.InputMd]);\n}), _defineProperty(_sizeTextAreaMixin, InputSize.Md, function (_ref3) {\n var font = _ref3.theme.typography.font;\n return css([\"padding:9px 16px;height:80px;\", \"\"], font[FV.InputLg]);\n}), _sizeTextAreaMixin);","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { InputSize } from '../../utils/types';\nimport { Color as PColor } from '../../utils/types/palette';\nimport { BorderRadiusSize as BRSize } from '../../utils/types/shape';\nimport { errorMixin, sizeTextAreaMixin } from './textarea.mixin';\nimport { getInputBackgroundColor, getInputTextColor, getInputBorderColor } from '../input/input.utils';\nvar baseClassName = 'Textarea';\nvar Textarea = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-1usif6k-0\"\n})(function (_ref) {\n var _ref$size = _ref.size,\n size = _ref$size === void 0 ? InputSize.Md : _ref$size,\n _ref$error = _ref.error,\n error = _ref$error === void 0 ? false : _ref$error,\n _ref$fullWidth = _ref.fullWidth,\n fullWidth = _ref$fullWidth === void 0 ? false : _ref$fullWidth,\n _ref$readOnly = _ref.readOnly,\n readOnly = _ref$readOnly === void 0 ? false : _ref$readOnly,\n _ref$disabled = _ref.disabled,\n disabled = _ref$disabled === void 0 ? false : _ref$disabled,\n _ref$autoSize = _ref.autoSize,\n autoSize = _ref$autoSize === void 0 ? false : _ref$autoSize,\n theme = _ref.theme;\n return css([\"position:relative;display:inline-flex;flex-direction:column;align-items:flex-end;justify-content:space-between;cursor:text;box-sizing:border-box;transition:all 100ms ease-out;width:\", \";pointer-events:\", \";background-color:\", \";border-radius:\", \";border:1px solid \", \";color:\", \";\", \" \", \" &:hover{color:\", \";}\", \" \", \"\"], fullWidth ? '100%' : '300px', disabled ? 'none' : 'auto', getInputBackgroundColor(readOnly, disabled), theme.shape.borderRadius[BRSize.Md], getInputBorderColor(readOnly, disabled), disabled ? theme.palette[PColor.TextPlaceholder] : theme.palette[PColor.TextPrimary], sizeTextAreaMixin[size], !readOnly && !disabled && css([\"&:focus-within{background-color:\", \"!important;border:1px solid \", \";&:hover{border:1px solid \", \";}}&:hover{background-color:\", \";border:1px solid \", \";}\"], theme.palette[PColor.BackgroundSecondary], theme.palette[PColor.AccentStateless], theme.palette[PColor.AccentStateless], theme.palette[PColor.BackgroundStateless], theme.palette[PColor.BordersPrimaryHover]), getInputTextColor(readOnly, disabled), error && errorMixin, autoSize && css([\"width:auto;height:auto;\"]));\n});\nvar Base = /*#__PURE__*/styled.textarea.attrs({\n className: generateClassNames(baseClassName, 'Base')\n}).withConfig({\n componentId: \"sc-1usif6k-1\"\n})(function (_ref2) {\n var palette = _ref2.theme.palette;\n return css([\"display:block;width:100%;height:100%;color:inherit;outline:none;resize:none;min-width:0;margin:0;padding:0;border:0;background-color:transparent;outline:none;font-size:inherit;line-height:inherit;color:inherit;font-weight:inherit;font-family:inherit;&::placeholder{color:\", \";}\"], palette[PColor.TextPlaceholder]);\n});\nvar CopyIcon = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'CopyIcon')\n}).withConfig({\n componentId: \"sc-1usif6k-2\"\n})(function (_ref3) {\n var palette = _ref3.theme.palette;\n return css([\"display:flex;color:\", \";cursor:pointer;\"], palette[PColor.IconsPrimary]);\n});\nvar Styled = applyDisplayNames({\n Textarea: Textarea,\n CopyIcon: CopyIcon,\n Base: Base\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"fullWidth\", \"size\", \"value\", \"readOnly\", \"disabled\", \"error\", \"cols\", \"rows\", \"copyTextMessage\", \"copySuccessIcon\"];\nimport React, { useState, useEffect } from 'react';\nimport PT from 'prop-types';\nimport CopyOutline from '@scaleflex/icons/copy-outline';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport { InputSize } from '../../utils/types';\nimport { handleCopyIcon } from '../input/input.utils';\nimport InputStyled from '../input/input.styles';\nimport Styled from './textarea.styles';\nimport { Size } from '../menu-item/types';\nvar Textarea = intrinsicComponent(function (_ref, ref) {\n var fullWidth = _ref.fullWidth,\n size = _ref.size,\n value = _ref.value,\n readOnly = _ref.readOnly,\n disabled = _ref.disabled,\n error = _ref.error,\n cols = _ref.cols,\n rows = _ref.rows,\n _ref$copyTextMessage = _ref.copyTextMessage,\n copyTextMessage = _ref$copyTextMessage === void 0 ? '' : _ref$copyTextMessage,\n copySuccessIcon = _ref.copySuccessIcon,\n rest = _objectWithoutProperties(_ref, _excluded);\n var _useState = useState(false),\n _useState2 = _slicedToArray(_useState, 2),\n isHovering = _useState2[0],\n setIsHovering = _useState2[1];\n var _useState3 = useState(false),\n _useState4 = _slicedToArray(_useState3, 2),\n showCopyMessage = _useState4[0],\n setShowCopyMessage = _useState4[1];\n useEffect(function () {\n setTimeout(function () {\n return setShowCopyMessage(false);\n }, 2000);\n }, [showCopyMessage]);\n var handleEntering = function handleEntering() {\n setTimeout(function () {\n setIsHovering(true);\n }, 150);\n };\n var handleLeaving = function handleLeaving() {\n setTimeout(function () {\n setIsHovering(false);\n }, 200);\n };\n var renderCopyText = function renderCopyText() {\n return /*#__PURE__*/React.createElement(InputStyled.NotificationBox, {\n size: size,\n style: {\n bottom: size === Size.Md ? 83 : 68\n }\n }, /*#__PURE__*/React.createElement(InputStyled.NotificationIcon, null, copySuccessIcon), /*#__PURE__*/React.createElement(InputStyled.NotificationText, null, copyTextMessage));\n };\n return /*#__PURE__*/React.createElement(Styled.Textarea, {\n size: size,\n value: value,\n onMouseEnter: handleEntering,\n onMouseLeave: handleLeaving,\n readOnly: readOnly,\n disabled: disabled,\n fullWidth: Boolean(fullWidth),\n error: error,\n autoSize: Boolean(cols) || Boolean(rows)\n }, /*#__PURE__*/React.createElement(Styled.Base, _extends({}, rest, {\n value: value,\n ref: ref,\n readOnly: readOnly,\n disabled: disabled\n })), isHovering && readOnly ? /*#__PURE__*/React.createElement(Styled.CopyIcon, {\n onClick: function onClick() {\n return handleCopyIcon(value, setShowCopyMessage);\n }\n }, /*#__PURE__*/React.createElement(CopyOutline, {\n size: 16\n })) : undefined, showCopyMessage && renderCopyText());\n});\nTextarea.defaultProps = {\n size: InputSize.Md,\n error: false,\n fullWidth: false,\n readOnly: false,\n disabled: false\n};\nexport var propTypes = {\n error: PT.bool,\n readOnly: PT.bool,\n disabled: PT.bool,\n fullWidth: PT.bool,\n value: PT.any,\n size: PT.oneOf(objectValues(InputSize)),\n copySuccessIcon: PT.oneOfType([PT.node, PT.func]),\n copyTextMessage: PT.string,\n cols: PT.number,\n rows: PT.number\n};\nTextarea.propTypes = propTypes;\nexport default Textarea;","export var Type = {\n Input: 'input',\n Textarea: 'textarea'\n};","import styled from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport StyledLabel from '../label/label.styles';\nimport StyledFormHint from '../form-hint/form-hint.styles';\nvar baseClassName = 'InputGroup';\nvar InputGroup = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-zhtjwh-0\"\n})([\"\", \"{margin-top:4px;}\", \"{margin-bottom:4px;}\"], StyledFormHint.FormHint, StyledLabel.Label);\nvar Styled = applyDisplayNames({\n InputGroup: InputGroup\n});\nexport default Styled;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _typeof from \"@babel/runtime/helpers/typeof\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\", \"type\", \"error\", \"label\", \"hint\", \"LabelProps\", \"InputProps\", \"inputProps\", \"inputRef\", \"TextareaProps\", \"readOnly\", \"disabled\", \"size\", \"value\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport React from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport Label from '../label';\nimport { propTypes as labelPropTypes } from '../label/label.component';\nimport Input from '../input';\nimport { propTypes as inputPropTypes } from '../input/input.component';\nimport { InputSize } from '../../utils/types';\nimport Textarea from '../textarea';\nimport { propTypes as textareaPropTypes } from '../textarea/textarea.component';\nimport FormHint from '../form-hint';\nimport { Type } from './types';\nimport Styled from './input-group.styles';\nvar InputGroup = intrinsicComponent(function (_ref, ref) {\n var children = _ref.children,\n type = _ref.type,\n error = _ref.error,\n label = _ref.label,\n hint = _ref.hint,\n LabelPropsData = _ref.LabelProps,\n InputPropsData = _ref.InputProps,\n inputProps = _ref.inputProps,\n inputRef = _ref.inputRef,\n TextareaPropsData = _ref.TextareaProps,\n readOnly = _ref.readOnly,\n disabled = _ref.disabled,\n size = _ref.size,\n value = _ref.value,\n rest = _objectWithoutProperties(_ref, _excluded);\n var renderLabel = function renderLabel() {\n if (label) {\n if (typeof label === 'function') {\n return label({\n error: error\n });\n }\n if (_typeof(label) === 'object') {\n return label;\n }\n return /*#__PURE__*/React.createElement(Label, _extends({\n size: size,\n error: error,\n disabled: disabled\n }, LabelPropsData || {}), label);\n }\n return null;\n };\n var renderField = function renderField() {\n var fieldProps = _objectSpread({\n value: value,\n readOnly: readOnly,\n disabled: disabled,\n size: size,\n error: error\n }, rest);\n if (type === Type.Input) {\n return /*#__PURE__*/React.createElement(Input, _extends({}, fieldProps, InputPropsData || {}, inputProps, {\n ref: (inputRef === null || inputRef === void 0 ? void 0 : inputRef.ref) || inputRef,\n readOnly: readOnly,\n disabled: disabled\n }));\n }\n if (type === Type.Textarea) {\n return /*#__PURE__*/React.createElement(Textarea, _extends({}, fieldProps, TextareaPropsData || {}));\n }\n return null;\n };\n var renderHint = function renderHint() {\n if (hint) {\n if (typeof hint === 'function') {\n return hint({\n error: error\n });\n }\n if (_typeof(hint) === 'object') {\n return hint;\n }\n return /*#__PURE__*/React.createElement(FormHint, {\n size: size,\n error: error,\n disabled: disabled\n }, hint);\n }\n return null;\n };\n return /*#__PURE__*/React.createElement(Styled.InputGroup, {\n ref: ref\n }, renderLabel(), renderField(), renderHint());\n});\nInputGroup.defaultProps = {\n type: Type.Input,\n error: false,\n readOnly: false\n};\nInputGroup.propTypes = {\n type: PT.oneOf(objectValues(Type)),\n size: PT.oneOf(objectValues(InputSize)),\n label: PT.node,\n hint: PT.node,\n error: PT.bool,\n value: PT.any,\n LabelProps: PT.exact(labelPropTypes),\n InputProps: PT.exact(inputPropTypes),\n inputProps: PT.object,\n inputRef: PT.oneOfType([PT.func, PT.object]),\n TextareaProps: PT.exact(textareaPropTypes),\n readOnly: PT.bool,\n disabled: PT.bool\n};\nexport default InputGroup;","export default function _objectDestructuringEmpty(obj) {\n if (obj == null) throw new TypeError(\"Cannot destructure \" + obj);\n}","export var Size = {\n Xs: 'xs',\n Sm: 'sm',\n Md: 'md',\n Lg: 'lg',\n Xl: 'xl'\n};","import * as React from 'react';\nvar ModalMenuContext = /*#__PURE__*/React.createContext({\n modalOpened: false\n});\nif (process.env.NODE_ENV !== 'production') {\n ModalMenuContext.displayName = 'ModalMenuContext';\n}\nexport default ModalMenuContext;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _modalSizeMixin;\nimport { css } from 'styled-components';\nimport { Size } from './types';\nexport var modalSizeMixin = (_modalSizeMixin = {}, _defineProperty(_modalSizeMixin, Size.Xs, css([\"max-width:300px;\"])), _defineProperty(_modalSizeMixin, Size.Sm, css([\"max-width:600px;\"])), _defineProperty(_modalSizeMixin, Size.Md, css([\"max-width:960px;\"])), _defineProperty(_modalSizeMixin, Size.Lg, css([\"max-width:1280px;\"])), _defineProperty(_modalSizeMixin, Size.Xl, css([\"max-width:1920px;\"])), _modalSizeMixin);","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { Color as PColor } from '../../utils/types/palette';\nimport { BorderRadiusSize as BRSize } from '../../utils/types/shape';\nimport { modalSizeMixin } from './modal.mixin';\nimport { Size } from './types';\nvar baseClassName = 'Modal';\nvar Wrapper = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'Wrapper')\n}).withConfig({\n componentId: \"sc-80m07l-0\"\n})(function (_ref) {\n var open = _ref.open;\n return css([\"position:fixed;right:0px;bottom:0px;top:0px;left:0px;z-index:1200;visibility:\", \";\"], open ? 'visible' : 'hidden');\n});\nvar Overlay = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'Overlay')\n}).withConfig({\n componentId: \"sc-80m07l-1\"\n})(function (_ref2) {\n var open = _ref2.open;\n return css([\"position:fixed;right:0px;bottom:0px;top:0px;left:0px;background-color:rgba(0,0,0,0.5);z-index:-1;transition:opacity 251ms cubic-bezier(0.4,0,0.2,1) 0ms;opacity:\", \";\"], open ? '1' : '0');\n});\nvar Container = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'Container')\n}).withConfig({\n componentId: \"sc-80m07l-2\"\n})(function (_ref3) {\n var theme = _ref3.theme,\n _ref3$open = _ref3.open,\n open = _ref3$open === void 0 ? false : _ref3$open,\n _ref3$fullWidth = _ref3.fullWidth,\n fullWidth = _ref3$fullWidth === void 0 ? false : _ref3$fullWidth,\n _ref3$maxWidth = _ref3.maxWidth,\n maxWidth = _ref3$maxWidth === void 0 ? Size.Sm : _ref3$maxWidth;\n return css([\"position:absolute;overflow-x:hidden;overflow-y:auto;transition:opacity 251ms cubic-bezier(0.4,0,0.2,1) 0ms,transform 167ms cubic-bezier(0.4,0,0.2,1) 0ms;outline:0;border-radius:\", \";background-color:\", \";box-shadow:0px 2px 4px \", \";visibility:\", \";opacity:\", \";display:flex;max-height:calc(100% - 64px);flex-direction:column;\", \" \", \" top:50%;left:50%;transform:translate(-50%,-50%);\"], theme.shape.borderRadius[BRSize.Lg], theme.palette[PColor.BackgroundSecondary], theme.palette[PColor.LightShadow], open ? 'visible' : 'hidden', open ? '1' : '0', fullWidth && css([\"width:calc(100% - 64px);\"]), modalSizeMixin[maxWidth]);\n});\nvar Modal = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-80m07l-3\"\n})(function () {\n return css([\"position:relative;padding-top:8px;padding-bottom:8px;margin:0;padding:0;outline:0;display:flex;flex-direction:column;\"]);\n});\nvar Styled = applyDisplayNames({\n Modal: Modal,\n Wrapper: Wrapper,\n Overlay: Overlay,\n Container: Container\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\", \"open\", \"onClose\", \"maxWidth\", \"fullWidth\", \"modalStyles\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport React, { useEffect, isValidElement } from 'react';\nimport { createPortal } from 'react-dom';\nimport PT from 'prop-types';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport { Size } from './types';\nimport ModalMenuContext from './modal-menu-context';\nimport Styled from './modal.styles';\nvar isValidSingleFragmentChildren = function isValidSingleFragmentChildren(children) {\n return children && /*#__PURE__*/isValidElement(children) && React.Children.count(children) === 1 && children.type === React.Fragment;\n};\nvar Modal = intrinsicComponent(function (_ref, ref) {\n var _children = _ref.children,\n open = _ref.open,\n onClose = _ref.onClose,\n maxWidth = _ref.maxWidth,\n fullWidth = _ref.fullWidth,\n modalStyles = _ref.modalStyles,\n rest = _objectWithoutProperties(_ref, _excluded);\n var children = isValidSingleFragmentChildren(_children) ? _children.props.children : _children;\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n var target = document.querySelector('body');\n useEffect(function () {\n if (open) {\n document.body.classList.add('Modal-open');\n } else {\n document.body.classList.remove('Modal-open');\n }\n return function () {\n document.body.classList.remove('Modal-open');\n };\n }, [open]);\n var handleClose = function handleClose() {\n if (typeof onClose === 'function') {\n onClose();\n }\n };\n useEffect(function () {\n var keyListener = function keyListener(ev) {\n if (ev.key === 'Escape') {\n handleClose();\n }\n };\n document.addEventListener('keydown', keyListener);\n return function () {\n return document.removeEventListener('keydown', keyListener);\n };\n });\n var render = function render() {\n return /*#__PURE__*/React.createElement(ModalMenuContext.Provider, {\n value: {\n modalOpened: Boolean(open)\n }\n }, /*#__PURE__*/React.createElement(Styled.Wrapper, {\n style: _objectSpread({}, modalStyles),\n open: Boolean(open),\n ref: ref\n }, /*#__PURE__*/React.createElement(Styled.Overlay, {\n onClick: handleClose,\n open: Boolean(open)\n }), /*#__PURE__*/React.createElement(Styled.Container, _extends({}, rest, {\n maxWidth: maxWidth,\n fullWidth: fullWidth,\n open: Boolean(open)\n }), /*#__PURE__*/React.createElement(Styled.Modal, null, React.Children.map(children, function (child) {\n if ( /*#__PURE__*/isValidElement(child) && child.type.displayName === 'ModalTitle') {\n return /*#__PURE__*/React.cloneElement(child, _objectSpread({\n onClose: handleClose\n }, child.props || {}));\n }\n return child;\n })))));\n };\n return /*#__PURE__*/createPortal(render(), target);\n});\nexport var defaultProps = {\n open: false,\n fullWidth: false,\n maxWidth: Size.Xs\n};\nModal.defaultProps = defaultProps;\nexport var propTypes = {\n onClose: PT.func,\n modalStyles: PT.object,\n children: PT.node.isRequired,\n maxWidth: PT.oneOf(objectValues(Size)),\n open: PT.bool,\n fullWidth: PT.bool\n};\nModal.propTypes = propTypes;\nexport default Modal;","export var Align = {\n Left: 'left',\n Center: 'center',\n Right: 'right'\n};","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { Align } from './types';\nvar baseClassName = 'ModalActions';\nvar ModalActions = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-1wg6u00-0\"\n})(function (_ref) {\n var _ref$align = _ref.align,\n align = _ref$align === void 0 ? Align.Center : _ref$align;\n return css([\"position:relative;display:flex;align-items:center;padding:24px;justify-content:\", \";> *:not(:first-child){margin-left:8px;}\"], align === Align.Right ? 'flex-end' : align);\n});\nvar Styled = applyDisplayNames({\n ModalActions: ModalActions\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\"];\nimport React from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport Styled from './modal-actions.styles';\nimport { Align } from './types';\nvar ModalActions = intrinsicComponent(function (_ref, ref) {\n var children = _ref.children,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Styled.ModalActions, _extends({}, rest, {\n ref: ref\n }), children);\n});\nModalActions.defaultProps = {\n align: Align.Center\n};\nModalActions.propTypes = {\n children: PT.node.isRequired,\n align: PT.oneOf(objectValues(Align))\n};\nModalActions.displayName = 'ModalActions';\nexport default ModalActions;","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nvar baseClassName = 'ModalContent';\nvar ModalContent = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-1ng1w0v-0\"\n})(function () {\n return css([\"position:relative;padding:12px 24px 0px;\"]);\n});\nvar Styled = applyDisplayNames({\n ModalContent: ModalContent\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\"];\nimport React from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent } from '../../utils/functions';\nimport Styled from './modal-content.styles';\nvar ModalContent = intrinsicComponent(function (_ref, ref) {\n var children = _ref.children,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Styled.ModalContent, _extends({}, rest, {\n ref: ref\n }), children);\n});\nModalContent.defaultProps = {};\nModalContent.propTypes = {\n children: PT.node.isRequired\n};\nModalContent.displayName = 'ModalContent';\nexport default ModalContent;","export var Size = {\n Sm: 'sm',\n Md: 'md',\n Lg: 'lg'\n};","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _crossButtonPaddingMi;\nimport styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { Color as PaletteColor } from '../../utils/types/palette';\nimport { Size } from './types';\nvar baseClassName = 'CrossButton';\nvar crossButtonPaddingMixin = (_crossButtonPaddingMi = {}, _defineProperty(_crossButtonPaddingMi, Size.Sm, css([\"padding:6px;\"])), _defineProperty(_crossButtonPaddingMi, Size.Md, css([\"padding:9px;\"])), _defineProperty(_crossButtonPaddingMi, Size.Lg, css([\"padding:12px;\"])), _crossButtonPaddingMi);\nvar CrossButton = /*#__PURE__*/styled.button.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-ygfku-0\"\n})(function (_ref) {\n var _ref$size = _ref.size,\n size = _ref$size === void 0 ? Size.Lg : _ref$size,\n theme = _ref.theme;\n return css([\"display:flex;justify-content:center;align-items:center;cursor:pointer;\", \" color:\", \";background:transparent;border:none;transition:all 100ms ease-out;&:hover{color:\", \";background:\", \";;}&:active{color:\", \";background:\", \";}\"], crossButtonPaddingMixin[size], theme.palette[PaletteColor.IconsSecondary], theme.palette[PaletteColor.IconsPrimary], theme.palette[PaletteColor.BackgroundHover], theme.palette[PaletteColor.IconsPrimaryHover], theme.palette[PaletteColor.BackgroundActive]);\n});\nvar Styled = applyDisplayNames({\n CrossButton: CrossButton\n});\nexport default Styled;","import _objectDestructuringEmpty from \"@babel/runtime/helpers/objectDestructuringEmpty\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport React from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport CrossOutline from '@scaleflex/icons/cross-outline';\nimport { Size } from './types';\nimport Styled from './cross-button.styles';\nvar getIconSize = function getIconSize(sizeName) {\n switch (sizeName) {\n case Size.Lg:\n return 16;\n case Size.Sm:\n default:\n return 12;\n }\n};\nvar CrossButton = intrinsicComponent(function (_ref, ref) {\n var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));\n return /*#__PURE__*/React.createElement(Styled.CrossButton, _extends({}, rest, {\n ref: ref\n }), /*#__PURE__*/React.createElement(CrossOutline, {\n size: getIconSize(rest.size)\n }));\n});\nCrossButton.defaultProps = {\n size: Size.Lg\n};\nCrossButton.propTypes = {\n size: PT.oneOf(objectValues(Size))\n};\nexport default CrossButton;","export var Variant = {\n Default: 'default',\n WithIcon: 'with-icon'\n};","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { Color as PColor } from '../../utils/types/palette';\nimport { BorderRadiusSize as BRSize } from '../../utils/types/shape';\nimport { Variant } from './types';\nvar baseClassName = 'ModalTitle';\nvar Icon = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'Icon')\n}).withConfig({\n componentId: \"sc-l3tf49-0\"\n})(function (_ref) {\n var palette = _ref.theme.palette;\n return css([\"display:flex;margin-bottom:8px;padding:14.5px;border-radius:50%;background:\", \";color:\", \";\"], palette[PColor.Accent_1_2_Opacity], palette[PColor.AccentStateless]);\n});\nvar LabelPrimary = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'LabelPrimary')\n}).withConfig({\n componentId: \"sc-l3tf49-1\"\n})(function (_ref2) {\n var _ref2$variant = _ref2.variant,\n variant = _ref2$variant === void 0 ? Variant.Default : _ref2$variant;\n return css([\"font-size:18px;line-height:27px;font-weight:\", \";\"], variant === Variant.Default ? 400 : 500);\n});\nvar LabelSecondary = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'LabelSecondary')\n}).withConfig({\n componentId: \"sc-l3tf49-2\"\n})([\"font-size:12px;line-height:14px;margin-top:4px;\"]);\nvar Close = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'Close')\n}).withConfig({\n componentId: \"sc-l3tf49-3\"\n})(function (_ref3) {\n var _ref3$variant = _ref3.variant,\n variant = _ref3$variant === void 0 ? Variant.Default : _ref3$variant,\n palette = _ref3.theme.palette;\n return css([\"position:absolute;display:flex;top:\", \"px;right:\", \"px;color:\", \";&:hover{color:\", \";}cursor:pointer;\"], variant === Variant.WithIcon ? 2 : 8, variant === Variant.WithIcon ? 2 : 8, palette[PColor.IconsSecondary], palette[PColor.AccentPrimary]);\n});\nvar ModalTitle = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-l3tf49-4\"\n})(function (_ref4) {\n var _ref4$variant = _ref4.variant,\n variant = _ref4$variant === void 0 ? Variant.Default : _ref4$variant,\n _ref4$theme = _ref4.theme,\n palette = _ref4$theme.palette,\n borderRadius = _ref4$theme.shape.borderRadius;\n return css([\"position:relative;color:\", \";border-radius:\", \" \", \" 0px 0px;\", \" \", \" \", \"\"], palette[PColor.TextPrimary], borderRadius[BRSize.Md], borderRadius[BRSize.Md], function () {\n var paddingY = variant === Variant.WithIcon ? 26 : 14;\n var paddingX = variant === Variant.WithIcon ? 12 : 14;\n var paddingLeft = 18;\n var paddingRight = variant === Variant.WithIcon ? paddingLeft : 40;\n return css([\"padding:\", \"px \", \"px \", \"px \", \"px;\"], paddingY, paddingRight, paddingX, paddingLeft);\n }, variant === Variant.Default && css([\"background:\", \";border-bottom:1px solid \", \";\"], palette[PColor.BackgroundPrimary], palette[PColor.BordersSecondary]), variant === Variant.WithIcon && css([\"display:flex;align-items:center;flex-direction:column;\"]));\n});\nvar Styled = applyDisplayNames({\n ModalTitle: ModalTitle,\n LabelPrimary: LabelPrimary,\n LabelSecondary: LabelSecondary,\n Close: Close,\n Icon: Icon\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"secondary\", \"onClose\"];\nimport React from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport CrossButton from '../cross-button';\nimport Styled from './modal-title.styles';\nimport { Variant } from './types';\nvar ModalTitle = intrinsicComponent(function (_ref, ref) {\n var secondary = _ref.secondary,\n onClose = _ref.onClose,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Styled.ModalTitle, _extends({}, rest, {\n ref: ref\n }), rest.icon && /*#__PURE__*/React.createElement(Styled.Icon, {\n iconShadow: Boolean(rest.iconShadow)\n }, rest.icon), /*#__PURE__*/React.createElement(Styled.LabelPrimary, rest, rest.primary), rest.variant === Variant.WithIcon && secondary && /*#__PURE__*/React.createElement(Styled.LabelSecondary, null, secondary), /*#__PURE__*/React.createElement(Styled.Close, {\n variant: rest.variant\n }, /*#__PURE__*/React.createElement(CrossButton, {\n size: \"lg\",\n onClick: onClose\n })));\n});\nModalTitle.defaultProps = {\n iconShadow: true,\n variant: Variant.Default\n};\nModalTitle.propTypes = {\n primary: PT.node.isRequired,\n secondary: PT.node,\n icon: PT.node,\n iconShadow: PT.bool,\n onClose: PT.func,\n variant: PT.oneOf(objectValues(Variant))\n};\nModalTitle.displayName = 'ModalTitle';\nexport default ModalTitle;","export var Status = {\n Success: 'success',\n Info: 'info',\n Error: 'error',\n Warning: 'warning'\n};","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nvar baseClassName = 'PopupStatus';\nvar PopupStatus = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-qash56-0\"\n})(function () {\n return css([\"display:flex;\"]);\n});\nvar Styled = applyDisplayNames({\n PopupStatus: PopupStatus\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"status\", \"notificationBackground\"];\nimport React from 'react';\nimport PT from 'prop-types';\nimport { Success, About, Error, Warning, InfoOutline, WarningOutline, ErrorOutline } from '@scaleflex/icons';\nimport { lightPalette } from '@scaleflex/ui/theme/roots/palette';\nimport { Color } from '@scaleflex/ui/utils/types/palette';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport { Status } from './types';\nimport Styled from './popup-status.styles';\nvar getPopupStatusIcon = function getPopupStatusIcon(status, notificationBackground) {\n switch (status) {\n case Status.Warning:\n return notificationBackground ? /*#__PURE__*/React.createElement(Warning, {\n color: lightPalette[Color.Warning],\n size: 20\n }) : /*#__PURE__*/React.createElement(WarningOutline, {\n color: lightPalette[Color.Warning],\n size: 12\n });\n case Status.Error:\n return notificationBackground ? /*#__PURE__*/React.createElement(Error, {\n color: lightPalette[Color.Error],\n size: 20\n }) : /*#__PURE__*/React.createElement(ErrorOutline, {\n color: lightPalette[Color.Error],\n size: 12\n });\n case Status.Info:\n return notificationBackground ? /*#__PURE__*/React.createElement(About, {\n color: lightPalette[Color.Info],\n size: 20\n }) : /*#__PURE__*/React.createElement(InfoOutline, {\n color: lightPalette[Color.Info],\n size: 12\n });\n case Status.Success:\n default:\n return /*#__PURE__*/React.createElement(Success, {\n color: lightPalette[Color.Success],\n size: 20\n });\n }\n};\nvar PopupStatus = intrinsicComponent(function (_ref, ref) {\n var status = _ref.status,\n _ref$notificationBack = _ref.notificationBackground,\n notificationBackground = _ref$notificationBack === void 0 ? true : _ref$notificationBack,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Styled.PopupStatus, _extends({\n status: status\n }, rest, {\n ref: ref\n }), getPopupStatusIcon(status, notificationBackground));\n});\nexport var defaultProps = {\n status: Status.Success\n};\nPopupStatus.defaultProps = defaultProps;\nexport var propTypes = {\n status: PT.oneOf(objectValues(Status))\n};\nPopupStatus.propTypes = propTypes;\nexport default PopupStatus;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _popupContentMixin;\nimport { css } from 'styled-components';\nimport { Color as PaletteColor } from '@scaleflex/ui/utils/types/palette';\nimport { Status } from '../popup-status/types';\nexport var popupContentMixin = (_popupContentMixin = {}, _defineProperty(_popupContentMixin, Status.Success, function (_ref) {\n var palette = _ref.theme.palette;\n return css([\"background-color:\", \";\"], palette[PaletteColor.BackgroundGreen]);\n}), _defineProperty(_popupContentMixin, Status.Info, function (_ref2) {\n var palette = _ref2.theme.palette;\n return css([\"background-color:\", \";\"], palette[PaletteColor.BackgroundBlue]);\n}), _defineProperty(_popupContentMixin, Status.Error, function (_ref3) {\n var palette = _ref3.theme.palette;\n return css([\"background-color:\", \";\"], palette[PaletteColor.BackgroundRed]);\n}), _defineProperty(_popupContentMixin, Status.Warning, function (_ref4) {\n var palette = _ref4.theme.palette;\n return css([\"background-color:\", \";\"], palette[PaletteColor.BackgroundOrange]);\n}), _popupContentMixin);","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { Color as PColor } from '../../utils/types/palette';\nimport { FontVariant } from '../../utils/types/typography';\nimport { popupContentMixin } from './popup-content.mixin';\nvar baseClassName = 'PopupContent';\nvar LabelWrapper = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'LabelWrapper')\n}).withConfig({\n componentId: \"sc-njbmnt-0\"\n})(function (_ref) {\n var palette = _ref.theme.palette;\n return css([\"display:flex;flex-grow:1;margin-left:44px;margin-right:28px;padding:16px;padding-right:0;overflow:hidden;background:\", \";\"], palette[PColor.ButtonPrimaryText]);\n});\nvar Label = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'Label')\n}).withConfig({\n componentId: \"sc-njbmnt-1\"\n})(function (_ref2) {\n var _ref2$theme = _ref2.theme,\n palette = _ref2$theme.palette,\n font = _ref2$theme.typography.font;\n return css([\"max-width:100%;overflow:hidden;text-overflow:ellipsis;color:\", \";\", \"\"], palette[PColor.TextPrimary], font[FontVariant.TextSmallUp]);\n});\nvar PopupContent = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'PopupContent')\n}).withConfig({\n componentId: \"sc-njbmnt-2\"\n})(function (_ref3) {\n var theme = _ref3.theme;\n return css([\"position:relative;display:flex;align-items:center;width:360px;border-radius:4px;box-shadow:0px 2px 6px \", \";\"], theme.palette[PColor.LargeShadow]);\n});\nvar CloseWrapper = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'PopupContent')\n}).withConfig({\n componentId: \"sc-njbmnt-3\"\n})(function (_ref4) {\n var theme = _ref4.theme;\n return css([\"position:absolute;top:0;right:0;display:flex;justify-content:center;align-items:flex-start;box-sizing:border-box;padding:2px;height:fit-content;cursor:pointer;background:\", \";border-radius:0 4px 4px 0;\"], theme.palette[PColor.BackgroundStateless]);\n});\nvar PopupStatus = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'PopupStatus')\n}).withConfig({\n componentId: \"sc-njbmnt-4\"\n})(function (_ref5) {\n var _ref5$status = _ref5.status,\n status = _ref5$status === void 0 ? 'success' : _ref5$status;\n return css([\"position:absolute;display:flex;left:0;z-index:1;height:100%;min-width:44px;align-items:center;justify-content:center;box-sizing:border-box;border-radius:4px 0 0 4px;\", \"\"], popupContentMixin[status]);\n});\nvar Styled = applyDisplayNames({\n PopupContent: PopupContent,\n PopupStatus: PopupStatus,\n LabelWrapper: LabelWrapper,\n CloseWrapper: CloseWrapper,\n Label: Label\n});\nexport default Styled;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"onClose\", \"message\", \"status\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport React from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent } from '../../utils/functions';\nimport PopupStatus from '../popup-status';\nimport CrossButton from '../cross-button/cross-button.component';\nimport { defaultProps as popupStatusDefaultProps, propTypes as popupStatusPropTypes } from '../popup-status/popup-status.component';\nimport Styled from './popup-content.styles';\nvar PopupContent = intrinsicComponent(function (_ref, ref) {\n var onClose = _ref.onClose,\n message = _ref.message,\n status = _ref.status,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Styled.PopupContent, _extends({}, rest, {\n ref: ref\n }), /*#__PURE__*/React.createElement(Styled.PopupStatus, _extends({\n status: status,\n message: message\n }, rest), /*#__PURE__*/React.createElement(PopupStatus, {\n status: status\n })), /*#__PURE__*/React.createElement(Styled.LabelWrapper, null, /*#__PURE__*/React.createElement(Styled.Label, null, message)), /*#__PURE__*/React.createElement(Styled.CloseWrapper, null, /*#__PURE__*/React.createElement(CrossButton, {\n size: \"sm\",\n onClick: onClose\n })));\n});\nexport var defaultProps = _objectSpread({}, popupStatusDefaultProps);\nPopupContent.defaultProps = defaultProps;\nexport var propTypes = _objectSpread(_objectSpread({}, popupStatusPropTypes), {}, {\n message: PT.node.isRequired,\n onClose: PT.func\n});\nPopupContent.propTypes = propTypes;\nexport default PopupContent;","export var Horizontal = {\n Center: 'center',\n Left: 'left',\n Right: 'right'\n};","export var Vertical = {\n Top: 'top',\n Bottom: 'bottom'\n};","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _positionHorizontalMi, _positionVerticalMixi;\nimport { css } from 'styled-components';\n// import type { WithTheme } from '../../theme/entity';\n// import { Color as PaletteColor } from '../../utils/types/palette';\nimport { Horizontal, Vertical } from './types';\nexport var positionHorizontalMixin = (_positionHorizontalMi = {}, _defineProperty(_positionHorizontalMi, Horizontal.Left, css([\"left:25px;right:auto;\"])), _defineProperty(_positionHorizontalMi, Horizontal.Center, css([\"left:50%;right:auto;transform:translateX(-50%);\"])), _defineProperty(_positionHorizontalMi, Horizontal.Right, css([\"left:auto;right:25px;\"])), _positionHorizontalMi);\nexport var positionVerticalMixin = (_positionVerticalMixi = {}, _defineProperty(_positionVerticalMixi, Vertical.Top, css([\"top:25px;bottom:auto;\"])), _defineProperty(_positionVerticalMixi, Vertical.Bottom, css([\"top:auto;bottom:25px;\"])), _positionVerticalMixi);\n\n// export const errorMixin = ({ theme: { palette } }: WithTheme) => css`\n// background: ${palette[PaletteColor.BackgroundSecondary]} !important;\n// border: 1px solid ${palette[PaletteColor.Error]} !important;\n// `;","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\n// import type { WithTheme } from '../../theme/entity';\n// import { Color as PColor } from '../../utils/types/palette';\n// import { FontVariant } from '../../utils/types/typography';\n// import { BorderRadiusSize as BRSize } from '../../utils/types/shape';\n\nimport { positionHorizontalMixin, positionVerticalMixin } from './popup.mixin';\nimport { Horizontal, Vertical } from './types';\nvar baseClassName = 'Popup';\nvar Popup = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-jmtjri-0\"\n})(function (_ref) {\n var anchorOrigin = _ref.anchorOrigin;\n return css([\"position:fixed;display:flex;align-items:center;justify-content:center;z-index:1400;\", \" \", \"\"], positionHorizontalMixin[(anchorOrigin === null || anchorOrigin === void 0 ? void 0 : anchorOrigin.horizontal) || Horizontal.Left], positionVerticalMixin[(anchorOrigin === null || anchorOrigin === void 0 ? void 0 : anchorOrigin.vertical) || Vertical.Bottom]);\n});\nvar Styled = applyDisplayNames({\n Popup: Popup\n});\nexport default Styled;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"autoHideDuration\", \"anchorOrigin\", \"open\", \"onClose\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport React, { useEffect, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport PT from 'prop-types';\nimport { intrinsicComponent, objectValues, generateClassNames } from '../../utils/functions';\nimport usePortal from '../../hooks/use-portal';\nimport PopupContent, { defaultProps as cDefaultProps, propTypes as cPropTypes } from '../popup-content/popup-content.component';\nimport { Horizontal, Vertical } from './types';\nimport Styled from './popup.styles';\nvar Popup = intrinsicComponent(function (props, ref) {\n var autoHideDuration = props.autoHideDuration,\n anchorOrigin = props.anchorOrigin,\n open = props.open,\n onClose = props.onClose,\n rest = _objectWithoutProperties(props, _excluded);\n var target = usePortal(generateClassNames('Popup'));\n var _useState = useState(autoHideDuration),\n _useState2 = _slicedToArray(_useState, 2),\n hoverHideDuration = _useState2[0],\n setHoverHideDuration = _useState2[1];\n var _useState3 = useState(false),\n _useState4 = _slicedToArray(_useState3, 2),\n isHovering = _useState4[0],\n setIsHovering = _useState4[1];\n var handleMouseLeave = function handleMouseLeave() {\n setIsHovering(false);\n setHoverHideDuration(1000);\n };\n useEffect(function () {\n if (open) setHoverHideDuration(autoHideDuration);\n }, [open]);\n useEffect(function () {\n var timeout = null;\n if (open && !isHovering && hoverHideDuration && typeof onClose === 'function') {\n timeout = setTimeout(onClose, hoverHideDuration);\n }\n return function () {\n if (timeout) {\n clearTimeout(timeout);\n }\n };\n }, [hoverHideDuration, isHovering, open, onClose]);\n var render = function render() {\n if (!open) {\n return null;\n }\n return /*#__PURE__*/React.createElement(Styled.Popup, _extends({\n onMouseEnter: function onMouseEnter() {\n return setIsHovering(true);\n },\n onMouseLeave: handleMouseLeave\n }, props), /*#__PURE__*/React.createElement(PopupContent, _extends({\n onClose: onClose\n }, rest, {\n ref: ref\n })));\n };\n return /*#__PURE__*/createPortal(render(), target);\n});\nPopup.defaultProps = _objectSpread(_objectSpread({}, cDefaultProps), {}, {\n open: false,\n autoHideDuration: 5000,\n anchorOrigin: {\n vertical: Vertical.Bottom,\n horizontal: Horizontal.Left\n }\n});\nPopup.propTypes = _objectSpread(_objectSpread({}, cPropTypes), {}, {\n anchorOrigin: PT.exact({\n vertical: PT.oneOf(objectValues(Vertical)),\n horizontal: PT.oneOf(objectValues(Horizontal))\n }),\n open: PT.bool,\n autoHideDuration: PT.number,\n onClose: PT.func\n});\nexport default Popup;","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { Color as PC } from '../../utils/types/palette';\nvar baseClassName = 'RotationSlider';\nvar RotationSliderList = /*#__PURE__*/styled.ul.attrs({\n className: generateClassNames(baseClassName, 'list')\n}).withConfig({\n componentId: \"sc-1xuruq0-0\"\n})([\"display:flex;align-items:center;position:relative;padding:0;width:100%;list-style:none;\"]);\nvar RotationSliderBigDot = /*#__PURE__*/styled.li.attrs({\n className: generateClassNames(baseClassName, 'big-dot')\n}).withConfig({\n componentId: \"sc-1xuruq0-1\"\n})(function (_ref) {\n var palette = _ref.theme.palette;\n return css([\"width:8px;height:8px;border-radius:50%;background-color:\", \";cursor:pointer;\"], palette[PC.LinkPrimary]);\n});\nvar RotationSliderSmallDotWrapper = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'small-dot-wrapper')\n}).withConfig({\n componentId: \"sc-1xuruq0-2\"\n})([\"padding:2px;\"]);\nvar RotationSliderSmallDot = /*#__PURE__*/styled.li.attrs({\n className: generateClassNames(baseClassName, 'small-dot')\n}).withConfig({\n componentId: \"sc-1xuruq0-3\"\n})(function (_ref2) {\n var palette = _ref2.theme.palette;\n return css([\"width:2px;height:2px;border-radius:50%;background-color:\", \";cursor:pointer;\"], palette[PC.LinkPrimary]);\n});\nvar RotationSliderControl = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'control')\n}).withConfig({\n componentId: \"sc-1xuruq0-4\"\n})(function (_ref3) {\n var palette = _ref3.theme.palette;\n return css([\"display:flex;justify-content:center;align-items:center;position:absolute;height:18px;width:2px;transform:translate(-50%,-50%);top:50%;background-color:\", \";& > input{border:0px;clip:rect(0px,0px,0px,0px);height:100%;margin:-1px;overflow:hidden;padding:0px;position:absolute;white-space:nowrap;width:100%;direction:ltr;}&::before{position:absolute;content:'';border-radius:inherit;width:100%;height:100%;box-shadow:0px 3px 1px -2px rgb(0 0 0 / 20%),0px 2px 2px 0px rgb(0 0 0 / 14%),0px 1px 5px 0px rgb(0 0 0 / 12%);}&::after{position:absolute;content:'';border-radius:50%;width:42px;height:42px;top:50%;left:50%;transform:translate(-50%,-50%);}\"], palette[PC.LinkActive]);\n});\nvar RotationSliderMark = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'mark')\n}).withConfig({\n componentId: \"sc-1xuruq0-5\"\n})([\"padding:4px;\"]);\nvar RotationSliderMarkText = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'mark-text')\n}).withConfig({\n componentId: \"sc-1xuruq0-6\"\n})(function (_ref4) {\n var palette = _ref4.theme.palette;\n return css([\"position:absolute;top:20px;font-size:14px;transform:translateX(-10%);color:\", \";\"], palette[PC.TextPrimary]);\n});\nvar Styled = applyDisplayNames({\n RotationSliderList: RotationSliderList,\n RotationSliderBigDot: RotationSliderBigDot,\n RotationSliderSmallDotWrapper: RotationSliderSmallDotWrapper,\n RotationSliderSmallDot: RotationSliderSmallDot,\n RotationSliderControl: RotationSliderControl,\n RotationSliderMark: RotationSliderMark,\n RotationSliderMarkText: RotationSliderMarkText\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"min\", \"max\", \"angle\", \"onChange\", \"onMouseDown\", \"onMouseUp\", \"step\", \"labelTooltipOptions\", \"annotation\", \"hideMarkText\", \"showCurrentMarkText\", \"value\", \"railProps\", \"trackProps\", \"thumbProps\", \"labelTooltipProps\", \"markStyles\", \"markTextStyles\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport React from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport Slider from '../slider';\nimport { LabelTooltip } from '../slider/types';\nimport Styled from './rotation-slider.styles';\nvar RotationSlider = intrinsicComponent(function (_ref, ref) {\n var _ref$min = _ref.min,\n min = _ref$min === void 0 ? 0 : _ref$min,\n _ref$max = _ref.max,\n max = _ref$max === void 0 ? 100 : _ref$max,\n _ref$angle = _ref.angle,\n angle = _ref$angle === void 0 ? 10 : _ref$angle,\n onChange = _ref.onChange,\n onMouseDown = _ref.onMouseDown,\n onMouseUp = _ref.onMouseUp,\n _ref$step = _ref.step,\n step = _ref$step === void 0 ? 1 : _ref$step,\n _ref$labelTooltipOpti = _ref.labelTooltipOptions,\n labelTooltipOptions = _ref$labelTooltipOpti === void 0 ? LabelTooltip.Off : _ref$labelTooltipOpti,\n _ref$annotation = _ref.annotation,\n annotation = _ref$annotation === void 0 ? '°' : _ref$annotation,\n _ref$hideMarkText = _ref.hideMarkText,\n hideMarkText = _ref$hideMarkText === void 0 ? false : _ref$hideMarkText,\n _ref$showCurrentMarkT = _ref.showCurrentMarkText,\n showCurrentMarkText = _ref$showCurrentMarkT === void 0 ? false : _ref$showCurrentMarkT,\n value = _ref.value,\n _ref$railProps = _ref.railProps,\n railProps = _ref$railProps === void 0 ? {} : _ref$railProps,\n _ref$trackProps = _ref.trackProps,\n trackProps = _ref$trackProps === void 0 ? {} : _ref$trackProps,\n _ref$thumbProps = _ref.thumbProps,\n thumbProps = _ref$thumbProps === void 0 ? {} : _ref$thumbProps,\n _ref$labelTooltipProp = _ref.labelTooltipProps,\n labelTooltipProps = _ref$labelTooltipProp === void 0 ? {} : _ref$labelTooltipProp,\n _ref$markStyles = _ref.markStyles,\n markStyles = _ref$markStyles === void 0 ? {} : _ref$markStyles,\n _ref$markTextStyles = _ref.markTextStyles,\n markTextStyles = _ref$markTextStyles === void 0 ? {} : _ref$markTextStyles,\n rest = _objectWithoutProperties(_ref, _excluded);\n var handleChange = function handleChange(event, newValue) {\n if (onChange) {\n onChange(event, newValue);\n }\n };\n var getValue = function getValue() {\n if (value || value === 0) {\n if (value > max) {\n return max;\n }\n if (value < min) {\n return min;\n }\n return value;\n }\n return min;\n };\n var showMarkText = function showMarkText(index) {\n if (hideMarkText) return false;\n if (!showCurrentMarkText) return true;\n return getValue() === index;\n };\n var renderBar = function renderBar() {\n var barDom = [];\n var barDiv;\n for (var i = min; i <= max; i += step) {\n barDiv = [];\n if (i % angle === 0 || i === max) {\n barDiv = /*#__PURE__*/React.createElement(Styled.RotationSliderMark, {\n key: i,\n style: _objectSpread({}, markStyles)\n }, showMarkText(i) && /*#__PURE__*/React.createElement(Styled.RotationSliderMarkText, {\n style: _objectSpread({}, markTextStyles)\n }, i === min + 1 ? max : i, /*#__PURE__*/React.createElement(\"sup\", null, annotation)), /*#__PURE__*/React.createElement(Styled.RotationSliderBigDot, null));\n } else if (i % 10 === 0) {\n barDiv = /*#__PURE__*/React.createElement(Styled.RotationSliderSmallDotWrapper, {\n key: i\n }, /*#__PURE__*/React.createElement(Styled.RotationSliderSmallDot, null));\n }\n if (!Array.isArray(barDiv)) {\n barDom.push(barDiv);\n }\n }\n return barDom;\n };\n return /*#__PURE__*/React.createElement(Slider, _extends({\n min: min,\n max: max,\n step: step,\n value: getValue(),\n hideTrack: true,\n hideAnnotation: true,\n annotation: annotation,\n onChange: handleChange,\n labelTooltip: labelTooltipOptions,\n ref: ref,\n components: {\n Rail: function Rail(props, style) {\n return /*#__PURE__*/React.createElement(Styled.RotationSliderList, _extends({}, props, {\n styles: _objectSpread({}, style)\n }), renderBar());\n },\n Thumb: Styled.RotationSliderControl\n },\n componentsProps: {\n rail: _objectSpread(_objectSpread({}, railProps), {}, {\n style: _objectSpread({}, railProps.style)\n }),\n track: _objectSpread(_objectSpread({}, trackProps), {}, {\n style: _objectSpread({}, trackProps.style)\n }),\n thumb: _objectSpread(_objectSpread({}, thumbProps), {}, {\n style: _objectSpread({\n top: '15%'\n }, thumbProps.style)\n }),\n labelTooltip: _objectSpread(_objectSpread({}, labelTooltipProps), {}, {\n style: _objectSpread({}, labelTooltipProps.style)\n })\n }\n }, rest, {\n defaultValue: Number(rest.defaultValue),\n style: _objectSpread({\n width: 'auto',\n height: 'auto'\n }, rest.style)\n }));\n});\nRotationSlider.defaultProps = {\n annotation: '°',\n min: 0,\n max: 100,\n step: 1,\n labelTooltipOptions: LabelTooltip.Off\n};\nRotationSlider.propTypes = {\n value: PT.oneOfType([PT.array, PT.number]),\n min: PT.number,\n max: PT.number,\n angle: PT.number,\n onChange: PT.func,\n onMouseDown: PT.func,\n onMouseUp: PT.func,\n step: PT.number,\n annotation: PT.string,\n hideMarkText: PT.bool,\n showCurrentMarkText: PT.bool,\n railProps: PT.object,\n trackProps: PT.object,\n thumbProps: PT.object,\n labelTooltipProps: PT.object,\n markStyles: PT.object,\n markTextStyles: PT.object,\n labelTooltipOptions: PT.oneOf(objectValues(LabelTooltip))\n};\nexport default RotationSlider;","import styled from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\n// import type { With } from '../../utils/types';\n// import type { WithTheme } from '../../theme/entity';\n// import { Color as PColor } from '../../utils/types/palette';\n// import type { SelectGroupProps } from './select-group.props';\nimport StyledInputGroup from '../input-group/input-group.styles';\nvar baseClassName = 'SelectGroup';\nvar SelectGroup = /*#__PURE__*/styled(StyledInputGroup.InputGroup).attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-1uvutwe-0\"\n})([\"\"]);\nvar Styled = applyDisplayNames({\n SelectGroup: SelectGroup\n});\nexport default Styled;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _typeof from \"@babel/runtime/helpers/typeof\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\", \"size\", \"error\", \"label\", \"placeholder\", \"hint\", \"LabelProps\", \"SelectProps\", \"selectProps\", \"scroll\", \"fullWidth\", \"showSelectionKey\", \"value\", \"multiple\", \"hideMenuItemsActions\", \"onChange\", \"readOnly\", \"disabled\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport React from 'react';\nimport PT from 'prop-types';\nimport { InputSize } from '../../utils/types';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport Label from '../label';\nimport { propTypes as labelPropTypes } from '../label/label.component';\nimport Select from '../select';\nimport { propTypes as selectPropTypes } from '../select/select.component';\nimport FormHint from '../form-hint';\nimport Styled from './select-group.styles';\nvar SelectGroup = intrinsicComponent(function (_ref, ref) {\n var children = _ref.children,\n size = _ref.size,\n error = _ref.error,\n label = _ref.label,\n placeholder = _ref.placeholder,\n hint = _ref.hint,\n LabelPropsData = _ref.LabelProps,\n SelectPropsData = _ref.SelectProps,\n selectProps = _ref.selectProps,\n _ref$scroll = _ref.scroll,\n scroll = _ref$scroll === void 0 ? true : _ref$scroll,\n fullWidth = _ref.fullWidth,\n showSelectionKey = _ref.showSelectionKey,\n value = _ref.value,\n multiple = _ref.multiple,\n hideMenuItemsActions = _ref.hideMenuItemsActions,\n onChange = _ref.onChange,\n readOnly = _ref.readOnly,\n disabled = _ref.disabled,\n rest = _objectWithoutProperties(_ref, _excluded);\n var renderLabel = function renderLabel() {\n if (label) {\n if (typeof label === 'function') {\n return label({\n error: error\n });\n }\n if (_typeof(label) === 'object') {\n return label;\n }\n return /*#__PURE__*/React.createElement(Label, _extends({\n error: error\n }, LabelPropsData || {}), label);\n }\n return null;\n };\n var renderHint = function renderHint() {\n if (hint) {\n if (typeof hint === 'function') {\n return hint({\n error: error\n });\n }\n if (_typeof(hint) === 'object') {\n return hint;\n }\n return /*#__PURE__*/React.createElement(FormHint, {\n error: error\n }, hint);\n }\n return null;\n };\n return /*#__PURE__*/React.createElement(Styled.SelectGroup, _extends({}, rest, {\n ref: ref\n }), renderLabel(), /*#__PURE__*/React.createElement(Select, _extends({\n error: error,\n value: value,\n size: size,\n scroll: scroll,\n onChange: onChange,\n multiple: multiple,\n fullWidth: Boolean(fullWidth)\n }, SelectPropsData || {}, {\n selectProps: selectProps,\n readOnly: readOnly,\n disabled: disabled,\n placeholder: placeholder,\n showSelectionKey: showSelectionKey,\n hideMenuItemsActions: hideMenuItemsActions\n }), children), renderHint());\n});\nSelectGroup.defaultProps = {\n error: false,\n fullWidth: false,\n readOnly: false,\n disabled: false,\n scroll: true,\n hideMenuItemsActions: false\n};\nvar size = selectPropTypes.size,\n restSelectPropTypes = _objectWithoutProperties(selectPropTypes, [\"size\"]);\nSelectGroup.propTypes = _objectSpread(_objectSpread({}, restSelectPropTypes), {}, {\n // Extends from SelectProps: multiple, error, children, value, onChange\n fullWidth: PT.bool,\n size: PT.oneOf(objectValues(InputSize)),\n label: PT.node,\n hint: PT.node,\n LabelProps: PT.exact(labelPropTypes),\n SelectProps: PT.exact(selectPropTypes),\n selectProps: PT.object,\n readOnly: PT.bool,\n scroll: PT.bool,\n showSelectionKey: PT.bool,\n disabled: PT.bool\n});\nexport default SelectGroup;","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { Color as PColor } from '../../utils/types/palette';\nvar baseClassName = 'Backdrop';\nvar Backdrop = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-txa5a-0\"\n})(function (_ref) {\n var palette = _ref.theme.palette;\n return css([\"position:fixed;display:flex;align-items:center;justify-content:center;inset:0px;background-color:\", \";transition:opacity 251ms cubic-bezier(0.4,0,0.2,1) 0ms;opacity:1;z-index:-1;\"], palette[PColor.Extra_0_3_Overlay]);\n});\nvar Styled = applyDisplayNames({\n Backdrop: Backdrop\n});\nexport default Styled;","import _objectDestructuringEmpty from \"@babel/runtime/helpers/objectDestructuringEmpty\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport React from 'react';\nimport { intrinsicComponent } from '../../utils/functions';\nimport Styled from './backdrop.styles';\nvar Backdrop = intrinsicComponent(function (_ref, ref) {\n var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));\n return /*#__PURE__*/React.createElement(Styled.Backdrop, _extends({}, rest, {\n ref: ref\n }));\n});\nBackdrop.defaultProps = {};\nBackdrop.propTypes = {};\nexport default Backdrop;","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames, scrollBar } from '../../utils/functions';\nimport { Color as PColor } from '../../utils/types/palette';\nimport { Shadows as PShadows } from '../../utils/types/shadows';\nimport { FontVariant as FV } from '../../utils/types/typography/font-variant';\nimport Accordion from '../accordion/accordion.component';\nimport AccordionHeaderStyled from '../accordion-header/accordion-header.styles';\nimport AccordionDetailsStyled from '../accordion-details/accordion-details.styles';\nvar baseClassName = 'Drawer';\nvar TemporaryDrawer = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'temporary')\n}).withConfig({\n componentId: \"sc-1riasfx-0\"\n})(function (_ref) {\n var open = _ref.open;\n return css([\"position:absolute;inset:0px;z-index:1200;visibility:\", \";\"], !open && 'hidden');\n});\nvar PersistentDrawer = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'persistent')\n}).withConfig({\n componentId: \"sc-1riasfx-1\"\n})([\"\"]);\nvar Drawer = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-1riasfx-2\"\n})(function (_ref2) {\n var open = _ref2.open,\n isCollapsed = _ref2.isCollapsed,\n _ref2$top = _ref2.top,\n top = _ref2$top === void 0 ? 0 : _ref2$top,\n _ref2$theme = _ref2.theme,\n palette = _ref2$theme.palette,\n shadows = _ref2$theme.shadows,\n breakpoints = _ref2$theme.breakpoints;\n return css([\"display:flex;flex-direction:column;flex:1 0 auto;background-color:\", \";box-shadow:\", \";overflow-y:overlay;overflow-x:hidden;transform:\", \";visibility:\", \";transition:200ms;height:calc(100% - \", \"px);\", \"{margin-top:0px;height:100%;}\", \" &{margin-top:0px;height:100%;}box-sizing:border-box;width:\", \";padding:\", \";\", \"\"], palette[PColor.BackgroundStateless], shadows[PShadows.LeftPanelMd], open ? 'none' : 'translateX(-100%)', !open && 'hidden', top, breakpoints.down('md'), breakpoints.classes.sm, isCollapsed ? '68px' : '302px', isCollapsed && '0px 12px', scrollBar);\n});\nvar Header = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'header')\n}).withConfig({\n componentId: \"sc-1riasfx-3\"\n})(function (_ref3) {\n var isCollapsed = _ref3.isCollapsed;\n return css([\"display:\", \";justify-content:flex-start;align-items:center;position:relative;text-decoration:none;width:100%;box-sizing:border-box;text-align:left;margin-top:12px;transition:background-color 100ms ease-out;\"], isCollapsed ? 'none' : 'flex');\n});\nvar Body = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'body')\n}).withConfig({\n componentId: \"sc-1riasfx-4\"\n})([\"flex:1 1 auto;.SfxAccordionDetails-root{margin:0;}\"]);\nvar Footer = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'footer')\n}).withConfig({\n componentId: \"sc-1riasfx-5\"\n})(function (_ref4) {\n var isCollapsed = _ref4.isCollapsed;\n return css([\"display:flex;flex-direction:column;width:100%;padding:\", \";\"], isCollapsed ? '0px' : '0px 8px');\n});\nvar List = /*#__PURE__*/styled.ul.attrs({\n className: generateClassNames(baseClassName, 'list')\n}).withConfig({\n componentId: \"sc-1riasfx-6\"\n})(function () {\n return css([\"list-style:none;margin:12px 0;padding:0;position:relative;\"]);\n});\nvar Item = /*#__PURE__*/styled.li.attrs({\n className: generateClassNames(baseClassName, 'item')\n}).withConfig({\n componentId: \"sc-1riasfx-7\"\n})(function (_ref5) {\n var palette = _ref5.theme.palette,\n isCollapsed = _ref5.isCollapsed,\n selected = _ref5.selected;\n return css([\"display:\", \";justify-content:flex-start;align-items:center;position:relative;text-decoration:none;width:100%;box-sizing:border-box;text-align:left;padding:13px 16px;transition:background-color 100ms ease-out;margin-bottom:4px;cursor:pointer;&:hover{background-color:\", \";& > *{color:\", \";}}\", \"\"], isCollapsed ? 'none' : 'flex', palette[PColor.BackgroundActive], palette[PColor.AccentStateless], selected && css([\"background-color:\", \";& > *{color:\", \" !important;}\"], palette[PColor.BackgroundActive], palette[PColor.AccentStateless]));\n});\nvar ItemText = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'text')\n}).withConfig({\n componentId: \"sc-1riasfx-8\"\n})(function (_ref6) {\n var _ref6$theme = _ref6.theme,\n palette = _ref6$theme.palette,\n font = _ref6$theme.typography.font,\n fontKey = _ref6.font,\n isCollapsed = _ref6.isCollapsed;\n return css([\"flex:1 1 auto;color:\", \";\", \";transition:color 100ms ease-out;display:\", \";user-select:none;\"], palette[PColor.TextPrimary], font[fontKey || FV.LabelLarge], isCollapsed && 'none');\n});\nvar Icon = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'icon')\n}).withConfig({\n componentId: \"sc-1riasfx-9\"\n})(function (_ref7) {\n var palette = _ref7.theme.palette,\n isCollapsed = _ref7.isCollapsed;\n return css([\"display:flex;flex-shrink:0;color:\", \";margin-right:\", \";transition:color 100ms ease-out;\"], palette[PColor.IconsPrimary], isCollapsed ? '0px' : '12px');\n});\nvar ItemButton = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'item-button')\n}).withConfig({\n componentId: \"sc-1riasfx-10\"\n})(function (_ref8) {\n var palette = _ref8.theme.palette,\n isCollapsed = _ref8.isCollapsed,\n selected = _ref8.selected;\n return css([\"display:flex;justify-content:\", \";align-items:center;border-radius:4px;box-sizing:border-box;text-align:left;padding:\", \";transition:background-color 150ms cubic-bezier(0.4,0,0.2,1) 0ms;margin-bottom:8px;cursor:pointer;&:hover{background-color:\", \";& > *{color:\", \";}}\", \"\"], isCollapsed ? 'center' : 'flex-start', isCollapsed ? '13px' : '13px 16px', palette[PColor.BackgroundActive], palette[PColor.AccentStateless], selected && css([\"background-color:\", \";& > *{color:\", \";}\"], palette[PColor.BackgroundActive], palette[PColor.AccentStateless]));\n});\nvar CollapsedButton = /*#__PURE__*/styled(ItemButton).attrs({\n className: generateClassNames(baseClassName, 'item-button')\n}).withConfig({\n componentId: \"sc-1riasfx-11\"\n})(function (_ref9) {\n var isCollapsed = _ref9.isCollapsed;\n return css([\"\", \"\"], !isCollapsed && css([\"padding:13px 24px;\"]));\n});\nvar DrawerAccordion = /*#__PURE__*/styled(Accordion).attrs({\n className: generateClassNames(baseClassName, 'accordion')\n}).withConfig({\n componentId: \"sc-1riasfx-12\"\n})(function (_ref10) {\n var _ref10$theme = _ref10.theme,\n palette = _ref10$theme.palette,\n font = _ref10$theme.typography.font,\n selected = _ref10.selected;\n return css([\"\", \"{padding:13px 16px;transition:background-color 100ms ease-out;\", \"{\", \";color:\", \";}&:hover{background-color:\", \";& > *{color:\", \";}}\", \"}\", \"{padding:0px 16px;}\"], AccordionHeaderStyled.Header, AccordionHeaderStyled.Label, font[FV.LabelLargeEmphasis], palette[PColor.TextPrimary], palette[PColor.BackgroundActive], palette[PColor.AccentStateless], selected && css([\"\", \"{color:\", \";}\"], AccordionHeaderStyled.Label, palette[PColor.AccentStateless]), AccordionDetailsStyled.AccordionDetails);\n});\nvar Styled = applyDisplayNames({\n TemporaryDrawer: TemporaryDrawer,\n PersistentDrawer: PersistentDrawer,\n Drawer: Drawer,\n Header: Header,\n Body: Body,\n Footer: Footer,\n List: List,\n Item: Item,\n ItemButton: ItemButton,\n Icon: Icon,\n ItemText: ItemText,\n DrawerAccordion: DrawerAccordion,\n CollapsedButton: CollapsedButton\n});\nexport default Styled;","import { createContext } from 'react';\nvar DrawerContext = /*#__PURE__*/createContext({\n isCollapsed: false,\n size: 20\n});\nif (process.env.NODE_ENV !== 'production') {\n DrawerContext.displayName = 'DrawerContext';\n}\nexport default DrawerContext;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\", \"font\"];\nimport React, { useContext } from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport { FontVariant } from '../../utils/types/typography/font-variant';\nimport Styled from './drawer.styles';\nimport DrawerContext from './drawer.context';\nvar DrawerItemText = intrinsicComponent(function (_ref, ref) {\n var children = _ref.children,\n font = _ref.font,\n rest = _objectWithoutProperties(_ref, _excluded);\n var _useContext = useContext(DrawerContext),\n isCollapsed = _useContext.isCollapsed;\n return /*#__PURE__*/React.createElement(Styled.ItemText, _extends({\n font: font,\n isCollapsed: isCollapsed\n }, rest, {\n ref: ref\n }), children);\n});\nDrawerItemText.defaultProps = {};\nDrawerItemText.propTypes = {\n font: PT.oneOf(objectValues(FontVariant))\n};\nexport default DrawerItemText;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\", \"size\"];\nimport React, { useContext } from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent } from '../../utils/functions';\nimport Styled from './drawer.styles';\nimport DrawerContext from './drawer.context';\nvar DrawerItemIcon = intrinsicComponent(function (_ref, ref) {\n var children = _ref.children,\n iconSize = _ref.size,\n rest = _objectWithoutProperties(_ref, _excluded);\n var _useContext = useContext(DrawerContext),\n isCollapsed = _useContext.isCollapsed,\n size = _useContext.size;\n return /*#__PURE__*/React.createElement(Styled.Icon, _extends({}, rest, {\n isCollapsed: isCollapsed,\n ref: ref\n }), children && typeof children === 'function' ? children({\n size: size || iconSize\n }) : children);\n});\nDrawerItemIcon.defaultProps = {\n size: 20\n};\nDrawerItemIcon.propTypes = {\n size: PT.number,\n children: PT.oneOfType([PT.node, PT.func]).isRequired\n};\nexport default DrawerItemIcon;","export var Variant = {\n Auto: 'auto',\n Temporary: 'temporary',\n Persistent: 'persistent'\n};","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\", \"open\", \"iconsSize\", \"collapsed\", \"top\", \"hideBackdrop\", \"disablePortal\", \"collapseButtonLabel\", \"persistentDrawerStyles\", \"temproryDrawerStyles\", \"variant\", \"onClose\", \"onCollapse\", \"onCollapseClick\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport React, { useState, useEffect, useMemo, useRef } from 'react';\nimport { createPortal } from 'react-dom';\nimport PT from 'prop-types';\nimport ArrowSidebarLeftOutline from '@scaleflex/icons/arrow-sidebar-left-outline';\nimport ArrowSidebarRightOutline from '@scaleflex/icons/arrow-sidebar-right-outline';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport { useMediaQuery, useTheme } from '../../theme/hooks';\nimport DrawerItemText from './drawer-item-text-component';\nimport DrawerItemIcon from './drawer-item-icon.component';\nimport DrawerContext from './drawer.context';\nimport Backdrop from '../backdrop';\nimport Styled from './drawer.styles';\nimport { Variant } from './types';\nvar Drawer = intrinsicComponent(function (_ref, ref) {\n var children = _ref.children,\n open = _ref.open,\n _ref$iconsSize = _ref.iconsSize,\n iconsSize = _ref$iconsSize === void 0 ? 20 : _ref$iconsSize,\n _ref$collapsed = _ref.collapsed,\n collapsed = _ref$collapsed === void 0 ? false : _ref$collapsed,\n top = _ref.top,\n hideBackdrop = _ref.hideBackdrop,\n disablePortal = _ref.disablePortal,\n _ref$collapseButtonLa = _ref.collapseButtonLabel,\n collapseButtonLabel = _ref$collapseButtonLa === void 0 ? 'Collapse menu' : _ref$collapseButtonLa,\n _ref$persistentDrawer = _ref.persistentDrawerStyles,\n persistentDrawerStyles = _ref$persistentDrawer === void 0 ? {} : _ref$persistentDrawer,\n _ref$temproryDrawerSt = _ref.temproryDrawerStyles,\n temproryDrawerStyles = _ref$temproryDrawerSt === void 0 ? {} : _ref$temproryDrawerSt,\n _ref$variant = _ref.variant,\n variant = _ref$variant === void 0 ? Variant.Auto : _ref$variant,\n onClose = _ref.onClose,\n onCollapse = _ref.onCollapse,\n onCollapseClick = _ref.onCollapseClick,\n rest = _objectWithoutProperties(_ref, _excluded);\n var theme = useTheme();\n var matchDownXl = useMediaQuery(theme.breakpoints.down('xl'));\n var _useState = useState(collapsed),\n _useState2 = _slicedToArray(_useState, 2),\n isCollapsed = _useState2[0],\n setIsCollapsed = _useState2[1];\n var temproryDrawerRef = useRef(null);\n var DrawerIconsSize = useMemo(function () {\n return iconsSize;\n }, [iconsSize]);\n var target = document.querySelector('body');\n useEffect(function () {\n setIsCollapsed(collapsed);\n }, [collapsed]);\n useEffect(function () {\n if (onCollapse) {\n onCollapse(isCollapsed);\n }\n }, [isCollapsed]);\n var handleCollapse = function handleCollapse() {\n var newCollpaseState = !isCollapsed;\n setIsCollapsed(newCollpaseState);\n if (onCollapseClick) {\n onCollapseClick(newCollpaseState);\n }\n };\n var handleClose = function handleClose() {\n if (typeof onClose === 'function') {\n onClose();\n }\n };\n var keyListener = function keyListener(ev) {\n var isTemporaryDrawer = false;\n if (temproryDrawerRef !== null && temproryDrawerRef !== void 0 && temproryDrawerRef.current) {\n var _temproryDrawerRef$cu;\n isTemporaryDrawer = (temproryDrawerRef === null || temproryDrawerRef === void 0 ? void 0 : (_temproryDrawerRef$cu = temproryDrawerRef.current) === null || _temproryDrawerRef$cu === void 0 ? void 0 : _temproryDrawerRef$cu.offsetWidth) > 0;\n }\n if (ev.key === 'Escape' && isTemporaryDrawer) {\n handleClose();\n }\n };\n useEffect(function () {\n document.addEventListener('keydown', keyListener);\n return function () {\n return document.removeEventListener('keydown', keyListener);\n };\n }, []);\n var renderDrawer = function renderDrawer(showCollapsedButton) {\n return /*#__PURE__*/React.createElement(Styled.Drawer, _extends({\n open: open,\n top: top\n }, rest, {\n isCollapsed: showCollapsedButton ? isCollapsed : false,\n ref: ref\n }), children, showCollapsedButton && /*#__PURE__*/React.createElement(Styled.CollapsedButton, {\n onClick: handleCollapse,\n isCollapsed: isCollapsed\n }, /*#__PURE__*/React.createElement(DrawerItemIcon, null, isCollapsed ? function (props) {\n return /*#__PURE__*/React.createElement(ArrowSidebarRightOutline, _extends({}, props, {\n size: iconsSize\n }));\n } : function (props) {\n return /*#__PURE__*/React.createElement(ArrowSidebarLeftOutline, _extends({}, props, {\n size: iconsSize\n }));\n }), /*#__PURE__*/React.createElement(DrawerItemText, null, collapseButtonLabel)));\n };\n var renderBackdrop = function renderBackdrop() {\n return !hideBackdrop && open ? /*#__PURE__*/React.createElement(Backdrop, {\n onClick: onClose\n }) : null;\n };\n var temporaryDrawer = function temporaryDrawer() {\n return disablePortal ? /*#__PURE__*/React.createElement(Styled.TemporaryDrawer, {\n ref: temproryDrawerRef,\n style: _objectSpread({}, temproryDrawerStyles),\n open: open\n }, renderBackdrop(), renderDrawer(false)) : /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement(Styled.TemporaryDrawer, {\n ref: temproryDrawerRef,\n style: _objectSpread({}, temproryDrawerStyles),\n open: open\n }, renderBackdrop(), renderDrawer(false)), target);\n };\n var persistentDrawer = function persistentDrawer() {\n return /*#__PURE__*/React.createElement(Styled.PersistentDrawer, {\n style: _objectSpread({}, persistentDrawerStyles)\n }, renderDrawer(true));\n };\n var getDrawerVariant = function getDrawerVariant() {\n switch (variant) {\n case Variant.Auto:\n return matchDownXl ? temporaryDrawer() : persistentDrawer();\n case Variant.Temporary:\n return temporaryDrawer();\n case Variant.Persistent:\n return persistentDrawer();\n default:\n return matchDownXl ? temporaryDrawer() : persistentDrawer();\n }\n };\n return /*#__PURE__*/React.createElement(DrawerContext.Provider, {\n value: {\n isCollapsed: !matchDownXl ? isCollapsed : false,\n size: DrawerIconsSize\n }\n }, getDrawerVariant());\n});\nexport var defaultProps = {\n open: false,\n hideBackdrop: false,\n iconsSize: 20,\n variant: Variant.Auto\n};\nDrawer.defaultProps = defaultProps;\nexport var propTypes = {\n onClose: PT.func.isRequired,\n onCollapse: PT.func,\n onCollapseClick: PT.func,\n children: PT.node.isRequired,\n top: PT.number,\n iconsSize: PT.number,\n open: PT.bool,\n hideBackdrop: PT.bool,\n collapsed: PT.bool,\n disablePortal: PT.bool,\n collapseButtonLabel: PT.string,\n persistentDrawerStyles: PT.object,\n temproryDrawerStyles: PT.object,\n variant: PT.oneOf(objectValues(Variant))\n};\nDrawer.propTypes = propTypes;\nexport default Drawer;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\"];\nimport React, { useContext } from 'react';\nimport { intrinsicComponent } from '../../utils/functions';\nimport DrawerContext from './drawer.context';\nimport Styled from './drawer.styles';\nvar DrawerHeader = intrinsicComponent(function (_ref, ref) {\n var children = _ref.children,\n rest = _objectWithoutProperties(_ref, _excluded);\n var _useContext = useContext(DrawerContext),\n isCollapsed = _useContext.isCollapsed;\n return /*#__PURE__*/React.createElement(Styled.Header, _extends({}, rest, {\n isCollapsed: isCollapsed,\n ref: ref\n }), children);\n});\nDrawerHeader.defaultProps = {};\nDrawerHeader.propTypes = {};\nexport default DrawerHeader;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\"];\nimport React from 'react';\nimport { intrinsicComponent } from '../../utils/functions';\nimport Styled from './drawer.styles';\nvar DrawerBody = intrinsicComponent(function (_ref, ref) {\n var children = _ref.children,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Styled.Body, _extends({}, rest, {\n ref: ref\n }), children);\n});\nDrawerBody.defaultProps = {};\nDrawerBody.propTypes = {};\nexport default DrawerBody;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\"];\nimport React from 'react';\nimport { intrinsicComponent } from '../../utils/functions';\nimport Styled from './drawer.styles';\nvar DrawerList = intrinsicComponent(function (_ref, ref) {\n var children = _ref.children,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Styled.List, _extends({}, rest, {\n ref: ref\n }), children);\n});\nDrawerList.defaultProps = {};\nDrawerList.propTypes = {};\nexport default DrawerList;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\", \"selected\"];\nimport React, { useContext } from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent } from '../../utils/functions';\nimport DrawerContext from './drawer.context';\nimport Styled from './drawer.styles';\nvar DrawerItem = intrinsicComponent(function (_ref, ref) {\n var children = _ref.children,\n selected = _ref.selected,\n rest = _objectWithoutProperties(_ref, _excluded);\n var _useContext = useContext(DrawerContext),\n isCollapsed = _useContext.isCollapsed;\n return /*#__PURE__*/React.createElement(Styled.Item, _extends({\n selected: selected,\n isCollapsed: isCollapsed\n }, rest, {\n ref: ref\n }), children);\n});\nDrawerItem.defaultProps = {\n selected: false\n};\nDrawerItem.propTypes = {\n selected: PT.bool\n};\nexport default DrawerItem;","import{Input,Label}from\"@scaleflex/ui/core\";import styled from\"styled-components\";import{FontVariant as FV}from\"@scaleflex/ui/utils/types/typography\";var StyledHSVOptions=styled.div.withConfig({componentId:\"sc-1rfxjvn-0\"})([\"display:flex;width:100%;justify-content:space-between;gap:10px;.SfxSlider-root{min-width:100px;}\",\"\"],function(a){var b=a.isPhoneScreen;return b&&\"\\n flex-direction: column;\\n\\n .SfxSlider-root {\\n min-width: 230px;\\n }\\n \"}),StyledSliderContainer=styled.div.withConfig({componentId:\"sc-1rfxjvn-1\"})([\"display:flex;flex-direction:column;\"]),StyledSliderLabel=styled(Label).withConfig({componentId:\"sc-1rfxjvn-2\"})([\"\",\";\"],function(a){var b=a.theme;return b.typography.font[FV.LabelExtraSmallUp]}),StyledSliderWrapper=styled.div.withConfig({componentId:\"sc-1rfxjvn-3\"})([\"display:flex;align-items:center;\"]),StyledSliderInput=styled(Input).withConfig({componentId:\"sc-1rfxjvn-4\"})([\"display:inline-block;width:40px;height:28px;padding:6px 2px;margin-left:10px;border:none;.SfxInput-Base{text-align:center;}\"]);export{StyledHSVOptions,StyledSliderContainer,StyledSliderLabel,StyledSliderWrapper,StyledSliderInput};","import _slicedToArray from\"@babel/runtime/helpers/slicedToArray\";import React from\"react\";import Konva from\"konva\";import{useFinetune}from\"../../../hooks\";import restrictNumber from\"../../../utils/restrictNumber\";import Slider from\"../../common/Slider\";import{StyledSliderContainer,StyledSliderInput,StyledSliderLabel,StyledSliderWrapper}from\"../tools.styled\";var MIN_VALUE=-1,DEFAULT_VALUE={brightness:0},MAX_VALUE=1,sliderStyle={width:150,padding:0,margin:0},BrightnessOptions=function(a){var b,c,d=a.t,e=useFinetune(Konva.Filters.Brighten,DEFAULT_VALUE),f=_slicedToArray(e,2),g=f[0],h=f[1],i=function(a){h({brightness:restrictNumber(a,MIN_VALUE,MAX_VALUE)})};return React.createElement(StyledSliderContainer,{className:\"FIE_brightness-option-wrapper\"},React.createElement(StyledSliderLabel,{className:\"FIE_brightness-option-label\"},d(\"brightness\")),React.createElement(StyledSliderWrapper,null,React.createElement(Slider,{className:\"FIE_brightness-option\",min:MIN_VALUE,step:.05,max:MAX_VALUE,width:\"124px\",value:null!==(b=g.brightness)&&void 0!==b?b:DEFAULT_VALUE.brightness,onChange:i,style:sliderStyle}),React.createElement(StyledSliderInput,{value:null!==(c=g.brightness)&&void 0!==c?c:DEFAULT_VALUE.brightness,onChange:function onChange(a){var b=a.target.value;return i(b)}})))};export default BrightnessOptions;","import{DEFAULT_ZOOM_FACTOR}from\"./constants\";var getZoomFitFactor=function(a,b){return Math.min(a.width/b.width,a.height/b.height)||DEFAULT_ZOOM_FACTOR};export default getZoomFitFactor;","import Custom from\"@scaleflex/icons/custom\";import Ellipse from\"@scaleflex/icons/ellipse\";import Landscape from\"@scaleflex/icons/landscape\";import Portrait from\"@scaleflex/icons/portrait\";import ImageOutline from\"@scaleflex/icons/image-outline\";import{CUSTOM_CROP,ELLIPSE_CROP,ORIGINAL_CROP}from\"../../../utils/constants\";import toPrecisedFloat from\"../../../utils/toPrecisedFloat\";export var DEFAULT_CROP_PRESETS=[{titleKey:\"custom\",ratio:CUSTOM_CROP,icon:Custom,hide:function hide(){var a=0n.width||d.height>n.height?getZoomFitFactor(n,d):DEFAULT_ZOOM_FACTOR}})),c()};return React.createElement(React.Fragment,null,React.createElement(StyledToolsBarItemButtonWrapper,null,React.createElement(StyledToolsBarItemButtonLabel,{className:\"FIE_crop-tool-label FIE_selected-crop-preset-label\",isPhoneScreen:r},g(l||\"cropTool\")),React.createElement(StyledOpenMenuButton,{className:\"FIE_crop-presets-opener-button\",color:\"link-secondary\",size:\"lg\"},b?React.createElement(MoveUpOutline,{size:10}):React.createElement(MoveDownOutline,{size:10}))),React.createElement(Menu,{className:\"FIE_crop-presets-menu\",anchorEl:b,enableOverlay:!0,onClose:c,open:!!b,position:\"top\",popperOptions:{modifiers:[{name:\"offset\",options:{offset:[0,4]}}]},maxHeight:\"100%\"},React.createElement(StyledMenu,null,s.map(function renderPreset(a){var b=a.titleKey,c=a.descriptionKey,d=a.ratio,e=a.width,f=a.height,h=a.groups,i=a.icon,j=a.disableManualResize,l=a.noEffect;return h?React.createElement(CropPresetGroupsList,{key:b,titleKey:b,groups:h,Icon:i,theme:p,onItemSelect:t,t:g,disableManualResize:j}):React.createElement(CropPresetItem,{key:d,ratio:null!==d&&void 0!==d?d:toPrecisedFloat(e/f),titleKey:b,t:g,description:g(c),Icon:i,isActive:(k||ORIGINAL_CROP)===(null!==d&&void 0!==d?d:toPrecisedFloat(e/f))&&!m,theme:p,width:e,height:f,onClick:t,disableManualResize:j,noEffect:l})}))))};CropPresetsOption.defaultProps={anchorEl:null};export default CropPresetsOption;","import _slicedToArray from\"@babel/runtime/helpers/slicedToArray\";import React,{useState}from\"react\";import{Crop as CropIcon}from\"@scaleflex/icons/crop\";import{useStore}from\"../../../hooks\";import ToolsBarItemButton from\"../../ToolsBar/ToolsBarItemButton\";import{TOOLS_IDS}from\"../../../utils/constants\";import{StyledToolsBarItemButtonLabel}from\"../../ToolsBar/ToolsBar.styled\";import CropPresetsOption from\"./CropPresetsOption\";var Crop=function(a){var b=a.selectTool,c=a.isSelected,d=useStore(),e=d.config,f=d.t,g=useState(),h=_slicedToArray(g,2),i=h[0],j=h[1];return React.createElement(ToolsBarItemButton,{className:\"FIE_crop-tool\",id:TOOLS_IDS.CROP,Icon:CropIcon,onClick:function selectToolAndShowPresets(a,c){b(a),j(c.currentTarget)},isSelected:c},e[TOOLS_IDS.CROP].noPresets?React.createElement(StyledToolsBarItemButtonLabel,{className:\"FIE_crop-tool-label\"},f(\"cropTool\")):React.createElement(CropPresetsOption,{anchorEl:i,onClose:function closeCropPresets(){j(null)}}))};Crop.defaultProps={isSelected:!1};export default Crop;","import React,{useCallback,useMemo}from\"react\";import{FlipX as FlipXIcon}from\"@scaleflex/icons/flip-x\";import ToolsBarItemButton from\"../../ToolsBar/ToolsBarItemButton\";import{FLIP_DIRECTIONS,TOOLS_IDS}from\"../../../utils/constants\";import{TOGGLE_FLIP}from\"../../../actions\";import{usePhoneScreen,useStore}from\"../../../hooks\";var xFlipReverseSideStyle={transform:\"scaleX(-1)\"},FlipX=function(a){var b=a.selectTool,c=a.isSelected,d=a.t,e=useStore(),f=e.dispatch,g=e.adjustments.isFlippedX,h=usePhoneScreen(320),i=useMemo(function(){return{reverseLabelOfCurrXFlipDir:g?d(\"unFlipX\"):d(\"flipX\"),reverseIconOfCurrXFlipDir:function(){return React.createElement(FlipXIcon,{size:h?20:16,style:g?xFlipReverseSideStyle:void 0})}}},[g]),j=i.reverseLabelOfCurrXFlipDir,k=i.reverseIconOfCurrXFlipDir,l=useCallback(function(){f({type:TOGGLE_FLIP,payload:{direction:FLIP_DIRECTIONS.X}})},[]),m=useCallback(function(a){b(a),l()},[]);return React.createElement(ToolsBarItemButton,{className:\"FIE_flip-x-tool-button\",id:TOOLS_IDS.FLIP_X,label:j,Icon:k,onClick:m,isSelected:c})};FlipX.defaultProps={isSelected:!1};export default FlipX;","import React,{useCallback,useMemo}from\"react\";import{FlipY as FlipYIcon}from\"@scaleflex/icons/flip-y\";import ToolsBarItemButton from\"../../ToolsBar/ToolsBarItemButton\";import{FLIP_DIRECTIONS,TOOLS_IDS}from\"../../../utils/constants\";import{TOGGLE_FLIP}from\"../../../actions\";import{usePhoneScreen,useStore}from\"../../../hooks\";var xFlipReverseSideStyle={transform:\"scaleY(-1)\"},FlipY=function(a){var b=a.selectTool,c=a.isSelected,d=a.t,e=useStore(),f=e.dispatch,g=e.adjustments.isFlippedY,h=usePhoneScreen(320),i=useMemo(function(){return{reverseLabelOfCurrXFlipDir:g?d(\"unFlipY\"):d(\"flipY\"),reverseIconOfCurrXFlipDir:function(){return React.createElement(FlipYIcon,{size:h?20:16,style:g?xFlipReverseSideStyle:void 0})}}},[g]),j=i.reverseLabelOfCurrXFlipDir,k=i.reverseIconOfCurrXFlipDir,l=useCallback(function(){f({type:TOGGLE_FLIP,payload:{direction:FLIP_DIRECTIONS.Y}})},[]),m=useCallback(function(a){b(a),l()},[]);return React.createElement(ToolsBarItemButton,{className:\"FIE_flip-y-tool-button\",id:TOOLS_IDS.FLIP_Y,label:j,Icon:k,onClick:m,isSelected:c})};FlipY.defaultProps={isSelected:!1};export default FlipY;","import React from\"react\";import{RotationLeft as RotateIcon}from\"@scaleflex/icons/rotation-left\";import ToolsBarItemButton from\"../../ToolsBar/ToolsBarItemButton\";import{TOOLS_IDS}from\"../../../utils/constants\";var RotateButton=function(a){var b=a.selectTool,c=a.isSelected,d=a.t;return React.createElement(ToolsBarItemButton,{className:\"FIE_rotate-tool-button\",id:TOOLS_IDS.ROTATE,label:d(\"rotateTool\"),Icon:RotateIcon,onClick:b,isSelected:c})};RotateButton.defaultProps={isSelected:!1};export default RotateButton;","import styled from\"styled-components\";import{IconButton,RotationSlider}from\"@scaleflex/ui/core\";import{Color as PC}from\"@scaleflex/ui/utils/types/palette\";var StyledRotationOptions=styled.div.withConfig({componentId:\"sc-wbx58r-0\"})([\"display:flex;align-items:center;gap:16px;\"]),StyledRotationSlider=styled(RotationSlider).withConfig({componentId:\"sc-wbx58r-1\"})([\".SfxRotationSlider-control{width:1px;height:10px;background-color:\",\";&:before{box-shadow:unset;}}.SfxRotationSlider-mark,.SfxRotationSlider-small-dot-wrapper{padding:0;.SfxRotationSlider-mark-text{top:10px;}.SfxRotationSlider-big-dot{width:4px;height:4px;}.SfxRotationSlider-small-dot{width:1px;height:1px;}}.SfxRotationSlider-list{gap:4px;}\"],function(a){var b=a.theme.palette;return b[PC.IconsSecondary]}),StyledRotateButton=styled(IconButton).withConfig({componentId:\"sc-wbx58r-2\"})([\"\"]);export{StyledRotationOptions,StyledRotationSlider,StyledRotateButton};","import React from\"react\";import RotationLeft from\"@scaleflex/icons/rotation-left\";import RotationRight from\"@scaleflex/icons/rotation-right\";import{Rotate90}from\"@scaleflex/icons\";import{useDebouncedCallback,usePhoneScreen,useStore}from\"../../../hooks\";import{CHANGE_ROTATION,SET_RESIZE}from\"../../../actions\";import restrictNumber from\"../../../utils/restrictNumber\";import getSizeAfterRotation from\"../../../utils/getSizeAfterRotation\";import{TOOLS_IDS}from\"../../../utils/constants\";import ToolsBarItemButton from\"../../ToolsBar/ToolsBarItemButton\";import{StyledRotationOptions,StyledRotationSlider,StyledRotateButton}from\"./Rotate.styled\";var RotateOptions=function(){var a=useStore(),b=a.dispatch,c=a.adjustments.rotation,d=void 0===c?0:c,e=a.resize,f=void 0===e?{}:e,g=a.config,h=g[TOOLS_IDS.ROTATE],i=usePhoneScreen(),j=useDebouncedCallback(function(a,c){var d=restrictNumber(c,-180,180);if(b({type:CHANGE_ROTATION,payload:{rotation:d}}),f.width&&f.height){var e=getSizeAfterRotation(f.width,f.height,d);b({type:SET_RESIZE,payload:{width:e.width,height:e.height}})}},20);return\"buttons\"===h.componentType?React.createElement(React.Fragment,null,React.createElement(ToolsBarItemButton,{className:\"FIE_rotate_button_left\",id:TOOLS_IDS.IMAGE,label:\"-\".concat(h.angle,\"\\xB0\"),Icon:RotationLeft,onClick:function changeRotationButtonNegative(a){var b=d-h.angle;j(a,b)}}),React.createElement(ToolsBarItemButton,{className:\"FIE_rotate_button_right\",id:TOOLS_IDS.IMAGE,label:\"+\".concat(h.angle,\"\\xB0\"),Icon:RotationRight,onClick:function changeRotationButtonPositive(a){var b=d+h.angle;j(a,b)}})):React.createElement(StyledRotationOptions,null,React.createElement(StyledRotationSlider,{className:\"FIE_rotate-slider\",showCurrentMarkText:!0,min:-180,max:180,step:i?h.angle/3:1,value:d,angle:h.angle||90,onChange:j}),React.createElement(StyledRotateButton,{size:\"sm\",color:\"basic\",onClick:function onClick(a){return j(a,d+90)}},React.createElement(Rotate90,{width:15})))};export default RotateOptions;","import React from\"react\";import{Contrast as ContrastIcon}from\"@scaleflex/icons/contrast\";import ToolsBarItemButton from\"../../ToolsBar/ToolsBarItemButton\";import{TOOLS_IDS}from\"../../../utils/constants\";var Contrast=function(a){var b=a.selectTool,c=a.isSelected,d=a.t;return React.createElement(ToolsBarItemButton,{className:\"FIE_contrast-tool-button\",id:TOOLS_IDS.CONTRAST,label:d(\"contrastTool\"),Icon:ContrastIcon,onClick:b,isSelected:c})};Contrast.defaultProps={isSelected:!1};export default Contrast;","import _slicedToArray from\"@babel/runtime/helpers/slicedToArray\";import React from\"react\";import Konva from\"konva\";import{useFinetune}from\"../../../hooks\";import restrictNumber from\"../../../utils/restrictNumber\";import Slider from\"../../common/Slider\";import{StyledSliderContainer,StyledSliderInput,StyledSliderLabel,StyledSliderWrapper}from\"../tools.styled\";var MIN_VALUE=-100,DEFAULT_VALUE={contrast:0},MAX_VALUE=100,sliderStyle={width:150,padding:0,margin:0},ContrastOptions=function(a){var b,c,d=a.t,e=useFinetune(Konva.Filters.Contrast,DEFAULT_VALUE),f=_slicedToArray(e,2),g=f[0],h=f[1],i=function(a){h({contrast:restrictNumber(a,MIN_VALUE,MAX_VALUE)})};return React.createElement(StyledSliderContainer,{className:\"FIE_contrast-option-wrapper\"},React.createElement(StyledSliderLabel,{className:\"FIE_contrast-option-label\"},d(\"contrastTool\")),React.createElement(StyledSliderWrapper,null,React.createElement(Slider,{className:\"FIE_contrast-option\",min:MIN_VALUE,max:MAX_VALUE,width:\"124px\",value:null!==(b=g.contrast)&&void 0!==b?b:DEFAULT_VALUE.contrast,onChange:i,style:sliderStyle}),React.createElement(StyledSliderInput,{value:null!==(c=g.contrast)&&void 0!==c?c:DEFAULT_VALUE.contrast,onChange:function onChange(a){var b=a.target.value;return i(b)}})))};export default ContrastOptions;","import React from\"react\";import{Saturation as SaturationIcon}from\"@scaleflex/icons/saturation\";import ToolsBarItemButton from\"../../ToolsBar/ToolsBarItemButton\";import{TOOLS_IDS}from\"../../../utils/constants\";var HSV=function(a){var b=a.selectTool,c=a.isSelected,d=a.t;return React.createElement(ToolsBarItemButton,{className:\"FIE_hsv-tool-button\",id:TOOLS_IDS.HSV,label:d(\"hsvTool\"),Icon:SaturationIcon,onClick:b,isSelected:c})};HSV.defaultProps={isSelected:!1};export default HSV;","import _defineProperty from\"@babel/runtime/helpers/defineProperty\";import _slicedToArray from\"@babel/runtime/helpers/slicedToArray\";import React from\"react\";import Konva from\"konva\";import{useFinetune,usePhoneScreen}from\"../../../hooks\";import Slider from\"../../common/Slider\";import{StyledHSVOptions,StyledSliderContainer,StyledSliderLabel,StyledSliderInput,StyledSliderWrapper}from\"../tools.styled\";var DEFAULT_VALUE={hue:0,saturation:0,value:0},MAX_VALUE={hue:259,saturation:10,value:2},sliderStyle={padding:0,margin:0},isPhoneScreen=usePhoneScreen(),HSVOptions=function(a){var b,c,d,e,f,g,h=a.t,i=useFinetune(Konva.Filters.HSV,DEFAULT_VALUE),j=_slicedToArray(i,2),k=j[0],l=j[1],m=function(a,b){l(_defineProperty({},a,b>MAX_VALUE[a]?MAX_VALUE[a]:+b))};return React.createElement(StyledHSVOptions,{isPhoneScreen:isPhoneScreen},React.createElement(StyledSliderContainer,{className:\"FIE_hue-option-wrapper\"},React.createElement(StyledSliderLabel,{className:\"FIE_hue-option-label\"},h(\"hue\")),React.createElement(StyledSliderWrapper,null,React.createElement(Slider,{className:\"FIE_hue-option\",min:0,step:1,max:259,value:null!==(b=k.hue)&&void 0!==b?b:DEFAULT_VALUE.hue,onChange:function onChange(a){return m(\"hue\",a)},style:sliderStyle}),React.createElement(StyledSliderInput,{value:null!==(c=k.hue)&&void 0!==c?c:DEFAULT_VALUE.hue,onChange:function onChange(a){var b=a.target.value;return m(\"hue\",b)}}))),React.createElement(StyledSliderContainer,{className:\"FIE_saturation-option-wrapper\"},React.createElement(StyledSliderLabel,{className:\"FIE_saturation-option-label\"},h(\"saturation\")),React.createElement(StyledSliderWrapper,null,React.createElement(Slider,{className:\"FIE_saturation-option\",min:-2,step:.5,max:10,value:null!==(d=k.saturation)&&void 0!==d?d:DEFAULT_VALUE.saturation,onChange:function onChange(a){return m(\"saturation\",a)},style:sliderStyle}),React.createElement(StyledSliderInput,{value:null!==(e=k.saturation)&&void 0!==e?e:DEFAULT_VALUE.saturation,onChange:function onChange(a){var b=a.target.value;return m(\"saturation\",b)}}))),React.createElement(StyledSliderContainer,{className:\"FIE_value-option-wrapper\"},React.createElement(StyledSliderLabel,{className:\"FIE_value-option-label\"},h(\"value\")),React.createElement(StyledSliderWrapper,null,React.createElement(Slider,{className:\"FIE_value-option\",min:-2,step:.1,max:2,value:null!==(f=k.value)&&void 0!==f?f:DEFAULT_VALUE.value,onChange:function onChange(a){return m(\"value\",a)},style:sliderStyle}),React.createElement(StyledSliderInput,{value:null!==(g=k.value)&&void 0!==g?g:DEFAULT_VALUE.value,onChange:function onChange(a){var b=a.target.value;return m(\"value\",b)}}))))};export default HSVOptions;","import React from\"react\";import{Blur as BlurIcon}from\"@scaleflex/icons/blur\";import ToolsBarItemButton from\"../../ToolsBar/ToolsBarItemButton\";import{TOOLS_IDS}from\"../../../utils/constants\";var Blur=function(a){var b=a.selectTool,c=a.isSelected,d=a.t;return React.createElement(ToolsBarItemButton,{className:\"FIE_blur-tool-button\",id:TOOLS_IDS.BLUR,label:d(\"blurTool\"),Icon:BlurIcon,onClick:b,isSelected:c})};Blur.defaultProps={isSelected:!1};export default Blur;","import _slicedToArray from\"@babel/runtime/helpers/slicedToArray\";import React from\"react\";import Konva from\"konva\";import{useFinetune}from\"../../../hooks\";import restrictNumber from\"../../../utils/restrictNumber\";import Slider from\"../../common/Slider\";import{StyledSliderContainer,StyledSliderInput,StyledSliderLabel,StyledSliderWrapper}from\"../tools.styled\";var MIN_VALUE=0,DEFAULT_VALUE={blurRadius:0},MAX_VALUE=100,sliderStyle={width:150,padding:0,margin:0},BlurOptions=function(a){var b,c,d=a.t,e=useFinetune(Konva.Filters.Blur,DEFAULT_VALUE),f=_slicedToArray(e,2),g=f[0],h=f[1],i=function(a){h({blurRadius:restrictNumber(a,MIN_VALUE,MAX_VALUE)})};return React.createElement(StyledSliderContainer,{className:\"FIE_blur-option-wrapper\"},React.createElement(StyledSliderLabel,{className:\"FIE_blur-option-label\"},d(\"blur\")),React.createElement(StyledSliderWrapper,null,React.createElement(Slider,{className:\"FIE_blur-option\",min:MIN_VALUE,max:MAX_VALUE,width:\"124px\",value:null!==(b=g.blurRadius)&&void 0!==b?b:DEFAULT_VALUE.blurRadius,onChange:i,style:sliderStyle}),React.createElement(StyledSliderInput,{value:null!==(c=g.blurRadius)&&void 0!==c?c:DEFAULT_VALUE.blurRadius,onChange:function onChange(a){var b=a.target.value;return i(b)}})))};export default BlurOptions;","import React from\"react\";import{Temprature as WarmthIcon}from\"@scaleflex/icons/tempreture\";import ToolsBarItemButton from\"../../ToolsBar/ToolsBarItemButton\";import{TOOLS_IDS}from\"../../../utils/constants\";var Warmth=function(a){var b=a.selectTool,c=a.isSelected,d=a.t;return React.createElement(ToolsBarItemButton,{className:\"FIE_warmth-tool-button\",id:TOOLS_IDS.WARMTH,label:d(\"warmthTool\"),Icon:WarmthIcon,onClick:b,isSelected:c})};Warmth.defaultProps={isSelected:!1};export default Warmth;","import _slicedToArray from\"@babel/runtime/helpers/slicedToArray\";import React from\"react\";import{useFinetune}from\"../../../hooks\";import restrictNumber from\"../../../utils/restrictNumber\";import{Warmth as CustomWarmth}from\"../../../custom/finetunes\";import Slider from\"../../common/Slider\";import{StyledSliderContainer,StyledSliderInput,StyledSliderLabel,StyledSliderWrapper}from\"../tools.styled\";var MIN_VALUE=0,DEFAULT_VALUE={warmth:0},MAX_VALUE=200,sliderStyle={width:150,padding:0,margin:0},WarmthOptions=function(a){var b,c,d=a.t,e=useFinetune(CustomWarmth,DEFAULT_VALUE),f=_slicedToArray(e,2),g=f[0],h=f[1],i=function(a){h({warmth:restrictNumber(a,MIN_VALUE,MAX_VALUE)})};return React.createElement(StyledSliderContainer,{className:\"FIE_warmth-option-wrapper\"},React.createElement(StyledSliderLabel,{className:\"FIE_warmth-option-label\"},d(\"warmthTool\")),React.createElement(StyledSliderWrapper,null,React.createElement(Slider,{className:\"FIE_warmth-option\",min:MIN_VALUE,max:MAX_VALUE,width:\"124px\",value:null!==(b=g.warmth)&&void 0!==b?b:DEFAULT_VALUE.warmth,onChange:i,style:sliderStyle}),React.createElement(StyledSliderInput,{value:null!==(c=g.warmth)&&void 0!==c?c:DEFAULT_VALUE.warmth,onChange:function onChange(a){var b=a.target.value;return i(b)}})))};export default WarmthOptions;","import styled,{css}from\"styled-components\";import{Color as PC}from\"@scaleflex/ui/utils/types/palette\";var StyledCarouselWrapper=styled.div.withConfig({componentId:\"sc-1nr0bka-0\"})([\"max-width:680px;min-width:150px;position:relative;overflow:hidden;touch-action:pan-y pinch-zoom;\"]),StyledCarousel=styled.ul.withConfig({componentId:\"sc-1nr0bka-1\"})([\"padding:0;margin:0;white-space:nowrap;overflow:hidden;\"]),StyledCarouselItem=styled.li.withConfig({componentId:\"sc-1nr0bka-2\"})([\"padding:4px;display:inline-block;list-style-type:none;user-select:none;\"]),arrowsCommonStyles=css([\"position:absolute;top:0;height:100%;width:60px;cursor:pointer;display:flex;align-items:center;justify-content:center;z-index:1;svg{color:\",\";}\"],function(a){var b=a.theme.palette;return b[PC.IconsSecondary]}),StyledPrevArrowWrapper=styled.div.withConfig({componentId:\"sc-1nr0bka-3\"})([\"\",\" left:0;justify-content:flex-start;background:linear-gradient( 90deg,#ffffff 1.56%,rgba(255,255,255,0.89) 52.4%,rgba(255,255,255,0.532165) 76.04%,rgba(255,255,255,0) 100% );\"],arrowsCommonStyles),StyledNextArrowWrapper=styled.div.withConfig({componentId:\"sc-1nr0bka-4\"})([\"\",\" right:0;justify-content:flex-end;background:linear-gradient( 270deg,#ffffff 1.56%,rgba(255,255,255,0.89) 52.4%,rgba(255,255,255,0.532165) 76.04%,rgba(255,255,255,0) 100% );\"],arrowsCommonStyles);export{StyledCarouselWrapper,StyledCarousel,StyledCarouselItem,StyledPrevArrowWrapper,StyledNextArrowWrapper};","import _slicedToArray from\"@babel/runtime/helpers/slicedToArray\";import React,{Children,useRef,useState,useEffect}from\"react\";import{ArrowLeftOutline,ArrowRightOutline}from\"@scaleflex/icons\";import{useResizeObserver}from\"../../../hooks\";import debounce from\"../../../utils/debounce\";import getScrollOffset from\"../../../utils/getScrollOffset\";import{StyledCarouselWrapper,StyledCarousel,StyledCarouselItem,StyledNextArrowWrapper,StyledPrevArrowWrapper}from\"./Carousel.styled\";var Carousel=function(a){var b=a.children,c=a.style,d=a.className,f=useRef(!1),g=useRef(),h=useResizeObserver(),i=_slicedToArray(h,1),j=i[0],k=useState(!1),l=_slicedToArray(k,2),m=l[0],n=l[1],o=useState(!1),p=_slicedToArray(o,2),q=p[0],r=p[1],s=Children.toArray(b),t=function(){if(g.current){var a=g.current,b=a.scrollWidth,c=a.offsetWidth,d=a.scrollLeft,e=Math.round(b-c),f=Math.round(e-d);n(0j,l=k?MAX_FILTER_PREVIEW_WIDTH:MAX_FILTER_PREVIEW_HEIGHT*j,m=k?MAX_FILTER_PREVIEW_WIDTH/j:MAX_FILTER_PREVIEW_HEIGHT;return React.createElement(StyledFilterItem,{className:\"FIE_filters-item\",onClick:h,\"aria-selected\":e},React.createElement(FilterItemPreview,{className:\"FIE_filters-item-preview\",width:MAX_FILTER_PREVIEW_WIDTH,height:MAX_FILTER_PREVIEW_HEIGHT},React.createElement(Layer,{onTap:h},React.createElement(Image,{image:f,filters:c?[c]:[],width:l,height:m,x:-(l-MAX_FILTER_PREVIEW_WIDTH)/2,y:-(m-MAX_FILTER_PREVIEW_HEIGHT)/2,ref:g}))),React.createElement(FilterItemLabel,{className:\"FIE_filters-item-label\"},b))};FilterItem.defaultProps={filterFn:void 0};export default memo(FilterItem);","import Konva from\"konva\";import*as CustomKonvaFilters from\"../../../custom/filters\";var konvaFilters=Konva.Filters;export var AVAILABLE_FILTERS=[{label:\"Original\",filterFn:null},{label:\"Invert\",filterFn:konvaFilters.Invert},{label:\"Black & White\",filterFn:CustomKonvaFilters.BlackAndWhite},{label:\"Sepia\",filterFn:konvaFilters.Sepia},{label:\"Solarize\",filterFn:konvaFilters.Solarize},{label:\"Clarendon\",filterFn:CustomKonvaFilters.Clarendon},{label:\"Gingham\",filterFn:CustomKonvaFilters.Gingham},{label:\"Moon\",filterFn:CustomKonvaFilters.Moon},{label:\"Lark\",filterFn:CustomKonvaFilters.Lark},{label:\"Reyes\",filterFn:CustomKonvaFilters.Reyes},{label:\"Juno\",filterFn:CustomKonvaFilters.Juno},{label:\"Slumber\",filterFn:CustomKonvaFilters.Slumber},{label:\"Crema\",filterFn:CustomKonvaFilters.Crema},{label:\"Ludwig\",filterFn:CustomKonvaFilters.Ludwig},{label:\"Aden\",filterFn:CustomKonvaFilters.Aden},{label:\"Perpetua\",filterFn:CustomKonvaFilters.Perpetua},{label:\"Amaro\",filterFn:CustomKonvaFilters.Amaro},{label:\"Mayfair\",filterFn:CustomKonvaFilters.Mayfair},{label:\"Rise\",filterFn:CustomKonvaFilters.Rise},{label:\"Hudson\",filterFn:CustomKonvaFilters.Hudson},{label:\"Valencia\",filterFn:CustomKonvaFilters.Valencia},{label:\"X-Pro II\",filterFn:CustomKonvaFilters.XPro2},{label:\"Sierra\",filterFn:CustomKonvaFilters.Sierra},{label:\"Willow\",filterFn:CustomKonvaFilters.Willow},{label:\"Lo-Fi\",filterFn:CustomKonvaFilters.LoFi},{label:\"Inkwell\",filterFn:konvaFilters.Grayscale},{label:\"Hefe\",filterFn:CustomKonvaFilters.Hefe},{label:\"Nashville\",filterFn:CustomKonvaFilters.Nashville},{label:\"Stinson\",filterFn:CustomKonvaFilters.Stinson},{label:\"Vesper\",filterFn:CustomKonvaFilters.Vesper},{label:\"Earlybird\",filterFn:CustomKonvaFilters.Earlybird},{label:\"Brannan\",filterFn:CustomKonvaFilters.Brannan},{label:\"Sutro\",filterFn:CustomKonvaFilters.Sutro},{label:\"Toaster\",filterFn:CustomKonvaFilters.Toaster},{label:\"Walden\",filterFn:CustomKonvaFilters.Walden},{label:\"1977\",filterFn:CustomKonvaFilters.NinteenSeventySeven},{label:\"Kelvin\",filterFn:CustomKonvaFilters.Kelvin},{label:\"Maven\",filterFn:CustomKonvaFilters.Maven},{label:\"Ginza\",filterFn:CustomKonvaFilters.Ginza},{label:\"Skyline\",filterFn:CustomKonvaFilters.Skyline},{label:\"Dogpatch\",filterFn:CustomKonvaFilters.Dogpatch},{label:\"Brooklyn\",filterFn:CustomKonvaFilters.Brooklyn},{label:\"Helena\",filterFn:CustomKonvaFilters.Helena},{label:\"Ashby\",filterFn:CustomKonvaFilters.Ashby},{label:\"Charmes\",filterFn:CustomKonvaFilters.Charmes}];","import _slicedToArray from\"@babel/runtime/helpers/slicedToArray\";import React from\"react\";import{useFilter,useStore}from\"../../../hooks\";import Carousel from\"../../common/Carousel\";import FilterItem from\"./FilterItem\";import{AVAILABLE_FILTERS}from\"./Filters.constants\";var style={maxWidth:\"100%\",width:\"100%\"},Filters=function(){var a=useStore(),b=a.originalImage,c=useFilter(),d=_slicedToArray(c,2),e=d[0],f=d[1];return React.createElement(Carousel,{className:\"FIE_filters\",style:style},AVAILABLE_FILTERS.map(function(a){return React.createElement(FilterItem,{key:a.label,filterLabel:a.label,filterFn:a.filterFn,applyFilter:f,isActive:e===a.filterFn,image:b})}))};export default Filters;","import React from\"react\";import{Text as TextIcon}from\"@scaleflex/icons/text\";import ToolsBarItemButton from\"../../ToolsBar/ToolsBarItemButton\";import{TOOLS_IDS}from\"../../../utils/constants\";var TextButton=function(a){var b=a.selectTool,c=a.isSelected,d=a.t;return React.createElement(ToolsBarItemButton,{className:\"FIE_text-tool-button\",id:TOOLS_IDS.TEXT,label:d(\"textTool\"),Icon:TextIcon,onClick:b,isSelected:c})};TextButton.defaultProps={isSelected:!1};export default TextButton;","import styled from\"styled-components\";import Label from\"@scaleflex/ui/core/label\";import{Color as PC}from\"@scaleflex/ui/utils/types/palette\";var StyledOptions=styled.div.withConfig({componentId:\"sc-qvjmv1-0\"})([\"display:flex;align-items:center;justify-content:center;padding:8px 16px;margin-top:4px;gap:8px;flex-wrap:wrap;\",\" svg{color:\",\";}\"],function(a){var b=a.isPhoneScreen;return b&&\"\\n max-width: 315px;\\n padding: 0;\\n \"},function(a){var b=a.theme.palette;return b[PC.IconsPrimary]}),StyledOptionsWrapper=styled.div.withConfig({componentId:\"sc-qvjmv1-1\"})([\"display:flex;flex-wrap:wrap;margin-left:-4px;gap:4px;.FIE_annotation-option-triggerer{padding:6px;}\"]),StyledOptionPopupContent=styled.div.withConfig({componentId:\"sc-qvjmv1-2\"})([\"background:\",\";border-radius:4px;display:flex;flex-direction:column;padding:8px 12px;overflow:visible;\",\" \",\" *{font-family:'Roboto',sans-serif;}\"],function(a){var b=a.theme;return b.palette[\"bg-secondary\"]},function(a){var b=a.position;return b&&\"\\n display: grid;\\n grid-template-columns: repeat(4, auto);\\n padding: 0;\\n margin-top: 8px;\\n box-shadow: 0px 1px 2px \".concat(function(a){var b=a.theme;return b.palette[\"light-shadow\"]},\";\\n \")},function(a){var b=a.disablePadding;return b&&\"\\n padding: 0;\\n \"}),StyledSpacedOptionFields=styled.div.withConfig({componentId:\"sc-qvjmv1-3\"})([\"display:flex;align-items:center;gap:8px;\",\"\"],function(a){var b=a.preventFlex;return b&&\"\\n display: block;\\n \\n label {\\n margin-bottom: 8px;\\n }\\n \"}),StyledTwoColumnsContainer=styled.div.withConfig({componentId:\"sc-qvjmv1-4\"})([\"display:flex;align-items:center;justify-content:space-between;\"]),StyledColumn=styled.div.withConfig({componentId:\"sc-qvjmv1-5\"})([\"&:not(:first-child){margin-left:12px;}\"]),StyledIconWrapper=styled.div.withConfig({componentId:\"sc-qvjmv1-6\"})(function(a){var b=a.theme,c=a.addThinBorder,d=a.secondaryIconColor,e=a.active,f=a.watermarkTool;return\"\\n cursor: pointer;\\n padding: \".concat(f?\"6px\":\"8px 12px\",\";\\n border-radius: 2px;\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n gap: 6px;\\n\\n svg {\\n vertical-align: middle;\\n margin: 0 auto;\\n }\\n\\n \").concat(c?\"border: 0.5px solid \".concat(b.palette[\"borders-secondary\"],\";\\n padding: 8px 8px;\"):\"\",\";\\n color: \").concat(d?b.palette[PC.IconsSecondary]:\"\",\";\\n\\n \").concat(e&&\"\\n border-radius: 4px;\\n border-color: \".concat(b.palette[PC.AccentStateless],\";\\n background-color: \").concat(b.palette[PC.BackgroundActive],\";\\n\\n * {\\n color: \").concat(b.palette[PC.AccentStateless],\";\\n }\\n \"),\"\\n\\n :hover {\\n background: \").concat(b.palette[\"bg-primary-active\"],\";\\n }\\n \")}),StyledIconLabel=styled(Label).withConfig({componentId:\"sc-qvjmv1-7\"})([\"color:\",\";\"],function(a){var b=a.theme.palette;return b[PC.TextPrimary]});export{StyledTwoColumnsContainer,StyledColumn,StyledIconWrapper,StyledSpacedOptionFields,StyledOptions,StyledOptionsWrapper,StyledOptionPopupContent,StyledIconLabel};","import React from\"react\";import restrictNumber from\"../../../utils/restrictNumber\";import{Label}from\"@scaleflex/ui/core\";import{StyledSpacedOptionFields,StyledIconLabel,StyledOptionPopupContent}from\"./AnnotationOptions.styled\";import Slider from\"../Slider\";var MIN_PERCENTANGE=0,MAX_PERCENTANGE=1,OpacityField=function(a){var b=a.annotation,c=a.updateAnnotation,d=a.t,e=b.opacity,f=Math.round(100*e);return React.createElement(StyledOptionPopupContent,{disablePadding:!0},React.createElement(Label,null,d(\"transparency\")),React.createElement(StyledSpacedOptionFields,null,React.createElement(Slider,{annotation:\"%\",onChange:function changeOpacity(a){c({opacity:restrictNumber(a/100,MIN_PERCENTANGE,MAX_PERCENTANGE)})},value:f,noMargin:!0}),React.createElement(StyledIconLabel,null,\"\".concat(f,\"%\"))))};export default OpacityField;","import{Modal,ModalActions as SfxModalActions}from\"@scaleflex/ui/core\";import styled from\"styled-components\";import{Color as PC}from\"@scaleflex/ui/utils/types/palette\";var ColorPickerModal=styled(Modal).withConfig({componentId:\"sc-7tf41j-0\"})([\"max-width:350px;\"]),ColorPickerWrap=styled.div.withConfig({componentId:\"sc-7tf41j-1\"})([\".SfxColorPicker-root{max-width:100%;padding:0;box-shadow:none;border:none;\",\"}.SfxColorPicker-action{display:flex;gap:12px;.SfxColorPicker-select{width:100px;}.SfxInput-root{width:190px !important;}}.SfxColorPicker-icon{color:\",\";}.SfxColorPicker-range-picker,.SfxColorPicker-bar-wrapper{width:100%;}\"],function(a){var b=a.hideModalTitle;return b&&\"padding-top: 12px;\"},function(a){var b=a.theme.palette;return b[PC.IconsPrimary]}),ModalActions=styled(SfxModalActions).withConfig({componentId:\"sc-7tf41j-2\"})([\"gap:12px;padding:24px;.SfxButton-root{flex:1;margin:0;height:40px;}\"]),Styled={ColorPickerModal:ColorPickerModal,ColorPickerWrap:ColorPickerWrap,ModalActions:ModalActions};export default Styled;","import React from\"react\";import{Button,ColorPicker,ModalContent,ModalTitle}from\"@scaleflex/ui/core\";import ColorPickerIcon from\"@scaleflex/icons/color-picker\";import{useStore}from\"../../../hooks\";import Styled from\"./ColorPickerModal.styled\";var modalStyles={zIndex:1301},ColorPickerModal=function(a){var b=a.hideModalTitle,c=a.defaultColor,d=void 0===c?\"\":c,e=a.onChange,f=a.open,g=a.pinnedColors,h=a.onClose,i=useStore(),j=i.t;return f?React.createElement(Styled.ColorPickerModal,{onClose:h,open:f,fullWidth:!0,modalStyles:modalStyles},!b&&React.createElement(ModalTitle,{onClose:h,primary:j(\"colorPickerModalTitleLabel\",\"Pick color\"),icon:React.createElement(ColorPickerIcon,{size:29}),iconShadow:!0,variant:\"with-icon\"}),React.createElement(ModalContent,null,React.createElement(Styled.ColorPickerWrap,{hideModalTitle:b},React.createElement(ColorPicker,{onChange:e,pinnedColors:g,defaultColor:d,showTransparentColor:!0}))),React.createElement(Styled.ModalActions,null,React.createElement(Button,{color:\"basic\",onClick:h},j(\"cancel\")),React.createElement(Button,{color:\"primary\",onClick:h},j(\"apply\")))):null};ColorPickerModal.defaultProps={defaultColor:\"\",pinnedColors:[],onChange:function onChange(){},open:!1,hideModalTitle:!1,onClose:function onClose(){}};export default ColorPickerModal;","import styled from\"styled-components\";import{Color as PC}from\"@scaleflex/ui/utils/types/palette\";var StyledPickerTrigger=styled.div.attrs(function(a){var b=a.$color;return{style:{background:\"rgba(0,0,0,0)\"===b?\"repeating-conic-gradient(#5d6d7e 0% 25%, transparent 0% 50%) 50% / 8px 8px\":b}}}).withConfig({componentId:\"sc-zmv0gj-0\"})([\"background:\",\";border-radius:4px;width:32px;height:32px;border:1px solid \",\";cursor:pointer;box-sizing:border-box;\"],function(a){var b=a.theme;return b.palette[\"icons-primary\"]},function(a){var b=a.theme;return b.palette[PC.BorderPrimaryStateless]});export{StyledPickerTrigger};","import _defineProperty from\"@babel/runtime/helpers/defineProperty\";import _slicedToArray from\"@babel/runtime/helpers/slicedToArray\";import React,{useEffect,useState}from\"react\";import{useStore}from\"../../../hooks\";import{SET_LATEST_COLOR}from\"../../../actions\";import ColorPickerModal from\"../ColorPickerModal\";import{StyledPickerTrigger}from\"./ColorInput.styled\";var pinnedColorsKey=\"FIE_pinnedColors\",ColorInput=function(a){var b,c=a.onChange,d=a.color,e=a.colorFor,f=useStore(),g=f.selectionsIds,h=void 0===g?[]:g,i=f.config.annotationsCommon,j=void 0===i?{}:i,k=f.dispatch,l=f.latestColors,m=void 0===l?{}:l,n=m[e],o=useState(),p=_slicedToArray(o,2),q=p[0],r=p[1],s=useState(function(){return n||d||j.fill}),t=_slicedToArray(s,2),u=t[0],v=t[1],w=useState(null!==(b=window)&&void 0!==b&&b.localStorage?JSON.parse(localStorage.getItem(pinnedColorsKey)||\"[]\"):[]),x=_slicedToArray(w,2),y=x[0],z=x[1],A=function(a){var b;if(null!==(b=window)&&void 0!==b&&b.localStorage){var c=window.localStorage.getItem(pinnedColorsKey);if(JSON.stringify(a)!==c){var d=a.slice(-9);window.localStorage.setItem(pinnedColorsKey,JSON.stringify(d)),z(d)}}},B=function(a){r(q?null:a.currentTarget)};return useEffect(function(){var a=0===h.length&&n||d;v(a),c(a)},[d,h]),React.createElement(React.Fragment,null,React.createElement(StyledPickerTrigger,{className:\"FIE_color-picker-triggerer\",onClick:B,$color:u,onChange:c}),React.createElement(ColorPickerModal,{hideModalTitle:!0,onChange:function changeColor(a,b,d){v(b),c(b),A(d),n!==b&&k({type:SET_LATEST_COLOR,payload:{latestColors:_defineProperty({},e,b)}})},defaultColor:u,pinnedColors:y,open:!!q,onClose:B}))};ColorInput.defaultProps={color:void 0};export default ColorInput;","import React from\"react\";import restrictNumber from\"../../../utils/restrictNumber\";import ColorInput from\"../ColorInput\";import{StyledSpacedOptionFields}from\"./AnnotationOptions.styled\";import Slider from\"../Slider\";var MIN_PERCENTANGE=0,MAX_PERCENTANGE=100,StrokeFields=function(a){var b=a.annotation,c=a.updateAnnotation,d=b.stroke,e=b.strokeWidth;return React.createElement(StyledSpacedOptionFields,null,React.createElement(Slider,{annotation:\"px\",onChange:function changeStrokeWidth(a){c({strokeWidth:restrictNumber(a,MIN_PERCENTANGE,MAX_PERCENTANGE)})},value:e,noMargin:!0}),React.createElement(ColorInput,{color:d,onChange:function changeStrokeColor(a){c({stroke:a})},colorFor:\"stroke\"}))};export default StrokeFields;","import _defineProperty from\"@babel/runtime/helpers/defineProperty\";import React from\"react\";import Label from\"@scaleflex/ui/core/label\";import restrictNumber from\"../../../utils/restrictNumber\";import ColorInput from\"../ColorInput\";import{StyledTwoColumnsContainer,StyledColumn,StyledSpacedOptionFields}from\"./AnnotationOptions.styled\";import Slider from\"../Slider\";var ShadowFields=function(a){var b=a.annotation,c=a.updateAnnotation,d=a.t,e=b.shadowOffsetX,f=b.shadowOffsetY,g=b.shadowBlur,h=b.shadowColor,i=b.shadowOpacity,j=function(a,b){var d=2parseFloat(g))){var l=Math.min(10*i.width,10*i.height),n=getSizeAfterRotation(i.width,i.height,o),p=_defineProperty({},f,g?restrictNumber(g,0,l):g),q=\"height\"===f,r=q?\"width\":\"height\",s=null!==(d=c.ratioUnlocked)&&void 0!==d?d:j.ratioUnlocked;if(!s){var t=n.width/n.height;p[r]=q?Math.round(p[f]*t):Math.round(p[f]/t)}if(p[f]!==j[f]||p[r]!==j[r]){if(\"function\"==typeof b)return void b(p);h({type:SET_RESIZE,payload:p});var u=m.width&&m.height&&m||k,v=_objectSpread(_objectSpread({},j),p);h({type:ZOOM_CANVAS,payload:{factor:v.width&&v.height?getZoomFitFactor(u,v):DEFAULT_ZOOM_FACTOR,isAbsoluteZoom:!0}})}}},s=\"undefined\"==typeof j.width&&\"undefined\"==typeof j.height||i.width===j.width&&i.height===j.height,t=getProperDimensions((c.width||c.height)&&c||j,m,k,i,o),u=j.manualChangeDisabled,v=\"undefined\"!=typeof j.width&&!j.width,w=\"undefined\"!=typeof j.height&&!j.height;return React.createElement(StyledResizeWrapper,{className:\"FIE_resize-tool-options\",alignment:e,disableWrap:f},React.createElement(StyledResizeInput,{className:\"FIE_resize-width-option\",value:v?\"\":t.width,name:\"width\",onChange:u?void 0:r,inputMode:\"numeric\",title:q(\"resizeWidthTitle\"),label:q(\"width\"),inputProps:{type:\"number\"},size:\"sm\",iconEnd:\"px\",placeholder:\"Width\",disableWrap:f,disabled:u}),React.createElement(StyledRatioLockIcon,{className:\"FIE_resize-ratio-locker\",title:q(\"toggleRatioLockTitle\"),onClick:u?void 0:function toggleRatioLock(){return\"function\"==typeof b?void b({ratioUnlocked:!c.ratioUnlocked}):void h({type:SET_RESIZE,payload:{ratioUnlocked:!j.ratioUnlocked}})},color:\"basic\",size:\"sm\",disabled:u},c.ratioUnlocked||j.ratioUnlocked?React.createElement(UnlockOutline,{size:16,color:p.palette.success}):React.createElement(LockOutline,{size:16,color:p.palette.error})),React.createElement(StyledResizeInput,{className:\"FIE_resize-height-option\",value:w?\"\":t.height,name:\"height\",onChange:u?void 0:r,inputMode:\"numeric\",title:q(\"resizeHeightTitle\"),label:q(\"height\"),inputProps:{type:\"number\"},size:\"sm\",iconEnd:\"px\",placeholder:\"Height\",disableWrap:f,disabled:u}),!d&&React.createElement(StyledResetButton,{className:\"FIE_resize-reset-button\",size:\"sm\",color:\"basic\",onClick:s||u?void 0:function resetResize(){h({type:SET_RESIZE,payload:{width:void 0,height:void 0,ratioUnlocked:!1}});var a=m.width&&m.height&&m||k;h({type:ZOOM_CANVAS,payload:{factor:getZoomFitFactor(a,a)}})},disabled:s||u},React.createElement(Reset,null)))};Resize.defaultProps={onChange:void 0,currentSize:{},hideResetButton:!1,alignment:\"center\",disableWrap:!1};export default Resize;","import styled from\"styled-components\";var StyledWatermarkWrapper=styled.div.withConfig({componentId:\"sc-fvaj5j-0\"})([\"display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;overflow:hidden;\",\";\"],function(a){var b=a.noWrap;return b?\"flex-wrap: nowrap;\":\"\"}),StyledControlsWrapper=styled.div.withConfig({componentId:\"sc-fvaj5j-1\"})([\"margin-bottom:8px;\"]),StyledWatermarkGalleryItem=styled.div.withConfig({componentId:\"sc-fvaj5j-2\"})(function(a){var b=a.theme;return\"\\n padding: 6px 4px;\\n border: 1px solid \".concat(b.palette[\"borders-secondary\"],\";\\n width: fit-content;\\n height: 32px;\\n border-radius: 2px;\\n overflow: hidden;\\n cursor: pointer;\\n border-radius: 4px;\\n\\n :hover {\\n background: \").concat(b.palette[\"bg-primary-active\"],\";\\n }\\n\\n &[aria-selected='true'] {\\n background: \").concat(b.palette[\"bg-primary-active\"],\";\\n border-color: \").concat(b.palette[\"accent-primary-active\"],\";\\n }\\n\\n img {\\n max-width: 100%;\\n max-height: 100%;\\n }\\n \")});export{StyledWatermarkWrapper,StyledControlsWrapper,StyledWatermarkGalleryItem};","import React,{useMemo}from\"react\";import{useStore}from\"../../../hooks\";import{TOOLS_IDS,WATERMARK_ANNOTATION_ID}from\"../../../utils/constants\";import Carousel from\"../../common/Carousel\";import{SET_FEEDBACK}from\"../../../actions\";import{StyledWatermarkGalleryItem}from\"./Watermark.styled\";var WatermarksGallery=function(a){var b=a.addImgWatermark,c=a.loadAndSetWatermarkImg,d=a.style,e=useStore(),f=e.config,g=e.annotations,h=e.dispatch,i=e.t,j=useMemo(function(){var a;return null===(a=(g[WATERMARK_ANNOTATION_ID]||{}).image)||void 0===a?void 0:a.src},[g[WATERMARK_ANNOTATION_ID]]),k=function(a){var c=a.currentTarget.children[0];if(c.complete){if(!c.naturalWidth)return void h({type:SET_FEEDBACK,payload:{feedback:{message:i(\"mutualizedFailedToLoadImg\"),duration:2e3}}});b(c)}},l=f[TOOLS_IDS.WATERMARK]||{},m=l.gallery,n=void 0===m?[]:m;return 0===n.length?null:React.createElement(Carousel,{className:\"FIE_watermark-gallery\",style:d},n.map(function(a){var b=(null===a||void 0===a?void 0:a.url)||a,d=(null===a||void 0===a?void 0:a.previewUrl)||b;return React.createElement(StyledWatermarkGalleryItem,{className:\"FIE_watermark-selected-item\",onClick:function onClick(a){return b===d?k(a):c(b)},key:b,\"aria-selected\":b===j},React.createElement(\"img\",{src:d,alt:\"Failed to load.\",crossOrigin:\"Anonymous\",draggable:!1}))}))};WatermarksGallery.defaultProps={style:void 0};export default WatermarksGallery;","import _slicedToArray from\"@babel/runtime/helpers/slicedToArray\";import React,{useState}from\"react\";import Menu from\"@scaleflex/ui/core/menu\";import Padding from\"@scaleflex/icons/padding\";import restrictNumber from\"../../../utils/restrictNumber\";import{StyledSpacedOptionFields,StyledIconWrapper,StyledOptionPopupContent,StyledIconLabel}from\"../../common/AnnotationOptions/AnnotationOptions.styled\";import Slider from\"../../common/Slider\";import{Label}from\"@scaleflex/ui/core\";var WatermarkPadding=function(a){var b=a.watermark,c=a.saveWatermark,d=a.t,e=useState(null),f=_slicedToArray(e,2),g=f[0],h=f[1],i=b.padding||0;return React.createElement(React.Fragment,null,React.createElement(StyledIconWrapper,{className:\"FIE_watermark-padding-triggerer\",title:d(\"padding\"),onClick:function openOptionPopup(a){h(a.currentTarget)},active:g},React.createElement(Padding,{size:20})),React.createElement(Menu,{className:\"FIE_watermark-padding-popup\",anchorEl:g,open:!!g,onClose:function closeOptionPopup(){h(null)},position:\"top\"},React.createElement(StyledOptionPopupContent,null,React.createElement(Label,null,d(\"padding\")),React.createElement(StyledSpacedOptionFields,null,React.createElement(Slider,{annotation:\"px\",onChange:function updatePadding(a){c({padding:restrictNumber(a,0,100)})},value:i,noMargin:!0}),React.createElement(StyledIconLabel,null,\"\".concat(i,\"px\"))))))};export default WatermarkPadding;","import _defineProperty from\"@babel/runtime/helpers/defineProperty\";import _slicedToArray from\"@babel/runtime/helpers/slicedToArray\";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;cr){var d=s*w/a.height;c.height=a.height*d,c.width=c.height*b}else{var g=r*w/a.width;c.width=a.width*g,c.height=c.width/b}var h=_objectSpread(_objectSpread(_objectSpread(_objectSpread({},e.annotationsCommon),e[TOOLS_IDS.IMAGE]),c),{},{padding:1,image:a,x:t+r/2-c.width/2,y:u+s/2-c.height/2,id:WATERMARK_ANNOTATION_ID,name:TOOLS_IDS.IMAGE,replaceCurrent:!0});f({type:SET_ANNOTATION,payload:h})},y=function(a){f({type:SET_ANNOTATION,payload:_objectSpread(_objectSpread({},\"function\"==typeof a?a(q):a),{},{id:WATERMARK_ANNOTATION_ID})})},z=function(a){f({type:SET_FEEDBACK,payload:{feedback:{message:a,status:FEEDBACK_STATUSES.WARNING}}})},A=function(a,b){if(a){n(!0);var c=new Image;c.onload=function(){x(c),b&&URL.revokeObjectURL(a),n(!1)},c.onerror=function(){z(g(\"mutualizedFailedToLoadImg\")),b&&URL.revokeObjectURL(a),n(!1)},c.src=a}};useEffect(function(){q&&(f({type:CLEAR_ANNOTATIONS_SELECTIONS}),f({type:SELECT_ANNOTATION,payload:{annotationId:\"watermark\"}}))},[q]),useEffect(function(){q&&(0===d.length||d[0].id!==WATERMARK_ANNOTATION_ID)&&f({type:SELECT_ANNOTATION,payload:{annotationId:\"watermark\"}})},[d]);var B=[(!e.useCloudimage||\"function\"==typeof p.onUploadWatermarkImgClick)&&{key:\"upload-watermark\",label:g(\"uploadWatermark\"),icon:UploadOutline,onClick:function handleUploadWatermarkClick(){if(\"function\"==typeof p.onUploadWatermarkImgClick){var a=p.onUploadWatermarkImgClick(A);return void(a instanceof Promise&&a.then(function(){var a=0b.factor,f={x:(a.x-b.x||0)/b.factor,y:(a.y-b.y||0)/b.factor},g={x:a.x-f.x*a.factor,y:a.y-f.y*a.factor};if(e&&1===b.factor||(g.x=Math.min(0,Math.max(g.x,c*(1-b.factor))),g.y=Math.min(0,Math.max(g.y,d*(1-b.factor)))),1>a.factor){var h=c-c*a.factor,i=d-d*a.factor;g.x+=h/2,g.y+=i/2}return _objectSpread(_objectSpread({},g),{},{factor:a.factor})};export default calculateZoomData;","import _defineProperty from\"@babel/runtime/helpers/defineProperty\";import _objectWithoutProperties from\"@babel/runtime/helpers/objectWithoutProperties\";var _excluded=[\"preparedDimensions\"];function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;cf.x+f.width&&(g.width=f.x+f.width-g.x),g.y+g.height>f.y+f.height&&(g.height=f.y+f.height-g.y),\"number\"==typeof d&&!compareRatios(g.width/g.height,d)){var h=g.height*d,i=g.width/d;toPrecisedFloat(g.y+i)<=f.y+f.height?g.height=i:g.width=h}if((e.minWidth&&g.width<=e.minWidth||e.maxWidth&&g.width>=e.maxWidth)&&(g.width=restrictNumber(g.width,e.minWidth,e.maxWidth),g.x=a.x,g.y=a.y,\"number\"==typeof d&&(g.height=g.width/d)),(e.minHeight&&b.height<=e.minHeight||e.maxHeight&&b.height>=e.maxHeight)&&(g.height=restrictNumber(g.height,e.minHeight,e.maxHeight),g.x=a.x,g.y=a.y,\"number\"==typeof d&&(g.width=g.height*d)),\"string\"==typeof e.lockCropAreaAt){var j=getPositionByPlaceLabel(e.lockCropAreaAt,f,g),k=j.x,l=j.y;g.x=k,g.y=l}return g};","import _extends from\"@babel/runtime/helpers/extends\";import _defineProperty from\"@babel/runtime/helpers/defineProperty\";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c=n.width&&j.height>=n.height;n.width&&n.height&&(df.scaledBy?f.scaledBy:1,J=_objectSpread(_objectSpread({},f),{},{width:f.width/I,height:f.height/I});F=boundResizing(J,_objectSpread(_objectSpread({},J),{},{x:0,y:0}),_objectSpread(_objectSpread({},J),{},{abstractX:0,abstractY:0}),!(A||B)&&C(),v)}else F=j;var K=F,L=K.x,M=void 0===L?0:L,x=K.y,N=void 0===x?0:x,y=K.width,O=K.height,P={x:k?f.width-M-y:M,y:l?f.height-N-O:N,ref:q,fill:\"#FFFFFF\",scaleX:1,scaleY:1,globalCompositeOperation:\"destination-out\",onDragEnd:w?void 0:H,onDragMove:w?void 0:function limitDragging(a){var b=a.target;b.setAttrs(boundDragging(b.attrs,t.current))},onTransformEnd:w?void 0:H,draggable:!w};return React.createElement(React.Fragment,null,React.createElement(Image,{image:e,x:k?f.width:0,y:l?f.height:0,width:f.width,height:f.height,filters:[Konva.Filters.Blur,Konva.Filters.Brighten],blurRadius:10,brightness:-.3,scaleX:k?-1:1,scaleY:l?-1:1,ref:s}),B?React.createElement(Ellipse,_extends({},P,{radiusX:y/2,radiusY:O/2,offset:{x:-y/2,y:-O/2}})):React.createElement(Rect,_extends({},P,{width:j.noEffect?0:y,height:j.noEffect?0:O})),j.noEffect&&React.createElement(TextNode,{name:\"Text\",id:\"no-preview-text-node\",text:p(\"cropItemNoEffect\"),x:f.width/2-noEffectTextDimensions.width/2,y:f.height/2-noEffectTextDimensions.height/2,fontSize:20,fill:\"#ffffff\",stroke:\"#ff0000\",strokeWidth:.2,shadowColor:\"#ff0000\",shadowBlur:10,annotationEvents:{},align:\"center\",width:noEffectTextDimensions.width,height:noEffectTextDimensions.height}),React.createElement(Transformer,{centeredScaling:!1,flipEnabled:!1,rotateEnabled:!1,nodes:q.current?[q.current]:[],anchorSize:14,anchorCornerRadius:7,enabledAnchors:G,ignoreStroke:!1,anchorStroke:c.palette[\"accent-primary\"],anchorFill:c.palette[\"access-primary\"],anchorStrokeWidth:2,borderStroke:c.palette[\"accent-primary\"],borderStrokeWidth:2,borderDash:[4],keepRatio:!A||!B,ref:r,boundBoxFunc:function boundBoxFunc(a,b){return boundResizing(a,b,t.current,!(A||B)&&C(),v)}}))};export default CropTransformer;","import React,{useMemo}from\"react\";import{Transformer}from\"react-konva\";import{NODES_TRANSFORMER_ID,POINTER_ICONS,TOOLS_IDS}from\"../../../utils/constants\";import{useStore}from\"../../../hooks\";import{CHANGE_POINTER_ICON,ENABLE_TEXT_CONTENT_EDIT}from\"../../../actions\";var NodesTransformer=function(){var a,b=useStore(),c=b.selectionsIds,d=void 0===c?[]:c,e=b.theme,f=b.designLayer,g=b.dispatch,h=b.config.useCloudimage,i=useMemo(function(){return null!==f&&void 0!==f&&f.findOne?d.map(function(a){return f.findOne(\"#\".concat(a))}).filter(Boolean):[]},[d]),j=function(){1===i.length&&i[0].name()===TOOLS_IDS.TEXT&&g({type:ENABLE_TEXT_CONTENT_EDIT,payload:{textIdOfEditableContent:i[0].id()}})},k=h?[\"top-left\",\"bottom-left\",\"top-right\",\"bottom-right\"]:void 0;return React.createElement(Transformer,{id:NODES_TRANSFORMER_ID,centeredScaling:!1,rotationSnaps:[0,45,90,135,180,225,270,315],nodes:i,rotateAnchorOffset:30,anchorSize:14,anchorCornerRadius:7,padding:1===i.length?null!==(a=i[0].attrs.padding)&&void 0!==a?a:1:1,ignoreStroke:!1,anchorStroke:e.palette[\"accent-primary\"],anchorFill:e.palette[\"access-primary\"],anchorStrokeWidth:2,borderStroke:e.palette[\"accent-primary\"],borderStrokeWidth:2,borderDash:[4],rotateEnabled:!h,onMouseOver:function changePointerIconToMove(){g({type:CHANGE_POINTER_ICON,payload:{pointerCssIcon:POINTER_ICONS.MOVE}})},onMouseLeave:function changePointerIconToDraw(){g({type:CHANGE_POINTER_ICON,payload:{pointerCssIcon:POINTER_ICONS.DRAW}})},onDblClick:j,onDblTap:j,enabledAnchors:k,flipEnabled:!h,shouldOverdrawWholeArea:!0})};export default NodesTransformer;","import React from\"react\";import{Layer}from\"react-konva\";import{useStore}from\"../../../hooks\";import{TOOLS_IDS,TRANSFORMERS_LAYER_ID}from\"../../../utils/constants\";import CropTransformer from\"./CropTransformer\";import NodesTransformer from\"./NodesTransformer\";var TransformersLayer=function(){var a=useStore(),b=a.toolId,c=a.shownImageDimensions;return React.createElement(Layer,{id:TRANSFORMERS_LAYER_ID,x:c.abstractX||0,y:c.abstractY||0},React.createElement(NodesTransformer,null),b===TOOLS_IDS.CROP&&React.createElement(CropTransformer,null))};export default TransformersLayer;","import styled from\"styled-components\";var StyledNodeControls=styled.div.withConfig({componentId:\"sc-1tst9ex-0\"})(function(a){var b=a.theme,c=a.top,d=a.left;return\"\\n position: absolute;\\n z-index: 1;\\n background: \".concat(b.palette[\"bg-secondary\"],\";\\n border-radius: 2px;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n box-shadow: 0px 1px 2px \").concat(b.palette[\"light-shadow\"],\";\\n top: \").concat((c||0)+8,\"px;\\n left: \").concat((d||0)+4,\"px;\\n transform: translateX(-50%);\\n height: 32px;\\n\")});export{StyledNodeControls};","import _slicedToArray from\"@babel/runtime/helpers/slicedToArray\";import React,{useEffect,useMemo,useState}from\"react\";import IconButton from\"@scaleflex/ui/core/icon-button\";import DeleteOutline from\"@scaleflex/icons/delete-outline\";import Duplicate from\"@scaleflex/icons/duplicate\";import{useStore}from\"../../hooks\";import{DUPLICATE_ANNOTATIONS,REMOVE_ANNOTATIONS}from\"../../actions\";import{NODES_TRANSFORMER_ID,WATERMARK_ANNOTATION_ID}from\"../../utils/constants\";import debounce from\"../../utils/debounce\";import{StyledNodeControls}from\"./NodeControls.styled\";var NodeControls=function(){var a=useStore(),b=a.selectionsIds,c=void 0===b?[]:b,d=a.designLayer,e=a.annotations,f=a.dispatch,g=useState({left:0,top:0}),h=_slicedToArray(g,2),i=h[0],j=h[1],k=useMemo(function(){var a;return null===d||void 0===d||null===(a=d.getStage())||void 0===a?void 0:a.findOne(\"#\".concat(NODES_TRANSFORMER_ID))},[d]),l=c.length,m=debounce(function(){k&&j({left:(k.x()+k.width()/2)*k.scaleX(),top:(k.y()+k.height())*k.scaleY()})},0);if(useEffect(function(){m()},[c,k,e]),0===l||!k)return null;return React.createElement(StyledNodeControls,{className:\"FIE_annotation-controls-overlay\",left:i.left,top:i.top},c[0]!==WATERMARK_ANNOTATION_ID&&React.createElement(IconButton,{color:\"basic\",size:\"sm\",onClick:function duplicateSelectedNodes(){f({type:DUPLICATE_ANNOTATIONS,payload:{annotationsIds:c}})}},React.createElement(Duplicate,null)),React.createElement(IconButton,{color:\"basic\",size:\"sm\",onClick:function removeSelectedNodes(){f({type:REMOVE_ANNOTATIONS,payload:{annotationsIds:c}})}},React.createElement(DeleteOutline,null)))};export default NodeControls;","import _defineProperty from\"@babel/runtime/helpers/defineProperty\";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;ct),w=_slicedToArray(v,2),x=w[0],y=w[1],z=useMemo(function(){return{cursor:g===POINTER_ICONS.DEFAULT&&h===TABS_IDS.ANNOTATE?POINTER_ICONS.DRAW:g}},[h,g]),A=function(a){f({type:ZOOM_CANVAS,payload:a})},B=useCallback(function(a){var b,c;a.evt.preventDefault(),null===(b=(c=a.currentTarget).container)||void 0===b||b.call(c).focus(),a.target instanceof Konva.Stage&&0t&&u&&(a.preventDefault(),y(!0),f({type:CHANGE_POINTER_ICON,payload:{pointerCssIcon:POINTER_ICONS.DRAG}}))},E=function(a){\"Space\"===a.code&&(a.preventDefault(),C())},F=function(){c.current&&c.current.container().focus()};useEffect(function(){f({type:CHANGE_POINTER_ICON,payload:{pointerCssIcon:POINTER_ICONS[x?\"DRAG\":\"DEFAULT\"]}})},[x]),useEffect(function(){y(h!==TABS_IDS.ANNOTATE&&h!==TABS_IDS.WATERMARK&&p.factor>t);var a;return c.current&&(a=c.current.container(),a.addEventListener(\"mouseenter\",F),a.addEventListener(\"keydown\",D),a.addEventListener(\"keyup\",E)),function(){a&&(a.removeEventListener(\"mouseenter\",F),a.removeEventListener(\"keydown\",D),a.removeEventListener(\"keyup\",E))}},[h,p.factor,t]);var G=l*(u&&p.factor||t);return React.createElement(StyledCanvasNode,{className:\"FIE_canvas-node\",tabIndex:-1,ref:c,width:j,height:k,scaleX:G,scaleY:G,x:u&&p.x||null,y:u&&p.y||null,zoomFactor:u&&p.factor||t,onWheel:u?function handleZoom(a){a.evt.preventDefault();var b=(p.factor||t)+a.evt.deltaY*-ZOOM_DELTA_TO_SCALE_CONVERT_FACTOR,c=a.currentTarget.getPointerPosition();A(_objectSpread(_objectSpread({},c),{},{factor:b}))}:void 0,onTap:B,onClick:B,onTouchMove:u?function(a){return zoomOnTouchesMove(a,A)}:void 0,onDragStart:function preventDraggingIfMultiTouches(a){var b;1<(null===(b=a.evt.touches)||void 0===b?void 0:b.length)&&y(!1)},onTouchEnd:u?function endTouchesZoomingEnablePanning(){endTouchesZooming(C)}:void 0,dragBoundFunc:function dragBoundFunc(a){var b=Math.min(0,Math.max(a.x,j*(1-p.factor))),c=Math.min(0,Math.max(a.y,k*(1-p.factor)));return{x:b,y:c}},draggable:u&&x,onDragEnd:function handleCanvasDragEnd(a){a.currentTarget.draggable()&&\"stage\"===a.target.nodeType.toLowerCase()&&u&&x&&A({factor:p.factor,x:a.target.x(),y:a.target.y(),preparedDimensions:!0})},style:z},b)};export default memo(CanvasNode);","import _slicedToArray from\"@babel/runtime/helpers/slicedToArray\";import React,{useCallback,useEffect,useRef}from\"react\";import{DesignLayer,TransformersLayer}from\"../Layers\";import{AppProviderOverridenValue}from\"../../context\";import{SET_CANVAS_SIZE}from\"../../actions\";import{useResizeObserver,useStore}from\"../../hooks\";import NodeControls from\"../NodeControls\";import CanvasNode from\"./CanvasNode\";import{CanvasContainer,StyledOrignalImage}from\"./MainCanvas.styled\";var MainCanvas=function(){var a=useResizeObserver(),b=_slicedToArray(a,1),c=b[0],d=useStore(),e=useRef(null),f=useCallback(function(a){var b=a.width,c=a.height;d.dispatch({type:SET_CANVAS_SIZE,payload:{canvasWidth:b,canvasHeight:c}})},[]);return useEffect(function(){c(e.current,f)},[]),React.createElement(CanvasContainer,{className:\"FIE_canvas-container\",ref:e},!d.textIdOfEditableContent&&React.createElement(NodeControls,null),d.isShowOriginalImage&&React.createElement(StyledOrignalImage,{className:\"FIE_original-image-compare\",src:d.originalImage.src}),React.createElement(CanvasNode,null,React.createElement(AppProviderOverridenValue,{overridingValue:d},React.createElement(DesignLayer,null),React.createElement(TransformersLayer,null))))};export default MainCanvas;","import styled from\"styled-components\";import{Color as PC}from\"@scaleflex/ui/utils/types/palette\";var StyledSeparator=styled.div.withConfig({componentId:\"sc-etsyb6-0\"})([\"display:inline-block;height:\",\";width:\",\";border-radius:1px;background:\",\";\"],function(a){return a.height},function(a){return a.width},function(a){var b=a.theme.palette;return b[PC.BordersSecondary]});export{StyledSeparator};","import React from\"react\";import{StyledSeparator}from\"./Separator.styled\";var Separator=function(a){var b=a.height,c=a.width;return React.createElement(StyledSeparator,{height:b,width:c})};Separator.defaultProps={height:\"24px\",width:\"1px\"};export default Separator;","import styled from\"styled-components\";import Button from\"@scaleflex/ui/core/button\";import IconButton from\"@scaleflex/ui/core/icon-button\";import Label from\"@scaleflex/ui/core/label\";import{CrossButton,InputGroup,SelectGroup}from\"@scaleflex/ui/core\";import{Color as PC}from\"@scaleflex/ui/utils/types/palette\";import{FontVariant as FV}from\"@scaleflex/ui/utils/types/typography\";var StyledTopbar=styled.div.withConfig({componentId:\"sc-21g986-0\"})([\"padding:16px;box-sizing:border-box;position:relative;width:100%;display:flex;flex-wrap:wrap;gap:16px;align-items:center;justify-content:space-between;border-bottom:1px solid \",\";[data-phone='true'] &{padding:6px 6px 4px 6px;\",\"}\"],function(a){var b=a.theme.palette;return b[PC.BordersSecondary]},function(a){var b=a.isPhoneScreen;return b&&\"\\n padding: 12px 12px 0px;\\n gap: 12px;\\n \"}),StyledMainButtonsWrapper=styled.div.withConfig({componentId:\"sc-21g986-1\"})([\"display:flex;align-items:center;order:1;\"]),StyledControlButtonsWrapper=styled.div.withConfig({componentId:\"sc-21g986-2\"})([\"display:flex;align-items:center;order:3;gap:4px;\"]),StyledHistoryButton=styled(IconButton).withConfig({componentId:\"sc-21g986-3\"})([\"margin:\",\";svg{color:\",\";}\"],function(a){var b=a.margin;return null!==b&&void 0!==b?b:\"0 4px\"},function(a){var b=a.theme.palette,c=a.disabled;return c?b[PC.IconsMuted]:b[PC.IconsPrimary]}),StyledZoomingWrapper=styled.div.withConfig({componentId:\"sc-21g986-4\"})([\"display:flex;align-items:center;gap:2px;\"]),StyledDimensionsLabel=styled(Label).withConfig({componentId:\"sc-21g986-5\"})([\"flex-shrink:0;color:\",\";\",\";\"],function(a){var b=a.theme.palette;return b[PC.TextPlaceholder]},function(a){var b=a.theme.typography;return b.font[FV.LabelMedium]}),StyledSmallButton=styled(IconButton).withConfig({componentId:\"sc-21g986-6\"})([\"padding:8px;svg{color:\",\";}\"],function(a){var b=a.theme.palette,c=a.showBackButton;return c?b[PC.IconsPrimary]:b[PC.IconsMuted]}),StyledFlexCenterAlignedContainer=styled.div.withConfig({componentId:\"sc-21g986-7\"})([\"width:\",\";height:32px;display:block;width:100%;order:4;\",\";@media (min-width:761px){display:flex;align-items:center;justify-content:center;width:fit-content;order:2;}\"],function(a){var b=a.showBackButton;return b?\"318px\":\"384px\"},function(a){var b=a.reverseDirection;return b?\"flex-direction: row-reverse\":\"\"}),StyledZoomPercentageLabel=styled(Label).withConfig({componentId:\"sc-21g986-8\"})([\"cursor:pointer;color:\",\";\",\";\"],function(a){var b=a.theme.palette;return b[PC.TextPrimary]},function(a){var b=a.theme.typography;return b.font[FV.InputMd]}),StyledBackButtonLabel=styled.span.withConfig({componentId:\"sc-21g986-9\"})([\"\",\";\"],function(a){var b=a.theme.typography;return b.font[FV.ButtonMdEmphasis]}),StyledCloseButton=styled(CrossButton).withConfig({componentId:\"sc-21g986-10\"})([\"padding:8px;z-index:111;\"]),StyledSaveButton=styled(Button).withConfig({componentId:\"sc-21g986-11\"})([\"padding:4px 12px;\"]),StyledFileNameInput=styled(InputGroup).withConfig({componentId:\"sc-21g986-12\"})([\"\"]),StyledFileExtensionSelect=styled(SelectGroup).withConfig({componentId:\"sc-21g986-13\"})([\"margin-top:16px;\"]),StyledQualityWrapper=styled.div.withConfig({componentId:\"sc-21g986-14\"})([\"width:100%;margin-top:16px;\"]),StyledResizeOnSave=styled.div.withConfig({componentId:\"sc-21g986-15\"})([\"margin-top:16px;width:100%;\"]),StyledResizeOnSaveLabel=styled(Label).withConfig({componentId:\"sc-21g986-16\"})([\"margin-bottom:4px;\"]),StyledHistoryButtons=styled.div.withConfig({componentId:\"sc-21g986-17\"})([\"display:flex;gap:6px;\"]),StyledImageOptionsButtons=styled.div.withConfig({componentId:\"sc-21g986-18\"})([\"display:flex;gap:12px;justify-content:\",\";\"],function(a){var b=a.isPhoneScreen;return b?\"space-between\":\"center\"}),StyledMenuIconButton=styled(IconButton).withConfig({componentId:\"sc-21g986-19\"})([\"@media (min-width:761px){display:none;}\"]),StyledDimensionsButtons=styled.div.withConfig({componentId:\"sc-21g986-20\"})([\"display:flex;gap:12px;align-items:center;\"]);export{StyledTopbar,StyledFlexCenterAlignedContainer,StyledHistoryButton,StyledZoomingWrapper,StyledSmallButton,StyledZoomPercentageLabel,StyledBackButtonLabel,StyledCloseButton,StyledSaveButton,StyledFileNameInput,StyledFileExtensionSelect,StyledQualityWrapper,StyledResizeOnSave,StyledDimensionsLabel,StyledMainButtonsWrapper,StyledControlButtonsWrapper,StyledHistoryButtons,StyledImageOptionsButtons,StyledMenuIconButton,StyledDimensionsButtons,StyledResizeOnSaveLabel};","import styled,{css}from\"styled-components\";import modalTitle from\"@scaleflex/ui/core/modal-title\";import{Modal,ModalActions}from\"@scaleflex/ui/core\";import{Color as PC}from\"@scaleflex/ui/utils/types/palette\";import{FontVariant as FV}from\"@scaleflex/ui/utils/types/typography\";var StyledModal=styled(Modal).withConfig({componentId:\"sc-kpjpf5-0\"})([\"width:\",\";max-width:unset;\"],function(a){var b=a.width;return b||\"300px\"}),StyledModalTitle=styled(modalTitle).withConfig({componentId:\"sc-kpjpf5-1\"})(function(a){var b=a.theme,c=a.isWarning;return css([\"padding-bottom:0;.SfxModalTitle-Icon{background-color:\",\";}.SfxModalTitle-LabelPrimary{margin-bottom:24px;\",\";}.SfxModalTitle-LabelSecondary{\",\";text-align:center;}\"],c&&b.palette[PC.Orange_0_1_Overlay],b.typography.font[FV.TitleH3],b.typography.font[FV.TextLarge])}),StyledModalActions=styled(ModalActions).withConfig({componentId:\"sc-kpjpf5-2\"})([\"gap:12px;padding:24px;.SfxButton-root{flex:1;margin:0;height:40px;}\"]);export{StyledModal,StyledModalTitle,StyledModalActions};","import React from\"react\";import{Button,ModalContent}from\"@scaleflex/ui/core\";import{StyledModal,StyledModalTitle,StyledModalActions}from\"./Modal.styled\";var Modal=function(a){var b=a.title,c=a.hint,d=a.Icon,f=a.onDone,g=a.onCancel,h=a.doneLabel,i=a.cancelLabel,j=a.isOpened,k=a.doneButtonStyle,l=a.doneButtonColor,m=void 0===l?\"basic\":l,n=a.cancelButtonColor,o=void 0===n?\"basic\":n,p=a.children,q=a.areButtonsDisabled,r=a.zIndex,s=a.className,t=a.width,u=a.isWarning;return React.createElement(StyledModal,{className:s,open:j,onClose:g,style:{zIndex:r},onKeyUp:function onKeyUp(a){\"Enter\"===a.key&&f(a)},width:t},React.createElement(StyledModalTitle,{icon:React.createElement(d,{size:25}),iconShadow:!0,isWarning:u,onClose:g,primary:b,secondary:c,variant:\"with-icon\"}),p&&React.createElement(ModalContent,null,p),React.createElement(StyledModalActions,{align:\"center\"},React.createElement(Button,{color:o,onClick:g,size:\"md\",disabled:q},i),React.createElement(Button,{color:m,onClick:f,size:\"md\",warning:u,style:k,disabled:q},h)))};Modal.defaultProps={hint:\"\",isOpened:!1,doneLabel:\"Yes\",cancelLabel:\"No\",doneButtonStyle:void 0,doneButtonColor:\"basic\",cancelButtonColor:\"basic\",children:void 0,areButtonsDisabled:!1,zIndex:void 0,className:void 0,width:\"\",isWarning:!1};export default Modal;","import _slicedToArray from\"@babel/runtime/helpers/slicedToArray\";import React,{useState,useCallback}from\"react\";import{Warning}from\"@scaleflex/icons\";import{useStore}from\"../../hooks\";import{RESET}from\"../../actions\";import Modal from\"../common/Modal\";import{CLOSING_REASONS}from\"../../utils/constants\";var ConfirmationModal=function(a){var b=a.children,c=a.isReset,d=useStore(),e=d.t,f=d.theme,g=d.config,h=d.dispatch,i=d.isResetted,j=d.haveNotSavedChanges,k=d.config.onClose,l=useState(!1),m=_slicedToArray(l,2),n=m[0],o=m[1];if(\"function\"!=typeof k&&!c)return React.createElement(\"span\",null);var p=function(){o(!1)},q=useCallback(function(){h({type:RESET,payload:{config:g}}),p()},[g]),r=function(){c||(k(CLOSING_REASONS.CLOSE_BUTTON,j),q())};return React.createElement(React.Fragment,null,React.cloneElement(b,{onClick:!(void 0!==i)||i?r:function openModal(){o(!0)}}),n&&React.createElement(Modal,{title:c?e(\"warning\"):e(\"discardChanges\"),hint:c?e(\"changesLoseWarningHint\"):e(\"discardChangesWarningHint\"),isOpened:n,onCancel:p,onDone:c?q:r,Icon:function WarningIcon(){return React.createElement(Warning,{color:f.palette.warning,size:25})},doneLabel:e(\"confirm\"),doneButtonColor:\"warning-primary\",cancelLabel:e(\"cancel\"),width:\"400px\",isWarning:!0}))};ConfirmationModal.defaultProps={isReset:!1};export default ConfirmationModal;","import React from\"react\";import CrossOutline from\"@scaleflex/icons/cross-outline\";import{useStore}from\"../../hooks\";import Separator from\"../common/Separator\";import{StyledCloseButton}from\"./Topbar.styled\";import ConfirmationModal from\"./ConfirmationModal\";var CloseButton=function(){var a=useStore(),b=a.config.onClose;return\"function\"==typeof b?React.createElement(React.Fragment,null,React.createElement(Separator,null),React.createElement(ConfirmationModal,null,React.createElement(StyledCloseButton,{className:\"FIE_topbar-close-button\",color:\"basic\",size:\"md\"},React.createElement(CrossOutline,null)))):null};export default CloseButton;","import{DEFAULT_SAVE_QUALITY}from\"./constants\";var getDefaultSaveQuality=function(a){return 0>=a||1 svg:not([color]){color:\",\"}:disabled,[aria-disabled=\\\"true\\\"]{cursor:not-allowed;}&::-webkit-scrollbar{width:4px;height:4px;}&::-webkit-scrollbar-track{background:rgba(203,211,218,0.35);}&::-webkit-scrollbar-thumb{background:rgba(203,211,218,1);border-radius:10px;}}\"],ROOT_CONTAINER_CLASS_NAME,ROOT_CONTAINER_CLASS_NAME,function(a){var b=a.theme;return b.palette[\"icons-primary\"]});export{FontsFaces,OverrideDefaultStyles};","import React,{memo}from\"react\";import ThemeProvider from\"@scaleflex/ui/theme\";import App from\"../App\";import{AppProvider}from\"../../context\";import defaultConfig from\"../../context/defaultConfig\";import deepMerge from\"../../utils/deepMerge\";import{FontsFaces,OverrideDefaultStyles}from\"./globalStyles\";var AssemblyPoint=function(a){var b=a.img,c=a.source,d=a.useCloudimage,e=a.cloudimage;if(b)throw new Error(\"`img` is renamed to `source` please consider renaming it from your configurations.\");if(!c||\"string\"!=typeof c&&!(c instanceof HTMLImageElement))throw new Error(\"`source` property is required either a string of image url or a HTMLImageElement for the image that will be edited.\");if(d){var f,g;if(null!==e&&void 0!==e&&null!==(f=e.imageSealing)&&void 0!==f&&f.enable&&!(null!==e&&void 0!==e&&null!==(g=e.imageSealing)&&void 0!==g&&g.salt))throw new Error(\"`salt` property of imageSealing object is required in cloudimage mode as long as `imageSealing` is enabled.\")}var h=deepMerge(defaultConfig,a);return React.createElement(React.StrictMode,null,React.createElement(ThemeProvider,{theme:h.theme},React.createElement(FontsFaces,null),React.createElement(OverrideDefaultStyles,null),React.createElement(AppProvider,{config:h},React.createElement(App,null))))};AssemblyPoint.defaultProps={useCloudimage:!1,cloudimage:{},img:void 0};export default memo(AssemblyPoint);","import _typeof from\"@babel/runtime/helpers/typeof\";import _classCallCheck from\"@babel/runtime/helpers/classCallCheck\";import _createClass from\"@babel/runtime/helpers/createClass\";import _defineProperty from\"@babel/runtime/helpers/defineProperty\";import _classPrivateFieldGet from\"@babel/runtime/helpers/classPrivateFieldGet\";import _classPrivateFieldSet from\"@babel/runtime/helpers/classPrivateFieldSet\";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c>>1,e=a[d];if(0>>1;dg(C,c))ng(x,C)?(a[d]=x,a[n]=c,d=n):(a[d]=C,a[m]=c,d=m);else if(ng(x,c))a[d]=x,a[n]=c,d=n;else break a}}return b}\nfunction g(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}if(\"object\"===typeof performance&&\"function\"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now()}}else{var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q}}var r=[],t=[],u=1,v=null,y=3,z=!1,A=!1,B=!1,D=\"function\"===typeof setTimeout?setTimeout:null,E=\"function\"===typeof clearTimeout?clearTimeout:null,F=\"undefined\"!==typeof setImmediate?setImmediate:null;\n\"undefined\"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function G(a){for(var b=h(t);null!==b;){if(null===b.callback)k(t);else if(b.startTime<=a)k(t),b.sortIndex=b.expirationTime,f(r,b);else break;b=h(t)}}function H(a){B=!1;G(a);if(!A)if(null!==h(r))A=!0,I(J);else{var b=h(t);null!==b&&K(H,b.startTime-a)}}\nfunction J(a,b){A=!1;B&&(B=!1,E(L),L=-1);z=!0;var c=y;try{G(b);for(v=h(r);null!==v&&(!(v.expirationTime>b)||a&&!M());){var d=v.callback;if(\"function\"===typeof d){v.callback=null;y=v.priorityLevel;var e=d(v.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?v.callback=e:v===h(r)&&k(r);G(b)}else k(r);v=h(r)}if(null!==v)var w=!0;else{var m=h(t);null!==m&&K(H,m.startTime-b);w=!1}return w}finally{v=null,y=c,z=!1}}var N=!1,O=null,L=-1,P=5,Q=-1;\nfunction M(){return exports.unstable_now()-Qa||125d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a};\nexports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c}}};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n","/**\n * @license React\n * react-dom.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n/*\n Modernizr 3.0.0pre (Custom Build) | MIT\n*/\n'use strict';var aa=require(\"react\"),ca=require(\"scheduler\");function p(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;cb}return!1}function v(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var z={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){z[a]=new v(a,0,!1,a,null,!1,!1)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];z[b]=new v(b,1,!1,a[1],null,!1,!1)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){z[a]=new v(a,2,!1,a.toLowerCase(),null,!1,!1)});\n[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(a){z[a]=new v(a,2,!1,a,null,!1,!1)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){z[a]=new v(a,3,!1,a.toLowerCase(),null,!1,!1)});\n[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){z[a]=new v(a,3,!0,a,null,!1,!1)});[\"capture\",\"download\"].forEach(function(a){z[a]=new v(a,4,!1,a,null,!1,!1)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){z[a]=new v(a,6,!1,a,null,!1,!1)});[\"rowSpan\",\"start\"].forEach(function(a){z[a]=new v(a,5,!1,a.toLowerCase(),null,!1,!1)});var ra=/[\\-:]([a-z])/g;function sa(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(ra,\nsa);z[b]=new v(b,1,!1,a,null,!1,!1)});\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,\"http://www.w3.org/1999/xlink\",!1,!1)});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\",!1,!1)});[\"tabIndex\",\"crossOrigin\"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!1,!1)});\nz.xlinkHref=new v(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1);[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!0,!0)});\nfunction ta(a,b,c,d){var e=z.hasOwnProperty(b)?z[b]:null;if(null!==e?0!==e.type:d||!(2h||e[g]!==f[h]){var k=\"\\n\"+e[g].replace(\" at new \",\" at \");a.displayName&&k.includes(\"\")&&(k=k.replace(\"\",a.displayName));return k}while(1<=g&&0<=h)}break}}}finally{Na=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:\"\")?Ma(a):\"\"}\nfunction Pa(a){switch(a.tag){case 5:return Ma(a.type);case 16:return Ma(\"Lazy\");case 13:return Ma(\"Suspense\");case 19:return Ma(\"SuspenseList\");case 0:case 2:case 15:return a=Oa(a.type,!1),a;case 11:return a=Oa(a.type.render,!1),a;case 1:return a=Oa(a.type,!0),a;default:return\"\"}}\nfunction Qa(a){if(null==a)return null;if(\"function\"===typeof a)return a.displayName||a.name||null;if(\"string\"===typeof a)return a;switch(a){case ya:return\"Fragment\";case wa:return\"Portal\";case Aa:return\"Profiler\";case za:return\"StrictMode\";case Ea:return\"Suspense\";case Fa:return\"SuspenseList\"}if(\"object\"===typeof a)switch(a.$$typeof){case Ca:return(a.displayName||\"Context\")+\".Consumer\";case Ba:return(a._context.displayName||\"Context\")+\".Provider\";case Da:var b=a.render;a=a.displayName;a||(a=b.displayName||\nb.name||\"\",a=\"\"!==a?\"ForwardRef(\"+a+\")\":\"ForwardRef\");return a;case Ga:return b=a.displayName||null,null!==b?b:Qa(a.type)||\"Memo\";case Ha:b=a._payload;a=a._init;try{return Qa(a(b))}catch(c){}}return null}\nfunction Ra(a){var b=a.type;switch(a.tag){case 24:return\"Cache\";case 9:return(b.displayName||\"Context\")+\".Consumer\";case 10:return(b._context.displayName||\"Context\")+\".Provider\";case 18:return\"DehydratedFragment\";case 11:return a=b.render,a=a.displayName||a.name||\"\",b.displayName||(\"\"!==a?\"ForwardRef(\"+a+\")\":\"ForwardRef\");case 7:return\"Fragment\";case 5:return b;case 4:return\"Portal\";case 3:return\"Root\";case 6:return\"Text\";case 16:return Qa(b);case 8:return b===za?\"StrictMode\":\"Mode\";case 22:return\"Offscreen\";\ncase 12:return\"Profiler\";case 21:return\"Scope\";case 13:return\"Suspense\";case 19:return\"SuspenseList\";case 25:return\"TracingMarker\";case 1:case 0:case 17:case 2:case 14:case 15:if(\"function\"===typeof b)return b.displayName||b.name||null;if(\"string\"===typeof b)return b}return null}function Sa(a){switch(typeof a){case \"boolean\":case \"number\":case \"string\":case \"undefined\":return a;case \"object\":return a;default:return\"\"}}\nfunction Ta(a){var b=a.type;return(a=a.nodeName)&&\"input\"===a.toLowerCase()&&(\"checkbox\"===b||\"radio\"===b)}\nfunction Ua(a){var b=Ta(a)?\"checked\":\"value\",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=\"\"+a[b];if(!a.hasOwnProperty(b)&&\"undefined\"!==typeof c&&\"function\"===typeof c.get&&\"function\"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=\"\"+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=\"\"+a},stopTracking:function(){a._valueTracker=\nnull;delete a[b]}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a))}function Wa(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d=\"\";a&&(d=Ta(a)?a.checked?\"true\":\"false\":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Xa(a){a=a||(\"undefined\"!==typeof document?document:void 0);if(\"undefined\"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}\nfunction Ya(a,b){var c=b.checked;return A({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?\"\":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:\"checkbox\"===b.type||\"radio\"===b.type?null!=b.checked:null!=b.value}}function ab(a,b){b=b.checked;null!=b&&ta(a,\"checked\",b,!1)}\nfunction bb(a,b){ab(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if(\"number\"===d){if(0===c&&\"\"===a.value||a.value!=c)a.value=\"\"+c}else a.value!==\"\"+c&&(a.value=\"\"+c);else if(\"submit\"===d||\"reset\"===d){a.removeAttribute(\"value\");return}b.hasOwnProperty(\"value\")?cb(a,b.type,c):b.hasOwnProperty(\"defaultValue\")&&cb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}\nfunction db(a,b,c){if(b.hasOwnProperty(\"value\")||b.hasOwnProperty(\"defaultValue\")){var d=b.type;if(!(\"submit\"!==d&&\"reset\"!==d||void 0!==b.value&&null!==b.value))return;b=\"\"+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;\"\"!==c&&(a.name=\"\");a.defaultChecked=!!a._wrapperState.initialChecked;\"\"!==c&&(a.name=c)}\nfunction cb(a,b,c){if(\"number\"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=\"\"+a._wrapperState.initialValue:a.defaultValue!==\"\"+c&&(a.defaultValue=\"\"+c)}var eb=Array.isArray;\nfunction fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e\"+b.valueOf().toString()+\"\";for(b=mb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction ob(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar pb={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,\nzoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qb=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(pb).forEach(function(a){qb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);pb[b]=pb[a]})});function rb(a,b,c){return null==b||\"boolean\"===typeof b||\"\"===b?\"\":c||\"number\"!==typeof b||0===b||pb.hasOwnProperty(a)&&pb[a]?(\"\"+b).trim():b+\"px\"}\nfunction sb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\"),e=rb(c,b[c],d);\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var tb=A({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction ub(a,b){if(b){if(tb[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(p(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(p(60));if(\"object\"!==typeof b.dangerouslySetInnerHTML||!(\"__html\"in b.dangerouslySetInnerHTML))throw Error(p(61));}if(null!=b.style&&\"object\"!==typeof b.style)throw Error(p(62));}}\nfunction vb(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){case \"annotation-xml\":case \"color-profile\":case \"font-face\":case \"font-face-src\":case \"font-face-uri\":case \"font-face-format\":case \"font-face-name\":case \"missing-glyph\":return!1;default:return!0}}var wb=null;function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null;\nfunction Bb(a){if(a=Cb(a)){if(\"function\"!==typeof yb)throw Error(p(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b))}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;a>>=0;return 0===a?32:31-(pc(a)/qc|0)|0}var rc=64,sc=4194304;\nfunction tc(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;\ndefault:return a}}function uc(a,b){var c=a.pendingLanes;if(0===c)return 0;var d=0,e=a.suspendedLanes,f=a.pingedLanes,g=c&268435455;if(0!==g){var h=g&~e;0!==h?d=tc(h):(f&=g,0!==f&&(d=tc(f)))}else g=c&~e,0!==g?d=tc(g):0!==f&&(d=tc(f));if(0===d)return 0;if(0!==b&&b!==d&&0===(b&e)&&(e=d&-d,f=b&-b,e>=f||16===e&&0!==(f&4194240)))return b;0!==(d&4)&&(d|=c&16);b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0c;c++)b.push(a);return b}\nfunction Ac(a,b,c){a.pendingLanes|=b;536870912!==b&&(a.suspendedLanes=0,a.pingedLanes=0);a=a.eventTimes;b=31-oc(b);a[b]=c}function Bc(a,b){var c=a.pendingLanes&~b;a.pendingLanes=b;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=b;a.mutableReadLanes&=b;a.entangledLanes&=b;b=a.entanglements;var d=a.eventTimes;for(a=a.expirationTimes;0=be),ee=String.fromCharCode(32),fe=!1;\nfunction ge(a,b){switch(a){case \"keyup\":return-1!==$d.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"focusout\":return!0;default:return!1}}function he(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var ie=!1;function je(a,b){switch(a){case \"compositionend\":return he(b);case \"keypress\":if(32!==b.which)return null;fe=!0;return ee;case \"textInput\":return a=b.data,a===ee&&fe?null:a;default:return null}}\nfunction ke(a,b){if(ie)return\"compositionend\"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Je(c)}}function Le(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Le(a,b.parentNode):\"contains\"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}\nfunction Me(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c=\"string\"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Xa(a.document)}return b}function Ne(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}\nfunction Oe(a){var b=Me(),c=a.focusedElem,d=a.selectionRange;if(b!==c&&c&&c.ownerDocument&&Le(c.ownerDocument.documentElement,c)){if(null!==d&&Ne(c))if(b=d.start,a=d.end,void 0===a&&(a=b),\"selectionStart\"in c)c.selectionStart=b,c.selectionEnd=Math.min(a,c.value.length);else if(a=(b=c.ownerDocument||document)&&b.defaultView||window,a.getSelection){a=a.getSelection();var e=c.textContent.length,f=Math.min(d.start,e);d=void 0===d.end?f:Math.min(d.end,e);!a.extend&&f>d&&(e=d,d=f,f=e);e=Ke(c,f);var g=Ke(c,\nd);e&&g&&(1!==a.rangeCount||a.anchorNode!==e.node||a.anchorOffset!==e.offset||a.focusNode!==g.node||a.focusOffset!==g.offset)&&(b=b.createRange(),b.setStart(e.node,e.offset),a.removeAllRanges(),f>d?(a.addRange(b),a.extend(g.node,g.offset)):(b.setEnd(g.node,g.offset),a.addRange(b)))}b=[];for(a=c;a=a.parentNode;)1===a.nodeType&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});\"function\"===typeof c.focus&&c.focus();for(c=0;c=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;\nfunction Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,\"selectionStart\"in d&&Ne(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Ie(Se,d)||(Se=d,d=oe(Re,\"onSelect\"),0Tf||(a.current=Sf[Tf],Sf[Tf]=null,Tf--)}function G(a,b){Tf++;Sf[Tf]=a.current;a.current=b}var Vf={},H=Uf(Vf),Wf=Uf(!1),Xf=Vf;function Yf(a,b){var c=a.type.contextTypes;if(!c)return Vf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}\nfunction Zf(a){a=a.childContextTypes;return null!==a&&void 0!==a}function $f(){E(Wf);E(H)}function ag(a,b,c){if(H.current!==Vf)throw Error(p(168));G(H,b);G(Wf,c)}function bg(a,b,c){var d=a.stateNode;b=b.childContextTypes;if(\"function\"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in b))throw Error(p(108,Ra(a)||\"Unknown\",e));return A({},c,d)}\nfunction cg(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Vf;Xf=H.current;G(H,a);G(Wf,Wf.current);return!0}function dg(a,b,c){var d=a.stateNode;if(!d)throw Error(p(169));c?(a=bg(a,b,Xf),d.__reactInternalMemoizedMergedChildContext=a,E(Wf),E(H),G(H,a)):E(Wf);G(Wf,c)}var eg=null,fg=!1,gg=!1;function hg(a){null===eg?eg=[a]:eg.push(a)}function ig(a){fg=!0;hg(a)}\nfunction jg(){if(!gg&&null!==eg){gg=!0;var a=0,b=C;try{var c=eg;for(C=1;a>=g;e-=g;rg=1<<32-oc(b)+e|c<w?(x=u,u=null):x=u.sibling;var n=r(e,u,h[w],k);if(null===n){null===u&&(u=x);break}a&&u&&null===n.alternate&&b(e,u);g=f(n,g,w);null===m?l=n:m.sibling=n;m=n;u=x}if(w===h.length)return c(e,u),I&&tg(e,w),l;if(null===u){for(;ww?(x=m,m=null):x=m.sibling;var t=r(e,m,n.value,k);if(null===t){null===m&&(m=x);break}a&&m&&null===t.alternate&&b(e,m);g=f(t,g,w);null===u?l=t:u.sibling=t;u=t;m=x}if(n.done)return c(e,\nm),I&&tg(e,w),l;if(null===m){for(;!n.done;w++,n=h.next())n=q(e,n.value,k),null!==n&&(g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);I&&tg(e,w);return l}for(m=d(e,m);!n.done;w++,n=h.next())n=y(m,e,w,n.value,k),null!==n&&(a&&null!==n.alternate&&m.delete(null===n.key?w:n.key),g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);a&&m.forEach(function(a){return b(e,a)});I&&tg(e,w);return l}function J(a,d,f,h){\"object\"===typeof f&&null!==f&&f.type===ya&&null===f.key&&(f=f.props.children);if(\"object\"===typeof f&&null!==f){switch(f.$$typeof){case va:a:{for(var k=\nf.key,l=d;null!==l;){if(l.key===k){k=f.type;if(k===ya){if(7===l.tag){c(a,l.sibling);d=e(l,f.props.children);d.return=a;a=d;break a}}else if(l.elementType===k||\"object\"===typeof k&&null!==k&&k.$$typeof===Ha&&uh(k)===l.type){c(a,l.sibling);d=e(l,f.props);d.ref=sh(a,l,f);d.return=a;a=d;break a}c(a,l);break}else b(a,l);l=l.sibling}f.type===ya?(d=Ah(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=yh(f.type,f.key,f.props,null,a.mode,h),h.ref=sh(a,d,f),h.return=a,a=h)}return g(a);case wa:a:{for(l=f.key;null!==\nd;){if(d.key===l)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=zh(f,a.mode,h);d.return=a;a=d}return g(a);case Ha:return l=f._init,J(a,d,l(f._payload),h)}if(eb(f))return n(a,d,f,h);if(Ka(f))return t(a,d,f,h);th(a,f)}return\"string\"===typeof f&&\"\"!==f||\"number\"===typeof f?(f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):\n(c(a,d),d=xh(f,a.mode,h),d.return=a,a=d),g(a)):c(a,d)}return J}var Bh=vh(!0),Ch=vh(!1),Dh={},Eh=Uf(Dh),Fh=Uf(Dh),Gh=Uf(Dh);function Hh(a){if(a===Dh)throw Error(p(174));return a}function Ih(a,b){G(Gh,b);G(Fh,a);G(Eh,Dh);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:lb(null,\"\");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=lb(b,a)}E(Eh);G(Eh,b)}function Jh(){E(Eh);E(Fh);E(Gh)}\nfunction Kh(a){Hh(Gh.current);var b=Hh(Eh.current);var c=lb(b,a.type);b!==c&&(G(Fh,a),G(Eh,c))}function Lh(a){Fh.current===a&&(E(Eh),E(Fh))}var M=Uf(0);\nfunction Mh(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||\"$?\"===c.data||\"$!\"===c.data))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&128))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var Nh=[];\nfunction Oh(){for(var a=0;ac?c:4;a(!0);var d=Qh.transition;Qh.transition={};try{a(!1),b()}finally{C=c,Qh.transition=d}}function Fi(){return di().memoizedState}\nfunction Gi(a,b,c){var d=lh(a);c={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(b,c);else if(c=Yg(a,b,c,d),null!==c){var e=L();mh(c,a,d,e);Ji(c,b,d)}}\nfunction ri(a,b,c){var d=lh(a),e={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(b,e);else{var f=a.alternate;if(0===a.lanes&&(null===f||0===f.lanes)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.hasEagerState=!0;e.eagerState=h;if(He(h,g)){var k=b.interleaved;null===k?(e.next=e,Xg(b)):(e.next=k.next,k.next=e);b.interleaved=e;return}}catch(l){}finally{}c=Yg(a,b,e,d);null!==c&&(e=L(),mh(c,a,d,e),Ji(c,b,d))}}\nfunction Hi(a){var b=a.alternate;return a===N||null!==b&&b===N}function Ii(a,b){Th=Sh=!0;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}function Ji(a,b,c){if(0!==(c&4194240)){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Cc(a,c)}}\nvar ai={readContext:Vg,useCallback:Q,useContext:Q,useEffect:Q,useImperativeHandle:Q,useInsertionEffect:Q,useLayoutEffect:Q,useMemo:Q,useReducer:Q,useRef:Q,useState:Q,useDebugValue:Q,useDeferredValue:Q,useTransition:Q,useMutableSource:Q,useSyncExternalStore:Q,useId:Q,unstable_isNewReconciler:!1},Yh={readContext:Vg,useCallback:function(a,b){ci().memoizedState=[a,void 0===b?null:b];return a},useContext:Vg,useEffect:vi,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return ti(4194308,\n4,yi.bind(null,b,a),c)},useLayoutEffect:function(a,b){return ti(4194308,4,a,b)},useInsertionEffect:function(a,b){return ti(4,2,a,b)},useMemo:function(a,b){var c=ci();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=ci();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};d.queue=a;a=a.dispatch=Gi.bind(null,N,a);return[d.memoizedState,a]},useRef:function(a){var b=\nci();a={current:a};return b.memoizedState=a},useState:qi,useDebugValue:Ai,useDeferredValue:function(a){return ci().memoizedState=a},useTransition:function(){var a=qi(!1),b=a[0];a=Ei.bind(null,a[1]);ci().memoizedState=a;return[b,a]},useMutableSource:function(){},useSyncExternalStore:function(a,b,c){var d=N,e=ci();if(I){if(void 0===c)throw Error(p(407));c=c()}else{c=b();if(null===R)throw Error(p(349));0!==(Rh&30)||ni(d,b,c)}e.memoizedState=c;var f={value:c,getSnapshot:b};e.queue=f;vi(ki.bind(null,d,\nf,a),[a]);d.flags|=2048;li(9,mi.bind(null,d,f,c,b),void 0,null);return c},useId:function(){var a=ci(),b=R.identifierPrefix;if(I){var c=sg;var d=rg;c=(d&~(1<<32-oc(d)-1)).toString(32)+c;b=\":\"+b+\"R\"+c;c=Uh++;0\\x3c/script>\",a=a.removeChild(a.firstChild)):\n\"string\"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),\"select\"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[Of]=b;a[Pf]=d;Aj(a,b,!1,!1);b.stateNode=a;a:{g=vb(c,d);switch(c){case \"dialog\":D(\"cancel\",a);D(\"close\",a);e=d;break;case \"iframe\":case \"object\":case \"embed\":D(\"load\",a);e=d;break;case \"video\":case \"audio\":for(e=0;eHj&&(b.flags|=128,d=!0,Ej(f,!1),b.lanes=4194304)}else{if(!d)if(a=Mh(g),null!==a){if(b.flags|=128,d=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Ej(f,!0),null===f.tail&&\"hidden\"===f.tailMode&&!g.alternate&&!I)return S(b),null}else 2*B()-f.renderingStartTime>Hj&&1073741824!==c&&(b.flags|=128,d=!0,Ej(f,!1),b.lanes=4194304);f.isBackwards?(g.sibling=b.child,b.child=g):(c=f.last,null!==c?c.sibling=g:b.child=g,f.last=g)}if(null!==f.tail)return b=f.tail,f.rendering=\nb,f.tail=b.sibling,f.renderingStartTime=B(),b.sibling=null,c=M.current,G(M,d?c&1|2:c&1),b;S(b);return null;case 22:case 23:return Ij(),d=null!==b.memoizedState,null!==a&&null!==a.memoizedState!==d&&(b.flags|=8192),d&&0!==(b.mode&1)?0!==(gj&1073741824)&&(S(b),b.subtreeFlags&6&&(b.flags|=8192)):S(b),null;case 24:return null;case 25:return null}throw Error(p(156,b.tag));}\nfunction Jj(a,b){wg(b);switch(b.tag){case 1:return Zf(b.type)&&$f(),a=b.flags,a&65536?(b.flags=a&-65537|128,b):null;case 3:return Jh(),E(Wf),E(H),Oh(),a=b.flags,0!==(a&65536)&&0===(a&128)?(b.flags=a&-65537|128,b):null;case 5:return Lh(b),null;case 13:E(M);a=b.memoizedState;if(null!==a&&null!==a.dehydrated){if(null===b.alternate)throw Error(p(340));Ig()}a=b.flags;return a&65536?(b.flags=a&-65537|128,b):null;case 19:return E(M),null;case 4:return Jh(),null;case 10:return Rg(b.type._context),null;case 22:case 23:return Ij(),\nnull;case 24:return null;default:return null}}var Kj=!1,U=!1,Lj=\"function\"===typeof WeakSet?WeakSet:Set,V=null;function Mj(a,b){var c=a.ref;if(null!==c)if(\"function\"===typeof c)try{c(null)}catch(d){W(a,b,d)}else c.current=null}function Nj(a,b,c){try{c()}catch(d){W(a,b,d)}}var Oj=!1;\nfunction Pj(a,b){Cf=dd;a=Me();if(Ne(a)){if(\"selectionStart\"in a)var c={start:a.selectionStart,end:a.selectionEnd};else a:{c=(c=a.ownerDocument)&&c.defaultView||window;var d=c.getSelection&&c.getSelection();if(d&&0!==d.rangeCount){c=d.anchorNode;var e=d.anchorOffset,f=d.focusNode;d=d.focusOffset;try{c.nodeType,f.nodeType}catch(F){c=null;break a}var g=0,h=-1,k=-1,l=0,m=0,q=a,r=null;b:for(;;){for(var y;;){q!==c||0!==e&&3!==q.nodeType||(h=g+e);q!==f||0!==d&&3!==q.nodeType||(k=g+d);3===q.nodeType&&(g+=\nq.nodeValue.length);if(null===(y=q.firstChild))break;r=q;q=y}for(;;){if(q===a)break b;r===c&&++l===e&&(h=g);r===f&&++m===d&&(k=g);if(null!==(y=q.nextSibling))break;q=r;r=q.parentNode}q=y}c=-1===h||-1===k?null:{start:h,end:k}}else c=null}c=c||{start:0,end:0}}else c=null;Df={focusedElem:a,selectionRange:c};dd=!1;for(V=b;null!==V;)if(b=V,a=b.child,0!==(b.subtreeFlags&1028)&&null!==a)a.return=b,V=a;else for(;null!==V;){b=V;try{var n=b.alternate;if(0!==(b.flags&1024))switch(b.tag){case 0:case 11:case 15:break;\ncase 1:if(null!==n){var t=n.memoizedProps,J=n.memoizedState,x=b.stateNode,w=x.getSnapshotBeforeUpdate(b.elementType===b.type?t:Lg(b.type,t),J);x.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var u=b.stateNode.containerInfo;1===u.nodeType?u.textContent=\"\":9===u.nodeType&&u.documentElement&&u.removeChild(u.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p(163));}}catch(F){W(b,b.return,F)}a=b.sibling;if(null!==a){a.return=b.return;V=a;break}V=b.return}n=Oj;Oj=!1;return n}\nfunction Qj(a,b,c){var d=b.updateQueue;d=null!==d?d.lastEffect:null;if(null!==d){var e=d=d.next;do{if((e.tag&a)===a){var f=e.destroy;e.destroy=void 0;void 0!==f&&Nj(b,c,f)}e=e.next}while(e!==d)}}function Rj(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}function Sj(a){var b=a.ref;if(null!==b){var c=a.stateNode;switch(a.tag){case 5:a=c;break;default:a=c}\"function\"===typeof b?b(a):b.current=a}}\nfunction Tj(a){var b=a.alternate;null!==b&&(a.alternate=null,Tj(b));a.child=null;a.deletions=null;a.sibling=null;5===a.tag&&(b=a.stateNode,null!==b&&(delete b[Of],delete b[Pf],delete b[of],delete b[Qf],delete b[Rf]));a.stateNode=null;a.return=null;a.dependencies=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.stateNode=null;a.updateQueue=null}function Uj(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction Vj(a){a:for(;;){for(;null===a.sibling;){if(null===a.return||Uj(a.return))return null;a=a.return}a.sibling.return=a.return;for(a=a.sibling;5!==a.tag&&6!==a.tag&&18!==a.tag;){if(a.flags&2)continue a;if(null===a.child||4===a.tag)continue a;else a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}\nfunction Wj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=Bf));else if(4!==d&&(a=a.child,null!==a))for(Wj(a,b,c),a=a.sibling;null!==a;)Wj(a,b,c),a=a.sibling}\nfunction Xj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(Xj(a,b,c),a=a.sibling;null!==a;)Xj(a,b,c),a=a.sibling}var X=null,Yj=!1;function Zj(a,b,c){for(c=c.child;null!==c;)ak(a,b,c),c=c.sibling}\nfunction ak(a,b,c){if(lc&&\"function\"===typeof lc.onCommitFiberUnmount)try{lc.onCommitFiberUnmount(kc,c)}catch(h){}switch(c.tag){case 5:U||Mj(c,b);case 6:var d=X,e=Yj;X=null;Zj(a,b,c);X=d;Yj=e;null!==X&&(Yj?(a=X,c=c.stateNode,8===a.nodeType?a.parentNode.removeChild(c):a.removeChild(c)):X.removeChild(c.stateNode));break;case 18:null!==X&&(Yj?(a=X,c=c.stateNode,8===a.nodeType?Kf(a.parentNode,c):1===a.nodeType&&Kf(a,c),bd(a)):Kf(X,c.stateNode));break;case 4:d=X;e=Yj;X=c.stateNode.containerInfo;Yj=!0;\nZj(a,b,c);X=d;Yj=e;break;case 0:case 11:case 14:case 15:if(!U&&(d=c.updateQueue,null!==d&&(d=d.lastEffect,null!==d))){e=d=d.next;do{var f=e,g=f.destroy;f=f.tag;void 0!==g&&(0!==(f&2)?Nj(c,b,g):0!==(f&4)&&Nj(c,b,g));e=e.next}while(e!==d)}Zj(a,b,c);break;case 1:if(!U&&(Mj(c,b),d=c.stateNode,\"function\"===typeof d.componentWillUnmount))try{d.props=c.memoizedProps,d.state=c.memoizedState,d.componentWillUnmount()}catch(h){W(c,b,h)}Zj(a,b,c);break;case 21:Zj(a,b,c);break;case 22:c.mode&1?(U=(d=U)||null!==\nc.memoizedState,Zj(a,b,c),U=d):Zj(a,b,c);break;default:Zj(a,b,c)}}function bk(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Lj);b.forEach(function(b){var d=ck.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}\nfunction dk(a,b){var c=b.deletions;if(null!==c)for(var d=0;de&&(e=g);d&=~f}d=e;d=B()-d;d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*mk(d/1960))-d;if(10a?16:a;if(null===xk)var d=!1;else{a=xk;xk=null;yk=0;if(0!==(K&6))throw Error(p(331));var e=K;K|=4;for(V=a.current;null!==V;){var f=V,g=f.child;if(0!==(V.flags&16)){var h=f.deletions;if(null!==h){for(var k=0;kB()-gk?Lk(a,0):sk|=c);Ek(a,b)}function Zk(a,b){0===b&&(0===(a.mode&1)?b=1:(b=sc,sc<<=1,0===(sc&130023424)&&(sc=4194304)));var c=L();a=Zg(a,b);null!==a&&(Ac(a,b,c),Ek(a,c))}function vj(a){var b=a.memoizedState,c=0;null!==b&&(c=b.retryLane);Zk(a,c)}\nfunction ck(a,b){var c=0;switch(a.tag){case 13:var d=a.stateNode;var e=a.memoizedState;null!==e&&(c=e.retryLane);break;case 19:d=a.stateNode;break;default:throw Error(p(314));}null!==d&&d.delete(b);Zk(a,c)}var Wk;\nWk=function(a,b,c){if(null!==a)if(a.memoizedProps!==b.pendingProps||Wf.current)Ug=!0;else{if(0===(a.lanes&c)&&0===(b.flags&128))return Ug=!1,zj(a,b,c);Ug=0!==(a.flags&131072)?!0:!1}else Ug=!1,I&&0!==(b.flags&1048576)&&ug(b,ng,b.index);b.lanes=0;switch(b.tag){case 2:var d=b.type;jj(a,b);a=b.pendingProps;var e=Yf(b,H.current);Tg(b,c);e=Xh(null,b,d,a,e,c);var f=bi();b.flags|=1;\"object\"===typeof e&&null!==e&&\"function\"===typeof e.render&&void 0===e.$$typeof?(b.tag=1,b.memoizedState=null,b.updateQueue=\nnull,Zf(d)?(f=!0,cg(b)):f=!1,b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,ah(b),e.updater=nh,b.stateNode=e,e._reactInternals=b,rh(b,d,a,c),b=kj(null,b,d,!0,f,c)):(b.tag=0,I&&f&&vg(b),Yi(null,b,e,c),b=b.child);return b;case 16:d=b.elementType;a:{jj(a,b);a=b.pendingProps;e=d._init;d=e(d._payload);b.type=d;e=b.tag=$k(d);a=Lg(d,a);switch(e){case 0:b=dj(null,b,d,a,c);break a;case 1:b=ij(null,b,d,a,c);break a;case 11:b=Zi(null,b,d,a,c);break a;case 14:b=aj(null,b,d,Lg(d.type,a),c);break a}throw Error(p(306,\nd,\"\"));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),dj(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),ij(a,b,d,e,c);case 3:a:{lj(b);if(null===a)throw Error(p(387));d=b.pendingProps;f=b.memoizedState;e=f.element;bh(a,b);gh(b,d,null,c);var g=b.memoizedState;d=g.element;if(f.isDehydrated)if(f={element:d,isDehydrated:!1,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},b.updateQueue.baseState=\nf,b.memoizedState=f,b.flags&256){e=Ki(Error(p(423)),b);b=mj(a,b,d,c,e);break a}else if(d!==e){e=Ki(Error(p(424)),b);b=mj(a,b,d,c,e);break a}else for(yg=Lf(b.stateNode.containerInfo.firstChild),xg=b,I=!0,zg=null,c=Ch(b,null,d,c),b.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{Ig();if(d===e){b=$i(a,b,c);break a}Yi(a,b,d,c)}b=b.child}return b;case 5:return Kh(b),null===a&&Eg(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Ef(d,e)?g=null:null!==f&&Ef(d,f)&&(b.flags|=32),\nhj(a,b),Yi(a,b,g,c),b.child;case 6:return null===a&&Eg(b),null;case 13:return pj(a,b,c);case 4:return Ih(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Bh(b,null,d,c):Yi(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),Zi(a,b,d,e,c);case 7:return Yi(a,b,b.pendingProps,c),b.child;case 8:return Yi(a,b,b.pendingProps.children,c),b.child;case 12:return Yi(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;f=b.memoizedProps;\ng=e.value;G(Mg,d._currentValue);d._currentValue=g;if(null!==f)if(He(f.value,g)){if(f.children===e.children&&!Wf.current){b=$i(a,b,c);break a}}else for(f=b.child,null!==f&&(f.return=b);null!==f;){var h=f.dependencies;if(null!==h){g=f.child;for(var k=h.firstContext;null!==k;){if(k.context===d){if(1===f.tag){k=ch(-1,c&-c);k.tag=2;var l=f.updateQueue;if(null!==l){l=l.shared;var m=l.pending;null===m?k.next=k:(k.next=m.next,m.next=k);l.pending=k}}f.lanes|=c;k=f.alternate;null!==k&&(k.lanes|=c);Sg(f.return,\nc,b);h.lanes|=c;break}k=k.next}}else if(10===f.tag)g=f.type===b.type?null:f.child;else if(18===f.tag){g=f.return;if(null===g)throw Error(p(341));g.lanes|=c;h=g.alternate;null!==h&&(h.lanes|=c);Sg(g,c,b);g=f.sibling}else g=f.child;if(null!==g)g.return=f;else for(g=f;null!==g;){if(g===b){g=null;break}f=g.sibling;if(null!==f){f.return=g.return;g=f;break}g=g.return}f=g}Yi(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,d=b.pendingProps.children,Tg(b,c),e=Vg(e),d=d(e),b.flags|=1,Yi(a,b,d,c),\nb.child;case 14:return d=b.type,e=Lg(d,b.pendingProps),e=Lg(d.type,e),aj(a,b,d,e,c);case 15:return cj(a,b,b.type,b.pendingProps,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),jj(a,b),b.tag=1,Zf(d)?(a=!0,cg(b)):a=!1,Tg(b,c),ph(b,d,e),rh(b,d,e,c),kj(null,b,d,!0,a,c);case 19:return yj(a,b,c);case 22:return ej(a,b,c)}throw Error(p(156,b.tag));};function Gk(a,b){return ac(a,b)}\nfunction al(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null}function Bg(a,b,c,d){return new al(a,b,c,d)}function bj(a){a=a.prototype;return!(!a||!a.isReactComponent)}\nfunction $k(a){if(\"function\"===typeof a)return bj(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Da)return 11;if(a===Ga)return 14}return 2}\nfunction wh(a,b){var c=a.alternate;null===c?(c=Bg(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null);c.flags=a.flags&14680064;c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext};\nc.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}\nfunction yh(a,b,c,d,e,f){var g=2;d=a;if(\"function\"===typeof a)bj(a)&&(g=1);else if(\"string\"===typeof a)g=5;else a:switch(a){case ya:return Ah(c.children,e,f,b);case za:g=8;e|=8;break;case Aa:return a=Bg(12,c,b,e|2),a.elementType=Aa,a.lanes=f,a;case Ea:return a=Bg(13,c,b,e),a.elementType=Ea,a.lanes=f,a;case Fa:return a=Bg(19,c,b,e),a.elementType=Fa,a.lanes=f,a;case Ia:return qj(c,e,f,b);default:if(\"object\"===typeof a&&null!==a)switch(a.$$typeof){case Ba:g=10;break a;case Ca:g=9;break a;case Da:g=11;\nbreak a;case Ga:g=14;break a;case Ha:g=16;d=null;break a}throw Error(p(130,null==a?a:typeof a,\"\"));}b=Bg(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function Ah(a,b,c,d){a=Bg(7,a,d,b);a.lanes=c;return a}function qj(a,b,c,d){a=Bg(22,a,d,b);a.elementType=Ia;a.lanes=c;a.stateNode={isHidden:!1};return a}function xh(a,b,c){a=Bg(6,a,null,b);a.lanes=c;return a}\nfunction zh(a,b,c){b=Bg(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}\nfunction bl(a,b,c,d,e){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.callbackNode=this.pendingContext=this.context=null;this.callbackPriority=0;this.eventTimes=zc(0);this.expirationTimes=zc(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=zc(0);this.identifierPrefix=d;this.onRecoverableError=e;this.mutableSourceEagerHydrationData=\nnull}function cl(a,b,c,d,e,f,g,h,k){a=new bl(a,b,c,h,k);1===b?(b=1,!0===f&&(b|=8)):b=0;f=Bg(3,null,null,b);a.current=f;f.stateNode=a;f.memoizedState={element:d,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null};ah(f);return a}function dl(a,b,c){var d=3= 0) continue;\n target[key] = source[key];\n }\n return target;\n}","import objectWithoutPropertiesLoose from \"./objectWithoutPropertiesLoose.js\";\nexport default function _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = objectWithoutPropertiesLoose(source, excluded);\n var key, i;\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n return target;\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'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\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'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\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\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * @license React\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var b=Symbol.for(\"react.element\"),c=Symbol.for(\"react.portal\"),d=Symbol.for(\"react.fragment\"),e=Symbol.for(\"react.strict_mode\"),f=Symbol.for(\"react.profiler\"),g=Symbol.for(\"react.provider\"),h=Symbol.for(\"react.context\"),k=Symbol.for(\"react.server_context\"),l=Symbol.for(\"react.forward_ref\"),m=Symbol.for(\"react.suspense\"),n=Symbol.for(\"react.suspense_list\"),p=Symbol.for(\"react.memo\"),q=Symbol.for(\"react.lazy\"),t=Symbol.for(\"react.offscreen\"),u;u=Symbol.for(\"react.module.reference\");\nfunction v(a){if(\"object\"===typeof a&&null!==a){var r=a.$$typeof;switch(r){case b:switch(a=a.type,a){case d:case f:case e:case m:case n:return a;default:switch(a=a&&a.$$typeof,a){case k:case h:case l:case q:case p:case g:return a;default:return r}}case c:return r}}}exports.ContextConsumer=h;exports.ContextProvider=g;exports.Element=b;exports.ForwardRef=l;exports.Fragment=d;exports.Lazy=q;exports.Memo=p;exports.Portal=c;exports.Profiler=f;exports.StrictMode=e;exports.Suspense=m;\nexports.SuspenseList=n;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return v(a)===h};exports.isContextProvider=function(a){return v(a)===g};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return v(a)===l};exports.isFragment=function(a){return v(a)===d};exports.isLazy=function(a){return v(a)===q};exports.isMemo=function(a){return v(a)===p};\nexports.isPortal=function(a){return v(a)===c};exports.isProfiler=function(a){return v(a)===f};exports.isStrictMode=function(a){return v(a)===e};exports.isSuspense=function(a){return v(a)===m};exports.isSuspenseList=function(a){return v(a)===n};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===d||a===f||a===e||a===m||a===n||a===t||\"object\"===typeof a&&null!==a&&(a.$$typeof===q||a.$$typeof===p||a.$$typeof===g||a.$$typeof===h||a.$$typeof===l||a.$$typeof===u||void 0!==a.getModuleId)?!0:!1};exports.typeOf=v;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","function stylis_min (W) {\n function M(d, c, e, h, a) {\n for (var m = 0, b = 0, v = 0, n = 0, q, g, x = 0, K = 0, k, u = k = q = 0, l = 0, r = 0, I = 0, t = 0, B = e.length, J = B - 1, y, f = '', p = '', F = '', G = '', C; l < B;) {\n g = e.charCodeAt(l);\n l === J && 0 !== b + n + v + m && (0 !== b && (g = 47 === b ? 10 : 47), n = v = m = 0, B++, J++);\n\n if (0 === b + n + v + m) {\n if (l === J && (0 < r && (f = f.replace(N, '')), 0 < f.trim().length)) {\n switch (g) {\n case 32:\n case 9:\n case 59:\n case 13:\n case 10:\n break;\n\n default:\n f += e.charAt(l);\n }\n\n g = 59;\n }\n\n switch (g) {\n case 123:\n f = f.trim();\n q = f.charCodeAt(0);\n k = 1;\n\n for (t = ++l; l < B;) {\n switch (g = e.charCodeAt(l)) {\n case 123:\n k++;\n break;\n\n case 125:\n k--;\n break;\n\n case 47:\n switch (g = e.charCodeAt(l + 1)) {\n case 42:\n case 47:\n a: {\n for (u = l + 1; u < J; ++u) {\n switch (e.charCodeAt(u)) {\n case 47:\n if (42 === g && 42 === e.charCodeAt(u - 1) && l + 2 !== u) {\n l = u + 1;\n break a;\n }\n\n break;\n\n case 10:\n if (47 === g) {\n l = u + 1;\n break a;\n }\n\n }\n }\n\n l = u;\n }\n\n }\n\n break;\n\n case 91:\n g++;\n\n case 40:\n g++;\n\n case 34:\n case 39:\n for (; l++ < J && e.charCodeAt(l) !== g;) {\n }\n\n }\n\n if (0 === k) break;\n l++;\n }\n\n k = e.substring(t, l);\n 0 === q && (q = (f = f.replace(ca, '').trim()).charCodeAt(0));\n\n switch (q) {\n case 64:\n 0 < r && (f = f.replace(N, ''));\n g = f.charCodeAt(1);\n\n switch (g) {\n case 100:\n case 109:\n case 115:\n case 45:\n r = c;\n break;\n\n default:\n r = O;\n }\n\n k = M(c, r, k, g, a + 1);\n t = k.length;\n 0 < A && (r = X(O, f, I), C = H(3, k, r, c, D, z, t, g, a, h), f = r.join(''), void 0 !== C && 0 === (t = (k = C.trim()).length) && (g = 0, k = ''));\n if (0 < t) switch (g) {\n case 115:\n f = f.replace(da, ea);\n\n case 100:\n case 109:\n case 45:\n k = f + '{' + k + '}';\n break;\n\n case 107:\n f = f.replace(fa, '$1 $2');\n k = f + '{' + k + '}';\n k = 1 === w || 2 === w && L('@' + k, 3) ? '@-webkit-' + k + '@' + k : '@' + k;\n break;\n\n default:\n k = f + k, 112 === h && (k = (p += k, ''));\n } else k = '';\n break;\n\n default:\n k = M(c, X(c, f, I), k, h, a + 1);\n }\n\n F += k;\n k = I = r = u = q = 0;\n f = '';\n g = e.charCodeAt(++l);\n break;\n\n case 125:\n case 59:\n f = (0 < r ? f.replace(N, '') : f).trim();\n if (1 < (t = f.length)) switch (0 === u && (q = f.charCodeAt(0), 45 === q || 96 < q && 123 > q) && (t = (f = f.replace(' ', ':')).length), 0 < A && void 0 !== (C = H(1, f, c, d, D, z, p.length, h, a, h)) && 0 === (t = (f = C.trim()).length) && (f = '\\x00\\x00'), q = f.charCodeAt(0), g = f.charCodeAt(1), q) {\n case 0:\n break;\n\n case 64:\n if (105 === g || 99 === g) {\n G += f + e.charAt(l);\n break;\n }\n\n default:\n 58 !== f.charCodeAt(t - 1) && (p += P(f, q, g, f.charCodeAt(2)));\n }\n I = r = u = q = 0;\n f = '';\n g = e.charCodeAt(++l);\n }\n }\n\n switch (g) {\n case 13:\n case 10:\n 47 === b ? b = 0 : 0 === 1 + q && 107 !== h && 0 < f.length && (r = 1, f += '\\x00');\n 0 < A * Y && H(0, f, c, d, D, z, p.length, h, a, h);\n z = 1;\n D++;\n break;\n\n case 59:\n case 125:\n if (0 === b + n + v + m) {\n z++;\n break;\n }\n\n default:\n z++;\n y = e.charAt(l);\n\n switch (g) {\n case 9:\n case 32:\n if (0 === n + m + b) switch (x) {\n case 44:\n case 58:\n case 9:\n case 32:\n y = '';\n break;\n\n default:\n 32 !== g && (y = ' ');\n }\n break;\n\n case 0:\n y = '\\\\0';\n break;\n\n case 12:\n y = '\\\\f';\n break;\n\n case 11:\n y = '\\\\v';\n break;\n\n case 38:\n 0 === n + b + m && (r = I = 1, y = '\\f' + y);\n break;\n\n case 108:\n if (0 === n + b + m + E && 0 < u) switch (l - u) {\n case 2:\n 112 === x && 58 === e.charCodeAt(l - 3) && (E = x);\n\n case 8:\n 111 === K && (E = K);\n }\n break;\n\n case 58:\n 0 === n + b + m && (u = l);\n break;\n\n case 44:\n 0 === b + v + n + m && (r = 1, y += '\\r');\n break;\n\n case 34:\n case 39:\n 0 === b && (n = n === g ? 0 : 0 === n ? g : n);\n break;\n\n case 91:\n 0 === n + b + v && m++;\n break;\n\n case 93:\n 0 === n + b + v && m--;\n break;\n\n case 41:\n 0 === n + b + m && v--;\n break;\n\n case 40:\n if (0 === n + b + m) {\n if (0 === q) switch (2 * x + 3 * K) {\n case 533:\n break;\n\n default:\n q = 1;\n }\n v++;\n }\n\n break;\n\n case 64:\n 0 === b + v + n + m + u + k && (k = 1);\n break;\n\n case 42:\n case 47:\n if (!(0 < n + m + v)) switch (b) {\n case 0:\n switch (2 * g + 3 * e.charCodeAt(l + 1)) {\n case 235:\n b = 47;\n break;\n\n case 220:\n t = l, b = 42;\n }\n\n break;\n\n case 42:\n 47 === g && 42 === x && t + 2 !== l && (33 === e.charCodeAt(t + 2) && (p += e.substring(t, l + 1)), y = '', b = 0);\n }\n }\n\n 0 === b && (f += y);\n }\n\n K = x;\n x = g;\n l++;\n }\n\n t = p.length;\n\n if (0 < t) {\n r = c;\n if (0 < A && (C = H(2, p, r, d, D, z, t, h, a, h), void 0 !== C && 0 === (p = C).length)) return G + p + F;\n p = r.join(',') + '{' + p + '}';\n\n if (0 !== w * E) {\n 2 !== w || L(p, 2) || (E = 0);\n\n switch (E) {\n case 111:\n p = p.replace(ha, ':-moz-$1') + p;\n break;\n\n case 112:\n p = p.replace(Q, '::-webkit-input-$1') + p.replace(Q, '::-moz-$1') + p.replace(Q, ':-ms-input-$1') + p;\n }\n\n E = 0;\n }\n }\n\n return G + p + F;\n }\n\n function X(d, c, e) {\n var h = c.trim().split(ia);\n c = h;\n var a = h.length,\n m = d.length;\n\n switch (m) {\n case 0:\n case 1:\n var b = 0;\n\n for (d = 0 === m ? '' : d[0] + ' '; b < a; ++b) {\n c[b] = Z(d, c[b], e).trim();\n }\n\n break;\n\n default:\n var v = b = 0;\n\n for (c = []; b < a; ++b) {\n for (var n = 0; n < m; ++n) {\n c[v++] = Z(d[n] + ' ', h[b], e).trim();\n }\n }\n\n }\n\n return c;\n }\n\n function Z(d, c, e) {\n var h = c.charCodeAt(0);\n 33 > h && (h = (c = c.trim()).charCodeAt(0));\n\n switch (h) {\n case 38:\n return c.replace(F, '$1' + d.trim());\n\n case 58:\n return d.trim() + c.replace(F, '$1' + d.trim());\n\n default:\n if (0 < 1 * e && 0 < c.indexOf('\\f')) return c.replace(F, (58 === d.charCodeAt(0) ? '' : '$1') + d.trim());\n }\n\n return d + c;\n }\n\n function P(d, c, e, h) {\n var a = d + ';',\n m = 2 * c + 3 * e + 4 * h;\n\n if (944 === m) {\n d = a.indexOf(':', 9) + 1;\n var b = a.substring(d, a.length - 1).trim();\n b = a.substring(0, d).trim() + b + ';';\n return 1 === w || 2 === w && L(b, 1) ? '-webkit-' + b + b : b;\n }\n\n if (0 === w || 2 === w && !L(a, 1)) return a;\n\n switch (m) {\n case 1015:\n return 97 === a.charCodeAt(10) ? '-webkit-' + a + a : a;\n\n case 951:\n return 116 === a.charCodeAt(3) ? '-webkit-' + a + a : a;\n\n case 963:\n return 110 === a.charCodeAt(5) ? '-webkit-' + a + a : a;\n\n case 1009:\n if (100 !== a.charCodeAt(4)) break;\n\n case 969:\n case 942:\n return '-webkit-' + a + a;\n\n case 978:\n return '-webkit-' + a + '-moz-' + a + a;\n\n case 1019:\n case 983:\n return '-webkit-' + a + '-moz-' + a + '-ms-' + a + a;\n\n case 883:\n if (45 === a.charCodeAt(8)) return '-webkit-' + a + a;\n if (0 < a.indexOf('image-set(', 11)) return a.replace(ja, '$1-webkit-$2') + a;\n break;\n\n case 932:\n if (45 === a.charCodeAt(4)) switch (a.charCodeAt(5)) {\n case 103:\n return '-webkit-box-' + a.replace('-grow', '') + '-webkit-' + a + '-ms-' + a.replace('grow', 'positive') + a;\n\n case 115:\n return '-webkit-' + a + '-ms-' + a.replace('shrink', 'negative') + a;\n\n case 98:\n return '-webkit-' + a + '-ms-' + a.replace('basis', 'preferred-size') + a;\n }\n return '-webkit-' + a + '-ms-' + a + a;\n\n case 964:\n return '-webkit-' + a + '-ms-flex-' + a + a;\n\n case 1023:\n if (99 !== a.charCodeAt(8)) break;\n b = a.substring(a.indexOf(':', 15)).replace('flex-', '').replace('space-between', 'justify');\n return '-webkit-box-pack' + b + '-webkit-' + a + '-ms-flex-pack' + b + a;\n\n case 1005:\n return ka.test(a) ? a.replace(aa, ':-webkit-') + a.replace(aa, ':-moz-') + a : a;\n\n case 1e3:\n b = a.substring(13).trim();\n c = b.indexOf('-') + 1;\n\n switch (b.charCodeAt(0) + b.charCodeAt(c)) {\n case 226:\n b = a.replace(G, 'tb');\n break;\n\n case 232:\n b = a.replace(G, 'tb-rl');\n break;\n\n case 220:\n b = a.replace(G, 'lr');\n break;\n\n default:\n return a;\n }\n\n return '-webkit-' + a + '-ms-' + b + a;\n\n case 1017:\n if (-1 === a.indexOf('sticky', 9)) break;\n\n case 975:\n c = (a = d).length - 10;\n b = (33 === a.charCodeAt(c) ? a.substring(0, c) : a).substring(d.indexOf(':', 7) + 1).trim();\n\n switch (m = b.charCodeAt(0) + (b.charCodeAt(7) | 0)) {\n case 203:\n if (111 > b.charCodeAt(8)) break;\n\n case 115:\n a = a.replace(b, '-webkit-' + b) + ';' + a;\n break;\n\n case 207:\n case 102:\n a = a.replace(b, '-webkit-' + (102 < m ? 'inline-' : '') + 'box') + ';' + a.replace(b, '-webkit-' + b) + ';' + a.replace(b, '-ms-' + b + 'box') + ';' + a;\n }\n\n return a + ';';\n\n case 938:\n if (45 === a.charCodeAt(5)) switch (a.charCodeAt(6)) {\n case 105:\n return b = a.replace('-items', ''), '-webkit-' + a + '-webkit-box-' + b + '-ms-flex-' + b + a;\n\n case 115:\n return '-webkit-' + a + '-ms-flex-item-' + a.replace(ba, '') + a;\n\n default:\n return '-webkit-' + a + '-ms-flex-line-pack' + a.replace('align-content', '').replace(ba, '') + a;\n }\n break;\n\n case 973:\n case 989:\n if (45 !== a.charCodeAt(3) || 122 === a.charCodeAt(4)) break;\n\n case 931:\n case 953:\n if (!0 === la.test(d)) return 115 === (b = d.substring(d.indexOf(':') + 1)).charCodeAt(0) ? P(d.replace('stretch', 'fill-available'), c, e, h).replace(':fill-available', ':stretch') : a.replace(b, '-webkit-' + b) + a.replace(b, '-moz-' + b.replace('fill-', '')) + a;\n break;\n\n case 962:\n if (a = '-webkit-' + a + (102 === a.charCodeAt(5) ? '-ms-' + a : '') + a, 211 === e + h && 105 === a.charCodeAt(13) && 0 < a.indexOf('transform', 10)) return a.substring(0, a.indexOf(';', 27) + 1).replace(ma, '$1-webkit-$2') + a;\n }\n\n return a;\n }\n\n function L(d, c) {\n var e = d.indexOf(1 === c ? ':' : '{'),\n h = d.substring(0, 3 !== c ? e : 10);\n e = d.substring(e + 1, d.length - 1);\n return R(2 !== c ? h : h.replace(na, '$1'), e, c);\n }\n\n function ea(d, c) {\n var e = P(c, c.charCodeAt(0), c.charCodeAt(1), c.charCodeAt(2));\n return e !== c + ';' ? e.replace(oa, ' or ($1)').substring(4) : '(' + c + ')';\n }\n\n function H(d, c, e, h, a, m, b, v, n, q) {\n for (var g = 0, x = c, w; g < A; ++g) {\n switch (w = S[g].call(B, d, x, e, h, a, m, b, v, n, q)) {\n case void 0:\n case !1:\n case !0:\n case null:\n break;\n\n default:\n x = w;\n }\n }\n\n if (x !== c) return x;\n }\n\n function T(d) {\n switch (d) {\n case void 0:\n case null:\n A = S.length = 0;\n break;\n\n default:\n if ('function' === typeof d) S[A++] = d;else if ('object' === typeof d) for (var c = 0, e = d.length; c < e; ++c) {\n T(d[c]);\n } else Y = !!d | 0;\n }\n\n return T;\n }\n\n function U(d) {\n d = d.prefix;\n void 0 !== d && (R = null, d ? 'function' !== typeof d ? w = 1 : (w = 2, R = d) : w = 0);\n return U;\n }\n\n function B(d, c) {\n var e = d;\n 33 > e.charCodeAt(0) && (e = e.trim());\n V = e;\n e = [V];\n\n if (0 < A) {\n var h = H(-1, c, e, e, D, z, 0, 0, 0, 0);\n void 0 !== h && 'string' === typeof h && (c = h);\n }\n\n var a = M(O, e, c, 0, 0);\n 0 < A && (h = H(-2, a, e, e, D, z, a.length, 0, 0, 0), void 0 !== h && (a = h));\n V = '';\n E = 0;\n z = D = 1;\n return a;\n }\n\n var ca = /^\\0+/g,\n N = /[\\0\\r\\f]/g,\n aa = /: */g,\n ka = /zoo|gra/,\n ma = /([,: ])(transform)/g,\n ia = /,\\r+?/g,\n F = /([\\t\\r\\n ])*\\f?&/g,\n fa = /@(k\\w+)\\s*(\\S*)\\s*/,\n Q = /::(place)/g,\n ha = /:(read-only)/g,\n G = /[svh]\\w+-[tblr]{2}/,\n da = /\\(\\s*(.*)\\s*\\)/g,\n oa = /([\\s\\S]*?);/g,\n ba = /-self|flex-/g,\n na = /[^]*?(:[rp][el]a[\\w-]+)[^]*/,\n la = /stretch|:\\s*\\w+\\-(?:conte|avail)/,\n ja = /([^-])(image-set\\()/,\n z = 1,\n D = 1,\n E = 0,\n w = 1,\n O = [],\n S = [],\n A = 0,\n R = null,\n Y = 0,\n V = '';\n B.use = T;\n B.set = U;\n void 0 !== W && U(W);\n return B;\n}\n\nexport default stylis_min;\n","var unitlessKeys = {\n animationIterationCount: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n boxFlex: 1,\n boxFlexGroup: 1,\n boxOrdinalGroup: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexPositive: 1,\n flexShrink: 1,\n flexNegative: 1,\n flexOrder: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n msGridRow: 1,\n msGridRowSpan: 1,\n msGridColumn: 1,\n msGridColumnSpan: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n // SVG-related properties\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1\n};\n\nexport default unitlessKeys;\n","function memoize(fn) {\n var cache = Object.create(null);\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport { memoize as default };\n","import memoize from '@emotion/memoize';\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar isPropValid = /* #__PURE__ */memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport { isPropValid as default };\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||\"object\"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","import{typeOf as e,isElement as t,isValidElementType as n}from\"react-is\";import r,{useState as o,useContext as s,useMemo as i,useEffect as a,useRef as c,createElement as u,useLayoutEffect as l}from\"react\";import d from\"shallowequal\";import h from\"@emotion/stylis\";import p from\"@emotion/unitless\";import f from\"@emotion/is-prop-valid\";import m from\"hoist-non-react-statics\";function y(){return(y=Object.assign||function(e){for(var t=1;t ({})}\\n```\\n\\n',8:'ThemeProvider: Please make your \"theme\" prop an object.\\n\\n',9:\"Missing document ``\\n\\n\",10:\"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\\n\\n\",11:\"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\\n\\n\",12:\"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\\\`\\\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\\n\\n\",13:\"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\\n\\n\",14:'ThemeProvider: \"theme\" prop is required.\\n\\n',15:\"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to ``, please make sure each plugin is uniquely-named, e.g.\\n\\n```js\\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\\n```\\n\\n\",16:\"Reached the limit of how many styled components may be created at group %s.\\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\\nas for instance in your render method then you may be running into this limitation.\\n\\n\",17:\"CSSStyleSheet could not be found on HTMLStyleElement.\\nHas styled-components' style tag been unmounted or altered by another script?\\n\"}:{};function R(){for(var e=arguments.length<=0?void 0:arguments[0],t=[],n=1,r=arguments.length;n1?t-1:0),r=1;r0?\" Args: \"+n.join(\", \"):\"\")):new Error(R.apply(void 0,[O[e]].concat(n)).trim())}var j=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&D(16,\"\"+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;s=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s1<<30)&&D(16,\"\"+t),T.set(e,t),x.set(t,e),t},B=function(e){return x.get(e)},z=function(e,t){t>=k&&(k=t+1),T.set(e,t),x.set(t,e)},M=\"style[\"+N+'][data-styled-version=\"5.3.11\"]',G=new RegExp(\"^\"+N+'\\\\.g(\\\\d+)\\\\[id=\"([\\\\w\\\\d-]+)\"\\\\].*?\"([^\"]*)'),L=function(e,t,n){for(var r,o=n.split(\",\"),s=0,i=o.length;s=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(N))return r}}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(N,\"active\"),r.setAttribute(\"data-styled-version\",\"5.3.11\");var i=Y();return i&&r.setAttribute(\"nonce\",i),n.insertBefore(r,s),r},H=function(){function e(e){var t=this.element=q(e);t.appendChild(document.createTextNode(\"\")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e0&&(u+=e+\",\")})),r+=\"\"+a+c+'{content:\"'+u+'\"}/*!sc*/\\n'}}}return r}(this)},e}(),Z=/(a)(d)/gi,K=function(e){return String.fromCharCode(e+(e>25?39:97))};function Q(e){var t,n=\"\";for(t=Math.abs(e);t>52;t=t/52|0)n=K(t%52)+n;return(K(t%52)+n).replace(Z,\"$1-$2\")}var ee=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},te=function(e){return ee(5381,e)};function ne(e){for(var t=0;t>>0);if(!t.hasNameForId(r,i)){var a=n(s,\".\"+i,void 0,r);t.insertRules(r,i,a)}o.push(i),this.staticRulesId=i}else{for(var c=this.rules.length,u=ee(this.baseHash,n.hash),l=\"\",d=0;d>>0);if(!t.hasNameForId(r,m)){var y=n(l,\".\"+m,void 0,r);t.insertRules(r,m,y)}o.push(m)}}return o.join(\" \")},e}(),se=/^\\s*\\/\\/.*$/gm,ie=[\":\",\"[\",\".\",\"#\"];function ae(e){var t,n,r,o,s=void 0===e?w:e,i=s.options,a=void 0===i?w:i,c=s.plugins,u=void 0===c?S:c,l=new h(a),d=[],p=function(e){function t(t){if(t)try{e(t+\"}\")}catch(e){}}return function(n,r,o,s,i,a,c,u,l,d){switch(n){case 1:if(0===l&&64===r.charCodeAt(0))return e(r+\";\"),\"\";break;case 2:if(0===u)return r+\"/*|*/\";break;case 3:switch(u){case 102:case 112:return e(o[0]+r),\"\";default:return r+(0===d?\"/*|*/\":\"\")}case-2:r.split(\"/*|*/}\").forEach(t)}}}((function(e){d.push(e)})),f=function(e,r,s){return 0===r&&-1!==ie.indexOf(s[n.length])||s.match(o)?e:\".\"+t};function m(e,s,i,a){void 0===a&&(a=\"&\");var c=e.replace(se,\"\"),u=s&&i?i+\" \"+s+\" { \"+c+\" }\":c;return t=a,n=s,r=new RegExp(\"\\\\\"+n+\"\\\\b\",\"g\"),o=new RegExp(\"(\\\\\"+n+\"\\\\b){2,}\"),l(i||!s?\"\":s,u)}return l.use([].concat(u,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(n)>0&&(o[0]=o[0].replace(r,f))},p,function(e){if(-2===e){var t=d;return d=[],t}}])),m.hash=u.length?u.reduce((function(e,t){return t.name||D(15),ee(e,t.name)}),5381).toString():\"\",m}var ce=r.createContext(),ue=ce.Consumer,le=r.createContext(),de=(le.Consumer,new X),he=ae();function pe(){return s(ce)||de}function fe(){return s(le)||he}function me(e){var t=o(e.stylisPlugins),n=t[0],s=t[1],c=pe(),u=i((function(){var t=c;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),l=i((function(){return ae({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return a((function(){d(n,e.stylisPlugins)||s(e.stylisPlugins)}),[e.stylisPlugins]),r.createElement(ce.Provider,{value:u},r.createElement(le.Provider,{value:l},\"production\"!==process.env.NODE_ENV?r.Children.only(e.children):e.children))}var ye=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=he);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,\"@keyframes\"))},this.toString=function(){return D(12,String(n.name))},this.name=e,this.id=\"sc-keyframes-\"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=he),this.name+e.hash},e}(),ve=/([A-Z])/,ge=/([A-Z])/g,Se=/^ms-/,we=function(e){return\"-\"+e.toLowerCase()};function Ee(e){return ve.test(e)?e.replace(ge,we).replace(Se,\"-ms-\"):e}var be=function(e){return null==e||!1===e||\"\"===e};function _e(e,n,r,o){if(Array.isArray(e)){for(var s,i=[],a=0,c=e.length;a1?t-1:0),r=1;r1?t-1:0),i=1;i?@[\\\\\\]^`{|}~-]+/g,De=/(^-|-$)/g;function je(e){return e.replace(Re,\"-\").replace(De,\"\")}var Te=function(e){return Q(te(e)>>>0)};function xe(e){return\"string\"==typeof e&&(\"production\"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var ke=function(e){return\"function\"==typeof e||\"object\"==typeof e&&null!==e&&!Array.isArray(e)},Ve=function(e){return\"__proto__\"!==e&&\"constructor\"!==e&&\"prototype\"!==e};function Be(e,t,n){var r=e[n];ke(t)&&ke(r)?ze(r,t):e[n]=t}function ze(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0||(o[n]=e[n]);return o}(t,[\"componentId\"]),s=r&&r+\"-\"+(xe(e)?e:je(b(e)));return Ye(e,y({},o,{attrs:g,componentId:s}),n)},Object.defineProperty(A,\"defaultProps\",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=o?ze({},e.defaultProps,t):t}}),\"production\"!==process.env.NODE_ENV&&(Pe(p,v),A.warnTooManyClasses=function(e,t){var n={},r=!1;return function(o){if(!r&&(n[o]=!0,Object.keys(n).length>=200)){var s=t?' with the id of \"'+t+'\"':\"\";console.warn(\"Over 200 classes were generated for component \"+e+s+\".\\nConsider using the attrs method, together with a style object for frequently changed styles.\\nExample:\\n const Component = styled.div.attrs(props => ({\\n style: {\\n background: props.background,\\n },\\n }))`width: 100%;`\\n\\n \"),r=!0,n={}}}}(p,v)),Object.defineProperty(A,\"toString\",{value:function(){return\".\"+A.styledComponentId}}),i&&m(A,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),A}var qe=function(e){return function e(t,r,o){if(void 0===o&&(o=w),!n(r))return D(1,String(r));var s=function(){return t(r,o,Ae.apply(void 0,arguments))};return s.withConfig=function(n){return e(t,r,y({},o,{},n))},s.attrs=function(n){return e(t,r,y({},o,{attrs:Array.prototype.concat(o.attrs,n).filter(Boolean)}))},s}(Ye,e)};[\"a\",\"abbr\",\"address\",\"area\",\"article\",\"aside\",\"audio\",\"b\",\"base\",\"bdi\",\"bdo\",\"big\",\"blockquote\",\"body\",\"br\",\"button\",\"canvas\",\"caption\",\"cite\",\"code\",\"col\",\"colgroup\",\"data\",\"datalist\",\"dd\",\"del\",\"details\",\"dfn\",\"dialog\",\"div\",\"dl\",\"dt\",\"em\",\"embed\",\"fieldset\",\"figcaption\",\"figure\",\"footer\",\"form\",\"h1\",\"h2\",\"h3\",\"h4\",\"h5\",\"h6\",\"head\",\"header\",\"hgroup\",\"hr\",\"html\",\"i\",\"iframe\",\"img\",\"input\",\"ins\",\"kbd\",\"keygen\",\"label\",\"legend\",\"li\",\"link\",\"main\",\"map\",\"mark\",\"marquee\",\"menu\",\"menuitem\",\"meta\",\"meter\",\"nav\",\"noscript\",\"object\",\"ol\",\"optgroup\",\"option\",\"output\",\"p\",\"param\",\"picture\",\"pre\",\"progress\",\"q\",\"rp\",\"rt\",\"ruby\",\"s\",\"samp\",\"script\",\"section\",\"select\",\"small\",\"source\",\"span\",\"strong\",\"style\",\"sub\",\"summary\",\"sup\",\"table\",\"tbody\",\"td\",\"textarea\",\"tfoot\",\"th\",\"thead\",\"time\",\"title\",\"tr\",\"track\",\"u\",\"ul\",\"var\",\"video\",\"wbr\",\"circle\",\"clipPath\",\"defs\",\"ellipse\",\"foreignObject\",\"g\",\"image\",\"line\",\"linearGradient\",\"marker\",\"mask\",\"path\",\"pattern\",\"polygon\",\"polyline\",\"radialGradient\",\"rect\",\"stop\",\"svg\",\"text\",\"textPath\",\"tspan\"].forEach((function(e){qe[e]=qe(e)}));var He=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=ne(e),X.registerId(this.componentId+1)}var t=e.prototype;return t.createStyles=function(e,t,n,r){var o=r(_e(this.rules,t,n,r).join(\"\"),\"\"),s=this.componentId+e;n.insertRules(s,s,o)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){e>2&&X.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function $e(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o meta tag to the stylesheet, or simply embedding it manually in your index.html section for a simpler app.\"),t.server&&h(d,e,t,o,n),l((function(){if(!t.server)return h(d,e,t,o,n),function(){return u.removeStyles(d,t)}}),[d,e,t,o,n]),null}function h(e,t,n,r,o){if(u.isStatic)u.renderStyles(e,P,n,o);else{var s=y({},t,{theme:Oe(t,r,d.defaultProps)});u.renderStyles(e,s,n,o)}}return\"production\"!==process.env.NODE_ENV&&Pe(a),r.memo(d)}function We(e){\"production\"!==process.env.NODE_ENV&&\"undefined\"!=typeof navigator&&\"ReactNative\"===navigator.product&&console.warn(\"`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.\");for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r\"+t+\"\"},this.getStyleTags=function(){return e.sealed?D(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return D(2);var n=((t={})[N]=\"\",t[\"data-styled-version\"]=\"5.3.11\",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),o=Y();return o&&(n.nonce=o),[r.createElement(\"style\",y({},n,{key:\"sc-0-0\"}))]},this.seal=function(){e.sealed=!0},this.instance=new X({isServer:!0}),this.sealed=!1}var t=e.prototype;return t.collectStyles=function(e){return this.sealed?D(2):r.createElement(me,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return D(3)},e}(),Je=function(e){var t=r.forwardRef((function(t,n){var o=s(Me),i=e.defaultProps,a=Oe(t,o,i);return\"production\"!==process.env.NODE_ENV&&void 0===a&&console.warn('[withTheme] You are not using a ThemeProvider nor passing a theme prop or a theme in defaultProps in component class \"'+b(e)+'\"'),r.createElement(e,y({},t,{theme:a,ref:n}))}));return m(t,e),t.displayName=\"WithTheme(\"+b(e)+\")\",t},Xe=function(){return s(Me)},Ze={StyleSheet:X,masterSheet:de};\"production\"!==process.env.NODE_ENV&&\"undefined\"!=typeof navigator&&\"ReactNative\"===navigator.product&&console.warn(\"It looks like you've imported 'styled-components' on React Native.\\nPerhaps you're looking to import 'styled-components/native'?\\nRead more about this at https://www.styled-components.com/docs/basics#react-native\"),\"production\"!==process.env.NODE_ENV&&\"test\"!==process.env.NODE_ENV&&\"undefined\"!=typeof window&&(window[\"__styled-components-init__\"]=window[\"__styled-components-init__\"]||0,1===window[\"__styled-components-init__\"]&&console.warn(\"It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\\n\\nSee https://s-c.sh/2BAXzed for more info.\"),window[\"__styled-components-init__\"]+=1);export default qe;export{Ue as ServerStyleSheet,ue as StyleSheetConsumer,ce as StyleSheetContext,me as StyleSheetManager,Ge as ThemeConsumer,Me as ThemeContext,Le as ThemeProvider,Ze as __PRIVATE__,$e as createGlobalStyle,Ae as css,_ as isStyledComponent,We as keyframes,Xe as useTheme,A as version,Je as withTheme};\n//# sourceMappingURL=styled-components.browser.esm.js.map\n","/**\n * Lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright OpenJS Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the size to enable large array optimizations. */\nvar LARGE_ARRAY_SIZE = 200;\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n asyncTag = '[object AsyncFunction]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n nullTag = '[object Null]',\n objectTag = '[object Object]',\n proxyTag = '[object Proxy]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n undefinedTag = '[object Undefined]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\n/**\n * The base implementation of `_.times` without support for iteratee shorthands\n * or max array length checks.\n *\n * @private\n * @param {number} n The number of times to invoke `iteratee`.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the array of results.\n */\nfunction baseTimes(n, iteratee) {\n var index = -1,\n result = Array(n);\n\n while (++index < n) {\n result[index] = iteratee(index);\n }\n return result;\n}\n\n/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Used to infer the `Object` constructor. */\nvar objectCtorString = funcToString.call(Object);\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined,\n Symbol = root.Symbol,\n Uint8Array = root.Uint8Array,\n allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined,\n getPrototype = overArg(Object.getPrototypeOf, Object),\n objectCreate = Object.create,\n propertyIsEnumerable = objectProto.propertyIsEnumerable,\n splice = arrayProto.splice,\n symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,\n nativeMax = Math.max,\n nativeNow = Date.now;\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map'),\n nativeCreate = getNative(Object, 'create');\n\n/**\n * The base implementation of `_.create` without support for assigning\n * properties to the created object.\n *\n * @private\n * @param {Object} proto The object to inherit from.\n * @returns {Object} Returns the new object.\n */\nvar baseCreate = (function() {\n function object() {}\n return function(proto) {\n if (!isObject(proto)) {\n return {};\n }\n if (objectCreate) {\n return objectCreate(proto);\n }\n object.prototype = proto;\n var result = new object;\n object.prototype = undefined;\n return result;\n };\n}());\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Creates a stack cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Stack(entries) {\n var data = this.__data__ = new ListCache(entries);\n this.size = data.size;\n}\n\n/**\n * Removes all key-value entries from the stack.\n *\n * @private\n * @name clear\n * @memberOf Stack\n */\nfunction stackClear() {\n this.__data__ = new ListCache;\n this.size = 0;\n}\n\n/**\n * Removes `key` and its value from the stack.\n *\n * @private\n * @name delete\n * @memberOf Stack\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction stackDelete(key) {\n var data = this.__data__,\n result = data['delete'](key);\n\n this.size = data.size;\n return result;\n}\n\n/**\n * Gets the stack value for `key`.\n *\n * @private\n * @name get\n * @memberOf Stack\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction stackGet(key) {\n return this.__data__.get(key);\n}\n\n/**\n * Checks if a stack value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Stack\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction stackHas(key) {\n return this.__data__.has(key);\n}\n\n/**\n * Sets the stack `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Stack\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the stack cache instance.\n */\nfunction stackSet(key, value) {\n var data = this.__data__;\n if (data instanceof ListCache) {\n var pairs = data.__data__;\n if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {\n pairs.push([key, value]);\n this.size = ++data.size;\n return this;\n }\n data = this.__data__ = new MapCache(pairs);\n }\n data.set(key, value);\n this.size = data.size;\n return this;\n}\n\n// Add methods to `Stack`.\nStack.prototype.clear = stackClear;\nStack.prototype['delete'] = stackDelete;\nStack.prototype.get = stackGet;\nStack.prototype.has = stackHas;\nStack.prototype.set = stackSet;\n\n/**\n * Creates an array of the enumerable property names of the array-like `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @param {boolean} inherited Specify returning inherited property names.\n * @returns {Array} Returns the array of property names.\n */\nfunction arrayLikeKeys(value, inherited) {\n var isArr = isArray(value),\n isArg = !isArr && isArguments(value),\n isBuff = !isArr && !isArg && isBuffer(value),\n isType = !isArr && !isArg && !isBuff && isTypedArray(value),\n skipIndexes = isArr || isArg || isBuff || isType,\n result = skipIndexes ? baseTimes(value.length, String) : [],\n length = result.length;\n\n for (var key in value) {\n if ((inherited || hasOwnProperty.call(value, key)) &&\n !(skipIndexes && (\n // Safari 9 has enumerable `arguments.length` in strict mode.\n key == 'length' ||\n // Node.js 0.10 has enumerable non-index properties on buffers.\n (isBuff && (key == 'offset' || key == 'parent')) ||\n // PhantomJS 2 has enumerable non-index properties on typed arrays.\n (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||\n // Skip index properties.\n isIndex(key, length)\n ))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * This function is like `assignValue` except that it doesn't assign\n * `undefined` values.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignMergeValue(object, key, value) {\n if ((value !== undefined && !eq(object[key], value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\n/**\n * The base implementation of `baseForOwn` which iterates over `object`\n * properties returned by `keysFunc` and invokes `iteratee` for each property.\n * Iteratee functions may exit iteration early by explicitly returning `false`.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @param {Function} keysFunc The function to get the keys of `object`.\n * @returns {Object} Returns `object`.\n */\nvar baseFor = createBaseFor();\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\n/**\n * The base implementation of `_.keysIn` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeysIn(object) {\n if (!isObject(object)) {\n return nativeKeysIn(object);\n }\n var isProto = isPrototype(object),\n result = [];\n\n for (var key in object) {\n if (!(key == 'constructor' && (isProto || !hasOwnProperty.call(object, key)))) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * The base implementation of `_.merge` without support for multiple sources.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} [customizer] The function to customize merged values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMerge(object, source, srcIndex, customizer, stack) {\n if (object === source) {\n return;\n }\n baseFor(source, function(srcValue, key) {\n stack || (stack = new Stack);\n if (isObject(srcValue)) {\n baseMergeDeep(object, source, key, srcIndex, baseMerge, customizer, stack);\n }\n else {\n var newValue = customizer\n ? customizer(safeGet(object, key), srcValue, (key + ''), object, source, stack)\n : undefined;\n\n if (newValue === undefined) {\n newValue = srcValue;\n }\n assignMergeValue(object, key, newValue);\n }\n }, keysIn);\n}\n\n/**\n * A specialized version of `baseMerge` for arrays and objects which performs\n * deep merges and tracks traversed objects enabling objects with circular\n * references to be merged.\n *\n * @private\n * @param {Object} object The destination object.\n * @param {Object} source The source object.\n * @param {string} key The key of the value to merge.\n * @param {number} srcIndex The index of `source`.\n * @param {Function} mergeFunc The function to merge values.\n * @param {Function} [customizer] The function to customize assigned values.\n * @param {Object} [stack] Tracks traversed source values and their merged\n * counterparts.\n */\nfunction baseMergeDeep(object, source, key, srcIndex, mergeFunc, customizer, stack) {\n var objValue = safeGet(object, key),\n srcValue = safeGet(source, key),\n stacked = stack.get(srcValue);\n\n if (stacked) {\n assignMergeValue(object, key, stacked);\n return;\n }\n var newValue = customizer\n ? customizer(objValue, srcValue, (key + ''), object, source, stack)\n : undefined;\n\n var isCommon = newValue === undefined;\n\n if (isCommon) {\n var isArr = isArray(srcValue),\n isBuff = !isArr && isBuffer(srcValue),\n isTyped = !isArr && !isBuff && isTypedArray(srcValue);\n\n newValue = srcValue;\n if (isArr || isBuff || isTyped) {\n if (isArray(objValue)) {\n newValue = objValue;\n }\n else if (isArrayLikeObject(objValue)) {\n newValue = copyArray(objValue);\n }\n else if (isBuff) {\n isCommon = false;\n newValue = cloneBuffer(srcValue, true);\n }\n else if (isTyped) {\n isCommon = false;\n newValue = cloneTypedArray(srcValue, true);\n }\n else {\n newValue = [];\n }\n }\n else if (isPlainObject(srcValue) || isArguments(srcValue)) {\n newValue = objValue;\n if (isArguments(objValue)) {\n newValue = toPlainObject(objValue);\n }\n else if (!isObject(objValue) || isFunction(objValue)) {\n newValue = initCloneObject(srcValue);\n }\n }\n else {\n isCommon = false;\n }\n }\n if (isCommon) {\n // Recursively merge objects and arrays (susceptible to call stack limits).\n stack.set(srcValue, newValue);\n mergeFunc(newValue, srcValue, srcIndex, customizer, stack);\n stack['delete'](srcValue);\n }\n assignMergeValue(object, key, newValue);\n}\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\n/**\n * Creates a clone of `buffer`.\n *\n * @private\n * @param {Buffer} buffer The buffer to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Buffer} Returns the cloned buffer.\n */\nfunction cloneBuffer(buffer, isDeep) {\n if (isDeep) {\n return buffer.slice();\n }\n var length = buffer.length,\n result = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);\n\n buffer.copy(result);\n return result;\n}\n\n/**\n * Creates a clone of `arrayBuffer`.\n *\n * @private\n * @param {ArrayBuffer} arrayBuffer The array buffer to clone.\n * @returns {ArrayBuffer} Returns the cloned array buffer.\n */\nfunction cloneArrayBuffer(arrayBuffer) {\n var result = new arrayBuffer.constructor(arrayBuffer.byteLength);\n new Uint8Array(result).set(new Uint8Array(arrayBuffer));\n return result;\n}\n\n/**\n * Creates a clone of `typedArray`.\n *\n * @private\n * @param {Object} typedArray The typed array to clone.\n * @param {boolean} [isDeep] Specify a deep clone.\n * @returns {Object} Returns the cloned typed array.\n */\nfunction cloneTypedArray(typedArray, isDeep) {\n var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;\n return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);\n}\n\n/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\n/**\n * Copies properties of `source` to `object`.\n *\n * @private\n * @param {Object} source The object to copy properties from.\n * @param {Array} props The property identifiers to copy.\n * @param {Object} [object={}] The object to copy properties to.\n * @param {Function} [customizer] The function to customize copied values.\n * @returns {Object} Returns `object`.\n */\nfunction copyObject(source, props, object, customizer) {\n var isNew = !object;\n object || (object = {});\n\n var index = -1,\n length = props.length;\n\n while (++index < length) {\n var key = props[index];\n\n var newValue = customizer\n ? customizer(object[key], source[key], key, object, source)\n : undefined;\n\n if (newValue === undefined) {\n newValue = source[key];\n }\n if (isNew) {\n baseAssignValue(object, key, newValue);\n } else {\n assignValue(object, key, newValue);\n }\n }\n return object;\n}\n\n/**\n * Creates a function like `_.assign`.\n *\n * @private\n * @param {Function} assigner The function to assign values.\n * @returns {Function} Returns the new assigner function.\n */\nfunction createAssigner(assigner) {\n return baseRest(function(object, sources) {\n var index = -1,\n length = sources.length,\n customizer = length > 1 ? sources[length - 1] : undefined,\n guard = length > 2 ? sources[2] : undefined;\n\n customizer = (assigner.length > 3 && typeof customizer == 'function')\n ? (length--, customizer)\n : undefined;\n\n if (guard && isIterateeCall(sources[0], sources[1], guard)) {\n customizer = length < 3 ? undefined : customizer;\n length = 1;\n }\n object = Object(object);\n while (++index < length) {\n var source = sources[index];\n if (source) {\n assigner(object, source, index, customizer);\n }\n }\n return object;\n });\n}\n\n/**\n * Creates a base function for methods like `_.forIn` and `_.forOwn`.\n *\n * @private\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseFor(fromRight) {\n return function(object, iteratee, keysFunc) {\n var index = -1,\n iterable = Object(object),\n props = keysFunc(object),\n length = props.length;\n\n while (length--) {\n var key = props[fromRight ? length : ++index];\n if (iteratee(iterable[key], key, iterable) === false) {\n break;\n }\n }\n return object;\n };\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\n/**\n * Initializes an object clone.\n *\n * @private\n * @param {Object} object The object to clone.\n * @returns {Object} Returns the initialized clone.\n */\nfunction initCloneObject(object) {\n return (typeof object.constructor == 'function' && !isPrototype(object))\n ? baseCreate(getPrototype(object))\n : {};\n}\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\n/**\n * Checks if the given arguments are from an iteratee call.\n *\n * @private\n * @param {*} value The potential iteratee value argument.\n * @param {*} index The potential iteratee index or key argument.\n * @param {*} object The potential iteratee object argument.\n * @returns {boolean} Returns `true` if the arguments are from an iteratee call,\n * else `false`.\n */\nfunction isIterateeCall(value, index, object) {\n if (!isObject(object)) {\n return false;\n }\n var type = typeof index;\n if (type == 'number'\n ? (isArrayLike(object) && isIndex(index, object.length))\n : (type == 'string' && index in object)\n ) {\n return eq(object[index], value);\n }\n return false;\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\n/**\n * This function is like\n * [`Object.keys`](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)\n * except that it includes inherited enumerable properties.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction nativeKeysIn(object) {\n var result = [];\n if (object != null) {\n for (var key in Object(object)) {\n result.push(key);\n }\n }\n return result;\n}\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\n/**\n * Gets the value at `key`, unless `key` is \"__proto__\" or \"constructor\".\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction safeGet(object, key) {\n if (key === 'constructor' && typeof object[key] === 'function') {\n return;\n }\n\n if (key == '__proto__') {\n return;\n }\n\n return object[key];\n}\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is a plain object, that is, an object created by the\n * `Object` constructor or one with a `[[Prototype]]` of `null`.\n *\n * @static\n * @memberOf _\n * @since 0.8.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * }\n *\n * _.isPlainObject(new Foo);\n * // => false\n *\n * _.isPlainObject([1, 2, 3]);\n * // => false\n *\n * _.isPlainObject({ 'x': 0, 'y': 0 });\n * // => true\n *\n * _.isPlainObject(Object.create(null));\n * // => true\n */\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || baseGetTag(value) != objectTag) {\n return false;\n }\n var proto = getPrototype(value);\n if (proto === null) {\n return true;\n }\n var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;\n return typeof Ctor == 'function' && Ctor instanceof Ctor &&\n funcToString.call(Ctor) == objectCtorString;\n}\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\n/**\n * Converts `value` to a plain object flattening inherited enumerable string\n * keyed properties of `value` to own properties of the plain object.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {Object} Returns the converted plain object.\n * @example\n *\n * function Foo() {\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.assign({ 'a': 1 }, new Foo);\n * // => { 'a': 1, 'b': 2 }\n *\n * _.assign({ 'a': 1 }, _.toPlainObject(new Foo));\n * // => { 'a': 1, 'b': 2, 'c': 3 }\n */\nfunction toPlainObject(value) {\n return copyObject(value, keysIn(value));\n}\n\n/**\n * Creates an array of the own and inherited enumerable property names of `object`.\n *\n * **Note:** Non-object values are coerced to objects.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n * @example\n *\n * function Foo() {\n * this.a = 1;\n * this.b = 2;\n * }\n *\n * Foo.prototype.c = 3;\n *\n * _.keysIn(new Foo);\n * // => ['a', 'b', 'c'] (iteration order is not guaranteed)\n */\nfunction keysIn(object) {\n return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);\n}\n\n/**\n * This method is like `_.assign` except that it recursively merges own and\n * inherited enumerable string keyed properties of source objects into the\n * destination object. Source properties that resolve to `undefined` are\n * skipped if a destination value exists. Array and plain object properties\n * are merged recursively. Other objects and value types are overridden by\n * assignment. Source objects are applied from left to right. Subsequent\n * sources overwrite property assignments of previous sources.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 0.5.0\n * @category Object\n * @param {Object} object The destination object.\n * @param {...Object} [sources] The source objects.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = {\n * 'a': [{ 'b': 2 }, { 'd': 4 }]\n * };\n *\n * var other = {\n * 'a': [{ 'c': 3 }, { 'e': 5 }]\n * };\n *\n * _.merge(object, other);\n * // => { 'a': [{ 'b': 2, 'c': 3 }, { 'd': 4, 'e': 5 }] }\n */\nvar merge = createAssigner(function(object, source, srcIndex) {\n baseMerge(object, source, srcIndex);\n});\n\n/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\n/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\n/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = merge;\n","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nexport var record = function record(keys, valueType) {\n return keys.reduce(function (toObject, key) {\n return Object.assign(toObject, _defineProperty({}, key, valueType));\n }, {});\n};","export default function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n return arr2;\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return arrayLikeToArray(arr);\n}","export default function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n}","import arrayLikeToArray from \"./arrayLikeToArray.js\";\nexport default function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return arrayLikeToArray(o, minLen);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import arrayWithoutHoles from \"./arrayWithoutHoles.js\";\nimport iterableToArray from \"./iterableToArray.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableSpread from \"./nonIterableSpread.js\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || unsupportedIterableToArray(arr) || nonIterableSpread();\n}","import _toConsumableArray from \"@babel/runtime/helpers/toConsumableArray\";\nexport function generateClassNames(componentName, subClassNames) {\n var generateClassName = function generateClassName(subClassName) {\n return \"Sfx\".concat(componentName).concat(subClassName ? \"-\".concat(subClassName) : '');\n };\n var classNameArray = [];\n if (subClassNames) {\n if (Array.isArray(subClassNames)) {\n classNameArray.push.apply(classNameArray, _toConsumableArray(subClassNames.filter(function (subClassName) {\n return typeof subClassName === 'string';\n }).map(function (subClassName) {\n return generateClassName(subClassName);\n })));\n } else if (typeof subClassNames === 'string') {\n classNameArray.push(generateClassName(subClassNames));\n }\n }\n if (classNameArray.length === 0) {\n classNameArray.push(generateClassName());\n }\n return classNameArray.join(' ');\n}","import { forwardRef } from 'react';\n/**\r\n * Wrapper around React's `forwardRef` function, which adds a `displayName` to each component\r\n * created using it\r\n */\nexport function intrinsicComponent(render, displayName) {\n var component = /*#__PURE__*/forwardRef(render);\n // eslint-disable-next-line immutable/no-mutation\n component.displayName = displayName || render.name;\n return component;\n}","/**\r\n * Type-safe Object.keys\r\n */\nexport function objectKeys(object) {\n return Object.keys(object);\n}","/**\r\n * Type-safe Object.values\r\n */\nexport function objectValues(object) {\n return Object.values(object);\n}","/**\r\n * If your prop can be either a function or a plain value, this function handles\r\n * its usage for you – just provide the reference for a 'maybe function' and the arguments\r\n * to call it with\r\n */\nexport function applyPolymorphicFunctionProp(prop) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n return typeof prop === 'function' ? prop.apply(void 0, args) : prop;\n}","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\n/**\r\n * If you are using a namespace for your styled components, this can come in handy giving each\r\n * styled component in this namespace a displayName which gives better debugging experience\r\n */\nexport function applyDisplayNames(styledObject) {\n return Object.keys(styledObject).reduce(function (newStyledObject, styledComponentName) {\n var styledComponent = styledObject[styledComponentName];\n styledComponent.displayName = \"\".concat(styledComponentName);\n return Object.assign(newStyledObject, _defineProperty({}, styledComponentName, styledComponent));\n }, {});\n}","/**\r\n * passes {value} to {ref}\r\n * Useful if you want to expose the ref of an inner component to the public API\r\n * while still using it inside the component.\r\n * @param ref A ref callback or ref object. If anything falsy, this is a no-op.\r\n */\nexport default function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}","import * as React from 'react';\nimport setRef from './set-ref';\nexport function useForkRef(refA, refB) {\n /**\r\n * This will create a new function if the ref props change and are defined.\r\n * This means react will call the old forkRef with `null` and the new forkRef\r\n * with the ref. Cleanup naturally emerges from this behavior.\r\n */\n return React.useMemo(function () {\n if (refA == null && refB == null) {\n return null;\n }\n return function (refValue) {\n setRef(refA, refValue);\n setRef(refB, refValue);\n };\n }, [refA, refB]);\n}","export function restrictNumber(number) {\n var min = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n var max = arguments.length > 2 ? arguments[2] : undefined;\n // we are not assigning default value for it as if max was null it will override the default value.\n var currentMax = max || 1000000;\n var convertedNumber = +number;\n return Math.min(Math.max(min, convertedNumber), currentMax);\n}","export function mapNumber(number, oldMin, oldMax, newMin, newMax) {\n return (number - oldMin) * (newMax - newMin) / (oldMax - oldMin) + newMin;\n}","import _toConsumableArray from \"@babel/runtime/helpers/toConsumableArray\";\nexport var rgbStringToArray = function rgbStringToArray(rgbColorString) {\n return rgbColorString.replaceAll(/[^\\d,]/gi, '').split(',').map(function (n) {\n return +n;\n });\n};\nexport var hexToRgb = function hexToRgb(hexColor) {\n // if (!hexColor) return { r: 0, g: 0, b: 0 };\n if (!hexColor) return [0, 0, 0];\n return [Number.parseInt(hexColor.slice(1, 3), 16), Number.parseInt(hexColor.slice(3, 5), 16), Number.parseInt(hexColor.slice(5, 7), 16)];\n};\nvar rgbChannelToHex = function rgbChannelToHex(channel) {\n return channel.toString(16).padStart(2, '0');\n};\nexport var rgbToHex = function rgbToHex() {\n for (var _len = arguments.length, rgbColor = new Array(_len), _key = 0; _key < _len; _key++) {\n rgbColor[_key] = arguments[_key];\n }\n return \"#\".concat(rgbColor.map(rgbChannelToHex).join(''));\n};\nexport var hslToHex = function hslToHex(h, s, l) {\n var dividedL = l / 100;\n var a = s * Math.min(dividedL, 1 - dividedL) / 100;\n var f = function f(n) {\n var k = (n + h / 30) % 12;\n var color = dividedL - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n return rgbChannelToHex(Math.round(255 * color));\n };\n return \"#\".concat(f(0)).concat(f(8)).concat(f(4));\n};\nexport var rgbToHsl = function rgbToHsl() {\n for (var _len2 = arguments.length, rgbColor = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n rgbColor[_key2] = arguments[_key2];\n }\n var r = rgbColor[0],\n g = rgbColor[1],\n b = rgbColor[2];\n r /= 255;\n g /= 255;\n b /= 255;\n var min = Math.min(r, g, b);\n var max = Math.max(r, g, b);\n var h;\n var s;\n var l = (max + min) / 2;\n if (max === min) {\n h = 0;\n s = 0;\n } else {\n var diff = max - min;\n s = l > 0.5 ? diff / (2 - max - min) : diff / (max + min);\n switch (max) {\n case r:\n h = (g - b) / diff + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / diff + 2;\n break;\n case b:\n h = (r - g) / diff + 4;\n break;\n default:\n h = 0;\n }\n h /= 6;\n }\n\n // * 360 for having the hue in degrees\n return [Math.round(h * 360), Math.round(s * 100), Math.round(l * 100)];\n};\nexport var colorToHsl = function colorToHsl(color) {\n if (color.startsWith('#')) {\n var hex = color;\n if (color.length === 4) {\n hex = \"#\".concat(color[1]).concat(color[1]).concat(color[2]).concat(color[2]).concat(color[3]).concat(color[3]);\n }\n return rgbToHsl.apply(void 0, _toConsumableArray(hexToRgb(hex)));\n }\n if (color.startsWith('rgb')) {\n var colorInRgb = rgbStringToArray(color);\n return rgbToHsl.apply(void 0, _toConsumableArray(colorInRgb));\n }\n\n // if the color is in text and no one from previous then return the default color which is black\n if (typeof color === 'string') {\n return [0, 0, 0];\n }\n return color;\n};\nexport var colorToRgb = function colorToRgb(color) {\n // we are not handling (hsl/color name) here cause we are accepting only HEX and RGB colors as default colors from user.\n if (color.startsWith('#')) {\n return hexToRgb(color);\n }\n if (color.startsWith('rgb')) {\n return rgbStringToArray(color);\n }\n if (typeof color === 'string') {\n return [0, 0, 0];\n }\n return color;\n};\nexport var colorToHex = function colorToHex(color) {\n if (color.startsWith('#')) {\n if (color.length === 7) {\n return color;\n }\n return \"#\".concat(color[0]).concat(color[0]).concat(color[1]).concat(color[1]).concat(color[2]).concat(color[2]);\n }\n if (color.startsWith('rgb')) {\n return rgbToHex.apply(void 0, _toConsumableArray(rgbStringToArray(color)));\n }\n if (typeof color === 'string') {\n return '#000000';\n }\n return color;\n};\nvar checkIsBlack = function checkIsBlack(s, l) {\n return l === 0 && (s === 0 || s === 1);\n};\nvar checkIsWhite = function checkIsWhite(s, l) {\n return s === 0 && l === 1;\n};\n\n// both hsv and hsl values are in [0, 1] except h is in [0, 360]\nexport var hsvToHsl = function hsvToHsl(h, s, v) {\n var newS = s;\n var l = (2 - s) * v / 2;\n if (l !== 0) {\n if (l === 1) {\n newS = 0;\n } else if (l < 0.5) {\n newS = newS * v / (l * 2);\n } else {\n newS = newS * v / (2 - l * 2);\n }\n }\n var isBlack = checkIsBlack(newS, l);\n return [isBlack || checkIsWhite(newS, l) ? 0 : h, isBlack ? 0 : Math.round(newS * 100), Math.round(l * 100)];\n};\n\n// both hsv and hsl values are in [0, 1] except h is in [0, 360]\nexport var hslToHsv = function hslToHsv(h, s, l) {\n var newS = s;\n var newL = l * 2;\n newS *= newL <= 1 ? newL : 2 - newL;\n var v = (newL + newS) / 2;\n newS = 2 * newS / (newL + newS);\n\n // return [h, newS, v];\n var isBlack = checkIsBlack(newS, l);\n return [isBlack || checkIsWhite(newS, l) ? 0 : h, isBlack ? 0 : Math.round(newS * 100), Math.round(v * 100)];\n};\n\n// TODO: validating 3 color code for Hex\n// /^#([\\da-f]{3}){1,2}$/i.test(color)colorToHex\nexport var validateHex = function validateHex(color) {\n return /^#[\\da-f]{6}$/i.test(color);\n};","export function getElemDocumentCoords(elem) {\n if (!elem) {\n return null;\n }\n var box = elem.getBoundingClientRect();\n var _document = document,\n body = _document.body;\n var docEl = document.documentElement;\n var scrollTop = window.pageYOffset || docEl.scrollTop || body.scrollTop;\n var scrollLeft = window.pageXOffset || docEl.scrollLeft || body.scrollLeft;\n var clientTop = docEl.clientTop || body.clientTop || 0;\n var clientLeft = docEl.clientLeft || body.clientLeft || 0;\n var top = box.top + scrollTop - clientTop;\n var left = box.left + scrollLeft - clientLeft;\n return {\n top: Math.round(top),\n left: Math.round(left),\n width: box.width,\n height: box.height\n };\n}","export function asc(a, b) {\n return a - b;\n}\nexport function valueToPercent(value, min, max) {\n return (value - min) * 100 / (max - min);\n}\nexport function percentToValue(percent, min, max) {\n return (max - min) * percent + min;\n}\nfunction getDecimalPrecision(num) {\n // This handles the case when num is very small (0.00000001), js will turn this into 1e-8.\n // When num is bigger than 1 or less than -1 it won't get converted to this notation so it's fine.\n if (Math.abs(num) < 1) {\n var parts = num.toExponential().split('e-');\n var matissaDecimalPart = parts[0].split('.')[1];\n return (matissaDecimalPart ? matissaDecimalPart.length : 0) + Number.parseInt(parts[1], 10);\n }\n var decimalPart = num.toString().split('.')[1];\n return decimalPart ? decimalPart.length : 0;\n}\nexport function roundValueToStep(value, step, min) {\n var nearest = Math.round((value - min) / step) * step + min;\n return Number(nearest.toFixed(getDecimalPrecision(step)));\n}\nexport function setValueIndex(_ref) {\n var values = _ref.values,\n newValue = _ref.newValue,\n index = _ref.index;\n var output = values.slice();\n output[index] = newValue;\n return output.sort(asc);\n}\nexport function findClosest(values, currentValue) {\n var _values$reduce = values.reduce(function (acc, value, index) {\n var distance = Math.abs(currentValue - value);\n if (acc === null || distance < acc.distance || distance === acc.distance) {\n return {\n distance: distance,\n index: index\n };\n }\n return acc;\n }, null),\n closestIndex = _values$reduce.index;\n return closestIndex;\n}\nexport function ownerDocument(node) {\n return node && node.ownerDocument || document;\n}\nexport function clamp(value, min, max) {\n if (value == null) {\n return min;\n }\n return Math.min(Math.max(min, value), max);\n}\nexport function trackFinger(event, touchId) {\n if (touchId.current !== undefined && event.changedTouches) {\n for (var i = 0; i < event.changedTouches.length; i += 1) {\n var touch = event.changedTouches[i];\n if (touch.identifier === touchId.current) {\n return {\n x: touch.clientX,\n y: touch.clientY\n };\n }\n }\n return false;\n }\n return {\n x: event.clientX,\n y: event.clientY\n };\n}\nexport var axisProps = {\n horizontal: {\n offset: function offset(percent) {\n return {\n left: \"\".concat(percent, \"%\")\n };\n },\n leap: function leap(percent) {\n return {\n width: \"\".concat(percent, \"%\")\n };\n }\n },\n 'horizontal-reverse': {\n offset: function offset(percent) {\n return {\n right: \"\".concat(percent, \"%\")\n };\n },\n leap: function leap(percent) {\n return {\n width: \"\".concat(percent, \"%\")\n };\n }\n },\n vertical: {\n offset: function offset(percent) {\n return {\n bottom: \"\".concat(percent, \"%\")\n };\n },\n leap: function leap(percent) {\n return {\n height: \"\".concat(percent, \"%\")\n };\n }\n }\n};\nexport function focusThumb(_ref2) {\n var sliderRef = _ref2.sliderRef,\n activeIndex = _ref2.activeIndex,\n setActive = _ref2.setActive;\n var doc = ownerDocument(sliderRef.current);\n if (!sliderRef.current.contains(doc.activeElement) || Number(doc.activeElement.getAttribute('data-index')) !== activeIndex) {\n var _sliderRef$current$qu;\n (_sliderRef$current$qu = sliderRef.current.querySelector(\"[type=\\\"range\\\"][data-index=\\\"\".concat(activeIndex, \"\\\"]\"))) === null || _sliderRef$current$qu === void 0 ? void 0 : _sliderRef$current$qu.focus();\n }\n if (setActive) {\n setActive(activeIndex);\n }\n}","export var Color = {\n TextPrimary: 'txt-primary',\n TextSecondary: 'txt-secondary',\n TextSecondaryInvert: 'txt-secondary-invert',\n TextPlaceholder: 'txt-placeholder',\n TextWarning: 'txt-warning',\n TextError: 'txt-error',\n TextInfo: 'txt-info',\n AccentPrimary: 'accent-primary',\n AccentPrimaryHover: 'accent-primary-hover',\n AccentPrimaryActive: 'accent-primary-active',\n AccentPrimaryDisabled: 'accent-primary-disabled',\n AccentSecondaryDisabled: 'accent-secondary-disabled',\n AccentStateless: 'accent-stateless',\n AccentStateless_0_4_Opacity: 'accent-stateless_0_4_opacity',\n Accent_0_5_Opacity: 'accent_0_5_opacity',\n Accent_1_2_Opacity: 'accent_1_2_opacity',\n Accent_1_8_Opacity: 'accent_1_8_opacity',\n Accent_2_8_Opacity: 'accent_2_8_opacity',\n Accent_4_0_Opacity: 'accent_4_0_opacity',\n BackgroundGrey: 'bg-grey',\n BackgroundStateless: 'bg-stateless',\n BackgroundActive: 'bg-active',\n BackgroundBaseLight: 'bg-base-light',\n BackgroundBaseMedium: 'bg-base-medium',\n BackgroundPrimary: 'bg-primary',\n BackgroundPrimaryLight: 'bg-primary-light',\n BackgroundPrimaryHover: 'bg-primary-hover',\n BackgroundPrimaryActive: 'bg-primary-active',\n BackgroundPrimaryStateless: 'bg-primary-stateless',\n BackgroundPrimary_0_5_Opacity: 'bg-primary-0-5-opacity',\n BackgroundSecondary: 'bg-secondary',\n BackgroundHover: 'bg-hover',\n BackgroundGreen: 'bg-green',\n BackgroundGreenMedium: 'bg-green-medium',\n BackgroundBlue: 'bg-blue',\n BackgroundRed: 'bg-red',\n BackgroundRedMedium: 'background-red-medium',\n BackgroundOrange: 'bg-orange',\n BackgroundTooltip: 'bg-tooltip',\n IconsPrimary: 'icon-primary',\n IconsPrimaryOpacity_0_6: 'icons-primary-opacity-0-6',\n IconsSecondary: 'icons-secondary',\n IconsPlaceholder: 'icons-placeholder',\n IconsInvert: 'icons-invert',\n IconsMuted: 'icons-muted',\n IconsPrimaryHover: 'icons-primary-hover',\n IconsSecondaryHover: 'icons-secondary-hover',\n ButtonPrimaryText: 'btn-primary-text',\n ButtonPrimaryText_0_6: 'btn-primary-text-0-6',\n ButtonPrimaryText_0_4: 'btn-primary-text-0-4',\n ButtonDisabledText: 'btn-disabled-text',\n ButtonSecondaryText: 'btn-secondary-text',\n LinkPrimary: 'link-primary',\n LinkStateless: 'link-stateless',\n LinkHover: 'link-hover',\n LinkActive: 'link-active',\n LinkMuted: 'link-muted',\n LinkPressed: 'link-pressed',\n BordersPrimary: 'borders-primary',\n BordersPrimaryHover: 'borders-primary-hover',\n BordersSecondary: 'borders-secondary',\n BordersStrong: 'borders-strong',\n BordersInvert: 'borders-invert',\n BorderHoverBottom: 'border-hover-bottom',\n BorderActiveBottom: 'border-active-bottom',\n BorderPrimaryStateless: 'border-primary-stateless',\n BordersDisabled: 'borders-disabled',\n BordersButton: 'borders-button',\n BordersItem: 'borders-item',\n BordersBaseLight: 'borders-base-light',\n BordersBaseMedium: 'borders-base-medium',\n BordersGreen: 'borders-green',\n BordersGreenMedium: 'borders-green-medium',\n BordersRed: 'borders-red',\n ActiveSecondary: 'active-secondary',\n ActiveSecondaryHover: 'active-secondary-hover',\n Tag: 'tag',\n StatesErrorDisabledText: 'states-error-disabled-text',\n Error: 'error',\n Error_0_28_Opacity: 'error-0-28-opacity',\n Error_0_12_Opacity: 'error-0-12-opacity',\n ErrorHover: 'error-hover',\n ErrorActive: 'error-active',\n Success: 'success',\n SuccessHover: 'success-hover',\n SuccessActive: 'success-Active',\n Warning: 'warning',\n WarningHover: 'warning-hover',\n WarningActive: 'warning-active',\n Info: 'info',\n Modified: 'modified',\n Red: 'red',\n Orange: 'orange',\n Salad: 'salad',\n Green: 'green',\n Blue: 'blue',\n Indigo: 'indigo',\n Violet: 'violet',\n Pink: 'pink',\n GradientRight: 'gradient-right',\n Extra_0_3_Overlay: 'extra-0-3-overlay',\n GradientRightActive: 'gradient-right-active',\n GradientRightHover: 'gradient-right-hover',\n Extra_0_5_Overlay: 'extra-0-5-overlay',\n Extra_0_7_Overlay: 'extra-0-7-overlay',\n Extra_0_9_Overlay: 'extra-0-9-overlay',\n Red_0_1_Overlay: 'red-0-1-overlay',\n Orange_0_1_Overlay: 'orange-0-1-overlay',\n Accent_0_8_Overlay: 'accent-0-8-overlay',\n Link: 'link',\n Camera: 'camera',\n GoogleDrive: 'google-drive',\n Dropbox: 'dropbox',\n OneDrive: 'one-drive',\n Device: 'device',\n Instagram: 'instagram',\n FreeImages: 'free-images',\n FreeIcons: 'free-icons',\n Canvas: 'canvas',\n Box: 'box',\n ScreenCast: 'screen-cast',\n LightShadow: 'light-shadow',\n MediumShadow: 'medium-shadow',\n LargeShadow: 'large-shadow',\n XLargeShadow: 'x-large-shadow'\n};","import { css } from 'styled-components';\nimport { Color as PaletteColor } from '../types/palette';\nexport var scrollBar = function scrollBar(_ref) {\n var palette = _ref.theme.palette;\n return css([\"scrollbar-color:\", \" \", \";scrollbar-width:thin;::-webkit-scrollbar{width:12px;}::-webkit-scrollbar-track{margin-block:6px;}::-webkit-scrollbar-thumb{background:\", \";border:4px solid \", \";border-radius:99px;padding:4px 6px;background-clip:padding-box;}\"], palette[PaletteColor.IconsMuted], palette[PaletteColor.ActiveSecondary], palette[PaletteColor.Extra_0_3_Overlay], palette[PaletteColor.ActiveSecondary]);\n};","export var Breakpoint = {\n Xs: 'xs',\n Sm: 'sm',\n Md: 'md',\n Lg: 'lg',\n Xl: 'xl',\n Xxl: 'xxl',\n Xxxl: 'xxxl'\n};\nexport var BreakpointClass = {\n Xs: '.sfx-breakpoint-xs',\n Sm: '.sfx-breakpoint-sm',\n Md: '.sfx-breakpoint-md',\n Lg: '.sfx-breakpoint-lg',\n Xl: '.sfx-breakpoint-xl',\n Xxl: '.sfx-breakpoint-xxl',\n Xxxl: '.sfx-breakpoint-xxxl'\n};","export var Shadows = {\n ShadowSm: 'shadow-sm',\n ShadowMd: 'shadow-md',\n ShadowLg: 'shadow-lg',\n ShadowXl: 'shadow-xl',\n Label: 'label',\n Header: 'header',\n HeaderPopup: 'header-popup',\n FooterPopup: 'footer-popup',\n LeftPanelMd: 'left-panel-md',\n RightPanelMd: 'right-panel-md',\n LeftPanelSm: 'left-panel-sm',\n RightPanelSm: 'right-panel-sm'\n};","export var FontWeight = {\n Thin: 100,\n ExtraLight: 200,\n Light: 300,\n Regular: 400,\n Medium: 500,\n SemiBold: 600,\n Bold: 700,\n ExtraBold: 800,\n Black: 900\n};","export var FontVariant = {\n TextExtraSmall: 'text-extra-small',\n TextSmall: 'text-small',\n TextSmallUp: 'text-small-up',\n TextMedium: 'text-medium',\n TextLarge: 'text-large',\n TextExtraLarge: 'text-extra-large',\n TextXExtraLarge: 'text-x-extra-large',\n TitleH6: 'title-h6',\n TitleH5: 'title-h5',\n TitleH4: 'title-h4',\n TitleH3: 'title-h3',\n TitleH2: 'title-h2',\n TitleH1: 'title-h1',\n LabelExtraSmall: 'label-extra-small',\n LabelExtraSmallEmphasis: 'label-extra-small-emphasis',\n LabelExtraSmallUp: 'label-extra-small-up',\n LabelSmall: 'label-small',\n LabelSmallEmphasis: 'label-small-emphasis',\n LabelSmallUp: 'label-small-up',\n LabelSmallUpEmphasis: 'label-small-up-emphasis',\n LabelMedium: 'label-medium',\n LabelMediumEmphasis: 'label-medium-emphasis',\n LabelLarge: 'label-large',\n LabelLargeEmphasis: 'label-large-emphasis',\n LabelLargeUp: 'label-large-up',\n LabelExtraLargeEmphasis: 'label-extra-large-emphasis',\n LabelExtraLarge: 'label-extra-large',\n LabelXExtraLargeEmphasis: 'label-x-extra-large-emphasis',\n LabelXExtraLarge: 'label-x-extra-large',\n LabelXXExtraLargeEmphasis: 'label-x-x-extra-large-emphasis',\n LabelXXExtraLarge: 'label-x-x-extra-large',\n LabelXXXExtraLarge: 'label-x-x-x-extra-large',\n ButtonSmEmphasis: 'btn-sm-emphasis',\n ButtonSm: 'btn-sm',\n ButtonSmUpEmphasis: 'btn-sm-up-emphasis',\n ButtonSmUp: 'btn-sm-up',\n ButtonMdEmphasis: 'btn-md-emphasis',\n ButtonMd: 'btn-md',\n ButtonLgEmphasis: 'btn-lg-emphasis',\n ButtonLg: 'btn-lg',\n ButtonLgUpEmphasis: 'btn-lg-up-emphasis',\n ButtonLgUp: 'btn-lg-up',\n LinkSmall: 'link-small',\n LinkSmallEmphasis: 'link-small-emphasis',\n LinkSmallUp: 'link-small-up',\n LinkSmallUpEmphasis: 'link-small-up-emphasis',\n LinkMedium: 'link-medium',\n LinkMediumEmphasis: 'link-medium-emphasis',\n LinkLarge: 'link-large',\n LinkLargeEmphasis: 'link-large-emphasis',\n LinkLargeUp: 'link-large-up',\n LinkLargeUpEmphasis: 'link-large-up-emphasis',\n InputSm: 'input-sm',\n InputSmUp: 'input-sm-up',\n InputMd: 'input-md',\n InputLg: 'input-lg'\n};","export var BorderRadiusSize = {\n Sm: 'sm',\n Md: 'md',\n Lg: 'lg'\n};","import { createGlobalStyle, css } from 'styled-components';\nvar Typography = /*#__PURE__*/createGlobalStyle([\"\", \";\"], function (_ref) {\n var theme = _ref.theme;\n var baseLineHeight = theme.typography.baseLineHeight;\n return css([\"h1,h2,h3,h4,h5,h6,p,small{line-height:\", \";}\"], baseLineHeight);\n});\nexport default Typography;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _labelFontVariants, _textFontVariants, _buttonFontVariants, _linkFontVariants, _inputFontVariants, _titleFontVariants;\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n/* eslint-disable sonarjs/no-duplicate-string */\nimport { FontVariant, FontWeight } from '../../../../utils/types/typography';\nvar fontFamily = '\"Roboto\"';\nvar defaultFontValue = {\n fontFamily: fontFamily,\n fontStyle: 'normal',\n fontWeight: FontWeight.Regular\n};\nvar labelFontVariants = (_labelFontVariants = {}, _defineProperty(_labelFontVariants, FontVariant.LabelExtraSmall, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '10px',\n lineHeight: '12px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelExtraSmallEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: 'Bold',\n fontSize: '10px',\n lineHeight: '12px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelExtraSmallUp, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '11px',\n lineHeight: '12px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelSmall, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '12px',\n lineHeight: '14px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelSmallEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '12px',\n lineHeight: '14px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelSmallUp, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '13px',\n lineHeight: '16px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelSmallUpEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '13px',\n lineHeight: '16px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelMedium, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '14px',\n lineHeight: '16px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelMediumEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '14px',\n lineHeight: '16px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelLarge, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '16px',\n lineHeight: '18px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelLargeEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '16px',\n lineHeight: '18px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelLargeUp, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Regular,\n fontSize: '18px',\n lineHeight: '20px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelExtraLargeEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '24px',\n lineHeight: '28px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelExtraLarge, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Regular,\n fontSize: '24px',\n lineHeight: '28px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelXExtraLargeEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '32px',\n lineHeight: '36px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelXExtraLarge, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '32px',\n lineHeight: '36px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelXXExtraLargeEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '48px',\n lineHeight: '54px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelXXExtraLarge, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '48px',\n lineHeight: '54px'\n})), _defineProperty(_labelFontVariants, FontVariant.LabelXXXExtraLarge, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '60px',\n lineHeight: '68px'\n})), _labelFontVariants);\nvar textFontVariants = (_textFontVariants = {}, _defineProperty(_textFontVariants, FontVariant.TextExtraSmall, _objectSpread(_objectSpread({}, labelFontVariants[FontVariant.LabelExtraSmallUp]), {}, {\n lineHeight: '14px'\n})), _defineProperty(_textFontVariants, FontVariant.TextSmall, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '12px',\n lineHeight: '18px'\n})), _defineProperty(_textFontVariants, FontVariant.TextSmallUp, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '13px',\n lineHeight: '18px'\n})), _defineProperty(_textFontVariants, FontVariant.TextMedium, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '14px',\n lineHeight: '20px'\n})), _defineProperty(_textFontVariants, FontVariant.TextLarge, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '16px',\n lineHeight: '22px'\n})), _defineProperty(_textFontVariants, FontVariant.TextExtraLarge, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '18px',\n lineHeight: '26px'\n})), _defineProperty(_textFontVariants, FontVariant.TextXExtraLarge, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '28px',\n lineHeight: '40px'\n})), _textFontVariants);\nvar buttonFontVariants = (_buttonFontVariants = {}, _defineProperty(_buttonFontVariants, FontVariant.ButtonSmEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '12px',\n lineHeight: '14px'\n})), _defineProperty(_buttonFontVariants, FontVariant.ButtonSm, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '12px',\n lineHeight: '14px'\n})), _defineProperty(_buttonFontVariants, FontVariant.ButtonSmUpEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '13px',\n lineHeight: '16px'\n})), _defineProperty(_buttonFontVariants, FontVariant.ButtonSmUp, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '13px',\n lineHeight: '16px'\n})), _defineProperty(_buttonFontVariants, FontVariant.ButtonMdEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '14px',\n lineHeight: '16px'\n})), _defineProperty(_buttonFontVariants, FontVariant.ButtonMd, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '14px',\n lineHeight: '16px'\n})), _defineProperty(_buttonFontVariants, FontVariant.ButtonLgEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '16px',\n lineHeight: '18px'\n})), _defineProperty(_buttonFontVariants, FontVariant.ButtonLg, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '16px',\n lineHeight: '18px'\n})), _defineProperty(_buttonFontVariants, FontVariant.ButtonLgUpEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '18px',\n lineHeight: '20px'\n})), _defineProperty(_buttonFontVariants, FontVariant.ButtonLgUp, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '18px',\n lineHeight: '20px'\n})), _buttonFontVariants);\nvar linkFontVariants = (_linkFontVariants = {}, _defineProperty(_linkFontVariants, FontVariant.LinkSmall, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '12px',\n lineHeight: '14px'\n})), _defineProperty(_linkFontVariants, FontVariant.LinkSmallEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '12px',\n lineHeight: '14px'\n})), _defineProperty(_linkFontVariants, FontVariant.LinkSmallUp, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '13px',\n lineHeight: '16px'\n})), _defineProperty(_linkFontVariants, FontVariant.LinkSmallUpEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '13px',\n lineHeight: '16px'\n})), _defineProperty(_linkFontVariants, FontVariant.LinkMedium, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '14px',\n lineHeight: '16px'\n})), _defineProperty(_linkFontVariants, FontVariant.LinkMediumEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '14px',\n lineHeight: '16px'\n})), _defineProperty(_linkFontVariants, FontVariant.LinkLarge, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '16px',\n lineHeight: '18px'\n})), _defineProperty(_linkFontVariants, FontVariant.LinkLargeEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '16px',\n lineHeight: '18px'\n})), _defineProperty(_linkFontVariants, FontVariant.LinkLargeUp, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '18px',\n lineHeight: '20px'\n})), _defineProperty(_linkFontVariants, FontVariant.LinkLargeUpEmphasis, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '18px',\n lineHeight: '20px'\n})), _linkFontVariants);\nvar inputFontVariants = (_inputFontVariants = {}, _defineProperty(_inputFontVariants, FontVariant.InputSm, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '12px',\n lineHeight: '14px'\n})), _defineProperty(_inputFontVariants, FontVariant.InputSmUp, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '13px',\n lineHeight: '16px'\n})), _defineProperty(_inputFontVariants, FontVariant.InputMd, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '14px',\n lineHeight: '16px'\n})), _defineProperty(_inputFontVariants, FontVariant.InputLg, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontSize: '16px',\n lineHeight: '18px'\n})), _inputFontVariants);\nvar titleFontVariants = (_titleFontVariants = {}, _defineProperty(_titleFontVariants, FontVariant.TitleH6, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '12px',\n lineHeight: '18px'\n})), _defineProperty(_titleFontVariants, FontVariant.TitleH5, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '14px',\n lineHeight: '21px'\n})), _defineProperty(_titleFontVariants, FontVariant.TitleH4, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '16px',\n lineHeight: '24px'\n})), _defineProperty(_titleFontVariants, FontVariant.TitleH3, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '18px',\n lineHeight: '27px'\n})), _defineProperty(_titleFontVariants, FontVariant.TitleH2, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '20px',\n lineHeight: '30px'\n})), _defineProperty(_titleFontVariants, FontVariant.TitleH1, _objectSpread(_objectSpread({}, defaultFontValue), {}, {\n fontWeight: FontWeight.Medium,\n fontSize: '28px',\n lineHeight: '42px'\n})), _titleFontVariants);\nexport var defaultTypography = {\n // htmlFontSize: '14px',\n fontFamily: fontFamily,\n baseLineHeight: 1.375,\n font: _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, labelFontVariants), textFontVariants), buttonFontVariants), linkFontVariants), inputFontVariants), titleFontVariants)\n};","import { createGlobalStyle /* , css */ } from 'styled-components';\n\n// Example with theme: ${({ theme }) => css``;\n\nvar CommonStyles = /*#__PURE__*/createGlobalStyle([\"@keyframes spinner{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}.Menu-open{overflow:hidden;}.Modal-open{overflow:hidden;}\"]);\nexport default CommonStyles;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _lightPalette;\n/* eslint-disable sonarjs/no-duplicate-string */\nimport { Color } from '../../../../utils/types/palette';\nexport var lightPalette = (_lightPalette = {}, _defineProperty(_lightPalette, Color.TextPrimary, 'rgba(55, 65, 75, 1)'), _defineProperty(_lightPalette, Color.TextSecondary, 'rgba(118, 138, 159, 1)'), _defineProperty(_lightPalette, Color.TextSecondaryInvert, 'rgba(213, 216, 220, 1)'), _defineProperty(_lightPalette, Color.TextPlaceholder, 'rgba(169, 182, 194, 1)'), _defineProperty(_lightPalette, Color.TextWarning, 'rgba(196, 110, 0, 1)'), _defineProperty(_lightPalette, Color.TextError, 'rgba(170, 32, 0, 1)'), _defineProperty(_lightPalette, Color.TextInfo, 'rgba(35, 117, 171, 1)'), _defineProperty(_lightPalette, Color.AccentPrimary, 'rgba(104, 121, 235, 1)'), _defineProperty(_lightPalette, Color.AccentPrimaryHover, 'rgba(96, 111, 209, 1)'), _defineProperty(_lightPalette, Color.AccentPrimaryActive, 'rgba(73, 88, 188, 1)'), _defineProperty(_lightPalette, Color.AccentPrimaryDisabled, 'rgba(233, 238, 242, 1)'), _defineProperty(_lightPalette, Color.AccentSecondaryDisabled, '#F9FBFC'), _defineProperty(_lightPalette, Color.AccentStateless, 'rgba(104, 121, 235, 1)'), _defineProperty(_lightPalette, Color.AccentStateless_0_4_Opacity, 'rgba(104, 121, 235, 0.4)'), _defineProperty(_lightPalette, Color.Accent_0_5_Opacity, 'rgba(104, 121, 235, 0.05)'), _defineProperty(_lightPalette, Color.Accent_1_2_Opacity, 'rgba(104, 121, 235, 0.12)'), _defineProperty(_lightPalette, Color.Accent_1_8_Opacity, 'rgba(104, 121, 235, 0.18)'), _defineProperty(_lightPalette, Color.Accent_2_8_Opacity, 'rgba(104, 121, 235, 0.28)'), _defineProperty(_lightPalette, Color.Accent_4_0_Opacity, 'rgba(104, 121, 235, 0.4)'), _defineProperty(_lightPalette, Color.BackgroundGrey, 'rgba(216, 224, 232, 1)'), _defineProperty(_lightPalette, Color.BackgroundStateless, 'rgba(255, 255, 255, 1)'), _defineProperty(_lightPalette, Color.BackgroundActive, 'rgba(243, 247, 250, 1)'), _defineProperty(_lightPalette, Color.BackgroundBaseLight, 'rgba(235, 239, 252, 1)'), _defineProperty(_lightPalette, Color.BackgroundBaseMedium, 'rgba(227, 231, 251, 1)'), _defineProperty(_lightPalette, Color.BackgroundPrimary, 'rgba(248, 250, 251, 1)'), _defineProperty(_lightPalette, Color.BackgroundPrimaryLight, 'rgba(243, 245, 247, 1)'), _defineProperty(_lightPalette, Color.BackgroundPrimaryHover, 'rgba(239, 243, 246, 1)'), _defineProperty(_lightPalette, Color.BackgroundPrimaryActive, 'rgba(93, 109, 126, 1)'), _defineProperty(_lightPalette, Color.BackgroundPrimary_0_5_Opacity, 'rgba(255, 255, 255, 0.500)'), _defineProperty(_lightPalette, Color.BackgroundPrimaryStateless, '#CCD6DE'), _defineProperty(_lightPalette, Color.BackgroundSecondary, 'rgba(255, 255, 255, 1)'), _defineProperty(_lightPalette, Color.BackgroundHover, 'rgba(249, 251, 252, 1)'), _defineProperty(_lightPalette, Color.BackgroundGreen, 'rgba(237, 250, 244, 1)'), _defineProperty(_lightPalette, Color.BackgroundGreenMedium, 'rgba(227, 250, 239, 1)'), _defineProperty(_lightPalette, Color.BackgroundBlue, 'rgba(244, 249, 255, 1)'), _defineProperty(_lightPalette, Color.BackgroundRed, 'rgba(253, 244, 242, 1)'), _defineProperty(_lightPalette, Color.BackgroundRedMedium, 'rgba(247, 228, 230, 1)'), _defineProperty(_lightPalette, Color.BackgroundOrange, 'rgba(255, 249, 242, 1)'), _defineProperty(_lightPalette, Color.BackgroundTooltip, 'rgba(79, 98, 118, 1)'), _defineProperty(_lightPalette, Color.IconsPrimary, 'rgba(118, 138, 159, 1)'), _defineProperty(_lightPalette, Color.IconsPrimaryOpacity_0_6, 'rgba(93, 109, 126, 0.600)'), _defineProperty(_lightPalette, Color.IconsSecondary, 'rgba(151, 166, 182, 1)'), _defineProperty(_lightPalette, Color.IconsPlaceholder, 'rgba(223, 231, 237, 1)'), _defineProperty(_lightPalette, Color.IconsInvert, 'rgba(255, 255, 255, 1)'), _defineProperty(_lightPalette, Color.IconsMuted, 'rgba(169, 182, 194, 1)'), _defineProperty(_lightPalette, Color.IconsPrimaryHover, 'rgba(79, 98, 118, 1)'), _defineProperty(_lightPalette, Color.IconsSecondaryHover, 'rgba(118, 138, 159, 1)'), _defineProperty(_lightPalette, Color.ButtonPrimaryText, 'rgba(255, 255, 255, 1)'), _defineProperty(_lightPalette, Color.ButtonPrimaryText_0_6, 'rgba(255, 255, 255, 0.6)'), _defineProperty(_lightPalette, Color.ButtonPrimaryText_0_4, 'rgba(255, 255, 255, 0.4)'), _defineProperty(_lightPalette, Color.ButtonDisabledText, 'rgba(169, 182, 194, 1)'), _defineProperty(_lightPalette, Color.ButtonSecondaryText, 'rgba(0, 0, 0, 1)'), _defineProperty(_lightPalette, Color.LinkPrimary, 'rgba(118, 138, 159, 1)'), _defineProperty(_lightPalette, Color.LinkStateless, 'rgba(118, 138, 159, 1)'), _defineProperty(_lightPalette, Color.LinkHover, 'rgba(79, 98, 118, 1)'), _defineProperty(_lightPalette, Color.LinkActive, 'rgba(55, 65, 75, 1)'), _defineProperty(_lightPalette, Color.LinkPressed, 'rgba(104, 121, 235, 1)'), _defineProperty(_lightPalette, Color.LinkMuted, 'rgba(169, 182, 194, 1)'), _defineProperty(_lightPalette, Color.BordersPrimary, 'rgba(204, 214, 222, 1)'), _defineProperty(_lightPalette, Color.BordersPrimaryHover, 'rgba(104, 118, 134, 1)'), _defineProperty(_lightPalette, Color.BordersSecondary, 'rgba(236, 240, 243, 1)'), _defineProperty(_lightPalette, Color.BordersStrong, 'rgba(204, 214, 222, 1)'), _defineProperty(_lightPalette, Color.BordersInvert, 'rgba(85, 99, 115, 1)'), _defineProperty(_lightPalette, Color.BorderHoverBottom, 'rgba(104, 121, 235, 0.18)'), _defineProperty(_lightPalette, Color.BorderActiveBottom, '#4958BC'), _defineProperty(_lightPalette, Color.BorderPrimaryStateless, 'rgba(204, 214, 222, 1)'), _defineProperty(_lightPalette, Color.BordersDisabled, 'rgba(73, 88, 188, 0.4)'), _defineProperty(_lightPalette, Color.BordersButton, 'rgba(151, 166, 182, 1)'), _defineProperty(_lightPalette, Color.BordersItem, 'rgba(226, 232, 236, 1)'), _defineProperty(_lightPalette, Color.BordersBaseLight, 'rgba(211, 219, 250, 1)'), _defineProperty(_lightPalette, Color.BordersBaseMedium, 'rgba(164, 175, 227, 1)'), _defineProperty(_lightPalette, Color.BordersGreen, 'rgba(27, 161, 99, 0.22)'), _defineProperty(_lightPalette, Color.BordersGreenMedium, 'rgba(27, 161, 99, 0.4)'), _defineProperty(_lightPalette, Color.BordersRed, 'rgba(185, 33, 46, 0.4)'), _defineProperty(_lightPalette, Color.ActiveSecondary, '#FFFFFF'), _defineProperty(_lightPalette, Color.ActiveSecondaryHover, 'rgba(104, 121, 235, 0.05)'), _defineProperty(_lightPalette, Color.Error, 'rgba(246, 61, 61, 1)'), _defineProperty(_lightPalette, Color.Error_0_28_Opacity, 'rgba(185, 33, 46, 0.28)'), _defineProperty(_lightPalette, Color.Error_0_12_Opacity, 'rgba(255, 86, 78, 0.1)'), _defineProperty(_lightPalette, Color.ErrorHover, 'rgba(216, 46, 46, 1)'), _defineProperty(_lightPalette, Color.ErrorActive, 'rgba(185, 33, 46, 1)'), _defineProperty(_lightPalette, Color.Success, 'rgba(38, 193, 122, 1)'), _defineProperty(_lightPalette, Color.SuccessHover, 'rgba(30, 154, 98, 1)'), _defineProperty(_lightPalette, Color.SuccessActive, 'rgba(23, 116, 73, 1)'), _defineProperty(_lightPalette, Color.Warning, 'rgba(255, 172, 74, 1)'), _defineProperty(_lightPalette, Color.WarningHover, 'rgba(237, 145, 7, 1)'), _defineProperty(_lightPalette, Color.WarningActive, 'rgba(224, 135, 0, 1)'), _defineProperty(_lightPalette, Color.Info, 'rgba(41, 127, 184, 1)'), _defineProperty(_lightPalette, Color.Modified, 'rgba(165, 166, 246, 1)'), _defineProperty(_lightPalette, Color.Red, 'rgba(219, 46, 50, 1)'), _defineProperty(_lightPalette, Color.Orange, 'rgba(255, 168, 0, 1)'), _defineProperty(_lightPalette, Color.Salad, 'rgba(143, 176, 33, 1)'), _defineProperty(_lightPalette, Color.Green, 'rgba(22, 160, 134, 1)'), _defineProperty(_lightPalette, Color.Blue, 'rgba(41, 127, 184, 1)'), _defineProperty(_lightPalette, Color.Indigo, 'rgba(91, 72, 162, 1)'), _defineProperty(_lightPalette, Color.Violet, 'rgba(141, 68, 173, 1)'), _defineProperty(_lightPalette, Color.Pink, 'rgba(211, 92, 158, 1)'), _defineProperty(_lightPalette, Color.GradientRight, 'linear-gradient(270deg, #FFFFFF 1.56%, rgba(255, 255, 255, 0.89) 52.4%, rgba(255, 255, 255, 0.532165) 76.04%, rgba(255, 255, 255, 0) 100%)'), _defineProperty(_lightPalette, Color.Extra_0_3_Overlay, 'rgba(79, 98, 118, 0.3)'), _defineProperty(_lightPalette, Color.GradientRightActive, 'linear-gradient(270deg, #F3F7FA 1.56%, #F3F7FA 52.4%, rgba(243, 247, 250, 0.53) 76.04%, rgba(243, 247, 250, 0) 100%)'), _defineProperty(_lightPalette, Color.GradientRightHover, 'linear-gradient(270deg, #F9FBFC 1.56%, #F9FBFC 52.4%, rgba(249, 251, 252, 0.53) 76.04%, rgba(249, 251, 252, 0) 100%)'), _defineProperty(_lightPalette, Color.Extra_0_5_Overlay, 'rgba(79, 98, 118, 0.5)'), _defineProperty(_lightPalette, Color.Extra_0_7_Overlay, 'rgba(79, 98, 118, 0.7)'), _defineProperty(_lightPalette, Color.Extra_0_9_Overlay, 'rgba(79, 98, 118, 0.9)'), _defineProperty(_lightPalette, Color.Red_0_1_Overlay, 'rgba(232, 91, 70, 0.1)'), _defineProperty(_lightPalette, Color.Orange_0_1_Overlay, 'rgba(250, 157, 47, 0.1)'), _defineProperty(_lightPalette, Color.Accent_0_8_Overlay, 'rgba(104, 121, 235, 0.08)'), _defineProperty(_lightPalette, Color.Link, 'rgba(250, 166, 68, 1)'), _defineProperty(_lightPalette, Color.Camera, 'rgba(73, 186, 224, 1)'), _defineProperty(_lightPalette, Color.GoogleDrive, 'rgba(81, 136, 238, 1)'), _defineProperty(_lightPalette, Color.Dropbox, 'rgba(17, 40, 124, 1)'), _defineProperty(_lightPalette, Color.OneDrive, 'rgba(40, 100, 186, 1)'), _defineProperty(_lightPalette, Color.Device, 'rgba(102, 73, 209, 1)'), _defineProperty(_lightPalette, Color.Instagram, 'rgba(173, 38, 220, 1)'), _defineProperty(_lightPalette, Color.FreeImages, 'rgba(16, 163, 135, 1)'), _defineProperty(_lightPalette, Color.FreeIcons, 'rgba(62, 207, 139, 1)'), _defineProperty(_lightPalette, Color.Canvas, 'rgba(36, 190, 202, 1)'), _defineProperty(_lightPalette, Color.Box, 'rgba(0, 97, 213, 1)'), _defineProperty(_lightPalette, Color.ScreenCast, 'rgba(48, 61, 78, 1)'), _defineProperty(_lightPalette, Color.Tag, '#889AAC'), _defineProperty(_lightPalette, Color.StatesErrorDisabledText, 'rgba(185, 33, 46, 0.3)'), _defineProperty(_lightPalette, Color.LightShadow, 'rgba(146, 166, 188, 0.2)'), _defineProperty(_lightPalette, Color.MediumShadow, 'rgba(146, 166, 188, 0.24)'), _defineProperty(_lightPalette, Color.LargeShadow, 'rgba(146, 166, 188, 0.32)'), _defineProperty(_lightPalette, Color.XLargeShadow, 'rgba(146, 166, 188, 0.5)'), _lightPalette);\nexport var defaultPalette = lightPalette;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _shadows;\nimport { Shadows } from '../../../../utils/types/shadows';\nexport var shadows = (_shadows = {}, _defineProperty(_shadows, Shadows.ShadowSm, '0px 1px 2px 0px rgba(146, 166, 188, 0.2)'), _defineProperty(_shadows, Shadows.ShadowMd, ' 0px 1px 4px 0px rgba(146, 166, 188, 0.24)'), _defineProperty(_shadows, Shadows.ShadowLg, ' 0px 2px 6px 0px rgba(146, 166, 188, 0.32)'), _defineProperty(_shadows, Shadows.ShadowXl, ' 0px 2px 6px 0px rgba(146, 166, 188, 0.5)'), _defineProperty(_shadows, Shadows.Label, ' 0px 1px 3px 0px rgba(77, 78, 78, 0.15)'), _defineProperty(_shadows, Shadows.Header, ' 0px 6px 10px 0px rgba(146, 166, 188, 0.2)'), _defineProperty(_shadows, Shadows.HeaderPopup, ' 0px 3px 7px 0px rgba(146, 166, 188, 0.16)'), _defineProperty(_shadows, Shadows.FooterPopup, ' 0px -4px 8px 0px rgba(208, 215, 220, 0.22)'), _defineProperty(_shadows, Shadows.LeftPanelMd, ' 6px 8px 12px 0px rgba(146, 166, 188, 0.14)'), _defineProperty(_shadows, Shadows.RightPanelMd, '-6px 8px 12px 0px rgba(146, 166, 188, 0.14)'), _defineProperty(_shadows, Shadows.LeftPanelSm, '6px -4px 12px 0px rgba(146, 166, 188, 0.14)'), _defineProperty(_shadows, Shadows.RightPanelSm, '-6px -4px 12px 0px rgba(146, 166, 188, 0.14)'), _shadows);\nexport var defaultShadows = shadows;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _values, _classes;\nimport { Breakpoint } from '../../../../utils/types/css';\nexport var defaultBreakpoints = {\n keys: [Breakpoint.Xs, Breakpoint.Sm, Breakpoint.Md, Breakpoint.Lg, Breakpoint.Xl],\n values: (_values = {}, _defineProperty(_values, Breakpoint.Xs, 0), _defineProperty(_values, Breakpoint.Sm, 576), _defineProperty(_values, Breakpoint.Md, 768), _defineProperty(_values, Breakpoint.Lg, 1084), _defineProperty(_values, Breakpoint.Xl, 1342), _defineProperty(_values, Breakpoint.Xxl, 1600), _defineProperty(_values, Breakpoint.Xxxl, 1920), _values),\n classes: (_classes = {}, _defineProperty(_classes, Breakpoint.Xs, '.sfx-breakpoint-xs'), _defineProperty(_classes, Breakpoint.Sm, '.sfx-breakpoint-sm'), _defineProperty(_classes, Breakpoint.Md, '.sfx-breakpoint-md'), _defineProperty(_classes, Breakpoint.Lg, '.sfx-breakpoint-lg'), _defineProperty(_classes, Breakpoint.Xl, '.sfx-breakpoint-xl'), _defineProperty(_classes, Breakpoint.Xxl, '.sfx-breakpoint-xxl'), _defineProperty(_classes, Breakpoint.Xxxl, '.sfx-breakpoint-xxxl'), _classes),\n getBreakpointClass: function getBreakpointClass() {\n return '';\n },\n up: function up() {\n return '';\n },\n down: function down() {\n return '';\n },\n between: function between() {\n return '';\n },\n only: function only() {\n return '';\n }\n};","import { defaultBreakpoints } from './default-breakpoints';\nvar createBreakpoints = function createBreakpoints(breakpoints) {\n var _breakpoints$values = breakpoints.values,\n values = _breakpoints$values === void 0 ? defaultBreakpoints.values : _breakpoints$values,\n _breakpoints$classes = breakpoints.classes,\n classes = _breakpoints$classes === void 0 ? defaultBreakpoints.classes : _breakpoints$classes;\n var unit = 'px';\n var keys = Object.keys(values);\n var up = function up(key) {\n var value = typeof values[key] === 'number' ? values[key] : key;\n return \"@media (min-width:\".concat(value).concat(unit, \")\");\n };\n var down = function down(key) {\n var value = values[key];\n return \"@media (max-width:\".concat(value).concat(unit, \")\");\n };\n var between = function between(start, end) {\n var endIndex = keys.indexOf(end);\n return \"@media (min-width:\".concat(values[start]).concat(unit, \") and (max-width:\").concat(values[keys[endIndex]]).concat(unit, \")\");\n };\n var only = function only(key) {\n if (keys.indexOf(key) + 1 < keys.length) {\n return between(key, keys[keys.indexOf(key) + 1]);\n }\n return up(key);\n };\n var getBreakpointClass = function getBreakpointClass(width, hideSelector) {\n var removeSelector = function removeSelector(str) {\n return str.slice(1);\n };\n if (width >= values.xs && width < values.sm) {\n return hideSelector ? removeSelector(classes.xs) : classes.xs;\n }\n if (width >= values.sm && width < values.md) {\n return hideSelector ? removeSelector(classes.sm) : classes.sm;\n }\n if (width >= values.md && width < values.lg) {\n return hideSelector ? removeSelector(classes.md) : classes.md;\n }\n if (width >= values.lg && width < values.xl) {\n return hideSelector ? removeSelector(classes.lg) : classes.lg;\n }\n if (width >= values.xl && width < values.xxl) {\n return hideSelector ? removeSelector(classes.xl) : classes.xl;\n }\n if (width >= values.xxl && width < values.xxxl) {\n return hideSelector ? removeSelector(classes.xxl) : classes.xxl;\n }\n if (width >= values.xxxl) {\n return hideSelector ? removeSelector(classes.xxxl) : classes.xxxl;\n }\n return hideSelector ? removeSelector(classes.md) : classes.md;\n };\n return {\n keys: keys,\n values: values,\n classes: classes,\n getBreakpointClass: getBreakpointClass,\n up: up,\n down: down,\n between: between,\n only: only\n };\n};\nexport default createBreakpoints;","import _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _borderRadius;\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport React, { useMemo } from 'react';\nimport PT from 'prop-types';\nimport { ThemeProvider as SCThemeProvider } from 'styled-components';\nimport merge from 'lodash.merge';\nimport { record } from '../../utils/types/prop-types';\nimport { applyPolymorphicFunctionProp, objectKeys, objectValues } from '../../utils/functions';\nimport { Breakpoint } from '../../utils/types/css';\nimport { Color } from '../../utils/types/palette';\nimport { Shadows } from '../../utils/types/shadows';\nimport { FontVariant } from '../../utils/types/typography';\nimport { BorderRadiusSize } from '../../utils/types/shape';\nimport { Typography, CommonStyles } from '../roots';\nimport { defaultPalette } from '../roots/palette';\nimport { defaultShadows } from '../roots/shadows';\nimport { defaultTypography } from '../roots/typography';\nimport createBreakpoints from '../roots/breakpoints/entity/create-breakpoints';\nvar defaultShape = {\n borderRadius: (_borderRadius = {}, _defineProperty(_borderRadius, BorderRadiusSize.Sm, '2px'), _defineProperty(_borderRadius, BorderRadiusSize.Md, '4px'), _defineProperty(_borderRadius, BorderRadiusSize.Lg, '8px'), _borderRadius)\n};\nvar ThemeProvider = function ThemeProvider(_ref) {\n var children = _ref.children,\n _ref$theme = _ref.theme,\n theme = _ref$theme === void 0 ? {} : _ref$theme;\n var _theme$palette = theme.palette,\n paletteOverride = _theme$palette === void 0 ? {} : _theme$palette,\n _theme$breakpoints = theme.breakpoints,\n breakpointsOverride = _theme$breakpoints === void 0 ? {} : _theme$breakpoints,\n _theme$typography = theme.typography,\n typographyOverride = _theme$typography === void 0 ? {} : _theme$typography,\n _theme$shape = theme.shape,\n shapeOverride = _theme$shape === void 0 ? {} : _theme$shape,\n _theme$shadows = theme.shadows,\n shadowsOverride = _theme$shadows === void 0 ? {} : _theme$shadows;\n var finalTheme = useMemo(function () {\n var palette = _objectSpread(_objectSpread({}, defaultPalette), paletteOverride);\n var breakpoints = createBreakpoints(breakpointsOverride);\n var shadows = _objectSpread(_objectSpread({}, defaultShadows), shadowsOverride);\n return {\n palette: palette,\n breakpoints: breakpoints,\n typography: _objectSpread({}, merge(_objectSpread({}, defaultTypography), _objectSpread({}, typographyOverride))),\n shape: _objectSpread({}, merge(_objectSpread({}, defaultShape), _objectSpread({}, shapeOverride))),\n shadows: shadows\n };\n return {};\n }, [JSON.stringify(theme)]);\n return /*#__PURE__*/React.createElement(SCThemeProvider, {\n theme: finalTheme\n }, /*#__PURE__*/React.createElement(React.Fragment, null, applyPolymorphicFunctionProp(children, finalTheme), /*#__PURE__*/React.createElement(CommonStyles, null), /*#__PURE__*/React.createElement(Typography, null)));\n};\nvar baseLineHeight = defaultTypography.baseLineHeight,\n font = defaultTypography.font,\n typography = _objectWithoutProperties(defaultTypography, [\"baseLineHeight\", \"font\"]);\nThemeProvider.propTypes = {\n children: PT.oneOfType([PT.node, PT.func, PT.arrayOf(PT.node)]).isRequired,\n theme: PT.exact({\n breakpoints: PT.exact({\n keys: PT.arrayOf(PT.string),\n values: PT.exact(record(objectValues(Breakpoint), PT.number)),\n classes: PT.exact(record(objectValues(Breakpoint), PT.string)),\n getBreakpointClass: PT.func,\n up: PT.func,\n down: PT.func,\n between: PT.func,\n only: PT.func\n }),\n palette: PT.exact(record(objectValues(Color), PT.string)),\n shadows: PT.exact(record(objectValues(Shadows), PT.string)),\n shape: PT.exact({\n borderRadius: PT.exact(record(objectValues(BorderRadiusSize), PT.string))\n }),\n typography: PT.exact(_objectSpread({\n baseLineHeight: PT.oneOfType([PT.string, PT.number]),\n font: PT.exact(record(objectValues(FontVariant), PT.object))\n }, record(objectKeys(typography), PT.string)))\n })\n};\nexport default ThemeProvider;","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _iterableToArrayLimit(r, l) {\n var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"];\n if (null != t) {\n var e,\n n,\n i,\n u,\n a = [],\n f = !0,\n o = !1;\n try {\n if (i = (t = t.call(r)).next, 0 === l) {\n if (Object(t) !== t) return;\n f = !1;\n } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);\n } catch (r) {\n o = !0, n = r;\n } finally {\n try {\n if (!f && null != t[\"return\"] && (u = t[\"return\"](), Object(u) !== u)) return;\n } finally {\n if (o) throw n;\n }\n }\n return a;\n }\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n}","import arrayWithHoles from \"./arrayWithHoles.js\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit.js\";\nimport unsupportedIterableToArray from \"./unsupportedIterableToArray.js\";\nimport nonIterableRest from \"./nonIterableRest.js\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || unsupportedIterableToArray(arr, i) || nonIterableRest();\n}","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","var PI_OVER_180 = Math.PI / 180;\nfunction detectBrowser() {\n return (typeof window !== 'undefined' &&\n ({}.toString.call(window) === '[object Window]' ||\n {}.toString.call(window) === '[object global]'));\n}\nexport const glob = typeof global !== 'undefined'\n ? global\n : typeof window !== 'undefined'\n ? window\n : typeof WorkerGlobalScope !== 'undefined'\n ? self\n : {};\nexport const Konva = {\n _global: glob,\n version: '8.4.3',\n isBrowser: detectBrowser(),\n isUnminified: /param/.test(function (param) { }.toString()),\n dblClickWindow: 400,\n getAngle(angle) {\n return Konva.angleDeg ? angle * PI_OVER_180 : angle;\n },\n enableTrace: false,\n pointerEventsEnabled: true,\n autoDrawEnabled: true,\n hitOnDragEnabled: false,\n capturePointerEventsEnabled: false,\n _mouseListenClick: false,\n _touchListenClick: false,\n _pointerListenClick: false,\n _mouseInDblClickWindow: false,\n _touchInDblClickWindow: false,\n _pointerInDblClickWindow: false,\n _mouseDblClickPointerId: null,\n _touchDblClickPointerId: null,\n _pointerDblClickPointerId: null,\n pixelRatio: (typeof window !== 'undefined' && window.devicePixelRatio) || 1,\n dragDistance: 3,\n angleDeg: true,\n showWarnings: true,\n dragButtons: [0, 1],\n isDragging() {\n return Konva['DD'].isDragging;\n },\n isDragReady() {\n return !!Konva['DD'].node;\n },\n releaseCanvasOnDestroy: true,\n document: glob.document,\n _injectGlobal(Konva) {\n glob.Konva = Konva;\n },\n};\nexport const _registerNode = (NodeClass) => {\n Konva[NodeClass.prototype.getClassName()] = NodeClass;\n};\nKonva._injectGlobal(Konva);\n","import { Konva } from './Global.js';\nexport class Transform {\n constructor(m = [1, 0, 0, 1, 0, 0]) {\n this.dirty = false;\n this.m = (m && m.slice()) || [1, 0, 0, 1, 0, 0];\n }\n reset() {\n this.m[0] = 1;\n this.m[1] = 0;\n this.m[2] = 0;\n this.m[3] = 1;\n this.m[4] = 0;\n this.m[5] = 0;\n }\n copy() {\n return new Transform(this.m);\n }\n copyInto(tr) {\n tr.m[0] = this.m[0];\n tr.m[1] = this.m[1];\n tr.m[2] = this.m[2];\n tr.m[3] = this.m[3];\n tr.m[4] = this.m[4];\n tr.m[5] = this.m[5];\n }\n point(point) {\n var m = this.m;\n return {\n x: m[0] * point.x + m[2] * point.y + m[4],\n y: m[1] * point.x + m[3] * point.y + m[5],\n };\n }\n translate(x, y) {\n this.m[4] += this.m[0] * x + this.m[2] * y;\n this.m[5] += this.m[1] * x + this.m[3] * y;\n return this;\n }\n scale(sx, sy) {\n this.m[0] *= sx;\n this.m[1] *= sx;\n this.m[2] *= sy;\n this.m[3] *= sy;\n return this;\n }\n rotate(rad) {\n var c = Math.cos(rad);\n var s = Math.sin(rad);\n var m11 = this.m[0] * c + this.m[2] * s;\n var m12 = this.m[1] * c + this.m[3] * s;\n var m21 = this.m[0] * -s + this.m[2] * c;\n var m22 = this.m[1] * -s + this.m[3] * c;\n this.m[0] = m11;\n this.m[1] = m12;\n this.m[2] = m21;\n this.m[3] = m22;\n return this;\n }\n getTranslation() {\n return {\n x: this.m[4],\n y: this.m[5],\n };\n }\n skew(sx, sy) {\n var m11 = this.m[0] + this.m[2] * sy;\n var m12 = this.m[1] + this.m[3] * sy;\n var m21 = this.m[2] + this.m[0] * sx;\n var m22 = this.m[3] + this.m[1] * sx;\n this.m[0] = m11;\n this.m[1] = m12;\n this.m[2] = m21;\n this.m[3] = m22;\n return this;\n }\n multiply(matrix) {\n var m11 = this.m[0] * matrix.m[0] + this.m[2] * matrix.m[1];\n var m12 = this.m[1] * matrix.m[0] + this.m[3] * matrix.m[1];\n var m21 = this.m[0] * matrix.m[2] + this.m[2] * matrix.m[3];\n var m22 = this.m[1] * matrix.m[2] + this.m[3] * matrix.m[3];\n var dx = this.m[0] * matrix.m[4] + this.m[2] * matrix.m[5] + this.m[4];\n var dy = this.m[1] * matrix.m[4] + this.m[3] * matrix.m[5] + this.m[5];\n this.m[0] = m11;\n this.m[1] = m12;\n this.m[2] = m21;\n this.m[3] = m22;\n this.m[4] = dx;\n this.m[5] = dy;\n return this;\n }\n invert() {\n var d = 1 / (this.m[0] * this.m[3] - this.m[1] * this.m[2]);\n var m0 = this.m[3] * d;\n var m1 = -this.m[1] * d;\n var m2 = -this.m[2] * d;\n var m3 = this.m[0] * d;\n var m4 = d * (this.m[2] * this.m[5] - this.m[3] * this.m[4]);\n var m5 = d * (this.m[1] * this.m[4] - this.m[0] * this.m[5]);\n this.m[0] = m0;\n this.m[1] = m1;\n this.m[2] = m2;\n this.m[3] = m3;\n this.m[4] = m4;\n this.m[5] = m5;\n return this;\n }\n getMatrix() {\n return this.m;\n }\n decompose() {\n var a = this.m[0];\n var b = this.m[1];\n var c = this.m[2];\n var d = this.m[3];\n var e = this.m[4];\n var f = this.m[5];\n var delta = a * d - b * c;\n let result = {\n x: e,\n y: f,\n rotation: 0,\n scaleX: 0,\n scaleY: 0,\n skewX: 0,\n skewY: 0,\n };\n if (a != 0 || b != 0) {\n var r = Math.sqrt(a * a + b * b);\n result.rotation = b > 0 ? Math.acos(a / r) : -Math.acos(a / r);\n result.scaleX = r;\n result.scaleY = delta / r;\n result.skewX = (a * c + b * d) / delta;\n result.skewY = 0;\n }\n else if (c != 0 || d != 0) {\n var s = Math.sqrt(c * c + d * d);\n result.rotation =\n Math.PI / 2 - (d > 0 ? Math.acos(-c / s) : -Math.acos(c / s));\n result.scaleX = delta / s;\n result.scaleY = s;\n result.skewX = 0;\n result.skewY = (a * c + b * d) / delta;\n }\n else {\n }\n result.rotation = Util._getRotation(result.rotation);\n return result;\n }\n}\nvar OBJECT_ARRAY = '[object Array]', OBJECT_NUMBER = '[object Number]', OBJECT_STRING = '[object String]', OBJECT_BOOLEAN = '[object Boolean]', PI_OVER_DEG180 = Math.PI / 180, DEG180_OVER_PI = 180 / Math.PI, HASH = '#', EMPTY_STRING = '', ZERO = '0', KONVA_WARNING = 'Konva warning: ', KONVA_ERROR = 'Konva error: ', RGB_PAREN = 'rgb(', COLORS = {\n aliceblue: [240, 248, 255],\n antiquewhite: [250, 235, 215],\n aqua: [0, 255, 255],\n aquamarine: [127, 255, 212],\n azure: [240, 255, 255],\n beige: [245, 245, 220],\n bisque: [255, 228, 196],\n black: [0, 0, 0],\n blanchedalmond: [255, 235, 205],\n blue: [0, 0, 255],\n blueviolet: [138, 43, 226],\n brown: [165, 42, 42],\n burlywood: [222, 184, 135],\n cadetblue: [95, 158, 160],\n chartreuse: [127, 255, 0],\n chocolate: [210, 105, 30],\n coral: [255, 127, 80],\n cornflowerblue: [100, 149, 237],\n cornsilk: [255, 248, 220],\n crimson: [220, 20, 60],\n cyan: [0, 255, 255],\n darkblue: [0, 0, 139],\n darkcyan: [0, 139, 139],\n darkgoldenrod: [184, 132, 11],\n darkgray: [169, 169, 169],\n darkgreen: [0, 100, 0],\n darkgrey: [169, 169, 169],\n darkkhaki: [189, 183, 107],\n darkmagenta: [139, 0, 139],\n darkolivegreen: [85, 107, 47],\n darkorange: [255, 140, 0],\n darkorchid: [153, 50, 204],\n darkred: [139, 0, 0],\n darksalmon: [233, 150, 122],\n darkseagreen: [143, 188, 143],\n darkslateblue: [72, 61, 139],\n darkslategray: [47, 79, 79],\n darkslategrey: [47, 79, 79],\n darkturquoise: [0, 206, 209],\n darkviolet: [148, 0, 211],\n deeppink: [255, 20, 147],\n deepskyblue: [0, 191, 255],\n dimgray: [105, 105, 105],\n dimgrey: [105, 105, 105],\n dodgerblue: [30, 144, 255],\n firebrick: [178, 34, 34],\n floralwhite: [255, 255, 240],\n forestgreen: [34, 139, 34],\n fuchsia: [255, 0, 255],\n gainsboro: [220, 220, 220],\n ghostwhite: [248, 248, 255],\n gold: [255, 215, 0],\n goldenrod: [218, 165, 32],\n gray: [128, 128, 128],\n green: [0, 128, 0],\n greenyellow: [173, 255, 47],\n grey: [128, 128, 128],\n honeydew: [240, 255, 240],\n hotpink: [255, 105, 180],\n indianred: [205, 92, 92],\n indigo: [75, 0, 130],\n ivory: [255, 255, 240],\n khaki: [240, 230, 140],\n lavender: [230, 230, 250],\n lavenderblush: [255, 240, 245],\n lawngreen: [124, 252, 0],\n lemonchiffon: [255, 250, 205],\n lightblue: [173, 216, 230],\n lightcoral: [240, 128, 128],\n lightcyan: [224, 255, 255],\n lightgoldenrodyellow: [250, 250, 210],\n lightgray: [211, 211, 211],\n lightgreen: [144, 238, 144],\n lightgrey: [211, 211, 211],\n lightpink: [255, 182, 193],\n lightsalmon: [255, 160, 122],\n lightseagreen: [32, 178, 170],\n lightskyblue: [135, 206, 250],\n lightslategray: [119, 136, 153],\n lightslategrey: [119, 136, 153],\n lightsteelblue: [176, 196, 222],\n lightyellow: [255, 255, 224],\n lime: [0, 255, 0],\n limegreen: [50, 205, 50],\n linen: [250, 240, 230],\n magenta: [255, 0, 255],\n maroon: [128, 0, 0],\n mediumaquamarine: [102, 205, 170],\n mediumblue: [0, 0, 205],\n mediumorchid: [186, 85, 211],\n mediumpurple: [147, 112, 219],\n mediumseagreen: [60, 179, 113],\n mediumslateblue: [123, 104, 238],\n mediumspringgreen: [0, 250, 154],\n mediumturquoise: [72, 209, 204],\n mediumvioletred: [199, 21, 133],\n midnightblue: [25, 25, 112],\n mintcream: [245, 255, 250],\n mistyrose: [255, 228, 225],\n moccasin: [255, 228, 181],\n navajowhite: [255, 222, 173],\n navy: [0, 0, 128],\n oldlace: [253, 245, 230],\n olive: [128, 128, 0],\n olivedrab: [107, 142, 35],\n orange: [255, 165, 0],\n orangered: [255, 69, 0],\n orchid: [218, 112, 214],\n palegoldenrod: [238, 232, 170],\n palegreen: [152, 251, 152],\n paleturquoise: [175, 238, 238],\n palevioletred: [219, 112, 147],\n papayawhip: [255, 239, 213],\n peachpuff: [255, 218, 185],\n peru: [205, 133, 63],\n pink: [255, 192, 203],\n plum: [221, 160, 203],\n powderblue: [176, 224, 230],\n purple: [128, 0, 128],\n rebeccapurple: [102, 51, 153],\n red: [255, 0, 0],\n rosybrown: [188, 143, 143],\n royalblue: [65, 105, 225],\n saddlebrown: [139, 69, 19],\n salmon: [250, 128, 114],\n sandybrown: [244, 164, 96],\n seagreen: [46, 139, 87],\n seashell: [255, 245, 238],\n sienna: [160, 82, 45],\n silver: [192, 192, 192],\n skyblue: [135, 206, 235],\n slateblue: [106, 90, 205],\n slategray: [119, 128, 144],\n slategrey: [119, 128, 144],\n snow: [255, 255, 250],\n springgreen: [0, 255, 127],\n steelblue: [70, 130, 180],\n tan: [210, 180, 140],\n teal: [0, 128, 128],\n thistle: [216, 191, 216],\n transparent: [255, 255, 255, 0],\n tomato: [255, 99, 71],\n turquoise: [64, 224, 208],\n violet: [238, 130, 238],\n wheat: [245, 222, 179],\n white: [255, 255, 255],\n whitesmoke: [245, 245, 245],\n yellow: [255, 255, 0],\n yellowgreen: [154, 205, 5],\n}, RGB_REGEX = /rgb\\((\\d{1,3}),(\\d{1,3}),(\\d{1,3})\\)/, animQueue = [];\nconst req = (typeof requestAnimationFrame !== 'undefined' && requestAnimationFrame) ||\n function (f) {\n setTimeout(f, 60);\n };\nexport const Util = {\n _isElement(obj) {\n return !!(obj && obj.nodeType == 1);\n },\n _isFunction(obj) {\n return !!(obj && obj.constructor && obj.call && obj.apply);\n },\n _isPlainObject(obj) {\n return !!obj && obj.constructor === Object;\n },\n _isArray(obj) {\n return Object.prototype.toString.call(obj) === OBJECT_ARRAY;\n },\n _isNumber(obj) {\n return (Object.prototype.toString.call(obj) === OBJECT_NUMBER &&\n !isNaN(obj) &&\n isFinite(obj));\n },\n _isString(obj) {\n return Object.prototype.toString.call(obj) === OBJECT_STRING;\n },\n _isBoolean(obj) {\n return Object.prototype.toString.call(obj) === OBJECT_BOOLEAN;\n },\n isObject(val) {\n return val instanceof Object;\n },\n isValidSelector(selector) {\n if (typeof selector !== 'string') {\n return false;\n }\n var firstChar = selector[0];\n return (firstChar === '#' ||\n firstChar === '.' ||\n firstChar === firstChar.toUpperCase());\n },\n _sign(number) {\n if (number === 0) {\n return 1;\n }\n if (number > 0) {\n return 1;\n }\n else {\n return -1;\n }\n },\n requestAnimFrame(callback) {\n animQueue.push(callback);\n if (animQueue.length === 1) {\n req(function () {\n const queue = animQueue;\n animQueue = [];\n queue.forEach(function (cb) {\n cb();\n });\n });\n }\n },\n createCanvasElement() {\n var canvas = document.createElement('canvas');\n try {\n canvas.style = canvas.style || {};\n }\n catch (e) { }\n return canvas;\n },\n createImageElement() {\n return document.createElement('img');\n },\n _isInDocument(el) {\n while ((el = el.parentNode)) {\n if (el == document) {\n return true;\n }\n }\n return false;\n },\n _urlToImage(url, callback) {\n var imageObj = Util.createImageElement();\n imageObj.onload = function () {\n callback(imageObj);\n };\n imageObj.src = url;\n },\n _rgbToHex(r, g, b) {\n return ((1 << 24) + (r << 16) + (g << 8) + b).toString(16).slice(1);\n },\n _hexToRgb(hex) {\n hex = hex.replace(HASH, EMPTY_STRING);\n var bigint = parseInt(hex, 16);\n return {\n r: (bigint >> 16) & 255,\n g: (bigint >> 8) & 255,\n b: bigint & 255,\n };\n },\n getRandomColor() {\n var randColor = ((Math.random() * 0xffffff) << 0).toString(16);\n while (randColor.length < 6) {\n randColor = ZERO + randColor;\n }\n return HASH + randColor;\n },\n getRGB(color) {\n var rgb;\n if (color in COLORS) {\n rgb = COLORS[color];\n return {\n r: rgb[0],\n g: rgb[1],\n b: rgb[2],\n };\n }\n else if (color[0] === HASH) {\n return this._hexToRgb(color.substring(1));\n }\n else if (color.substr(0, 4) === RGB_PAREN) {\n rgb = RGB_REGEX.exec(color.replace(/ /g, ''));\n return {\n r: parseInt(rgb[1], 10),\n g: parseInt(rgb[2], 10),\n b: parseInt(rgb[3], 10),\n };\n }\n else {\n return {\n r: 0,\n g: 0,\n b: 0,\n };\n }\n },\n colorToRGBA(str) {\n str = str || 'black';\n return (Util._namedColorToRBA(str) ||\n Util._hex3ColorToRGBA(str) ||\n Util._hex4ColorToRGBA(str) ||\n Util._hex6ColorToRGBA(str) ||\n Util._hex8ColorToRGBA(str) ||\n Util._rgbColorToRGBA(str) ||\n Util._rgbaColorToRGBA(str) ||\n Util._hslColorToRGBA(str));\n },\n _namedColorToRBA(str) {\n var c = COLORS[str.toLowerCase()];\n if (!c) {\n return null;\n }\n return {\n r: c[0],\n g: c[1],\n b: c[2],\n a: 1,\n };\n },\n _rgbColorToRGBA(str) {\n if (str.indexOf('rgb(') === 0) {\n str = str.match(/rgb\\(([^)]+)\\)/)[1];\n var parts = str.split(/ *, */).map(Number);\n return {\n r: parts[0],\n g: parts[1],\n b: parts[2],\n a: 1,\n };\n }\n },\n _rgbaColorToRGBA(str) {\n if (str.indexOf('rgba(') === 0) {\n str = str.match(/rgba\\(([^)]+)\\)/)[1];\n var parts = str.split(/ *, */).map((n, index) => {\n if (n.slice(-1) === '%') {\n return index === 3 ? parseInt(n) / 100 : (parseInt(n) / 100) * 255;\n }\n return Number(n);\n });\n return {\n r: parts[0],\n g: parts[1],\n b: parts[2],\n a: parts[3],\n };\n }\n },\n _hex8ColorToRGBA(str) {\n if (str[0] === '#' && str.length === 9) {\n return {\n r: parseInt(str.slice(1, 3), 16),\n g: parseInt(str.slice(3, 5), 16),\n b: parseInt(str.slice(5, 7), 16),\n a: parseInt(str.slice(7, 9), 16) / 0xff,\n };\n }\n },\n _hex6ColorToRGBA(str) {\n if (str[0] === '#' && str.length === 7) {\n return {\n r: parseInt(str.slice(1, 3), 16),\n g: parseInt(str.slice(3, 5), 16),\n b: parseInt(str.slice(5, 7), 16),\n a: 1,\n };\n }\n },\n _hex4ColorToRGBA(str) {\n if (str[0] === '#' && str.length === 5) {\n return {\n r: parseInt(str[1] + str[1], 16),\n g: parseInt(str[2] + str[2], 16),\n b: parseInt(str[3] + str[3], 16),\n a: parseInt(str[4] + str[4], 16) / 0xff,\n };\n }\n },\n _hex3ColorToRGBA(str) {\n if (str[0] === '#' && str.length === 4) {\n return {\n r: parseInt(str[1] + str[1], 16),\n g: parseInt(str[2] + str[2], 16),\n b: parseInt(str[3] + str[3], 16),\n a: 1,\n };\n }\n },\n _hslColorToRGBA(str) {\n if (/hsl\\((\\d+),\\s*([\\d.]+)%,\\s*([\\d.]+)%\\)/g.test(str)) {\n const [_, ...hsl] = /hsl\\((\\d+),\\s*([\\d.]+)%,\\s*([\\d.]+)%\\)/g.exec(str);\n const h = Number(hsl[0]) / 360;\n const s = Number(hsl[1]) / 100;\n const l = Number(hsl[2]) / 100;\n let t2;\n let t3;\n let val;\n if (s === 0) {\n val = l * 255;\n return {\n r: Math.round(val),\n g: Math.round(val),\n b: Math.round(val),\n a: 1,\n };\n }\n if (l < 0.5) {\n t2 = l * (1 + s);\n }\n else {\n t2 = l + s - l * s;\n }\n const t1 = 2 * l - t2;\n const rgb = [0, 0, 0];\n for (let i = 0; i < 3; i++) {\n t3 = h + (1 / 3) * -(i - 1);\n if (t3 < 0) {\n t3++;\n }\n if (t3 > 1) {\n t3--;\n }\n if (6 * t3 < 1) {\n val = t1 + (t2 - t1) * 6 * t3;\n }\n else if (2 * t3 < 1) {\n val = t2;\n }\n else if (3 * t3 < 2) {\n val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n }\n else {\n val = t1;\n }\n rgb[i] = val * 255;\n }\n return {\n r: Math.round(rgb[0]),\n g: Math.round(rgb[1]),\n b: Math.round(rgb[2]),\n a: 1,\n };\n }\n },\n haveIntersection(r1, r2) {\n return !(r2.x > r1.x + r1.width ||\n r2.x + r2.width < r1.x ||\n r2.y > r1.y + r1.height ||\n r2.y + r2.height < r1.y);\n },\n cloneObject(obj) {\n var retObj = {};\n for (var key in obj) {\n if (this._isPlainObject(obj[key])) {\n retObj[key] = this.cloneObject(obj[key]);\n }\n else if (this._isArray(obj[key])) {\n retObj[key] = this.cloneArray(obj[key]);\n }\n else {\n retObj[key] = obj[key];\n }\n }\n return retObj;\n },\n cloneArray(arr) {\n return arr.slice(0);\n },\n degToRad(deg) {\n return deg * PI_OVER_DEG180;\n },\n radToDeg(rad) {\n return rad * DEG180_OVER_PI;\n },\n _degToRad(deg) {\n Util.warn('Util._degToRad is removed. Please use public Util.degToRad instead.');\n return Util.degToRad(deg);\n },\n _radToDeg(rad) {\n Util.warn('Util._radToDeg is removed. Please use public Util.radToDeg instead.');\n return Util.radToDeg(rad);\n },\n _getRotation(radians) {\n return Konva.angleDeg ? Util.radToDeg(radians) : radians;\n },\n _capitalize(str) {\n return str.charAt(0).toUpperCase() + str.slice(1);\n },\n throw(str) {\n throw new Error(KONVA_ERROR + str);\n },\n error(str) {\n console.error(KONVA_ERROR + str);\n },\n warn(str) {\n if (!Konva.showWarnings) {\n return;\n }\n console.warn(KONVA_WARNING + str);\n },\n each(obj, func) {\n for (var key in obj) {\n func(key, obj[key]);\n }\n },\n _inRange(val, left, right) {\n return left <= val && val < right;\n },\n _getProjectionToSegment(x1, y1, x2, y2, x3, y3) {\n var x, y, dist;\n var pd2 = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2);\n if (pd2 == 0) {\n x = x1;\n y = y1;\n dist = (x3 - x2) * (x3 - x2) + (y3 - y2) * (y3 - y2);\n }\n else {\n var u = ((x3 - x1) * (x2 - x1) + (y3 - y1) * (y2 - y1)) / pd2;\n if (u < 0) {\n x = x1;\n y = y1;\n dist = (x1 - x3) * (x1 - x3) + (y1 - y3) * (y1 - y3);\n }\n else if (u > 1.0) {\n x = x2;\n y = y2;\n dist = (x2 - x3) * (x2 - x3) + (y2 - y3) * (y2 - y3);\n }\n else {\n x = x1 + u * (x2 - x1);\n y = y1 + u * (y2 - y1);\n dist = (x - x3) * (x - x3) + (y - y3) * (y - y3);\n }\n }\n return [x, y, dist];\n },\n _getProjectionToLine(pt, line, isClosed) {\n var pc = Util.cloneObject(pt);\n var dist = Number.MAX_VALUE;\n line.forEach(function (p1, i) {\n if (!isClosed && i === line.length - 1) {\n return;\n }\n var p2 = line[(i + 1) % line.length];\n var proj = Util._getProjectionToSegment(p1.x, p1.y, p2.x, p2.y, pt.x, pt.y);\n var px = proj[0], py = proj[1], pdist = proj[2];\n if (pdist < dist) {\n pc.x = px;\n pc.y = py;\n dist = pdist;\n }\n });\n return pc;\n },\n _prepareArrayForTween(startArray, endArray, isClosed) {\n var n, start = [], end = [];\n if (startArray.length > endArray.length) {\n var temp = endArray;\n endArray = startArray;\n startArray = temp;\n }\n for (n = 0; n < startArray.length; n += 2) {\n start.push({\n x: startArray[n],\n y: startArray[n + 1],\n });\n }\n for (n = 0; n < endArray.length; n += 2) {\n end.push({\n x: endArray[n],\n y: endArray[n + 1],\n });\n }\n var newStart = [];\n end.forEach(function (point) {\n var pr = Util._getProjectionToLine(point, start, isClosed);\n newStart.push(pr.x);\n newStart.push(pr.y);\n });\n return newStart;\n },\n _prepareToStringify(obj) {\n var desc;\n obj.visitedByCircularReferenceRemoval = true;\n for (var key in obj) {\n if (!(obj.hasOwnProperty(key) && obj[key] && typeof obj[key] == 'object')) {\n continue;\n }\n desc = Object.getOwnPropertyDescriptor(obj, key);\n if (obj[key].visitedByCircularReferenceRemoval ||\n Util._isElement(obj[key])) {\n if (desc.configurable) {\n delete obj[key];\n }\n else {\n return null;\n }\n }\n else if (Util._prepareToStringify(obj[key]) === null) {\n if (desc.configurable) {\n delete obj[key];\n }\n else {\n return null;\n }\n }\n }\n delete obj.visitedByCircularReferenceRemoval;\n return obj;\n },\n _assign(target, source) {\n for (var key in source) {\n target[key] = source[key];\n }\n return target;\n },\n _getFirstPointerId(evt) {\n if (!evt.touches) {\n return evt.pointerId || 999;\n }\n else {\n return evt.changedTouches[0].identifier;\n }\n },\n releaseCanvas(...canvases) {\n if (!Konva.releaseCanvasOnDestroy)\n return;\n canvases.forEach(c => {\n c.width = 0;\n c.height = 0;\n });\n },\n drawRoundedRectPath(context, width, height, cornerRadius) {\n let topLeft = 0;\n let topRight = 0;\n let bottomLeft = 0;\n let bottomRight = 0;\n if (typeof cornerRadius === 'number') {\n topLeft = topRight = bottomLeft = bottomRight = Math.min(cornerRadius, width / 2, height / 2);\n }\n else {\n topLeft = Math.min(cornerRadius[0] || 0, width / 2, height / 2);\n topRight = Math.min(cornerRadius[1] || 0, width / 2, height / 2);\n bottomRight = Math.min(cornerRadius[2] || 0, width / 2, height / 2);\n bottomLeft = Math.min(cornerRadius[3] || 0, width / 2, height / 2);\n }\n context.moveTo(topLeft, 0);\n context.lineTo(width - topRight, 0);\n context.arc(width - topRight, topRight, topRight, (Math.PI * 3) / 2, 0, false);\n context.lineTo(width, height - bottomRight);\n context.arc(width - bottomRight, height - bottomRight, bottomRight, 0, Math.PI / 2, false);\n context.lineTo(bottomLeft, height);\n context.arc(bottomLeft, height - bottomLeft, bottomLeft, Math.PI / 2, Math.PI, false);\n context.lineTo(0, topLeft);\n context.arc(topLeft, topLeft, topLeft, Math.PI, (Math.PI * 3) / 2, false);\n }\n};\n","import { Konva } from './Global.js';\nimport { Util } from './Util.js';\nfunction _formatValue(val) {\n if (Util._isString(val)) {\n return '\"' + val + '\"';\n }\n if (Object.prototype.toString.call(val) === '[object Number]') {\n return val;\n }\n if (Util._isBoolean(val)) {\n return val;\n }\n return Object.prototype.toString.call(val);\n}\nexport function RGBComponent(val) {\n if (val > 255) {\n return 255;\n }\n else if (val < 0) {\n return 0;\n }\n return Math.round(val);\n}\nexport function alphaComponent(val) {\n if (val > 1) {\n return 1;\n }\n else if (val < 0.0001) {\n return 0.0001;\n }\n return val;\n}\nexport function getNumberValidator() {\n if (Konva.isUnminified) {\n return function (val, attr) {\n if (!Util._isNumber(val)) {\n Util.warn(_formatValue(val) +\n ' is a not valid value for \"' +\n attr +\n '\" attribute. The value should be a number.');\n }\n return val;\n };\n }\n}\nexport function getNumberOrArrayOfNumbersValidator(noOfElements) {\n if (Konva.isUnminified) {\n return function (val, attr) {\n let isNumber = Util._isNumber(val);\n let isValidArray = Util._isArray(val) && val.length == noOfElements;\n if (!isNumber && !isValidArray) {\n Util.warn(_formatValue(val) +\n ' is a not valid value for \"' +\n attr +\n '\" attribute. The value should be a number or Array(' +\n noOfElements +\n ')');\n }\n return val;\n };\n }\n}\nexport function getNumberOrAutoValidator() {\n if (Konva.isUnminified) {\n return function (val, attr) {\n var isNumber = Util._isNumber(val);\n var isAuto = val === 'auto';\n if (!(isNumber || isAuto)) {\n Util.warn(_formatValue(val) +\n ' is a not valid value for \"' +\n attr +\n '\" attribute. The value should be a number or \"auto\".');\n }\n return val;\n };\n }\n}\nexport function getStringValidator() {\n if (Konva.isUnminified) {\n return function (val, attr) {\n if (!Util._isString(val)) {\n Util.warn(_formatValue(val) +\n ' is a not valid value for \"' +\n attr +\n '\" attribute. The value should be a string.');\n }\n return val;\n };\n }\n}\nexport function getStringOrGradientValidator() {\n if (Konva.isUnminified) {\n return function (val, attr) {\n const isString = Util._isString(val);\n const isGradient = Object.prototype.toString.call(val) === '[object CanvasGradient]' ||\n (val && val.addColorStop);\n if (!(isString || isGradient)) {\n Util.warn(_formatValue(val) +\n ' is a not valid value for \"' +\n attr +\n '\" attribute. The value should be a string or a native gradient.');\n }\n return val;\n };\n }\n}\nexport function getFunctionValidator() {\n if (Konva.isUnminified) {\n return function (val, attr) {\n if (!Util._isFunction(val)) {\n Util.warn(_formatValue(val) +\n ' is a not valid value for \"' +\n attr +\n '\" attribute. The value should be a function.');\n }\n return val;\n };\n }\n}\nexport function getNumberArrayValidator() {\n if (Konva.isUnminified) {\n return function (val, attr) {\n const TypedArray = Int8Array ? Object.getPrototypeOf(Int8Array) : null;\n if (TypedArray && val instanceof TypedArray) {\n return val;\n }\n if (!Util._isArray(val)) {\n Util.warn(_formatValue(val) +\n ' is a not valid value for \"' +\n attr +\n '\" attribute. The value should be a array of numbers.');\n }\n else {\n val.forEach(function (item) {\n if (!Util._isNumber(item)) {\n Util.warn('\"' +\n attr +\n '\" attribute has non numeric element ' +\n item +\n '. Make sure that all elements are numbers.');\n }\n });\n }\n return val;\n };\n }\n}\nexport function getBooleanValidator() {\n if (Konva.isUnminified) {\n return function (val, attr) {\n var isBool = val === true || val === false;\n if (!isBool) {\n Util.warn(_formatValue(val) +\n ' is a not valid value for \"' +\n attr +\n '\" attribute. The value should be a boolean.');\n }\n return val;\n };\n }\n}\nexport function getComponentValidator(components) {\n if (Konva.isUnminified) {\n return function (val, attr) {\n if (val === undefined || val === null) {\n return val;\n }\n if (!Util.isObject(val)) {\n Util.warn(_formatValue(val) +\n ' is a not valid value for \"' +\n attr +\n '\" attribute. The value should be an object with properties ' +\n components);\n }\n return val;\n };\n }\n}\n","import { Util } from './Util.js';\nimport { getComponentValidator } from './Validators.js';\nvar GET = 'get', SET = 'set';\nexport const Factory = {\n addGetterSetter(constructor, attr, def, validator, after) {\n Factory.addGetter(constructor, attr, def);\n Factory.addSetter(constructor, attr, validator, after);\n Factory.addOverloadedGetterSetter(constructor, attr);\n },\n addGetter(constructor, attr, def) {\n var method = GET + Util._capitalize(attr);\n constructor.prototype[method] =\n constructor.prototype[method] ||\n function () {\n var val = this.attrs[attr];\n return val === undefined ? def : val;\n };\n },\n addSetter(constructor, attr, validator, after) {\n var method = SET + Util._capitalize(attr);\n if (!constructor.prototype[method]) {\n Factory.overWriteSetter(constructor, attr, validator, after);\n }\n },\n overWriteSetter(constructor, attr, validator, after) {\n var method = SET + Util._capitalize(attr);\n constructor.prototype[method] = function (val) {\n if (validator && val !== undefined && val !== null) {\n val = validator.call(this, val, attr);\n }\n this._setAttr(attr, val);\n if (after) {\n after.call(this);\n }\n return this;\n };\n },\n addComponentsGetterSetter(constructor, attr, components, validator, after) {\n var len = components.length, capitalize = Util._capitalize, getter = GET + capitalize(attr), setter = SET + capitalize(attr), n, component;\n constructor.prototype[getter] = function () {\n var ret = {};\n for (n = 0; n < len; n++) {\n component = components[n];\n ret[component] = this.getAttr(attr + capitalize(component));\n }\n return ret;\n };\n var basicValidator = getComponentValidator(components);\n constructor.prototype[setter] = function (val) {\n var oldVal = this.attrs[attr], key;\n if (validator) {\n val = validator.call(this, val);\n }\n if (basicValidator) {\n basicValidator.call(this, val, attr);\n }\n for (key in val) {\n if (!val.hasOwnProperty(key)) {\n continue;\n }\n this._setAttr(attr + capitalize(key), val[key]);\n }\n if (!val) {\n components.forEach((component) => {\n this._setAttr(attr + capitalize(component), undefined);\n });\n }\n this._fireChangeEvent(attr, oldVal, val);\n if (after) {\n after.call(this);\n }\n return this;\n };\n Factory.addOverloadedGetterSetter(constructor, attr);\n },\n addOverloadedGetterSetter(constructor, attr) {\n var capitalizedAttr = Util._capitalize(attr), setter = SET + capitalizedAttr, getter = GET + capitalizedAttr;\n constructor.prototype[attr] = function () {\n if (arguments.length) {\n this[setter](arguments[0]);\n return this;\n }\n return this[getter]();\n };\n },\n addDeprecatedGetterSetter(constructor, attr, def, validator) {\n Util.error('Adding deprecated ' + attr);\n var method = GET + Util._capitalize(attr);\n var message = attr +\n ' property is deprecated and will be removed soon. Look at Konva change log for more information.';\n constructor.prototype[method] = function () {\n Util.error(message);\n var val = this.attrs[attr];\n return val === undefined ? def : val;\n };\n Factory.addSetter(constructor, attr, validator, function () {\n Util.error(message);\n });\n Factory.addOverloadedGetterSetter(constructor, attr);\n },\n backCompat(constructor, methods) {\n Util.each(methods, function (oldMethodName, newMethodName) {\n var method = constructor.prototype[newMethodName];\n var oldGetter = GET + Util._capitalize(oldMethodName);\n var oldSetter = SET + Util._capitalize(oldMethodName);\n function deprecated() {\n method.apply(this, arguments);\n Util.error('\"' +\n oldMethodName +\n '\" method is deprecated and will be removed soon. Use \"\"' +\n newMethodName +\n '\" instead.');\n }\n constructor.prototype[oldMethodName] = deprecated;\n constructor.prototype[oldGetter] = deprecated;\n constructor.prototype[oldSetter] = deprecated;\n });\n },\n afterSetFilter() {\n this._filterUpToDate = false;\n },\n};\n","import { Util } from './Util.js';\nimport { Konva } from './Global.js';\nfunction simplifyArray(arr) {\n var retArr = [], len = arr.length, util = Util, n, val;\n for (n = 0; n < len; n++) {\n val = arr[n];\n if (util._isNumber(val)) {\n val = Math.round(val * 1000) / 1000;\n }\n else if (!util._isString(val)) {\n val = val + '';\n }\n retArr.push(val);\n }\n return retArr;\n}\nvar COMMA = ',', OPEN_PAREN = '(', CLOSE_PAREN = ')', OPEN_PAREN_BRACKET = '([', CLOSE_BRACKET_PAREN = '])', SEMICOLON = ';', DOUBLE_PAREN = '()', EQUALS = '=', CONTEXT_METHODS = [\n 'arc',\n 'arcTo',\n 'beginPath',\n 'bezierCurveTo',\n 'clearRect',\n 'clip',\n 'closePath',\n 'createLinearGradient',\n 'createPattern',\n 'createRadialGradient',\n 'drawImage',\n 'ellipse',\n 'fill',\n 'fillText',\n 'getImageData',\n 'createImageData',\n 'lineTo',\n 'moveTo',\n 'putImageData',\n 'quadraticCurveTo',\n 'rect',\n 'restore',\n 'rotate',\n 'save',\n 'scale',\n 'setLineDash',\n 'setTransform',\n 'stroke',\n 'strokeText',\n 'transform',\n 'translate',\n];\nvar CONTEXT_PROPERTIES = [\n 'fillStyle',\n 'strokeStyle',\n 'shadowColor',\n 'shadowBlur',\n 'shadowOffsetX',\n 'shadowOffsetY',\n 'lineCap',\n 'lineDashOffset',\n 'lineJoin',\n 'lineWidth',\n 'miterLimit',\n 'font',\n 'textAlign',\n 'textBaseline',\n 'globalAlpha',\n 'globalCompositeOperation',\n 'imageSmoothingEnabled',\n];\nconst traceArrMax = 100;\nexport class Context {\n constructor(canvas) {\n this.canvas = canvas;\n if (Konva.enableTrace) {\n this.traceArr = [];\n this._enableTrace();\n }\n }\n fillShape(shape) {\n if (shape.fillEnabled()) {\n this._fill(shape);\n }\n }\n _fill(shape) {\n }\n strokeShape(shape) {\n if (shape.hasStroke()) {\n this._stroke(shape);\n }\n }\n _stroke(shape) {\n }\n fillStrokeShape(shape) {\n if (shape.attrs.fillAfterStrokeEnabled) {\n this.strokeShape(shape);\n this.fillShape(shape);\n }\n else {\n this.fillShape(shape);\n this.strokeShape(shape);\n }\n }\n getTrace(relaxed, rounded) {\n var traceArr = this.traceArr, len = traceArr.length, str = '', n, trace, method, args;\n for (n = 0; n < len; n++) {\n trace = traceArr[n];\n method = trace.method;\n if (method) {\n args = trace.args;\n str += method;\n if (relaxed) {\n str += DOUBLE_PAREN;\n }\n else {\n if (Util._isArray(args[0])) {\n str += OPEN_PAREN_BRACKET + args.join(COMMA) + CLOSE_BRACKET_PAREN;\n }\n else {\n if (rounded) {\n args = args.map((a) => typeof a === 'number' ? Math.floor(a) : a);\n }\n str += OPEN_PAREN + args.join(COMMA) + CLOSE_PAREN;\n }\n }\n }\n else {\n str += trace.property;\n if (!relaxed) {\n str += EQUALS + trace.val;\n }\n }\n str += SEMICOLON;\n }\n return str;\n }\n clearTrace() {\n this.traceArr = [];\n }\n _trace(str) {\n var traceArr = this.traceArr, len;\n traceArr.push(str);\n len = traceArr.length;\n if (len >= traceArrMax) {\n traceArr.shift();\n }\n }\n reset() {\n var pixelRatio = this.getCanvas().getPixelRatio();\n this.setTransform(1 * pixelRatio, 0, 0, 1 * pixelRatio, 0, 0);\n }\n getCanvas() {\n return this.canvas;\n }\n clear(bounds) {\n var canvas = this.getCanvas();\n if (bounds) {\n this.clearRect(bounds.x || 0, bounds.y || 0, bounds.width || 0, bounds.height || 0);\n }\n else {\n this.clearRect(0, 0, canvas.getWidth() / canvas.pixelRatio, canvas.getHeight() / canvas.pixelRatio);\n }\n }\n _applyLineCap(shape) {\n const lineCap = shape.attrs.lineCap;\n if (lineCap) {\n this.setAttr('lineCap', lineCap);\n }\n }\n _applyOpacity(shape) {\n var absOpacity = shape.getAbsoluteOpacity();\n if (absOpacity !== 1) {\n this.setAttr('globalAlpha', absOpacity);\n }\n }\n _applyLineJoin(shape) {\n const lineJoin = shape.attrs.lineJoin;\n if (lineJoin) {\n this.setAttr('lineJoin', lineJoin);\n }\n }\n setAttr(attr, val) {\n this._context[attr] = val;\n }\n arc(a0, a1, a2, a3, a4, a5) {\n this._context.arc(a0, a1, a2, a3, a4, a5);\n }\n arcTo(a0, a1, a2, a3, a4) {\n this._context.arcTo(a0, a1, a2, a3, a4);\n }\n beginPath() {\n this._context.beginPath();\n }\n bezierCurveTo(a0, a1, a2, a3, a4, a5) {\n this._context.bezierCurveTo(a0, a1, a2, a3, a4, a5);\n }\n clearRect(a0, a1, a2, a3) {\n this._context.clearRect(a0, a1, a2, a3);\n }\n clip() {\n this._context.clip();\n }\n closePath() {\n this._context.closePath();\n }\n createImageData(a0, a1) {\n var a = arguments;\n if (a.length === 2) {\n return this._context.createImageData(a0, a1);\n }\n else if (a.length === 1) {\n return this._context.createImageData(a0);\n }\n }\n createLinearGradient(a0, a1, a2, a3) {\n return this._context.createLinearGradient(a0, a1, a2, a3);\n }\n createPattern(a0, a1) {\n return this._context.createPattern(a0, a1);\n }\n createRadialGradient(a0, a1, a2, a3, a4, a5) {\n return this._context.createRadialGradient(a0, a1, a2, a3, a4, a5);\n }\n drawImage(a0, a1, a2, a3, a4, a5, a6, a7, a8) {\n var a = arguments, _context = this._context;\n if (a.length === 3) {\n _context.drawImage(a0, a1, a2);\n }\n else if (a.length === 5) {\n _context.drawImage(a0, a1, a2, a3, a4);\n }\n else if (a.length === 9) {\n _context.drawImage(a0, a1, a2, a3, a4, a5, a6, a7, a8);\n }\n }\n ellipse(a0, a1, a2, a3, a4, a5, a6, a7) {\n this._context.ellipse(a0, a1, a2, a3, a4, a5, a6, a7);\n }\n isPointInPath(x, y, path, fillRule) {\n if (path) {\n return this._context.isPointInPath(path, x, y, fillRule);\n }\n return this._context.isPointInPath(x, y, fillRule);\n }\n fill(path2d) {\n if (path2d) {\n this._context.fill(path2d);\n }\n else {\n this._context.fill();\n }\n }\n fillRect(x, y, width, height) {\n this._context.fillRect(x, y, width, height);\n }\n strokeRect(x, y, width, height) {\n this._context.strokeRect(x, y, width, height);\n }\n fillText(text, x, y, maxWidth) {\n if (maxWidth) {\n this._context.fillText(text, x, y, maxWidth);\n }\n else {\n this._context.fillText(text, x, y);\n }\n }\n measureText(text) {\n return this._context.measureText(text);\n }\n getImageData(a0, a1, a2, a3) {\n return this._context.getImageData(a0, a1, a2, a3);\n }\n lineTo(a0, a1) {\n this._context.lineTo(a0, a1);\n }\n moveTo(a0, a1) {\n this._context.moveTo(a0, a1);\n }\n rect(a0, a1, a2, a3) {\n this._context.rect(a0, a1, a2, a3);\n }\n putImageData(a0, a1, a2) {\n this._context.putImageData(a0, a1, a2);\n }\n quadraticCurveTo(a0, a1, a2, a3) {\n this._context.quadraticCurveTo(a0, a1, a2, a3);\n }\n restore() {\n this._context.restore();\n }\n rotate(a0) {\n this._context.rotate(a0);\n }\n save() {\n this._context.save();\n }\n scale(a0, a1) {\n this._context.scale(a0, a1);\n }\n setLineDash(a0) {\n if (this._context.setLineDash) {\n this._context.setLineDash(a0);\n }\n else if ('mozDash' in this._context) {\n this._context['mozDash'] = a0;\n }\n else if ('webkitLineDash' in this._context) {\n this._context['webkitLineDash'] = a0;\n }\n }\n getLineDash() {\n return this._context.getLineDash();\n }\n setTransform(a0, a1, a2, a3, a4, a5) {\n this._context.setTransform(a0, a1, a2, a3, a4, a5);\n }\n stroke(path2d) {\n if (path2d) {\n this._context.stroke(path2d);\n }\n else {\n this._context.stroke();\n }\n }\n strokeText(a0, a1, a2, a3) {\n this._context.strokeText(a0, a1, a2, a3);\n }\n transform(a0, a1, a2, a3, a4, a5) {\n this._context.transform(a0, a1, a2, a3, a4, a5);\n }\n translate(a0, a1) {\n this._context.translate(a0, a1);\n }\n _enableTrace() {\n var that = this, len = CONTEXT_METHODS.length, origSetter = this.setAttr, n, args;\n var func = function (methodName) {\n var origMethod = that[methodName], ret;\n that[methodName] = function () {\n args = simplifyArray(Array.prototype.slice.call(arguments, 0));\n ret = origMethod.apply(that, arguments);\n that._trace({\n method: methodName,\n args: args,\n });\n return ret;\n };\n };\n for (n = 0; n < len; n++) {\n func(CONTEXT_METHODS[n]);\n }\n that.setAttr = function () {\n origSetter.apply(that, arguments);\n var prop = arguments[0];\n var val = arguments[1];\n if (prop === 'shadowOffsetX' ||\n prop === 'shadowOffsetY' ||\n prop === 'shadowBlur') {\n val = val / this.canvas.getPixelRatio();\n }\n that._trace({\n property: prop,\n val: val,\n });\n };\n }\n _applyGlobalCompositeOperation(node) {\n const op = node.attrs.globalCompositeOperation;\n var def = !op || op === 'source-over';\n if (!def) {\n this.setAttr('globalCompositeOperation', op);\n }\n }\n}\nCONTEXT_PROPERTIES.forEach(function (prop) {\n Object.defineProperty(Context.prototype, prop, {\n get() {\n return this._context[prop];\n },\n set(val) {\n this._context[prop] = val;\n },\n });\n});\nexport class SceneContext extends Context {\n constructor(canvas) {\n super(canvas);\n this._context = canvas._canvas.getContext('2d');\n }\n _fillColor(shape) {\n var fill = shape.fill();\n this.setAttr('fillStyle', fill);\n shape._fillFunc(this);\n }\n _fillPattern(shape) {\n this.setAttr('fillStyle', shape._getFillPattern());\n shape._fillFunc(this);\n }\n _fillLinearGradient(shape) {\n var grd = shape._getLinearGradient();\n if (grd) {\n this.setAttr('fillStyle', grd);\n shape._fillFunc(this);\n }\n }\n _fillRadialGradient(shape) {\n const grd = shape._getRadialGradient();\n if (grd) {\n this.setAttr('fillStyle', grd);\n shape._fillFunc(this);\n }\n }\n _fill(shape) {\n const hasColor = shape.fill(), fillPriority = shape.getFillPriority();\n if (hasColor && fillPriority === 'color') {\n this._fillColor(shape);\n return;\n }\n const hasPattern = shape.getFillPatternImage();\n if (hasPattern && fillPriority === 'pattern') {\n this._fillPattern(shape);\n return;\n }\n const hasLinearGradient = shape.getFillLinearGradientColorStops();\n if (hasLinearGradient && fillPriority === 'linear-gradient') {\n this._fillLinearGradient(shape);\n return;\n }\n const hasRadialGradient = shape.getFillRadialGradientColorStops();\n if (hasRadialGradient && fillPriority === 'radial-gradient') {\n this._fillRadialGradient(shape);\n return;\n }\n if (hasColor) {\n this._fillColor(shape);\n }\n else if (hasPattern) {\n this._fillPattern(shape);\n }\n else if (hasLinearGradient) {\n this._fillLinearGradient(shape);\n }\n else if (hasRadialGradient) {\n this._fillRadialGradient(shape);\n }\n }\n _strokeLinearGradient(shape) {\n const start = shape.getStrokeLinearGradientStartPoint(), end = shape.getStrokeLinearGradientEndPoint(), colorStops = shape.getStrokeLinearGradientColorStops(), grd = this.createLinearGradient(start.x, start.y, end.x, end.y);\n if (colorStops) {\n for (var n = 0; n < colorStops.length; n += 2) {\n grd.addColorStop(colorStops[n], colorStops[n + 1]);\n }\n this.setAttr('strokeStyle', grd);\n }\n }\n _stroke(shape) {\n var dash = shape.dash(), strokeScaleEnabled = shape.getStrokeScaleEnabled();\n if (shape.hasStroke()) {\n if (!strokeScaleEnabled) {\n this.save();\n var pixelRatio = this.getCanvas().getPixelRatio();\n this.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);\n }\n this._applyLineCap(shape);\n if (dash && shape.dashEnabled()) {\n this.setLineDash(dash);\n this.setAttr('lineDashOffset', shape.dashOffset());\n }\n this.setAttr('lineWidth', shape.strokeWidth());\n if (!shape.getShadowForStrokeEnabled()) {\n this.setAttr('shadowColor', 'rgba(0,0,0,0)');\n }\n var hasLinearGradient = shape.getStrokeLinearGradientColorStops();\n if (hasLinearGradient) {\n this._strokeLinearGradient(shape);\n }\n else {\n this.setAttr('strokeStyle', shape.stroke());\n }\n shape._strokeFunc(this);\n if (!strokeScaleEnabled) {\n this.restore();\n }\n }\n }\n _applyShadow(shape) {\n var _a, _b, _c;\n var color = (_a = shape.getShadowRGBA()) !== null && _a !== void 0 ? _a : 'black', blur = (_b = shape.getShadowBlur()) !== null && _b !== void 0 ? _b : 5, offset = (_c = shape.getShadowOffset()) !== null && _c !== void 0 ? _c : {\n x: 0,\n y: 0,\n }, scale = shape.getAbsoluteScale(), ratio = this.canvas.getPixelRatio(), scaleX = scale.x * ratio, scaleY = scale.y * ratio;\n this.setAttr('shadowColor', color);\n this.setAttr('shadowBlur', blur * Math.min(Math.abs(scaleX), Math.abs(scaleY)));\n this.setAttr('shadowOffsetX', offset.x * scaleX);\n this.setAttr('shadowOffsetY', offset.y * scaleY);\n }\n}\nexport class HitContext extends Context {\n constructor(canvas) {\n super(canvas);\n this._context = canvas._canvas.getContext('2d', {\n willReadFrequently: true,\n });\n }\n _fill(shape) {\n this.save();\n this.setAttr('fillStyle', shape.colorKey);\n shape._fillFuncHit(this);\n this.restore();\n }\n strokeShape(shape) {\n if (shape.hasHitStroke()) {\n this._stroke(shape);\n }\n }\n _stroke(shape) {\n if (shape.hasHitStroke()) {\n const strokeScaleEnabled = shape.getStrokeScaleEnabled();\n if (!strokeScaleEnabled) {\n this.save();\n var pixelRatio = this.getCanvas().getPixelRatio();\n this.setTransform(pixelRatio, 0, 0, pixelRatio, 0, 0);\n }\n this._applyLineCap(shape);\n var hitStrokeWidth = shape.hitStrokeWidth();\n var strokeWidth = hitStrokeWidth === 'auto' ? shape.strokeWidth() : hitStrokeWidth;\n this.setAttr('lineWidth', strokeWidth);\n this.setAttr('strokeStyle', shape.colorKey);\n shape._strokeFuncHit(this);\n if (!strokeScaleEnabled) {\n this.restore();\n }\n }\n }\n}\n","import { Util } from './Util.js';\nimport { SceneContext, HitContext } from './Context.js';\nimport { Konva } from './Global.js';\nimport { Factory } from './Factory.js';\nimport { getNumberValidator } from './Validators.js';\nvar _pixelRatio;\nfunction getDevicePixelRatio() {\n if (_pixelRatio) {\n return _pixelRatio;\n }\n var canvas = Util.createCanvasElement();\n var context = canvas.getContext('2d');\n _pixelRatio = (function () {\n var devicePixelRatio = Konva._global.devicePixelRatio || 1, backingStoreRatio = context.webkitBackingStorePixelRatio ||\n context.mozBackingStorePixelRatio ||\n context.msBackingStorePixelRatio ||\n context.oBackingStorePixelRatio ||\n context.backingStorePixelRatio ||\n 1;\n return devicePixelRatio / backingStoreRatio;\n })();\n Util.releaseCanvas(canvas);\n return _pixelRatio;\n}\nexport class Canvas {\n constructor(config) {\n this.pixelRatio = 1;\n this.width = 0;\n this.height = 0;\n this.isCache = false;\n var conf = config || {};\n var pixelRatio = conf.pixelRatio || Konva.pixelRatio || getDevicePixelRatio();\n this.pixelRatio = pixelRatio;\n this._canvas = Util.createCanvasElement();\n this._canvas.style.padding = '0';\n this._canvas.style.margin = '0';\n this._canvas.style.border = '0';\n this._canvas.style.background = 'transparent';\n this._canvas.style.position = 'absolute';\n this._canvas.style.top = '0';\n this._canvas.style.left = '0';\n }\n getContext() {\n return this.context;\n }\n getPixelRatio() {\n return this.pixelRatio;\n }\n setPixelRatio(pixelRatio) {\n var previousRatio = this.pixelRatio;\n this.pixelRatio = pixelRatio;\n this.setSize(this.getWidth() / previousRatio, this.getHeight() / previousRatio);\n }\n setWidth(width) {\n this.width = this._canvas.width = width * this.pixelRatio;\n this._canvas.style.width = width + 'px';\n var pixelRatio = this.pixelRatio, _context = this.getContext()._context;\n _context.scale(pixelRatio, pixelRatio);\n }\n setHeight(height) {\n this.height = this._canvas.height = height * this.pixelRatio;\n this._canvas.style.height = height + 'px';\n var pixelRatio = this.pixelRatio, _context = this.getContext()._context;\n _context.scale(pixelRatio, pixelRatio);\n }\n getWidth() {\n return this.width;\n }\n getHeight() {\n return this.height;\n }\n setSize(width, height) {\n this.setWidth(width || 0);\n this.setHeight(height || 0);\n }\n toDataURL(mimeType, quality) {\n try {\n return this._canvas.toDataURL(mimeType, quality);\n }\n catch (e) {\n try {\n return this._canvas.toDataURL();\n }\n catch (err) {\n Util.error('Unable to get data URL. ' +\n err.message +\n ' For more info read https://konvajs.org/docs/posts/Tainted_Canvas.html.');\n return '';\n }\n }\n }\n}\nFactory.addGetterSetter(Canvas, 'pixelRatio', undefined, getNumberValidator());\nexport class SceneCanvas extends Canvas {\n constructor(config = { width: 0, height: 0 }) {\n super(config);\n this.context = new SceneContext(this);\n this.setSize(config.width, config.height);\n }\n}\nexport class HitCanvas extends Canvas {\n constructor(config = { width: 0, height: 0 }) {\n super(config);\n this.hitCanvas = true;\n this.context = new HitContext(this);\n this.setSize(config.width, config.height);\n }\n}\n","import { Konva } from './Global.js';\nimport { Util } from './Util.js';\nexport const DD = {\n get isDragging() {\n var flag = false;\n DD._dragElements.forEach((elem) => {\n if (elem.dragStatus === 'dragging') {\n flag = true;\n }\n });\n return flag;\n },\n justDragged: false,\n get node() {\n var node;\n DD._dragElements.forEach((elem) => {\n node = elem.node;\n });\n return node;\n },\n _dragElements: new Map(),\n _drag(evt) {\n const nodesToFireEvents = [];\n DD._dragElements.forEach((elem, key) => {\n const { node } = elem;\n const stage = node.getStage();\n stage.setPointersPositions(evt);\n if (elem.pointerId === undefined) {\n elem.pointerId = Util._getFirstPointerId(evt);\n }\n const pos = stage._changedPointerPositions.find((pos) => pos.id === elem.pointerId);\n if (!pos) {\n return;\n }\n if (elem.dragStatus !== 'dragging') {\n var dragDistance = node.dragDistance();\n var distance = Math.max(Math.abs(pos.x - elem.startPointerPos.x), Math.abs(pos.y - elem.startPointerPos.y));\n if (distance < dragDistance) {\n return;\n }\n node.startDrag({ evt });\n if (!node.isDragging()) {\n return;\n }\n }\n node._setDragPosition(evt, elem);\n nodesToFireEvents.push(node);\n });\n nodesToFireEvents.forEach((node) => {\n node.fire('dragmove', {\n type: 'dragmove',\n target: node,\n evt: evt,\n }, true);\n });\n },\n _endDragBefore(evt) {\n const drawNodes = [];\n DD._dragElements.forEach((elem) => {\n const { node } = elem;\n const stage = node.getStage();\n if (evt) {\n stage.setPointersPositions(evt);\n }\n const pos = stage._changedPointerPositions.find((pos) => pos.id === elem.pointerId);\n if (!pos) {\n return;\n }\n if (elem.dragStatus === 'dragging' || elem.dragStatus === 'stopped') {\n DD.justDragged = true;\n Konva._mouseListenClick = false;\n Konva._touchListenClick = false;\n Konva._pointerListenClick = false;\n elem.dragStatus = 'stopped';\n }\n const drawNode = elem.node.getLayer() ||\n (elem.node instanceof Konva['Stage'] && elem.node);\n if (drawNode && drawNodes.indexOf(drawNode) === -1) {\n drawNodes.push(drawNode);\n }\n });\n drawNodes.forEach((drawNode) => {\n drawNode.draw();\n });\n },\n _endDragAfter(evt) {\n DD._dragElements.forEach((elem, key) => {\n if (elem.dragStatus === 'stopped') {\n elem.node.fire('dragend', {\n type: 'dragend',\n target: elem.node,\n evt: evt,\n }, true);\n }\n if (elem.dragStatus !== 'dragging') {\n DD._dragElements.delete(key);\n }\n });\n },\n};\nif (Konva.isBrowser) {\n window.addEventListener('mouseup', DD._endDragBefore, true);\n window.addEventListener('touchend', DD._endDragBefore, true);\n window.addEventListener('mousemove', DD._drag);\n window.addEventListener('touchmove', DD._drag);\n window.addEventListener('mouseup', DD._endDragAfter, false);\n window.addEventListener('touchend', DD._endDragAfter, false);\n}\n","import { Util, Transform } from './Util.js';\nimport { Factory } from './Factory.js';\nimport { SceneCanvas, HitCanvas } from './Canvas.js';\nimport { Konva } from './Global.js';\nimport { DD } from './DragAndDrop.js';\nimport { getNumberValidator, getStringValidator, getBooleanValidator, } from './Validators.js';\nvar ABSOLUTE_OPACITY = 'absoluteOpacity', ALL_LISTENERS = 'allEventListeners', ABSOLUTE_TRANSFORM = 'absoluteTransform', ABSOLUTE_SCALE = 'absoluteScale', CANVAS = 'canvas', CHANGE = 'Change', CHILDREN = 'children', KONVA = 'konva', LISTENING = 'listening', MOUSEENTER = 'mouseenter', MOUSELEAVE = 'mouseleave', NAME = 'name', SET = 'set', SHAPE = 'Shape', SPACE = ' ', STAGE = 'stage', TRANSFORM = 'transform', UPPER_STAGE = 'Stage', VISIBLE = 'visible', TRANSFORM_CHANGE_STR = [\n 'xChange.konva',\n 'yChange.konva',\n 'scaleXChange.konva',\n 'scaleYChange.konva',\n 'skewXChange.konva',\n 'skewYChange.konva',\n 'rotationChange.konva',\n 'offsetXChange.konva',\n 'offsetYChange.konva',\n 'transformsEnabledChange.konva',\n].join(SPACE);\nlet idCounter = 1;\nexport class Node {\n constructor(config) {\n this._id = idCounter++;\n this.eventListeners = {};\n this.attrs = {};\n this.index = 0;\n this._allEventListeners = null;\n this.parent = null;\n this._cache = new Map();\n this._attachedDepsListeners = new Map();\n this._lastPos = null;\n this._batchingTransformChange = false;\n this._needClearTransformCache = false;\n this._filterUpToDate = false;\n this._isUnderCache = false;\n this._dragEventId = null;\n this._shouldFireChangeEvents = false;\n this.setAttrs(config);\n this._shouldFireChangeEvents = true;\n }\n hasChildren() {\n return false;\n }\n _clearCache(attr) {\n if ((attr === TRANSFORM || attr === ABSOLUTE_TRANSFORM) &&\n this._cache.get(attr)) {\n this._cache.get(attr).dirty = true;\n }\n else if (attr) {\n this._cache.delete(attr);\n }\n else {\n this._cache.clear();\n }\n }\n _getCache(attr, privateGetter) {\n var cache = this._cache.get(attr);\n var isTransform = attr === TRANSFORM || attr === ABSOLUTE_TRANSFORM;\n var invalid = cache === undefined || (isTransform && cache.dirty === true);\n if (invalid) {\n cache = privateGetter.call(this);\n this._cache.set(attr, cache);\n }\n return cache;\n }\n _calculate(name, deps, getter) {\n if (!this._attachedDepsListeners.get(name)) {\n const depsString = deps.map((dep) => dep + 'Change.konva').join(SPACE);\n this.on(depsString, () => {\n this._clearCache(name);\n });\n this._attachedDepsListeners.set(name, true);\n }\n return this._getCache(name, getter);\n }\n _getCanvasCache() {\n return this._cache.get(CANVAS);\n }\n _clearSelfAndDescendantCache(attr) {\n this._clearCache(attr);\n if (attr === ABSOLUTE_TRANSFORM) {\n this.fire('absoluteTransformChange');\n }\n }\n clearCache() {\n if (this._cache.has(CANVAS)) {\n const { scene, filter, hit } = this._cache.get(CANVAS);\n Util.releaseCanvas(scene, filter, hit);\n this._cache.delete(CANVAS);\n }\n this._clearSelfAndDescendantCache();\n this._requestDraw();\n return this;\n }\n cache(config) {\n var conf = config || {};\n var rect = {};\n if (conf.x === undefined ||\n conf.y === undefined ||\n conf.width === undefined ||\n conf.height === undefined) {\n rect = this.getClientRect({\n skipTransform: true,\n relativeTo: this.getParent(),\n });\n }\n var width = Math.ceil(conf.width || rect.width), height = Math.ceil(conf.height || rect.height), pixelRatio = conf.pixelRatio, x = conf.x === undefined ? Math.floor(rect.x) : conf.x, y = conf.y === undefined ? Math.floor(rect.y) : conf.y, offset = conf.offset || 0, drawBorder = conf.drawBorder || false, hitCanvasPixelRatio = conf.hitCanvasPixelRatio || 1;\n if (!width || !height) {\n Util.error('Can not cache the node. Width or height of the node equals 0. Caching is skipped.');\n return;\n }\n width += offset * 2 + 1;\n height += offset * 2 + 1;\n x -= offset;\n y -= offset;\n var cachedSceneCanvas = new SceneCanvas({\n pixelRatio: pixelRatio,\n width: width,\n height: height,\n }), cachedFilterCanvas = new SceneCanvas({\n pixelRatio: pixelRatio,\n width: 0,\n height: 0,\n }), cachedHitCanvas = new HitCanvas({\n pixelRatio: hitCanvasPixelRatio,\n width: width,\n height: height,\n }), sceneContext = cachedSceneCanvas.getContext(), hitContext = cachedHitCanvas.getContext();\n cachedHitCanvas.isCache = true;\n cachedSceneCanvas.isCache = true;\n this._cache.delete(CANVAS);\n this._filterUpToDate = false;\n if (conf.imageSmoothingEnabled === false) {\n cachedSceneCanvas.getContext()._context.imageSmoothingEnabled = false;\n cachedFilterCanvas.getContext()._context.imageSmoothingEnabled = false;\n }\n sceneContext.save();\n hitContext.save();\n sceneContext.translate(-x, -y);\n hitContext.translate(-x, -y);\n this._isUnderCache = true;\n this._clearSelfAndDescendantCache(ABSOLUTE_OPACITY);\n this._clearSelfAndDescendantCache(ABSOLUTE_SCALE);\n this.drawScene(cachedSceneCanvas, this);\n this.drawHit(cachedHitCanvas, this);\n this._isUnderCache = false;\n sceneContext.restore();\n hitContext.restore();\n if (drawBorder) {\n sceneContext.save();\n sceneContext.beginPath();\n sceneContext.rect(0, 0, width, height);\n sceneContext.closePath();\n sceneContext.setAttr('strokeStyle', 'red');\n sceneContext.setAttr('lineWidth', 5);\n sceneContext.stroke();\n sceneContext.restore();\n }\n this._cache.set(CANVAS, {\n scene: cachedSceneCanvas,\n filter: cachedFilterCanvas,\n hit: cachedHitCanvas,\n x: x,\n y: y,\n });\n this._requestDraw();\n return this;\n }\n isCached() {\n return this._cache.has(CANVAS);\n }\n getClientRect(config) {\n throw new Error('abstract \"getClientRect\" method call');\n }\n _transformedRect(rect, top) {\n var points = [\n { x: rect.x, y: rect.y },\n { x: rect.x + rect.width, y: rect.y },\n { x: rect.x + rect.width, y: rect.y + rect.height },\n { x: rect.x, y: rect.y + rect.height },\n ];\n var minX, minY, maxX, maxY;\n var trans = this.getAbsoluteTransform(top);\n points.forEach(function (point) {\n var transformed = trans.point(point);\n if (minX === undefined) {\n minX = maxX = transformed.x;\n minY = maxY = transformed.y;\n }\n minX = Math.min(minX, transformed.x);\n minY = Math.min(minY, transformed.y);\n maxX = Math.max(maxX, transformed.x);\n maxY = Math.max(maxY, transformed.y);\n });\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY,\n };\n }\n _drawCachedSceneCanvas(context) {\n context.save();\n context._applyOpacity(this);\n context._applyGlobalCompositeOperation(this);\n const canvasCache = this._getCanvasCache();\n context.translate(canvasCache.x, canvasCache.y);\n var cacheCanvas = this._getCachedSceneCanvas();\n var ratio = cacheCanvas.pixelRatio;\n context.drawImage(cacheCanvas._canvas, 0, 0, cacheCanvas.width / ratio, cacheCanvas.height / ratio);\n context.restore();\n }\n _drawCachedHitCanvas(context) {\n var canvasCache = this._getCanvasCache(), hitCanvas = canvasCache.hit;\n context.save();\n context.translate(canvasCache.x, canvasCache.y);\n context.drawImage(hitCanvas._canvas, 0, 0, hitCanvas.width / hitCanvas.pixelRatio, hitCanvas.height / hitCanvas.pixelRatio);\n context.restore();\n }\n _getCachedSceneCanvas() {\n var filters = this.filters(), cachedCanvas = this._getCanvasCache(), sceneCanvas = cachedCanvas.scene, filterCanvas = cachedCanvas.filter, filterContext = filterCanvas.getContext(), len, imageData, n, filter;\n if (filters) {\n if (!this._filterUpToDate) {\n var ratio = sceneCanvas.pixelRatio;\n filterCanvas.setSize(sceneCanvas.width / sceneCanvas.pixelRatio, sceneCanvas.height / sceneCanvas.pixelRatio);\n try {\n len = filters.length;\n filterContext.clear();\n filterContext.drawImage(sceneCanvas._canvas, 0, 0, sceneCanvas.getWidth() / ratio, sceneCanvas.getHeight() / ratio);\n imageData = filterContext.getImageData(0, 0, filterCanvas.getWidth(), filterCanvas.getHeight());\n for (n = 0; n < len; n++) {\n filter = filters[n];\n if (typeof filter !== 'function') {\n Util.error('Filter should be type of function, but got ' +\n typeof filter +\n ' instead. Please check correct filters');\n continue;\n }\n filter.call(this, imageData);\n filterContext.putImageData(imageData, 0, 0);\n }\n }\n catch (e) {\n Util.error('Unable to apply filter. ' +\n e.message +\n ' This post my help you https://konvajs.org/docs/posts/Tainted_Canvas.html.');\n }\n this._filterUpToDate = true;\n }\n return filterCanvas;\n }\n return sceneCanvas;\n }\n on(evtStr, handler) {\n this._cache && this._cache.delete(ALL_LISTENERS);\n if (arguments.length === 3) {\n return this._delegate.apply(this, arguments);\n }\n var events = evtStr.split(SPACE), len = events.length, n, event, parts, baseEvent, name;\n for (n = 0; n < len; n++) {\n event = events[n];\n parts = event.split('.');\n baseEvent = parts[0];\n name = parts[1] || '';\n if (!this.eventListeners[baseEvent]) {\n this.eventListeners[baseEvent] = [];\n }\n this.eventListeners[baseEvent].push({\n name: name,\n handler: handler,\n });\n }\n return this;\n }\n off(evtStr, callback) {\n var events = (evtStr || '').split(SPACE), len = events.length, n, t, event, parts, baseEvent, name;\n this._cache && this._cache.delete(ALL_LISTENERS);\n if (!evtStr) {\n for (t in this.eventListeners) {\n this._off(t);\n }\n }\n for (n = 0; n < len; n++) {\n event = events[n];\n parts = event.split('.');\n baseEvent = parts[0];\n name = parts[1];\n if (baseEvent) {\n if (this.eventListeners[baseEvent]) {\n this._off(baseEvent, name, callback);\n }\n }\n else {\n for (t in this.eventListeners) {\n this._off(t, name, callback);\n }\n }\n }\n return this;\n }\n dispatchEvent(evt) {\n var e = {\n target: this,\n type: evt.type,\n evt: evt,\n };\n this.fire(evt.type, e);\n return this;\n }\n addEventListener(type, handler) {\n this.on(type, function (evt) {\n handler.call(this, evt.evt);\n });\n return this;\n }\n removeEventListener(type) {\n this.off(type);\n return this;\n }\n _delegate(event, selector, handler) {\n var stopNode = this;\n this.on(event, function (evt) {\n var targets = evt.target.findAncestors(selector, true, stopNode);\n for (var i = 0; i < targets.length; i++) {\n evt = Util.cloneObject(evt);\n evt.currentTarget = targets[i];\n handler.call(targets[i], evt);\n }\n });\n }\n remove() {\n if (this.isDragging()) {\n this.stopDrag();\n }\n DD._dragElements.delete(this._id);\n this._remove();\n return this;\n }\n _clearCaches() {\n this._clearSelfAndDescendantCache(ABSOLUTE_TRANSFORM);\n this._clearSelfAndDescendantCache(ABSOLUTE_OPACITY);\n this._clearSelfAndDescendantCache(ABSOLUTE_SCALE);\n this._clearSelfAndDescendantCache(STAGE);\n this._clearSelfAndDescendantCache(VISIBLE);\n this._clearSelfAndDescendantCache(LISTENING);\n }\n _remove() {\n this._clearCaches();\n var parent = this.getParent();\n if (parent && parent.children) {\n parent.children.splice(this.index, 1);\n parent._setChildrenIndices();\n this.parent = null;\n }\n }\n destroy() {\n this.remove();\n this.clearCache();\n return this;\n }\n getAttr(attr) {\n var method = 'get' + Util._capitalize(attr);\n if (Util._isFunction(this[method])) {\n return this[method]();\n }\n return this.attrs[attr];\n }\n getAncestors() {\n var parent = this.getParent(), ancestors = [];\n while (parent) {\n ancestors.push(parent);\n parent = parent.getParent();\n }\n return ancestors;\n }\n getAttrs() {\n return this.attrs || {};\n }\n setAttrs(config) {\n this._batchTransformChanges(() => {\n var key, method;\n if (!config) {\n return this;\n }\n for (key in config) {\n if (key === CHILDREN) {\n continue;\n }\n method = SET + Util._capitalize(key);\n if (Util._isFunction(this[method])) {\n this[method](config[key]);\n }\n else {\n this._setAttr(key, config[key]);\n }\n }\n });\n return this;\n }\n isListening() {\n return this._getCache(LISTENING, this._isListening);\n }\n _isListening(relativeTo) {\n const listening = this.listening();\n if (!listening) {\n return false;\n }\n const parent = this.getParent();\n if (parent && parent !== relativeTo && this !== relativeTo) {\n return parent._isListening(relativeTo);\n }\n else {\n return true;\n }\n }\n isVisible() {\n return this._getCache(VISIBLE, this._isVisible);\n }\n _isVisible(relativeTo) {\n const visible = this.visible();\n if (!visible) {\n return false;\n }\n const parent = this.getParent();\n if (parent && parent !== relativeTo && this !== relativeTo) {\n return parent._isVisible(relativeTo);\n }\n else {\n return true;\n }\n }\n shouldDrawHit(top, skipDragCheck = false) {\n if (top) {\n return this._isVisible(top) && this._isListening(top);\n }\n var layer = this.getLayer();\n var layerUnderDrag = false;\n DD._dragElements.forEach((elem) => {\n if (elem.dragStatus !== 'dragging') {\n return;\n }\n else if (elem.node.nodeType === 'Stage') {\n layerUnderDrag = true;\n }\n else if (elem.node.getLayer() === layer) {\n layerUnderDrag = true;\n }\n });\n var dragSkip = !skipDragCheck && !Konva.hitOnDragEnabled && layerUnderDrag;\n return this.isListening() && this.isVisible() && !dragSkip;\n }\n show() {\n this.visible(true);\n return this;\n }\n hide() {\n this.visible(false);\n return this;\n }\n getZIndex() {\n return this.index || 0;\n }\n getAbsoluteZIndex() {\n var depth = this.getDepth(), that = this, index = 0, nodes, len, n, child;\n function addChildren(children) {\n nodes = [];\n len = children.length;\n for (n = 0; n < len; n++) {\n child = children[n];\n index++;\n if (child.nodeType !== SHAPE) {\n nodes = nodes.concat(child.getChildren().slice());\n }\n if (child._id === that._id) {\n n = len;\n }\n }\n if (nodes.length > 0 && nodes[0].getDepth() <= depth) {\n addChildren(nodes);\n }\n }\n if (that.nodeType !== UPPER_STAGE) {\n addChildren(that.getStage().getChildren());\n }\n return index;\n }\n getDepth() {\n var depth = 0, parent = this.parent;\n while (parent) {\n depth++;\n parent = parent.parent;\n }\n return depth;\n }\n _batchTransformChanges(func) {\n this._batchingTransformChange = true;\n func();\n this._batchingTransformChange = false;\n if (this._needClearTransformCache) {\n this._clearCache(TRANSFORM);\n this._clearSelfAndDescendantCache(ABSOLUTE_TRANSFORM);\n }\n this._needClearTransformCache = false;\n }\n setPosition(pos) {\n this._batchTransformChanges(() => {\n this.x(pos.x);\n this.y(pos.y);\n });\n return this;\n }\n getPosition() {\n return {\n x: this.x(),\n y: this.y(),\n };\n }\n getRelativePointerPosition() {\n if (!this.getStage()) {\n return null;\n }\n var pos = this.getStage().getPointerPosition();\n if (!pos) {\n return null;\n }\n var transform = this.getAbsoluteTransform().copy();\n transform.invert();\n return transform.point(pos);\n }\n getAbsolutePosition(top) {\n let haveCachedParent = false;\n let parent = this.parent;\n while (parent) {\n if (parent.isCached()) {\n haveCachedParent = true;\n break;\n }\n parent = parent.parent;\n }\n if (haveCachedParent && !top) {\n top = true;\n }\n var absoluteMatrix = this.getAbsoluteTransform(top).getMatrix(), absoluteTransform = new Transform(), offset = this.offset();\n absoluteTransform.m = absoluteMatrix.slice();\n absoluteTransform.translate(offset.x, offset.y);\n return absoluteTransform.getTranslation();\n }\n setAbsolutePosition(pos) {\n var origTrans = this._clearTransform();\n this.attrs.x = origTrans.x;\n this.attrs.y = origTrans.y;\n delete origTrans.x;\n delete origTrans.y;\n this._clearCache(TRANSFORM);\n var it = this._getAbsoluteTransform().copy();\n it.invert();\n it.translate(pos.x, pos.y);\n pos = {\n x: this.attrs.x + it.getTranslation().x,\n y: this.attrs.y + it.getTranslation().y,\n };\n this._setTransform(origTrans);\n this.setPosition({ x: pos.x, y: pos.y });\n this._clearCache(TRANSFORM);\n this._clearSelfAndDescendantCache(ABSOLUTE_TRANSFORM);\n return this;\n }\n _setTransform(trans) {\n var key;\n for (key in trans) {\n this.attrs[key] = trans[key];\n }\n }\n _clearTransform() {\n var trans = {\n x: this.x(),\n y: this.y(),\n rotation: this.rotation(),\n scaleX: this.scaleX(),\n scaleY: this.scaleY(),\n offsetX: this.offsetX(),\n offsetY: this.offsetY(),\n skewX: this.skewX(),\n skewY: this.skewY(),\n };\n this.attrs.x = 0;\n this.attrs.y = 0;\n this.attrs.rotation = 0;\n this.attrs.scaleX = 1;\n this.attrs.scaleY = 1;\n this.attrs.offsetX = 0;\n this.attrs.offsetY = 0;\n this.attrs.skewX = 0;\n this.attrs.skewY = 0;\n return trans;\n }\n move(change) {\n var changeX = change.x, changeY = change.y, x = this.x(), y = this.y();\n if (changeX !== undefined) {\n x += changeX;\n }\n if (changeY !== undefined) {\n y += changeY;\n }\n this.setPosition({ x: x, y: y });\n return this;\n }\n _eachAncestorReverse(func, top) {\n var family = [], parent = this.getParent(), len, n;\n if (top && top._id === this._id) {\n return;\n }\n family.unshift(this);\n while (parent && (!top || parent._id !== top._id)) {\n family.unshift(parent);\n parent = parent.parent;\n }\n len = family.length;\n for (n = 0; n < len; n++) {\n func(family[n]);\n }\n }\n rotate(theta) {\n this.rotation(this.rotation() + theta);\n return this;\n }\n moveToTop() {\n if (!this.parent) {\n Util.warn('Node has no parent. moveToTop function is ignored.');\n return false;\n }\n var index = this.index, len = this.parent.getChildren().length;\n if (index < len - 1) {\n this.parent.children.splice(index, 1);\n this.parent.children.push(this);\n this.parent._setChildrenIndices();\n return true;\n }\n return false;\n }\n moveUp() {\n if (!this.parent) {\n Util.warn('Node has no parent. moveUp function is ignored.');\n return false;\n }\n var index = this.index, len = this.parent.getChildren().length;\n if (index < len - 1) {\n this.parent.children.splice(index, 1);\n this.parent.children.splice(index + 1, 0, this);\n this.parent._setChildrenIndices();\n return true;\n }\n return false;\n }\n moveDown() {\n if (!this.parent) {\n Util.warn('Node has no parent. moveDown function is ignored.');\n return false;\n }\n var index = this.index;\n if (index > 0) {\n this.parent.children.splice(index, 1);\n this.parent.children.splice(index - 1, 0, this);\n this.parent._setChildrenIndices();\n return true;\n }\n return false;\n }\n moveToBottom() {\n if (!this.parent) {\n Util.warn('Node has no parent. moveToBottom function is ignored.');\n return false;\n }\n var index = this.index;\n if (index > 0) {\n this.parent.children.splice(index, 1);\n this.parent.children.unshift(this);\n this.parent._setChildrenIndices();\n return true;\n }\n return false;\n }\n setZIndex(zIndex) {\n if (!this.parent) {\n Util.warn('Node has no parent. zIndex parameter is ignored.');\n return this;\n }\n if (zIndex < 0 || zIndex >= this.parent.children.length) {\n Util.warn('Unexpected value ' +\n zIndex +\n ' for zIndex property. zIndex is just index of a node in children of its parent. Expected value is from 0 to ' +\n (this.parent.children.length - 1) +\n '.');\n }\n var index = this.index;\n this.parent.children.splice(index, 1);\n this.parent.children.splice(zIndex, 0, this);\n this.parent._setChildrenIndices();\n return this;\n }\n getAbsoluteOpacity() {\n return this._getCache(ABSOLUTE_OPACITY, this._getAbsoluteOpacity);\n }\n _getAbsoluteOpacity() {\n var absOpacity = this.opacity();\n var parent = this.getParent();\n if (parent && !parent._isUnderCache) {\n absOpacity *= parent.getAbsoluteOpacity();\n }\n return absOpacity;\n }\n moveTo(newContainer) {\n if (this.getParent() !== newContainer) {\n this._remove();\n newContainer.add(this);\n }\n return this;\n }\n toObject() {\n var obj = {}, attrs = this.getAttrs(), key, val, getter, defaultValue, nonPlainObject;\n obj.attrs = {};\n for (key in attrs) {\n val = attrs[key];\n nonPlainObject =\n Util.isObject(val) && !Util._isPlainObject(val) && !Util._isArray(val);\n if (nonPlainObject) {\n continue;\n }\n getter = typeof this[key] === 'function' && this[key];\n delete attrs[key];\n defaultValue = getter ? getter.call(this) : null;\n attrs[key] = val;\n if (defaultValue !== val) {\n obj.attrs[key] = val;\n }\n }\n obj.className = this.getClassName();\n return Util._prepareToStringify(obj);\n }\n toJSON() {\n return JSON.stringify(this.toObject());\n }\n getParent() {\n return this.parent;\n }\n findAncestors(selector, includeSelf, stopNode) {\n var res = [];\n if (includeSelf && this._isMatch(selector)) {\n res.push(this);\n }\n var ancestor = this.parent;\n while (ancestor) {\n if (ancestor === stopNode) {\n return res;\n }\n if (ancestor._isMatch(selector)) {\n res.push(ancestor);\n }\n ancestor = ancestor.parent;\n }\n return res;\n }\n isAncestorOf(node) {\n return false;\n }\n findAncestor(selector, includeSelf, stopNode) {\n return this.findAncestors(selector, includeSelf, stopNode)[0];\n }\n _isMatch(selector) {\n if (!selector) {\n return false;\n }\n if (typeof selector === 'function') {\n return selector(this);\n }\n var selectorArr = selector.replace(/ /g, '').split(','), len = selectorArr.length, n, sel;\n for (n = 0; n < len; n++) {\n sel = selectorArr[n];\n if (!Util.isValidSelector(sel)) {\n Util.warn('Selector \"' +\n sel +\n '\" is invalid. Allowed selectors examples are \"#foo\", \".bar\" or \"Group\".');\n Util.warn('If you have a custom shape with such className, please change it to start with upper letter like \"Triangle\".');\n Util.warn('Konva is awesome, right?');\n }\n if (sel.charAt(0) === '#') {\n if (this.id() === sel.slice(1)) {\n return true;\n }\n }\n else if (sel.charAt(0) === '.') {\n if (this.hasName(sel.slice(1))) {\n return true;\n }\n }\n else if (this.className === sel || this.nodeType === sel) {\n return true;\n }\n }\n return false;\n }\n getLayer() {\n var parent = this.getParent();\n return parent ? parent.getLayer() : null;\n }\n getStage() {\n return this._getCache(STAGE, this._getStage);\n }\n _getStage() {\n var parent = this.getParent();\n if (parent) {\n return parent.getStage();\n }\n else {\n return undefined;\n }\n }\n fire(eventType, evt = {}, bubble) {\n evt.target = evt.target || this;\n if (bubble) {\n this._fireAndBubble(eventType, evt);\n }\n else {\n this._fire(eventType, evt);\n }\n return this;\n }\n getAbsoluteTransform(top) {\n if (top) {\n return this._getAbsoluteTransform(top);\n }\n else {\n return this._getCache(ABSOLUTE_TRANSFORM, this._getAbsoluteTransform);\n }\n }\n _getAbsoluteTransform(top) {\n var at;\n if (top) {\n at = new Transform();\n this._eachAncestorReverse(function (node) {\n var transformsEnabled = node.transformsEnabled();\n if (transformsEnabled === 'all') {\n at.multiply(node.getTransform());\n }\n else if (transformsEnabled === 'position') {\n at.translate(node.x() - node.offsetX(), node.y() - node.offsetY());\n }\n }, top);\n return at;\n }\n else {\n at = this._cache.get(ABSOLUTE_TRANSFORM) || new Transform();\n if (this.parent) {\n this.parent.getAbsoluteTransform().copyInto(at);\n }\n else {\n at.reset();\n }\n var transformsEnabled = this.transformsEnabled();\n if (transformsEnabled === 'all') {\n at.multiply(this.getTransform());\n }\n else if (transformsEnabled === 'position') {\n const x = this.attrs.x || 0;\n const y = this.attrs.y || 0;\n const offsetX = this.attrs.offsetX || 0;\n const offsetY = this.attrs.offsetY || 0;\n at.translate(x - offsetX, y - offsetY);\n }\n at.dirty = false;\n return at;\n }\n }\n getAbsoluteScale(top) {\n var parent = this;\n while (parent) {\n if (parent._isUnderCache) {\n top = parent;\n }\n parent = parent.getParent();\n }\n const transform = this.getAbsoluteTransform(top);\n const attrs = transform.decompose();\n return {\n x: attrs.scaleX,\n y: attrs.scaleY,\n };\n }\n getAbsoluteRotation() {\n return this.getAbsoluteTransform().decompose().rotation;\n }\n getTransform() {\n return this._getCache(TRANSFORM, this._getTransform);\n }\n _getTransform() {\n var _a, _b;\n var m = this._cache.get(TRANSFORM) || new Transform();\n m.reset();\n var x = this.x(), y = this.y(), rotation = Konva.getAngle(this.rotation()), scaleX = (_a = this.attrs.scaleX) !== null && _a !== void 0 ? _a : 1, scaleY = (_b = this.attrs.scaleY) !== null && _b !== void 0 ? _b : 1, skewX = this.attrs.skewX || 0, skewY = this.attrs.skewY || 0, offsetX = this.attrs.offsetX || 0, offsetY = this.attrs.offsetY || 0;\n if (x !== 0 || y !== 0) {\n m.translate(x, y);\n }\n if (rotation !== 0) {\n m.rotate(rotation);\n }\n if (skewX !== 0 || skewY !== 0) {\n m.skew(skewX, skewY);\n }\n if (scaleX !== 1 || scaleY !== 1) {\n m.scale(scaleX, scaleY);\n }\n if (offsetX !== 0 || offsetY !== 0) {\n m.translate(-1 * offsetX, -1 * offsetY);\n }\n m.dirty = false;\n return m;\n }\n clone(obj) {\n var attrs = Util.cloneObject(this.attrs), key, allListeners, len, n, listener;\n for (key in obj) {\n attrs[key] = obj[key];\n }\n var node = new this.constructor(attrs);\n for (key in this.eventListeners) {\n allListeners = this.eventListeners[key];\n len = allListeners.length;\n for (n = 0; n < len; n++) {\n listener = allListeners[n];\n if (listener.name.indexOf(KONVA) < 0) {\n if (!node.eventListeners[key]) {\n node.eventListeners[key] = [];\n }\n node.eventListeners[key].push(listener);\n }\n }\n }\n return node;\n }\n _toKonvaCanvas(config) {\n config = config || {};\n var box = this.getClientRect();\n var stage = this.getStage(), x = config.x !== undefined ? config.x : Math.floor(box.x), y = config.y !== undefined ? config.y : Math.floor(box.y), pixelRatio = config.pixelRatio || 1, canvas = new SceneCanvas({\n width: config.width || Math.ceil(box.width) || (stage ? stage.width() : 0),\n height: config.height ||\n Math.ceil(box.height) ||\n (stage ? stage.height() : 0),\n pixelRatio: pixelRatio,\n }), context = canvas.getContext();\n if (config.imageSmoothingEnabled === false) {\n context._context.imageSmoothingEnabled = false;\n }\n context.save();\n if (x || y) {\n context.translate(-1 * x, -1 * y);\n }\n this.drawScene(canvas);\n context.restore();\n return canvas;\n }\n toCanvas(config) {\n return this._toKonvaCanvas(config)._canvas;\n }\n toDataURL(config) {\n config = config || {};\n var mimeType = config.mimeType || null, quality = config.quality || null;\n var url = this._toKonvaCanvas(config).toDataURL(mimeType, quality);\n if (config.callback) {\n config.callback(url);\n }\n return url;\n }\n toImage(config) {\n return new Promise((resolve, reject) => {\n try {\n const callback = config === null || config === void 0 ? void 0 : config.callback;\n if (callback)\n delete config.callback;\n Util._urlToImage(this.toDataURL(config), function (img) {\n resolve(img);\n callback === null || callback === void 0 ? void 0 : callback(img);\n });\n }\n catch (err) {\n reject(err);\n }\n });\n }\n toBlob(config) {\n return new Promise((resolve, reject) => {\n try {\n const callback = config === null || config === void 0 ? void 0 : config.callback;\n if (callback)\n delete config.callback;\n this.toCanvas(config).toBlob((blob) => {\n resolve(blob);\n callback === null || callback === void 0 ? void 0 : callback(blob);\n });\n }\n catch (err) {\n reject(err);\n }\n });\n }\n setSize(size) {\n this.width(size.width);\n this.height(size.height);\n return this;\n }\n getSize() {\n return {\n width: this.width(),\n height: this.height(),\n };\n }\n getClassName() {\n return this.className || this.nodeType;\n }\n getType() {\n return this.nodeType;\n }\n getDragDistance() {\n if (this.attrs.dragDistance !== undefined) {\n return this.attrs.dragDistance;\n }\n else if (this.parent) {\n return this.parent.getDragDistance();\n }\n else {\n return Konva.dragDistance;\n }\n }\n _off(type, name, callback) {\n var evtListeners = this.eventListeners[type], i, evtName, handler;\n for (i = 0; i < evtListeners.length; i++) {\n evtName = evtListeners[i].name;\n handler = evtListeners[i].handler;\n if ((evtName !== 'konva' || name === 'konva') &&\n (!name || evtName === name) &&\n (!callback || callback === handler)) {\n evtListeners.splice(i, 1);\n if (evtListeners.length === 0) {\n delete this.eventListeners[type];\n break;\n }\n i--;\n }\n }\n }\n _fireChangeEvent(attr, oldVal, newVal) {\n this._fire(attr + CHANGE, {\n oldVal: oldVal,\n newVal: newVal,\n });\n }\n addName(name) {\n if (!this.hasName(name)) {\n var oldName = this.name();\n var newName = oldName ? oldName + ' ' + name : name;\n this.name(newName);\n }\n return this;\n }\n hasName(name) {\n if (!name) {\n return false;\n }\n const fullName = this.name();\n if (!fullName) {\n return false;\n }\n var names = (fullName || '').split(/\\s/g);\n return names.indexOf(name) !== -1;\n }\n removeName(name) {\n var names = (this.name() || '').split(/\\s/g);\n var index = names.indexOf(name);\n if (index !== -1) {\n names.splice(index, 1);\n this.name(names.join(' '));\n }\n return this;\n }\n setAttr(attr, val) {\n var func = this[SET + Util._capitalize(attr)];\n if (Util._isFunction(func)) {\n func.call(this, val);\n }\n else {\n this._setAttr(attr, val);\n }\n return this;\n }\n _requestDraw() {\n if (Konva.autoDrawEnabled) {\n const drawNode = this.getLayer() || this.getStage();\n drawNode === null || drawNode === void 0 ? void 0 : drawNode.batchDraw();\n }\n }\n _setAttr(key, val) {\n var oldVal = this.attrs[key];\n if (oldVal === val && !Util.isObject(val)) {\n return;\n }\n if (val === undefined || val === null) {\n delete this.attrs[key];\n }\n else {\n this.attrs[key] = val;\n }\n if (this._shouldFireChangeEvents) {\n this._fireChangeEvent(key, oldVal, val);\n }\n this._requestDraw();\n }\n _setComponentAttr(key, component, val) {\n var oldVal;\n if (val !== undefined) {\n oldVal = this.attrs[key];\n if (!oldVal) {\n this.attrs[key] = this.getAttr(key);\n }\n this.attrs[key][component] = val;\n this._fireChangeEvent(key, oldVal, val);\n }\n }\n _fireAndBubble(eventType, evt, compareShape) {\n if (evt && this.nodeType === SHAPE) {\n evt.target = this;\n }\n var shouldStop = (eventType === MOUSEENTER || eventType === MOUSELEAVE) &&\n ((compareShape &&\n (this === compareShape ||\n (this.isAncestorOf && this.isAncestorOf(compareShape)))) ||\n (this.nodeType === 'Stage' && !compareShape));\n if (!shouldStop) {\n this._fire(eventType, evt);\n var stopBubble = (eventType === MOUSEENTER || eventType === MOUSELEAVE) &&\n compareShape &&\n compareShape.isAncestorOf &&\n compareShape.isAncestorOf(this) &&\n !compareShape.isAncestorOf(this.parent);\n if (((evt && !evt.cancelBubble) || !evt) &&\n this.parent &&\n this.parent.isListening() &&\n !stopBubble) {\n if (compareShape && compareShape.parent) {\n this._fireAndBubble.call(this.parent, eventType, evt, compareShape);\n }\n else {\n this._fireAndBubble.call(this.parent, eventType, evt);\n }\n }\n }\n }\n _getProtoListeners(eventType) {\n let listeners = this._cache.get(ALL_LISTENERS);\n if (!listeners) {\n listeners = {};\n let obj = Object.getPrototypeOf(this);\n while (obj) {\n if (!obj.eventListeners) {\n obj = Object.getPrototypeOf(obj);\n continue;\n }\n for (var event in obj.eventListeners) {\n const newEvents = obj.eventListeners[event];\n const oldEvents = listeners[event] || [];\n listeners[event] = newEvents.concat(oldEvents);\n }\n obj = Object.getPrototypeOf(obj);\n }\n this._cache.set(ALL_LISTENERS, listeners);\n }\n return listeners[eventType];\n }\n _fire(eventType, evt) {\n evt = evt || {};\n evt.currentTarget = this;\n evt.type = eventType;\n const topListeners = this._getProtoListeners(eventType);\n if (topListeners) {\n for (var i = 0; i < topListeners.length; i++) {\n topListeners[i].handler.call(this, evt);\n }\n }\n const selfListeners = this.eventListeners[eventType];\n if (selfListeners) {\n for (var i = 0; i < selfListeners.length; i++) {\n selfListeners[i].handler.call(this, evt);\n }\n }\n }\n draw() {\n this.drawScene();\n this.drawHit();\n return this;\n }\n _createDragElement(evt) {\n var pointerId = evt ? evt.pointerId : undefined;\n var stage = this.getStage();\n var ap = this.getAbsolutePosition();\n var pos = stage._getPointerById(pointerId) ||\n stage._changedPointerPositions[0] ||\n ap;\n DD._dragElements.set(this._id, {\n node: this,\n startPointerPos: pos,\n offset: {\n x: pos.x - ap.x,\n y: pos.y - ap.y,\n },\n dragStatus: 'ready',\n pointerId,\n });\n }\n startDrag(evt, bubbleEvent = true) {\n if (!DD._dragElements.has(this._id)) {\n this._createDragElement(evt);\n }\n const elem = DD._dragElements.get(this._id);\n elem.dragStatus = 'dragging';\n this.fire('dragstart', {\n type: 'dragstart',\n target: this,\n evt: evt && evt.evt,\n }, bubbleEvent);\n }\n _setDragPosition(evt, elem) {\n const pos = this.getStage()._getPointerById(elem.pointerId);\n if (!pos) {\n return;\n }\n var newNodePos = {\n x: pos.x - elem.offset.x,\n y: pos.y - elem.offset.y,\n };\n var dbf = this.dragBoundFunc();\n if (dbf !== undefined) {\n const bounded = dbf.call(this, newNodePos, evt);\n if (!bounded) {\n Util.warn('dragBoundFunc did not return any value. That is unexpected behavior. You must return new absolute position from dragBoundFunc.');\n }\n else {\n newNodePos = bounded;\n }\n }\n if (!this._lastPos ||\n this._lastPos.x !== newNodePos.x ||\n this._lastPos.y !== newNodePos.y) {\n this.setAbsolutePosition(newNodePos);\n this._requestDraw();\n }\n this._lastPos = newNodePos;\n }\n stopDrag(evt) {\n const elem = DD._dragElements.get(this._id);\n if (elem) {\n elem.dragStatus = 'stopped';\n }\n DD._endDragBefore(evt);\n DD._endDragAfter(evt);\n }\n setDraggable(draggable) {\n this._setAttr('draggable', draggable);\n this._dragChange();\n }\n isDragging() {\n const elem = DD._dragElements.get(this._id);\n return elem ? elem.dragStatus === 'dragging' : false;\n }\n _listenDrag() {\n this._dragCleanup();\n this.on('mousedown.konva touchstart.konva', function (evt) {\n var shouldCheckButton = evt.evt['button'] !== undefined;\n var canDrag = !shouldCheckButton || Konva.dragButtons.indexOf(evt.evt['button']) >= 0;\n if (!canDrag) {\n return;\n }\n if (this.isDragging()) {\n return;\n }\n var hasDraggingChild = false;\n DD._dragElements.forEach((elem) => {\n if (this.isAncestorOf(elem.node)) {\n hasDraggingChild = true;\n }\n });\n if (!hasDraggingChild) {\n this._createDragElement(evt);\n }\n });\n }\n _dragChange() {\n if (this.attrs.draggable) {\n this._listenDrag();\n }\n else {\n this._dragCleanup();\n var stage = this.getStage();\n if (!stage) {\n return;\n }\n const dragElement = DD._dragElements.get(this._id);\n const isDragging = dragElement && dragElement.dragStatus === 'dragging';\n const isReady = dragElement && dragElement.dragStatus === 'ready';\n if (isDragging) {\n this.stopDrag();\n }\n else if (isReady) {\n DD._dragElements.delete(this._id);\n }\n }\n }\n _dragCleanup() {\n this.off('mousedown.konva');\n this.off('touchstart.konva');\n }\n isClientRectOnScreen(margin = { x: 0, y: 0 }) {\n const stage = this.getStage();\n if (!stage) {\n return false;\n }\n const screenRect = {\n x: -margin.x,\n y: -margin.y,\n width: stage.width() + 2 * margin.x,\n height: stage.height() + 2 * margin.y,\n };\n return Util.haveIntersection(screenRect, this.getClientRect());\n }\n static create(data, container) {\n if (Util._isString(data)) {\n data = JSON.parse(data);\n }\n return this._createNode(data, container);\n }\n static _createNode(obj, container) {\n var className = Node.prototype.getClassName.call(obj), children = obj.children, no, len, n;\n if (container) {\n obj.attrs.container = container;\n }\n if (!Konva[className]) {\n Util.warn('Can not find a node with class name \"' +\n className +\n '\". Fallback to \"Shape\".');\n className = 'Shape';\n }\n const Class = Konva[className];\n no = new Class(obj.attrs);\n if (children) {\n len = children.length;\n for (n = 0; n < len; n++) {\n no.add(Node._createNode(children[n]));\n }\n }\n return no;\n }\n}\nNode.prototype.nodeType = 'Node';\nNode.prototype._attrsAffectingSize = [];\nNode.prototype.eventListeners = {};\nNode.prototype.on.call(Node.prototype, TRANSFORM_CHANGE_STR, function () {\n if (this._batchingTransformChange) {\n this._needClearTransformCache = true;\n return;\n }\n this._clearCache(TRANSFORM);\n this._clearSelfAndDescendantCache(ABSOLUTE_TRANSFORM);\n});\nNode.prototype.on.call(Node.prototype, 'visibleChange.konva', function () {\n this._clearSelfAndDescendantCache(VISIBLE);\n});\nNode.prototype.on.call(Node.prototype, 'listeningChange.konva', function () {\n this._clearSelfAndDescendantCache(LISTENING);\n});\nNode.prototype.on.call(Node.prototype, 'opacityChange.konva', function () {\n this._clearSelfAndDescendantCache(ABSOLUTE_OPACITY);\n});\nconst addGetterSetter = Factory.addGetterSetter;\naddGetterSetter(Node, 'zIndex');\naddGetterSetter(Node, 'absolutePosition');\naddGetterSetter(Node, 'position');\naddGetterSetter(Node, 'x', 0, getNumberValidator());\naddGetterSetter(Node, 'y', 0, getNumberValidator());\naddGetterSetter(Node, 'globalCompositeOperation', 'source-over', getStringValidator());\naddGetterSetter(Node, 'opacity', 1, getNumberValidator());\naddGetterSetter(Node, 'name', '', getStringValidator());\naddGetterSetter(Node, 'id', '', getStringValidator());\naddGetterSetter(Node, 'rotation', 0, getNumberValidator());\nFactory.addComponentsGetterSetter(Node, 'scale', ['x', 'y']);\naddGetterSetter(Node, 'scaleX', 1, getNumberValidator());\naddGetterSetter(Node, 'scaleY', 1, getNumberValidator());\nFactory.addComponentsGetterSetter(Node, 'skew', ['x', 'y']);\naddGetterSetter(Node, 'skewX', 0, getNumberValidator());\naddGetterSetter(Node, 'skewY', 0, getNumberValidator());\nFactory.addComponentsGetterSetter(Node, 'offset', ['x', 'y']);\naddGetterSetter(Node, 'offsetX', 0, getNumberValidator());\naddGetterSetter(Node, 'offsetY', 0, getNumberValidator());\naddGetterSetter(Node, 'dragDistance', null, getNumberValidator());\naddGetterSetter(Node, 'width', 0, getNumberValidator());\naddGetterSetter(Node, 'height', 0, getNumberValidator());\naddGetterSetter(Node, 'listening', true, getBooleanValidator());\naddGetterSetter(Node, 'preventDefault', true, getBooleanValidator());\naddGetterSetter(Node, 'filters', null, function (val) {\n this._filterUpToDate = false;\n return val;\n});\naddGetterSetter(Node, 'visible', true, getBooleanValidator());\naddGetterSetter(Node, 'transformsEnabled', 'all', getStringValidator());\naddGetterSetter(Node, 'size');\naddGetterSetter(Node, 'dragBoundFunc');\naddGetterSetter(Node, 'draggable', false, getBooleanValidator());\nFactory.backCompat(Node, {\n rotateDeg: 'rotate',\n setRotationDeg: 'setRotation',\n getRotationDeg: 'getRotation',\n});\n","import { Factory } from './Factory.js';\nimport { Node } from './Node.js';\nimport { getNumberValidator } from './Validators.js';\nexport class Container extends Node {\n constructor() {\n super(...arguments);\n this.children = [];\n }\n getChildren(filterFunc) {\n if (!filterFunc) {\n return this.children || [];\n }\n const children = this.children || [];\n var results = [];\n children.forEach(function (child) {\n if (filterFunc(child)) {\n results.push(child);\n }\n });\n return results;\n }\n hasChildren() {\n return this.getChildren().length > 0;\n }\n removeChildren() {\n this.getChildren().forEach((child) => {\n child.parent = null;\n child.index = 0;\n child.remove();\n });\n this.children = [];\n this._requestDraw();\n return this;\n }\n destroyChildren() {\n this.getChildren().forEach((child) => {\n child.parent = null;\n child.index = 0;\n child.destroy();\n });\n this.children = [];\n this._requestDraw();\n return this;\n }\n add(...children) {\n if (children.length === 0) {\n return this;\n }\n if (children.length > 1) {\n for (var i = 0; i < children.length; i++) {\n this.add(children[i]);\n }\n return this;\n }\n const child = children[0];\n if (child.getParent()) {\n child.moveTo(this);\n return this;\n }\n this._validateAdd(child);\n child.index = this.getChildren().length;\n child.parent = this;\n child._clearCaches();\n this.getChildren().push(child);\n this._fire('add', {\n child: child,\n });\n this._requestDraw();\n return this;\n }\n destroy() {\n if (this.hasChildren()) {\n this.destroyChildren();\n }\n super.destroy();\n return this;\n }\n find(selector) {\n return this._generalFind(selector, false);\n }\n findOne(selector) {\n var result = this._generalFind(selector, true);\n return result.length > 0 ? result[0] : undefined;\n }\n _generalFind(selector, findOne) {\n var retArr = [];\n this._descendants((node) => {\n const valid = node._isMatch(selector);\n if (valid) {\n retArr.push(node);\n }\n if (valid && findOne) {\n return true;\n }\n return false;\n });\n return retArr;\n }\n _descendants(fn) {\n let shouldStop = false;\n const children = this.getChildren();\n for (const child of children) {\n shouldStop = fn(child);\n if (shouldStop) {\n return true;\n }\n if (!child.hasChildren()) {\n continue;\n }\n shouldStop = child._descendants(fn);\n if (shouldStop) {\n return true;\n }\n }\n return false;\n }\n toObject() {\n var obj = Node.prototype.toObject.call(this);\n obj.children = [];\n this.getChildren().forEach((child) => {\n obj.children.push(child.toObject());\n });\n return obj;\n }\n isAncestorOf(node) {\n var parent = node.getParent();\n while (parent) {\n if (parent._id === this._id) {\n return true;\n }\n parent = parent.getParent();\n }\n return false;\n }\n clone(obj) {\n var node = Node.prototype.clone.call(this, obj);\n this.getChildren().forEach(function (no) {\n node.add(no.clone());\n });\n return node;\n }\n getAllIntersections(pos) {\n var arr = [];\n this.find('Shape').forEach(function (shape) {\n if (shape.isVisible() && shape.intersects(pos)) {\n arr.push(shape);\n }\n });\n return arr;\n }\n _clearSelfAndDescendantCache(attr) {\n var _a;\n super._clearSelfAndDescendantCache(attr);\n if (this.isCached()) {\n return;\n }\n (_a = this.children) === null || _a === void 0 ? void 0 : _a.forEach(function (node) {\n node._clearSelfAndDescendantCache(attr);\n });\n }\n _setChildrenIndices() {\n var _a;\n (_a = this.children) === null || _a === void 0 ? void 0 : _a.forEach(function (child, n) {\n child.index = n;\n });\n this._requestDraw();\n }\n drawScene(can, top) {\n var layer = this.getLayer(), canvas = can || (layer && layer.getCanvas()), context = canvas && canvas.getContext(), cachedCanvas = this._getCanvasCache(), cachedSceneCanvas = cachedCanvas && cachedCanvas.scene;\n var caching = canvas && canvas.isCache;\n if (!this.isVisible() && !caching) {\n return this;\n }\n if (cachedSceneCanvas) {\n context.save();\n var m = this.getAbsoluteTransform(top).getMatrix();\n context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);\n this._drawCachedSceneCanvas(context);\n context.restore();\n }\n else {\n this._drawChildren('drawScene', canvas, top);\n }\n return this;\n }\n drawHit(can, top) {\n if (!this.shouldDrawHit(top)) {\n return this;\n }\n var layer = this.getLayer(), canvas = can || (layer && layer.hitCanvas), context = canvas && canvas.getContext(), cachedCanvas = this._getCanvasCache(), cachedHitCanvas = cachedCanvas && cachedCanvas.hit;\n if (cachedHitCanvas) {\n context.save();\n var m = this.getAbsoluteTransform(top).getMatrix();\n context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);\n this._drawCachedHitCanvas(context);\n context.restore();\n }\n else {\n this._drawChildren('drawHit', canvas, top);\n }\n return this;\n }\n _drawChildren(drawMethod, canvas, top) {\n var _a;\n var context = canvas && canvas.getContext(), clipWidth = this.clipWidth(), clipHeight = this.clipHeight(), clipFunc = this.clipFunc(), hasClip = (clipWidth && clipHeight) || clipFunc;\n const selfCache = top === this;\n if (hasClip) {\n context.save();\n var transform = this.getAbsoluteTransform(top);\n var m = transform.getMatrix();\n context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);\n context.beginPath();\n if (clipFunc) {\n clipFunc.call(this, context, this);\n }\n else {\n var clipX = this.clipX();\n var clipY = this.clipY();\n context.rect(clipX, clipY, clipWidth, clipHeight);\n }\n context.clip();\n m = transform.copy().invert().getMatrix();\n context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);\n }\n var hasComposition = !selfCache &&\n this.globalCompositeOperation() !== 'source-over' &&\n drawMethod === 'drawScene';\n if (hasComposition) {\n context.save();\n context._applyGlobalCompositeOperation(this);\n }\n (_a = this.children) === null || _a === void 0 ? void 0 : _a.forEach(function (child) {\n child[drawMethod](canvas, top);\n });\n if (hasComposition) {\n context.restore();\n }\n if (hasClip) {\n context.restore();\n }\n }\n getClientRect(config) {\n var _a;\n config = config || {};\n var skipTransform = config.skipTransform;\n var relativeTo = config.relativeTo;\n var minX, minY, maxX, maxY;\n var selfRect = {\n x: Infinity,\n y: Infinity,\n width: 0,\n height: 0,\n };\n var that = this;\n (_a = this.children) === null || _a === void 0 ? void 0 : _a.forEach(function (child) {\n if (!child.visible()) {\n return;\n }\n var rect = child.getClientRect({\n relativeTo: that,\n skipShadow: config.skipShadow,\n skipStroke: config.skipStroke,\n });\n if (rect.width === 0 && rect.height === 0) {\n return;\n }\n if (minX === undefined) {\n minX = rect.x;\n minY = rect.y;\n maxX = rect.x + rect.width;\n maxY = rect.y + rect.height;\n }\n else {\n minX = Math.min(minX, rect.x);\n minY = Math.min(minY, rect.y);\n maxX = Math.max(maxX, rect.x + rect.width);\n maxY = Math.max(maxY, rect.y + rect.height);\n }\n });\n var shapes = this.find('Shape');\n var hasVisible = false;\n for (var i = 0; i < shapes.length; i++) {\n var shape = shapes[i];\n if (shape._isVisible(this)) {\n hasVisible = true;\n break;\n }\n }\n if (hasVisible && minX !== undefined) {\n selfRect = {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY,\n };\n }\n else {\n selfRect = {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n };\n }\n if (!skipTransform) {\n return this._transformedRect(selfRect, relativeTo);\n }\n return selfRect;\n }\n}\nFactory.addComponentsGetterSetter(Container, 'clip', [\n 'x',\n 'y',\n 'width',\n 'height',\n]);\nFactory.addGetterSetter(Container, 'clipX', undefined, getNumberValidator());\nFactory.addGetterSetter(Container, 'clipY', undefined, getNumberValidator());\nFactory.addGetterSetter(Container, 'clipWidth', undefined, getNumberValidator());\nFactory.addGetterSetter(Container, 'clipHeight', undefined, getNumberValidator());\nFactory.addGetterSetter(Container, 'clipFunc');\n","import { Konva } from './Global.js';\nconst Captures = new Map();\nconst SUPPORT_POINTER_EVENTS = Konva._global['PointerEvent'] !== undefined;\nexport function getCapturedShape(pointerId) {\n return Captures.get(pointerId);\n}\nexport function createEvent(evt) {\n return {\n evt,\n pointerId: evt.pointerId,\n };\n}\nexport function hasPointerCapture(pointerId, shape) {\n return Captures.get(pointerId) === shape;\n}\nexport function setPointerCapture(pointerId, shape) {\n releaseCapture(pointerId);\n const stage = shape.getStage();\n if (!stage)\n return;\n Captures.set(pointerId, shape);\n if (SUPPORT_POINTER_EVENTS) {\n shape._fire('gotpointercapture', createEvent(new PointerEvent('gotpointercapture')));\n }\n}\nexport function releaseCapture(pointerId, target) {\n const shape = Captures.get(pointerId);\n if (!shape)\n return;\n const stage = shape.getStage();\n if (stage && stage.content) {\n }\n Captures.delete(pointerId);\n if (SUPPORT_POINTER_EVENTS) {\n shape._fire('lostpointercapture', createEvent(new PointerEvent('lostpointercapture')));\n }\n}\n","import { Util } from './Util.js';\nimport { Factory } from './Factory.js';\nimport { Container } from './Container.js';\nimport { Konva } from './Global.js';\nimport { SceneCanvas, HitCanvas } from './Canvas.js';\nimport { DD } from './DragAndDrop.js';\nimport { _registerNode } from './Global.js';\nimport * as PointerEvents from './PointerEvents.js';\nvar STAGE = 'Stage', STRING = 'string', PX = 'px', MOUSEOUT = 'mouseout', MOUSELEAVE = 'mouseleave', MOUSEOVER = 'mouseover', MOUSEENTER = 'mouseenter', MOUSEMOVE = 'mousemove', MOUSEDOWN = 'mousedown', MOUSEUP = 'mouseup', POINTERMOVE = 'pointermove', POINTERDOWN = 'pointerdown', POINTERUP = 'pointerup', POINTERCANCEL = 'pointercancel', LOSTPOINTERCAPTURE = 'lostpointercapture', POINTEROUT = 'pointerout', POINTERLEAVE = 'pointerleave', POINTEROVER = 'pointerover', POINTERENTER = 'pointerenter', CONTEXTMENU = 'contextmenu', TOUCHSTART = 'touchstart', TOUCHEND = 'touchend', TOUCHMOVE = 'touchmove', TOUCHCANCEL = 'touchcancel', WHEEL = 'wheel', MAX_LAYERS_NUMBER = 5, EVENTS = [\n [MOUSEENTER, '_pointerenter'],\n [MOUSEDOWN, '_pointerdown'],\n [MOUSEMOVE, '_pointermove'],\n [MOUSEUP, '_pointerup'],\n [MOUSELEAVE, '_pointerleave'],\n [TOUCHSTART, '_pointerdown'],\n [TOUCHMOVE, '_pointermove'],\n [TOUCHEND, '_pointerup'],\n [TOUCHCANCEL, '_pointercancel'],\n [MOUSEOVER, '_pointerover'],\n [WHEEL, '_wheel'],\n [CONTEXTMENU, '_contextmenu'],\n [POINTERDOWN, '_pointerdown'],\n [POINTERMOVE, '_pointermove'],\n [POINTERUP, '_pointerup'],\n [POINTERCANCEL, '_pointercancel'],\n [LOSTPOINTERCAPTURE, '_lostpointercapture'],\n];\nconst EVENTS_MAP = {\n mouse: {\n [POINTEROUT]: MOUSEOUT,\n [POINTERLEAVE]: MOUSELEAVE,\n [POINTEROVER]: MOUSEOVER,\n [POINTERENTER]: MOUSEENTER,\n [POINTERMOVE]: MOUSEMOVE,\n [POINTERDOWN]: MOUSEDOWN,\n [POINTERUP]: MOUSEUP,\n [POINTERCANCEL]: 'mousecancel',\n pointerclick: 'click',\n pointerdblclick: 'dblclick',\n },\n touch: {\n [POINTEROUT]: 'touchout',\n [POINTERLEAVE]: 'touchleave',\n [POINTEROVER]: 'touchover',\n [POINTERENTER]: 'touchenter',\n [POINTERMOVE]: TOUCHMOVE,\n [POINTERDOWN]: TOUCHSTART,\n [POINTERUP]: TOUCHEND,\n [POINTERCANCEL]: TOUCHCANCEL,\n pointerclick: 'tap',\n pointerdblclick: 'dbltap',\n },\n pointer: {\n [POINTEROUT]: POINTEROUT,\n [POINTERLEAVE]: POINTERLEAVE,\n [POINTEROVER]: POINTEROVER,\n [POINTERENTER]: POINTERENTER,\n [POINTERMOVE]: POINTERMOVE,\n [POINTERDOWN]: POINTERDOWN,\n [POINTERUP]: POINTERUP,\n [POINTERCANCEL]: POINTERCANCEL,\n pointerclick: 'pointerclick',\n pointerdblclick: 'pointerdblclick',\n },\n};\nconst getEventType = (type) => {\n if (type.indexOf('pointer') >= 0) {\n return 'pointer';\n }\n if (type.indexOf('touch') >= 0) {\n return 'touch';\n }\n return 'mouse';\n};\nconst getEventsMap = (eventType) => {\n const type = getEventType(eventType);\n if (type === 'pointer') {\n return Konva.pointerEventsEnabled && EVENTS_MAP.pointer;\n }\n if (type === 'touch') {\n return EVENTS_MAP.touch;\n }\n if (type === 'mouse') {\n return EVENTS_MAP.mouse;\n }\n};\nfunction checkNoClip(attrs = {}) {\n if (attrs.clipFunc || attrs.clipWidth || attrs.clipHeight) {\n Util.warn('Stage does not support clipping. Please use clip for Layers or Groups.');\n }\n return attrs;\n}\nconst NO_POINTERS_MESSAGE = `Pointer position is missing and not registered by the stage. Looks like it is outside of the stage container. You can set it manually from event: stage.setPointersPositions(event);`;\nexport const stages = [];\nexport class Stage extends Container {\n constructor(config) {\n super(checkNoClip(config));\n this._pointerPositions = [];\n this._changedPointerPositions = [];\n this._buildDOM();\n this._bindContentEvents();\n stages.push(this);\n this.on('widthChange.konva heightChange.konva', this._resizeDOM);\n this.on('visibleChange.konva', this._checkVisibility);\n this.on('clipWidthChange.konva clipHeightChange.konva clipFuncChange.konva', () => {\n checkNoClip(this.attrs);\n });\n this._checkVisibility();\n }\n _validateAdd(child) {\n const isLayer = child.getType() === 'Layer';\n const isFastLayer = child.getType() === 'FastLayer';\n const valid = isLayer || isFastLayer;\n if (!valid) {\n Util.throw('You may only add layers to the stage.');\n }\n }\n _checkVisibility() {\n if (!this.content) {\n return;\n }\n const style = this.visible() ? '' : 'none';\n this.content.style.display = style;\n }\n setContainer(container) {\n if (typeof container === STRING) {\n if (container.charAt(0) === '.') {\n var className = container.slice(1);\n container = document.getElementsByClassName(className)[0];\n }\n else {\n var id;\n if (container.charAt(0) !== '#') {\n id = container;\n }\n else {\n id = container.slice(1);\n }\n container = document.getElementById(id);\n }\n if (!container) {\n throw 'Can not find container in document with id ' + id;\n }\n }\n this._setAttr('container', container);\n if (this.content) {\n if (this.content.parentElement) {\n this.content.parentElement.removeChild(this.content);\n }\n container.appendChild(this.content);\n }\n return this;\n }\n shouldDrawHit() {\n return true;\n }\n clear() {\n var layers = this.children, len = layers.length, n;\n for (n = 0; n < len; n++) {\n layers[n].clear();\n }\n return this;\n }\n clone(obj) {\n if (!obj) {\n obj = {};\n }\n obj.container =\n typeof document !== 'undefined' && document.createElement('div');\n return Container.prototype.clone.call(this, obj);\n }\n destroy() {\n super.destroy();\n var content = this.content;\n if (content && Util._isInDocument(content)) {\n this.container().removeChild(content);\n }\n var index = stages.indexOf(this);\n if (index > -1) {\n stages.splice(index, 1);\n }\n Util.releaseCanvas(this.bufferCanvas._canvas, this.bufferHitCanvas._canvas);\n return this;\n }\n getPointerPosition() {\n const pos = this._pointerPositions[0] || this._changedPointerPositions[0];\n if (!pos) {\n Util.warn(NO_POINTERS_MESSAGE);\n return null;\n }\n return {\n x: pos.x,\n y: pos.y,\n };\n }\n _getPointerById(id) {\n return this._pointerPositions.find((p) => p.id === id);\n }\n getPointersPositions() {\n return this._pointerPositions;\n }\n getStage() {\n return this;\n }\n getContent() {\n return this.content;\n }\n _toKonvaCanvas(config) {\n config = config || {};\n config.x = config.x || 0;\n config.y = config.y || 0;\n config.width = config.width || this.width();\n config.height = config.height || this.height();\n var canvas = new SceneCanvas({\n width: config.width,\n height: config.height,\n pixelRatio: config.pixelRatio || 1,\n });\n var _context = canvas.getContext()._context;\n var layers = this.children;\n if (config.x || config.y) {\n _context.translate(-1 * config.x, -1 * config.y);\n }\n layers.forEach(function (layer) {\n if (!layer.isVisible()) {\n return;\n }\n var layerCanvas = layer._toKonvaCanvas(config);\n _context.drawImage(layerCanvas._canvas, config.x, config.y, layerCanvas.getWidth() / layerCanvas.getPixelRatio(), layerCanvas.getHeight() / layerCanvas.getPixelRatio());\n });\n return canvas;\n }\n getIntersection(pos) {\n if (!pos) {\n return null;\n }\n var layers = this.children, len = layers.length, end = len - 1, n;\n for (n = end; n >= 0; n--) {\n const shape = layers[n].getIntersection(pos);\n if (shape) {\n return shape;\n }\n }\n return null;\n }\n _resizeDOM() {\n var width = this.width();\n var height = this.height();\n if (this.content) {\n this.content.style.width = width + PX;\n this.content.style.height = height + PX;\n }\n this.bufferCanvas.setSize(width, height);\n this.bufferHitCanvas.setSize(width, height);\n this.children.forEach((layer) => {\n layer.setSize({ width, height });\n layer.draw();\n });\n }\n add(layer, ...rest) {\n if (arguments.length > 1) {\n for (var i = 0; i < arguments.length; i++) {\n this.add(arguments[i]);\n }\n return this;\n }\n super.add(layer);\n var length = this.children.length;\n if (length > MAX_LAYERS_NUMBER) {\n Util.warn('The stage has ' +\n length +\n ' layers. Recommended maximum number of layers is 3-5. Adding more layers into the stage may drop the performance. Rethink your tree structure, you can use Konva.Group.');\n }\n layer.setSize({ width: this.width(), height: this.height() });\n layer.draw();\n if (Konva.isBrowser) {\n this.content.appendChild(layer.canvas._canvas);\n }\n return this;\n }\n getParent() {\n return null;\n }\n getLayer() {\n return null;\n }\n hasPointerCapture(pointerId) {\n return PointerEvents.hasPointerCapture(pointerId, this);\n }\n setPointerCapture(pointerId) {\n PointerEvents.setPointerCapture(pointerId, this);\n }\n releaseCapture(pointerId) {\n PointerEvents.releaseCapture(pointerId, this);\n }\n getLayers() {\n return this.children;\n }\n _bindContentEvents() {\n if (!Konva.isBrowser) {\n return;\n }\n EVENTS.forEach(([event, methodName]) => {\n this.content.addEventListener(event, (evt) => {\n this[methodName](evt);\n }, { passive: false });\n });\n }\n _pointerenter(evt) {\n this.setPointersPositions(evt);\n const events = getEventsMap(evt.type);\n this._fire(events.pointerenter, {\n evt: evt,\n target: this,\n currentTarget: this,\n });\n }\n _pointerover(evt) {\n this.setPointersPositions(evt);\n const events = getEventsMap(evt.type);\n this._fire(events.pointerover, {\n evt: evt,\n target: this,\n currentTarget: this,\n });\n }\n _getTargetShape(evenType) {\n let shape = this[evenType + 'targetShape'];\n if (shape && !shape.getStage()) {\n shape = null;\n }\n return shape;\n }\n _pointerleave(evt) {\n const events = getEventsMap(evt.type);\n const eventType = getEventType(evt.type);\n if (!events) {\n return;\n }\n this.setPointersPositions(evt);\n var targetShape = this._getTargetShape(eventType);\n var eventsEnabled = !DD.isDragging || Konva.hitOnDragEnabled;\n if (targetShape && eventsEnabled) {\n targetShape._fireAndBubble(events.pointerout, { evt: evt });\n targetShape._fireAndBubble(events.pointerleave, { evt: evt });\n this._fire(events.pointerleave, {\n evt: evt,\n target: this,\n currentTarget: this,\n });\n this[eventType + 'targetShape'] = null;\n }\n else if (eventsEnabled) {\n this._fire(events.pointerleave, {\n evt: evt,\n target: this,\n currentTarget: this,\n });\n this._fire(events.pointerout, {\n evt: evt,\n target: this,\n currentTarget: this,\n });\n }\n this.pointerPos = undefined;\n this._pointerPositions = [];\n }\n _pointerdown(evt) {\n const events = getEventsMap(evt.type);\n const eventType = getEventType(evt.type);\n if (!events) {\n return;\n }\n this.setPointersPositions(evt);\n var triggeredOnShape = false;\n this._changedPointerPositions.forEach((pos) => {\n var shape = this.getIntersection(pos);\n DD.justDragged = false;\n Konva['_' + eventType + 'ListenClick'] = true;\n const hasShape = shape && shape.isListening();\n if (!hasShape) {\n return;\n }\n if (Konva.capturePointerEventsEnabled) {\n shape.setPointerCapture(pos.id);\n }\n this[eventType + 'ClickStartShape'] = shape;\n shape._fireAndBubble(events.pointerdown, {\n evt: evt,\n pointerId: pos.id,\n });\n triggeredOnShape = true;\n const isTouch = evt.type.indexOf('touch') >= 0;\n if (shape.preventDefault() && evt.cancelable && isTouch) {\n evt.preventDefault();\n }\n });\n if (!triggeredOnShape) {\n this._fire(events.pointerdown, {\n evt: evt,\n target: this,\n currentTarget: this,\n pointerId: this._pointerPositions[0].id,\n });\n }\n }\n _pointermove(evt) {\n const events = getEventsMap(evt.type);\n const eventType = getEventType(evt.type);\n if (!events) {\n return;\n }\n if (DD.isDragging && DD.node.preventDefault() && evt.cancelable) {\n evt.preventDefault();\n }\n this.setPointersPositions(evt);\n var eventsEnabled = !DD.isDragging || Konva.hitOnDragEnabled;\n if (!eventsEnabled) {\n return;\n }\n var processedShapesIds = {};\n let triggeredOnShape = false;\n var targetShape = this._getTargetShape(eventType);\n this._changedPointerPositions.forEach((pos) => {\n const shape = (PointerEvents.getCapturedShape(pos.id) ||\n this.getIntersection(pos));\n const pointerId = pos.id;\n const event = { evt: evt, pointerId };\n var differentTarget = targetShape !== shape;\n if (differentTarget && targetShape) {\n targetShape._fireAndBubble(events.pointerout, Object.assign({}, event), shape);\n targetShape._fireAndBubble(events.pointerleave, Object.assign({}, event), shape);\n }\n if (shape) {\n if (processedShapesIds[shape._id]) {\n return;\n }\n processedShapesIds[shape._id] = true;\n }\n if (shape && shape.isListening()) {\n triggeredOnShape = true;\n if (differentTarget) {\n shape._fireAndBubble(events.pointerover, Object.assign({}, event), targetShape);\n shape._fireAndBubble(events.pointerenter, Object.assign({}, event), targetShape);\n this[eventType + 'targetShape'] = shape;\n }\n shape._fireAndBubble(events.pointermove, Object.assign({}, event));\n }\n else {\n if (targetShape) {\n this._fire(events.pointerover, {\n evt: evt,\n target: this,\n currentTarget: this,\n pointerId,\n });\n this[eventType + 'targetShape'] = null;\n }\n }\n });\n if (!triggeredOnShape) {\n this._fire(events.pointermove, {\n evt: evt,\n target: this,\n currentTarget: this,\n pointerId: this._changedPointerPositions[0].id,\n });\n }\n }\n _pointerup(evt) {\n const events = getEventsMap(evt.type);\n const eventType = getEventType(evt.type);\n if (!events) {\n return;\n }\n this.setPointersPositions(evt);\n const clickStartShape = this[eventType + 'ClickStartShape'];\n const clickEndShape = this[eventType + 'ClickEndShape'];\n var processedShapesIds = {};\n let triggeredOnShape = false;\n this._changedPointerPositions.forEach((pos) => {\n const shape = (PointerEvents.getCapturedShape(pos.id) ||\n this.getIntersection(pos));\n if (shape) {\n shape.releaseCapture(pos.id);\n if (processedShapesIds[shape._id]) {\n return;\n }\n processedShapesIds[shape._id] = true;\n }\n const pointerId = pos.id;\n const event = { evt: evt, pointerId };\n let fireDblClick = false;\n if (Konva['_' + eventType + 'InDblClickWindow']) {\n fireDblClick = true;\n clearTimeout(this[eventType + 'DblTimeout']);\n }\n else if (!DD.justDragged) {\n Konva['_' + eventType + 'InDblClickWindow'] = true;\n clearTimeout(this[eventType + 'DblTimeout']);\n }\n this[eventType + 'DblTimeout'] = setTimeout(function () {\n Konva['_' + eventType + 'InDblClickWindow'] = false;\n }, Konva.dblClickWindow);\n if (shape && shape.isListening()) {\n triggeredOnShape = true;\n this[eventType + 'ClickEndShape'] = shape;\n shape._fireAndBubble(events.pointerup, Object.assign({}, event));\n if (Konva['_' + eventType + 'ListenClick'] &&\n clickStartShape &&\n clickStartShape === shape) {\n shape._fireAndBubble(events.pointerclick, Object.assign({}, event));\n if (fireDblClick && clickEndShape && clickEndShape === shape) {\n shape._fireAndBubble(events.pointerdblclick, Object.assign({}, event));\n }\n }\n }\n else {\n this[eventType + 'ClickEndShape'] = null;\n if (Konva['_' + eventType + 'ListenClick']) {\n this._fire(events.pointerclick, {\n evt: evt,\n target: this,\n currentTarget: this,\n pointerId,\n });\n }\n if (fireDblClick) {\n this._fire(events.pointerdblclick, {\n evt: evt,\n target: this,\n currentTarget: this,\n pointerId,\n });\n }\n }\n });\n if (!triggeredOnShape) {\n this._fire(events.pointerup, {\n evt: evt,\n target: this,\n currentTarget: this,\n pointerId: this._changedPointerPositions[0].id,\n });\n }\n Konva['_' + eventType + 'ListenClick'] = false;\n if (evt.cancelable && eventType !== 'touch') {\n evt.preventDefault();\n }\n }\n _contextmenu(evt) {\n this.setPointersPositions(evt);\n var shape = this.getIntersection(this.getPointerPosition());\n if (shape && shape.isListening()) {\n shape._fireAndBubble(CONTEXTMENU, { evt: evt });\n }\n else {\n this._fire(CONTEXTMENU, {\n evt: evt,\n target: this,\n currentTarget: this,\n });\n }\n }\n _wheel(evt) {\n this.setPointersPositions(evt);\n var shape = this.getIntersection(this.getPointerPosition());\n if (shape && shape.isListening()) {\n shape._fireAndBubble(WHEEL, { evt: evt });\n }\n else {\n this._fire(WHEEL, {\n evt: evt,\n target: this,\n currentTarget: this,\n });\n }\n }\n _pointercancel(evt) {\n this.setPointersPositions(evt);\n const shape = PointerEvents.getCapturedShape(evt.pointerId) ||\n this.getIntersection(this.getPointerPosition());\n if (shape) {\n shape._fireAndBubble(POINTERUP, PointerEvents.createEvent(evt));\n }\n PointerEvents.releaseCapture(evt.pointerId);\n }\n _lostpointercapture(evt) {\n PointerEvents.releaseCapture(evt.pointerId);\n }\n setPointersPositions(evt) {\n var contentPosition = this._getContentPosition(), x = null, y = null;\n evt = evt ? evt : window.event;\n if (evt.touches !== undefined) {\n this._pointerPositions = [];\n this._changedPointerPositions = [];\n Array.prototype.forEach.call(evt.touches, (touch) => {\n this._pointerPositions.push({\n id: touch.identifier,\n x: (touch.clientX - contentPosition.left) / contentPosition.scaleX,\n y: (touch.clientY - contentPosition.top) / contentPosition.scaleY,\n });\n });\n Array.prototype.forEach.call(evt.changedTouches || evt.touches, (touch) => {\n this._changedPointerPositions.push({\n id: touch.identifier,\n x: (touch.clientX - contentPosition.left) / contentPosition.scaleX,\n y: (touch.clientY - contentPosition.top) / contentPosition.scaleY,\n });\n });\n }\n else {\n x = (evt.clientX - contentPosition.left) / contentPosition.scaleX;\n y = (evt.clientY - contentPosition.top) / contentPosition.scaleY;\n this.pointerPos = {\n x: x,\n y: y,\n };\n this._pointerPositions = [{ x, y, id: Util._getFirstPointerId(evt) }];\n this._changedPointerPositions = [\n { x, y, id: Util._getFirstPointerId(evt) },\n ];\n }\n }\n _setPointerPosition(evt) {\n Util.warn('Method _setPointerPosition is deprecated. Use \"stage.setPointersPositions(event)\" instead.');\n this.setPointersPositions(evt);\n }\n _getContentPosition() {\n if (!this.content || !this.content.getBoundingClientRect) {\n return {\n top: 0,\n left: 0,\n scaleX: 1,\n scaleY: 1,\n };\n }\n var rect = this.content.getBoundingClientRect();\n return {\n top: rect.top,\n left: rect.left,\n scaleX: rect.width / this.content.clientWidth || 1,\n scaleY: rect.height / this.content.clientHeight || 1,\n };\n }\n _buildDOM() {\n this.bufferCanvas = new SceneCanvas({\n width: this.width(),\n height: this.height(),\n });\n this.bufferHitCanvas = new HitCanvas({\n pixelRatio: 1,\n width: this.width(),\n height: this.height(),\n });\n if (!Konva.isBrowser) {\n return;\n }\n var container = this.container();\n if (!container) {\n throw 'Stage has no container. A container is required.';\n }\n container.innerHTML = '';\n this.content = document.createElement('div');\n this.content.style.position = 'relative';\n this.content.style.userSelect = 'none';\n this.content.className = 'konvajs-content';\n this.content.setAttribute('role', 'presentation');\n container.appendChild(this.content);\n this._resizeDOM();\n }\n cache() {\n Util.warn('Cache function is not allowed for stage. You may use cache only for layers, groups and shapes.');\n return this;\n }\n clearCache() {\n return this;\n }\n batchDraw() {\n this.getChildren().forEach(function (layer) {\n layer.batchDraw();\n });\n return this;\n }\n}\nStage.prototype.nodeType = STAGE;\n_registerNode(Stage);\nFactory.addGetterSetter(Stage, 'container');\n","import { Konva } from './Global.js';\nimport { Transform, Util } from './Util.js';\nimport { Factory } from './Factory.js';\nimport { Node } from './Node.js';\nimport { getNumberValidator, getNumberOrAutoValidator, getStringValidator, getBooleanValidator, getStringOrGradientValidator, } from './Validators.js';\nimport { _registerNode } from './Global.js';\nimport * as PointerEvents from './PointerEvents.js';\nvar HAS_SHADOW = 'hasShadow';\nvar SHADOW_RGBA = 'shadowRGBA';\nvar patternImage = 'patternImage';\nvar linearGradient = 'linearGradient';\nvar radialGradient = 'radialGradient';\nlet dummyContext;\nfunction getDummyContext() {\n if (dummyContext) {\n return dummyContext;\n }\n dummyContext = Util.createCanvasElement().getContext('2d');\n return dummyContext;\n}\nexport const shapes = {};\nfunction _fillFunc(context) {\n context.fill();\n}\nfunction _strokeFunc(context) {\n context.stroke();\n}\nfunction _fillFuncHit(context) {\n context.fill();\n}\nfunction _strokeFuncHit(context) {\n context.stroke();\n}\nfunction _clearHasShadowCache() {\n this._clearCache(HAS_SHADOW);\n}\nfunction _clearGetShadowRGBACache() {\n this._clearCache(SHADOW_RGBA);\n}\nfunction _clearFillPatternCache() {\n this._clearCache(patternImage);\n}\nfunction _clearLinearGradientCache() {\n this._clearCache(linearGradient);\n}\nfunction _clearRadialGradientCache() {\n this._clearCache(radialGradient);\n}\nexport class Shape extends Node {\n constructor(config) {\n super(config);\n let key;\n while (true) {\n key = Util.getRandomColor();\n if (key && !(key in shapes)) {\n break;\n }\n }\n this.colorKey = key;\n shapes[key] = this;\n }\n getContext() {\n Util.warn('shape.getContext() method is deprecated. Please do not use it.');\n return this.getLayer().getContext();\n }\n getCanvas() {\n Util.warn('shape.getCanvas() method is deprecated. Please do not use it.');\n return this.getLayer().getCanvas();\n }\n getSceneFunc() {\n return this.attrs.sceneFunc || this['_sceneFunc'];\n }\n getHitFunc() {\n return this.attrs.hitFunc || this['_hitFunc'];\n }\n hasShadow() {\n return this._getCache(HAS_SHADOW, this._hasShadow);\n }\n _hasShadow() {\n return (this.shadowEnabled() &&\n this.shadowOpacity() !== 0 &&\n !!(this.shadowColor() ||\n this.shadowBlur() ||\n this.shadowOffsetX() ||\n this.shadowOffsetY()));\n }\n _getFillPattern() {\n return this._getCache(patternImage, this.__getFillPattern);\n }\n __getFillPattern() {\n if (this.fillPatternImage()) {\n var ctx = getDummyContext();\n const pattern = ctx.createPattern(this.fillPatternImage(), this.fillPatternRepeat() || 'repeat');\n if (pattern && pattern.setTransform) {\n const tr = new Transform();\n tr.translate(this.fillPatternX(), this.fillPatternY());\n tr.rotate(Konva.getAngle(this.fillPatternRotation()));\n tr.scale(this.fillPatternScaleX(), this.fillPatternScaleY());\n tr.translate(-1 * this.fillPatternOffsetX(), -1 * this.fillPatternOffsetY());\n const m = tr.getMatrix();\n const matrix = typeof DOMMatrix === 'undefined'\n ? {\n a: m[0],\n b: m[1],\n c: m[2],\n d: m[3],\n e: m[4],\n f: m[5],\n }\n : new DOMMatrix(m);\n pattern.setTransform(matrix);\n }\n return pattern;\n }\n }\n _getLinearGradient() {\n return this._getCache(linearGradient, this.__getLinearGradient);\n }\n __getLinearGradient() {\n var colorStops = this.fillLinearGradientColorStops();\n if (colorStops) {\n var ctx = getDummyContext();\n var start = this.fillLinearGradientStartPoint();\n var end = this.fillLinearGradientEndPoint();\n var grd = ctx.createLinearGradient(start.x, start.y, end.x, end.y);\n for (var n = 0; n < colorStops.length; n += 2) {\n grd.addColorStop(colorStops[n], colorStops[n + 1]);\n }\n return grd;\n }\n }\n _getRadialGradient() {\n return this._getCache(radialGradient, this.__getRadialGradient);\n }\n __getRadialGradient() {\n var colorStops = this.fillRadialGradientColorStops();\n if (colorStops) {\n var ctx = getDummyContext();\n var start = this.fillRadialGradientStartPoint();\n var end = this.fillRadialGradientEndPoint();\n var grd = ctx.createRadialGradient(start.x, start.y, this.fillRadialGradientStartRadius(), end.x, end.y, this.fillRadialGradientEndRadius());\n for (var n = 0; n < colorStops.length; n += 2) {\n grd.addColorStop(colorStops[n], colorStops[n + 1]);\n }\n return grd;\n }\n }\n getShadowRGBA() {\n return this._getCache(SHADOW_RGBA, this._getShadowRGBA);\n }\n _getShadowRGBA() {\n if (!this.hasShadow()) {\n return;\n }\n var rgba = Util.colorToRGBA(this.shadowColor());\n if (rgba) {\n return ('rgba(' +\n rgba.r +\n ',' +\n rgba.g +\n ',' +\n rgba.b +\n ',' +\n rgba.a * (this.shadowOpacity() || 1) +\n ')');\n }\n }\n hasFill() {\n return this._calculate('hasFill', [\n 'fillEnabled',\n 'fill',\n 'fillPatternImage',\n 'fillLinearGradientColorStops',\n 'fillRadialGradientColorStops',\n ], () => {\n return (this.fillEnabled() &&\n !!(this.fill() ||\n this.fillPatternImage() ||\n this.fillLinearGradientColorStops() ||\n this.fillRadialGradientColorStops()));\n });\n }\n hasStroke() {\n return this._calculate('hasStroke', [\n 'strokeEnabled',\n 'strokeWidth',\n 'stroke',\n 'strokeLinearGradientColorStops',\n ], () => {\n return (this.strokeEnabled() &&\n this.strokeWidth() &&\n !!(this.stroke() || this.strokeLinearGradientColorStops()));\n });\n }\n hasHitStroke() {\n const width = this.hitStrokeWidth();\n if (width === 'auto') {\n return this.hasStroke();\n }\n return this.strokeEnabled() && !!width;\n }\n intersects(point) {\n var stage = this.getStage(), bufferHitCanvas = stage.bufferHitCanvas, p;\n bufferHitCanvas.getContext().clear();\n this.drawHit(bufferHitCanvas, null, true);\n p = bufferHitCanvas.context.getImageData(Math.round(point.x), Math.round(point.y), 1, 1).data;\n return p[3] > 0;\n }\n destroy() {\n Node.prototype.destroy.call(this);\n delete shapes[this.colorKey];\n delete this.colorKey;\n return this;\n }\n _useBufferCanvas(forceFill) {\n var _a;\n if (!this.getStage()) {\n return false;\n }\n const perfectDrawEnabled = (_a = this.attrs.perfectDrawEnabled) !== null && _a !== void 0 ? _a : true;\n if (!perfectDrawEnabled) {\n return false;\n }\n const hasFill = forceFill || this.hasFill();\n const hasStroke = this.hasStroke();\n const isTransparent = this.getAbsoluteOpacity() !== 1;\n if (hasFill && hasStroke && isTransparent) {\n return true;\n }\n const hasShadow = this.hasShadow();\n const strokeForShadow = this.shadowForStrokeEnabled();\n if (hasFill && hasStroke && hasShadow && strokeForShadow) {\n return true;\n }\n return false;\n }\n setStrokeHitEnabled(val) {\n Util.warn('strokeHitEnabled property is deprecated. Please use hitStrokeWidth instead.');\n if (val) {\n this.hitStrokeWidth('auto');\n }\n else {\n this.hitStrokeWidth(0);\n }\n }\n getStrokeHitEnabled() {\n if (this.hitStrokeWidth() === 0) {\n return false;\n }\n else {\n return true;\n }\n }\n getSelfRect() {\n var size = this.size();\n return {\n x: this._centroid ? -size.width / 2 : 0,\n y: this._centroid ? -size.height / 2 : 0,\n width: size.width,\n height: size.height,\n };\n }\n getClientRect(config = {}) {\n const skipTransform = config.skipTransform;\n const relativeTo = config.relativeTo;\n const fillRect = this.getSelfRect();\n const applyStroke = !config.skipStroke && this.hasStroke();\n const strokeWidth = (applyStroke && this.strokeWidth()) || 0;\n const fillAndStrokeWidth = fillRect.width + strokeWidth;\n const fillAndStrokeHeight = fillRect.height + strokeWidth;\n const applyShadow = !config.skipShadow && this.hasShadow();\n const shadowOffsetX = applyShadow ? this.shadowOffsetX() : 0;\n const shadowOffsetY = applyShadow ? this.shadowOffsetY() : 0;\n const preWidth = fillAndStrokeWidth + Math.abs(shadowOffsetX);\n const preHeight = fillAndStrokeHeight + Math.abs(shadowOffsetY);\n const blurRadius = (applyShadow && this.shadowBlur()) || 0;\n const width = preWidth + blurRadius * 2;\n const height = preHeight + blurRadius * 2;\n const rect = {\n width: width,\n height: height,\n x: -(strokeWidth / 2 + blurRadius) +\n Math.min(shadowOffsetX, 0) +\n fillRect.x,\n y: -(strokeWidth / 2 + blurRadius) +\n Math.min(shadowOffsetY, 0) +\n fillRect.y,\n };\n if (!skipTransform) {\n return this._transformedRect(rect, relativeTo);\n }\n return rect;\n }\n drawScene(can, top) {\n var layer = this.getLayer(), canvas = can || layer.getCanvas(), context = canvas.getContext(), cachedCanvas = this._getCanvasCache(), drawFunc = this.getSceneFunc(), hasShadow = this.hasShadow(), stage, bufferCanvas, bufferContext;\n var skipBuffer = canvas.isCache;\n var cachingSelf = top === this;\n if (!this.isVisible() && !cachingSelf) {\n return this;\n }\n if (cachedCanvas) {\n context.save();\n var m = this.getAbsoluteTransform(top).getMatrix();\n context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);\n this._drawCachedSceneCanvas(context);\n context.restore();\n return this;\n }\n if (!drawFunc) {\n return this;\n }\n context.save();\n if (this._useBufferCanvas() && !skipBuffer) {\n stage = this.getStage();\n bufferCanvas = stage.bufferCanvas;\n bufferContext = bufferCanvas.getContext();\n bufferContext.clear();\n bufferContext.save();\n bufferContext._applyLineJoin(this);\n var o = this.getAbsoluteTransform(top).getMatrix();\n bufferContext.transform(o[0], o[1], o[2], o[3], o[4], o[5]);\n drawFunc.call(this, bufferContext, this);\n bufferContext.restore();\n var ratio = bufferCanvas.pixelRatio;\n if (hasShadow) {\n context._applyShadow(this);\n }\n context._applyOpacity(this);\n context._applyGlobalCompositeOperation(this);\n context.drawImage(bufferCanvas._canvas, 0, 0, bufferCanvas.width / ratio, bufferCanvas.height / ratio);\n }\n else {\n context._applyLineJoin(this);\n if (!cachingSelf) {\n var o = this.getAbsoluteTransform(top).getMatrix();\n context.transform(o[0], o[1], o[2], o[3], o[4], o[5]);\n context._applyOpacity(this);\n context._applyGlobalCompositeOperation(this);\n }\n if (hasShadow) {\n context._applyShadow(this);\n }\n drawFunc.call(this, context, this);\n }\n context.restore();\n return this;\n }\n drawHit(can, top, skipDragCheck = false) {\n if (!this.shouldDrawHit(top, skipDragCheck)) {\n return this;\n }\n var layer = this.getLayer(), canvas = can || layer.hitCanvas, context = canvas && canvas.getContext(), drawFunc = this.hitFunc() || this.sceneFunc(), cachedCanvas = this._getCanvasCache(), cachedHitCanvas = cachedCanvas && cachedCanvas.hit;\n if (!this.colorKey) {\n Util.warn('Looks like your canvas has a destroyed shape in it. Do not reuse shape after you destroyed it. If you want to reuse shape you should call remove() instead of destroy()');\n }\n if (cachedHitCanvas) {\n context.save();\n var m = this.getAbsoluteTransform(top).getMatrix();\n context.transform(m[0], m[1], m[2], m[3], m[4], m[5]);\n this._drawCachedHitCanvas(context);\n context.restore();\n return this;\n }\n if (!drawFunc) {\n return this;\n }\n context.save();\n context._applyLineJoin(this);\n const selfCache = this === top;\n if (!selfCache) {\n var o = this.getAbsoluteTransform(top).getMatrix();\n context.transform(o[0], o[1], o[2], o[3], o[4], o[5]);\n }\n drawFunc.call(this, context, this);\n context.restore();\n return this;\n }\n drawHitFromCache(alphaThreshold = 0) {\n var cachedCanvas = this._getCanvasCache(), sceneCanvas = this._getCachedSceneCanvas(), hitCanvas = cachedCanvas.hit, hitContext = hitCanvas.getContext(), hitWidth = hitCanvas.getWidth(), hitHeight = hitCanvas.getHeight(), hitImageData, hitData, len, rgbColorKey, i, alpha;\n hitContext.clear();\n hitContext.drawImage(sceneCanvas._canvas, 0, 0, hitWidth, hitHeight);\n try {\n hitImageData = hitContext.getImageData(0, 0, hitWidth, hitHeight);\n hitData = hitImageData.data;\n len = hitData.length;\n rgbColorKey = Util._hexToRgb(this.colorKey);\n for (i = 0; i < len; i += 4) {\n alpha = hitData[i + 3];\n if (alpha > alphaThreshold) {\n hitData[i] = rgbColorKey.r;\n hitData[i + 1] = rgbColorKey.g;\n hitData[i + 2] = rgbColorKey.b;\n hitData[i + 3] = 255;\n }\n else {\n hitData[i + 3] = 0;\n }\n }\n hitContext.putImageData(hitImageData, 0, 0);\n }\n catch (e) {\n Util.error('Unable to draw hit graph from cached scene canvas. ' + e.message);\n }\n return this;\n }\n hasPointerCapture(pointerId) {\n return PointerEvents.hasPointerCapture(pointerId, this);\n }\n setPointerCapture(pointerId) {\n PointerEvents.setPointerCapture(pointerId, this);\n }\n releaseCapture(pointerId) {\n PointerEvents.releaseCapture(pointerId, this);\n }\n}\nShape.prototype._fillFunc = _fillFunc;\nShape.prototype._strokeFunc = _strokeFunc;\nShape.prototype._fillFuncHit = _fillFuncHit;\nShape.prototype._strokeFuncHit = _strokeFuncHit;\nShape.prototype._centroid = false;\nShape.prototype.nodeType = 'Shape';\n_registerNode(Shape);\nShape.prototype.eventListeners = {};\nShape.prototype.on.call(Shape.prototype, 'shadowColorChange.konva shadowBlurChange.konva shadowOffsetChange.konva shadowOpacityChange.konva shadowEnabledChange.konva', _clearHasShadowCache);\nShape.prototype.on.call(Shape.prototype, 'shadowColorChange.konva shadowOpacityChange.konva shadowEnabledChange.konva', _clearGetShadowRGBACache);\nShape.prototype.on.call(Shape.prototype, 'fillPriorityChange.konva fillPatternImageChange.konva fillPatternRepeatChange.konva fillPatternScaleXChange.konva fillPatternScaleYChange.konva fillPatternOffsetXChange.konva fillPatternOffsetYChange.konva fillPatternXChange.konva fillPatternYChange.konva fillPatternRotationChange.konva', _clearFillPatternCache);\nShape.prototype.on.call(Shape.prototype, 'fillPriorityChange.konva fillLinearGradientColorStopsChange.konva fillLinearGradientStartPointXChange.konva fillLinearGradientStartPointYChange.konva fillLinearGradientEndPointXChange.konva fillLinearGradientEndPointYChange.konva', _clearLinearGradientCache);\nShape.prototype.on.call(Shape.prototype, 'fillPriorityChange.konva fillRadialGradientColorStopsChange.konva fillRadialGradientStartPointXChange.konva fillRadialGradientStartPointYChange.konva fillRadialGradientEndPointXChange.konva fillRadialGradientEndPointYChange.konva fillRadialGradientStartRadiusChange.konva fillRadialGradientEndRadiusChange.konva', _clearRadialGradientCache);\nFactory.addGetterSetter(Shape, 'stroke', undefined, getStringOrGradientValidator());\nFactory.addGetterSetter(Shape, 'strokeWidth', 2, getNumberValidator());\nFactory.addGetterSetter(Shape, 'fillAfterStrokeEnabled', false);\nFactory.addGetterSetter(Shape, 'hitStrokeWidth', 'auto', getNumberOrAutoValidator());\nFactory.addGetterSetter(Shape, 'strokeHitEnabled', true, getBooleanValidator());\nFactory.addGetterSetter(Shape, 'perfectDrawEnabled', true, getBooleanValidator());\nFactory.addGetterSetter(Shape, 'shadowForStrokeEnabled', true, getBooleanValidator());\nFactory.addGetterSetter(Shape, 'lineJoin');\nFactory.addGetterSetter(Shape, 'lineCap');\nFactory.addGetterSetter(Shape, 'sceneFunc');\nFactory.addGetterSetter(Shape, 'hitFunc');\nFactory.addGetterSetter(Shape, 'dash');\nFactory.addGetterSetter(Shape, 'dashOffset', 0, getNumberValidator());\nFactory.addGetterSetter(Shape, 'shadowColor', undefined, getStringValidator());\nFactory.addGetterSetter(Shape, 'shadowBlur', 0, getNumberValidator());\nFactory.addGetterSetter(Shape, 'shadowOpacity', 1, getNumberValidator());\nFactory.addComponentsGetterSetter(Shape, 'shadowOffset', ['x', 'y']);\nFactory.addGetterSetter(Shape, 'shadowOffsetX', 0, getNumberValidator());\nFactory.addGetterSetter(Shape, 'shadowOffsetY', 0, getNumberValidator());\nFactory.addGetterSetter(Shape, 'fillPatternImage');\nFactory.addGetterSetter(Shape, 'fill', undefined, getStringOrGradientValidator());\nFactory.addGetterSetter(Shape, 'fillPatternX', 0, getNumberValidator());\nFactory.addGetterSetter(Shape, 'fillPatternY', 0, getNumberValidator());\nFactory.addGetterSetter(Shape, 'fillLinearGradientColorStops');\nFactory.addGetterSetter(Shape, 'strokeLinearGradientColorStops');\nFactory.addGetterSetter(Shape, 'fillRadialGradientStartRadius', 0);\nFactory.addGetterSetter(Shape, 'fillRadialGradientEndRadius', 0);\nFactory.addGetterSetter(Shape, 'fillRadialGradientColorStops');\nFactory.addGetterSetter(Shape, 'fillPatternRepeat', 'repeat');\nFactory.addGetterSetter(Shape, 'fillEnabled', true);\nFactory.addGetterSetter(Shape, 'strokeEnabled', true);\nFactory.addGetterSetter(Shape, 'shadowEnabled', true);\nFactory.addGetterSetter(Shape, 'dashEnabled', true);\nFactory.addGetterSetter(Shape, 'strokeScaleEnabled', true);\nFactory.addGetterSetter(Shape, 'fillPriority', 'color');\nFactory.addComponentsGetterSetter(Shape, 'fillPatternOffset', ['x', 'y']);\nFactory.addGetterSetter(Shape, 'fillPatternOffsetX', 0, getNumberValidator());\nFactory.addGetterSetter(Shape, 'fillPatternOffsetY', 0, getNumberValidator());\nFactory.addComponentsGetterSetter(Shape, 'fillPatternScale', ['x', 'y']);\nFactory.addGetterSetter(Shape, 'fillPatternScaleX', 1, getNumberValidator());\nFactory.addGetterSetter(Shape, 'fillPatternScaleY', 1, getNumberValidator());\nFactory.addComponentsGetterSetter(Shape, 'fillLinearGradientStartPoint', [\n 'x',\n 'y',\n]);\nFactory.addComponentsGetterSetter(Shape, 'strokeLinearGradientStartPoint', [\n 'x',\n 'y',\n]);\nFactory.addGetterSetter(Shape, 'fillLinearGradientStartPointX', 0);\nFactory.addGetterSetter(Shape, 'strokeLinearGradientStartPointX', 0);\nFactory.addGetterSetter(Shape, 'fillLinearGradientStartPointY', 0);\nFactory.addGetterSetter(Shape, 'strokeLinearGradientStartPointY', 0);\nFactory.addComponentsGetterSetter(Shape, 'fillLinearGradientEndPoint', [\n 'x',\n 'y',\n]);\nFactory.addComponentsGetterSetter(Shape, 'strokeLinearGradientEndPoint', [\n 'x',\n 'y',\n]);\nFactory.addGetterSetter(Shape, 'fillLinearGradientEndPointX', 0);\nFactory.addGetterSetter(Shape, 'strokeLinearGradientEndPointX', 0);\nFactory.addGetterSetter(Shape, 'fillLinearGradientEndPointY', 0);\nFactory.addGetterSetter(Shape, 'strokeLinearGradientEndPointY', 0);\nFactory.addComponentsGetterSetter(Shape, 'fillRadialGradientStartPoint', [\n 'x',\n 'y',\n]);\nFactory.addGetterSetter(Shape, 'fillRadialGradientStartPointX', 0);\nFactory.addGetterSetter(Shape, 'fillRadialGradientStartPointY', 0);\nFactory.addComponentsGetterSetter(Shape, 'fillRadialGradientEndPoint', [\n 'x',\n 'y',\n]);\nFactory.addGetterSetter(Shape, 'fillRadialGradientEndPointX', 0);\nFactory.addGetterSetter(Shape, 'fillRadialGradientEndPointY', 0);\nFactory.addGetterSetter(Shape, 'fillPatternRotation', 0);\nFactory.backCompat(Shape, {\n dashArray: 'dash',\n getDashArray: 'getDash',\n setDashArray: 'getDash',\n drawFunc: 'sceneFunc',\n getDrawFunc: 'getSceneFunc',\n setDrawFunc: 'setSceneFunc',\n drawHitFunc: 'hitFunc',\n getDrawHitFunc: 'getHitFunc',\n setDrawHitFunc: 'setHitFunc',\n});\n","import { Util } from './Util.js';\nimport { Container } from './Container.js';\nimport { Node } from './Node.js';\nimport { Factory } from './Factory.js';\nimport { SceneCanvas, HitCanvas } from './Canvas.js';\nimport { getBooleanValidator } from './Validators.js';\nimport { shapes } from './Shape.js';\nimport { _registerNode } from './Global.js';\nvar HASH = '#', BEFORE_DRAW = 'beforeDraw', DRAW = 'draw', INTERSECTION_OFFSETS = [\n { x: 0, y: 0 },\n { x: -1, y: -1 },\n { x: 1, y: -1 },\n { x: 1, y: 1 },\n { x: -1, y: 1 },\n], INTERSECTION_OFFSETS_LEN = INTERSECTION_OFFSETS.length;\nexport class Layer extends Container {\n constructor(config) {\n super(config);\n this.canvas = new SceneCanvas();\n this.hitCanvas = new HitCanvas({\n pixelRatio: 1,\n });\n this._waitingForDraw = false;\n this.on('visibleChange.konva', this._checkVisibility);\n this._checkVisibility();\n this.on('imageSmoothingEnabledChange.konva', this._setSmoothEnabled);\n this._setSmoothEnabled();\n }\n createPNGStream() {\n const c = this.canvas._canvas;\n return c.createPNGStream();\n }\n getCanvas() {\n return this.canvas;\n }\n getNativeCanvasElement() {\n return this.canvas._canvas;\n }\n getHitCanvas() {\n return this.hitCanvas;\n }\n getContext() {\n return this.getCanvas().getContext();\n }\n clear(bounds) {\n this.getContext().clear(bounds);\n this.getHitCanvas().getContext().clear(bounds);\n return this;\n }\n setZIndex(index) {\n super.setZIndex(index);\n var stage = this.getStage();\n if (stage && stage.content) {\n stage.content.removeChild(this.getNativeCanvasElement());\n if (index < stage.children.length - 1) {\n stage.content.insertBefore(this.getNativeCanvasElement(), stage.children[index + 1].getCanvas()._canvas);\n }\n else {\n stage.content.appendChild(this.getNativeCanvasElement());\n }\n }\n return this;\n }\n moveToTop() {\n Node.prototype.moveToTop.call(this);\n var stage = this.getStage();\n if (stage && stage.content) {\n stage.content.removeChild(this.getNativeCanvasElement());\n stage.content.appendChild(this.getNativeCanvasElement());\n }\n return true;\n }\n moveUp() {\n var moved = Node.prototype.moveUp.call(this);\n if (!moved) {\n return false;\n }\n var stage = this.getStage();\n if (!stage || !stage.content) {\n return false;\n }\n stage.content.removeChild(this.getNativeCanvasElement());\n if (this.index < stage.children.length - 1) {\n stage.content.insertBefore(this.getNativeCanvasElement(), stage.children[this.index + 1].getCanvas()._canvas);\n }\n else {\n stage.content.appendChild(this.getNativeCanvasElement());\n }\n return true;\n }\n moveDown() {\n if (Node.prototype.moveDown.call(this)) {\n var stage = this.getStage();\n if (stage) {\n var children = stage.children;\n if (stage.content) {\n stage.content.removeChild(this.getNativeCanvasElement());\n stage.content.insertBefore(this.getNativeCanvasElement(), children[this.index + 1].getCanvas()._canvas);\n }\n }\n return true;\n }\n return false;\n }\n moveToBottom() {\n if (Node.prototype.moveToBottom.call(this)) {\n var stage = this.getStage();\n if (stage) {\n var children = stage.children;\n if (stage.content) {\n stage.content.removeChild(this.getNativeCanvasElement());\n stage.content.insertBefore(this.getNativeCanvasElement(), children[1].getCanvas()._canvas);\n }\n }\n return true;\n }\n return false;\n }\n getLayer() {\n return this;\n }\n remove() {\n var _canvas = this.getNativeCanvasElement();\n Node.prototype.remove.call(this);\n if (_canvas && _canvas.parentNode && Util._isInDocument(_canvas)) {\n _canvas.parentNode.removeChild(_canvas);\n }\n return this;\n }\n getStage() {\n return this.parent;\n }\n setSize({ width, height }) {\n this.canvas.setSize(width, height);\n this.hitCanvas.setSize(width, height);\n this._setSmoothEnabled();\n return this;\n }\n _validateAdd(child) {\n var type = child.getType();\n if (type !== 'Group' && type !== 'Shape') {\n Util.throw('You may only add groups and shapes to a layer.');\n }\n }\n _toKonvaCanvas(config) {\n config = config || {};\n config.width = config.width || this.getWidth();\n config.height = config.height || this.getHeight();\n config.x = config.x !== undefined ? config.x : this.x();\n config.y = config.y !== undefined ? config.y : this.y();\n return Node.prototype._toKonvaCanvas.call(this, config);\n }\n _checkVisibility() {\n const visible = this.visible();\n if (visible) {\n this.canvas._canvas.style.display = 'block';\n }\n else {\n this.canvas._canvas.style.display = 'none';\n }\n }\n _setSmoothEnabled() {\n this.getContext()._context.imageSmoothingEnabled =\n this.imageSmoothingEnabled();\n }\n getWidth() {\n if (this.parent) {\n return this.parent.width();\n }\n }\n setWidth() {\n Util.warn('Can not change width of layer. Use \"stage.width(value)\" function instead.');\n }\n getHeight() {\n if (this.parent) {\n return this.parent.height();\n }\n }\n setHeight() {\n Util.warn('Can not change height of layer. Use \"stage.height(value)\" function instead.');\n }\n batchDraw() {\n if (!this._waitingForDraw) {\n this._waitingForDraw = true;\n Util.requestAnimFrame(() => {\n this.draw();\n this._waitingForDraw = false;\n });\n }\n return this;\n }\n getIntersection(pos) {\n if (!this.isListening() || !this.isVisible()) {\n return null;\n }\n var spiralSearchDistance = 1;\n var continueSearch = false;\n while (true) {\n for (let i = 0; i < INTERSECTION_OFFSETS_LEN; i++) {\n const intersectionOffset = INTERSECTION_OFFSETS[i];\n const obj = this._getIntersection({\n x: pos.x + intersectionOffset.x * spiralSearchDistance,\n y: pos.y + intersectionOffset.y * spiralSearchDistance,\n });\n const shape = obj.shape;\n if (shape) {\n return shape;\n }\n continueSearch = !!obj.antialiased;\n if (!obj.antialiased) {\n break;\n }\n }\n if (continueSearch) {\n spiralSearchDistance += 1;\n }\n else {\n return null;\n }\n }\n }\n _getIntersection(pos) {\n const ratio = this.hitCanvas.pixelRatio;\n const p = this.hitCanvas.context.getImageData(Math.round(pos.x * ratio), Math.round(pos.y * ratio), 1, 1).data;\n const p3 = p[3];\n if (p3 === 255) {\n const colorKey = Util._rgbToHex(p[0], p[1], p[2]);\n const shape = shapes[HASH + colorKey];\n if (shape) {\n return {\n shape: shape,\n };\n }\n return {\n antialiased: true,\n };\n }\n else if (p3 > 0) {\n return {\n antialiased: true,\n };\n }\n return {};\n }\n drawScene(can, top) {\n var layer = this.getLayer(), canvas = can || (layer && layer.getCanvas());\n this._fire(BEFORE_DRAW, {\n node: this,\n });\n if (this.clearBeforeDraw()) {\n canvas.getContext().clear();\n }\n Container.prototype.drawScene.call(this, canvas, top);\n this._fire(DRAW, {\n node: this,\n });\n return this;\n }\n drawHit(can, top) {\n var layer = this.getLayer(), canvas = can || (layer && layer.hitCanvas);\n if (layer && layer.clearBeforeDraw()) {\n layer.getHitCanvas().getContext().clear();\n }\n Container.prototype.drawHit.call(this, canvas, top);\n return this;\n }\n enableHitGraph() {\n this.hitGraphEnabled(true);\n return this;\n }\n disableHitGraph() {\n this.hitGraphEnabled(false);\n return this;\n }\n setHitGraphEnabled(val) {\n Util.warn('hitGraphEnabled method is deprecated. Please use layer.listening() instead.');\n this.listening(val);\n }\n getHitGraphEnabled(val) {\n Util.warn('hitGraphEnabled method is deprecated. Please use layer.listening() instead.');\n return this.listening();\n }\n toggleHitCanvas() {\n if (!this.parent || !this.parent['content']) {\n return;\n }\n var parent = this.parent;\n var added = !!this.hitCanvas._canvas.parentNode;\n if (added) {\n parent.content.removeChild(this.hitCanvas._canvas);\n }\n else {\n parent.content.appendChild(this.hitCanvas._canvas);\n }\n }\n destroy() {\n Util.releaseCanvas(this.getNativeCanvasElement(), this.getHitCanvas()._canvas);\n return super.destroy();\n }\n}\nLayer.prototype.nodeType = 'Layer';\n_registerNode(Layer);\nFactory.addGetterSetter(Layer, 'imageSmoothingEnabled', true);\nFactory.addGetterSetter(Layer, 'clearBeforeDraw', true);\nFactory.addGetterSetter(Layer, 'hitGraphEnabled', true, getBooleanValidator());\n","import { Util } from './Util.js';\nimport { Layer } from './Layer.js';\nimport { _registerNode } from './Global.js';\nexport class FastLayer extends Layer {\n constructor(attrs) {\n super(attrs);\n this.listening(false);\n Util.warn('Konva.Fast layer is deprecated. Please use \"new Konva.Layer({ listening: false })\" instead.');\n }\n}\nFastLayer.prototype.nodeType = 'FastLayer';\n_registerNode(FastLayer);\n","import { Util } from './Util.js';\nimport { Container } from './Container.js';\nimport { _registerNode } from './Global.js';\nexport class Group extends Container {\n _validateAdd(child) {\n var type = child.getType();\n if (type !== 'Group' && type !== 'Shape') {\n Util.throw('You may only add groups and shapes to groups.');\n }\n }\n}\nGroup.prototype.nodeType = 'Group';\n_registerNode(Group);\n","import { glob } from './Global.js';\nimport { Util } from './Util.js';\nvar now = (function () {\n if (glob.performance && glob.performance.now) {\n return function () {\n return glob.performance.now();\n };\n }\n return function () {\n return new Date().getTime();\n };\n})();\nexport class Animation {\n constructor(func, layers) {\n this.id = Animation.animIdCounter++;\n this.frame = {\n time: 0,\n timeDiff: 0,\n lastTime: now(),\n frameRate: 0,\n };\n this.func = func;\n this.setLayers(layers);\n }\n setLayers(layers) {\n var lays = [];\n if (!layers) {\n lays = [];\n }\n else if (layers.length > 0) {\n lays = layers;\n }\n else {\n lays = [layers];\n }\n this.layers = lays;\n return this;\n }\n getLayers() {\n return this.layers;\n }\n addLayer(layer) {\n var layers = this.layers, len = layers.length, n;\n for (n = 0; n < len; n++) {\n if (layers[n]._id === layer._id) {\n return false;\n }\n }\n this.layers.push(layer);\n return true;\n }\n isRunning() {\n var a = Animation, animations = a.animations, len = animations.length, n;\n for (n = 0; n < len; n++) {\n if (animations[n].id === this.id) {\n return true;\n }\n }\n return false;\n }\n start() {\n this.stop();\n this.frame.timeDiff = 0;\n this.frame.lastTime = now();\n Animation._addAnimation(this);\n return this;\n }\n stop() {\n Animation._removeAnimation(this);\n return this;\n }\n _updateFrameObject(time) {\n this.frame.timeDiff = time - this.frame.lastTime;\n this.frame.lastTime = time;\n this.frame.time += this.frame.timeDiff;\n this.frame.frameRate = 1000 / this.frame.timeDiff;\n }\n static _addAnimation(anim) {\n this.animations.push(anim);\n this._handleAnimation();\n }\n static _removeAnimation(anim) {\n var id = anim.id, animations = this.animations, len = animations.length, n;\n for (n = 0; n < len; n++) {\n if (animations[n].id === id) {\n this.animations.splice(n, 1);\n break;\n }\n }\n }\n static _runFrames() {\n var layerHash = {}, animations = this.animations, anim, layers, func, n, i, layersLen, layer, key, needRedraw;\n for (n = 0; n < animations.length; n++) {\n anim = animations[n];\n layers = anim.layers;\n func = anim.func;\n anim._updateFrameObject(now());\n layersLen = layers.length;\n if (func) {\n needRedraw = func.call(anim, anim.frame) !== false;\n }\n else {\n needRedraw = true;\n }\n if (!needRedraw) {\n continue;\n }\n for (i = 0; i < layersLen; i++) {\n layer = layers[i];\n if (layer._id !== undefined) {\n layerHash[layer._id] = layer;\n }\n }\n }\n for (key in layerHash) {\n if (!layerHash.hasOwnProperty(key)) {\n continue;\n }\n layerHash[key].batchDraw();\n }\n }\n static _animationLoop() {\n var Anim = Animation;\n if (Anim.animations.length) {\n Anim._runFrames();\n Util.requestAnimFrame(Anim._animationLoop);\n }\n else {\n Anim.animRunning = false;\n }\n }\n static _handleAnimation() {\n if (!this.animRunning) {\n this.animRunning = true;\n Util.requestAnimFrame(this._animationLoop);\n }\n }\n}\nAnimation.animations = [];\nAnimation.animIdCounter = 0;\nAnimation.animRunning = false;\n","import { Util } from './Util.js';\nimport { Animation } from './Animation.js';\nimport { Node } from './Node.js';\nimport { Konva } from './Global.js';\nvar blacklist = {\n node: 1,\n duration: 1,\n easing: 1,\n onFinish: 1,\n yoyo: 1,\n}, PAUSED = 1, PLAYING = 2, REVERSING = 3, idCounter = 0, colorAttrs = ['fill', 'stroke', 'shadowColor'];\nclass TweenEngine {\n constructor(prop, propFunc, func, begin, finish, duration, yoyo) {\n this.prop = prop;\n this.propFunc = propFunc;\n this.begin = begin;\n this._pos = begin;\n this.duration = duration;\n this._change = 0;\n this.prevPos = 0;\n this.yoyo = yoyo;\n this._time = 0;\n this._position = 0;\n this._startTime = 0;\n this._finish = 0;\n this.func = func;\n this._change = finish - this.begin;\n this.pause();\n }\n fire(str) {\n var handler = this[str];\n if (handler) {\n handler();\n }\n }\n setTime(t) {\n if (t > this.duration) {\n if (this.yoyo) {\n this._time = this.duration;\n this.reverse();\n }\n else {\n this.finish();\n }\n }\n else if (t < 0) {\n if (this.yoyo) {\n this._time = 0;\n this.play();\n }\n else {\n this.reset();\n }\n }\n else {\n this._time = t;\n this.update();\n }\n }\n getTime() {\n return this._time;\n }\n setPosition(p) {\n this.prevPos = this._pos;\n this.propFunc(p);\n this._pos = p;\n }\n getPosition(t) {\n if (t === undefined) {\n t = this._time;\n }\n return this.func(t, this.begin, this._change, this.duration);\n }\n play() {\n this.state = PLAYING;\n this._startTime = this.getTimer() - this._time;\n this.onEnterFrame();\n this.fire('onPlay');\n }\n reverse() {\n this.state = REVERSING;\n this._time = this.duration - this._time;\n this._startTime = this.getTimer() - this._time;\n this.onEnterFrame();\n this.fire('onReverse');\n }\n seek(t) {\n this.pause();\n this._time = t;\n this.update();\n this.fire('onSeek');\n }\n reset() {\n this.pause();\n this._time = 0;\n this.update();\n this.fire('onReset');\n }\n finish() {\n this.pause();\n this._time = this.duration;\n this.update();\n this.fire('onFinish');\n }\n update() {\n this.setPosition(this.getPosition(this._time));\n this.fire('onUpdate');\n }\n onEnterFrame() {\n var t = this.getTimer() - this._startTime;\n if (this.state === PLAYING) {\n this.setTime(t);\n }\n else if (this.state === REVERSING) {\n this.setTime(this.duration - t);\n }\n }\n pause() {\n this.state = PAUSED;\n this.fire('onPause');\n }\n getTimer() {\n return new Date().getTime();\n }\n}\nexport class Tween {\n constructor(config) {\n var that = this, node = config.node, nodeId = node._id, duration, easing = config.easing || Easings.Linear, yoyo = !!config.yoyo, key;\n if (typeof config.duration === 'undefined') {\n duration = 0.3;\n }\n else if (config.duration === 0) {\n duration = 0.001;\n }\n else {\n duration = config.duration;\n }\n this.node = node;\n this._id = idCounter++;\n var layers = node.getLayer() ||\n (node instanceof Konva['Stage'] ? node.getLayers() : null);\n if (!layers) {\n Util.error('Tween constructor have `node` that is not in a layer. Please add node into layer first.');\n }\n this.anim = new Animation(function () {\n that.tween.onEnterFrame();\n }, layers);\n this.tween = new TweenEngine(key, function (i) {\n that._tweenFunc(i);\n }, easing, 0, 1, duration * 1000, yoyo);\n this._addListeners();\n if (!Tween.attrs[nodeId]) {\n Tween.attrs[nodeId] = {};\n }\n if (!Tween.attrs[nodeId][this._id]) {\n Tween.attrs[nodeId][this._id] = {};\n }\n if (!Tween.tweens[nodeId]) {\n Tween.tweens[nodeId] = {};\n }\n for (key in config) {\n if (blacklist[key] === undefined) {\n this._addAttr(key, config[key]);\n }\n }\n this.reset();\n this.onFinish = config.onFinish;\n this.onReset = config.onReset;\n this.onUpdate = config.onUpdate;\n }\n _addAttr(key, end) {\n var node = this.node, nodeId = node._id, start, diff, tweenId, n, len, trueEnd, trueStart, endRGBA;\n tweenId = Tween.tweens[nodeId][key];\n if (tweenId) {\n delete Tween.attrs[nodeId][tweenId][key];\n }\n start = node.getAttr(key);\n if (Util._isArray(end)) {\n diff = [];\n len = Math.max(end.length, start.length);\n if (key === 'points' && end.length !== start.length) {\n if (end.length > start.length) {\n trueStart = start;\n start = Util._prepareArrayForTween(start, end, node.closed());\n }\n else {\n trueEnd = end;\n end = Util._prepareArrayForTween(end, start, node.closed());\n }\n }\n if (key.indexOf('fill') === 0) {\n for (n = 0; n < len; n++) {\n if (n % 2 === 0) {\n diff.push(end[n] - start[n]);\n }\n else {\n var startRGBA = Util.colorToRGBA(start[n]);\n endRGBA = Util.colorToRGBA(end[n]);\n start[n] = startRGBA;\n diff.push({\n r: endRGBA.r - startRGBA.r,\n g: endRGBA.g - startRGBA.g,\n b: endRGBA.b - startRGBA.b,\n a: endRGBA.a - startRGBA.a,\n });\n }\n }\n }\n else {\n for (n = 0; n < len; n++) {\n diff.push(end[n] - start[n]);\n }\n }\n }\n else if (colorAttrs.indexOf(key) !== -1) {\n start = Util.colorToRGBA(start);\n endRGBA = Util.colorToRGBA(end);\n diff = {\n r: endRGBA.r - start.r,\n g: endRGBA.g - start.g,\n b: endRGBA.b - start.b,\n a: endRGBA.a - start.a,\n };\n }\n else {\n diff = end - start;\n }\n Tween.attrs[nodeId][this._id][key] = {\n start: start,\n diff: diff,\n end: end,\n trueEnd: trueEnd,\n trueStart: trueStart,\n };\n Tween.tweens[nodeId][key] = this._id;\n }\n _tweenFunc(i) {\n var node = this.node, attrs = Tween.attrs[node._id][this._id], key, attr, start, diff, newVal, n, len, end;\n for (key in attrs) {\n attr = attrs[key];\n start = attr.start;\n diff = attr.diff;\n end = attr.end;\n if (Util._isArray(start)) {\n newVal = [];\n len = Math.max(start.length, end.length);\n if (key.indexOf('fill') === 0) {\n for (n = 0; n < len; n++) {\n if (n % 2 === 0) {\n newVal.push((start[n] || 0) + diff[n] * i);\n }\n else {\n newVal.push('rgba(' +\n Math.round(start[n].r + diff[n].r * i) +\n ',' +\n Math.round(start[n].g + diff[n].g * i) +\n ',' +\n Math.round(start[n].b + diff[n].b * i) +\n ',' +\n (start[n].a + diff[n].a * i) +\n ')');\n }\n }\n }\n else {\n for (n = 0; n < len; n++) {\n newVal.push((start[n] || 0) + diff[n] * i);\n }\n }\n }\n else if (colorAttrs.indexOf(key) !== -1) {\n newVal =\n 'rgba(' +\n Math.round(start.r + diff.r * i) +\n ',' +\n Math.round(start.g + diff.g * i) +\n ',' +\n Math.round(start.b + diff.b * i) +\n ',' +\n (start.a + diff.a * i) +\n ')';\n }\n else {\n newVal = start + diff * i;\n }\n node.setAttr(key, newVal);\n }\n }\n _addListeners() {\n this.tween.onPlay = () => {\n this.anim.start();\n };\n this.tween.onReverse = () => {\n this.anim.start();\n };\n this.tween.onPause = () => {\n this.anim.stop();\n };\n this.tween.onFinish = () => {\n var node = this.node;\n var attrs = Tween.attrs[node._id][this._id];\n if (attrs.points && attrs.points.trueEnd) {\n node.setAttr('points', attrs.points.trueEnd);\n }\n if (this.onFinish) {\n this.onFinish.call(this);\n }\n };\n this.tween.onReset = () => {\n var node = this.node;\n var attrs = Tween.attrs[node._id][this._id];\n if (attrs.points && attrs.points.trueStart) {\n node.points(attrs.points.trueStart);\n }\n if (this.onReset) {\n this.onReset();\n }\n };\n this.tween.onUpdate = () => {\n if (this.onUpdate) {\n this.onUpdate.call(this);\n }\n };\n }\n play() {\n this.tween.play();\n return this;\n }\n reverse() {\n this.tween.reverse();\n return this;\n }\n reset() {\n this.tween.reset();\n return this;\n }\n seek(t) {\n this.tween.seek(t * 1000);\n return this;\n }\n pause() {\n this.tween.pause();\n return this;\n }\n finish() {\n this.tween.finish();\n return this;\n }\n destroy() {\n var nodeId = this.node._id, thisId = this._id, attrs = Tween.tweens[nodeId], key;\n this.pause();\n for (key in attrs) {\n delete Tween.tweens[nodeId][key];\n }\n delete Tween.attrs[nodeId][thisId];\n }\n}\nTween.attrs = {};\nTween.tweens = {};\nNode.prototype.to = function (params) {\n var onFinish = params.onFinish;\n params.node = this;\n params.onFinish = function () {\n this.destroy();\n if (onFinish) {\n onFinish();\n }\n };\n var tween = new Tween(params);\n tween.play();\n};\nexport const Easings = {\n BackEaseIn(t, b, c, d) {\n var s = 1.70158;\n return c * (t /= d) * t * ((s + 1) * t - s) + b;\n },\n BackEaseOut(t, b, c, d) {\n var s = 1.70158;\n return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;\n },\n BackEaseInOut(t, b, c, d) {\n var s = 1.70158;\n if ((t /= d / 2) < 1) {\n return (c / 2) * (t * t * (((s *= 1.525) + 1) * t - s)) + b;\n }\n return (c / 2) * ((t -= 2) * t * (((s *= 1.525) + 1) * t + s) + 2) + b;\n },\n ElasticEaseIn(t, b, c, d, a, p) {\n var s = 0;\n if (t === 0) {\n return b;\n }\n if ((t /= d) === 1) {\n return b + c;\n }\n if (!p) {\n p = d * 0.3;\n }\n if (!a || a < Math.abs(c)) {\n a = c;\n s = p / 4;\n }\n else {\n s = (p / (2 * Math.PI)) * Math.asin(c / a);\n }\n return (-(a *\n Math.pow(2, 10 * (t -= 1)) *\n Math.sin(((t * d - s) * (2 * Math.PI)) / p)) + b);\n },\n ElasticEaseOut(t, b, c, d, a, p) {\n var s = 0;\n if (t === 0) {\n return b;\n }\n if ((t /= d) === 1) {\n return b + c;\n }\n if (!p) {\n p = d * 0.3;\n }\n if (!a || a < Math.abs(c)) {\n a = c;\n s = p / 4;\n }\n else {\n s = (p / (2 * Math.PI)) * Math.asin(c / a);\n }\n return (a * Math.pow(2, -10 * t) * Math.sin(((t * d - s) * (2 * Math.PI)) / p) +\n c +\n b);\n },\n ElasticEaseInOut(t, b, c, d, a, p) {\n var s = 0;\n if (t === 0) {\n return b;\n }\n if ((t /= d / 2) === 2) {\n return b + c;\n }\n if (!p) {\n p = d * (0.3 * 1.5);\n }\n if (!a || a < Math.abs(c)) {\n a = c;\n s = p / 4;\n }\n else {\n s = (p / (2 * Math.PI)) * Math.asin(c / a);\n }\n if (t < 1) {\n return (-0.5 *\n (a *\n Math.pow(2, 10 * (t -= 1)) *\n Math.sin(((t * d - s) * (2 * Math.PI)) / p)) +\n b);\n }\n return (a *\n Math.pow(2, -10 * (t -= 1)) *\n Math.sin(((t * d - s) * (2 * Math.PI)) / p) *\n 0.5 +\n c +\n b);\n },\n BounceEaseOut(t, b, c, d) {\n if ((t /= d) < 1 / 2.75) {\n return c * (7.5625 * t * t) + b;\n }\n else if (t < 2 / 2.75) {\n return c * (7.5625 * (t -= 1.5 / 2.75) * t + 0.75) + b;\n }\n else if (t < 2.5 / 2.75) {\n return c * (7.5625 * (t -= 2.25 / 2.75) * t + 0.9375) + b;\n }\n else {\n return c * (7.5625 * (t -= 2.625 / 2.75) * t + 0.984375) + b;\n }\n },\n BounceEaseIn(t, b, c, d) {\n return c - Easings.BounceEaseOut(d - t, 0, c, d) + b;\n },\n BounceEaseInOut(t, b, c, d) {\n if (t < d / 2) {\n return Easings.BounceEaseIn(t * 2, 0, c, d) * 0.5 + b;\n }\n else {\n return Easings.BounceEaseOut(t * 2 - d, 0, c, d) * 0.5 + c * 0.5 + b;\n }\n },\n EaseIn(t, b, c, d) {\n return c * (t /= d) * t + b;\n },\n EaseOut(t, b, c, d) {\n return -c * (t /= d) * (t - 2) + b;\n },\n EaseInOut(t, b, c, d) {\n if ((t /= d / 2) < 1) {\n return (c / 2) * t * t + b;\n }\n return (-c / 2) * (--t * (t - 2) - 1) + b;\n },\n StrongEaseIn(t, b, c, d) {\n return c * (t /= d) * t * t * t * t + b;\n },\n StrongEaseOut(t, b, c, d) {\n return c * ((t = t / d - 1) * t * t * t * t + 1) + b;\n },\n StrongEaseInOut(t, b, c, d) {\n if ((t /= d / 2) < 1) {\n return (c / 2) * t * t * t * t * t + b;\n }\n return (c / 2) * ((t -= 2) * t * t * t * t + 2) + b;\n },\n Linear(t, b, c, d) {\n return (c * t) / d + b;\n },\n};\n","import { Konva as Global } from './Global.js';\nimport { Util, Transform } from './Util.js';\nimport { Node } from './Node.js';\nimport { Container } from './Container.js';\nimport { Stage, stages } from './Stage.js';\nimport { Layer } from './Layer.js';\nimport { FastLayer } from './FastLayer.js';\nimport { Group } from './Group.js';\nimport { DD } from './DragAndDrop.js';\nimport { Shape, shapes } from './Shape.js';\nimport { Animation } from './Animation.js';\nimport { Tween, Easings } from './Tween.js';\nimport { Context } from './Context.js';\nimport { Canvas } from './Canvas.js';\nexport const Konva = Util._assign(Global, {\n Util,\n Transform,\n Node,\n Container,\n Stage,\n stages,\n Layer,\n FastLayer,\n Group,\n DD,\n Shape,\n shapes,\n Animation,\n Tween,\n Easings,\n Context,\n Canvas,\n});\nexport default Konva;\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { Konva } from '../Global.js';\nimport { getNumberValidator, getBooleanValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nexport class Arc extends Shape {\n _sceneFunc(context) {\n var angle = Konva.getAngle(this.angle()), clockwise = this.clockwise();\n context.beginPath();\n context.arc(0, 0, this.outerRadius(), 0, angle, clockwise);\n context.arc(0, 0, this.innerRadius(), angle, 0, !clockwise);\n context.closePath();\n context.fillStrokeShape(this);\n }\n getWidth() {\n return this.outerRadius() * 2;\n }\n getHeight() {\n return this.outerRadius() * 2;\n }\n setWidth(width) {\n this.outerRadius(width / 2);\n }\n setHeight(height) {\n this.outerRadius(height / 2);\n }\n getSelfRect() {\n const innerRadius = this.innerRadius();\n const outerRadius = this.outerRadius();\n const clockwise = this.clockwise();\n const angle = Konva.getAngle(clockwise ? 360 - this.angle() : this.angle());\n const boundLeftRatio = Math.cos(Math.min(angle, Math.PI));\n const boundRightRatio = 1;\n const boundTopRatio = Math.sin(Math.min(Math.max(Math.PI, angle), (3 * Math.PI) / 2));\n const boundBottomRatio = Math.sin(Math.min(angle, Math.PI / 2));\n const boundLeft = boundLeftRatio * (boundLeftRatio > 0 ? innerRadius : outerRadius);\n const boundRight = boundRightRatio * (boundRightRatio > 0 ? outerRadius : innerRadius);\n const boundTop = boundTopRatio * (boundTopRatio > 0 ? innerRadius : outerRadius);\n const boundBottom = boundBottomRatio * (boundBottomRatio > 0 ? outerRadius : innerRadius);\n return {\n x: boundLeft,\n y: clockwise ? -1 * boundBottom : boundTop,\n width: boundRight - boundLeft,\n height: boundBottom - boundTop,\n };\n }\n}\nArc.prototype._centroid = true;\nArc.prototype.className = 'Arc';\nArc.prototype._attrsAffectingSize = ['innerRadius', 'outerRadius'];\n_registerNode(Arc);\nFactory.addGetterSetter(Arc, 'innerRadius', 0, getNumberValidator());\nFactory.addGetterSetter(Arc, 'outerRadius', 0, getNumberValidator());\nFactory.addGetterSetter(Arc, 'angle', 0, getNumberValidator());\nFactory.addGetterSetter(Arc, 'clockwise', false, getBooleanValidator());\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { getNumberValidator, getNumberArrayValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nfunction getControlPoints(x0, y0, x1, y1, x2, y2, t) {\n var d01 = Math.sqrt(Math.pow(x1 - x0, 2) + Math.pow(y1 - y0, 2)), d12 = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2)), fa = (t * d01) / (d01 + d12), fb = (t * d12) / (d01 + d12), p1x = x1 - fa * (x2 - x0), p1y = y1 - fa * (y2 - y0), p2x = x1 + fb * (x2 - x0), p2y = y1 + fb * (y2 - y0);\n return [p1x, p1y, p2x, p2y];\n}\nfunction expandPoints(p, tension) {\n var len = p.length, allPoints = [], n, cp;\n for (n = 2; n < len - 2; n += 2) {\n cp = getControlPoints(p[n - 2], p[n - 1], p[n], p[n + 1], p[n + 2], p[n + 3], tension);\n if (isNaN(cp[0])) {\n continue;\n }\n allPoints.push(cp[0]);\n allPoints.push(cp[1]);\n allPoints.push(p[n]);\n allPoints.push(p[n + 1]);\n allPoints.push(cp[2]);\n allPoints.push(cp[3]);\n }\n return allPoints;\n}\nexport class Line extends Shape {\n constructor(config) {\n super(config);\n this.on('pointsChange.konva tensionChange.konva closedChange.konva bezierChange.konva', function () {\n this._clearCache('tensionPoints');\n });\n }\n _sceneFunc(context) {\n var points = this.points(), length = points.length, tension = this.tension(), closed = this.closed(), bezier = this.bezier(), tp, len, n;\n if (!length) {\n return;\n }\n context.beginPath();\n context.moveTo(points[0], points[1]);\n if (tension !== 0 && length > 4) {\n tp = this.getTensionPoints();\n len = tp.length;\n n = closed ? 0 : 4;\n if (!closed) {\n context.quadraticCurveTo(tp[0], tp[1], tp[2], tp[3]);\n }\n while (n < len - 2) {\n context.bezierCurveTo(tp[n++], tp[n++], tp[n++], tp[n++], tp[n++], tp[n++]);\n }\n if (!closed) {\n context.quadraticCurveTo(tp[len - 2], tp[len - 1], points[length - 2], points[length - 1]);\n }\n }\n else if (bezier) {\n n = 2;\n while (n < length) {\n context.bezierCurveTo(points[n++], points[n++], points[n++], points[n++], points[n++], points[n++]);\n }\n }\n else {\n for (n = 2; n < length; n += 2) {\n context.lineTo(points[n], points[n + 1]);\n }\n }\n if (closed) {\n context.closePath();\n context.fillStrokeShape(this);\n }\n else {\n context.strokeShape(this);\n }\n }\n getTensionPoints() {\n return this._getCache('tensionPoints', this._getTensionPoints);\n }\n _getTensionPoints() {\n if (this.closed()) {\n return this._getTensionPointsClosed();\n }\n else {\n return expandPoints(this.points(), this.tension());\n }\n }\n _getTensionPointsClosed() {\n var p = this.points(), len = p.length, tension = this.tension(), firstControlPoints = getControlPoints(p[len - 2], p[len - 1], p[0], p[1], p[2], p[3], tension), lastControlPoints = getControlPoints(p[len - 4], p[len - 3], p[len - 2], p[len - 1], p[0], p[1], tension), middle = expandPoints(p, tension), tp = [firstControlPoints[2], firstControlPoints[3]]\n .concat(middle)\n .concat([\n lastControlPoints[0],\n lastControlPoints[1],\n p[len - 2],\n p[len - 1],\n lastControlPoints[2],\n lastControlPoints[3],\n firstControlPoints[0],\n firstControlPoints[1],\n p[0],\n p[1],\n ]);\n return tp;\n }\n getWidth() {\n return this.getSelfRect().width;\n }\n getHeight() {\n return this.getSelfRect().height;\n }\n getSelfRect() {\n var points = this.points();\n if (points.length < 4) {\n return {\n x: points[0] || 0,\n y: points[1] || 0,\n width: 0,\n height: 0,\n };\n }\n if (this.tension() !== 0) {\n points = [\n points[0],\n points[1],\n ...this._getTensionPoints(),\n points[points.length - 2],\n points[points.length - 1],\n ];\n }\n else {\n points = this.points();\n }\n var minX = points[0];\n var maxX = points[0];\n var minY = points[1];\n var maxY = points[1];\n var x, y;\n for (var i = 0; i < points.length / 2; i++) {\n x = points[i * 2];\n y = points[i * 2 + 1];\n minX = Math.min(minX, x);\n maxX = Math.max(maxX, x);\n minY = Math.min(minY, y);\n maxY = Math.max(maxY, y);\n }\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY,\n };\n }\n}\nLine.prototype.className = 'Line';\nLine.prototype._attrsAffectingSize = ['points', 'bezier', 'tension'];\n_registerNode(Line);\nFactory.addGetterSetter(Line, 'closed', false);\nFactory.addGetterSetter(Line, 'bezier', false);\nFactory.addGetterSetter(Line, 'tension', 0, getNumberValidator());\nFactory.addGetterSetter(Line, 'points', [], getNumberArrayValidator());\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { _registerNode } from '../Global.js';\nexport class Path extends Shape {\n constructor(config) {\n super(config);\n this.dataArray = [];\n this.pathLength = 0;\n this.dataArray = Path.parsePathData(this.data());\n this.pathLength = 0;\n for (var i = 0; i < this.dataArray.length; ++i) {\n this.pathLength += this.dataArray[i].pathLength;\n }\n this.on('dataChange.konva', function () {\n this.dataArray = Path.parsePathData(this.data());\n this.pathLength = 0;\n for (var i = 0; i < this.dataArray.length; ++i) {\n this.pathLength += this.dataArray[i].pathLength;\n }\n });\n }\n _sceneFunc(context) {\n var ca = this.dataArray;\n context.beginPath();\n var isClosed = false;\n for (var n = 0; n < ca.length; n++) {\n var c = ca[n].command;\n var p = ca[n].points;\n switch (c) {\n case 'L':\n context.lineTo(p[0], p[1]);\n break;\n case 'M':\n context.moveTo(p[0], p[1]);\n break;\n case 'C':\n context.bezierCurveTo(p[0], p[1], p[2], p[3], p[4], p[5]);\n break;\n case 'Q':\n context.quadraticCurveTo(p[0], p[1], p[2], p[3]);\n break;\n case 'A':\n var cx = p[0], cy = p[1], rx = p[2], ry = p[3], theta = p[4], dTheta = p[5], psi = p[6], fs = p[7];\n var r = rx > ry ? rx : ry;\n var scaleX = rx > ry ? 1 : rx / ry;\n var scaleY = rx > ry ? ry / rx : 1;\n context.translate(cx, cy);\n context.rotate(psi);\n context.scale(scaleX, scaleY);\n context.arc(0, 0, r, theta, theta + dTheta, 1 - fs);\n context.scale(1 / scaleX, 1 / scaleY);\n context.rotate(-psi);\n context.translate(-cx, -cy);\n break;\n case 'z':\n isClosed = true;\n context.closePath();\n break;\n }\n }\n if (!isClosed && !this.hasFill()) {\n context.strokeShape(this);\n }\n else {\n context.fillStrokeShape(this);\n }\n }\n getSelfRect() {\n var points = [];\n this.dataArray.forEach(function (data) {\n if (data.command === 'A') {\n var start = data.points[4];\n var dTheta = data.points[5];\n var end = data.points[4] + dTheta;\n var inc = Math.PI / 180.0;\n if (Math.abs(start - end) < inc) {\n inc = Math.abs(start - end);\n }\n if (dTheta < 0) {\n for (let t = start - inc; t > end; t -= inc) {\n const point = Path.getPointOnEllipticalArc(data.points[0], data.points[1], data.points[2], data.points[3], t, 0);\n points.push(point.x, point.y);\n }\n }\n else {\n for (let t = start + inc; t < end; t += inc) {\n const point = Path.getPointOnEllipticalArc(data.points[0], data.points[1], data.points[2], data.points[3], t, 0);\n points.push(point.x, point.y);\n }\n }\n }\n else if (data.command === 'C') {\n for (let t = 0.0; t <= 1; t += 0.01) {\n const point = Path.getPointOnCubicBezier(t, data.start.x, data.start.y, data.points[0], data.points[1], data.points[2], data.points[3], data.points[4], data.points[5]);\n points.push(point.x, point.y);\n }\n }\n else {\n points = points.concat(data.points);\n }\n });\n var minX = points[0];\n var maxX = points[0];\n var minY = points[1];\n var maxY = points[1];\n var x, y;\n for (var i = 0; i < points.length / 2; i++) {\n x = points[i * 2];\n y = points[i * 2 + 1];\n if (!isNaN(x)) {\n minX = Math.min(minX, x);\n maxX = Math.max(maxX, x);\n }\n if (!isNaN(y)) {\n minY = Math.min(minY, y);\n maxY = Math.max(maxY, y);\n }\n }\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY,\n };\n }\n getLength() {\n return this.pathLength;\n }\n getPointAtLength(length) {\n var point, i = 0, ii = this.dataArray.length;\n if (!ii) {\n return null;\n }\n while (i < ii && length > this.dataArray[i].pathLength) {\n length -= this.dataArray[i].pathLength;\n ++i;\n }\n if (i === ii) {\n point = this.dataArray[i - 1].points.slice(-2);\n return {\n x: point[0],\n y: point[1],\n };\n }\n if (length < 0.01) {\n point = this.dataArray[i].points.slice(0, 2);\n return {\n x: point[0],\n y: point[1],\n };\n }\n var cp = this.dataArray[i];\n var p = cp.points;\n switch (cp.command) {\n case 'L':\n return Path.getPointOnLine(length, cp.start.x, cp.start.y, p[0], p[1]);\n case 'C':\n return Path.getPointOnCubicBezier(length / cp.pathLength, cp.start.x, cp.start.y, p[0], p[1], p[2], p[3], p[4], p[5]);\n case 'Q':\n return Path.getPointOnQuadraticBezier(length / cp.pathLength, cp.start.x, cp.start.y, p[0], p[1], p[2], p[3]);\n case 'A':\n var cx = p[0], cy = p[1], rx = p[2], ry = p[3], theta = p[4], dTheta = p[5], psi = p[6];\n theta += (dTheta * length) / cp.pathLength;\n return Path.getPointOnEllipticalArc(cx, cy, rx, ry, theta, psi);\n }\n return null;\n }\n static getLineLength(x1, y1, x2, y2) {\n return Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));\n }\n static getPointOnLine(dist, P1x, P1y, P2x, P2y, fromX, fromY) {\n if (fromX === undefined) {\n fromX = P1x;\n }\n if (fromY === undefined) {\n fromY = P1y;\n }\n var m = (P2y - P1y) / (P2x - P1x + 0.00000001);\n var run = Math.sqrt((dist * dist) / (1 + m * m));\n if (P2x < P1x) {\n run *= -1;\n }\n var rise = m * run;\n var pt;\n if (P2x === P1x) {\n pt = {\n x: fromX,\n y: fromY + rise,\n };\n }\n else if ((fromY - P1y) / (fromX - P1x + 0.00000001) === m) {\n pt = {\n x: fromX + run,\n y: fromY + rise,\n };\n }\n else {\n var ix, iy;\n var len = this.getLineLength(P1x, P1y, P2x, P2y);\n var u = (fromX - P1x) * (P2x - P1x) + (fromY - P1y) * (P2y - P1y);\n u = u / (len * len);\n ix = P1x + u * (P2x - P1x);\n iy = P1y + u * (P2y - P1y);\n var pRise = this.getLineLength(fromX, fromY, ix, iy);\n var pRun = Math.sqrt(dist * dist - pRise * pRise);\n run = Math.sqrt((pRun * pRun) / (1 + m * m));\n if (P2x < P1x) {\n run *= -1;\n }\n rise = m * run;\n pt = {\n x: ix + run,\n y: iy + rise,\n };\n }\n return pt;\n }\n static getPointOnCubicBezier(pct, P1x, P1y, P2x, P2y, P3x, P3y, P4x, P4y) {\n function CB1(t) {\n return t * t * t;\n }\n function CB2(t) {\n return 3 * t * t * (1 - t);\n }\n function CB3(t) {\n return 3 * t * (1 - t) * (1 - t);\n }\n function CB4(t) {\n return (1 - t) * (1 - t) * (1 - t);\n }\n var x = P4x * CB1(pct) + P3x * CB2(pct) + P2x * CB3(pct) + P1x * CB4(pct);\n var y = P4y * CB1(pct) + P3y * CB2(pct) + P2y * CB3(pct) + P1y * CB4(pct);\n return {\n x: x,\n y: y,\n };\n }\n static getPointOnQuadraticBezier(pct, P1x, P1y, P2x, P2y, P3x, P3y) {\n function QB1(t) {\n return t * t;\n }\n function QB2(t) {\n return 2 * t * (1 - t);\n }\n function QB3(t) {\n return (1 - t) * (1 - t);\n }\n var x = P3x * QB1(pct) + P2x * QB2(pct) + P1x * QB3(pct);\n var y = P3y * QB1(pct) + P2y * QB2(pct) + P1y * QB3(pct);\n return {\n x: x,\n y: y,\n };\n }\n static getPointOnEllipticalArc(cx, cy, rx, ry, theta, psi) {\n var cosPsi = Math.cos(psi), sinPsi = Math.sin(psi);\n var pt = {\n x: rx * Math.cos(theta),\n y: ry * Math.sin(theta),\n };\n return {\n x: cx + (pt.x * cosPsi - pt.y * sinPsi),\n y: cy + (pt.x * sinPsi + pt.y * cosPsi),\n };\n }\n static parsePathData(data) {\n if (!data) {\n return [];\n }\n var cs = data;\n var cc = [\n 'm',\n 'M',\n 'l',\n 'L',\n 'v',\n 'V',\n 'h',\n 'H',\n 'z',\n 'Z',\n 'c',\n 'C',\n 'q',\n 'Q',\n 't',\n 'T',\n 's',\n 'S',\n 'a',\n 'A',\n ];\n cs = cs.replace(new RegExp(' ', 'g'), ',');\n for (var n = 0; n < cc.length; n++) {\n cs = cs.replace(new RegExp(cc[n], 'g'), '|' + cc[n]);\n }\n var arr = cs.split('|');\n var ca = [];\n var coords = [];\n var cpx = 0;\n var cpy = 0;\n var re = /([-+]?((\\d+\\.\\d+)|((\\d+)|(\\.\\d+)))(?:e[-+]?\\d+)?)/gi;\n var match;\n for (n = 1; n < arr.length; n++) {\n var str = arr[n];\n var c = str.charAt(0);\n str = str.slice(1);\n coords.length = 0;\n while ((match = re.exec(str))) {\n coords.push(match[0]);\n }\n var p = [];\n for (var j = 0, jlen = coords.length; j < jlen; j++) {\n if (coords[j] === '00') {\n p.push(0, 0);\n continue;\n }\n var parsed = parseFloat(coords[j]);\n if (!isNaN(parsed)) {\n p.push(parsed);\n }\n else {\n p.push(0);\n }\n }\n while (p.length > 0) {\n if (isNaN(p[0])) {\n break;\n }\n var cmd = null;\n var points = [];\n var startX = cpx, startY = cpy;\n var prevCmd, ctlPtx, ctlPty;\n var rx, ry, psi, fa, fs, x1, y1;\n switch (c) {\n case 'l':\n cpx += p.shift();\n cpy += p.shift();\n cmd = 'L';\n points.push(cpx, cpy);\n break;\n case 'L':\n cpx = p.shift();\n cpy = p.shift();\n points.push(cpx, cpy);\n break;\n case 'm':\n var dx = p.shift();\n var dy = p.shift();\n cpx += dx;\n cpy += dy;\n cmd = 'M';\n if (ca.length > 2 && ca[ca.length - 1].command === 'z') {\n for (var idx = ca.length - 2; idx >= 0; idx--) {\n if (ca[idx].command === 'M') {\n cpx = ca[idx].points[0] + dx;\n cpy = ca[idx].points[1] + dy;\n break;\n }\n }\n }\n points.push(cpx, cpy);\n c = 'l';\n break;\n case 'M':\n cpx = p.shift();\n cpy = p.shift();\n cmd = 'M';\n points.push(cpx, cpy);\n c = 'L';\n break;\n case 'h':\n cpx += p.shift();\n cmd = 'L';\n points.push(cpx, cpy);\n break;\n case 'H':\n cpx = p.shift();\n cmd = 'L';\n points.push(cpx, cpy);\n break;\n case 'v':\n cpy += p.shift();\n cmd = 'L';\n points.push(cpx, cpy);\n break;\n case 'V':\n cpy = p.shift();\n cmd = 'L';\n points.push(cpx, cpy);\n break;\n case 'C':\n points.push(p.shift(), p.shift(), p.shift(), p.shift());\n cpx = p.shift();\n cpy = p.shift();\n points.push(cpx, cpy);\n break;\n case 'c':\n points.push(cpx + p.shift(), cpy + p.shift(), cpx + p.shift(), cpy + p.shift());\n cpx += p.shift();\n cpy += p.shift();\n cmd = 'C';\n points.push(cpx, cpy);\n break;\n case 'S':\n ctlPtx = cpx;\n ctlPty = cpy;\n prevCmd = ca[ca.length - 1];\n if (prevCmd.command === 'C') {\n ctlPtx = cpx + (cpx - prevCmd.points[2]);\n ctlPty = cpy + (cpy - prevCmd.points[3]);\n }\n points.push(ctlPtx, ctlPty, p.shift(), p.shift());\n cpx = p.shift();\n cpy = p.shift();\n cmd = 'C';\n points.push(cpx, cpy);\n break;\n case 's':\n ctlPtx = cpx;\n ctlPty = cpy;\n prevCmd = ca[ca.length - 1];\n if (prevCmd.command === 'C') {\n ctlPtx = cpx + (cpx - prevCmd.points[2]);\n ctlPty = cpy + (cpy - prevCmd.points[3]);\n }\n points.push(ctlPtx, ctlPty, cpx + p.shift(), cpy + p.shift());\n cpx += p.shift();\n cpy += p.shift();\n cmd = 'C';\n points.push(cpx, cpy);\n break;\n case 'Q':\n points.push(p.shift(), p.shift());\n cpx = p.shift();\n cpy = p.shift();\n points.push(cpx, cpy);\n break;\n case 'q':\n points.push(cpx + p.shift(), cpy + p.shift());\n cpx += p.shift();\n cpy += p.shift();\n cmd = 'Q';\n points.push(cpx, cpy);\n break;\n case 'T':\n ctlPtx = cpx;\n ctlPty = cpy;\n prevCmd = ca[ca.length - 1];\n if (prevCmd.command === 'Q') {\n ctlPtx = cpx + (cpx - prevCmd.points[0]);\n ctlPty = cpy + (cpy - prevCmd.points[1]);\n }\n cpx = p.shift();\n cpy = p.shift();\n cmd = 'Q';\n points.push(ctlPtx, ctlPty, cpx, cpy);\n break;\n case 't':\n ctlPtx = cpx;\n ctlPty = cpy;\n prevCmd = ca[ca.length - 1];\n if (prevCmd.command === 'Q') {\n ctlPtx = cpx + (cpx - prevCmd.points[0]);\n ctlPty = cpy + (cpy - prevCmd.points[1]);\n }\n cpx += p.shift();\n cpy += p.shift();\n cmd = 'Q';\n points.push(ctlPtx, ctlPty, cpx, cpy);\n break;\n case 'A':\n rx = p.shift();\n ry = p.shift();\n psi = p.shift();\n fa = p.shift();\n fs = p.shift();\n x1 = cpx;\n y1 = cpy;\n cpx = p.shift();\n cpy = p.shift();\n cmd = 'A';\n points = this.convertEndpointToCenterParameterization(x1, y1, cpx, cpy, fa, fs, rx, ry, psi);\n break;\n case 'a':\n rx = p.shift();\n ry = p.shift();\n psi = p.shift();\n fa = p.shift();\n fs = p.shift();\n x1 = cpx;\n y1 = cpy;\n cpx += p.shift();\n cpy += p.shift();\n cmd = 'A';\n points = this.convertEndpointToCenterParameterization(x1, y1, cpx, cpy, fa, fs, rx, ry, psi);\n break;\n }\n ca.push({\n command: cmd || c,\n points: points,\n start: {\n x: startX,\n y: startY,\n },\n pathLength: this.calcLength(startX, startY, cmd || c, points),\n });\n }\n if (c === 'z' || c === 'Z') {\n ca.push({\n command: 'z',\n points: [],\n start: undefined,\n pathLength: 0,\n });\n }\n }\n return ca;\n }\n static calcLength(x, y, cmd, points) {\n var len, p1, p2, t;\n var path = Path;\n switch (cmd) {\n case 'L':\n return path.getLineLength(x, y, points[0], points[1]);\n case 'C':\n len = 0.0;\n p1 = path.getPointOnCubicBezier(0, x, y, points[0], points[1], points[2], points[3], points[4], points[5]);\n for (t = 0.01; t <= 1; t += 0.01) {\n p2 = path.getPointOnCubicBezier(t, x, y, points[0], points[1], points[2], points[3], points[4], points[5]);\n len += path.getLineLength(p1.x, p1.y, p2.x, p2.y);\n p1 = p2;\n }\n return len;\n case 'Q':\n len = 0.0;\n p1 = path.getPointOnQuadraticBezier(0, x, y, points[0], points[1], points[2], points[3]);\n for (t = 0.01; t <= 1; t += 0.01) {\n p2 = path.getPointOnQuadraticBezier(t, x, y, points[0], points[1], points[2], points[3]);\n len += path.getLineLength(p1.x, p1.y, p2.x, p2.y);\n p1 = p2;\n }\n return len;\n case 'A':\n len = 0.0;\n var start = points[4];\n var dTheta = points[5];\n var end = points[4] + dTheta;\n var inc = Math.PI / 180.0;\n if (Math.abs(start - end) < inc) {\n inc = Math.abs(start - end);\n }\n p1 = path.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], start, 0);\n if (dTheta < 0) {\n for (t = start - inc; t > end; t -= inc) {\n p2 = path.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], t, 0);\n len += path.getLineLength(p1.x, p1.y, p2.x, p2.y);\n p1 = p2;\n }\n }\n else {\n for (t = start + inc; t < end; t += inc) {\n p2 = path.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], t, 0);\n len += path.getLineLength(p1.x, p1.y, p2.x, p2.y);\n p1 = p2;\n }\n }\n p2 = path.getPointOnEllipticalArc(points[0], points[1], points[2], points[3], end, 0);\n len += path.getLineLength(p1.x, p1.y, p2.x, p2.y);\n return len;\n }\n return 0;\n }\n static convertEndpointToCenterParameterization(x1, y1, x2, y2, fa, fs, rx, ry, psiDeg) {\n var psi = psiDeg * (Math.PI / 180.0);\n var xp = (Math.cos(psi) * (x1 - x2)) / 2.0 + (Math.sin(psi) * (y1 - y2)) / 2.0;\n var yp = (-1 * Math.sin(psi) * (x1 - x2)) / 2.0 +\n (Math.cos(psi) * (y1 - y2)) / 2.0;\n var lambda = (xp * xp) / (rx * rx) + (yp * yp) / (ry * ry);\n if (lambda > 1) {\n rx *= Math.sqrt(lambda);\n ry *= Math.sqrt(lambda);\n }\n var f = Math.sqrt((rx * rx * (ry * ry) - rx * rx * (yp * yp) - ry * ry * (xp * xp)) /\n (rx * rx * (yp * yp) + ry * ry * (xp * xp)));\n if (fa === fs) {\n f *= -1;\n }\n if (isNaN(f)) {\n f = 0;\n }\n var cxp = (f * rx * yp) / ry;\n var cyp = (f * -ry * xp) / rx;\n var cx = (x1 + x2) / 2.0 + Math.cos(psi) * cxp - Math.sin(psi) * cyp;\n var cy = (y1 + y2) / 2.0 + Math.sin(psi) * cxp + Math.cos(psi) * cyp;\n var vMag = function (v) {\n return Math.sqrt(v[0] * v[0] + v[1] * v[1]);\n };\n var vRatio = function (u, v) {\n return (u[0] * v[0] + u[1] * v[1]) / (vMag(u) * vMag(v));\n };\n var vAngle = function (u, v) {\n return (u[0] * v[1] < u[1] * v[0] ? -1 : 1) * Math.acos(vRatio(u, v));\n };\n var theta = vAngle([1, 0], [(xp - cxp) / rx, (yp - cyp) / ry]);\n var u = [(xp - cxp) / rx, (yp - cyp) / ry];\n var v = [(-1 * xp - cxp) / rx, (-1 * yp - cyp) / ry];\n var dTheta = vAngle(u, v);\n if (vRatio(u, v) <= -1) {\n dTheta = Math.PI;\n }\n if (vRatio(u, v) >= 1) {\n dTheta = 0;\n }\n if (fs === 0 && dTheta > 0) {\n dTheta = dTheta - 2 * Math.PI;\n }\n if (fs === 1 && dTheta < 0) {\n dTheta = dTheta + 2 * Math.PI;\n }\n return [cx, cy, rx, ry, theta, dTheta, psi, fs];\n }\n}\nPath.prototype.className = 'Path';\nPath.prototype._attrsAffectingSize = ['data'];\n_registerNode(Path);\nFactory.addGetterSetter(Path, 'data');\n","import { Factory } from '../Factory.js';\nimport { Line } from './Line.js';\nimport { getNumberValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nimport { Path } from './Path.js';\nexport class Arrow extends Line {\n _sceneFunc(ctx) {\n super._sceneFunc(ctx);\n var PI2 = Math.PI * 2;\n var points = this.points();\n var tp = points;\n var fromTension = this.tension() !== 0 && points.length > 4;\n if (fromTension) {\n tp = this.getTensionPoints();\n }\n var length = this.pointerLength();\n var n = points.length;\n var dx, dy;\n if (fromTension) {\n const lp = [\n tp[tp.length - 4],\n tp[tp.length - 3],\n tp[tp.length - 2],\n tp[tp.length - 1],\n points[n - 2],\n points[n - 1],\n ];\n const lastLength = Path.calcLength(tp[tp.length - 4], tp[tp.length - 3], 'C', lp);\n const previous = Path.getPointOnQuadraticBezier(Math.min(1, 1 - length / lastLength), lp[0], lp[1], lp[2], lp[3], lp[4], lp[5]);\n dx = points[n - 2] - previous.x;\n dy = points[n - 1] - previous.y;\n }\n else {\n dx = points[n - 2] - points[n - 4];\n dy = points[n - 1] - points[n - 3];\n }\n var radians = (Math.atan2(dy, dx) + PI2) % PI2;\n var width = this.pointerWidth();\n if (this.pointerAtEnding()) {\n ctx.save();\n ctx.beginPath();\n ctx.translate(points[n - 2], points[n - 1]);\n ctx.rotate(radians);\n ctx.moveTo(0, 0);\n ctx.lineTo(-length, width / 2);\n ctx.lineTo(-length, -width / 2);\n ctx.closePath();\n ctx.restore();\n this.__fillStroke(ctx);\n }\n if (this.pointerAtBeginning()) {\n ctx.save();\n ctx.beginPath();\n ctx.translate(points[0], points[1]);\n if (fromTension) {\n dx = (tp[0] + tp[2]) / 2 - points[0];\n dy = (tp[1] + tp[3]) / 2 - points[1];\n }\n else {\n dx = points[2] - points[0];\n dy = points[3] - points[1];\n }\n ctx.rotate((Math.atan2(-dy, -dx) + PI2) % PI2);\n ctx.moveTo(0, 0);\n ctx.lineTo(-length, width / 2);\n ctx.lineTo(-length, -width / 2);\n ctx.closePath();\n ctx.restore();\n this.__fillStroke(ctx);\n }\n }\n __fillStroke(ctx) {\n var isDashEnabled = this.dashEnabled();\n if (isDashEnabled) {\n this.attrs.dashEnabled = false;\n ctx.setLineDash([]);\n }\n ctx.fillStrokeShape(this);\n if (isDashEnabled) {\n this.attrs.dashEnabled = true;\n }\n }\n getSelfRect() {\n const lineRect = super.getSelfRect();\n const offset = this.pointerWidth() / 2;\n return {\n x: lineRect.x - offset,\n y: lineRect.y - offset,\n width: lineRect.width + offset * 2,\n height: lineRect.height + offset * 2,\n };\n }\n}\nArrow.prototype.className = 'Arrow';\n_registerNode(Arrow);\nFactory.addGetterSetter(Arrow, 'pointerLength', 10, getNumberValidator());\nFactory.addGetterSetter(Arrow, 'pointerWidth', 10, getNumberValidator());\nFactory.addGetterSetter(Arrow, 'pointerAtBeginning', false);\nFactory.addGetterSetter(Arrow, 'pointerAtEnding', true);\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { getNumberValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nexport class Circle extends Shape {\n _sceneFunc(context) {\n context.beginPath();\n context.arc(0, 0, this.attrs.radius || 0, 0, Math.PI * 2, false);\n context.closePath();\n context.fillStrokeShape(this);\n }\n getWidth() {\n return this.radius() * 2;\n }\n getHeight() {\n return this.radius() * 2;\n }\n setWidth(width) {\n if (this.radius() !== width / 2) {\n this.radius(width / 2);\n }\n }\n setHeight(height) {\n if (this.radius() !== height / 2) {\n this.radius(height / 2);\n }\n }\n}\nCircle.prototype._centroid = true;\nCircle.prototype.className = 'Circle';\nCircle.prototype._attrsAffectingSize = ['radius'];\n_registerNode(Circle);\nFactory.addGetterSetter(Circle, 'radius', 0, getNumberValidator());\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { getNumberValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nexport class Ellipse extends Shape {\n _sceneFunc(context) {\n var rx = this.radiusX(), ry = this.radiusY();\n context.beginPath();\n context.save();\n if (rx !== ry) {\n context.scale(1, ry / rx);\n }\n context.arc(0, 0, rx, 0, Math.PI * 2, false);\n context.restore();\n context.closePath();\n context.fillStrokeShape(this);\n }\n getWidth() {\n return this.radiusX() * 2;\n }\n getHeight() {\n return this.radiusY() * 2;\n }\n setWidth(width) {\n this.radiusX(width / 2);\n }\n setHeight(height) {\n this.radiusY(height / 2);\n }\n}\nEllipse.prototype.className = 'Ellipse';\nEllipse.prototype._centroid = true;\nEllipse.prototype._attrsAffectingSize = ['radiusX', 'radiusY'];\n_registerNode(Ellipse);\nFactory.addComponentsGetterSetter(Ellipse, 'radius', ['x', 'y']);\nFactory.addGetterSetter(Ellipse, 'radiusX', 0, getNumberValidator());\nFactory.addGetterSetter(Ellipse, 'radiusY', 0, getNumberValidator());\n","import { Util } from '../Util.js';\nimport { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { _registerNode } from '../Global.js';\nimport { getNumberOrArrayOfNumbersValidator, getNumberValidator, } from '../Validators.js';\nexport class Image extends Shape {\n constructor(attrs) {\n super(attrs);\n this.on('imageChange.konva', () => {\n this._setImageLoad();\n });\n this._setImageLoad();\n }\n _setImageLoad() {\n const image = this.image();\n if (image && image.complete) {\n return;\n }\n if (image && image.readyState === 4) {\n return;\n }\n if (image && image['addEventListener']) {\n image['addEventListener']('load', () => {\n this._requestDraw();\n });\n }\n }\n _useBufferCanvas() {\n return super._useBufferCanvas(true);\n }\n _sceneFunc(context) {\n const width = this.getWidth();\n const height = this.getHeight();\n const cornerRadius = this.cornerRadius();\n const image = this.attrs.image;\n let params;\n if (image) {\n const cropWidth = this.attrs.cropWidth;\n const cropHeight = this.attrs.cropHeight;\n if (cropWidth && cropHeight) {\n params = [\n image,\n this.cropX(),\n this.cropY(),\n cropWidth,\n cropHeight,\n 0,\n 0,\n width,\n height,\n ];\n }\n else {\n params = [image, 0, 0, width, height];\n }\n }\n if (this.hasFill() || this.hasStroke() || cornerRadius) {\n context.beginPath();\n cornerRadius\n ? Util.drawRoundedRectPath(context, width, height, cornerRadius)\n : context.rect(0, 0, width, height);\n context.closePath();\n context.fillStrokeShape(this);\n }\n if (image) {\n if (cornerRadius) {\n context.clip();\n }\n context.drawImage.apply(context, params);\n }\n }\n _hitFunc(context) {\n var width = this.width(), height = this.height(), cornerRadius = this.cornerRadius();\n context.beginPath();\n if (!cornerRadius) {\n context.rect(0, 0, width, height);\n }\n else {\n Util.drawRoundedRectPath(context, width, height, cornerRadius);\n }\n context.closePath();\n context.fillStrokeShape(this);\n }\n getWidth() {\n var _a, _b;\n return (_a = this.attrs.width) !== null && _a !== void 0 ? _a : (_b = this.image()) === null || _b === void 0 ? void 0 : _b.width;\n }\n getHeight() {\n var _a, _b;\n return (_a = this.attrs.height) !== null && _a !== void 0 ? _a : (_b = this.image()) === null || _b === void 0 ? void 0 : _b.height;\n }\n static fromURL(url, callback, onError = null) {\n var img = Util.createImageElement();\n img.onload = function () {\n var image = new Image({\n image: img,\n });\n callback(image);\n };\n img.onerror = onError;\n img.crossOrigin = 'Anonymous';\n img.src = url;\n }\n}\nImage.prototype.className = 'Image';\n_registerNode(Image);\nFactory.addGetterSetter(Image, 'cornerRadius', 0, getNumberOrArrayOfNumbersValidator(4));\nFactory.addGetterSetter(Image, 'image');\nFactory.addComponentsGetterSetter(Image, 'crop', ['x', 'y', 'width', 'height']);\nFactory.addGetterSetter(Image, 'cropX', 0, getNumberValidator());\nFactory.addGetterSetter(Image, 'cropY', 0, getNumberValidator());\nFactory.addGetterSetter(Image, 'cropWidth', 0, getNumberValidator());\nFactory.addGetterSetter(Image, 'cropHeight', 0, getNumberValidator());\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { Group } from '../Group.js';\nimport { getNumberOrArrayOfNumbersValidator, getNumberValidator, } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nvar ATTR_CHANGE_LIST = [\n 'fontFamily',\n 'fontSize',\n 'fontStyle',\n 'padding',\n 'lineHeight',\n 'text',\n 'width',\n 'height',\n 'pointerDirection',\n 'pointerWidth',\n 'pointerHeight',\n], CHANGE_KONVA = 'Change.konva', NONE = 'none', UP = 'up', RIGHT = 'right', DOWN = 'down', LEFT = 'left', attrChangeListLen = ATTR_CHANGE_LIST.length;\nexport class Label extends Group {\n constructor(config) {\n super(config);\n this.on('add.konva', function (evt) {\n this._addListeners(evt.child);\n this._sync();\n });\n }\n getText() {\n return this.find('Text')[0];\n }\n getTag() {\n return this.find('Tag')[0];\n }\n _addListeners(text) {\n var that = this, n;\n var func = function () {\n that._sync();\n };\n for (n = 0; n < attrChangeListLen; n++) {\n text.on(ATTR_CHANGE_LIST[n] + CHANGE_KONVA, func);\n }\n }\n getWidth() {\n return this.getText().width();\n }\n getHeight() {\n return this.getText().height();\n }\n _sync() {\n var text = this.getText(), tag = this.getTag(), width, height, pointerDirection, pointerWidth, x, y, pointerHeight;\n if (text && tag) {\n width = text.width();\n height = text.height();\n pointerDirection = tag.pointerDirection();\n pointerWidth = tag.pointerWidth();\n pointerHeight = tag.pointerHeight();\n x = 0;\n y = 0;\n switch (pointerDirection) {\n case UP:\n x = width / 2;\n y = -1 * pointerHeight;\n break;\n case RIGHT:\n x = width + pointerWidth;\n y = height / 2;\n break;\n case DOWN:\n x = width / 2;\n y = height + pointerHeight;\n break;\n case LEFT:\n x = -1 * pointerWidth;\n y = height / 2;\n break;\n }\n tag.setAttrs({\n x: -1 * x,\n y: -1 * y,\n width: width,\n height: height,\n });\n text.setAttrs({\n x: -1 * x,\n y: -1 * y,\n });\n }\n }\n}\nLabel.prototype.className = 'Label';\n_registerNode(Label);\nexport class Tag extends Shape {\n _sceneFunc(context) {\n var width = this.width(), height = this.height(), pointerDirection = this.pointerDirection(), pointerWidth = this.pointerWidth(), pointerHeight = this.pointerHeight(), cornerRadius = this.cornerRadius();\n let topLeft = 0;\n let topRight = 0;\n let bottomLeft = 0;\n let bottomRight = 0;\n if (typeof cornerRadius === 'number') {\n topLeft =\n topRight =\n bottomLeft =\n bottomRight =\n Math.min(cornerRadius, width / 2, height / 2);\n }\n else {\n topLeft = Math.min(cornerRadius[0] || 0, width / 2, height / 2);\n topRight = Math.min(cornerRadius[1] || 0, width / 2, height / 2);\n bottomRight = Math.min(cornerRadius[2] || 0, width / 2, height / 2);\n bottomLeft = Math.min(cornerRadius[3] || 0, width / 2, height / 2);\n }\n context.beginPath();\n context.moveTo(topLeft, 0);\n if (pointerDirection === UP) {\n context.lineTo((width - pointerWidth) / 2, 0);\n context.lineTo(width / 2, -1 * pointerHeight);\n context.lineTo((width + pointerWidth) / 2, 0);\n }\n context.lineTo(width - topRight, 0);\n context.arc(width - topRight, topRight, topRight, (Math.PI * 3) / 2, 0, false);\n if (pointerDirection === RIGHT) {\n context.lineTo(width, (height - pointerHeight) / 2);\n context.lineTo(width + pointerWidth, height / 2);\n context.lineTo(width, (height + pointerHeight) / 2);\n }\n context.lineTo(width, height - bottomRight);\n context.arc(width - bottomRight, height - bottomRight, bottomRight, 0, Math.PI / 2, false);\n if (pointerDirection === DOWN) {\n context.lineTo((width + pointerWidth) / 2, height);\n context.lineTo(width / 2, height + pointerHeight);\n context.lineTo((width - pointerWidth) / 2, height);\n }\n context.lineTo(bottomLeft, height);\n context.arc(bottomLeft, height - bottomLeft, bottomLeft, Math.PI / 2, Math.PI, false);\n if (pointerDirection === LEFT) {\n context.lineTo(0, (height + pointerHeight) / 2);\n context.lineTo(-1 * pointerWidth, height / 2);\n context.lineTo(0, (height - pointerHeight) / 2);\n }\n context.lineTo(0, topLeft);\n context.arc(topLeft, topLeft, topLeft, Math.PI, (Math.PI * 3) / 2, false);\n context.closePath();\n context.fillStrokeShape(this);\n }\n getSelfRect() {\n var x = 0, y = 0, pointerWidth = this.pointerWidth(), pointerHeight = this.pointerHeight(), direction = this.pointerDirection(), width = this.width(), height = this.height();\n if (direction === UP) {\n y -= pointerHeight;\n height += pointerHeight;\n }\n else if (direction === DOWN) {\n height += pointerHeight;\n }\n else if (direction === LEFT) {\n x -= pointerWidth * 1.5;\n width += pointerWidth;\n }\n else if (direction === RIGHT) {\n width += pointerWidth * 1.5;\n }\n return {\n x: x,\n y: y,\n width: width,\n height: height,\n };\n }\n}\nTag.prototype.className = 'Tag';\n_registerNode(Tag);\nFactory.addGetterSetter(Tag, 'pointerDirection', NONE);\nFactory.addGetterSetter(Tag, 'pointerWidth', 0, getNumberValidator());\nFactory.addGetterSetter(Tag, 'pointerHeight', 0, getNumberValidator());\nFactory.addGetterSetter(Tag, 'cornerRadius', 0, getNumberOrArrayOfNumbersValidator(4));\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { _registerNode } from '../Global.js';\nimport { Util } from '../Util.js';\nimport { getNumberOrArrayOfNumbersValidator } from '../Validators.js';\nexport class Rect extends Shape {\n _sceneFunc(context) {\n var cornerRadius = this.cornerRadius(), width = this.width(), height = this.height();\n context.beginPath();\n if (!cornerRadius) {\n context.rect(0, 0, width, height);\n }\n else {\n Util.drawRoundedRectPath(context, width, height, cornerRadius);\n }\n context.closePath();\n context.fillStrokeShape(this);\n }\n}\nRect.prototype.className = 'Rect';\n_registerNode(Rect);\nFactory.addGetterSetter(Rect, 'cornerRadius', 0, getNumberOrArrayOfNumbersValidator(4));\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { getNumberValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nexport class RegularPolygon extends Shape {\n _sceneFunc(context) {\n const points = this._getPoints();\n context.beginPath();\n context.moveTo(points[0].x, points[0].y);\n for (var n = 1; n < points.length; n++) {\n context.lineTo(points[n].x, points[n].y);\n }\n context.closePath();\n context.fillStrokeShape(this);\n }\n _getPoints() {\n const sides = this.attrs.sides;\n const radius = this.attrs.radius || 0;\n const points = [];\n for (var n = 0; n < sides; n++) {\n points.push({\n x: radius * Math.sin((n * 2 * Math.PI) / sides),\n y: -1 * radius * Math.cos((n * 2 * Math.PI) / sides),\n });\n }\n return points;\n }\n getSelfRect() {\n const points = this._getPoints();\n var minX = points[0].x;\n var maxX = points[0].y;\n var minY = points[0].x;\n var maxY = points[0].y;\n points.forEach((point) => {\n minX = Math.min(minX, point.x);\n maxX = Math.max(maxX, point.x);\n minY = Math.min(minY, point.y);\n maxY = Math.max(maxY, point.y);\n });\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY,\n };\n }\n getWidth() {\n return this.radius() * 2;\n }\n getHeight() {\n return this.radius() * 2;\n }\n setWidth(width) {\n this.radius(width / 2);\n }\n setHeight(height) {\n this.radius(height / 2);\n }\n}\nRegularPolygon.prototype.className = 'RegularPolygon';\nRegularPolygon.prototype._centroid = true;\nRegularPolygon.prototype._attrsAffectingSize = ['radius'];\n_registerNode(RegularPolygon);\nFactory.addGetterSetter(RegularPolygon, 'radius', 0, getNumberValidator());\nFactory.addGetterSetter(RegularPolygon, 'sides', 0, getNumberValidator());\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { getNumberValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nvar PIx2 = Math.PI * 2;\nexport class Ring extends Shape {\n _sceneFunc(context) {\n context.beginPath();\n context.arc(0, 0, this.innerRadius(), 0, PIx2, false);\n context.moveTo(this.outerRadius(), 0);\n context.arc(0, 0, this.outerRadius(), PIx2, 0, true);\n context.closePath();\n context.fillStrokeShape(this);\n }\n getWidth() {\n return this.outerRadius() * 2;\n }\n getHeight() {\n return this.outerRadius() * 2;\n }\n setWidth(width) {\n this.outerRadius(width / 2);\n }\n setHeight(height) {\n this.outerRadius(height / 2);\n }\n}\nRing.prototype.className = 'Ring';\nRing.prototype._centroid = true;\nRing.prototype._attrsAffectingSize = ['innerRadius', 'outerRadius'];\n_registerNode(Ring);\nFactory.addGetterSetter(Ring, 'innerRadius', 0, getNumberValidator());\nFactory.addGetterSetter(Ring, 'outerRadius', 0, getNumberValidator());\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { Animation } from '../Animation.js';\nimport { getNumberValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nexport class Sprite extends Shape {\n constructor(config) {\n super(config);\n this._updated = true;\n this.anim = new Animation(() => {\n var updated = this._updated;\n this._updated = false;\n return updated;\n });\n this.on('animationChange.konva', function () {\n this.frameIndex(0);\n });\n this.on('frameIndexChange.konva', function () {\n this._updated = true;\n });\n this.on('frameRateChange.konva', function () {\n if (!this.anim.isRunning()) {\n return;\n }\n clearInterval(this.interval);\n this._setInterval();\n });\n }\n _sceneFunc(context) {\n var anim = this.animation(), index = this.frameIndex(), ix4 = index * 4, set = this.animations()[anim], offsets = this.frameOffsets(), x = set[ix4 + 0], y = set[ix4 + 1], width = set[ix4 + 2], height = set[ix4 + 3], image = this.image();\n if (this.hasFill() || this.hasStroke()) {\n context.beginPath();\n context.rect(0, 0, width, height);\n context.closePath();\n context.fillStrokeShape(this);\n }\n if (image) {\n if (offsets) {\n var offset = offsets[anim], ix2 = index * 2;\n context.drawImage(image, x, y, width, height, offset[ix2 + 0], offset[ix2 + 1], width, height);\n }\n else {\n context.drawImage(image, x, y, width, height, 0, 0, width, height);\n }\n }\n }\n _hitFunc(context) {\n var anim = this.animation(), index = this.frameIndex(), ix4 = index * 4, set = this.animations()[anim], offsets = this.frameOffsets(), width = set[ix4 + 2], height = set[ix4 + 3];\n context.beginPath();\n if (offsets) {\n var offset = offsets[anim];\n var ix2 = index * 2;\n context.rect(offset[ix2 + 0], offset[ix2 + 1], width, height);\n }\n else {\n context.rect(0, 0, width, height);\n }\n context.closePath();\n context.fillShape(this);\n }\n _useBufferCanvas() {\n return super._useBufferCanvas(true);\n }\n _setInterval() {\n var that = this;\n this.interval = setInterval(function () {\n that._updateIndex();\n }, 1000 / this.frameRate());\n }\n start() {\n if (this.isRunning()) {\n return;\n }\n var layer = this.getLayer();\n this.anim.setLayers(layer);\n this._setInterval();\n this.anim.start();\n }\n stop() {\n this.anim.stop();\n clearInterval(this.interval);\n }\n isRunning() {\n return this.anim.isRunning();\n }\n _updateIndex() {\n var index = this.frameIndex(), animation = this.animation(), animations = this.animations(), anim = animations[animation], len = anim.length / 4;\n if (index < len - 1) {\n this.frameIndex(index + 1);\n }\n else {\n this.frameIndex(0);\n }\n }\n}\nSprite.prototype.className = 'Sprite';\n_registerNode(Sprite);\nFactory.addGetterSetter(Sprite, 'animation');\nFactory.addGetterSetter(Sprite, 'animations');\nFactory.addGetterSetter(Sprite, 'frameOffsets');\nFactory.addGetterSetter(Sprite, 'image');\nFactory.addGetterSetter(Sprite, 'frameIndex', 0, getNumberValidator());\nFactory.addGetterSetter(Sprite, 'frameRate', 17, getNumberValidator());\nFactory.backCompat(Sprite, {\n index: 'frameIndex',\n getIndex: 'getFrameIndex',\n setIndex: 'setFrameIndex',\n});\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { getNumberValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nexport class Star extends Shape {\n _sceneFunc(context) {\n var innerRadius = this.innerRadius(), outerRadius = this.outerRadius(), numPoints = this.numPoints();\n context.beginPath();\n context.moveTo(0, 0 - outerRadius);\n for (var n = 1; n < numPoints * 2; n++) {\n var radius = n % 2 === 0 ? outerRadius : innerRadius;\n var x = radius * Math.sin((n * Math.PI) / numPoints);\n var y = -1 * radius * Math.cos((n * Math.PI) / numPoints);\n context.lineTo(x, y);\n }\n context.closePath();\n context.fillStrokeShape(this);\n }\n getWidth() {\n return this.outerRadius() * 2;\n }\n getHeight() {\n return this.outerRadius() * 2;\n }\n setWidth(width) {\n this.outerRadius(width / 2);\n }\n setHeight(height) {\n this.outerRadius(height / 2);\n }\n}\nStar.prototype.className = 'Star';\nStar.prototype._centroid = true;\nStar.prototype._attrsAffectingSize = ['innerRadius', 'outerRadius'];\n_registerNode(Star);\nFactory.addGetterSetter(Star, 'numPoints', 5, getNumberValidator());\nFactory.addGetterSetter(Star, 'innerRadius', 0, getNumberValidator());\nFactory.addGetterSetter(Star, 'outerRadius', 0, getNumberValidator());\n","import { Util } from '../Util.js';\nimport { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { getNumberValidator, getStringValidator, getNumberOrAutoValidator, getBooleanValidator, } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nexport function stringToArray(string) {\n return Array.from(string);\n}\nvar AUTO = 'auto', CENTER = 'center', JUSTIFY = 'justify', CHANGE_KONVA = 'Change.konva', CONTEXT_2D = '2d', DASH = '-', LEFT = 'left', TEXT = 'text', TEXT_UPPER = 'Text', TOP = 'top', BOTTOM = 'bottom', MIDDLE = 'middle', NORMAL = 'normal', PX_SPACE = 'px ', SPACE = ' ', RIGHT = 'right', WORD = 'word', CHAR = 'char', NONE = 'none', ELLIPSIS = '…', ATTR_CHANGE_LIST = [\n 'fontFamily',\n 'fontSize',\n 'fontStyle',\n 'fontVariant',\n 'padding',\n 'align',\n 'verticalAlign',\n 'lineHeight',\n 'text',\n 'width',\n 'height',\n 'wrap',\n 'ellipsis',\n 'letterSpacing',\n], attrChangeListLen = ATTR_CHANGE_LIST.length;\nfunction normalizeFontFamily(fontFamily) {\n return fontFamily\n .split(',')\n .map((family) => {\n family = family.trim();\n const hasSpace = family.indexOf(' ') >= 0;\n const hasQuotes = family.indexOf('\"') >= 0 || family.indexOf(\"'\") >= 0;\n if (hasSpace && !hasQuotes) {\n family = `\"${family}\"`;\n }\n return family;\n })\n .join(', ');\n}\nvar dummyContext;\nfunction getDummyContext() {\n if (dummyContext) {\n return dummyContext;\n }\n dummyContext = Util.createCanvasElement().getContext(CONTEXT_2D);\n return dummyContext;\n}\nfunction _fillFunc(context) {\n context.fillText(this._partialText, this._partialTextX, this._partialTextY);\n}\nfunction _strokeFunc(context) {\n context.strokeText(this._partialText, this._partialTextX, this._partialTextY);\n}\nfunction checkDefaultFill(config) {\n config = config || {};\n if (!config.fillLinearGradientColorStops &&\n !config.fillRadialGradientColorStops &&\n !config.fillPatternImage) {\n config.fill = config.fill || 'black';\n }\n return config;\n}\nexport class Text extends Shape {\n constructor(config) {\n super(checkDefaultFill(config));\n this._partialTextX = 0;\n this._partialTextY = 0;\n for (var n = 0; n < attrChangeListLen; n++) {\n this.on(ATTR_CHANGE_LIST[n] + CHANGE_KONVA, this._setTextData);\n }\n this._setTextData();\n }\n _sceneFunc(context) {\n var textArr = this.textArr, textArrLen = textArr.length;\n if (!this.text()) {\n return;\n }\n var padding = this.padding(), fontSize = this.fontSize(), lineHeightPx = this.lineHeight() * fontSize, verticalAlign = this.verticalAlign(), alignY = 0, align = this.align(), totalWidth = this.getWidth(), letterSpacing = this.letterSpacing(), fill = this.fill(), textDecoration = this.textDecoration(), shouldUnderline = textDecoration.indexOf('underline') !== -1, shouldLineThrough = textDecoration.indexOf('line-through') !== -1, n;\n var translateY = 0;\n var translateY = lineHeightPx / 2;\n var lineTranslateX = 0;\n var lineTranslateY = 0;\n context.setAttr('font', this._getContextFont());\n context.setAttr('textBaseline', MIDDLE);\n context.setAttr('textAlign', LEFT);\n if (verticalAlign === MIDDLE) {\n alignY = (this.getHeight() - textArrLen * lineHeightPx - padding * 2) / 2;\n }\n else if (verticalAlign === BOTTOM) {\n alignY = this.getHeight() - textArrLen * lineHeightPx - padding * 2;\n }\n context.translate(padding, alignY + padding);\n for (n = 0; n < textArrLen; n++) {\n var lineTranslateX = 0;\n var lineTranslateY = 0;\n var obj = textArr[n], text = obj.text, width = obj.width, lastLine = obj.lastInParagraph, spacesNumber, oneWord, lineWidth;\n context.save();\n if (align === RIGHT) {\n lineTranslateX += totalWidth - width - padding * 2;\n }\n else if (align === CENTER) {\n lineTranslateX += (totalWidth - width - padding * 2) / 2;\n }\n if (shouldUnderline) {\n context.save();\n context.beginPath();\n context.moveTo(lineTranslateX, translateY + lineTranslateY + Math.round(fontSize / 2));\n spacesNumber = text.split(' ').length - 1;\n oneWord = spacesNumber === 0;\n lineWidth =\n align === JUSTIFY && !lastLine ? totalWidth - padding * 2 : width;\n context.lineTo(lineTranslateX + Math.round(lineWidth), translateY + lineTranslateY + Math.round(fontSize / 2));\n context.lineWidth = fontSize / 15;\n const gradient = this._getLinearGradient();\n context.strokeStyle = gradient || fill;\n context.stroke();\n context.restore();\n }\n if (shouldLineThrough) {\n context.save();\n context.beginPath();\n context.moveTo(lineTranslateX, translateY + lineTranslateY);\n spacesNumber = text.split(' ').length - 1;\n oneWord = spacesNumber === 0;\n lineWidth =\n align === JUSTIFY && lastLine && !oneWord\n ? totalWidth - padding * 2\n : width;\n context.lineTo(lineTranslateX + Math.round(lineWidth), translateY + lineTranslateY);\n context.lineWidth = fontSize / 15;\n const gradient = this._getLinearGradient();\n context.strokeStyle = gradient || fill;\n context.stroke();\n context.restore();\n }\n if (letterSpacing !== 0 || align === JUSTIFY) {\n spacesNumber = text.split(' ').length - 1;\n var array = stringToArray(text);\n for (var li = 0; li < array.length; li++) {\n var letter = array[li];\n if (letter === ' ' && !lastLine && align === JUSTIFY) {\n lineTranslateX += (totalWidth - padding * 2 - width) / spacesNumber;\n }\n this._partialTextX = lineTranslateX;\n this._partialTextY = translateY + lineTranslateY;\n this._partialText = letter;\n context.fillStrokeShape(this);\n lineTranslateX += this.measureSize(letter).width + letterSpacing;\n }\n }\n else {\n this._partialTextX = lineTranslateX;\n this._partialTextY = translateY + lineTranslateY;\n this._partialText = text;\n context.fillStrokeShape(this);\n }\n context.restore();\n if (textArrLen > 1) {\n translateY += lineHeightPx;\n }\n }\n }\n _hitFunc(context) {\n var width = this.getWidth(), height = this.getHeight();\n context.beginPath();\n context.rect(0, 0, width, height);\n context.closePath();\n context.fillStrokeShape(this);\n }\n setText(text) {\n var str = Util._isString(text)\n ? text\n : text === null || text === undefined\n ? ''\n : text + '';\n this._setAttr(TEXT, str);\n return this;\n }\n getWidth() {\n var isAuto = this.attrs.width === AUTO || this.attrs.width === undefined;\n return isAuto ? this.getTextWidth() + this.padding() * 2 : this.attrs.width;\n }\n getHeight() {\n var isAuto = this.attrs.height === AUTO || this.attrs.height === undefined;\n return isAuto\n ? this.fontSize() * this.textArr.length * this.lineHeight() +\n this.padding() * 2\n : this.attrs.height;\n }\n getTextWidth() {\n return this.textWidth;\n }\n getTextHeight() {\n Util.warn('text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height.');\n return this.textHeight;\n }\n measureSize(text) {\n var _context = getDummyContext(), fontSize = this.fontSize(), metrics;\n _context.save();\n _context.font = this._getContextFont();\n metrics = _context.measureText(text);\n _context.restore();\n return {\n width: metrics.width,\n height: fontSize,\n };\n }\n _getContextFont() {\n return (this.fontStyle() +\n SPACE +\n this.fontVariant() +\n SPACE +\n (this.fontSize() + PX_SPACE) +\n normalizeFontFamily(this.fontFamily()));\n }\n _addTextLine(line) {\n const align = this.align();\n if (align === JUSTIFY) {\n line = line.trim();\n }\n var width = this._getTextWidth(line);\n return this.textArr.push({\n text: line,\n width: width,\n lastInParagraph: false,\n });\n }\n _getTextWidth(text) {\n var letterSpacing = this.letterSpacing();\n var length = text.length;\n return (getDummyContext().measureText(text).width +\n (length ? letterSpacing * (length - 1) : 0));\n }\n _setTextData() {\n var lines = this.text().split('\\n'), fontSize = +this.fontSize(), textWidth = 0, lineHeightPx = this.lineHeight() * fontSize, width = this.attrs.width, height = this.attrs.height, fixedWidth = width !== AUTO && width !== undefined, fixedHeight = height !== AUTO && height !== undefined, padding = this.padding(), maxWidth = width - padding * 2, maxHeightPx = height - padding * 2, currentHeightPx = 0, wrap = this.wrap(), shouldWrap = wrap !== NONE, wrapAtWord = wrap !== CHAR && shouldWrap, shouldAddEllipsis = this.ellipsis();\n this.textArr = [];\n getDummyContext().font = this._getContextFont();\n var additionalWidth = shouldAddEllipsis ? this._getTextWidth(ELLIPSIS) : 0;\n for (var i = 0, max = lines.length; i < max; ++i) {\n var line = lines[i];\n var lineWidth = this._getTextWidth(line);\n if (fixedWidth && lineWidth > maxWidth) {\n while (line.length > 0) {\n var low = 0, high = line.length, match = '', matchWidth = 0;\n while (low < high) {\n var mid = (low + high) >>> 1, substr = line.slice(0, mid + 1), substrWidth = this._getTextWidth(substr) + additionalWidth;\n if (substrWidth <= maxWidth) {\n low = mid + 1;\n match = substr;\n matchWidth = substrWidth;\n }\n else {\n high = mid;\n }\n }\n if (match) {\n if (wrapAtWord) {\n var wrapIndex;\n var nextChar = line[match.length];\n var nextIsSpaceOrDash = nextChar === SPACE || nextChar === DASH;\n if (nextIsSpaceOrDash && matchWidth <= maxWidth) {\n wrapIndex = match.length;\n }\n else {\n wrapIndex =\n Math.max(match.lastIndexOf(SPACE), match.lastIndexOf(DASH)) +\n 1;\n }\n if (wrapIndex > 0) {\n low = wrapIndex;\n match = match.slice(0, low);\n matchWidth = this._getTextWidth(match);\n }\n }\n match = match.trimRight();\n this._addTextLine(match);\n textWidth = Math.max(textWidth, matchWidth);\n currentHeightPx += lineHeightPx;\n var shouldHandleEllipsis = this._shouldHandleEllipsis(currentHeightPx);\n if (shouldHandleEllipsis) {\n this._tryToAddEllipsisToLastLine();\n break;\n }\n line = line.slice(low);\n line = line.trimLeft();\n if (line.length > 0) {\n lineWidth = this._getTextWidth(line);\n if (lineWidth <= maxWidth) {\n this._addTextLine(line);\n currentHeightPx += lineHeightPx;\n textWidth = Math.max(textWidth, lineWidth);\n break;\n }\n }\n }\n else {\n break;\n }\n }\n }\n else {\n this._addTextLine(line);\n currentHeightPx += lineHeightPx;\n textWidth = Math.max(textWidth, lineWidth);\n if (this._shouldHandleEllipsis(currentHeightPx) && i < max - 1) {\n this._tryToAddEllipsisToLastLine();\n }\n }\n if (this.textArr[this.textArr.length - 1]) {\n this.textArr[this.textArr.length - 1].lastInParagraph = true;\n }\n if (fixedHeight && currentHeightPx + lineHeightPx > maxHeightPx) {\n break;\n }\n }\n this.textHeight = fontSize;\n this.textWidth = textWidth;\n }\n _shouldHandleEllipsis(currentHeightPx) {\n var fontSize = +this.fontSize(), lineHeightPx = this.lineHeight() * fontSize, height = this.attrs.height, fixedHeight = height !== AUTO && height !== undefined, padding = this.padding(), maxHeightPx = height - padding * 2, wrap = this.wrap(), shouldWrap = wrap !== NONE;\n return (!shouldWrap ||\n (fixedHeight && currentHeightPx + lineHeightPx > maxHeightPx));\n }\n _tryToAddEllipsisToLastLine() {\n var width = this.attrs.width, fixedWidth = width !== AUTO && width !== undefined, padding = this.padding(), maxWidth = width - padding * 2, shouldAddEllipsis = this.ellipsis();\n var lastLine = this.textArr[this.textArr.length - 1];\n if (!lastLine || !shouldAddEllipsis) {\n return;\n }\n if (fixedWidth) {\n var haveSpace = this._getTextWidth(lastLine.text + ELLIPSIS) < maxWidth;\n if (!haveSpace) {\n lastLine.text = lastLine.text.slice(0, lastLine.text.length - 3);\n }\n }\n this.textArr.splice(this.textArr.length - 1, 1);\n this._addTextLine(lastLine.text + ELLIPSIS);\n }\n getStrokeScaleEnabled() {\n return true;\n }\n}\nText.prototype._fillFunc = _fillFunc;\nText.prototype._strokeFunc = _strokeFunc;\nText.prototype.className = TEXT_UPPER;\nText.prototype._attrsAffectingSize = [\n 'text',\n 'fontSize',\n 'padding',\n 'wrap',\n 'lineHeight',\n 'letterSpacing',\n];\n_registerNode(Text);\nFactory.overWriteSetter(Text, 'width', getNumberOrAutoValidator());\nFactory.overWriteSetter(Text, 'height', getNumberOrAutoValidator());\nFactory.addGetterSetter(Text, 'fontFamily', 'Arial');\nFactory.addGetterSetter(Text, 'fontSize', 12, getNumberValidator());\nFactory.addGetterSetter(Text, 'fontStyle', NORMAL);\nFactory.addGetterSetter(Text, 'fontVariant', NORMAL);\nFactory.addGetterSetter(Text, 'padding', 0, getNumberValidator());\nFactory.addGetterSetter(Text, 'align', LEFT);\nFactory.addGetterSetter(Text, 'verticalAlign', TOP);\nFactory.addGetterSetter(Text, 'lineHeight', 1, getNumberValidator());\nFactory.addGetterSetter(Text, 'wrap', WORD);\nFactory.addGetterSetter(Text, 'ellipsis', false, getBooleanValidator());\nFactory.addGetterSetter(Text, 'letterSpacing', 0, getNumberValidator());\nFactory.addGetterSetter(Text, 'text', '', getStringValidator());\nFactory.addGetterSetter(Text, 'textDecoration', '');\n","import { Util } from '../Util.js';\nimport { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { Path } from './Path.js';\nimport { Text, stringToArray } from './Text.js';\nimport { getNumberValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nvar EMPTY_STRING = '', NORMAL = 'normal';\nfunction _fillFunc(context) {\n context.fillText(this.partialText, 0, 0);\n}\nfunction _strokeFunc(context) {\n context.strokeText(this.partialText, 0, 0);\n}\nexport class TextPath extends Shape {\n constructor(config) {\n super(config);\n this.dummyCanvas = Util.createCanvasElement();\n this.dataArray = [];\n this.dataArray = Path.parsePathData(this.attrs.data);\n this.on('dataChange.konva', function () {\n this.dataArray = Path.parsePathData(this.attrs.data);\n this._setTextData();\n });\n this.on('textChange.konva alignChange.konva letterSpacingChange.konva kerningFuncChange.konva fontSizeChange.konva fontFamilyChange.konva', this._setTextData);\n this._setTextData();\n }\n _sceneFunc(context) {\n context.setAttr('font', this._getContextFont());\n context.setAttr('textBaseline', this.textBaseline());\n context.setAttr('textAlign', 'left');\n context.save();\n var textDecoration = this.textDecoration();\n var fill = this.fill();\n var fontSize = this.fontSize();\n var glyphInfo = this.glyphInfo;\n if (textDecoration === 'underline') {\n context.beginPath();\n }\n for (var i = 0; i < glyphInfo.length; i++) {\n context.save();\n var p0 = glyphInfo[i].p0;\n context.translate(p0.x, p0.y);\n context.rotate(glyphInfo[i].rotation);\n this.partialText = glyphInfo[i].text;\n context.fillStrokeShape(this);\n if (textDecoration === 'underline') {\n if (i === 0) {\n context.moveTo(0, fontSize / 2 + 1);\n }\n context.lineTo(fontSize, fontSize / 2 + 1);\n }\n context.restore();\n }\n if (textDecoration === 'underline') {\n context.strokeStyle = fill;\n context.lineWidth = fontSize / 20;\n context.stroke();\n }\n context.restore();\n }\n _hitFunc(context) {\n context.beginPath();\n var glyphInfo = this.glyphInfo;\n if (glyphInfo.length >= 1) {\n var p0 = glyphInfo[0].p0;\n context.moveTo(p0.x, p0.y);\n }\n for (var i = 0; i < glyphInfo.length; i++) {\n var p1 = glyphInfo[i].p1;\n context.lineTo(p1.x, p1.y);\n }\n context.setAttr('lineWidth', this.fontSize());\n context.setAttr('strokeStyle', this.colorKey);\n context.stroke();\n }\n getTextWidth() {\n return this.textWidth;\n }\n getTextHeight() {\n Util.warn('text.getTextHeight() method is deprecated. Use text.height() - for full height and text.fontSize() - for one line height.');\n return this.textHeight;\n }\n setText(text) {\n return Text.prototype.setText.call(this, text);\n }\n _getContextFont() {\n return Text.prototype._getContextFont.call(this);\n }\n _getTextSize(text) {\n var dummyCanvas = this.dummyCanvas;\n var _context = dummyCanvas.getContext('2d');\n _context.save();\n _context.font = this._getContextFont();\n var metrics = _context.measureText(text);\n _context.restore();\n return {\n width: metrics.width,\n height: parseInt(this.attrs.fontSize, 10),\n };\n }\n _setTextData() {\n var that = this;\n var size = this._getTextSize(this.attrs.text);\n var letterSpacing = this.letterSpacing();\n var align = this.align();\n var kerningFunc = this.kerningFunc();\n this.textWidth = size.width;\n this.textHeight = size.height;\n var textFullWidth = Math.max(this.textWidth + ((this.attrs.text || '').length - 1) * letterSpacing, 0);\n this.glyphInfo = [];\n var fullPathWidth = 0;\n for (var l = 0; l < that.dataArray.length; l++) {\n if (that.dataArray[l].pathLength > 0) {\n fullPathWidth += that.dataArray[l].pathLength;\n }\n }\n var offset = 0;\n if (align === 'center') {\n offset = Math.max(0, fullPathWidth / 2 - textFullWidth / 2);\n }\n if (align === 'right') {\n offset = Math.max(0, fullPathWidth - textFullWidth);\n }\n var charArr = stringToArray(this.text());\n var spacesNumber = this.text().split(' ').length - 1;\n var p0, p1, pathCmd;\n var pIndex = -1;\n var currentT = 0;\n var getNextPathSegment = function () {\n currentT = 0;\n var pathData = that.dataArray;\n for (var j = pIndex + 1; j < pathData.length; j++) {\n if (pathData[j].pathLength > 0) {\n pIndex = j;\n return pathData[j];\n }\n else if (pathData[j].command === 'M') {\n p0 = {\n x: pathData[j].points[0],\n y: pathData[j].points[1],\n };\n }\n }\n return {};\n };\n var findSegmentToFitCharacter = function (c) {\n var glyphWidth = that._getTextSize(c).width + letterSpacing;\n if (c === ' ' && align === 'justify') {\n glyphWidth += (fullPathWidth - textFullWidth) / spacesNumber;\n }\n var currLen = 0;\n var attempts = 0;\n p1 = undefined;\n while (Math.abs(glyphWidth - currLen) / glyphWidth > 0.01 &&\n attempts < 20) {\n attempts++;\n var cumulativePathLength = currLen;\n while (pathCmd === undefined) {\n pathCmd = getNextPathSegment();\n if (pathCmd &&\n cumulativePathLength + pathCmd.pathLength < glyphWidth) {\n cumulativePathLength += pathCmd.pathLength;\n pathCmd = undefined;\n }\n }\n if (Object.keys(pathCmd).length === 0 || p0 === undefined) {\n return undefined;\n }\n var needNewSegment = false;\n switch (pathCmd.command) {\n case 'L':\n if (Path.getLineLength(p0.x, p0.y, pathCmd.points[0], pathCmd.points[1]) > glyphWidth) {\n p1 = Path.getPointOnLine(glyphWidth, p0.x, p0.y, pathCmd.points[0], pathCmd.points[1], p0.x, p0.y);\n }\n else {\n pathCmd = undefined;\n }\n break;\n case 'A':\n var start = pathCmd.points[4];\n var dTheta = pathCmd.points[5];\n var end = pathCmd.points[4] + dTheta;\n if (currentT === 0) {\n currentT = start + 0.00000001;\n }\n else if (glyphWidth > currLen) {\n currentT += ((Math.PI / 180.0) * dTheta) / Math.abs(dTheta);\n }\n else {\n currentT -= ((Math.PI / 360.0) * dTheta) / Math.abs(dTheta);\n }\n if ((dTheta < 0 && currentT < end) ||\n (dTheta >= 0 && currentT > end)) {\n currentT = end;\n needNewSegment = true;\n }\n p1 = Path.getPointOnEllipticalArc(pathCmd.points[0], pathCmd.points[1], pathCmd.points[2], pathCmd.points[3], currentT, pathCmd.points[6]);\n break;\n case 'C':\n if (currentT === 0) {\n if (glyphWidth > pathCmd.pathLength) {\n currentT = 0.00000001;\n }\n else {\n currentT = glyphWidth / pathCmd.pathLength;\n }\n }\n else if (glyphWidth > currLen) {\n currentT += (glyphWidth - currLen) / pathCmd.pathLength / 2;\n }\n else {\n currentT = Math.max(currentT - (currLen - glyphWidth) / pathCmd.pathLength / 2, 0);\n }\n if (currentT > 1.0) {\n currentT = 1.0;\n needNewSegment = true;\n }\n p1 = Path.getPointOnCubicBezier(currentT, pathCmd.start.x, pathCmd.start.y, pathCmd.points[0], pathCmd.points[1], pathCmd.points[2], pathCmd.points[3], pathCmd.points[4], pathCmd.points[5]);\n break;\n case 'Q':\n if (currentT === 0) {\n currentT = glyphWidth / pathCmd.pathLength;\n }\n else if (glyphWidth > currLen) {\n currentT += (glyphWidth - currLen) / pathCmd.pathLength;\n }\n else {\n currentT -= (currLen - glyphWidth) / pathCmd.pathLength;\n }\n if (currentT > 1.0) {\n currentT = 1.0;\n needNewSegment = true;\n }\n p1 = Path.getPointOnQuadraticBezier(currentT, pathCmd.start.x, pathCmd.start.y, pathCmd.points[0], pathCmd.points[1], pathCmd.points[2], pathCmd.points[3]);\n break;\n }\n if (p1 !== undefined) {\n currLen = Path.getLineLength(p0.x, p0.y, p1.x, p1.y);\n }\n if (needNewSegment) {\n needNewSegment = false;\n pathCmd = undefined;\n }\n }\n };\n var testChar = 'C';\n var glyphWidth = that._getTextSize(testChar).width + letterSpacing;\n var lettersInOffset = offset / glyphWidth - 1;\n for (var k = 0; k < lettersInOffset; k++) {\n findSegmentToFitCharacter(testChar);\n if (p0 === undefined || p1 === undefined) {\n break;\n }\n p0 = p1;\n }\n for (var i = 0; i < charArr.length; i++) {\n findSegmentToFitCharacter(charArr[i]);\n if (p0 === undefined || p1 === undefined) {\n break;\n }\n var width = Path.getLineLength(p0.x, p0.y, p1.x, p1.y);\n var kern = 0;\n if (kerningFunc) {\n try {\n kern = kerningFunc(charArr[i - 1], charArr[i]) * this.fontSize();\n }\n catch (e) {\n kern = 0;\n }\n }\n p0.x += kern;\n p1.x += kern;\n this.textWidth += kern;\n var midpoint = Path.getPointOnLine(kern + width / 2.0, p0.x, p0.y, p1.x, p1.y);\n var rotation = Math.atan2(p1.y - p0.y, p1.x - p0.x);\n this.glyphInfo.push({\n transposeX: midpoint.x,\n transposeY: midpoint.y,\n text: charArr[i],\n rotation: rotation,\n p0: p0,\n p1: p1,\n });\n p0 = p1;\n }\n }\n getSelfRect() {\n if (!this.glyphInfo.length) {\n return {\n x: 0,\n y: 0,\n width: 0,\n height: 0,\n };\n }\n var points = [];\n this.glyphInfo.forEach(function (info) {\n points.push(info.p0.x);\n points.push(info.p0.y);\n points.push(info.p1.x);\n points.push(info.p1.y);\n });\n var minX = points[0] || 0;\n var maxX = points[0] || 0;\n var minY = points[1] || 0;\n var maxY = points[1] || 0;\n var x, y;\n for (var i = 0; i < points.length / 2; i++) {\n x = points[i * 2];\n y = points[i * 2 + 1];\n minX = Math.min(minX, x);\n maxX = Math.max(maxX, x);\n minY = Math.min(minY, y);\n maxY = Math.max(maxY, y);\n }\n var fontSize = this.fontSize();\n return {\n x: minX - fontSize / 2,\n y: minY - fontSize / 2,\n width: maxX - minX + fontSize,\n height: maxY - minY + fontSize,\n };\n }\n destroy() {\n Util.releaseCanvas(this.dummyCanvas);\n return super.destroy();\n }\n}\nTextPath.prototype._fillFunc = _fillFunc;\nTextPath.prototype._strokeFunc = _strokeFunc;\nTextPath.prototype._fillFuncHit = _fillFunc;\nTextPath.prototype._strokeFuncHit = _strokeFunc;\nTextPath.prototype.className = 'TextPath';\nTextPath.prototype._attrsAffectingSize = ['text', 'fontSize', 'data'];\n_registerNode(TextPath);\nFactory.addGetterSetter(TextPath, 'data');\nFactory.addGetterSetter(TextPath, 'fontFamily', 'Arial');\nFactory.addGetterSetter(TextPath, 'fontSize', 12, getNumberValidator());\nFactory.addGetterSetter(TextPath, 'fontStyle', NORMAL);\nFactory.addGetterSetter(TextPath, 'align', 'left');\nFactory.addGetterSetter(TextPath, 'letterSpacing', 0, getNumberValidator());\nFactory.addGetterSetter(TextPath, 'textBaseline', 'middle');\nFactory.addGetterSetter(TextPath, 'fontVariant', NORMAL);\nFactory.addGetterSetter(TextPath, 'text', EMPTY_STRING);\nFactory.addGetterSetter(TextPath, 'textDecoration', null);\nFactory.addGetterSetter(TextPath, 'kerningFunc', null);\n","import { Util, Transform } from '../Util.js';\nimport { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { Shape } from '../Shape.js';\nimport { Rect } from './Rect.js';\nimport { Group } from '../Group.js';\nimport { Konva } from '../Global.js';\nimport { getBooleanValidator, getNumberValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nvar EVENTS_NAME = 'tr-konva';\nvar ATTR_CHANGE_LIST = [\n 'resizeEnabledChange',\n 'rotateAnchorOffsetChange',\n 'rotateEnabledChange',\n 'enabledAnchorsChange',\n 'anchorSizeChange',\n 'borderEnabledChange',\n 'borderStrokeChange',\n 'borderStrokeWidthChange',\n 'borderDashChange',\n 'anchorStrokeChange',\n 'anchorStrokeWidthChange',\n 'anchorFillChange',\n 'anchorCornerRadiusChange',\n 'ignoreStrokeChange',\n]\n .map((e) => e + `.${EVENTS_NAME}`)\n .join(' ');\nvar NODES_RECT = 'nodesRect';\nvar TRANSFORM_CHANGE_STR = [\n 'widthChange',\n 'heightChange',\n 'scaleXChange',\n 'scaleYChange',\n 'skewXChange',\n 'skewYChange',\n 'rotationChange',\n 'offsetXChange',\n 'offsetYChange',\n 'transformsEnabledChange',\n 'strokeWidthChange',\n];\nvar ANGLES = {\n 'top-left': -45,\n 'top-center': 0,\n 'top-right': 45,\n 'middle-right': -90,\n 'middle-left': 90,\n 'bottom-left': -135,\n 'bottom-center': 180,\n 'bottom-right': 135,\n};\nconst TOUCH_DEVICE = 'ontouchstart' in Konva._global;\nfunction getCursor(anchorName, rad) {\n if (anchorName === 'rotater') {\n return 'crosshair';\n }\n rad += Util.degToRad(ANGLES[anchorName] || 0);\n var angle = ((Util.radToDeg(rad) % 360) + 360) % 360;\n if (Util._inRange(angle, 315 + 22.5, 360) || Util._inRange(angle, 0, 22.5)) {\n return 'ns-resize';\n }\n else if (Util._inRange(angle, 45 - 22.5, 45 + 22.5)) {\n return 'nesw-resize';\n }\n else if (Util._inRange(angle, 90 - 22.5, 90 + 22.5)) {\n return 'ew-resize';\n }\n else if (Util._inRange(angle, 135 - 22.5, 135 + 22.5)) {\n return 'nwse-resize';\n }\n else if (Util._inRange(angle, 180 - 22.5, 180 + 22.5)) {\n return 'ns-resize';\n }\n else if (Util._inRange(angle, 225 - 22.5, 225 + 22.5)) {\n return 'nesw-resize';\n }\n else if (Util._inRange(angle, 270 - 22.5, 270 + 22.5)) {\n return 'ew-resize';\n }\n else if (Util._inRange(angle, 315 - 22.5, 315 + 22.5)) {\n return 'nwse-resize';\n }\n else {\n Util.error('Transformer has unknown angle for cursor detection: ' + angle);\n return 'pointer';\n }\n}\nvar ANCHORS_NAMES = [\n 'top-left',\n 'top-center',\n 'top-right',\n 'middle-right',\n 'middle-left',\n 'bottom-left',\n 'bottom-center',\n 'bottom-right',\n];\nvar MAX_SAFE_INTEGER = 100000000;\nfunction getCenter(shape) {\n return {\n x: shape.x +\n (shape.width / 2) * Math.cos(shape.rotation) +\n (shape.height / 2) * Math.sin(-shape.rotation),\n y: shape.y +\n (shape.height / 2) * Math.cos(shape.rotation) +\n (shape.width / 2) * Math.sin(shape.rotation),\n };\n}\nfunction rotateAroundPoint(shape, angleRad, point) {\n const x = point.x +\n (shape.x - point.x) * Math.cos(angleRad) -\n (shape.y - point.y) * Math.sin(angleRad);\n const y = point.y +\n (shape.x - point.x) * Math.sin(angleRad) +\n (shape.y - point.y) * Math.cos(angleRad);\n return Object.assign(Object.assign({}, shape), { rotation: shape.rotation + angleRad, x,\n y });\n}\nfunction rotateAroundCenter(shape, deltaRad) {\n const center = getCenter(shape);\n return rotateAroundPoint(shape, deltaRad, center);\n}\nfunction getSnap(snaps, newRotationRad, tol) {\n let snapped = newRotationRad;\n for (let i = 0; i < snaps.length; i++) {\n const angle = Konva.getAngle(snaps[i]);\n const absDiff = Math.abs(angle - newRotationRad) % (Math.PI * 2);\n const dif = Math.min(absDiff, Math.PI * 2 - absDiff);\n if (dif < tol) {\n snapped = angle;\n }\n }\n return snapped;\n}\nexport class Transformer extends Group {\n constructor(config) {\n super(config);\n this._transforming = false;\n this._createElements();\n this._handleMouseMove = this._handleMouseMove.bind(this);\n this._handleMouseUp = this._handleMouseUp.bind(this);\n this.update = this.update.bind(this);\n this.on(ATTR_CHANGE_LIST, this.update);\n if (this.getNode()) {\n this.update();\n }\n }\n attachTo(node) {\n this.setNode(node);\n return this;\n }\n setNode(node) {\n Util.warn('tr.setNode(shape), tr.node(shape) and tr.attachTo(shape) methods are deprecated. Please use tr.nodes(nodesArray) instead.');\n return this.setNodes([node]);\n }\n getNode() {\n return this._nodes && this._nodes[0];\n }\n _getEventNamespace() {\n return EVENTS_NAME + this._id;\n }\n setNodes(nodes = []) {\n if (this._nodes && this._nodes.length) {\n this.detach();\n }\n const filteredNodes = nodes.filter((node) => {\n if (node.isAncestorOf(this)) {\n Util.error('Konva.Transformer cannot be an a child of the node you are trying to attach');\n return false;\n }\n return true;\n });\n this._nodes = nodes = filteredNodes;\n if (nodes.length === 1 && this.useSingleNodeRotation()) {\n this.rotation(nodes[0].getAbsoluteRotation());\n }\n else {\n this.rotation(0);\n }\n this._nodes.forEach((node) => {\n const onChange = () => {\n if (this.nodes().length === 1 && this.useSingleNodeRotation()) {\n this.rotation(this.nodes()[0].getAbsoluteRotation());\n }\n this._resetTransformCache();\n if (!this._transforming && !this.isDragging()) {\n this.update();\n }\n };\n const additionalEvents = node._attrsAffectingSize\n .map((prop) => prop + 'Change.' + this._getEventNamespace())\n .join(' ');\n node.on(additionalEvents, onChange);\n node.on(TRANSFORM_CHANGE_STR.map((e) => e + `.${this._getEventNamespace()}`).join(' '), onChange);\n node.on(`absoluteTransformChange.${this._getEventNamespace()}`, onChange);\n this._proxyDrag(node);\n });\n this._resetTransformCache();\n var elementsCreated = !!this.findOne('.top-left');\n if (elementsCreated) {\n this.update();\n }\n return this;\n }\n _proxyDrag(node) {\n let lastPos;\n node.on(`dragstart.${this._getEventNamespace()}`, (e) => {\n lastPos = node.getAbsolutePosition();\n if (!this.isDragging() && node !== this.findOne('.back')) {\n this.startDrag(e, false);\n }\n });\n node.on(`dragmove.${this._getEventNamespace()}`, (e) => {\n if (!lastPos) {\n return;\n }\n const abs = node.getAbsolutePosition();\n const dx = abs.x - lastPos.x;\n const dy = abs.y - lastPos.y;\n this.nodes().forEach((otherNode) => {\n if (otherNode === node) {\n return;\n }\n if (otherNode.isDragging()) {\n return;\n }\n const otherAbs = otherNode.getAbsolutePosition();\n otherNode.setAbsolutePosition({\n x: otherAbs.x + dx,\n y: otherAbs.y + dy,\n });\n otherNode.startDrag(e);\n });\n lastPos = null;\n });\n }\n getNodes() {\n return this._nodes || [];\n }\n getActiveAnchor() {\n return this._movingAnchorName;\n }\n detach() {\n if (this._nodes) {\n this._nodes.forEach((node) => {\n node.off('.' + this._getEventNamespace());\n });\n }\n this._nodes = [];\n this._resetTransformCache();\n }\n _resetTransformCache() {\n this._clearCache(NODES_RECT);\n this._clearCache('transform');\n this._clearSelfAndDescendantCache('absoluteTransform');\n }\n _getNodeRect() {\n return this._getCache(NODES_RECT, this.__getNodeRect);\n }\n __getNodeShape(node, rot = this.rotation(), relative) {\n var rect = node.getClientRect({\n skipTransform: true,\n skipShadow: true,\n skipStroke: this.ignoreStroke(),\n });\n var absScale = node.getAbsoluteScale(relative);\n var absPos = node.getAbsolutePosition(relative);\n var dx = rect.x * absScale.x - node.offsetX() * absScale.x;\n var dy = rect.y * absScale.y - node.offsetY() * absScale.y;\n const rotation = (Konva.getAngle(node.getAbsoluteRotation()) + Math.PI * 2) %\n (Math.PI * 2);\n const box = {\n x: absPos.x + dx * Math.cos(rotation) + dy * Math.sin(-rotation),\n y: absPos.y + dy * Math.cos(rotation) + dx * Math.sin(rotation),\n width: rect.width * absScale.x,\n height: rect.height * absScale.y,\n rotation: rotation,\n };\n return rotateAroundPoint(box, -Konva.getAngle(rot), {\n x: 0,\n y: 0,\n });\n }\n __getNodeRect() {\n var node = this.getNode();\n if (!node) {\n return {\n x: -MAX_SAFE_INTEGER,\n y: -MAX_SAFE_INTEGER,\n width: 0,\n height: 0,\n rotation: 0,\n };\n }\n const totalPoints = [];\n this.nodes().map((node) => {\n const box = node.getClientRect({\n skipTransform: true,\n skipShadow: true,\n skipStroke: this.ignoreStroke(),\n });\n var points = [\n { x: box.x, y: box.y },\n { x: box.x + box.width, y: box.y },\n { x: box.x + box.width, y: box.y + box.height },\n { x: box.x, y: box.y + box.height },\n ];\n var trans = node.getAbsoluteTransform();\n points.forEach(function (point) {\n var transformed = trans.point(point);\n totalPoints.push(transformed);\n });\n });\n const tr = new Transform();\n tr.rotate(-Konva.getAngle(this.rotation()));\n var minX, minY, maxX, maxY;\n totalPoints.forEach(function (point) {\n var transformed = tr.point(point);\n if (minX === undefined) {\n minX = maxX = transformed.x;\n minY = maxY = transformed.y;\n }\n minX = Math.min(minX, transformed.x);\n minY = Math.min(minY, transformed.y);\n maxX = Math.max(maxX, transformed.x);\n maxY = Math.max(maxY, transformed.y);\n });\n tr.invert();\n const p = tr.point({ x: minX, y: minY });\n return {\n x: p.x,\n y: p.y,\n width: maxX - minX,\n height: maxY - minY,\n rotation: Konva.getAngle(this.rotation()),\n };\n }\n getX() {\n return this._getNodeRect().x;\n }\n getY() {\n return this._getNodeRect().y;\n }\n getWidth() {\n return this._getNodeRect().width;\n }\n getHeight() {\n return this._getNodeRect().height;\n }\n _createElements() {\n this._createBack();\n ANCHORS_NAMES.forEach(function (name) {\n this._createAnchor(name);\n }.bind(this));\n this._createAnchor('rotater');\n }\n _createAnchor(name) {\n var anchor = new Rect({\n stroke: 'rgb(0, 161, 255)',\n fill: 'white',\n strokeWidth: 1,\n name: name + ' _anchor',\n dragDistance: 0,\n draggable: true,\n hitStrokeWidth: TOUCH_DEVICE ? 10 : 'auto',\n });\n var self = this;\n anchor.on('mousedown touchstart', function (e) {\n self._handleMouseDown(e);\n });\n anchor.on('dragstart', (e) => {\n anchor.stopDrag();\n e.cancelBubble = true;\n });\n anchor.on('dragend', (e) => {\n e.cancelBubble = true;\n });\n anchor.on('mouseenter', () => {\n var rad = Konva.getAngle(this.rotation());\n var cursor = getCursor(name, rad);\n anchor.getStage().content &&\n (anchor.getStage().content.style.cursor = cursor);\n this._cursorChange = true;\n });\n anchor.on('mouseout', () => {\n anchor.getStage().content &&\n (anchor.getStage().content.style.cursor = '');\n this._cursorChange = false;\n });\n this.add(anchor);\n }\n _createBack() {\n var back = new Shape({\n name: 'back',\n width: 0,\n height: 0,\n draggable: true,\n sceneFunc(ctx) {\n var tr = this.getParent();\n var padding = tr.padding();\n ctx.beginPath();\n ctx.rect(-padding, -padding, this.width() + padding * 2, this.height() + padding * 2);\n ctx.moveTo(this.width() / 2, -padding);\n if (tr.rotateEnabled()) {\n ctx.lineTo(this.width() / 2, -tr.rotateAnchorOffset() * Util._sign(this.height()) - padding);\n }\n ctx.fillStrokeShape(this);\n },\n hitFunc: (ctx, shape) => {\n if (!this.shouldOverdrawWholeArea()) {\n return;\n }\n var padding = this.padding();\n ctx.beginPath();\n ctx.rect(-padding, -padding, shape.width() + padding * 2, shape.height() + padding * 2);\n ctx.fillStrokeShape(shape);\n },\n });\n this.add(back);\n this._proxyDrag(back);\n back.on('dragstart', (e) => {\n e.cancelBubble = true;\n });\n back.on('dragmove', (e) => {\n e.cancelBubble = true;\n });\n back.on('dragend', (e) => {\n e.cancelBubble = true;\n });\n this.on('dragmove', (e) => {\n this.update();\n });\n }\n _handleMouseDown(e) {\n this._movingAnchorName = e.target.name().split(' ')[0];\n var attrs = this._getNodeRect();\n var width = attrs.width;\n var height = attrs.height;\n var hypotenuse = Math.sqrt(Math.pow(width, 2) + Math.pow(height, 2));\n this.sin = Math.abs(height / hypotenuse);\n this.cos = Math.abs(width / hypotenuse);\n if (typeof window !== 'undefined') {\n window.addEventListener('mousemove', this._handleMouseMove);\n window.addEventListener('touchmove', this._handleMouseMove);\n window.addEventListener('mouseup', this._handleMouseUp, true);\n window.addEventListener('touchend', this._handleMouseUp, true);\n }\n this._transforming = true;\n var ap = e.target.getAbsolutePosition();\n var pos = e.target.getStage().getPointerPosition();\n this._anchorDragOffset = {\n x: pos.x - ap.x,\n y: pos.y - ap.y,\n };\n this._fire('transformstart', { evt: e.evt, target: this.getNode() });\n this._nodes.forEach((target) => {\n target._fire('transformstart', { evt: e.evt, target });\n });\n }\n _handleMouseMove(e) {\n var x, y, newHypotenuse;\n var anchorNode = this.findOne('.' + this._movingAnchorName);\n var stage = anchorNode.getStage();\n stage.setPointersPositions(e);\n const pp = stage.getPointerPosition();\n let newNodePos = {\n x: pp.x - this._anchorDragOffset.x,\n y: pp.y - this._anchorDragOffset.y,\n };\n const oldAbs = anchorNode.getAbsolutePosition();\n if (this.anchorDragBoundFunc()) {\n newNodePos = this.anchorDragBoundFunc()(oldAbs, newNodePos, e);\n }\n anchorNode.setAbsolutePosition(newNodePos);\n const newAbs = anchorNode.getAbsolutePosition();\n if (oldAbs.x === newAbs.x && oldAbs.y === newAbs.y) {\n return;\n }\n if (this._movingAnchorName === 'rotater') {\n var attrs = this._getNodeRect();\n x = anchorNode.x() - attrs.width / 2;\n y = -anchorNode.y() + attrs.height / 2;\n let delta = Math.atan2(-y, x) + Math.PI / 2;\n if (attrs.height < 0) {\n delta -= Math.PI;\n }\n var oldRotation = Konva.getAngle(this.rotation());\n const newRotation = oldRotation + delta;\n const tol = Konva.getAngle(this.rotationSnapTolerance());\n const snappedRot = getSnap(this.rotationSnaps(), newRotation, tol);\n const diff = snappedRot - attrs.rotation;\n const shape = rotateAroundCenter(attrs, diff);\n this._fitNodesInto(shape, e);\n return;\n }\n var keepProportion = this.keepRatio() || e.shiftKey;\n var centeredScaling = this.centeredScaling() || e.altKey;\n if (this._movingAnchorName === 'top-left') {\n if (keepProportion) {\n var comparePoint = centeredScaling\n ? {\n x: this.width() / 2,\n y: this.height() / 2,\n }\n : {\n x: this.findOne('.bottom-right').x(),\n y: this.findOne('.bottom-right').y(),\n };\n newHypotenuse = Math.sqrt(Math.pow(comparePoint.x - anchorNode.x(), 2) +\n Math.pow(comparePoint.y - anchorNode.y(), 2));\n var reverseX = this.findOne('.top-left').x() > comparePoint.x ? -1 : 1;\n var reverseY = this.findOne('.top-left').y() > comparePoint.y ? -1 : 1;\n x = newHypotenuse * this.cos * reverseX;\n y = newHypotenuse * this.sin * reverseY;\n this.findOne('.top-left').x(comparePoint.x - x);\n this.findOne('.top-left').y(comparePoint.y - y);\n }\n }\n else if (this._movingAnchorName === 'top-center') {\n this.findOne('.top-left').y(anchorNode.y());\n }\n else if (this._movingAnchorName === 'top-right') {\n if (keepProportion) {\n var comparePoint = centeredScaling\n ? {\n x: this.width() / 2,\n y: this.height() / 2,\n }\n : {\n x: this.findOne('.bottom-left').x(),\n y: this.findOne('.bottom-left').y(),\n };\n newHypotenuse = Math.sqrt(Math.pow(anchorNode.x() - comparePoint.x, 2) +\n Math.pow(comparePoint.y - anchorNode.y(), 2));\n var reverseX = this.findOne('.top-right').x() < comparePoint.x ? -1 : 1;\n var reverseY = this.findOne('.top-right').y() > comparePoint.y ? -1 : 1;\n x = newHypotenuse * this.cos * reverseX;\n y = newHypotenuse * this.sin * reverseY;\n this.findOne('.top-right').x(comparePoint.x + x);\n this.findOne('.top-right').y(comparePoint.y - y);\n }\n var pos = anchorNode.position();\n this.findOne('.top-left').y(pos.y);\n this.findOne('.bottom-right').x(pos.x);\n }\n else if (this._movingAnchorName === 'middle-left') {\n this.findOne('.top-left').x(anchorNode.x());\n }\n else if (this._movingAnchorName === 'middle-right') {\n this.findOne('.bottom-right').x(anchorNode.x());\n }\n else if (this._movingAnchorName === 'bottom-left') {\n if (keepProportion) {\n var comparePoint = centeredScaling\n ? {\n x: this.width() / 2,\n y: this.height() / 2,\n }\n : {\n x: this.findOne('.top-right').x(),\n y: this.findOne('.top-right').y(),\n };\n newHypotenuse = Math.sqrt(Math.pow(comparePoint.x - anchorNode.x(), 2) +\n Math.pow(anchorNode.y() - comparePoint.y, 2));\n var reverseX = comparePoint.x < anchorNode.x() ? -1 : 1;\n var reverseY = anchorNode.y() < comparePoint.y ? -1 : 1;\n x = newHypotenuse * this.cos * reverseX;\n y = newHypotenuse * this.sin * reverseY;\n anchorNode.x(comparePoint.x - x);\n anchorNode.y(comparePoint.y + y);\n }\n pos = anchorNode.position();\n this.findOne('.top-left').x(pos.x);\n this.findOne('.bottom-right').y(pos.y);\n }\n else if (this._movingAnchorName === 'bottom-center') {\n this.findOne('.bottom-right').y(anchorNode.y());\n }\n else if (this._movingAnchorName === 'bottom-right') {\n if (keepProportion) {\n var comparePoint = centeredScaling\n ? {\n x: this.width() / 2,\n y: this.height() / 2,\n }\n : {\n x: this.findOne('.top-left').x(),\n y: this.findOne('.top-left').y(),\n };\n newHypotenuse = Math.sqrt(Math.pow(anchorNode.x() - comparePoint.x, 2) +\n Math.pow(anchorNode.y() - comparePoint.y, 2));\n var reverseX = this.findOne('.bottom-right').x() < comparePoint.x ? -1 : 1;\n var reverseY = this.findOne('.bottom-right').y() < comparePoint.y ? -1 : 1;\n x = newHypotenuse * this.cos * reverseX;\n y = newHypotenuse * this.sin * reverseY;\n this.findOne('.bottom-right').x(comparePoint.x + x);\n this.findOne('.bottom-right').y(comparePoint.y + y);\n }\n }\n else {\n console.error(new Error('Wrong position argument of selection resizer: ' +\n this._movingAnchorName));\n }\n var centeredScaling = this.centeredScaling() || e.altKey;\n if (centeredScaling) {\n var topLeft = this.findOne('.top-left');\n var bottomRight = this.findOne('.bottom-right');\n var topOffsetX = topLeft.x();\n var topOffsetY = topLeft.y();\n var bottomOffsetX = this.getWidth() - bottomRight.x();\n var bottomOffsetY = this.getHeight() - bottomRight.y();\n bottomRight.move({\n x: -topOffsetX,\n y: -topOffsetY,\n });\n topLeft.move({\n x: bottomOffsetX,\n y: bottomOffsetY,\n });\n }\n var absPos = this.findOne('.top-left').getAbsolutePosition();\n x = absPos.x;\n y = absPos.y;\n var width = this.findOne('.bottom-right').x() - this.findOne('.top-left').x();\n var height = this.findOne('.bottom-right').y() - this.findOne('.top-left').y();\n this._fitNodesInto({\n x: x,\n y: y,\n width: width,\n height: height,\n rotation: Konva.getAngle(this.rotation()),\n }, e);\n }\n _handleMouseUp(e) {\n this._removeEvents(e);\n }\n getAbsoluteTransform() {\n return this.getTransform();\n }\n _removeEvents(e) {\n if (this._transforming) {\n this._transforming = false;\n if (typeof window !== 'undefined') {\n window.removeEventListener('mousemove', this._handleMouseMove);\n window.removeEventListener('touchmove', this._handleMouseMove);\n window.removeEventListener('mouseup', this._handleMouseUp, true);\n window.removeEventListener('touchend', this._handleMouseUp, true);\n }\n var node = this.getNode();\n this._fire('transformend', { evt: e, target: node });\n if (node) {\n this._nodes.forEach((target) => {\n target._fire('transformend', { evt: e, target });\n });\n }\n this._movingAnchorName = null;\n }\n }\n _fitNodesInto(newAttrs, evt) {\n var oldAttrs = this._getNodeRect();\n const minSize = 1;\n if (Util._inRange(newAttrs.width, -this.padding() * 2 - minSize, minSize)) {\n this.update();\n return;\n }\n if (Util._inRange(newAttrs.height, -this.padding() * 2 - minSize, minSize)) {\n this.update();\n return;\n }\n const allowNegativeScale = this.flipEnabled();\n var t = new Transform();\n t.rotate(Konva.getAngle(this.rotation()));\n if (this._movingAnchorName &&\n newAttrs.width < 0 &&\n this._movingAnchorName.indexOf('left') >= 0) {\n const offset = t.point({\n x: -this.padding() * 2,\n y: 0,\n });\n newAttrs.x += offset.x;\n newAttrs.y += offset.y;\n newAttrs.width += this.padding() * 2;\n this._movingAnchorName = this._movingAnchorName.replace('left', 'right');\n this._anchorDragOffset.x -= offset.x;\n this._anchorDragOffset.y -= offset.y;\n if (!allowNegativeScale) {\n this.update();\n return;\n }\n }\n else if (this._movingAnchorName &&\n newAttrs.width < 0 &&\n this._movingAnchorName.indexOf('right') >= 0) {\n const offset = t.point({\n x: this.padding() * 2,\n y: 0,\n });\n this._movingAnchorName = this._movingAnchorName.replace('right', 'left');\n this._anchorDragOffset.x -= offset.x;\n this._anchorDragOffset.y -= offset.y;\n newAttrs.width += this.padding() * 2;\n if (!allowNegativeScale) {\n this.update();\n return;\n }\n }\n if (this._movingAnchorName &&\n newAttrs.height < 0 &&\n this._movingAnchorName.indexOf('top') >= 0) {\n const offset = t.point({\n x: 0,\n y: -this.padding() * 2,\n });\n newAttrs.x += offset.x;\n newAttrs.y += offset.y;\n this._movingAnchorName = this._movingAnchorName.replace('top', 'bottom');\n this._anchorDragOffset.x -= offset.x;\n this._anchorDragOffset.y -= offset.y;\n newAttrs.height += this.padding() * 2;\n if (!allowNegativeScale) {\n this.update();\n return;\n }\n }\n else if (this._movingAnchorName &&\n newAttrs.height < 0 &&\n this._movingAnchorName.indexOf('bottom') >= 0) {\n const offset = t.point({\n x: 0,\n y: this.padding() * 2,\n });\n this._movingAnchorName = this._movingAnchorName.replace('bottom', 'top');\n this._anchorDragOffset.x -= offset.x;\n this._anchorDragOffset.y -= offset.y;\n newAttrs.height += this.padding() * 2;\n if (!allowNegativeScale) {\n this.update();\n return;\n }\n }\n if (this.boundBoxFunc()) {\n const bounded = this.boundBoxFunc()(oldAttrs, newAttrs);\n if (bounded) {\n newAttrs = bounded;\n }\n else {\n Util.warn('boundBoxFunc returned falsy. You should return new bound rect from it!');\n }\n }\n const baseSize = 10000000;\n const oldTr = new Transform();\n oldTr.translate(oldAttrs.x, oldAttrs.y);\n oldTr.rotate(oldAttrs.rotation);\n oldTr.scale(oldAttrs.width / baseSize, oldAttrs.height / baseSize);\n const newTr = new Transform();\n newTr.translate(newAttrs.x, newAttrs.y);\n newTr.rotate(newAttrs.rotation);\n newTr.scale(newAttrs.width / baseSize, newAttrs.height / baseSize);\n const delta = newTr.multiply(oldTr.invert());\n this._nodes.forEach((node) => {\n var _a;\n const parentTransform = node.getParent().getAbsoluteTransform();\n const localTransform = node.getTransform().copy();\n localTransform.translate(node.offsetX(), node.offsetY());\n const newLocalTransform = new Transform();\n newLocalTransform\n .multiply(parentTransform.copy().invert())\n .multiply(delta)\n .multiply(parentTransform)\n .multiply(localTransform);\n const attrs = newLocalTransform.decompose();\n node.setAttrs(attrs);\n this._fire('transform', { evt: evt, target: node });\n node._fire('transform', { evt: evt, target: node });\n (_a = node.getLayer()) === null || _a === void 0 ? void 0 : _a.batchDraw();\n });\n this.rotation(Util._getRotation(newAttrs.rotation));\n this._resetTransformCache();\n this.update();\n this.getLayer().batchDraw();\n }\n forceUpdate() {\n this._resetTransformCache();\n this.update();\n }\n _batchChangeChild(selector, attrs) {\n const anchor = this.findOne(selector);\n anchor.setAttrs(attrs);\n }\n update() {\n var _a;\n var attrs = this._getNodeRect();\n this.rotation(Util._getRotation(attrs.rotation));\n var width = attrs.width;\n var height = attrs.height;\n var enabledAnchors = this.enabledAnchors();\n var resizeEnabled = this.resizeEnabled();\n var padding = this.padding();\n var anchorSize = this.anchorSize();\n this.find('._anchor').forEach((node) => {\n node.setAttrs({\n width: anchorSize,\n height: anchorSize,\n offsetX: anchorSize / 2,\n offsetY: anchorSize / 2,\n stroke: this.anchorStroke(),\n strokeWidth: this.anchorStrokeWidth(),\n fill: this.anchorFill(),\n cornerRadius: this.anchorCornerRadius(),\n });\n });\n this._batchChangeChild('.top-left', {\n x: 0,\n y: 0,\n offsetX: anchorSize / 2 + padding,\n offsetY: anchorSize / 2 + padding,\n visible: resizeEnabled && enabledAnchors.indexOf('top-left') >= 0,\n });\n this._batchChangeChild('.top-center', {\n x: width / 2,\n y: 0,\n offsetY: anchorSize / 2 + padding,\n visible: resizeEnabled && enabledAnchors.indexOf('top-center') >= 0,\n });\n this._batchChangeChild('.top-right', {\n x: width,\n y: 0,\n offsetX: anchorSize / 2 - padding,\n offsetY: anchorSize / 2 + padding,\n visible: resizeEnabled && enabledAnchors.indexOf('top-right') >= 0,\n });\n this._batchChangeChild('.middle-left', {\n x: 0,\n y: height / 2,\n offsetX: anchorSize / 2 + padding,\n visible: resizeEnabled && enabledAnchors.indexOf('middle-left') >= 0,\n });\n this._batchChangeChild('.middle-right', {\n x: width,\n y: height / 2,\n offsetX: anchorSize / 2 - padding,\n visible: resizeEnabled && enabledAnchors.indexOf('middle-right') >= 0,\n });\n this._batchChangeChild('.bottom-left', {\n x: 0,\n y: height,\n offsetX: anchorSize / 2 + padding,\n offsetY: anchorSize / 2 - padding,\n visible: resizeEnabled && enabledAnchors.indexOf('bottom-left') >= 0,\n });\n this._batchChangeChild('.bottom-center', {\n x: width / 2,\n y: height,\n offsetY: anchorSize / 2 - padding,\n visible: resizeEnabled && enabledAnchors.indexOf('bottom-center') >= 0,\n });\n this._batchChangeChild('.bottom-right', {\n x: width,\n y: height,\n offsetX: anchorSize / 2 - padding,\n offsetY: anchorSize / 2 - padding,\n visible: resizeEnabled && enabledAnchors.indexOf('bottom-right') >= 0,\n });\n this._batchChangeChild('.rotater', {\n x: width / 2,\n y: -this.rotateAnchorOffset() * Util._sign(height) - padding,\n visible: this.rotateEnabled(),\n });\n this._batchChangeChild('.back', {\n width: width,\n height: height,\n visible: this.borderEnabled(),\n stroke: this.borderStroke(),\n strokeWidth: this.borderStrokeWidth(),\n dash: this.borderDash(),\n x: 0,\n y: 0,\n });\n (_a = this.getLayer()) === null || _a === void 0 ? void 0 : _a.batchDraw();\n }\n isTransforming() {\n return this._transforming;\n }\n stopTransform() {\n if (this._transforming) {\n this._removeEvents();\n var anchorNode = this.findOne('.' + this._movingAnchorName);\n if (anchorNode) {\n anchorNode.stopDrag();\n }\n }\n }\n destroy() {\n if (this.getStage() && this._cursorChange) {\n this.getStage().content && (this.getStage().content.style.cursor = '');\n }\n Group.prototype.destroy.call(this);\n this.detach();\n this._removeEvents();\n return this;\n }\n toObject() {\n return Node.prototype.toObject.call(this);\n }\n clone(obj) {\n var node = Node.prototype.clone.call(this, obj);\n return node;\n }\n getClientRect() {\n if (this.nodes().length > 0) {\n return super.getClientRect();\n }\n else {\n return { x: 0, y: 0, width: 0, height: 0 };\n }\n }\n}\nfunction validateAnchors(val) {\n if (!(val instanceof Array)) {\n Util.warn('enabledAnchors value should be an array');\n }\n if (val instanceof Array) {\n val.forEach(function (name) {\n if (ANCHORS_NAMES.indexOf(name) === -1) {\n Util.warn('Unknown anchor name: ' +\n name +\n '. Available names are: ' +\n ANCHORS_NAMES.join(', '));\n }\n });\n }\n return val || [];\n}\nTransformer.prototype.className = 'Transformer';\n_registerNode(Transformer);\nFactory.addGetterSetter(Transformer, 'enabledAnchors', ANCHORS_NAMES, validateAnchors);\nFactory.addGetterSetter(Transformer, 'flipEnabled', true, getBooleanValidator());\nFactory.addGetterSetter(Transformer, 'resizeEnabled', true);\nFactory.addGetterSetter(Transformer, 'anchorSize', 10, getNumberValidator());\nFactory.addGetterSetter(Transformer, 'rotateEnabled', true);\nFactory.addGetterSetter(Transformer, 'rotationSnaps', []);\nFactory.addGetterSetter(Transformer, 'rotateAnchorOffset', 50, getNumberValidator());\nFactory.addGetterSetter(Transformer, 'rotationSnapTolerance', 5, getNumberValidator());\nFactory.addGetterSetter(Transformer, 'borderEnabled', true);\nFactory.addGetterSetter(Transformer, 'anchorStroke', 'rgb(0, 161, 255)');\nFactory.addGetterSetter(Transformer, 'anchorStrokeWidth', 1, getNumberValidator());\nFactory.addGetterSetter(Transformer, 'anchorFill', 'white');\nFactory.addGetterSetter(Transformer, 'anchorCornerRadius', 0, getNumberValidator());\nFactory.addGetterSetter(Transformer, 'borderStroke', 'rgb(0, 161, 255)');\nFactory.addGetterSetter(Transformer, 'borderStrokeWidth', 1, getNumberValidator());\nFactory.addGetterSetter(Transformer, 'borderDash');\nFactory.addGetterSetter(Transformer, 'keepRatio', true);\nFactory.addGetterSetter(Transformer, 'centeredScaling', false);\nFactory.addGetterSetter(Transformer, 'ignoreStroke', false);\nFactory.addGetterSetter(Transformer, 'padding', 0, getNumberValidator());\nFactory.addGetterSetter(Transformer, 'node');\nFactory.addGetterSetter(Transformer, 'nodes');\nFactory.addGetterSetter(Transformer, 'boundBoxFunc');\nFactory.addGetterSetter(Transformer, 'anchorDragBoundFunc');\nFactory.addGetterSetter(Transformer, 'shouldOverdrawWholeArea', false);\nFactory.addGetterSetter(Transformer, 'useSingleNodeRotation', true);\nFactory.backCompat(Transformer, {\n lineEnabled: 'borderEnabled',\n rotateHandlerOffset: 'rotateAnchorOffset',\n enabledHandlers: 'enabledAnchors',\n});\n","import { Factory } from '../Factory.js';\nimport { Shape } from '../Shape.js';\nimport { Konva } from '../Global.js';\nimport { getNumberValidator } from '../Validators.js';\nimport { _registerNode } from '../Global.js';\nexport class Wedge extends Shape {\n _sceneFunc(context) {\n context.beginPath();\n context.arc(0, 0, this.radius(), 0, Konva.getAngle(this.angle()), this.clockwise());\n context.lineTo(0, 0);\n context.closePath();\n context.fillStrokeShape(this);\n }\n getWidth() {\n return this.radius() * 2;\n }\n getHeight() {\n return this.radius() * 2;\n }\n setWidth(width) {\n this.radius(width / 2);\n }\n setHeight(height) {\n this.radius(height / 2);\n }\n}\nWedge.prototype.className = 'Wedge';\nWedge.prototype._centroid = true;\nWedge.prototype._attrsAffectingSize = ['radius'];\n_registerNode(Wedge);\nFactory.addGetterSetter(Wedge, 'radius', 0, getNumberValidator());\nFactory.addGetterSetter(Wedge, 'angle', 0, getNumberValidator());\nFactory.addGetterSetter(Wedge, 'clockwise', false);\nFactory.backCompat(Wedge, {\n angleDeg: 'angle',\n getAngleDeg: 'getAngle',\n setAngleDeg: 'setAngle',\n});\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { getNumberValidator } from '../Validators.js';\nfunction BlurStack() {\n this.r = 0;\n this.g = 0;\n this.b = 0;\n this.a = 0;\n this.next = null;\n}\nvar mul_table = [\n 512,\n 512,\n 456,\n 512,\n 328,\n 456,\n 335,\n 512,\n 405,\n 328,\n 271,\n 456,\n 388,\n 335,\n 292,\n 512,\n 454,\n 405,\n 364,\n 328,\n 298,\n 271,\n 496,\n 456,\n 420,\n 388,\n 360,\n 335,\n 312,\n 292,\n 273,\n 512,\n 482,\n 454,\n 428,\n 405,\n 383,\n 364,\n 345,\n 328,\n 312,\n 298,\n 284,\n 271,\n 259,\n 496,\n 475,\n 456,\n 437,\n 420,\n 404,\n 388,\n 374,\n 360,\n 347,\n 335,\n 323,\n 312,\n 302,\n 292,\n 282,\n 273,\n 265,\n 512,\n 497,\n 482,\n 468,\n 454,\n 441,\n 428,\n 417,\n 405,\n 394,\n 383,\n 373,\n 364,\n 354,\n 345,\n 337,\n 328,\n 320,\n 312,\n 305,\n 298,\n 291,\n 284,\n 278,\n 271,\n 265,\n 259,\n 507,\n 496,\n 485,\n 475,\n 465,\n 456,\n 446,\n 437,\n 428,\n 420,\n 412,\n 404,\n 396,\n 388,\n 381,\n 374,\n 367,\n 360,\n 354,\n 347,\n 341,\n 335,\n 329,\n 323,\n 318,\n 312,\n 307,\n 302,\n 297,\n 292,\n 287,\n 282,\n 278,\n 273,\n 269,\n 265,\n 261,\n 512,\n 505,\n 497,\n 489,\n 482,\n 475,\n 468,\n 461,\n 454,\n 447,\n 441,\n 435,\n 428,\n 422,\n 417,\n 411,\n 405,\n 399,\n 394,\n 389,\n 383,\n 378,\n 373,\n 368,\n 364,\n 359,\n 354,\n 350,\n 345,\n 341,\n 337,\n 332,\n 328,\n 324,\n 320,\n 316,\n 312,\n 309,\n 305,\n 301,\n 298,\n 294,\n 291,\n 287,\n 284,\n 281,\n 278,\n 274,\n 271,\n 268,\n 265,\n 262,\n 259,\n 257,\n 507,\n 501,\n 496,\n 491,\n 485,\n 480,\n 475,\n 470,\n 465,\n 460,\n 456,\n 451,\n 446,\n 442,\n 437,\n 433,\n 428,\n 424,\n 420,\n 416,\n 412,\n 408,\n 404,\n 400,\n 396,\n 392,\n 388,\n 385,\n 381,\n 377,\n 374,\n 370,\n 367,\n 363,\n 360,\n 357,\n 354,\n 350,\n 347,\n 344,\n 341,\n 338,\n 335,\n 332,\n 329,\n 326,\n 323,\n 320,\n 318,\n 315,\n 312,\n 310,\n 307,\n 304,\n 302,\n 299,\n 297,\n 294,\n 292,\n 289,\n 287,\n 285,\n 282,\n 280,\n 278,\n 275,\n 273,\n 271,\n 269,\n 267,\n 265,\n 263,\n 261,\n 259,\n];\nvar shg_table = [\n 9,\n 11,\n 12,\n 13,\n 13,\n 14,\n 14,\n 15,\n 15,\n 15,\n 15,\n 16,\n 16,\n 16,\n 16,\n 17,\n 17,\n 17,\n 17,\n 17,\n 17,\n 17,\n 18,\n 18,\n 18,\n 18,\n 18,\n 18,\n 18,\n 18,\n 18,\n 19,\n 19,\n 19,\n 19,\n 19,\n 19,\n 19,\n 19,\n 19,\n 19,\n 19,\n 19,\n 19,\n 19,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 20,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 21,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 22,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 23,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n 24,\n];\nfunction filterGaussBlurRGBA(imageData, radius) {\n var pixels = imageData.data, width = imageData.width, height = imageData.height;\n var x, y, i, p, yp, yi, yw, r_sum, g_sum, b_sum, a_sum, r_out_sum, g_out_sum, b_out_sum, a_out_sum, r_in_sum, g_in_sum, b_in_sum, a_in_sum, pr, pg, pb, pa, rbs;\n var div = radius + radius + 1, widthMinus1 = width - 1, heightMinus1 = height - 1, radiusPlus1 = radius + 1, sumFactor = (radiusPlus1 * (radiusPlus1 + 1)) / 2, stackStart = new BlurStack(), stackEnd = null, stack = stackStart, stackIn = null, stackOut = null, mul_sum = mul_table[radius], shg_sum = shg_table[radius];\n for (i = 1; i < div; i++) {\n stack = stack.next = new BlurStack();\n if (i === radiusPlus1) {\n stackEnd = stack;\n }\n }\n stack.next = stackStart;\n yw = yi = 0;\n for (y = 0; y < height; y++) {\n r_in_sum = g_in_sum = b_in_sum = a_in_sum = r_sum = g_sum = b_sum = a_sum = 0;\n r_out_sum = radiusPlus1 * (pr = pixels[yi]);\n g_out_sum = radiusPlus1 * (pg = pixels[yi + 1]);\n b_out_sum = radiusPlus1 * (pb = pixels[yi + 2]);\n a_out_sum = radiusPlus1 * (pa = pixels[yi + 3]);\n r_sum += sumFactor * pr;\n g_sum += sumFactor * pg;\n b_sum += sumFactor * pb;\n a_sum += sumFactor * pa;\n stack = stackStart;\n for (i = 0; i < radiusPlus1; i++) {\n stack.r = pr;\n stack.g = pg;\n stack.b = pb;\n stack.a = pa;\n stack = stack.next;\n }\n for (i = 1; i < radiusPlus1; i++) {\n p = yi + ((widthMinus1 < i ? widthMinus1 : i) << 2);\n r_sum += (stack.r = pr = pixels[p]) * (rbs = radiusPlus1 - i);\n g_sum += (stack.g = pg = pixels[p + 1]) * rbs;\n b_sum += (stack.b = pb = pixels[p + 2]) * rbs;\n a_sum += (stack.a = pa = pixels[p + 3]) * rbs;\n r_in_sum += pr;\n g_in_sum += pg;\n b_in_sum += pb;\n a_in_sum += pa;\n stack = stack.next;\n }\n stackIn = stackStart;\n stackOut = stackEnd;\n for (x = 0; x < width; x++) {\n pixels[yi + 3] = pa = (a_sum * mul_sum) >> shg_sum;\n if (pa !== 0) {\n pa = 255 / pa;\n pixels[yi] = ((r_sum * mul_sum) >> shg_sum) * pa;\n pixels[yi + 1] = ((g_sum * mul_sum) >> shg_sum) * pa;\n pixels[yi + 2] = ((b_sum * mul_sum) >> shg_sum) * pa;\n }\n else {\n pixels[yi] = pixels[yi + 1] = pixels[yi + 2] = 0;\n }\n r_sum -= r_out_sum;\n g_sum -= g_out_sum;\n b_sum -= b_out_sum;\n a_sum -= a_out_sum;\n r_out_sum -= stackIn.r;\n g_out_sum -= stackIn.g;\n b_out_sum -= stackIn.b;\n a_out_sum -= stackIn.a;\n p = (yw + ((p = x + radius + 1) < widthMinus1 ? p : widthMinus1)) << 2;\n r_in_sum += stackIn.r = pixels[p];\n g_in_sum += stackIn.g = pixels[p + 1];\n b_in_sum += stackIn.b = pixels[p + 2];\n a_in_sum += stackIn.a = pixels[p + 3];\n r_sum += r_in_sum;\n g_sum += g_in_sum;\n b_sum += b_in_sum;\n a_sum += a_in_sum;\n stackIn = stackIn.next;\n r_out_sum += pr = stackOut.r;\n g_out_sum += pg = stackOut.g;\n b_out_sum += pb = stackOut.b;\n a_out_sum += pa = stackOut.a;\n r_in_sum -= pr;\n g_in_sum -= pg;\n b_in_sum -= pb;\n a_in_sum -= pa;\n stackOut = stackOut.next;\n yi += 4;\n }\n yw += width;\n }\n for (x = 0; x < width; x++) {\n g_in_sum = b_in_sum = a_in_sum = r_in_sum = g_sum = b_sum = a_sum = r_sum = 0;\n yi = x << 2;\n r_out_sum = radiusPlus1 * (pr = pixels[yi]);\n g_out_sum = radiusPlus1 * (pg = pixels[yi + 1]);\n b_out_sum = radiusPlus1 * (pb = pixels[yi + 2]);\n a_out_sum = radiusPlus1 * (pa = pixels[yi + 3]);\n r_sum += sumFactor * pr;\n g_sum += sumFactor * pg;\n b_sum += sumFactor * pb;\n a_sum += sumFactor * pa;\n stack = stackStart;\n for (i = 0; i < radiusPlus1; i++) {\n stack.r = pr;\n stack.g = pg;\n stack.b = pb;\n stack.a = pa;\n stack = stack.next;\n }\n yp = width;\n for (i = 1; i <= radius; i++) {\n yi = (yp + x) << 2;\n r_sum += (stack.r = pr = pixels[yi]) * (rbs = radiusPlus1 - i);\n g_sum += (stack.g = pg = pixels[yi + 1]) * rbs;\n b_sum += (stack.b = pb = pixels[yi + 2]) * rbs;\n a_sum += (stack.a = pa = pixels[yi + 3]) * rbs;\n r_in_sum += pr;\n g_in_sum += pg;\n b_in_sum += pb;\n a_in_sum += pa;\n stack = stack.next;\n if (i < heightMinus1) {\n yp += width;\n }\n }\n yi = x;\n stackIn = stackStart;\n stackOut = stackEnd;\n for (y = 0; y < height; y++) {\n p = yi << 2;\n pixels[p + 3] = pa = (a_sum * mul_sum) >> shg_sum;\n if (pa > 0) {\n pa = 255 / pa;\n pixels[p] = ((r_sum * mul_sum) >> shg_sum) * pa;\n pixels[p + 1] = ((g_sum * mul_sum) >> shg_sum) * pa;\n pixels[p + 2] = ((b_sum * mul_sum) >> shg_sum) * pa;\n }\n else {\n pixels[p] = pixels[p + 1] = pixels[p + 2] = 0;\n }\n r_sum -= r_out_sum;\n g_sum -= g_out_sum;\n b_sum -= b_out_sum;\n a_sum -= a_out_sum;\n r_out_sum -= stackIn.r;\n g_out_sum -= stackIn.g;\n b_out_sum -= stackIn.b;\n a_out_sum -= stackIn.a;\n p =\n (x +\n ((p = y + radiusPlus1) < heightMinus1 ? p : heightMinus1) * width) <<\n 2;\n r_sum += r_in_sum += stackIn.r = pixels[p];\n g_sum += g_in_sum += stackIn.g = pixels[p + 1];\n b_sum += b_in_sum += stackIn.b = pixels[p + 2];\n a_sum += a_in_sum += stackIn.a = pixels[p + 3];\n stackIn = stackIn.next;\n r_out_sum += pr = stackOut.r;\n g_out_sum += pg = stackOut.g;\n b_out_sum += pb = stackOut.b;\n a_out_sum += pa = stackOut.a;\n r_in_sum -= pr;\n g_in_sum -= pg;\n b_in_sum -= pb;\n a_in_sum -= pa;\n stackOut = stackOut.next;\n yi += width;\n }\n }\n}\nexport const Blur = function Blur(imageData) {\n var radius = Math.round(this.blurRadius());\n if (radius > 0) {\n filterGaussBlurRGBA(imageData, radius);\n }\n};\nFactory.addGetterSetter(Node, 'blurRadius', 0, getNumberValidator(), Factory.afterSetFilter);\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { getNumberValidator } from '../Validators.js';\nexport const Brighten = function (imageData) {\n var brightness = this.brightness() * 255, data = imageData.data, len = data.length, i;\n for (i = 0; i < len; i += 4) {\n data[i] += brightness;\n data[i + 1] += brightness;\n data[i + 2] += brightness;\n }\n};\nFactory.addGetterSetter(Node, 'brightness', 0, getNumberValidator(), Factory.afterSetFilter);\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { getNumberValidator } from '../Validators.js';\nexport const Contrast = function (imageData) {\n var adjust = Math.pow((this.contrast() + 100) / 100, 2);\n var data = imageData.data, nPixels = data.length, red = 150, green = 150, blue = 150, i;\n for (i = 0; i < nPixels; i += 4) {\n red = data[i];\n green = data[i + 1];\n blue = data[i + 2];\n red /= 255;\n red -= 0.5;\n red *= adjust;\n red += 0.5;\n red *= 255;\n green /= 255;\n green -= 0.5;\n green *= adjust;\n green += 0.5;\n green *= 255;\n blue /= 255;\n blue -= 0.5;\n blue *= adjust;\n blue += 0.5;\n blue *= 255;\n red = red < 0 ? 0 : red > 255 ? 255 : red;\n green = green < 0 ? 0 : green > 255 ? 255 : green;\n blue = blue < 0 ? 0 : blue > 255 ? 255 : blue;\n data[i] = red;\n data[i + 1] = green;\n data[i + 2] = blue;\n }\n};\nFactory.addGetterSetter(Node, 'contrast', 0, getNumberValidator(), Factory.afterSetFilter);\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { Util } from '../Util.js';\nimport { getNumberValidator } from '../Validators.js';\nexport const Emboss = function (imageData) {\n var strength = this.embossStrength() * 10, greyLevel = this.embossWhiteLevel() * 255, direction = this.embossDirection(), blend = this.embossBlend(), dirY = 0, dirX = 0, data = imageData.data, w = imageData.width, h = imageData.height, w4 = w * 4, y = h;\n switch (direction) {\n case 'top-left':\n dirY = -1;\n dirX = -1;\n break;\n case 'top':\n dirY = -1;\n dirX = 0;\n break;\n case 'top-right':\n dirY = -1;\n dirX = 1;\n break;\n case 'right':\n dirY = 0;\n dirX = 1;\n break;\n case 'bottom-right':\n dirY = 1;\n dirX = 1;\n break;\n case 'bottom':\n dirY = 1;\n dirX = 0;\n break;\n case 'bottom-left':\n dirY = 1;\n dirX = -1;\n break;\n case 'left':\n dirY = 0;\n dirX = -1;\n break;\n default:\n Util.error('Unknown emboss direction: ' + direction);\n }\n do {\n var offsetY = (y - 1) * w4;\n var otherY = dirY;\n if (y + otherY < 1) {\n otherY = 0;\n }\n if (y + otherY > h) {\n otherY = 0;\n }\n var offsetYOther = (y - 1 + otherY) * w * 4;\n var x = w;\n do {\n var offset = offsetY + (x - 1) * 4;\n var otherX = dirX;\n if (x + otherX < 1) {\n otherX = 0;\n }\n if (x + otherX > w) {\n otherX = 0;\n }\n var offsetOther = offsetYOther + (x - 1 + otherX) * 4;\n var dR = data[offset] - data[offsetOther];\n var dG = data[offset + 1] - data[offsetOther + 1];\n var dB = data[offset + 2] - data[offsetOther + 2];\n var dif = dR;\n var absDif = dif > 0 ? dif : -dif;\n var absG = dG > 0 ? dG : -dG;\n var absB = dB > 0 ? dB : -dB;\n if (absG > absDif) {\n dif = dG;\n }\n if (absB > absDif) {\n dif = dB;\n }\n dif *= strength;\n if (blend) {\n var r = data[offset] + dif;\n var g = data[offset + 1] + dif;\n var b = data[offset + 2] + dif;\n data[offset] = r > 255 ? 255 : r < 0 ? 0 : r;\n data[offset + 1] = g > 255 ? 255 : g < 0 ? 0 : g;\n data[offset + 2] = b > 255 ? 255 : b < 0 ? 0 : b;\n }\n else {\n var grey = greyLevel - dif;\n if (grey < 0) {\n grey = 0;\n }\n else if (grey > 255) {\n grey = 255;\n }\n data[offset] = data[offset + 1] = data[offset + 2] = grey;\n }\n } while (--x);\n } while (--y);\n};\nFactory.addGetterSetter(Node, 'embossStrength', 0.5, getNumberValidator(), Factory.afterSetFilter);\nFactory.addGetterSetter(Node, 'embossWhiteLevel', 0.5, getNumberValidator(), Factory.afterSetFilter);\nFactory.addGetterSetter(Node, 'embossDirection', 'top-left', null, Factory.afterSetFilter);\nFactory.addGetterSetter(Node, 'embossBlend', false, null, Factory.afterSetFilter);\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { getNumberValidator } from '../Validators.js';\nfunction remap(fromValue, fromMin, fromMax, toMin, toMax) {\n var fromRange = fromMax - fromMin, toRange = toMax - toMin, toValue;\n if (fromRange === 0) {\n return toMin + toRange / 2;\n }\n if (toRange === 0) {\n return toMin;\n }\n toValue = (fromValue - fromMin) / fromRange;\n toValue = toRange * toValue + toMin;\n return toValue;\n}\nexport const Enhance = function (imageData) {\n var data = imageData.data, nSubPixels = data.length, rMin = data[0], rMax = rMin, r, gMin = data[1], gMax = gMin, g, bMin = data[2], bMax = bMin, b, i;\n var enhanceAmount = this.enhance();\n if (enhanceAmount === 0) {\n return;\n }\n for (i = 0; i < nSubPixels; i += 4) {\n r = data[i + 0];\n if (r < rMin) {\n rMin = r;\n }\n else if (r > rMax) {\n rMax = r;\n }\n g = data[i + 1];\n if (g < gMin) {\n gMin = g;\n }\n else if (g > gMax) {\n gMax = g;\n }\n b = data[i + 2];\n if (b < bMin) {\n bMin = b;\n }\n else if (b > bMax) {\n bMax = b;\n }\n }\n if (rMax === rMin) {\n rMax = 255;\n rMin = 0;\n }\n if (gMax === gMin) {\n gMax = 255;\n gMin = 0;\n }\n if (bMax === bMin) {\n bMax = 255;\n bMin = 0;\n }\n var rMid, rGoalMax, rGoalMin, gMid, gGoalMax, gGoalMin, bMid, bGoalMax, bGoalMin;\n if (enhanceAmount > 0) {\n rGoalMax = rMax + enhanceAmount * (255 - rMax);\n rGoalMin = rMin - enhanceAmount * (rMin - 0);\n gGoalMax = gMax + enhanceAmount * (255 - gMax);\n gGoalMin = gMin - enhanceAmount * (gMin - 0);\n bGoalMax = bMax + enhanceAmount * (255 - bMax);\n bGoalMin = bMin - enhanceAmount * (bMin - 0);\n }\n else {\n rMid = (rMax + rMin) * 0.5;\n rGoalMax = rMax + enhanceAmount * (rMax - rMid);\n rGoalMin = rMin + enhanceAmount * (rMin - rMid);\n gMid = (gMax + gMin) * 0.5;\n gGoalMax = gMax + enhanceAmount * (gMax - gMid);\n gGoalMin = gMin + enhanceAmount * (gMin - gMid);\n bMid = (bMax + bMin) * 0.5;\n bGoalMax = bMax + enhanceAmount * (bMax - bMid);\n bGoalMin = bMin + enhanceAmount * (bMin - bMid);\n }\n for (i = 0; i < nSubPixels; i += 4) {\n data[i + 0] = remap(data[i + 0], rMin, rMax, rGoalMin, rGoalMax);\n data[i + 1] = remap(data[i + 1], gMin, gMax, gGoalMin, gGoalMax);\n data[i + 2] = remap(data[i + 2], bMin, bMax, bGoalMin, bGoalMax);\n }\n};\nFactory.addGetterSetter(Node, 'enhance', 0, getNumberValidator(), Factory.afterSetFilter);\n","export const Grayscale = function (imageData) {\n var data = imageData.data, len = data.length, i, brightness;\n for (i = 0; i < len; i += 4) {\n brightness = 0.34 * data[i] + 0.5 * data[i + 1] + 0.16 * data[i + 2];\n data[i] = brightness;\n data[i + 1] = brightness;\n data[i + 2] = brightness;\n }\n};\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { getNumberValidator } from '../Validators.js';\nFactory.addGetterSetter(Node, 'hue', 0, getNumberValidator(), Factory.afterSetFilter);\nFactory.addGetterSetter(Node, 'saturation', 0, getNumberValidator(), Factory.afterSetFilter);\nFactory.addGetterSetter(Node, 'luminance', 0, getNumberValidator(), Factory.afterSetFilter);\nexport const HSL = function (imageData) {\n var data = imageData.data, nPixels = data.length, v = 1, s = Math.pow(2, this.saturation()), h = Math.abs(this.hue() + 360) % 360, l = this.luminance() * 127, i;\n var vsu = v * s * Math.cos((h * Math.PI) / 180), vsw = v * s * Math.sin((h * Math.PI) / 180);\n var rr = 0.299 * v + 0.701 * vsu + 0.167 * vsw, rg = 0.587 * v - 0.587 * vsu + 0.33 * vsw, rb = 0.114 * v - 0.114 * vsu - 0.497 * vsw;\n var gr = 0.299 * v - 0.299 * vsu - 0.328 * vsw, gg = 0.587 * v + 0.413 * vsu + 0.035 * vsw, gb = 0.114 * v - 0.114 * vsu + 0.293 * vsw;\n var br = 0.299 * v - 0.3 * vsu + 1.25 * vsw, bg = 0.587 * v - 0.586 * vsu - 1.05 * vsw, bb = 0.114 * v + 0.886 * vsu - 0.2 * vsw;\n var r, g, b, a;\n for (i = 0; i < nPixels; i += 4) {\n r = data[i + 0];\n g = data[i + 1];\n b = data[i + 2];\n a = data[i + 3];\n data[i + 0] = rr * r + rg * g + rb * b + l;\n data[i + 1] = gr * r + gg * g + gb * b + l;\n data[i + 2] = br * r + bg * g + bb * b + l;\n data[i + 3] = a;\n }\n};\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { getNumberValidator } from '../Validators.js';\nexport const HSV = function (imageData) {\n var data = imageData.data, nPixels = data.length, v = Math.pow(2, this.value()), s = Math.pow(2, this.saturation()), h = Math.abs(this.hue() + 360) % 360, i;\n var vsu = v * s * Math.cos((h * Math.PI) / 180), vsw = v * s * Math.sin((h * Math.PI) / 180);\n var rr = 0.299 * v + 0.701 * vsu + 0.167 * vsw, rg = 0.587 * v - 0.587 * vsu + 0.33 * vsw, rb = 0.114 * v - 0.114 * vsu - 0.497 * vsw;\n var gr = 0.299 * v - 0.299 * vsu - 0.328 * vsw, gg = 0.587 * v + 0.413 * vsu + 0.035 * vsw, gb = 0.114 * v - 0.114 * vsu + 0.293 * vsw;\n var br = 0.299 * v - 0.3 * vsu + 1.25 * vsw, bg = 0.587 * v - 0.586 * vsu - 1.05 * vsw, bb = 0.114 * v + 0.886 * vsu - 0.2 * vsw;\n var r, g, b, a;\n for (i = 0; i < nPixels; i += 4) {\n r = data[i + 0];\n g = data[i + 1];\n b = data[i + 2];\n a = data[i + 3];\n data[i + 0] = rr * r + rg * g + rb * b;\n data[i + 1] = gr * r + gg * g + gb * b;\n data[i + 2] = br * r + bg * g + bb * b;\n data[i + 3] = a;\n }\n};\nFactory.addGetterSetter(Node, 'hue', 0, getNumberValidator(), Factory.afterSetFilter);\nFactory.addGetterSetter(Node, 'saturation', 0, getNumberValidator(), Factory.afterSetFilter);\nFactory.addGetterSetter(Node, 'value', 0, getNumberValidator(), Factory.afterSetFilter);\n","export const Invert = function (imageData) {\n var data = imageData.data, len = data.length, i;\n for (i = 0; i < len; i += 4) {\n data[i] = 255 - data[i];\n data[i + 1] = 255 - data[i + 1];\n data[i + 2] = 255 - data[i + 2];\n }\n};\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { Util } from '../Util.js';\nimport { getNumberValidator } from '../Validators.js';\nvar ToPolar = function (src, dst, opt) {\n var srcPixels = src.data, dstPixels = dst.data, xSize = src.width, ySize = src.height, xMid = opt.polarCenterX || xSize / 2, yMid = opt.polarCenterY || ySize / 2, i, x, y, r = 0, g = 0, b = 0, a = 0;\n var rad, rMax = Math.sqrt(xMid * xMid + yMid * yMid);\n x = xSize - xMid;\n y = ySize - yMid;\n rad = Math.sqrt(x * x + y * y);\n rMax = rad > rMax ? rad : rMax;\n var rSize = ySize, tSize = xSize, radius, theta;\n var conversion = ((360 / tSize) * Math.PI) / 180, sin, cos;\n for (theta = 0; theta < tSize; theta += 1) {\n sin = Math.sin(theta * conversion);\n cos = Math.cos(theta * conversion);\n for (radius = 0; radius < rSize; radius += 1) {\n x = Math.floor(xMid + ((rMax * radius) / rSize) * cos);\n y = Math.floor(yMid + ((rMax * radius) / rSize) * sin);\n i = (y * xSize + x) * 4;\n r = srcPixels[i + 0];\n g = srcPixels[i + 1];\n b = srcPixels[i + 2];\n a = srcPixels[i + 3];\n i = (theta + radius * xSize) * 4;\n dstPixels[i + 0] = r;\n dstPixels[i + 1] = g;\n dstPixels[i + 2] = b;\n dstPixels[i + 3] = a;\n }\n }\n};\nvar FromPolar = function (src, dst, opt) {\n var srcPixels = src.data, dstPixels = dst.data, xSize = src.width, ySize = src.height, xMid = opt.polarCenterX || xSize / 2, yMid = opt.polarCenterY || ySize / 2, i, x, y, dx, dy, r = 0, g = 0, b = 0, a = 0;\n var rad, rMax = Math.sqrt(xMid * xMid + yMid * yMid);\n x = xSize - xMid;\n y = ySize - yMid;\n rad = Math.sqrt(x * x + y * y);\n rMax = rad > rMax ? rad : rMax;\n var rSize = ySize, tSize = xSize, radius, theta, phaseShift = opt.polarRotation || 0;\n var x1, y1;\n for (x = 0; x < xSize; x += 1) {\n for (y = 0; y < ySize; y += 1) {\n dx = x - xMid;\n dy = y - yMid;\n radius = (Math.sqrt(dx * dx + dy * dy) * rSize) / rMax;\n theta = ((Math.atan2(dy, dx) * 180) / Math.PI + 360 + phaseShift) % 360;\n theta = (theta * tSize) / 360;\n x1 = Math.floor(theta);\n y1 = Math.floor(radius);\n i = (y1 * xSize + x1) * 4;\n r = srcPixels[i + 0];\n g = srcPixels[i + 1];\n b = srcPixels[i + 2];\n a = srcPixels[i + 3];\n i = (y * xSize + x) * 4;\n dstPixels[i + 0] = r;\n dstPixels[i + 1] = g;\n dstPixels[i + 2] = b;\n dstPixels[i + 3] = a;\n }\n }\n};\nexport const Kaleidoscope = function (imageData) {\n var xSize = imageData.width, ySize = imageData.height;\n var x, y, xoff, i, r, g, b, a, srcPos, dstPos;\n var power = Math.round(this.kaleidoscopePower());\n var angle = Math.round(this.kaleidoscopeAngle());\n var offset = Math.floor((xSize * (angle % 360)) / 360);\n if (power < 1) {\n return;\n }\n var tempCanvas = Util.createCanvasElement();\n tempCanvas.width = xSize;\n tempCanvas.height = ySize;\n var scratchData = tempCanvas\n .getContext('2d')\n .getImageData(0, 0, xSize, ySize);\n Util.releaseCanvas(tempCanvas);\n ToPolar(imageData, scratchData, {\n polarCenterX: xSize / 2,\n polarCenterY: ySize / 2,\n });\n var minSectionSize = xSize / Math.pow(2, power);\n while (minSectionSize <= 8) {\n minSectionSize = minSectionSize * 2;\n power -= 1;\n }\n minSectionSize = Math.ceil(minSectionSize);\n var sectionSize = minSectionSize;\n var xStart = 0, xEnd = sectionSize, xDelta = 1;\n if (offset + minSectionSize > xSize) {\n xStart = sectionSize;\n xEnd = 0;\n xDelta = -1;\n }\n for (y = 0; y < ySize; y += 1) {\n for (x = xStart; x !== xEnd; x += xDelta) {\n xoff = Math.round(x + offset) % xSize;\n srcPos = (xSize * y + xoff) * 4;\n r = scratchData.data[srcPos + 0];\n g = scratchData.data[srcPos + 1];\n b = scratchData.data[srcPos + 2];\n a = scratchData.data[srcPos + 3];\n dstPos = (xSize * y + x) * 4;\n scratchData.data[dstPos + 0] = r;\n scratchData.data[dstPos + 1] = g;\n scratchData.data[dstPos + 2] = b;\n scratchData.data[dstPos + 3] = a;\n }\n }\n for (y = 0; y < ySize; y += 1) {\n sectionSize = Math.floor(minSectionSize);\n for (i = 0; i < power; i += 1) {\n for (x = 0; x < sectionSize + 1; x += 1) {\n srcPos = (xSize * y + x) * 4;\n r = scratchData.data[srcPos + 0];\n g = scratchData.data[srcPos + 1];\n b = scratchData.data[srcPos + 2];\n a = scratchData.data[srcPos + 3];\n dstPos = (xSize * y + sectionSize * 2 - x - 1) * 4;\n scratchData.data[dstPos + 0] = r;\n scratchData.data[dstPos + 1] = g;\n scratchData.data[dstPos + 2] = b;\n scratchData.data[dstPos + 3] = a;\n }\n sectionSize *= 2;\n }\n }\n FromPolar(scratchData, imageData, { polarRotation: 0 });\n};\nFactory.addGetterSetter(Node, 'kaleidoscopePower', 2, getNumberValidator(), Factory.afterSetFilter);\nFactory.addGetterSetter(Node, 'kaleidoscopeAngle', 0, getNumberValidator(), Factory.afterSetFilter);\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { getNumberValidator } from '../Validators.js';\nfunction pixelAt(idata, x, y) {\n var idx = (y * idata.width + x) * 4;\n var d = [];\n d.push(idata.data[idx++], idata.data[idx++], idata.data[idx++], idata.data[idx++]);\n return d;\n}\nfunction rgbDistance(p1, p2) {\n return Math.sqrt(Math.pow(p1[0] - p2[0], 2) +\n Math.pow(p1[1] - p2[1], 2) +\n Math.pow(p1[2] - p2[2], 2));\n}\nfunction rgbMean(pTab) {\n var m = [0, 0, 0];\n for (var i = 0; i < pTab.length; i++) {\n m[0] += pTab[i][0];\n m[1] += pTab[i][1];\n m[2] += pTab[i][2];\n }\n m[0] /= pTab.length;\n m[1] /= pTab.length;\n m[2] /= pTab.length;\n return m;\n}\nfunction backgroundMask(idata, threshold) {\n var rgbv_no = pixelAt(idata, 0, 0);\n var rgbv_ne = pixelAt(idata, idata.width - 1, 0);\n var rgbv_so = pixelAt(idata, 0, idata.height - 1);\n var rgbv_se = pixelAt(idata, idata.width - 1, idata.height - 1);\n var thres = threshold || 10;\n if (rgbDistance(rgbv_no, rgbv_ne) < thres &&\n rgbDistance(rgbv_ne, rgbv_se) < thres &&\n rgbDistance(rgbv_se, rgbv_so) < thres &&\n rgbDistance(rgbv_so, rgbv_no) < thres) {\n var mean = rgbMean([rgbv_ne, rgbv_no, rgbv_se, rgbv_so]);\n var mask = [];\n for (var i = 0; i < idata.width * idata.height; i++) {\n var d = rgbDistance(mean, [\n idata.data[i * 4],\n idata.data[i * 4 + 1],\n idata.data[i * 4 + 2],\n ]);\n mask[i] = d < thres ? 0 : 255;\n }\n return mask;\n }\n}\nfunction applyMask(idata, mask) {\n for (var i = 0; i < idata.width * idata.height; i++) {\n idata.data[4 * i + 3] = mask[i];\n }\n}\nfunction erodeMask(mask, sw, sh) {\n var weights = [1, 1, 1, 1, 0, 1, 1, 1, 1];\n var side = Math.round(Math.sqrt(weights.length));\n var halfSide = Math.floor(side / 2);\n var maskResult = [];\n for (var y = 0; y < sh; y++) {\n for (var x = 0; x < sw; x++) {\n var so = y * sw + x;\n var a = 0;\n for (var cy = 0; cy < side; cy++) {\n for (var cx = 0; cx < side; cx++) {\n var scy = y + cy - halfSide;\n var scx = x + cx - halfSide;\n if (scy >= 0 && scy < sh && scx >= 0 && scx < sw) {\n var srcOff = scy * sw + scx;\n var wt = weights[cy * side + cx];\n a += mask[srcOff] * wt;\n }\n }\n }\n maskResult[so] = a === 255 * 8 ? 255 : 0;\n }\n }\n return maskResult;\n}\nfunction dilateMask(mask, sw, sh) {\n var weights = [1, 1, 1, 1, 1, 1, 1, 1, 1];\n var side = Math.round(Math.sqrt(weights.length));\n var halfSide = Math.floor(side / 2);\n var maskResult = [];\n for (var y = 0; y < sh; y++) {\n for (var x = 0; x < sw; x++) {\n var so = y * sw + x;\n var a = 0;\n for (var cy = 0; cy < side; cy++) {\n for (var cx = 0; cx < side; cx++) {\n var scy = y + cy - halfSide;\n var scx = x + cx - halfSide;\n if (scy >= 0 && scy < sh && scx >= 0 && scx < sw) {\n var srcOff = scy * sw + scx;\n var wt = weights[cy * side + cx];\n a += mask[srcOff] * wt;\n }\n }\n }\n maskResult[so] = a >= 255 * 4 ? 255 : 0;\n }\n }\n return maskResult;\n}\nfunction smoothEdgeMask(mask, sw, sh) {\n var weights = [1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9, 1 / 9];\n var side = Math.round(Math.sqrt(weights.length));\n var halfSide = Math.floor(side / 2);\n var maskResult = [];\n for (var y = 0; y < sh; y++) {\n for (var x = 0; x < sw; x++) {\n var so = y * sw + x;\n var a = 0;\n for (var cy = 0; cy < side; cy++) {\n for (var cx = 0; cx < side; cx++) {\n var scy = y + cy - halfSide;\n var scx = x + cx - halfSide;\n if (scy >= 0 && scy < sh && scx >= 0 && scx < sw) {\n var srcOff = scy * sw + scx;\n var wt = weights[cy * side + cx];\n a += mask[srcOff] * wt;\n }\n }\n }\n maskResult[so] = a;\n }\n }\n return maskResult;\n}\nexport const Mask = function (imageData) {\n var threshold = this.threshold(), mask = backgroundMask(imageData, threshold);\n if (mask) {\n mask = erodeMask(mask, imageData.width, imageData.height);\n mask = dilateMask(mask, imageData.width, imageData.height);\n mask = smoothEdgeMask(mask, imageData.width, imageData.height);\n applyMask(imageData, mask);\n }\n return imageData;\n};\nFactory.addGetterSetter(Node, 'threshold', 0, getNumberValidator(), Factory.afterSetFilter);\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { getNumberValidator } from '../Validators.js';\nexport const Noise = function (imageData) {\n var amount = this.noise() * 255, data = imageData.data, nPixels = data.length, half = amount / 2, i;\n for (i = 0; i < nPixels; i += 4) {\n data[i + 0] += half - 2 * half * Math.random();\n data[i + 1] += half - 2 * half * Math.random();\n data[i + 2] += half - 2 * half * Math.random();\n }\n};\nFactory.addGetterSetter(Node, 'noise', 0.2, getNumberValidator(), Factory.afterSetFilter);\n","import { Factory } from '../Factory.js';\nimport { Util } from '../Util.js';\nimport { Node } from '../Node.js';\nimport { getNumberValidator } from '../Validators.js';\nexport const Pixelate = function (imageData) {\n var pixelSize = Math.ceil(this.pixelSize()), width = imageData.width, height = imageData.height, x, y, i, red, green, blue, alpha, nBinsX = Math.ceil(width / pixelSize), nBinsY = Math.ceil(height / pixelSize), xBinStart, xBinEnd, yBinStart, yBinEnd, xBin, yBin, pixelsInBin, data = imageData.data;\n if (pixelSize <= 0) {\n Util.error('pixelSize value can not be <= 0');\n return;\n }\n for (xBin = 0; xBin < nBinsX; xBin += 1) {\n for (yBin = 0; yBin < nBinsY; yBin += 1) {\n red = 0;\n green = 0;\n blue = 0;\n alpha = 0;\n xBinStart = xBin * pixelSize;\n xBinEnd = xBinStart + pixelSize;\n yBinStart = yBin * pixelSize;\n yBinEnd = yBinStart + pixelSize;\n pixelsInBin = 0;\n for (x = xBinStart; x < xBinEnd; x += 1) {\n if (x >= width) {\n continue;\n }\n for (y = yBinStart; y < yBinEnd; y += 1) {\n if (y >= height) {\n continue;\n }\n i = (width * y + x) * 4;\n red += data[i + 0];\n green += data[i + 1];\n blue += data[i + 2];\n alpha += data[i + 3];\n pixelsInBin += 1;\n }\n }\n red = red / pixelsInBin;\n green = green / pixelsInBin;\n blue = blue / pixelsInBin;\n alpha = alpha / pixelsInBin;\n for (x = xBinStart; x < xBinEnd; x += 1) {\n if (x >= width) {\n continue;\n }\n for (y = yBinStart; y < yBinEnd; y += 1) {\n if (y >= height) {\n continue;\n }\n i = (width * y + x) * 4;\n data[i + 0] = red;\n data[i + 1] = green;\n data[i + 2] = blue;\n data[i + 3] = alpha;\n }\n }\n }\n }\n};\nFactory.addGetterSetter(Node, 'pixelSize', 8, getNumberValidator(), Factory.afterSetFilter);\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { getNumberValidator } from '../Validators.js';\nexport const Posterize = function (imageData) {\n var levels = Math.round(this.levels() * 254) + 1, data = imageData.data, len = data.length, scale = 255 / levels, i;\n for (i = 0; i < len; i += 1) {\n data[i] = Math.floor(data[i] / scale) * scale;\n }\n};\nFactory.addGetterSetter(Node, 'levels', 0.5, getNumberValidator(), Factory.afterSetFilter);\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { RGBComponent } from '../Validators.js';\nexport const RGB = function (imageData) {\n var data = imageData.data, nPixels = data.length, red = this.red(), green = this.green(), blue = this.blue(), i, brightness;\n for (i = 0; i < nPixels; i += 4) {\n brightness =\n (0.34 * data[i] + 0.5 * data[i + 1] + 0.16 * data[i + 2]) / 255;\n data[i] = brightness * red;\n data[i + 1] = brightness * green;\n data[i + 2] = brightness * blue;\n data[i + 3] = data[i + 3];\n }\n};\nFactory.addGetterSetter(Node, 'red', 0, function (val) {\n this._filterUpToDate = false;\n if (val > 255) {\n return 255;\n }\n else if (val < 0) {\n return 0;\n }\n else {\n return Math.round(val);\n }\n});\nFactory.addGetterSetter(Node, 'green', 0, function (val) {\n this._filterUpToDate = false;\n if (val > 255) {\n return 255;\n }\n else if (val < 0) {\n return 0;\n }\n else {\n return Math.round(val);\n }\n});\nFactory.addGetterSetter(Node, 'blue', 0, RGBComponent, Factory.afterSetFilter);\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { RGBComponent } from '../Validators.js';\nexport const RGBA = function (imageData) {\n var data = imageData.data, nPixels = data.length, red = this.red(), green = this.green(), blue = this.blue(), alpha = this.alpha(), i, ia;\n for (i = 0; i < nPixels; i += 4) {\n ia = 1 - alpha;\n data[i] = red * alpha + data[i] * ia;\n data[i + 1] = green * alpha + data[i + 1] * ia;\n data[i + 2] = blue * alpha + data[i + 2] * ia;\n }\n};\nFactory.addGetterSetter(Node, 'red', 0, function (val) {\n this._filterUpToDate = false;\n if (val > 255) {\n return 255;\n }\n else if (val < 0) {\n return 0;\n }\n else {\n return Math.round(val);\n }\n});\nFactory.addGetterSetter(Node, 'green', 0, function (val) {\n this._filterUpToDate = false;\n if (val > 255) {\n return 255;\n }\n else if (val < 0) {\n return 0;\n }\n else {\n return Math.round(val);\n }\n});\nFactory.addGetterSetter(Node, 'blue', 0, RGBComponent, Factory.afterSetFilter);\nFactory.addGetterSetter(Node, 'alpha', 1, function (val) {\n this._filterUpToDate = false;\n if (val > 1) {\n return 1;\n }\n else if (val < 0) {\n return 0;\n }\n else {\n return val;\n }\n});\n","export const Sepia = function (imageData) {\n var data = imageData.data, nPixels = data.length, i, r, g, b;\n for (i = 0; i < nPixels; i += 4) {\n r = data[i + 0];\n g = data[i + 1];\n b = data[i + 2];\n data[i + 0] = Math.min(255, r * 0.393 + g * 0.769 + b * 0.189);\n data[i + 1] = Math.min(255, r * 0.349 + g * 0.686 + b * 0.168);\n data[i + 2] = Math.min(255, r * 0.272 + g * 0.534 + b * 0.131);\n }\n};\n","export const Solarize = function (imageData) {\n var data = imageData.data, w = imageData.width, h = imageData.height, w4 = w * 4, y = h;\n do {\n var offsetY = (y - 1) * w4;\n var x = w;\n do {\n var offset = offsetY + (x - 1) * 4;\n var r = data[offset];\n var g = data[offset + 1];\n var b = data[offset + 2];\n if (r > 127) {\n r = 255 - r;\n }\n if (g > 127) {\n g = 255 - g;\n }\n if (b > 127) {\n b = 255 - b;\n }\n data[offset] = r;\n data[offset + 1] = g;\n data[offset + 2] = b;\n } while (--x);\n } while (--y);\n};\n","import { Factory } from '../Factory.js';\nimport { Node } from '../Node.js';\nimport { getNumberValidator } from '../Validators.js';\nexport const Threshold = function (imageData) {\n var level = this.threshold() * 255, data = imageData.data, len = data.length, i;\n for (i = 0; i < len; i += 1) {\n data[i] = data[i] < level ? 0 : 255;\n }\n};\nFactory.addGetterSetter(Node, 'threshold', 0.5, getNumberValidator(), Factory.afterSetFilter);\n","import { Konva as Core } from './_CoreInternals.js';\nimport { Arc } from './shapes/Arc.js';\nimport { Arrow } from './shapes/Arrow.js';\nimport { Circle } from './shapes/Circle.js';\nimport { Ellipse } from './shapes/Ellipse.js';\nimport { Image } from './shapes/Image.js';\nimport { Label, Tag } from './shapes/Label.js';\nimport { Line } from './shapes/Line.js';\nimport { Path } from './shapes/Path.js';\nimport { Rect } from './shapes/Rect.js';\nimport { RegularPolygon } from './shapes/RegularPolygon.js';\nimport { Ring } from './shapes/Ring.js';\nimport { Sprite } from './shapes/Sprite.js';\nimport { Star } from './shapes/Star.js';\nimport { Text } from './shapes/Text.js';\nimport { TextPath } from './shapes/TextPath.js';\nimport { Transformer } from './shapes/Transformer.js';\nimport { Wedge } from './shapes/Wedge.js';\nimport { Blur } from './filters/Blur.js';\nimport { Brighten } from './filters/Brighten.js';\nimport { Contrast } from './filters/Contrast.js';\nimport { Emboss } from './filters/Emboss.js';\nimport { Enhance } from './filters/Enhance.js';\nimport { Grayscale } from './filters/Grayscale.js';\nimport { HSL } from './filters/HSL.js';\nimport { HSV } from './filters/HSV.js';\nimport { Invert } from './filters/Invert.js';\nimport { Kaleidoscope } from './filters/Kaleidoscope.js';\nimport { Mask } from './filters/Mask.js';\nimport { Noise } from './filters/Noise.js';\nimport { Pixelate } from './filters/Pixelate.js';\nimport { Posterize } from './filters/Posterize.js';\nimport { RGB } from './filters/RGB.js';\nimport { RGBA } from './filters/RGBA.js';\nimport { Sepia } from './filters/Sepia.js';\nimport { Solarize } from './filters/Solarize.js';\nimport { Threshold } from './filters/Threshold.js';\nexport const Konva = Core.Util._assign(Core, {\n Arc,\n Arrow,\n Circle,\n Ellipse,\n Image,\n Label,\n Tag,\n Line,\n Path,\n Rect,\n RegularPolygon,\n Ring,\n Sprite,\n Star,\n Text,\n TextPath,\n Transformer,\n Wedge,\n Filters: {\n Blur,\n Brighten,\n Contrast,\n Emboss,\n Enhance,\n Grayscale,\n HSL,\n HSV,\n Invert,\n Kaleidoscope,\n Mask,\n Noise,\n Pixelate,\n Posterize,\n RGB,\n RGBA,\n Sepia,\n Solarize,\n Threshold,\n },\n});\n","/**\n * @license React\n * react-reconciler.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nmodule.exports = function $$$reconciler($$$hostConfig) {\n var exports = {};\n'use strict';var aa=require(\"react\"),ba=require(\"scheduler\"),ca=Object.assign;function m(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;ch||e[g]!==f[h]){var k=\"\\n\"+e[g].replace(\" at new \",\" at \");a.displayName&&k.includes(\"\")&&(k=k.replace(\"\",a.displayName));return k}while(1<=g&&0<=h)}break}}}finally{dc=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:\"\")?cc(a):\"\"}var fc=Object.prototype.hasOwnProperty,gc=[],hc=-1;function ic(a){return{current:a}}\nfunction q(a){0>hc||(a.current=gc[hc],gc[hc]=null,hc--)}function v(a,b){hc++;gc[hc]=a.current;a.current=b}var jc={},x=ic(jc),z=ic(!1),kc=jc;function lc(a,b){var c=a.type.contextTypes;if(!c)return jc;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}\nfunction A(a){a=a.childContextTypes;return null!==a&&void 0!==a}function mc(){q(z);q(x)}function nc(a,b,c){if(x.current!==jc)throw Error(m(168));v(x,b);v(z,c)}function oc(a,b,c){var d=a.stateNode;b=b.childContextTypes;if(\"function\"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in b))throw Error(m(108,va(a)||\"Unknown\",e));return ca({},c,d)}\nfunction pc(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||jc;kc=x.current;v(x,a);v(z,z.current);return!0}function rc(a,b,c){var d=a.stateNode;if(!d)throw Error(m(169));c?(a=oc(a,b,kc),d.__reactInternalMemoizedMergedChildContext=a,q(z),q(x),v(x,a)):q(z);v(z,c)}var tc=Math.clz32?Math.clz32:sc,uc=Math.log,vc=Math.LN2;function sc(a){a>>>=0;return 0===a?32:31-(uc(a)/vc|0)|0}var wc=64,xc=4194304;\nfunction yc(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;\ndefault:return a}}function zc(a,b){var c=a.pendingLanes;if(0===c)return 0;var d=0,e=a.suspendedLanes,f=a.pingedLanes,g=c&268435455;if(0!==g){var h=g&~e;0!==h?d=yc(h):(f&=g,0!==f&&(d=yc(f)))}else g=c&~e,0!==g?d=yc(g):0!==f&&(d=yc(f));if(0===d)return 0;if(0!==b&&b!==d&&0===(b&e)&&(e=d&-d,f=b&-b,e>=f||16===e&&0!==(f&4194240)))return b;0!==(d&4)&&(d|=c&16);b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0c;c++)b.push(a);return b}\nfunction Fc(a,b,c){a.pendingLanes|=b;536870912!==b&&(a.suspendedLanes=0,a.pingedLanes=0);a=a.eventTimes;b=31-tc(b);a[b]=c}function Gc(a,b){var c=a.pendingLanes&~b;a.pendingLanes=b;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=b;a.mutableReadLanes&=b;a.entangledLanes&=b;b=a.entanglements;var d=a.eventTimes;for(a=a.expirationTimes;0>=g;e-=g;id=1<<32-tc(b)+e|c<u?(E=r,r=null):E=r.sibling;var y=p(e,r,h[u],k);if(null===y){null===r&&(r=E);break}a&&r&&null===y.alternate&&b(e,r);g=f(y,g,u);null===n?l=y:n.sibling=y;n=y;r=E}if(u===h.length)return c(e,r),F&&kd(e,u),l;if(null===r){for(;uu?(E=r,r=null):E=r.sibling;var w=p(e,r,y.value,k);if(null===w){null===r&&(r=E);break}a&&r&&null===w.alternate&&b(e,r);g=f(w,g,u);null===n?l=w:n.sibling=w;n=w;r=E}if(y.done)return c(e,\nr),F&&kd(e,u),l;if(null===r){for(;!y.done;u++,y=h.next())y=t(e,y.value,k),null!==y&&(g=f(y,g,u),null===n?l=y:n.sibling=y,n=y);F&&kd(e,u);return l}for(r=d(e,r);!y.done;u++,y=h.next())y=B(r,e,u,y.value,k),null!==y&&(a&&null!==y.alternate&&r.delete(null===y.key?u:y.key),g=f(y,g,u),null===n?l=y:n.sibling=y,n=y);a&&r.forEach(function(a){return b(e,a)});F&&kd(e,u);return l}function za(a,d,f,h){\"object\"===typeof f&&null!==f&&f.type===ha&&null===f.key&&(f=f.props.children);if(\"object\"===typeof f&&null!==\nf){switch(f.$$typeof){case ea:a:{for(var k=f.key,l=d;null!==l;){if(l.key===k){k=f.type;if(k===ha){if(7===l.tag){c(a,l.sibling);d=e(l,f.props.children);d.return=a;a=d;break a}}else if(l.elementType===k||\"object\"===typeof k&&null!==k&&k.$$typeof===qa&&oe(k)===l.type){c(a,l.sibling);d=e(l,f.props);d.ref=me(a,l,f);d.return=a;a=d;break a}c(a,l);break}else b(a,l);l=l.sibling}f.type===ha?(d=ue(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=se(f.type,f.key,f.props,null,a.mode,h),h.ref=me(a,d,f),h.return=\na,a=h)}return g(a);case fa:a:{for(l=f.key;null!==d;){if(d.key===l)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=te(f,a.mode,h);d.return=a;a=d}return g(a);case qa:return l=f._init,za(a,d,l(f._payload),h)}if(Da(f))return w(a,d,f,h);if(ta(f))return Z(a,d,f,h);ne(a,f)}return\"string\"===typeof f&&\"\"!==f||\"number\"===typeof f?(f=\"\"+f,null!==d&&\n6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=re(f,a.mode,h),d.return=a,a=d),g(a)):c(a,d)}return za}var ve=pe(!0),we=pe(!1),xe={},ye=ic(xe),ze=ic(xe),Ae=ic(xe);function Be(a){if(a===xe)throw Error(m(174));return a}function Ce(a,b){v(Ae,b);v(ze,a);v(ye,xe);a=Fa(b);q(ye);v(ye,a)}function De(){q(ye);q(ze);q(Ae)}function Ee(a){var b=Be(Ae.current),c=Be(ye.current);b=Ga(c,a.type,b);c!==b&&(v(ze,a),v(ye,b))}function Fe(a){ze.current===a&&(q(ye),q(ze))}var J=ic(0);\nfunction Ge(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||Jb(c)||Kb(c)))return b}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&128))return b}else if(null!==b.child){b.child.return=b;b=b.child;continue}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return}b.sibling.return=b.return;b=b.sibling}return null}var He=[];\nfunction Ie(){for(var a=0;ac?c:4;a(!0);var d=Ke.transition;Ke.transition={};try{a(!1),b()}finally{C=c,Ke.transition=d}}function Af(){return Ye().memoizedState}\nfunction Bf(a,b,c){var d=fe(a);c={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Cf(a))Df(b,c);else if(c=Sd(a,b,c,d),null!==c){var e=I();ge(c,a,d,e);Ef(c,b,d)}}\nfunction mf(a,b,c){var d=fe(a),e={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Cf(a))Df(b,e);else{var f=a.alternate;if(0===a.lanes&&(null===f||0===f.lanes)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.hasEagerState=!0;e.eagerState=h;if(Vc(h,g)){var k=b.interleaved;null===k?(e.next=e,Rd(b)):(e.next=k.next,k.next=e);b.interleaved=e;return}}catch(l){}finally{}c=Sd(a,b,e,d);null!==c&&(e=I(),ge(c,a,d,e),Ef(c,b,d))}}\nfunction Cf(a){var b=a.alternate;return a===K||null!==b&&b===K}function Df(a,b){Ne=Me=!0;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}function Ef(a,b,c){if(0!==(c&4194240)){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Hc(a,c)}}\nvar Ve={readContext:Pd,useCallback:N,useContext:N,useEffect:N,useImperativeHandle:N,useInsertionEffect:N,useLayoutEffect:N,useMemo:N,useReducer:N,useRef:N,useState:N,useDebugValue:N,useDeferredValue:N,useTransition:N,useMutableSource:N,useSyncExternalStore:N,useId:N,unstable_isNewReconciler:!1},Se={readContext:Pd,useCallback:function(a,b){Xe().memoizedState=[a,void 0===b?null:b];return a},useContext:Pd,useEffect:qf,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return of(4194308,\n4,tf.bind(null,b,a),c)},useLayoutEffect:function(a,b){return of(4194308,4,a,b)},useInsertionEffect:function(a,b){return of(4,2,a,b)},useMemo:function(a,b){var c=Xe();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=Xe();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};d.queue=a;a=a.dispatch=Bf.bind(null,K,a);return[d.memoizedState,a]},useRef:function(a){var b=\nXe();a={current:a};return b.memoizedState=a},useState:lf,useDebugValue:vf,useDeferredValue:function(a){return Xe().memoizedState=a},useTransition:function(){var a=lf(!1),b=a[0];a=zf.bind(null,a[1]);Xe().memoizedState=a;return[b,a]},useMutableSource:function(){},useSyncExternalStore:function(a,b,c){var d=K,e=Xe();if(F){if(void 0===c)throw Error(m(407));c=c()}else{c=b();if(null===O)throw Error(m(349));0!==(Le&30)||hf(d,b,c)}e.memoizedState=c;var f={value:c,getSnapshot:b};e.queue=f;qf(ef.bind(null,d,\nf,a),[a]);d.flags|=2048;ff(9,gf.bind(null,d,f,c,b),void 0,null);return c},useId:function(){var a=Xe(),b=O.identifierPrefix;if(F){var c=jd;var d=id;c=(d&~(1<<32-tc(d)-1)).toString(32)+c;b=\":\"+b+\"R\"+c;c=Oe++;0Eg&&(b.flags|=128,d=!0,Bg(e,!1),b.lanes=4194304)}else{if(!d)if(a=Ge(f),null!==a){if(b.flags|=128,d=!0,a=a.updateQueue,null!==a&&(b.updateQueue=a,b.flags|=4),Bg(e,!0),null===e.tail&&\"hidden\"===e.tailMode&&!f.alternate&&!F)return Q(b),null}else 2*D()-e.renderingStartTime>Eg&&1073741824!==c&&(b.flags|=128,d=!0,Bg(e,!1),b.lanes=\n4194304);e.isBackwards?(f.sibling=b.child,b.child=f):(a=e.last,null!==a?a.sibling=f:b.child=f,e.last=f)}if(null!==e.tail)return b=e.tail,e.rendering=b,e.tail=b.sibling,e.renderingStartTime=D(),b.sibling=null,a=J.current,v(J,d?a&1|2:a&1),b;Q(b);return null;case 22:case 23:return Fg(),c=null!==b.memoizedState,null!==a&&null!==a.memoizedState!==c&&(b.flags|=8192),c&&0!==(b.mode&1)?0!==(ag&1073741824)&&(Q(b),Ta&&b.subtreeFlags&6&&(b.flags|=8192)):Q(b),null;case 24:return null;case 25:return null}throw Error(m(156,\nb.tag));}\nfunction Gg(a,b){nd(b);switch(b.tag){case 1:return A(b.type)&&mc(),a=b.flags,a&65536?(b.flags=a&-65537|128,b):null;case 3:return De(),q(z),q(x),Ie(),a=b.flags,0!==(a&65536)&&0===(a&128)?(b.flags=a&-65537|128,b):null;case 5:return Fe(b),null;case 13:q(J);a=b.memoizedState;if(null!==a&&null!==a.dehydrated){if(null===b.alternate)throw Error(m(340));Ad()}a=b.flags;return a&65536?(b.flags=a&-65537|128,b):null;case 19:return q(J),null;case 4:return De(),null;case 10:return Md(b.type._context),null;case 22:case 23:return Fg(),\nnull;case 24:return null;default:return null}}var Hg=!1,S=!1,Ig=\"function\"===typeof WeakSet?WeakSet:Set,T=null;function Jg(a,b){var c=a.ref;if(null!==c)if(\"function\"===typeof c)try{c(null)}catch(d){U(a,b,d)}else c.current=null}function Kg(a,b,c){try{c()}catch(d){U(a,b,d)}}var Lg=!1;\nfunction Mg(a,b){Ha(a.containerInfo);for(T=b;null!==T;)if(a=T,b=a.child,0!==(a.subtreeFlags&1028)&&null!==b)b.return=a,T=b;else for(;null!==T;){a=T;try{var c=a.alternate;if(0!==(a.flags&1024))switch(a.tag){case 0:case 11:case 15:break;case 1:if(null!==c){var d=c.memoizedProps,e=c.memoizedState,f=a.stateNode,g=f.getSnapshotBeforeUpdate(a.elementType===a.type?d:Fd(a.type,d),e);f.__reactInternalSnapshotBeforeUpdate=g}break;case 3:Ta&&xb(a.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;\ndefault:throw Error(m(163));}}catch(h){U(a,a.return,h)}b=a.sibling;if(null!==b){b.return=a.return;T=b;break}T=a.return}c=Lg;Lg=!1;return c}function Ng(a,b,c){var d=b.updateQueue;d=null!==d?d.lastEffect:null;if(null!==d){var e=d=d.next;do{if((e.tag&a)===a){var f=e.destroy;e.destroy=void 0;void 0!==f&&Kg(b,c,f)}e=e.next}while(e!==d)}}function Og(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}\nfunction Pg(a){var b=a.ref;if(null!==b){var c=a.stateNode;switch(a.tag){case 5:a=Ea(c);break;default:a=c}\"function\"===typeof b?b(a):b.current=a}}function Qg(a){var b=a.alternate;null!==b&&(a.alternate=null,Qg(b));a.child=null;a.deletions=null;a.sibling=null;5===a.tag&&(b=a.stateNode,null!==b&&Za(b));a.stateNode=null;a.return=null;a.dependencies=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.stateNode=null;a.updateQueue=null}\nfunction Rg(a){return 5===a.tag||3===a.tag||4===a.tag}function Sg(a){a:for(;;){for(;null===a.sibling;){if(null===a.return||Rg(a.return))return null;a=a.return}a.sibling.return=a.return;for(a=a.sibling;5!==a.tag&&6!==a.tag&&18!==a.tag;){if(a.flags&2)continue a;if(null===a.child||4===a.tag)continue a;else a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}\nfunction Tg(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?pb(c,a,b):kb(c,a);else if(4!==d&&(a=a.child,null!==a))for(Tg(a,b,c),a=a.sibling;null!==a;)Tg(a,b,c),a=a.sibling}function Ug(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?ob(c,a,b):jb(c,a);else if(4!==d&&(a=a.child,null!==a))for(Ug(a,b,c),a=a.sibling;null!==a;)Ug(a,b,c),a=a.sibling}var V=null,Vg=!1;function Wg(a,b,c){for(c=c.child;null!==c;)Xg(a,b,c),c=c.sibling}\nfunction Xg(a,b,c){if(Sc&&\"function\"===typeof Sc.onCommitFiberUnmount)try{Sc.onCommitFiberUnmount(Rc,c)}catch(h){}switch(c.tag){case 5:S||Jg(c,b);case 6:if(Ta){var d=V,e=Vg;V=null;Wg(a,b,c);V=d;Vg=e;null!==V&&(Vg?rb(V,c.stateNode):qb(V,c.stateNode))}else Wg(a,b,c);break;case 18:Ta&&null!==V&&(Vg?Yb(V,c.stateNode):Xb(V,c.stateNode));break;case 4:Ta?(d=V,e=Vg,V=c.stateNode.containerInfo,Vg=!0,Wg(a,b,c),V=d,Vg=e):(Ua&&(d=c.stateNode.containerInfo,e=zb(d),Cb(d,e)),Wg(a,b,c));break;case 0:case 11:case 14:case 15:if(!S&&\n(d=c.updateQueue,null!==d&&(d=d.lastEffect,null!==d))){e=d=d.next;do{var f=e,g=f.destroy;f=f.tag;void 0!==g&&(0!==(f&2)?Kg(c,b,g):0!==(f&4)&&Kg(c,b,g));e=e.next}while(e!==d)}Wg(a,b,c);break;case 1:if(!S&&(Jg(c,b),d=c.stateNode,\"function\"===typeof d.componentWillUnmount))try{d.props=c.memoizedProps,d.state=c.memoizedState,d.componentWillUnmount()}catch(h){U(c,b,h)}Wg(a,b,c);break;case 21:Wg(a,b,c);break;case 22:c.mode&1?(S=(d=S)||null!==c.memoizedState,Wg(a,b,c),S=d):Wg(a,b,c);break;default:Wg(a,b,\nc)}}function Yg(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Ig);b.forEach(function(b){var d=Zg.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}\nfunction $g(a,b){var c=b.deletions;if(null!==c)for(var d=0;d\";case jh:return\":has(\"+(qh(a)||\"\")+\")\";case kh:return'[role=\"'+a.value+'\"]';case mh:return'\"'+a.value+'\"';case lh:return'[data-testname=\"'+a.value+'\"]';default:throw Error(m(365));}}\nfunction rh(a,b){var c=[];a=[a,0];for(var d=0;de&&(e=g);d&=~f}d=e;d=D()-d;d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*th(d/1960))-d;if(10a?16:a;if(null===Eh)var d=!1;else{a=Eh;Eh=null;Fh=0;if(0!==(H&6))throw Error(m(331));var e=H;H|=4;for(T=a.current;null!==T;){var f=T,g=f.child;if(0!==(T.flags&16)){var h=f.deletions;if(null!==h){for(var k=0;kD()-ch?Sh(a,0):yh|=c);Lh(a,b)}function ei(a,b){0===b&&(0===(a.mode&1)?b=1:(b=xc,xc<<=1,0===(xc&130023424)&&(xc=4194304)));var c=I();a=Td(a,b);null!==a&&(Fc(a,b,c),Lh(a,c))}function pg(a){var b=a.memoizedState,c=0;null!==b&&(c=b.retryLane);ei(a,c)}\nfunction Zg(a,b){var c=0;switch(a.tag){case 13:var d=a.stateNode;var e=a.memoizedState;null!==e&&(c=e.retryLane);break;case 19:d=a.stateNode;break;default:throw Error(m(314));}null!==d&&d.delete(b);ei(a,c)}var bi;\nbi=function(a,b,c){if(null!==a)if(a.memoizedProps!==b.pendingProps||z.current)G=!0;else{if(0===(a.lanes&c)&&0===(b.flags&128))return G=!1,tg(a,b,c);G=0!==(a.flags&131072)?!0:!1}else G=!1,F&&0!==(b.flags&1048576)&&ld(b,ed,b.index);b.lanes=0;switch(b.tag){case 2:var d=b.type;dg(a,b);a=b.pendingProps;var e=lc(b,x.current);Od(b,c);e=Re(null,b,d,a,e,c);var f=We();b.flags|=1;\"object\"===typeof e&&null!==e&&\"function\"===typeof e.render&&void 0===e.$$typeof?(b.tag=1,b.memoizedState=null,b.updateQueue=null,\nA(d)?(f=!0,pc(b)):f=!1,b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,Vd(b),e.updater=he,b.stateNode=e,e._reactInternals=b,le(b,d,a,c),b=eg(null,b,d,!0,f,c)):(b.tag=0,F&&f&&md(b),P(null,b,e,c),b=b.child);return b;case 16:d=b.elementType;a:{dg(a,b);a=b.pendingProps;e=d._init;d=e(d._payload);b.type=d;e=b.tag=fi(d);a=Fd(d,a);switch(e){case 0:b=Yf(null,b,d,a,c);break a;case 1:b=cg(null,b,d,a,c);break a;case 11:b=Tf(null,b,d,a,c);break a;case 14:b=Vf(null,b,d,Fd(d.type,a),c);break a}throw Error(m(306,\nd,\"\"));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Fd(d,e),Yf(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Fd(d,e),cg(a,b,d,e,c);case 3:a:{fg(b);if(null===a)throw Error(m(387));d=b.pendingProps;f=b.memoizedState;e=f.element;Wd(a,b);ae(b,d,null,c);var g=b.memoizedState;d=g.element;if(Va&&f.isDehydrated)if(f={element:d,isDehydrated:!1,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},b.updateQueue.baseState=\nf,b.memoizedState=f,b.flags&256){e=Ff(Error(m(423)),b);b=gg(a,b,d,c,e);break a}else if(d!==e){e=Ff(Error(m(424)),b);b=gg(a,b,d,c,e);break a}else for(Va&&(pd=Pb(b.stateNode.containerInfo),od=b,F=!0,rd=null,qd=!1),c=we(b,null,d,c),b.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{Ad();if(d===e){b=Uf(a,b,c);break a}P(a,b,d,c)}b=b.child}return b;case 5:return Ee(b),null===a&&wd(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Na(d,e)?g=null:null!==f&&Na(d,f)&&(b.flags|=32),\nbg(a,b),P(a,b,g,c),b.child;case 6:return null===a&&wd(b),null;case 13:return jg(a,b,c);case 4:return Ce(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=ve(b,null,d,c):P(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Fd(d,e),Tf(a,b,d,e,c);case 7:return P(a,b,b.pendingProps,c),b.child;case 8:return P(a,b,b.pendingProps.children,c),b.child;case 12:return P(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;f=b.memoizedProps;\ng=e.value;Ld(b,d,g);if(null!==f)if(Vc(f.value,g)){if(f.children===e.children&&!z.current){b=Uf(a,b,c);break a}}else for(f=b.child,null!==f&&(f.return=b);null!==f;){var h=f.dependencies;if(null!==h){g=f.child;for(var k=h.firstContext;null!==k;){if(k.context===d){if(1===f.tag){k=Xd(-1,c&-c);k.tag=2;var l=f.updateQueue;if(null!==l){l=l.shared;var n=l.pending;null===n?k.next=k:(k.next=n.next,n.next=k);l.pending=k}}f.lanes|=c;k=f.alternate;null!==k&&(k.lanes|=c);Nd(f.return,c,b);h.lanes|=c;break}k=k.next}}else if(10===\nf.tag)g=f.type===b.type?null:f.child;else if(18===f.tag){g=f.return;if(null===g)throw Error(m(341));g.lanes|=c;h=g.alternate;null!==h&&(h.lanes|=c);Nd(g,c,b);g=f.sibling}else g=f.child;if(null!==g)g.return=f;else for(g=f;null!==g;){if(g===b){g=null;break}f=g.sibling;if(null!==f){f.return=g.return;g=f;break}g=g.return}f=g}P(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,d=b.pendingProps.children,Od(b,c),e=Pd(e),d=d(e),b.flags|=1,P(a,b,d,c),b.child;case 14:return d=b.type,e=Fd(d,b.pendingProps),\ne=Fd(d.type,e),Vf(a,b,d,e,c);case 15:return Xf(a,b,b.type,b.pendingProps,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Fd(d,e),dg(a,b),b.tag=1,A(d)?(a=!0,pc(b)):a=!1,Od(b,c),je(b,d,e),le(b,d,e,c),eg(null,b,d,!0,a,c);case 19:return sg(a,b,c);case 22:return Zf(a,b,c)}throw Error(m(156,b.tag));};function Nh(a,b){return Jc(a,b)}\nfunction gi(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null}function td(a,b,c,d){return new gi(a,b,c,d)}function Wf(a){a=a.prototype;return!(!a||!a.isReactComponent)}\nfunction fi(a){if(\"function\"===typeof a)return Wf(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===ma)return 11;if(a===pa)return 14}return 2}\nfunction qe(a,b){var c=a.alternate;null===c?(c=td(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null);c.flags=a.flags&14680064;c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext};\nc.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}\nfunction se(a,b,c,d,e,f){var g=2;d=a;if(\"function\"===typeof a)Wf(a)&&(g=1);else if(\"string\"===typeof a)g=5;else a:switch(a){case ha:return ue(c.children,e,f,b);case ia:g=8;e|=8;break;case ja:return a=td(12,c,b,e|2),a.elementType=ja,a.lanes=f,a;case na:return a=td(13,c,b,e),a.elementType=na,a.lanes=f,a;case oa:return a=td(19,c,b,e),a.elementType=oa,a.lanes=f,a;case ra:return kg(c,e,f,b);default:if(\"object\"===typeof a&&null!==a)switch(a.$$typeof){case ka:g=10;break a;case la:g=9;break a;case ma:g=11;\nbreak a;case pa:g=14;break a;case qa:g=16;d=null;break a}throw Error(m(130,null==a?a:typeof a,\"\"));}b=td(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function ue(a,b,c,d){a=td(7,a,d,b);a.lanes=c;return a}function kg(a,b,c,d){a=td(22,a,d,b);a.elementType=ra;a.lanes=c;a.stateNode={isHidden:!1};return a}function re(a,b,c){a=td(6,a,null,b);a.lanes=c;return a}\nfunction te(a,b,c){b=td(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}\nfunction hi(a,b,c,d,e){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=Ra;this.callbackNode=this.pendingContext=this.context=null;this.callbackPriority=0;this.eventTimes=Ec(0);this.expirationTimes=Ec(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=Ec(0);this.identifierPrefix=d;this.onRecoverableError=e;Va&&(this.mutableSourceEagerHydrationData=\nnull)}function ii(a,b,c,d,e,f,g,h,k){a=new hi(a,b,c,h,k);1===b?(b=1,!0===f&&(b|=8)):b=0;f=td(3,null,null,b);a.current=f;f.stateNode=a;f.memoizedState={element:d,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null};Vd(f);return a}\nfunction ji(a){if(!a)return jc;a=a._reactInternals;a:{if(wa(a)!==a||1!==a.tag)throw Error(m(170));var b=a;do{switch(b.tag){case 3:b=b.stateNode.context;break a;case 1:if(A(b.type)){b=b.stateNode.__reactInternalMemoizedMergedChildContext;break a}}b=b.return}while(null!==b);throw Error(m(171));}if(1===a.tag){var c=a.type;if(A(c))return oc(a,c,b)}return b}\nfunction ki(a){var b=a._reactInternals;if(void 0===b){if(\"function\"===typeof a.render)throw Error(m(188));a=Object.keys(a).join(\",\");throw Error(m(268,a));}a=Aa(b);return null===a?null:a.stateNode}function li(a,b){a=a.memoizedState;if(null!==a&&null!==a.dehydrated){var c=a.retryLane;a.retryLane=0!==c&&c=l&&f>=t&&e<=n&&g<=p){a.splice(b,1);break}else if(!(d!==l||c.width!==k.width||pg)){t>f&&(k.height+=t-f,k.y=f);pe)){l>d&&(k.width+=\nl-d,k.x=d);nc&&(c=g)),g \")+\"\\n\\nNo matching component was found for:\\n \")+a.join(\" > \")}return null};\nexports.getPublicRootInstance=function(a){a=a.current;if(!a.child)return null;switch(a.child.tag){case 5:return Ea(a.child.stateNode);default:return a.child.stateNode}};\nexports.injectIntoDevTools=function(a){a={bundleType:a.bundleType,version:a.version,rendererPackageName:a.rendererPackageName,rendererConfig:a.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:da.ReactCurrentDispatcher,findHostInstanceByFiber:ni,findFiberByHostInstance:a.findFiberByHostInstance||\noi,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:\"18.2.0\"};if(\"undefined\"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)a=!1;else{var b=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(b.isDisabled||!b.supportsFiber)a=!0;else{try{Rc=b.inject(a),Sc=b}catch(c){}a=b.checkDCE?!0:!1}}return a};exports.isAlreadyRendering=function(){return!1};\nexports.observeVisibleRects=function(a,b,c,d){if(!bb)throw Error(m(363));a=sh(a,b);var e=ib(a,c,d).disconnect;return{disconnect:function(){e()}}};exports.registerMutableSourceForHydration=function(a,b){var c=b._getVersion;c=c(b._source);null==a.mutableSourceEagerHydrationData?a.mutableSourceEagerHydrationData=[b,c]:a.mutableSourceEagerHydrationData.push(b,c)};exports.runWithPriority=function(a,b){var c=C;try{return C=a,b()}finally{C=c}};exports.shouldError=function(){return null};\nexports.shouldSuspend=function(){return!1};exports.updateContainer=function(a,b,c,d){var e=b.current,f=I(),g=fe(e);c=ji(c);null===b.context?b.context=c:b.pendingContext=c;b=Xd(f,g);b.payload={element:a};d=void 0===d?null:d;null!==d&&(b.callback=d);a=Yd(e,b,g);null!==a&&(ge(a,e,g,f),Zd(a,e,g));return g};\n\n return exports;\n};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-reconciler.production.min.js');\n} else {\n module.exports = require('./cjs/react-reconciler.development.js');\n}\n","/**\n * @license React\n * react-reconciler-constants.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';exports.ConcurrentRoot=1;exports.ContinuousEventPriority=4;exports.DefaultEventPriority=16;exports.DiscreteEventPriority=1;exports.IdleEventPriority=536870912;exports.LegacyRoot=0;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-reconciler-constants.production.min.js');\n} else {\n module.exports = require('./cjs/react-reconciler-constants.development.js');\n}\n","import { Konva } from 'konva/lib/Global.js';\nconst propsToSkip = {\n children: true,\n ref: true,\n key: true,\n style: true,\n forwardedRef: true,\n unstable_applyCache: true,\n unstable_applyDrawHitFromCache: true,\n};\nlet zIndexWarningShowed = false;\nlet dragWarningShowed = false;\nexport const EVENTS_NAMESPACE = '.react-konva-event';\nlet useStrictMode = false;\nexport function toggleStrictMode(value) {\n useStrictMode = value;\n}\nconst DRAGGABLE_WARNING = `ReactKonva: You have a Konva node with draggable = true and position defined but no onDragMove or onDragEnd events are handled.\nPosition of a node will be changed during drag&drop, so you should update state of the react app as well.\nConsider to add onDragMove or onDragEnd events.\nFor more info see: https://github.com/konvajs/react-konva/issues/256\n`;\nconst Z_INDEX_WARNING = `ReactKonva: You are using \"zIndex\" attribute for a Konva node.\nreact-konva may get confused with ordering. Just define correct order of elements in your render function of a component.\nFor more info see: https://github.com/konvajs/react-konva/issues/194\n`;\nconst EMPTY_PROPS = {};\nexport function applyNodeProps(instance, props, oldProps = EMPTY_PROPS) {\n // don't use zIndex in react-konva\n if (!zIndexWarningShowed && 'zIndex' in props) {\n console.warn(Z_INDEX_WARNING);\n zIndexWarningShowed = true;\n }\n // check correct draggable usage\n if (!dragWarningShowed && props.draggable) {\n var hasPosition = props.x !== undefined || props.y !== undefined;\n var hasEvents = props.onDragEnd || props.onDragMove;\n if (hasPosition && !hasEvents) {\n console.warn(DRAGGABLE_WARNING);\n dragWarningShowed = true;\n }\n }\n // check old props\n // we need to unset properties that are not in new props\n // and remove all events\n for (var key in oldProps) {\n if (propsToSkip[key]) {\n continue;\n }\n var isEvent = key.slice(0, 2) === 'on';\n var propChanged = oldProps[key] !== props[key];\n // if that is a changed event, we need to remove it\n if (isEvent && propChanged) {\n var eventName = key.substr(2).toLowerCase();\n if (eventName.substr(0, 7) === 'content') {\n eventName =\n 'content' +\n eventName.substr(7, 1).toUpperCase() +\n eventName.substr(8);\n }\n instance.off(eventName, oldProps[key]);\n }\n var toRemove = !props.hasOwnProperty(key);\n if (toRemove) {\n instance.setAttr(key, undefined);\n }\n }\n var strictUpdate = useStrictMode || props._useStrictMode;\n var updatedProps = {};\n var hasUpdates = false;\n const newEvents = {};\n for (var key in props) {\n if (propsToSkip[key]) {\n continue;\n }\n var isEvent = key.slice(0, 2) === 'on';\n var toAdd = oldProps[key] !== props[key];\n if (isEvent && toAdd) {\n var eventName = key.substr(2).toLowerCase();\n if (eventName.substr(0, 7) === 'content') {\n eventName =\n 'content' +\n eventName.substr(7, 1).toUpperCase() +\n eventName.substr(8);\n }\n // check that event is not undefined\n if (props[key]) {\n newEvents[eventName] = props[key];\n }\n }\n if (!isEvent &&\n (props[key] !== oldProps[key] ||\n (strictUpdate && props[key] !== instance.getAttr(key)))) {\n hasUpdates = true;\n updatedProps[key] = props[key];\n }\n }\n if (hasUpdates) {\n instance.setAttrs(updatedProps);\n updatePicture(instance);\n }\n // subscribe to events AFTER we set attrs\n // we need it to fix https://github.com/konvajs/react-konva/issues/471\n // settings attrs may add events. Like \"draggable: true\" will add \"mousedown\" listener\n for (var eventName in newEvents) {\n instance.on(eventName + EVENTS_NAMESPACE, newEvents[eventName]);\n }\n}\nexport function updatePicture(node) {\n if (!Konva.autoDrawEnabled) {\n var drawingNode = node.getLayer() || node.getStage();\n drawingNode && drawingNode.batchDraw();\n }\n}\n","import Konva from 'konva/lib/Core.js';\nimport { applyNodeProps, updatePicture, EVENTS_NAMESPACE } from './makeUpdates.js';\nexport { unstable_now as now, unstable_IdlePriority as idlePriority, unstable_runWithPriority as run, } from 'scheduler';\nimport { DefaultEventPriority } from 'react-reconciler/constants.js';\nconst NO_CONTEXT = {};\nconst UPDATE_SIGNAL = {};\n// for react-spring capability\nKonva.Node.prototype._applyProps = applyNodeProps;\nexport function appendInitialChild(parentInstance, child) {\n if (typeof child === 'string') {\n // Noop for string children of Text (eg foo)\n console.error(`Do not use plain text as child of Konva.Node. You are using text: ${child}`);\n return;\n }\n parentInstance.add(child);\n updatePicture(parentInstance);\n}\nexport function createInstance(type, props, internalInstanceHandle) {\n let NodeClass = Konva[type];\n if (!NodeClass) {\n console.error(`Konva has no node with the type ${type}. Group will be used instead. If you use minimal version of react-konva, just import required nodes into Konva: \"import \"konva/lib/shapes/${type}\" If you want to render DOM elements as part of canvas tree take a look into this demo: https://konvajs.github.io/docs/react/DOM_Portal.html`);\n NodeClass = Konva.Group;\n }\n // we need to split props into events and non events\n // we we can pass non events into constructor directly\n // that way the performance should be better\n // we we apply change \"applyNodeProps\"\n // then it will trigger change events on first run\n // but we don't need them!\n const propsWithoutEvents = {};\n const propsWithOnlyEvents = {};\n for (var key in props) {\n var isEvent = key.slice(0, 2) === 'on';\n if (isEvent) {\n propsWithOnlyEvents[key] = props[key];\n }\n else {\n propsWithoutEvents[key] = props[key];\n }\n }\n const instance = new NodeClass(propsWithoutEvents);\n applyNodeProps(instance, propsWithOnlyEvents);\n return instance;\n}\nexport function createTextInstance(text, rootContainerInstance, internalInstanceHandle) {\n console.error(`Text components are not supported for now in ReactKonva. Your text is: \"${text}\"`);\n}\nexport function finalizeInitialChildren(domElement, type, props) {\n return false;\n}\nexport function getPublicInstance(instance) {\n return instance;\n}\nexport function prepareForCommit() {\n return null;\n}\nexport function preparePortalMount() {\n return null;\n}\nexport function prepareUpdate(domElement, type, oldProps, newProps) {\n return UPDATE_SIGNAL;\n}\nexport function resetAfterCommit() {\n // Noop\n}\nexport function resetTextContent(domElement) {\n // Noop\n}\nexport function shouldDeprioritizeSubtree(type, props) {\n return false;\n}\nexport function getRootHostContext() {\n return NO_CONTEXT;\n}\nexport function getChildHostContext() {\n return NO_CONTEXT;\n}\nexport const scheduleTimeout = setTimeout;\nexport const cancelTimeout = clearTimeout;\nexport const noTimeout = -1;\n// export const schedulePassiveEffects = scheduleDeferredCallback;\n// export const cancelPassiveEffects = cancelDeferredCallback;\nexport function shouldSetTextContent(type, props) {\n return false;\n}\n// The Konva renderer is secondary to the React DOM renderer.\nexport const isPrimaryRenderer = false;\nexport const warnsIfNotActing = true;\nexport const supportsMutation = true;\nexport function appendChild(parentInstance, child) {\n if (child.parent === parentInstance) {\n child.moveToTop();\n }\n else {\n parentInstance.add(child);\n }\n updatePicture(parentInstance);\n}\nexport function appendChildToContainer(parentInstance, child) {\n if (child.parent === parentInstance) {\n child.moveToTop();\n }\n else {\n parentInstance.add(child);\n }\n updatePicture(parentInstance);\n}\nexport function insertBefore(parentInstance, child, beforeChild) {\n // child._remove() will not stop dragging\n // but child.remove() will stop it, but we don't need it\n // removing will reset zIndexes\n child._remove();\n parentInstance.add(child);\n child.setZIndex(beforeChild.getZIndex());\n updatePicture(parentInstance);\n}\nexport function insertInContainerBefore(parentInstance, child, beforeChild) {\n insertBefore(parentInstance, child, beforeChild);\n}\nexport function removeChild(parentInstance, child) {\n child.destroy();\n child.off(EVENTS_NAMESPACE);\n updatePicture(parentInstance);\n}\nexport function removeChildFromContainer(parentInstance, child) {\n child.destroy();\n child.off(EVENTS_NAMESPACE);\n updatePicture(parentInstance);\n}\nexport function commitTextUpdate(textInstance, oldText, newText) {\n console.error(`Text components are not yet supported in ReactKonva. You text is: \"${newText}\"`);\n}\nexport function commitMount(instance, type, newProps) {\n // Noop\n}\nexport function commitUpdate(instance, updatePayload, type, oldProps, newProps) {\n applyNodeProps(instance, newProps, oldProps);\n}\nexport function hideInstance(instance) {\n instance.hide();\n updatePicture(instance);\n}\nexport function hideTextInstance(textInstance) {\n // Noop\n}\nexport function unhideInstance(instance, props) {\n if (props.visible == null || props.visible) {\n instance.show();\n }\n}\nexport function unhideTextInstance(textInstance, text) {\n // Noop\n}\nexport function clearContainer(container) {\n // Noop\n}\nexport function detachDeletedInstance() { }\nexport const getCurrentEventPriority = () => DefaultEventPriority;\n","import * as React from \"react\";\nvar __defProp = Object.defineProperty;\nvar __defProps = Object.defineProperties;\nvar __getOwnPropDescs = Object.getOwnPropertyDescriptors;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\nvar __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));\nfunction traverseFiber(fiber, ascending, selector) {\n if (!fiber)\n return;\n if (selector(fiber) === true)\n return fiber;\n let child = ascending ? fiber.return : fiber.child;\n while (child) {\n const match = traverseFiber(child, ascending, selector);\n if (match)\n return match;\n child = ascending ? null : child.sibling;\n }\n}\nfunction wrapContext(context) {\n try {\n return Object.defineProperties(context, {\n _currentRenderer: {\n get() {\n return null;\n },\n set() {\n }\n },\n _currentRenderer2: {\n get() {\n return null;\n },\n set() {\n }\n }\n });\n } catch (_) {\n return context;\n }\n}\nconst FiberContext = wrapContext(React.createContext(null));\nclass FiberProvider extends React.Component {\n render() {\n return /* @__PURE__ */ React.createElement(FiberContext.Provider, {\n value: this._reactInternals\n }, this.props.children);\n }\n}\nconst { ReactCurrentOwner, ReactCurrentDispatcher } = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\nfunction useFiber() {\n const root = React.useContext(FiberContext);\n if (root === null)\n throw new Error(\"its-fine: useFiber must be called within a !\");\n const id = React.useId();\n const fiber = React.useMemo(() => {\n for (const maybeFiber of [ReactCurrentOwner == null ? void 0 : ReactCurrentOwner.current, root, root == null ? void 0 : root.alternate]) {\n if (!maybeFiber)\n continue;\n const fiber2 = traverseFiber(maybeFiber, false, (node) => {\n let state = node.memoizedState;\n while (state) {\n if (state.memoizedState === id)\n return true;\n state = state.next;\n }\n });\n if (fiber2)\n return fiber2;\n }\n }, [root, id]);\n return fiber;\n}\nfunction useContainer() {\n const fiber = useFiber();\n const root = React.useMemo(\n () => traverseFiber(fiber, true, (node) => {\n var _a;\n return ((_a = node.stateNode) == null ? void 0 : _a.containerInfo) != null;\n }),\n [fiber]\n );\n return root == null ? void 0 : root.stateNode.containerInfo;\n}\nfunction useNearestChild(type) {\n const fiber = useFiber();\n const childRef = React.useRef();\n React.useLayoutEffect(() => {\n var _a;\n childRef.current = (_a = traverseFiber(\n fiber,\n false,\n (node) => typeof node.type === \"string\" && (type === void 0 || node.type === type)\n )) == null ? void 0 : _a.stateNode;\n }, [fiber]);\n return childRef;\n}\nfunction useNearestParent(type) {\n const fiber = useFiber();\n const parentRef = React.useRef();\n React.useLayoutEffect(() => {\n var _a;\n parentRef.current = (_a = traverseFiber(\n fiber,\n true,\n (node) => typeof node.type === \"string\" && (type === void 0 || node.type === type)\n )) == null ? void 0 : _a.stateNode;\n }, [fiber]);\n return parentRef;\n}\nfunction useContextMap() {\n var _a;\n const fiber = useFiber();\n const [contextMap] = React.useState(() => /* @__PURE__ */ new Map());\n contextMap.clear();\n let node = fiber;\n while (node) {\n if (node.type && typeof node.type === \"object\") {\n const context = \"Provider\" in node.type ? node.type : node.type._context;\n if (context && context !== FiberContext && !contextMap.has(context)) {\n contextMap.set(context, (_a = ReactCurrentDispatcher == null ? void 0 : ReactCurrentDispatcher.current) == null ? void 0 : _a.readContext(wrapContext(context)));\n }\n }\n node = node.return;\n }\n return contextMap;\n}\nfunction useContextBridge() {\n const contextMap = useContextMap();\n return React.useMemo(\n () => Array.from(contextMap.keys()).reduce(\n (Prev, context) => (props) => /* @__PURE__ */ React.createElement(Prev, null, /* @__PURE__ */ React.createElement(context.Provider, __spreadProps(__spreadValues({}, props), {\n value: contextMap.get(context)\n }))),\n (props) => /* @__PURE__ */ React.createElement(FiberProvider, __spreadValues({}, props))\n ),\n [contextMap]\n );\n}\nexport {\n FiberProvider,\n traverseFiber,\n useContainer,\n useContextBridge,\n useContextMap,\n useFiber,\n useNearestChild,\n useNearestParent\n};\n//# sourceMappingURL=index.js.map\n","/**\n * Based on ReactArt.js\n * Copyright (c) 2017-present Lavrenov Anton.\n * All rights reserved.\n *\n * MIT\n */\n'use strict';\nimport React from 'react';\nimport Konva from 'konva/lib/Core.js';\nimport ReactFiberReconciler from 'react-reconciler';\nimport { LegacyRoot } from 'react-reconciler/constants.js';\nimport * as HostConfig from './ReactKonvaHostConfig.js';\nimport { applyNodeProps, toggleStrictMode } from './makeUpdates.js';\nimport { useContextBridge, FiberProvider } from 'its-fine';\nfunction usePrevious(value) {\n const ref = React.useRef({});\n React.useLayoutEffect(() => {\n ref.current = value;\n });\n React.useLayoutEffect(() => {\n return () => {\n // when using suspense it is possible that stage is unmounted\n // but React still keep component ref\n // in that case we need to manually flush props\n // we have a special test for that\n ref.current = {};\n };\n }, []);\n return ref.current;\n}\nconst StageWrap = (props) => {\n const container = React.useRef();\n const stage = React.useRef();\n const fiberRef = React.useRef();\n const oldProps = usePrevious(props);\n const Bridge = useContextBridge();\n const _setRef = (stage) => {\n const { forwardedRef } = props;\n if (!forwardedRef) {\n return;\n }\n if (typeof forwardedRef === 'function') {\n forwardedRef(stage);\n }\n else {\n forwardedRef.current = stage;\n }\n };\n React.useLayoutEffect(() => {\n stage.current = new Konva.Stage({\n width: props.width,\n height: props.height,\n container: container.current,\n });\n _setRef(stage.current);\n // @ts-ignore\n fiberRef.current = KonvaRenderer.createContainer(stage.current, LegacyRoot, false, null);\n KonvaRenderer.updateContainer(React.createElement(Bridge, {}, props.children), fiberRef.current);\n return () => {\n if (!Konva.isBrowser) {\n return;\n }\n _setRef(null);\n KonvaRenderer.updateContainer(null, fiberRef.current, null);\n stage.current.destroy();\n };\n }, []);\n React.useLayoutEffect(() => {\n _setRef(stage.current);\n applyNodeProps(stage.current, props, oldProps);\n KonvaRenderer.updateContainer(React.createElement(Bridge, {}, props.children), fiberRef.current, null);\n });\n return React.createElement('div', {\n ref: container,\n id: props.id,\n accessKey: props.accessKey,\n className: props.className,\n role: props.role,\n style: props.style,\n tabIndex: props.tabIndex,\n title: props.title,\n });\n};\nexport const Layer = 'Layer';\nexport const FastLayer = 'FastLayer';\nexport const Group = 'Group';\nexport const Label = 'Label';\nexport const Rect = 'Rect';\nexport const Circle = 'Circle';\nexport const Ellipse = 'Ellipse';\nexport const Wedge = 'Wedge';\nexport const Line = 'Line';\nexport const Sprite = 'Sprite';\nexport const Image = 'Image';\nexport const Text = 'Text';\nexport const TextPath = 'TextPath';\nexport const Star = 'Star';\nexport const Ring = 'Ring';\nexport const Arc = 'Arc';\nexport const Tag = 'Tag';\nexport const Path = 'Path';\nexport const RegularPolygon = 'RegularPolygon';\nexport const Arrow = 'Arrow';\nexport const Shape = 'Shape';\nexport const Transformer = 'Transformer';\n// @ts-ignore\nexport const KonvaRenderer = ReactFiberReconciler(HostConfig);\nKonvaRenderer.injectIntoDevTools({\n // @ts-ignore\n findHostInstanceByFiber: () => null,\n bundleType: process.env.NODE_ENV !== 'production' ? 1 : 0,\n version: React.version,\n rendererPackageName: 'react-konva',\n});\nexport const Stage = React.forwardRef((props, ref) => {\n return React.createElement(FiberProvider, {}, React.createElement(StageWrap, { ...props, forwardedRef: ref }));\n});\nexport const useStrictMode = toggleStrictMode;\n","var getDimensionsMinimalRatio=function(a,b,c,d){return Math.min(a/c,b/d)||1};export default getDimensionsMinimalRatio;","export var ROOT_CONTAINER_CLASS_NAME=\"FIE_root\";export var DESIGN_LAYER_ID=\"FIE_design-layer\";export var TRANSFORMERS_LAYER_ID=\"FIE_transformers-layer\";export var IMAGE_NODE_ID=\"FIE_original-image\";export var NODES_TRANSFORMER_ID=\"FIE_nodes-transformer\";export var WATERMARK_ANNOTATION_ID=\"watermark\";export var TRANSLATIONS_GRID_UUID=\"353297d2-40b4-4684-a875-45a2178a8157\";export var DEFAULT_SAVE_QUALITY=.92;export var TABS_IDS={FINETUNE:\"Finetune\",FILTERS:\"Filters\",ADJUST:\"Adjust\",WATERMARK:\"Watermark\",ANNOTATE:\"Annotate\",RESIZE:\"Resize\"};export var TOOLS_IDS={CROP:\"Crop\",ROTATE:\"Rotate\",FLIP_X:\"Flip_X\",FLIP_Y:\"Flip_Y\",BRIGHTNESS:\"Brightness\",CONTRAST:\"Contrast\",HSV:\"HueSaturationValue\",WARMTH:\"Warmth\",BLUR:\"Blur\",THRESHOLD:\"Threshold\",POSTERIZE:\"Posterize\",PIXELATE:\"Pixelate\",NOISE:\"Noise\",FILTERS:\"Filters\",RECT:\"Rect\",ELLIPSE:\"Ellipse\",POLYGON:\"Polygon\",TEXT:\"Text\",LINE:\"Line\",IMAGE:\"Image\",ARROW:\"Arrow\",WATERMARK:\"Watermark\",PEN:\"Pen\",RESIZE:\"Resize\"};export var FLIP_DIRECTIONS={X:\"X\",Y:\"Y\"};export var DEFAULT_ZOOM_FACTOR=1;export var SUPPORTED_IMAGE_TYPES=[\"png\",\"jpeg\",\"jpg\",\"webp\"];export var POSSIBLE_IMAGE_TYPES=[].concat(SUPPORTED_IMAGE_TYPES,[\"svg\",\"gif\",\"avif\",\"apng\"]);export var DEFAULT_IMAGE_TYPE=SUPPORTED_IMAGE_TYPES[0];export var POINTER_ICONS={DEFAULT:\"default\",DRAW:\"crosshair\",SELECT:\"pointer\",MOVE:\"move\",DRAG:\"GRAB\"};export var DEFAULT_ENABLED_ANCHORS=[\"top-left\",\"top-center\",\"top-right\",\"middle-right\",\"middle-left\",\"bottom-left\",\"bottom-center\",\"bottom-right\"];export var ORIGINAL_CROP=\"Crop\";export var CUSTOM_CROP=\"custom\";export var ELLIPSE_CROP=\"ellipse\";export var POSITIONS={TOP_LEFT:\"top-left\",TOP_CENTER:\"top-center\",TOP_RIGHT:\"top-right\",MIDDLE_LEFT:\"middle-left\",MIDDLE_CENTER:\"middle-center\",MIDDLE_RIGHT:\"middle-right\",BOTTOM_LEFT:\"bottom-left\",BOTTOM_CENTER:\"bottom-center\",BOTTOM_RIGHT:\"bottom-right\"};export var MIN_CROP={WIDTH:14,HEIGHT:14};export var CLOSING_REASONS={AFTER_SAVE:\"after-saving\",CLOSE_BUTTON:\"close-button-clicked\",BACK_BUTTON:\"back-button-clicked\"};export var FEEDBACK_STATUSES={WARNING:\"warning\",ERROR:\"error\"};export var EDITOR_TO_CLOUDIMG_POSITIONS={top:\"north\",bottom:\"south\",left:\"west\",center:\"center\",right:\"east\"};export var CLOUDIMG_TO_EDITOR_POSITIONS={northwest:\"top-left\",northcenter:\"top-center\",northeast:\"top-right\",centerwest:\"center-left\",centercenter:\"center-center\",centereast:\"center-right\",southwest:\"bottom-left\",southcenter:\"bottom-center\",southeast:\"bottom-right\"};","import{ELLIPSE_CROP}from\"./constants\";var cropImage=function(a,b){var c=!!(2=a.length?{done:!0}:{done:!1,value:a[d++]}},e:function e(a){throw a},f:e}}throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\")}var f,g=!0,h=!1;return{s:function s(){c=c.call(a)},n:function n(){var a=c.next();return g=a.done,a},e:function e(a){h=!0,f=a},f:function f(){try{g||null==c[\"return\"]||c[\"return\"]()}finally{if(h)throw f}}}}function _unsupportedIterableToArray(a,b){if(a){if(\"string\"==typeof a)return _arrayLikeToArray(a,b);var c=Object.prototype.toString.call(a).slice(8,-1);return\"Object\"===c&&a.constructor&&(c=a.constructor.name),\"Map\"===c||\"Set\"===c?Array.from(a):\"Arguments\"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c)?_arrayLikeToArray(a,b):void 0}}function _arrayLikeToArray(a,b){(null==b||b>a.length)&&(b=a.length);for(var c=0,d=Array(b);cc?-1:c,c=~~(255*c),[b[0]+c,b[1]+c,b[2]+c]}},contrast:function contrast(a){return function(b){var c=a;c*=255;var d=259*(c+255)/(255*(259-c));return[d*(b[0]-128)+128,d*(b[1]-128)+128,d*(b[2]-128)+128]}},saturation:function saturation(a){return function(c){var d=a;d=-1>d?-1:d;var e=c[0],f=c[1],g=c[2],b=.2989*e+.587*f+.114*g;return[-b*d+e*(1+d),-b*d+f*(1+d),-b*d+g*(1+d)]}},grayscale:function grayscale(){return function(a){var c=a[0],d=a[1],e=a[2];return[,,,].fill(.2126*c+.7152*d+.0722*e)}},sepia:function sepia(a){return function(c){var d=c[0],e=c[1],f=c[2];return[d*(1-.607*a)+.769*e*a+.189*f*a,.349*d*a+e*(1-.314*a)+.168*f*a,.272*d*a+.534*e*a+f*(1-.869*a)]}},adjustRGB:function adjustRGB(a){return function(b){return[b[0]*a[0],b[1]*a[1],b[2]*a[2]]}},colorFilter:function colorFilter(a){return function(c){var d=c[0],e=c[1],f=c[2],b=a[3];return[d-(d-a[0])*b,e-(e-a[1])*b,f-(f-a[2])*b]}}};export default BaseFilters;","import BaseFilters from\"./BaseFilters\";function BlackAndWhite(a){BaseFilters.apply(a,function(a){var b=(a[0]+a[1]+a[2])/3>100,c=b?255:0;return[c,c,c]})}BlackAndWhite.filterName=\"BlackAndWhite\";export default BlackAndWhite;","import BaseFilters from\"./BaseFilters\";var BRIGHTNESS_CONST=.1,CONTRAST_CONST=.1,SATURATION_CONST=.15;function Clarendon(a){BaseFilters.apply(a,BaseFilters.brightness(BRIGHTNESS_CONST),BaseFilters.contrast(CONTRAST_CONST),BaseFilters.saturation(SATURATION_CONST))}Clarendon.filterName=\"Clarendon\";export default Clarendon;","import BaseFilters from\"./BaseFilters\";var SEPIA_CONST=.04,CONTRAST_CONST=-.15;function Gingham(a){BaseFilters.apply(a,BaseFilters.sepia(SEPIA_CONST),BaseFilters.contrast(CONTRAST_CONST))}Gingham.filterName=\"Gingham\";export default Gingham;","import BaseFilters from\"./BaseFilters\";var BRIGHTNESS_CONST=.1;function Moon(a){BaseFilters.apply(a,BaseFilters.grayscale(),BaseFilters.brightness(BRIGHTNESS_CONST));var b=a.data,c=b.length}Moon.filterName=\"Moon\";export default Moon;","import BaseFilters from\"./BaseFilters\";var BRIGHTNESS_CONST=.08,ADJUST_RGB_CONST=[1,1.03,1.05],SATURATION_CONST=.12;function Lark(a){BaseFilters.apply(a,BaseFilters.brightness(BRIGHTNESS_CONST),BaseFilters.adjustRGB(ADJUST_RGB_CONST),BaseFilters.saturation(SATURATION_CONST))}Lark.filterName=\"Lark\";export default Lark;","import BaseFilters from\"./BaseFilters\";var SEPIA_CONST=.4,BRIGHTNESS_CONST=.13,CONTRAST_CONST=-.05;function Reyes(a){BaseFilters.apply(a,BaseFilters.sepia(SEPIA_CONST),BaseFilters.brightness(BRIGHTNESS_CONST),BaseFilters.contrast(CONTRAST_CONST))}Reyes.filterName=\"Reyes\";export default Reyes;","import BaseFilters from\"./BaseFilters\";var ADJUST_RGB_CONST=[1.01,1.04,1],SATURATION_CONST=.3;function Juno(a){BaseFilters.apply(a,BaseFilters.adjustRGB(ADJUST_RGB_CONST),BaseFilters.saturation(SATURATION_CONST))}Juno.filterName=\"Juno\";export default Juno;","import BaseFilters from\"./BaseFilters\";var BRIGHTNESS_CONST=.1,SATURATION_CONST=-.5;function Slumber(a){BaseFilters.apply(a,BaseFilters.brightness(BRIGHTNESS_CONST),BaseFilters.saturation(SATURATION_CONST))}Slumber.filterName=\"Slumber\";export default Slumber;","import BaseFilters from\"./BaseFilters\";var ADJUST_RGB_CONST=[1.04,1,1.02],SATURATION_CONST=-.05;function Crema(a){BaseFilters.apply(a,BaseFilters.adjustRGB(ADJUST_RGB_CONST),BaseFilters.saturation(SATURATION_CONST))}Crema.filterName=\"Crema\";export default Crema;","import BaseFilters from\"./BaseFilters\";var BRIGHTNESS_CONST=.05,SATURATION_CONST=-.03;function Ludwig(a){BaseFilters.apply(a,BaseFilters.brightness(BRIGHTNESS_CONST),BaseFilters.saturation(SATURATION_CONST))}Ludwig.filterName=\"Ludwig\";export default Ludwig;","import BaseFilters from\"./BaseFilters\";var COLOR_FILTER_CONST=[228,130,225,.13],SATURATION_CONST=-.2;function Aden(a){BaseFilters.apply(a,BaseFilters.colorFilter(COLOR_FILTER_CONST),BaseFilters.saturation(SATURATION_CONST))}Aden.filterName=\"Aden\";export default Aden;","import BaseFilters from\"./BaseFilters\";var ADJUST_RGB_CONST=[1.05,1.1,1];function Perpetua(a){BaseFilters.apply(a,BaseFilters.adjustRGB(ADJUST_RGB_CONST))}Perpetua.filterName=\"Perpetua\";export default Perpetua;","import BaseFilters from\"./BaseFilters\";var SATURATION_CONST=.3,BRIGHTNESS_CONST=.15;function Amaro(a){BaseFilters.apply(a,BaseFilters.saturation(SATURATION_CONST),BaseFilters.brightness(BRIGHTNESS_CONST))}Amaro.filterName=\"Amaro\";export default Amaro;","import BaseFilters from\"./BaseFilters\";var COLOR_FILTER_CONST=[230,115,108,.05],SATURATION_CONST=.15;function Mayfair(a){BaseFilters.apply(a,BaseFilters.colorFilter(COLOR_FILTER_CONST),BaseFilters.saturation(SATURATION_CONST))}Mayfair.filterName=\"Mayfair\";export default Mayfair;","import BaseFilters from\"./BaseFilters\";var COLOR_FILTER_CONST=[255,170,0,.1],BRIGHTNESS_CONST=.09,SATURATION_CONST=.1;function Rise(a){BaseFilters.apply(a,BaseFilters.colorFilter(COLOR_FILTER_CONST),BaseFilters.brightness(BRIGHTNESS_CONST),BaseFilters.saturation(SATURATION_CONST))}Rise.filterName=\"Rise\";export default Rise;","import BaseFilters from\"./BaseFilters\";var ADJUST_RGB_CONST=[1,1,1.25],CONTRAST_CONST=.1,BRIGHTNESS_CONST=.15;function Hudson(a){BaseFilters.apply(a,BaseFilters.adjustRGB(ADJUST_RGB_CONST),BaseFilters.contrast(CONTRAST_CONST),BaseFilters.brightness(BRIGHTNESS_CONST))}Hudson.filterName=\"Hudson\";export default Hudson;","import BaseFilters from\"./BaseFilters\";var COLOR_FILTER_CONST=[255,225,80,.08],SATURATION_CONST=.1,CONTRAST_CONST=.05;function Valencia(a){BaseFilters.apply(a,BaseFilters.colorFilter(COLOR_FILTER_CONST),BaseFilters.saturation(SATURATION_CONST),BaseFilters.contrast(CONTRAST_CONST))}Valencia.filterName=\"Valencia\";export default Valencia;","import BaseFilters from\"./BaseFilters\";var COLOR_FILTER_CONST=[255,255,0,.07],SATURATION_CONST=.2,CONTRAST_CONST=.15;function XPro2(a){BaseFilters.apply(a,BaseFilters.colorFilter(COLOR_FILTER_CONST),BaseFilters.saturation(SATURATION_CONST),BaseFilters.contrast(CONTRAST_CONST))}XPro2.filterName=\"XPro2\";export default XPro2;","import BaseFilters from\"./BaseFilters\";var CONTRAST_CONST=-.15,SATURATION_CONST=.1;function Sierra(a){BaseFilters.apply(a,BaseFilters.contrast(CONTRAST_CONST),BaseFilters.saturation(SATURATION_CONST))}Sierra.filterName=\"Sierra\";export default Sierra;","import BaseFilters from\"./BaseFilters\";var COLOR_FILTER_CONST=[100,28,210,.03],BRIGHTNESS_CONST=.1;function Willow(a){BaseFilters.apply(a,BaseFilters.grayscale(),BaseFilters.colorFilter(COLOR_FILTER_CONST),BaseFilters.brightness(BRIGHTNESS_CONST))}Willow.filterName=\"Willow\";export default Willow;","import BaseFilters from\"./BaseFilters\";var CONTRAST_CONST=.15,SATURATION_CONST=.2;function LoFi(a){BaseFilters.apply(a,BaseFilters.contrast(CONTRAST_CONST),BaseFilters.saturation(SATURATION_CONST))}LoFi.filterName=\"LoFi\";export default LoFi;","import BaseFilters from\"./BaseFilters\";var CONTRAST_CONST=.1,SATURATION_CONST=.15;function Hefe(a){BaseFilters.apply(a,BaseFilters.contrast(CONTRAST_CONST),BaseFilters.saturation(SATURATION_CONST))}Hefe.filterName=\"Hefe\";export default Hefe;","import BaseFilters from\"./BaseFilters\";var COLOR_FILTER_CONST=[220,115,188,.12],CONTRAST_CONST=-.05;function Nashville(a){BaseFilters.apply(a,BaseFilters.colorFilter(COLOR_FILTER_CONST),BaseFilters.contrast(CONTRAST_CONST))}Nashville.filterName=\"Nashville\";export default Nashville;","import BaseFilters from\"./BaseFilters\";var BRIGHTNESS_CONST=.1,SEPIA_CONST=.3;function Stinson(a){BaseFilters.apply(a,BaseFilters.brightness(BRIGHTNESS_CONST),BaseFilters.sepia(SEPIA_CONST))}Stinson.filterName=\"Stinson\";export default Stinson;","import BaseFilters from\"./BaseFilters\";var COLOR_FILTER_CONST=[255,225,0,.05],BRIGHTNESS_CONST=.06,CONTRAST_CONST=.06;function Vesper(a){BaseFilters.apply(a,BaseFilters.colorFilter(COLOR_FILTER_CONST),BaseFilters.brightness(BRIGHTNESS_CONST),BaseFilters.contrast(CONTRAST_CONST))}Vesper.filterName=\"Vesper\";export default Vesper;","import BaseFilters from\"./BaseFilters\";var COLOR_FILTER_CONST=[255,165,40,.2];function Earlybird(a){BaseFilters.apply(a,BaseFilters.colorFilter(COLOR_FILTER_CONST))}Earlybird.filterName=\"Earlybird\";export default Earlybird;","import BaseFilters from\"./BaseFilters\";var CONTRAST_CONST=.2,COLOR_FILTER_CONST=[140,10,185,.1];function Brannan(a){BaseFilters.apply(a,BaseFilters.contrast(CONTRAST_CONST),BaseFilters.colorFilter(COLOR_FILTER_CONST))}Brannan.filterName=\"Brannan\";export default Brannan;","import BaseFilters from\"./BaseFilters\";var BRIGHTNESS_CONST=-.1,SATURATION_CONST=-.1;function Sutro(a){BaseFilters.apply(a,BaseFilters.brightness(BRIGHTNESS_CONST),BaseFilters.saturation(SATURATION_CONST))}Sutro.filterName=\"Sutro\";export default Sutro;","import BaseFilters from\"./BaseFilters\";var SEPIA_CONST=.1,COLOR_FILTER_CONST=[255,145,0,.2];function Toaster(a){BaseFilters.apply(a,BaseFilters.sepia(SEPIA_CONST),BaseFilters.colorFilter(COLOR_FILTER_CONST))}Toaster.filterName=\"Toaster\";export default Toaster;","import BaseFilters from\"./BaseFilters\";var BRIGHTNESS_CONST=.1,COLOR_FILTER_CONST=[255,255,0,.2];function Walden(a){BaseFilters.apply(a,BaseFilters.brightness(BRIGHTNESS_CONST),BaseFilters.colorFilter(COLOR_FILTER_CONST))}Walden.filterName=\"Walden\";export default Walden;","import BaseFilters from\"./BaseFilters\";var COLOR_FILTER_CONST=[255,25,0,.15],BRIGHTNESS_CONST=.1;function NinteenSeventySeven(a){BaseFilters.apply(a,BaseFilters.colorFilter(COLOR_FILTER_CONST),BaseFilters.brightness(BRIGHTNESS_CONST))}NinteenSeventySeven.filterName=\"NinteenSeventySeven\";export default NinteenSeventySeven;","import BaseFilters from\"./BaseFilters\";var COLOR_FILTER_CONST=[255,140,0,.1],ADJUST_RGB_CONST=[1.15,1.05,1],SATURATION_CONST=.35;function Kelvin(a){BaseFilters.apply(a,BaseFilters.colorFilter(COLOR_FILTER_CONST),BaseFilters.adjustRGB(ADJUST_RGB_CONST),BaseFilters.saturation(SATURATION_CONST))}Kelvin.filterName=\"Kelvin\";export default Kelvin;","import BaseFilters from\"./BaseFilters\";var COLOR_FILTER_CONST=[225,240,0,.1],SATURATION_CONST=.25,CONTRAST_CONST=.05;function Maven(a){BaseFilters.apply(a,BaseFilters.colorFilter(COLOR_FILTER_CONST),BaseFilters.saturation(SATURATION_CONST),BaseFilters.contrast(CONTRAST_CONST))}Maven.filterName=\"Maven\";export default Maven;","import BaseFilters from\"./BaseFilters\";var SEPIA_CONST=.06,BRIGHTNESS_CONST=.1;function Ginza(a){BaseFilters.apply(a,BaseFilters.sepia(SEPIA_CONST),BaseFilters.brightness(BRIGHTNESS_CONST))}Ginza.filterName=\"Ginza\";export default Ginza;","import BaseFilters from\"./BaseFilters\";var SATURATION_CONST=.35,BRIGHTNESS_CONST=.1;function Skyline(a){BaseFilters.apply(a,BaseFilters.saturation(SATURATION_CONST),BaseFilters.brightness(BRIGHTNESS_CONST))}Skyline.filterName=\"Skyline\";export default Skyline;","import BaseFilters from\"./BaseFilters\";var CONTRAST_CONST=.15,BRIGHTNESS_CONST=.1;function Dogpatch(a){BaseFilters.apply(a,BaseFilters.contrast(CONTRAST_CONST),BaseFilters.brightness(BRIGHTNESS_CONST))}Dogpatch.filterName=\"Dogpatch\";export default Dogpatch;","import BaseFilters from\"./BaseFilters\";var COLOR_FILTER_CONST=[25,240,252,.05],SEPIA_CONST=.3;function Brooklyn(a){BaseFilters.apply(a,BaseFilters.colorFilter(COLOR_FILTER_CONST),BaseFilters.sepia(SEPIA_CONST))}Brooklyn.filterName=\"Brooklyn\";export default Brooklyn;","import BaseFilters from\"./BaseFilters\";var COLOR_FILTER_CONST=[208,208,86,.2],CONTRAST_CONST=.15;function Helena(a){BaseFilters.apply(a,BaseFilters.colorFilter(COLOR_FILTER_CONST),BaseFilters.contrast(CONTRAST_CONST))}Helena.filterName=\"Helena\";export default Helena;","import BaseFilters from\"./BaseFilters\";var COLOR_FILTER_CONST=[255,160,25,.1],BRIGHTNESS_CONST=.1;function Ashby(a){BaseFilters.apply(a,BaseFilters.colorFilter(COLOR_FILTER_CONST),BaseFilters.brightness(BRIGHTNESS_CONST))}Ashby.filterName=\"Ashby\";export default Ashby;","import BaseFilters from\"./BaseFilters\";var COLOR_FILTER_CONST=[255,50,80,.12],CONTRAST_CONST=.05;function Charmes(a){BaseFilters.apply(a,BaseFilters.colorFilter(COLOR_FILTER_CONST),BaseFilters.contrast(CONTRAST_CONST))}Charmes.filterName=\"Charmes\";export default Charmes;","import Konva from\"konva\";import*as CustomFilters from\"../custom/filters\";var filterStrToClass=function(a){return a?CustomFilters[a]||Konva.Filters[a]:null};export default filterStrToClass;","import Konva from\"konva\";import{Factory as KonvaFactory}from\"konva/lib/Factory\";import{getNumberValidator as konvaGetNumberValidator}from\"konva/lib/Validators\";function Warmth(a){for(var b=this.warmth(),c=a.data,d=c.length,e=0;e=b?255:0,c[e+1]=c[e+1]>=b?255:0,c[e+2]=c[e+2]>=b?255:0)}CustomThreshold.finetuneName=\"CustomThreshold\";export default CustomThreshold;KonvaFactory.addGetterSetter(Konva.Image,\"threshold\",0,konvaGetNumberValidator,KonvaFactory.afterSetFilter);","import Konva from\"konva\";import*as CustomFinetunes from\"../custom/finetunes\";var finetunesStrsToClasses=function(a){return Array.isArray(a)&&0d.status)b(d.response);else{var a;console.warn(\"Error in sending translation key to backend \".concat(null===(a=d.response)||void 0===a?void 0:a.hint,\", \").concat(d.status)),c()}},d.onerror=function(){var a;console.warn(\"Error in sending translation key to backend \".concat(null===(a=d.response)||void 0===a?void 0:a.hint,\", \").concat(d.status)),c()};d.open(\"POST\",\"https://neo.wordplex.io/api/import/request-translations?grid_uuid=\".concat(TRANSLATIONS_GRID_UUID)),d.send(JSON.stringify({grid_uuid:TRANSLATIONS_GRID_UUID,translations_requests:a}))})};export var getBackendTranslations=function(){var a=0f.status){(f.response||[]).forEach(function(a){backendTranslations[e]=_objectSpread(_objectSpread({},backendTranslations[e]),{},_defineProperty({},a.translation_key,a.translations[e]))});var a=[];Object.keys(defaultTranslations).forEach(function(b){var c;b&&!(null!==(c=backendTranslations[e])&&void 0!==c&&c[b])&&a.push({key:b,lang:e,default:defaultTranslations[b]})}),0d,l=0>e;switch(b){case TOOLS_IDS.RECT:c?(h.width=Math.sqrt(i*i+j*j),h.height=h.width,h.x-=k?h.width-i:0,h.y-=l?h.height-j:0):(h.width=i,h.height=j);break;case TOOLS_IDS.ELLIPSE:c?(h.radiusX=Math.sqrt(i*i+j*j)/2,h.radiusY=h.radiusX,h.x-=k?2*h.radiusX-i:0,h.y-=l?2*h.radiusY-j:0):(h.radiusX=i/2,h.radiusY=j/2),h.offsetX=-h.radiusX,h.offsetY=-h.radiusY;break;case TOOLS_IDS.POLYGON:h.radius=(i+j)/2,h.x-=k?2*h.radius-i:0,h.y-=l?2*h.radius-j:0,h.offsetX=-h.radius,h.offsetY=-h.radius;break;case TOOLS_IDS.LINE:case TOOLS_IDS.ARROW:h.x=f,h.y=g,h.points=[0,0],c?h.points.push(i>=j?d:0,j>i?e:0):h.points=[0,0,d,e];break;default:h.width=i,h.height=j}return h};export default getNewAnnotationPreview;","import _objectWithoutProperties from\"@babel/runtime/helpers/objectWithoutProperties\";import _defineProperty from\"@babel/runtime/helpers/defineProperty\";var _excluded=[\"id\",\"x\",\"y\",\"points\"],_excluded2=[\"startedX\",\"startedY\",\"offsetX\",\"offsetY\",\"width\",\"height\"];function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c=MIN_PIXELS&&latestAnnotationProps.height>=MIN_PIXELS||latestAnnotationProps.radiusX>=MIN_PIXELS&&latestAnnotationProps.radiusY>=MIN_PIXELS||null!==(c=latestAnnotationProps.points)&&void 0!==c&&c[2]||null!==(e=latestAnnotationProps.points)&&void 0!==e&&e[3]||latestAnnotationProps.radius>=MIN_PIXELS)){var f=latestAnnotationProps,g=f.startedX,h=f.startedY,i=f.offsetX,o=f.offsetY,p=f.width,q=f.height,r=_objectWithoutProperties(f,_excluded2);NO_WIDTH_HEIGHT_ANNOTATIONS.includes(b.name)||(r.width=p,r.height=q),d(r,!0)}shownAnnotationPreview=null,textAnnotationWrappedRect=null,latestAnnotationProps=null,a.setAttrs({isDrawing:!1}),a.off(\"mousemove touchmove\",l),a.off(\"mouseleave touchcancel\",m),document.removeEventListener(\"mouseup\",n,eventsOptions),document.removeEventListener(\"touchend\",n,eventsOptions),document.removeEventListener(\"mouseleave\",n,eventsOptions),document.removeEventListener(\"touchcancel\",n,eventsOptions),document.removeEventListener(\"mousemove\",j,eventsOptions),document.removeEventListener(\"touchmove\",j,eventsOptions),pointerDown.isOutOfCanvas=!1},o=function handlePointerDown(b){var d;if(b.evt.preventDefault(),!(b.target.attrs.draggable||1<(null===(d=b.evt.touches)||void 0===d?void 0:d.length))){k();var e=getPointerOffsetPositionBoundedToObject(c,f());pointerDown.startedX=e.offsetX,pointerDown.startedY=e.offsetY,pointerDown.isOutOfCanvas=!1,a.on(\"mousemove touchmove\",l),a.on(\"mouseleave touchcancel\",m),document.addEventListener(\"mouseup\",n,eventsOptions),document.addEventListener(\"touchend\",n,eventsOptions),document.addEventListener(\"mouseleave\",n,eventsOptions),document.addEventListener(\"touchcancel\",n,eventsOptions)}};return a.on(\"mousedown touchstart\",o),function(){k(),a.off(\"mousedown touchstart\",o)}};export default previewThenCallAnnotationAdding;","import{useCallback}from\"react\";import debounce from\"../utils/debounce\";var useDebouncedCallback=function(a,b){var c=2=e?0:function getTopOffset(){return 0>e&&-90=e&&-90<=e?0:function getLeftOffset(){return 90>>32-b},cvtHex=function(a){var b,c,d=\"\";for(b=7;0<=b;b--)c=15&a>>>4*b,d+=c.toString(16);return d},Utf8Encode=function(a){for(var b,d=a.replace(/\\r\\n/g,\"\\n\"),e=\"\",f=0;fb?e+=String.fromCharCode(b):127b?(e+=String.fromCharCode(192|b>>6),e+=String.fromCharCode(128|63&b)):(e+=String.fromCharCode(224|b>>12),e+=String.fromCharCode(128|63&b>>6),e+=String.fromCharCode(128|63&b));return e},sha1=function(a){var b,c,d,e,f,g,h,k,l,m=a,n=Array(80),o=1732584193,p=4023233417,q=2562383102,r=271733878,s=3285377520;m=Utf8Encode(m);var t=m.length,u=[];for(c=0;c>>29),u.push(4294967295&t<<3),b=0;bc;c++)n[c]=u[b+c];for(c=16;79>=c;c++)n[c]=rotateLeft(n[c-3]^n[c-8]^n[c-14]^n[c-16],1);for(e=o,f=p,g=q,h=r,k=s,c=0;19>=c;c++)l=4294967295&rotateLeft(e,5)+(f&g|~f&h)+k+n[c]+1518500249,k=h,h=g,g=rotateLeft(f,30),f=e,e=l;for(c=20;39>=c;c++)l=4294967295&rotateLeft(e,5)+(f^g^h)+k+n[c]+1859775393,k=h,h=g,g=rotateLeft(f,30),f=e,e=l;for(c=40;59>=c;c++)l=4294967295&rotateLeft(e,5)+(f&g|f&h|g&h)+k+n[c]+2400959708,k=h,h=g,g=rotateLeft(f,30),f=e,e=l;for(c=60;79>=c;c++)l=4294967295&rotateLeft(e,5)+(f^g^h)+k+n[c]+3395469782,k=h,h=g,g=rotateLeft(f,30),f=e,e=l;o=4294967295&o+e,p=4294967295&p+f,q=4294967295&q+g,r=4294967295&r+h,s=4294967295&s+k}return l=cvtHex(o)+cvtHex(p)+cvtHex(q)+cvtHex(r)+cvtHex(s),l.toLowerCase()};export default sha1;","import _slicedToArray from\"@babel/runtime/helpers/slicedToArray\";import sha1 from\"./sha1\";var encodeBase64=function(a){return btoa(a).replace(/=*$/g,\"\")},getSha1=function(a,b){return sha1(a).slice(0,b)},getSealingParams=function(a,b,c,d){var e=encodeBase64(a),f=getSha1(b+e+c,d);return[f?\"ci_seal=\".concat(f):\"\",e?\"ci_eqs=\".concat(e):\"\"].filter(function(a){return a}).join(\"&\")},getImageSealingParams=function(a,b,c){var d=b||{},e=d.salt,f=d.charCount,g=d.includeParams,h=void 0===g?[]:g,i=!h||0===(null===h||void 0===h?void 0:h.length),j=\"\",k=\"\",l=[],m=[];return a.split(\"&\").forEach(function(a){var b=a.split(\"=\"),c=_slicedToArray(b,1),d=c[0];-1<(null===h||void 0===h?void 0:h.indexOf(d))||i?l.push(a):m.push(a)}),0 input{border:0px;clip:rect(0px,0px,0px,0px);height:100%;margin:-1px;overflow:hidden;padding:0px;position:absolute;white-space:nowrap;width:100%;direction:ltr;}&::before{position:absolute;content:'';border-radius:inherit;width:100%;height:100%;box-shadow:0px 3px 1px -2px rgb(0 0 0 / 20%),0px 2px 2px 0px rgb(0 0 0 / 14%),0px 1px 5px 0px rgb(0 0 0 / 12%);}&::after{position:absolute;content:'';border-radius:50%;width:42px;height:42px;top:50%;left:50%;transform:translate(-50%,-50%);}\"]);\nvar LabelTooltip = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'label')\n}).withConfig({\n componentId: \"sc-jjink6-4\"\n})(function (_ref2) {\n var theme = _ref2.theme,\n _ref2$open = _ref2.open,\n open = _ref2$open === void 0 ? false : _ref2$open,\n _ref2$disabled = _ref2.disabled,\n disabled = _ref2$disabled === void 0 ? false : _ref2$disabled;\n return css([\"display:flex;align-items:center;justify-content:center;padding:6px 6px;border-radius:2px;position:absolute;top:-10px;font-size:10px;z-index:1;white-space:nowrap;transition:transform 150ms cubic-bezier(0.4,0,0.2,1) 0ms;transform-origin:bottom center;transform:\", \";background-color:\", \";color:#fff;cursor:pointer;transition:all 100ms ease-out;&::before{position:absolute;content:'';background-color:inherit;width:8px;height:8px;bottom:0px;left:50%;transform:translate(-50%,50%) rotate(45deg);}\"], open ? 'translateY(-100%) scale(1)' : 'translateY(-100%) scale(0)', disabled ? theme.palette[PC.AccentPrimaryDisabled] : theme.palette[PC.LinkStateless]);\n});\nvar SliderAnnotation = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'annotation')\n}).withConfig({\n componentId: \"sc-jjink6-5\"\n})(function (_ref3) {\n var theme = _ref3.theme;\n return css([\"display:flex;justify-content:space-between;margin-top:12px;color:\", \";\"], theme.palette[PC.TextSecondary]);\n});\nvar Styled = applyDisplayNames({\n Slider: Slider,\n Rail: Rail,\n Track: Track,\n Thumb: Thumb,\n SliderAnnotation: SliderAnnotation,\n LabelTooltip: LabelTooltip\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _slicedToArray from \"@babel/runtime/helpers/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"defaultValue\", \"disabled\", \"disableSwap\", \"hideTrack\", \"hideAnnotation\", \"value\", \"min\", \"max\", \"onChange\", \"onMouseDown\", \"onMouseUp\", \"step\", \"labelTooltip\", \"annotation\", \"components\", \"componentsProps\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\n/* eslint-disable no-use-before-define */\n\nimport React, { useEffect, useRef, useState, useCallback } from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent, objectValues, asc, valueToPercent, percentToValue, roundValueToStep, setValueIndex, findClosest, ownerDocument, clamp, trackFinger, focusThumb, axisProps, useForkRef } from '../../utils/functions';\nimport useControlled from '../../hooks/use-controlled';\nimport useEventCallback from '../../hooks/use-event-callback';\nimport { LabelTooltip } from './types';\nimport Styled from './slider.styles';\nvar INTENTIONAL_DRAG_COUNT_THRESHOLD = 2;\nvar dataIndex = 'data-index';\nvar Slider = intrinsicComponent(function (_ref,\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nref) {\n var defaultValue = _ref.defaultValue,\n _ref$disabled = _ref.disabled,\n disabled = _ref$disabled === void 0 ? false : _ref$disabled,\n _ref$disableSwap = _ref.disableSwap,\n disableSwap = _ref$disableSwap === void 0 ? false : _ref$disableSwap,\n _ref$hideTrack = _ref.hideTrack,\n hideTrack = _ref$hideTrack === void 0 ? false : _ref$hideTrack,\n _ref$hideAnnotation = _ref.hideAnnotation,\n hideAnnotation = _ref$hideAnnotation === void 0 ? false : _ref$hideAnnotation,\n valueProp = _ref.value,\n _ref$min = _ref.min,\n min = _ref$min === void 0 ? 0 : _ref$min,\n _ref$max = _ref.max,\n max = _ref$max === void 0 ? 100 : _ref$max,\n onChange = _ref.onChange,\n onMouseDown = _ref.onMouseDown,\n onMouseUp = _ref.onMouseUp,\n _ref$step = _ref.step,\n step = _ref$step === void 0 ? 1 : _ref$step,\n _ref$labelTooltip = _ref.labelTooltip,\n labelTooltip = _ref$labelTooltip === void 0 ? LabelTooltip.Off : _ref$labelTooltip,\n _ref$annotation = _ref.annotation,\n annotation = _ref$annotation === void 0 ? '' : _ref$annotation,\n _ref$components = _ref.components,\n components = _ref$components === void 0 ? {} : _ref$components,\n _ref$componentsProps = _ref.componentsProps,\n componentsProps = _ref$componentsProps === void 0 ? {} : _ref$componentsProps,\n rest = _objectWithoutProperties(_ref, _excluded);\n var _useState = useState(-1),\n _useState2 = _slicedToArray(_useState, 2),\n active = _useState2[0],\n setActive = _useState2[1];\n var _useState3 = useState(-1),\n _useState4 = _slicedToArray(_useState3, 2),\n open = _useState4[0],\n setOpen = _useState4[1];\n var _useState5 = useState(false),\n _useState6 = _slicedToArray(_useState5, 2),\n dragging = _useState6[0],\n setDragging = _useState6[1];\n var moveCount = useRef(0);\n var previousIndex = useRef(0);\n var touchId = useRef();\n var sliderRef = useRef(null);\n var handleRef = useForkRef(ref, sliderRef);\n var _useControlled = useControlled({\n controlled: valueProp,\n \"default\": defaultValue !== null && defaultValue !== void 0 ? defaultValue : min\n }),\n _useControlled2 = _slicedToArray(_useControlled, 2),\n valueDerived = _useControlled2[0],\n setValueState = _useControlled2[1];\n var axis = 'horizontal';\n var range = Array.isArray(valueDerived);\n var values = range ? valueDerived.slice().sort(asc) : [valueDerived];\n var getFingerNewValue = function getFingerNewValue(_ref2) {\n var finger = _ref2.finger,\n _ref2$move = _ref2.move,\n move = _ref2$move === void 0 ? false : _ref2$move,\n values2 = _ref2.values;\n var slider = sliderRef.current;\n if (slider) {\n var _slider$getBoundingCl = slider.getBoundingClientRect(),\n width = _slider$getBoundingCl.width,\n height = _slider$getBoundingCl.height,\n bottom = _slider$getBoundingCl.bottom,\n left = _slider$getBoundingCl.left;\n var percent;\n if (axis.indexOf('vertical') === 0) {\n percent = (bottom - finger.y) / height;\n } else {\n percent = (finger.x - left) / width;\n }\n if (axis.includes('-reverse')) {\n percent = 1 - percent;\n }\n var newValue;\n newValue = percentToValue(percent, min, max);\n if (step) {\n newValue = roundValueToStep(newValue, step, min);\n }\n newValue = clamp(newValue, min, max);\n var activeIndex = 0;\n if (range) {\n if (!move) {\n activeIndex = findClosest(values2, newValue);\n } else {\n activeIndex = previousIndex.current;\n }\n if (disableSwap) {\n newValue = clamp(newValue, values2[activeIndex - 1] || -Infinity, values2[activeIndex + 1] || Infinity);\n }\n var previousValue = newValue;\n newValue = setValueIndex({\n values: values2,\n newValue: newValue,\n index: activeIndex\n });\n if (!(disableSwap && move) && Array.isArray(newValue)) {\n activeIndex = newValue.indexOf(previousValue);\n previousIndex.current = activeIndex;\n }\n }\n return {\n newValue: newValue,\n activeIndex: activeIndex\n };\n }\n return null;\n };\n var handleChange = function handleChange(event, value, thumbIndex) {\n if (onChange) {\n onChange(event, value, thumbIndex);\n }\n };\n var handleHiddenInputChange = function handleHiddenInputChange(event) {\n var index = Number(event.currentTarget.getAttribute(dataIndex));\n var newValue = event.target.valueAsNumber;\n if (range) {\n if (disableSwap) {\n newValue = clamp(newValue, values[index - 1] || -Infinity, values[index + 1] || Infinity);\n }\n var previousValue = newValue;\n newValue = setValueIndex({\n values: values,\n newValue: newValue,\n index: index\n });\n var activeIndex = index;\n if (!disableSwap) {\n activeIndex = newValue.indexOf(previousValue);\n }\n focusThumb({\n sliderRef: sliderRef,\n activeIndex: activeIndex\n });\n }\n setValueState(newValue);\n handleChange(event, newValue, index);\n if (onMouseUp) {\n onMouseUp(event);\n }\n };\n var handleTouchMove = useEventCallback(function (nativeEvent) {\n var finger = trackFinger(nativeEvent, touchId);\n if (!finger) {\n return;\n }\n moveCount.current += 1;\n if (nativeEvent.type === 'mousemove' && nativeEvent.buttons === 0) {\n handleTouchEnd(nativeEvent);\n return;\n }\n var _ref3 = getFingerNewValue({\n finger: finger,\n move: true,\n values: values\n }),\n newValue = _ref3.newValue,\n activeIndex = _ref3.activeIndex;\n focusThumb({\n sliderRef: sliderRef,\n activeIndex: activeIndex,\n setActive: setActive\n });\n setValueState(newValue);\n if (!dragging && moveCount.current > INTENTIONAL_DRAG_COUNT_THRESHOLD) {\n setDragging(true);\n }\n handleChange(nativeEvent, newValue, activeIndex);\n });\n var handleTouchEnd = useEventCallback(function (nativeEvent) {\n var finger = trackFinger(nativeEvent, touchId);\n setDragging(false);\n if (!finger) {\n return;\n }\n setActive(-1);\n if (nativeEvent.type === 'touchend') {\n setOpen(-1);\n }\n if (onMouseUp) {\n onMouseUp(nativeEvent);\n }\n touchId.current = undefined;\n stopListening();\n });\n var handleTouchStart = useEventCallback(function (nativeEvent) {\n var touch = nativeEvent.changedTouches[0];\n if (touch != null) {\n touchId.current = touch.identifier;\n }\n var finger = trackFinger(nativeEvent, touchId);\n var _ref4 = getFingerNewValue({\n finger: finger,\n values: values\n }),\n newValue = _ref4.newValue,\n activeIndex = _ref4.activeIndex;\n focusThumb({\n sliderRef: sliderRef,\n activeIndex: activeIndex,\n setActive: setActive\n });\n setValueState(newValue);\n handleChange(nativeEvent, newValue, activeIndex);\n moveCount.current = 0;\n var doc = ownerDocument(sliderRef.current);\n doc.addEventListener('touchmove', handleTouchMove);\n doc.addEventListener('touchend', handleTouchEnd);\n });\n var handleMouseOver = useEventCallback(function (event) {\n var index = Number(event.currentTarget.getAttribute(dataIndex));\n setOpen(index);\n });\n var handleMouseLeave = useEventCallback(function () {\n setOpen(-1);\n });\n var handleMouseDown = useEventCallback(function (event) {\n if (!disabled) {\n if (onMouseDown) {\n onMouseDown(event);\n }\n if (event.button !== 0) {\n return;\n }\n\n // Avoid text selection\n event.preventDefault();\n var finger = trackFinger(event, touchId);\n var _ref5 = getFingerNewValue({\n finger: finger,\n values: values\n }),\n newValue = _ref5.newValue,\n activeIndex = _ref5.activeIndex;\n focusThumb({\n sliderRef: sliderRef,\n activeIndex: activeIndex,\n setActive: setActive\n });\n setValueState(newValue);\n handleChange(event, newValue, activeIndex);\n moveCount.current = 0;\n var doc = ownerDocument(sliderRef.current);\n doc.addEventListener('mousemove', handleTouchMove);\n doc.addEventListener('mouseup', handleTouchEnd);\n } else {\n // Avoid text selection\n event.preventDefault();\n }\n });\n var stopListening = useCallback(function () {\n var doc = ownerDocument(sliderRef.current);\n doc.removeEventListener('mousemove', handleTouchMove);\n doc.removeEventListener('mouseup', handleTouchEnd);\n doc.removeEventListener('touchmove', handleTouchMove);\n doc.removeEventListener('touchend', handleTouchEnd);\n }, [handleTouchEnd, handleTouchMove]);\n useEffect(function () {\n var slider = sliderRef.current;\n if (slider) {\n return function () {\n stopListening();\n };\n }\n }, [stopListening, handleTouchStart]);\n useEffect(function () {\n if (disabled) {\n stopListening();\n }\n }, [disabled, stopListening]);\n if (disabled && active !== -1) {\n setActive(-1);\n }\n var trackOffset = valueToPercent(range ? values[0] : min, min, max);\n var trackLeap = valueToPercent(values[values.length - 1], min, max) - trackOffset;\n var trackStyle = _objectSpread(_objectSpread({}, axisProps[axis].offset(trackOffset)), axisProps[axis].leap(trackLeap));\n var railProps = componentsProps.rail;\n var Rail = typeof components.Rail === 'function' ? /*#__PURE__*/React.createElement(components.Rail, _extends({}, railProps, {\n style: _objectSpread({}, railProps === null || railProps === void 0 ? void 0 : railProps.style)\n })) : /*#__PURE__*/React.createElement(Styled.Rail, _extends({}, railProps, {\n style: _objectSpread({}, railProps === null || railProps === void 0 ? void 0 : railProps.style)\n }));\n var trackProps = componentsProps.track;\n var Track = !hideTrack && (typeof components.Track === 'function' ? /*#__PURE__*/React.createElement(components.Track, _extends({}, trackProps, {\n style: _objectSpread(_objectSpread({}, trackStyle), trackProps === null || trackProps === void 0 ? void 0 : trackProps.style)\n })) : /*#__PURE__*/React.createElement(Styled.Track, _extends({}, trackProps, {\n style: _objectSpread(_objectSpread({}, trackStyle), trackProps === null || trackProps === void 0 ? void 0 : trackProps.style)\n })));\n var thumbProps = componentsProps.thumb;\n var Thumb = components.Thumb || Styled.Thumb;\n var LabelTooltipComponent = components.LabelTooltip || Styled.LabelTooltip;\n var labelTooltipProps = componentsProps.labelTooltip;\n var annotationText = annotation ? \" \".concat(annotation) : '';\n return /*#__PURE__*/React.createElement(Styled.Slider, _extends({\n ref: handleRef,\n disabled: disabled,\n onTouchStart: handleTouchStart,\n onMouseDown: handleMouseDown\n }, rest), Rail, Track, values.map(function (value, index) {\n var percent = valueToPercent(value, min, max);\n var style = axisProps[axis].offset(percent);\n return /*#__PURE__*/React.createElement(React.Fragment, {\n key: index\n }, /*#__PURE__*/React.createElement(Thumb, _extends({\n \"data-index\": index,\n onMouseOver: handleMouseOver,\n onMouseLeave: handleMouseLeave\n }, thumbProps, {\n style: _objectSpread(_objectSpread({}, style), {}, {\n pointerEvents: disableSwap && active !== index ? 'none' : undefined\n }, thumbProps === null || thumbProps === void 0 ? void 0 : thumbProps.style)\n }), /*#__PURE__*/React.createElement(\"input\", {\n \"data-index\": index,\n type: \"range\",\n min: min,\n max: max,\n value: values[index],\n step: step,\n disabled: disabled,\n onChange: handleHiddenInputChange\n }), /*#__PURE__*/React.createElement(LabelTooltipComponent, {\n open: (open === index || active === index || labelTooltip === 'on') && labelTooltip !== 'off',\n disabled: disabled,\n style: _objectSpread({}, labelTooltipProps === null || labelTooltipProps === void 0 ? void 0 : labelTooltipProps.style)\n }, values[index], annotationText)));\n }), !hideAnnotation && /*#__PURE__*/React.createElement(Styled.SliderAnnotation, null, /*#__PURE__*/React.createElement(\"span\", null, min, annotationText), /*#__PURE__*/React.createElement(\"span\", null, max, annotationText)));\n});\nSlider.defaultProps = {\n annotation: 'MB',\n min: 0,\n max: 100,\n step: 1,\n labelTooltip: LabelTooltip.Off\n};\nSlider.propTypes = {\n defaultValue: PT.oneOfType([PT.array, PT.number]),\n value: PT.oneOfType([PT.array, PT.number]),\n min: PT.number,\n max: PT.number,\n onChange: PT.func,\n onMouseDown: PT.func,\n onMouseUp: PT.func,\n step: PT.number,\n annotation: PT.string,\n disabled: PT.bool,\n disableSwap: PT.bool,\n hideTrack: PT.bool,\n hideAnnotation: PT.bool,\n labelTooltip: PT.oneOf(objectValues(LabelTooltip)),\n components: PT.shape({\n Rail: PT.elementType,\n Track: PT.elementType,\n Thumb: PT.elementType,\n LabelTooltip: PT.elementType\n }),\n componentsProps: PT.object\n};\nexport default Slider;","import styled from\"styled-components\";import Slider from\"@scaleflex/ui/core/slider\";import{Color as PC}from\"@scaleflex/ui/utils/types/palette\";var StyledSlider=styled(Slider).withConfig({componentId:\"sc-1wort0h-0\"})([\"width:\",\";max-width:\",\";user-select:none;padding:0;margin-bottom:\",\";.SfxSlider-annotation{display:none;}.SfxSlider-thumb{background-color:\",\";}.SfxSlider-Track{height:2px;color:\",\";}.SfxSlider-rail{height:2px;background-color:\",\";}\"],function(a){var b=a.width;return b||\"104px\"},function(a){var b=a.width;return b||\"104px\"},function(a){var b=a.noMargin;return b?\"\":\"16px\"},function(a){var b=a.theme.palette;return b[PC.AccentStateless]},function(a){var b=a.theme.palette;return b[PC.AccentStateless]},function(a){var b=a.theme.palette;return b[PC.BordersItem]});export{StyledSlider};","import _extends from\"@babel/runtime/helpers/extends\";import _objectWithoutProperties from\"@babel/runtime/helpers/objectWithoutProperties\";var _excluded=[\"onChange\"];import React from\"react\";import{StyledSlider}from\"./Slider.styled\";var Slider=function(a){var b=a.onChange,c=_objectWithoutProperties(a,_excluded);return React.createElement(StyledSlider,_extends({annotation:\"\",onChange:function onChange(a,c){return b?b(c):void 0}},c))};export default Slider;","import PT from 'prop-types';\nexport var iconPropTypes = {\n size: PT.number,\n width: PT.oneOfType([PT.string, PT.number]),\n height: PT.oneOfType([PT.string, PT.number]),\n color: PT.string,\n color2: PT.string,\n stroke: PT.string,\n stroke2: PT.string,\n viewBox: PT.string\n};","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var ArrowBottom = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 11 12\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M10.8468 3.13984C11.0457 3.33138 11.0517 3.64791 10.8602 3.84682L6.04534 8.84682C5.95332 8.94238 5.82709 8.99746 5.69445 8.99991C5.5618 9.00237 5.43362 8.95201 5.33812 8.85992L0.152931 3.85992C-0.0458479 3.66824 -0.0516033 3.35171 0.140078 3.15293C0.331758 2.95415 0.648288 2.9484 0.847067 3.14008L5.67208 7.79277L10.1398 3.15318C10.3314 2.95427 10.6479 2.9483 10.8468 3.13984Z\",\n fill: color\n }));\n});\nexport default ArrowBottom;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _typeArrowTickMixin;\nimport { css } from 'styled-components';\n// import type { WithTheme } from '../../theme/entity';\n// import { Color as PaletteColor } from '../../utils/types/palette';\nimport { Position } from '../../utils/types';\nexport var typeArrowTickMixin = (_typeArrowTickMixin = {}, _defineProperty(_typeArrowTickMixin, Position.Right, css([\"svg{transform:rotate(-90deg);transition:transform 150ms ease-out;}\"])), _defineProperty(_typeArrowTickMixin, Position.Left, css([\"svg{transform:rotate(90deg);transition:transform 150ms ease-out;}\"])), _defineProperty(_typeArrowTickMixin, Position.Top, css([\"svg{transform:rotate(180deg);transition:transform 150ms ease-out;}\"])), _defineProperty(_typeArrowTickMixin, Position.Bottom, css([\"svg{transform:rotate(0);transition:transform 150ms ease-out;}\"])), _typeArrowTickMixin);","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { typeArrowTickMixin } from './arrow-tick.mixin';\nimport { Position } from '../../utils/types';\nvar baseClassName = 'ArrowTick';\nvar ArrowTick = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-tlypde-0\"\n})(function (_ref) {\n var _ref$type = _ref.type,\n type = _ref$type === void 0 ? Position.Right : _ref$type;\n return css([\"display:inline-flex;\", \"\"], typeArrowTickMixin[type]);\n});\nvar Styled = applyDisplayNames({\n ArrowTick: ArrowTick\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"IconProps\"];\nimport React from 'react';\nimport PT from 'prop-types';\nimport ArrowBottom from '@scaleflex/icons/arrow-bottom';\nimport { iconPropTypes } from '@scaleflex/icons/icon.prop-types';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport { Position } from '../../utils/types';\nimport Styled from './arrow-tick.styles';\nvar ArrowTick = intrinsicComponent(function (_ref, ref) {\n var IconPropsData = _ref.IconProps,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Styled.ArrowTick, _extends({}, rest, {\n ref: ref\n }), /*#__PURE__*/React.createElement(ArrowBottom, IconPropsData));\n});\nArrowTick.defaultProps = {\n type: Position.Right\n};\nArrowTick.propTypes = {\n type: PT.oneOf(objectValues(Position)),\n IconProps: PT.exact(iconPropTypes)\n};\nexport default ArrowTick;","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { Color as PColor } from '../../utils/types/palette';\nimport { FontVariant } from '../../utils/types/typography';\nvar baseClassName = 'AccordionHeader';\nvar Icon = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'icon')\n}).withConfig({\n componentId: \"sc-1dtjsgt-0\"\n})(function () {\n return css([\"display:inline-flex;padding-left:8px;\"]);\n});\nvar Label = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'label')\n}).withConfig({\n componentId: \"sc-1dtjsgt-1\"\n})(function (_ref) {\n var theme = _ref.theme;\n return css([\"\", \"\"], theme.typography.font[FontVariant.ButtonSm]);\n});\nvar Header = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-1dtjsgt-2\"\n})(function (_ref2) {\n var theme = _ref2.theme,\n fullWidth = _ref2.fullWidth;\n return css([\"display:inline-flex;align-items:center;justify-content:space-between;box-sizing:border-box;cursor:pointer;width:\", \";color:\", \";user-select:none;\"], fullWidth ? '100%' : 'auto', theme.palette[PColor.LinkPrimary]);\n});\nvar Wrapper = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'wrapper')\n}).withConfig({\n componentId: \"sc-1dtjsgt-3\"\n})(function (_ref3) {\n var theme = _ref3.theme;\n return css([\"color:\", \";\"], theme.palette[PColor.LinkPrimary]);\n});\nvar Styled = applyDisplayNames({\n Header: Header,\n Wrapper: Wrapper,\n Icon: Icon,\n Label: Label\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"expanded\", \"label\", \"onChange\", \"onClick\", \"onContextMenu\", \"hideIcon\", \"fullWidth\", \"iconProps\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport React from 'react';\nimport PT from 'prop-types';\nimport { iconPropTypes } from '@scaleflex/icons/icon.prop-types';\nimport { intrinsicComponent } from '../../utils/functions';\nimport ArrowTick from '../arrow-tick';\nimport { Position as ArrowTickType } from '../../utils/types';\nimport Styled from './accordion-header.styles';\nvar AccordionHeader = intrinsicComponent(function (_ref, ref) {\n var expanded = _ref.expanded,\n label = _ref.label,\n onChange = _ref.onChange,\n _onClick = _ref.onClick,\n onContextMenu = _ref.onContextMenu,\n hideIcon = _ref.hideIcon,\n fullWidth = _ref.fullWidth,\n iconPropsData = _ref.iconProps,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Styled.Header, _extends({\n ref: ref,\n onClick: function onClick(event) {\n if (typeof onChange === 'function') {\n onChange(!expanded);\n }\n if (typeof _onClick === 'function') {\n _onClick(event);\n }\n },\n fullWidth: fullWidth\n }, rest), /*#__PURE__*/React.createElement(Styled.Label, {\n onContextMenu: onContextMenu\n }, label), !hideIcon && /*#__PURE__*/React.createElement(Styled.Icon, {\n onContextMenu: onContextMenu\n }, /*#__PURE__*/React.createElement(ArrowTick, {\n type: expanded ? ArrowTickType.Top : ArrowTickType.Bottom,\n IconProps: _objectSpread({\n size: 11\n }, iconPropsData)\n })));\n});\nAccordionHeader.defaultProps = {\n expanded: false,\n hideIcon: false,\n fullWidth: false\n};\nAccordionHeader.propTypes = {\n label: PT.node.isRequired,\n expanded: PT.bool,\n hideIcon: PT.bool,\n fullWidth: PT.bool,\n onChange: PT.func,\n iconProps: PT.exact(iconPropTypes)\n};\nexport default AccordionHeader;","import styled from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nvar baseClassName = 'AccordionDetails';\nvar AccordionDetails = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-1wr6wpr-0\"\n})([\"margin:16px 0;\"]);\nvar Styled = applyDisplayNames({\n AccordionDetails: AccordionDetails\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"expanded\", \"children\"];\nimport React from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent } from '../../utils/functions';\nimport Styled from './accordion-details.styles';\nvar AccordionDetails = intrinsicComponent(function (_ref, ref) {\n var expanded = _ref.expanded,\n children = _ref.children,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(React.Fragment, null, expanded && /*#__PURE__*/React.createElement(Styled.AccordionDetails, _extends({\n ref: ref\n }, rest), children));\n});\nAccordionDetails.defaultProps = {\n expanded: false\n};\nAccordionDetails.propTypes = {\n expanded: PT.bool\n};\nexport default AccordionDetails;","import styled from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nvar baseClassName = 'Accordion';\nvar Accordion = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-1g4tz7s-0\"\n})([\"\"]);\nvar Styled = applyDisplayNames({\n Accordion: Accordion\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"label\", \"expanded\", \"children\", \"detailStyle\", \"headerStyle\", \"fullWidth\", \"iconProps\", \"onClick\", \"onChange\", \"onContextMenu\", \"hideIcon\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport React from 'react';\nimport PT from 'prop-types';\nimport { iconPropTypes } from '@scaleflex/icons/icon.prop-types';\nimport { intrinsicComponent } from '../../utils/functions';\nimport AccordionHeader from '../accordion-header';\nimport AccordionDetails from '../accordion-details';\nimport Styled from './accordion.styles';\nvar Accordion = intrinsicComponent(function (_ref, ref) {\n var label = _ref.label,\n expanded = _ref.expanded,\n children = _ref.children,\n detailStyle = _ref.detailStyle,\n headerStyle = _ref.headerStyle,\n fullWidth = _ref.fullWidth,\n iconPropsData = _ref.iconProps,\n _onClick = _ref.onClick,\n onChange = _ref.onChange,\n onContextMenu = _ref.onContextMenu,\n hideIcon = _ref.hideIcon,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Styled.Accordion, _extends({\n ref: ref\n }, rest), /*#__PURE__*/React.createElement(AccordionHeader, {\n label: label,\n expanded: expanded,\n style: _objectSpread({}, headerStyle),\n hideIcon: hideIcon,\n onClick: function onClick(event) {\n if (typeof onChange === 'function') {\n onChange(!expanded, event);\n }\n if (typeof _onClick === 'function') {\n _onClick(event);\n }\n },\n onContextMenu: onContextMenu,\n iconProps: iconPropsData,\n fullWidth: fullWidth\n }), /*#__PURE__*/React.createElement(AccordionDetails, {\n expanded: expanded,\n style: _objectSpread({}, detailStyle)\n }, children));\n});\nAccordion.defaultProps = {\n expanded: false,\n hideIcon: false\n};\nAccordion.propTypes = {\n label: PT.node.isRequired,\n expanded: PT.bool,\n detailStyle: PT.object,\n headerStyle: PT.object,\n onChange: PT.func,\n onContextMenu: PT.func,\n hideIcon: PT.bool,\n fullWidth: PT.bool,\n iconProps: PT.exact(iconPropTypes)\n};\nexport default Accordion;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"stroke\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Arrow = intrinsicComponent(function (_ref, ref) {\n var _ref$stroke = _ref.stroke,\n stroke = _ref$stroke === void 0 ? 'currentColor' : _ref$stroke,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 10 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size * (51 / 56),\n height: size,\n viewBox: \"0 0 51 56\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12.2754 3L37.2754 27.0741L12.2754 53\",\n stroke: stroke,\n strokeWidth: \"5\",\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n }));\n});\nexport default Arrow;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Tick = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 14 14\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12.9783 2.30184C12.7972 2.12074 12.586 2 12.3143 2C12.0728 2 11.8314 2.09055 11.6503 2.30184L4.73816 9.84779L2.29327 7.34254C2.11217 7.16143 1.8707 7.07088 1.62923 7.07088C1.38776 7.07088 1.14629 7.19162 0.995367 7.37272C0.663345 7.76511 0.663345 8.36879 1.02555 8.73099L4.13448 11.9003C4.31559 12.0814 4.52687 12.1719 4.76835 12.1719C5.00982 12.1719 5.25129 12.0814 5.43239 11.8701L12.9783 3.62993C13.3406 3.2979 13.3406 2.66404 12.9783 2.30184Z\",\n fill: color\n }));\n});\nexport default Tick;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var CopyOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 16 16\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M2.33984 12.111V2.04761C2.33984 1.49532 2.78756 1.04761 3.33984 1.04761H10.8182C11.3705 1.04761 11.8182 1.49532 11.8182 2.04761V12.111C11.8182 12.6633 11.3705 13.111 10.8182 13.111H3.33984C2.78756 13.111 2.33984 12.6633 2.33984 12.111ZM3.33984 12.111V2.04761L10.8182 2.04761L10.8182 12.111L3.33984 12.111Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13.66 4.97388C13.66 4.69774 13.4361 4.47388 13.16 4.47388C12.8838 4.47388 12.66 4.69774 12.66 4.97388V13.9523H5.40491C5.12876 13.9523 4.90491 14.1761 4.90491 14.4523C4.90491 14.7284 5.12876 14.9523 5.40491 14.9523H13.16C13.4361 14.9523 13.66 14.7284 13.66 14.4523V4.97388Z\",\n fill: color\n }));\n});\nexport default CopyOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var EyeOpen = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 32\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M25 31.625C8.64336 31.625 0.533984 17.3656 0.196875 16.759C-0.065625 16.2867 -0.065625 15.7129 0.196875 15.2406C0.533984 14.6344 8.64336 0.375 25 0.375C41.3566 0.375 49.466 14.6344 49.8031 15.241C50.0656 15.7133 50.0656 16.2871 49.8031 16.7594C49.466 17.3656 41.3566 31.625 25 31.625ZM3.40117 15.9977C5.25977 18.8145 12.557 28.5 25 28.5C37.4824 28.5 44.7473 18.8223 46.5988 16.0023C44.7402 13.1855 37.443 3.5 25 3.5C12.5176 3.5 5.25273 13.1777 3.40117 15.9977ZM25 25.375C19.8305 25.375 15.625 21.1695 15.625 16C15.625 10.8305 19.8305 6.625 25 6.625C30.1695 6.625 34.375 10.8305 34.375 16C34.375 21.1695 30.1695 25.375 25 25.375ZM25 9.75C21.5539 9.75 18.75 12.5539 18.75 16C18.75 19.4461 21.5539 22.25 25 22.25C28.4461 22.25 31.25 19.4461 31.25 16C31.25 12.5539 28.4461 9.75 25 9.75Z\",\n fill: color\n }));\n});\nexport default EyeOpen;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var EyeClosed = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 44 44\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M36.2553 6.05501C36.5966 5.71376 37.1514 5.71376 37.4926 6.05501C37.8339 6.39626 37.8339 6.95103 37.4926 7.29228L32.3765 12.4084C38.3601 15.8067 42.6046 20.7607 42.7917 20.9825C43.0682 21.3097 43.0699 21.7874 42.7936 22.113C42.3893 22.5908 32.7818 33.7978 22.0001 33.7978C18.9909 33.7978 15.9678 33.1203 13.0065 31.7785L7.74272 37.0423C7.57292 37.2121 7.34897 37.2978 7.12495 37.2978C6.90092 37.2978 6.67698 37.212 6.50545 37.0423C6.1642 36.701 6.1642 36.1462 6.50545 35.805L17.0426 25.2678C17.0453 25.265 17.0481 25.2622 17.0509 25.2595C17.0531 25.2573 17.0553 25.2551 17.0575 25.2529L25.7063 16.6041C25.7081 16.6023 25.7098 16.6005 25.7116 16.5987C25.7134 16.5969 25.7152 16.5952 25.717 16.5934L30.2895 12.0208C30.3028 12.0067 30.3164 11.9931 30.3304 11.9799L36.2553 6.05501ZM31.0895 13.6954L27.5301 17.2548C28.4835 18.476 28.9998 19.9721 28.9998 21.5478C28.9998 25.4083 25.8603 28.5478 21.9999 28.5478C20.4242 28.5478 18.9281 28.0314 17.7069 27.078L14.3353 30.4497C16.8728 31.5113 19.445 32.0478 22 32.0478C30.6537 32.0478 38.863 23.8071 40.9489 21.5478C39.6267 20.1195 35.855 16.3016 31.0895 13.6954ZM18.9574 25.8276C19.8392 26.458 20.8929 26.7977 21.9999 26.7977C24.8943 26.7977 27.2499 24.4422 27.2499 21.5477C27.2499 20.4409 26.9092 19.3873 26.2793 18.5056L18.9574 25.8276Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M27.7418 10.3057C25.7504 9.63545 23.8184 9.29773 22.0001 9.29773C11.2183 9.29773 1.61084 20.5047 1.20659 20.9825C0.951064 21.2835 0.930064 21.721 1.15762 22.0482C1.27837 22.2215 4.17111 26.3287 9.18485 29.659C9.33358 29.7587 9.49985 29.806 9.66785 29.806C9.94963 29.806 10.2279 29.6695 10.3959 29.4122C10.6636 29.0115 10.5534 28.4672 10.1509 28.2012C6.46889 25.753 3.94889 22.7973 3.00561 21.595C5.01989 19.4075 13.2834 11.0478 22.0001 11.0478C23.6293 11.0478 25.3741 11.3558 27.1835 11.963C27.642 12.1275 28.139 11.8738 28.2913 11.4135C28.4453 10.955 28.2003 10.4598 27.7418 10.3057Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M23.2197 14.6685C22.8224 14.5985 22.4164 14.5477 22 14.5477C18.1395 14.5477 15 17.6872 15 21.5477C15 21.9642 15.0508 22.3702 15.1225 22.7674C15.1977 23.1909 15.567 23.4902 15.9817 23.4902C16.0325 23.4902 16.0832 23.4867 16.1357 23.4762C16.6099 23.3922 16.9285 22.9371 16.8445 22.4629C16.7902 22.1654 16.75 21.8627 16.75 21.5477C16.75 18.6532 19.1055 16.2977 22 16.2977C22.315 16.2977 22.6177 16.338 22.9152 16.3905C23.3807 16.485 23.8444 16.1559 23.9284 15.6817C24.0124 15.2075 23.694 14.7525 23.2197 14.6685Z\",\n fill: color\n }));\n});\nexport default EyeClosed;","import { lightPalette } from '../../theme/roots/palette';\nimport { Color } from '../../utils/types/palette';\nexport var getInputBackgroundColor = function getInputBackgroundColor(readOnly, disabled) {\n if (readOnly || disabled) {\n return lightPalette[Color.BackgroundHover];\n }\n return lightPalette[Color.BackgroundStateless];\n};\nexport var getInputTextColor = function getInputTextColor(readOnly, disabled) {\n if (readOnly) {\n return lightPalette[Color.AccentPrimaryHover];\n }\n if (disabled) {\n return lightPalette[Color.TextPlaceholder];\n }\n return lightPalette[Color.TextPrimary];\n};\nexport var getInputBorderColor = function getInputBorderColor(readOnly, disabled) {\n if (readOnly) {\n return lightPalette[Color.BordersItem];\n }\n if (disabled) {\n return lightPalette[Color.BordersSecondary];\n }\n return lightPalette[Color.BorderPrimaryStateless];\n};\nexport var handleCopyIcon = function handleCopyIcon(value, setShowCopyMessage) {\n navigator.clipboard.writeText(value);\n setShowCopyMessage(true);\n};","export var Type = {\n Text: 'text',\n Password: 'password'\n};","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { FontVariant as FV } from '../../utils/types/typography';\nimport { Color as PColor } from '../../utils/types/palette';\nimport { BorderRadiusSize as BRSize } from '../../utils/types/shape';\nimport { sizeInputMixin, fontSizeInputMixin, errorMixin } from './input.mixin';\nimport { InputSize } from '../../utils/types';\nimport { getInputBackgroundColor, getInputTextColor, getInputBorderColor } from './input.utils';\nvar baseClassName = 'Input';\nvar Icon = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'Icon')\n}).withConfig({\n componentId: \"sc-150k0cz-0\"\n})(function (_ref) {\n var iconClickStart = _ref.iconClickStart,\n iconClickEnd = _ref.iconClickEnd,\n disabled = _ref.disabled,\n readOnly = _ref.readOnly,\n iconType = _ref.iconType,\n palette = _ref.theme.palette;\n return css([\"display:flex;color:\", \";cursor:\", \";\", \"\"], palette[PColor.IconsPrimary], (iconClickStart || iconClickEnd) && !disabled && !readOnly ? 'pointer' : 'default', iconType === 'end' && css([\"color:\", \";\"], palette[PColor.IconsSecondary]));\n});\nvar CopyIcon = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'CopyIcon')\n}).withConfig({\n componentId: \"sc-150k0cz-1\"\n})(function (_ref2) {\n var palette = _ref2.theme.palette;\n return css([\"display:flex;color:\", \";cursor:pointer;\"], palette[PColor.IconsSecondary]);\n});\nvar PasswordIcon = /*#__PURE__*/styled(CopyIcon).attrs({\n className: generateClassNames(baseClassName, 'PasswordIcon')\n}).withConfig({\n componentId: \"sc-150k0cz-2\"\n})([\"\"]);\nvar Container = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'Container')\n}).withConfig({\n componentId: \"sc-150k0cz-3\"\n})(function () {\n return css([\"display:block;color:inherit;font-size:inherit;width:100%;min-width:0;margin:0;padding:0;border:0;background-color:transparent;outline:none;\"]);\n});\nvar Base = /*#__PURE__*/styled.input.attrs({\n className: generateClassNames(baseClassName, 'Base')\n}).withConfig({\n componentId: \"sc-150k0cz-4\"\n})(function (_ref3) {\n var palette = _ref3.theme.palette,\n _ref3$isEllipsis = _ref3.isEllipsis,\n isEllipsis = _ref3$isEllipsis === void 0 ? false : _ref3$isEllipsis;\n return css([\"display:block;color:inherit;width:100%;min-width:fit-content;margin:0;padding:0;border:0;background-color:transparent;outline:none;\", \" &::placeholder{color:\", \";}\"], isEllipsis && css([\"text-overflow:ellipsis;\"]), palette[PColor.TextPlaceholder]);\n});\nvar Input = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-150k0cz-5\"\n})(function (_ref4) {\n var _ref4$size = _ref4.size,\n size = _ref4$size === void 0 ? InputSize.Md : _ref4$size,\n _ref4$error = _ref4.error,\n error = _ref4$error === void 0 ? false : _ref4$error,\n _ref4$fullWidth = _ref4.fullWidth,\n fullWidth = _ref4$fullWidth === void 0 ? false : _ref4$fullWidth,\n _ref4$readOnly = _ref4.readOnly,\n readOnly = _ref4$readOnly === void 0 ? false : _ref4$readOnly,\n _ref4$disabled = _ref4.disabled,\n disabled = _ref4$disabled === void 0 ? false : _ref4$disabled,\n _ref4$isHovering = _ref4.isHovering,\n isHovering = _ref4$isHovering === void 0 ? false : _ref4$isHovering,\n _ref4$isSelectedItems = _ref4.isSelectedItems,\n isSelectedItems = _ref4$isSelectedItems === void 0 ? false : _ref4$isSelectedItems,\n theme = _ref4.theme;\n return css([\"position:relative;display:inline-flex;align-items:center;box-sizing:border-box;column-gap:8px;cursor:text;transition:all 100ms ease-out;width:\", \";pointer-events:\", \";background-color:\", \";border-radius:\", \";border:1px solid \", \";color:\", \";\", \" \", \";\", \"{\", \"}\", \" \", \" &:hover{color:\", \";}\", \"\"], fullWidth ? '100%' : '300px', disabled ? 'none' : 'auto', getInputBackgroundColor(readOnly, disabled), theme.shape.borderRadius[BRSize.Md], getInputBorderColor(readOnly, disabled), disabled ? theme.palette[PColor.TextPlaceholder] : theme.palette[PColor.TextPrimary], sizeInputMixin[size], isSelectedItems && \"\\n height: fit-content;\\n\\n \".concat(Base, \" {\\n max-width: fit-content;\\n min-width: 20px;\\n flex-grow: 1;\\n width: 40px;\\n }\\n \"), Base, fontSizeInputMixin[size], !readOnly && !disabled && css([\"&:focus-within{background-color:\", \"!important;border:1px solid \", \";&:hover{border:1px solid \", \";\", \"{color:\", \";}}}\", \" &:hover{background-color:\", \";border:1px solid \", \";\", \"{color:\", \";}}\"], theme.palette[PColor.BackgroundSecondary], theme.palette[PColor.AccentStateless], theme.palette[PColor.AccentStateless], Icon, theme.palette[PColor.IconsPrimary], isHovering && css([\"\", \"{color:\", \";}\"], Icon, theme.palette[PColor.IconsPrimaryHover]), theme.palette[PColor.BackgroundStateless], theme.palette[PColor.BordersPrimaryHover], Icon, theme.palette[PColor.IconsPrimaryHover]), disabled && css([\"\", \"{color:\", \";}\"], Icon, theme.palette[PColor.IconsMuted]), getInputTextColor(readOnly, disabled), error && errorMixin);\n});\nvar ClearIcon = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'ClearIcon')\n}).withConfig({\n componentId: \"sc-150k0cz-6\"\n})(function (_ref5) {\n var palette = _ref5.theme.palette;\n return css([\"display:flex;cursor:pointer;color:\", \";\"], palette[PColor.IconsPrimary]);\n});\nvar NotificationBox = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'NotificationBox')\n}).withConfig({\n componentId: \"sc-150k0cz-7\"\n})(function (_ref6) {\n var _ref6$size = _ref6.size,\n size = _ref6$size === void 0 ? InputSize.Md : _ref6$size,\n palette = _ref6.theme.palette;\n return css([\"display:flex;position:absolute;align-items:center;max-height:34px;right:0px;padding:8px 12px;column-gap:6px;bottom:\", \";box-shadow:0px 2px 6px \", \";background-color:\", \";border-radius:4px;\"], size === InputSize.Md ? '45px' : '35px', palette[PColor.LargeShadow], palette[PColor.BackgroundStateless]);\n});\nvar NotificationIcon = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'NotificationIcon')\n}).withConfig({\n componentId: \"sc-150k0cz-8\"\n})(function (_ref7) {\n var palette = _ref7.theme.palette;\n return css([\"color:\", \";\"], palette[PColor.IconsPrimary]);\n});\nvar NotificationText = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'NotificationText')\n}).withConfig({\n componentId: \"sc-150k0cz-9\"\n})(function (_ref8) {\n var _ref8$theme = _ref8.theme,\n palette = _ref8$theme.palette,\n font = _ref8$theme.typography.font;\n return css([\"white-space:nowrap;\", \";color:\", \";\"], font[FV.TextSmall], palette[PColor.TextPrimary]);\n});\nvar FieldWrapper = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'fieldWrapper')\n}).withConfig({\n componentId: \"sc-150k0cz-10\"\n})(function (_ref9) {\n var isSelectedItems = _ref9.isSelectedItems;\n return css([\"width:100%;height:100%;display:inline-flex;flex-wrap:wrap;gap:8px;max-height:120px;\", \";::-webkit-scrollbar{display:none;}\"], isSelectedItems && \"\\n overflow-y: auto;\\n \");\n});\nvar Styled = applyDisplayNames({\n Input: Input,\n Container: Container,\n Base: Base,\n Icon: Icon,\n CopyIcon: CopyIcon,\n PasswordIcon: PasswordIcon,\n ClearIcon: ClearIcon,\n NotificationBox: NotificationBox,\n NotificationIcon: NotificationIcon,\n NotificationText: NotificationText,\n FieldWrapper: FieldWrapper\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"inputType\", \"children\", \"iconStart\", \"iconEnd\", \"iconChange\", \"clearIcon\", \"iconClickStart\", \"iconClickEnd\", \"clearIconClick\", \"size\", \"className\", \"style\", \"fullWidth\", \"readOnly\", \"disabled\", \"hideCopyIcon\", \"focusOnMount\", \"focusOnClick\", \"isEllipsis\", \"copyTextMessage\", \"copySuccessIcon\", \"error\", \"renderTags\", \"showPlaceholder\"];\nimport React, { useState, useRef, useEffect } from 'react';\nimport PT from 'prop-types';\nimport CopyOutline from '@scaleflex/icons/copy-outline';\nimport EyeOpen from '@scaleflex/icons/eye-open';\nimport EyeClosed from '@scaleflex/icons/eye-closed';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport { InputSize } from '../../utils/types';\nimport { handleCopyIcon } from './input.utils';\nimport { Type } from './types';\nimport Styled from './input.styles';\nvar getIconSize = function getIconSize(sizeName, iconType) {\n switch (sizeName) {\n case InputSize.Md:\n return iconType === 'start' ? 15 : 14;\n case InputSize.Sm:\n default:\n return iconType === 'start' ? 13 : 10;\n }\n};\nvar getPasswordIconSize = function getPasswordIconSize(sizeName) {\n switch (sizeName) {\n case InputSize.Md:\n return 16;\n case InputSize.Sm:\n default:\n return 14;\n }\n};\nvar Input = intrinsicComponent(function (_ref, ref) {\n var _rest$selectedItems;\n var inputType = _ref.inputType,\n children = _ref.children,\n iconStart = _ref.iconStart,\n iconEnd = _ref.iconEnd,\n iconChange = _ref.iconChange,\n clearIcon = _ref.clearIcon,\n iconClickStart = _ref.iconClickStart,\n iconClickEnd = _ref.iconClickEnd,\n clearIconClick = _ref.clearIconClick,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? InputSize.Md : _ref$size,\n className = _ref.className,\n style = _ref.style,\n fullWidth = _ref.fullWidth,\n readOnly = _ref.readOnly,\n disabled = _ref.disabled,\n _ref$hideCopyIcon = _ref.hideCopyIcon,\n hideCopyIcon = _ref$hideCopyIcon === void 0 ? false : _ref$hideCopyIcon,\n _ref$focusOnMount = _ref.focusOnMount,\n focusOnMount = _ref$focusOnMount === void 0 ? false : _ref$focusOnMount,\n _ref$focusOnClick = _ref.focusOnClick,\n focusOnClick = _ref$focusOnClick === void 0 ? true : _ref$focusOnClick,\n _ref$isEllipsis = _ref.isEllipsis,\n isEllipsis = _ref$isEllipsis === void 0 ? false : _ref$isEllipsis,\n copyTextMessage = _ref.copyTextMessage,\n copySuccessIcon = _ref.copySuccessIcon,\n error = _ref.error,\n renderTags = _ref.renderTags,\n showPlaceholder = _ref.showPlaceholder,\n rest = _objectWithoutProperties(_ref, _excluded);\n var _useState = useState(false),\n _useState2 = _slicedToArray(_useState, 2),\n isHovering = _useState2[0],\n setIsHovering = _useState2[1];\n var _useState3 = useState(false),\n _useState4 = _slicedToArray(_useState3, 2),\n showCopyMessage = _useState4[0],\n setShowCopyMessage = _useState4[1];\n var _useState5 = useState(false),\n _useState6 = _slicedToArray(_useState5, 2),\n isVisible = _useState6[0],\n setIsVisible = _useState6[1];\n var inputRef = useRef(null);\n var isSelectedItems = (_rest$selectedItems = rest.selectedItems) === null || _rest$selectedItems === void 0 ? void 0 : _rest$selectedItems.length;\n var placeholder = rest.value || isSelectedItems ? '' : rest.placeholder;\n var handleFocus = function handleFocus() {\n var _inputRef$current;\n if (disabled || readOnly) return;\n showPlaceholder === null || showPlaceholder === void 0 ? void 0 : showPlaceholder(false);\n (_inputRef$current = inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.focus();\n };\n useEffect(function () {\n if (focusOnMount) {\n handleFocus();\n }\n }, []);\n useEffect(function () {\n setTimeout(function () {\n return setShowCopyMessage(false);\n }, 2000);\n }, [showCopyMessage]);\n var handleEntering = function handleEntering() {\n setTimeout(function () {\n setIsHovering(true);\n }, 150);\n };\n var handleLeaving = function handleLeaving() {\n setTimeout(function () {\n setIsHovering(false);\n }, 200);\n };\n var handleIconClick = function handleIconClick(event, type) {\n if (disabled || readOnly) return;\n if (focusOnClick) {\n handleFocus();\n }\n if (type === 'start') {\n if (iconClickStart) {\n iconClickStart(event);\n }\n } else if (type === 'end') {\n if (iconClickEnd) {\n iconClickEnd(event);\n }\n } else if (clearIconClick) {\n clearIconClick(event);\n }\n };\n var renderIcon = function renderIcon(_icon, type) {\n return _icon ? /*#__PURE__*/React.createElement(Styled.Icon, {\n onClick: function onClick(event) {\n return handleIconClick(event, type);\n },\n iconClickStart: iconClickStart,\n iconClickEnd: iconClickEnd,\n iconType: type,\n disabled: disabled,\n readOnly: readOnly\n }, typeof _icon === 'function' ? _icon({\n size: getIconSize(size, type)\n }) : _icon) : undefined;\n };\n var renderClearIcon = function renderClearIcon() {\n return disabled || readOnly || !clearIcon ? undefined : /*#__PURE__*/React.createElement(Styled.ClearIcon, {\n onClick: function onClick(event) {\n return handleIconClick(event, 'clear');\n }\n }, typeof clearIcon === 'function' ? clearIcon({\n size: getIconSize(size, 'clear')\n }) : clearIcon);\n };\n var renderCopyIcon = function renderCopyIcon(icon) {\n return isHovering && readOnly && !hideCopyIcon ? /*#__PURE__*/React.createElement(Styled.CopyIcon, {\n onClick: function onClick() {\n return handleCopyIcon(rest.value, setShowCopyMessage);\n }\n }, typeof icon === 'function' ? icon() : icon) : undefined;\n };\n var toggleVisibility = function toggleVisibility(event) {\n event.stopPropagation();\n setIsVisible(!isVisible);\n };\n var renderPasswordIcon = function renderPasswordIcon() {\n return /*#__PURE__*/React.createElement(Styled.PasswordIcon, {\n onClick: function onClick(event) {\n return toggleVisibility(event);\n }\n }, isVisible ? /*#__PURE__*/React.createElement(EyeClosed, {\n size: getPasswordIconSize(size)\n }) : /*#__PURE__*/React.createElement(EyeOpen, {\n size: getPasswordIconSize(size)\n }));\n };\n var getInputType = function getInputType() {\n if (!inputType && rest !== null && rest !== void 0 && rest.type) {\n return rest === null || rest === void 0 ? void 0 : rest.type;\n }\n if (inputType === Type.Password && !isVisible) {\n return Type.Password;\n }\n return Type.Text;\n };\n var renderField = function renderField() {\n return /*#__PURE__*/React.createElement(Styled.FieldWrapper, {\n isSelectedItems: Boolean(isSelectedItems)\n }, renderTags && renderTags(), /*#__PURE__*/React.createElement(Styled.Base, _extends({}, rest, {\n placeholder: placeholder,\n ref: inputRef,\n readOnly: Boolean(readOnly),\n type: getInputType(),\n isEllipsis: isEllipsis\n })));\n };\n var renderCopyText = function renderCopyText() {\n return /*#__PURE__*/React.createElement(Styled.NotificationBox, {\n size: size\n }, /*#__PURE__*/React.createElement(Styled.NotificationIcon, null, copySuccessIcon), /*#__PURE__*/React.createElement(Styled.NotificationText, null, copyTextMessage));\n };\n return /*#__PURE__*/React.createElement(Styled.Input, {\n onClick: focusOnClick ? handleFocus : undefined,\n ref: ref,\n size: size,\n onMouseEnter: handleEntering,\n onMouseLeave: handleLeaving,\n className: className,\n style: style,\n readOnly: readOnly,\n disabled: disabled,\n fullWidth: Boolean(fullWidth),\n error: error,\n clearIcon: clearIcon,\n isHovering: rest.isHovering,\n isSelectedItems: Boolean(isSelectedItems)\n }, renderIcon(iconStart, 'start'), renderField(), renderCopyIcon( /*#__PURE__*/React.createElement(CopyOutline, {\n size: getIconSize(size, 'copy')\n })), showCopyMessage && renderCopyText(), renderClearIcon(), inputType === Type.Password && renderPasswordIcon(), renderIcon(iconEnd, 'end'), renderIcon(iconChange, ''), children && /*#__PURE__*/React.createElement(React.Fragment, null, children));\n});\nexport var defaultProps = {\n size: InputSize.Md,\n error: false,\n fullWidth: false,\n readOnly: false,\n disabled: false,\n copyTextMessage: 'Copied!'\n};\nInput.defaultProps = defaultProps;\nexport var propTypes = {\n size: PT.oneOf(objectValues(InputSize)),\n iconStart: PT.oneOfType([PT.node, PT.func]),\n iconEnd: PT.oneOfType([PT.node, PT.func]),\n iconChange: PT.oneOfType([PT.node, PT.func]),\n copySuccessIcon: PT.oneOfType([PT.node, PT.func]),\n clearIcon: PT.node,\n error: PT.bool,\n fullWidth: PT.bool,\n value: PT.any,\n readOnly: PT.bool,\n disabled: PT.bool,\n iconClickStart: PT.func,\n showPlaceholder: PT.func,\n iconClickEnd: PT.func,\n clearIconClick: PT.func,\n focusOnMount: PT.bool,\n focusOnClick: PT.bool,\n copyTextMessage: PT.string,\n inputType: PT.string,\n renderTags: PT.func\n};\nInput.propTypes = propTypes;\nexport default Input;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _sizeHintMixin;\nimport { css } from 'styled-components';\nimport { FontVariant as FV } from '../../utils/types/typography';\nimport { InputSize } from '../../utils/types';\nexport var sizeHintMixin = (_sizeHintMixin = {}, _defineProperty(_sizeHintMixin, InputSize.Sm, function (_ref) {\n var font = _ref.theme.typography.font;\n return css(font[FV.LabelExtraSmallUp]);\n}), _defineProperty(_sizeHintMixin, InputSize.Md, function (_ref2) {\n var font = _ref2.theme.typography.font;\n return css(font[FV.LabelSmall]);\n}), _sizeHintMixin);","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { InputSize } from '../../utils/types';\nimport { Color as PColor } from '../../utils/types/palette';\nimport { sizeHintMixin } from './form-hint.mixin';\nvar baseClassName = 'FormHint';\nvar FormHint = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-1vu99sv-0\"\n})(function (_ref) {\n var _ref$size = _ref.size,\n size = _ref$size === void 0 ? InputSize.Md : _ref$size,\n _ref$error = _ref.error,\n error = _ref$error === void 0 ? false : _ref$error,\n _ref$disabled = _ref.disabled,\n disabled = _ref$disabled === void 0 ? false : _ref$disabled,\n theme = _ref.theme;\n return css([\"display:flex;align-items:center;color:\", \";\", \" \", \"\"], error ? theme.palette[PColor.Error] : theme.palette[PColor.TextSecondary], disabled && css([\"color:\", \";\"], theme.palette[PColor.ButtonDisabledText]), sizeHintMixin[size]);\n});\nvar Styled = applyDisplayNames({\n FormHint: FormHint\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport React from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport { InputSize } from '../../utils/types';\nimport Styled from './form-hint.styles';\nvar FormHint = intrinsicComponent(function (props, ref) {\n return /*#__PURE__*/React.createElement(Styled.FormHint, _extends({\n ref: ref\n }, props));\n});\nFormHint.defaultProps = {\n error: false\n};\nFormHint.propTypes = {\n error: PT.bool,\n size: PT.oneOf(objectValues(InputSize))\n};\nexport default FormHint;","export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}","import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n};","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;","export default function getUAString() {\n var uaData = navigator.userAgentData;\n\n if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {\n return uaData.brands.map(function (item) {\n return item.brand + \"/\" + item.version;\n }).join(' ');\n }\n\n return navigator.userAgent;\n}","import getUAString from \"../utils/userAgent.js\";\nexport default function isLayoutViewport() {\n return !/^((?!chrome|android).)*safari/i.test(getUAString());\n}","import { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport { round } from \"../utils/math.js\";\nimport getWindow from \"./getWindow.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getBoundingClientRect(element, includeScale, isFixedStrategy) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n\n var clientRect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1;\n\n if (includeScale && isHTMLElement(element)) {\n scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;\n scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;\n }\n\n var _ref = isElement(element) ? getWindow(element) : window,\n visualViewport = _ref.visualViewport;\n\n var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;\n var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;\n var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;\n var width = clientRect.width / scaleX;\n var height = clientRect.height / scaleY;\n return {\n width: width,\n height: height,\n top: y,\n right: x + width,\n bottom: y + height,\n left: x,\n x: x,\n y: y\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement, isShadowRoot } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getUAString from \"../utils/userAgent.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = /firefox/i.test(getUAString());\n var isIE = /Trident/i.test(getUAString());\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n if (isShadowRoot(currentNode)) {\n currentNode = currentNode.host;\n }\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}\nexport function withinMaxClamp(min, value, max) {\n var v = within(min, value, max);\n return v > max ? max : v;\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport { within } from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref, win) {\n var x = _ref.x,\n y = _ref.y;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(x * dpr) / dpr || 0,\n y: round(y * dpr) / dpr || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets,\n isFixed = _ref2.isFixed;\n var _offsets$x = offsets.x,\n x = _offsets$x === void 0 ? 0 : _offsets$x,\n _offsets$y = offsets.y,\n y = _offsets$y === void 0 ? 0 : _offsets$y;\n\n var _ref3 = typeof roundOffsets === 'function' ? roundOffsets({\n x: x,\n y: y\n }) : {\n x: x,\n y: y\n };\n\n x = _ref3.x;\n y = _ref3.y;\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom;\n var offsetY = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.height : // $FlowFixMe[prop-missing]\n offsetParent[heightProp];\n y -= offsetY - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right;\n var offsetX = isFixed && offsetParent === win && win.visualViewport ? win.visualViewport.width : // $FlowFixMe[prop-missing]\n offsetParent[widthProp];\n x -= offsetX - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n var _ref4 = roundOffsets === true ? roundOffsetsByDPR({\n x: x,\n y: y\n }, getWindow(popper)) : {\n x: x,\n y: y\n };\n\n x = _ref4.x;\n y = _ref4.y;\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref5) {\n var state = _ref5.state,\n options = _ref5.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration,\n isFixed: state.options.strategy === 'fixed'\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport isLayoutViewport from \"./isLayoutViewport.js\";\nexport default function getViewportRect(element, strategy) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0;\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n var layoutViewport = isLayoutViewport();\n\n if (layoutViewport || !layoutViewport && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element, strategy) {\n var rect = getBoundingClientRect(element, false, strategy === 'fixed');\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent, strategy) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary, strategy) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent, strategy));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$strategy = _options.strategy,\n strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport { within, withinMaxClamp } from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { min as mathMin, max as mathMax } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var normalizedTetherOffsetValue = typeof tetherOffsetValue === 'number' ? {\n mainAxis: tetherOffsetValue,\n altAxis: tetherOffsetValue\n } : Object.assign({\n mainAxis: 0,\n altAxis: 0\n }, tetherOffsetValue);\n var offsetModifierState = state.modifiersData.offset ? state.modifiersData.offset[state.placement] : null;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis) {\n var _offsetModifierState$;\n\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = offset + overflow[mainSide];\n var max = offset - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis : minLen - arrowLen - arrowPaddingMin - normalizedTetherOffsetValue.mainAxis;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis : maxLen + arrowLen + arrowPaddingMax + normalizedTetherOffsetValue.mainAxis;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = (_offsetModifierState$ = offsetModifierState == null ? void 0 : offsetModifierState[mainAxis]) != null ? _offsetModifierState$ : 0;\n var tetherMin = offset + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = offset + maxOffset - offsetModifierValue;\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _offsetModifierState$2;\n\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _len = altAxis === 'y' ? 'height' : 'width';\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var isOriginSide = [top, left].indexOf(basePlacement) !== -1;\n\n var _offsetModifierValue = (_offsetModifierState$2 = offsetModifierState == null ? void 0 : offsetModifierState[altAxis]) != null ? _offsetModifierState$2 : 0;\n\n var _tetherMin = isOriginSide ? _min : _offset - referenceRect[_len] - popperRect[_len] - _offsetModifierValue + normalizedTetherOffsetValue.altAxis;\n\n var _tetherMax = isOriginSide ? _offset + referenceRect[_len] + popperRect[_len] - _offsetModifierValue - normalizedTetherOffsetValue.altAxis : _max;\n\n var _preventedOffset = tether && isOriginSide ? withinMaxClamp(_tetherMin, _offset, _tetherMax) : within(tether ? _tetherMin : _min, _offset, tether ? _tetherMax : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport { round } from \"../utils/math.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = round(rect.width) / element.offsetWidth || 1;\n var scaleY = round(rect.height) / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n });\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref) {\n var name = _ref.name,\n _ref$options = _ref.options,\n options = _ref$options === void 0 ? {} : _ref$options,\n effect = _ref.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","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\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","import { useRef, useEffect } from 'react';\n/**\r\n * Creates DOM element to be used as React root.\r\n */\nfunction createRootElement(id) {\n var rootContainer = document.createElement('div');\n rootContainer.setAttribute('id', id);\n return rootContainer;\n}\n\n/**\r\n * Appends element as last child of body.\r\n */\nfunction addRootElement(rootElem) {\n document.body.append(rootElem);\n}\n\n/**\r\n * Hook to create a React Portal.\r\n * Automatically handles creating and tearing-down the root elements (no SRR\r\n * makes this trivial), so there is no need to ensure the parent target already\r\n * exists.\r\n * @example\r\n * const target = usePortal(id, [id]);\r\n * return createPortal(children, target);\r\n * @param {String} id The id of the target container, e.g 'modal' or 'spotlight'\r\n * @returns {HTMLElement} The DOM node to use as the Portal target.\r\n */\nfunction usePortal(id) {\n var rootElemRef = useRef(null);\n useEffect(function () {\n // Look for existing target dom element to append to\n var existingParent = document.querySelector(\"#\".concat(id));\n // Parent is either a new root or the existing dom element\n var parentElem = existingParent || createRootElement(id);\n\n // If there is no existing DOM element, add a new one.\n if (!existingParent) {\n addRootElement(parentElem);\n }\n\n // Add the detached element to the parent\n if (rootElemRef.current) {\n parentElem.append(rootElemRef.current);\n }\n return function removeElement() {\n if (rootElemRef.current) {\n rootElemRef.current.remove();\n }\n if (parentElem.childNodes.length === -1) {\n parentElem.remove();\n }\n };\n }, []);\n\n /**\r\n * It's important we evaluate this lazily:\r\n * - We need first render to contain the DOM element, so it shouldn't happen\r\n * in useEffect. We would normally put this in the constructor().\r\n * - We can't do 'const rootElemRef = useRef(document.createElement('div))',\r\n * since this will run every single render (that's a lot).\r\n * - We want the ref to consistently point to the same DOM element and only\r\n * ever run once.\r\n * @link https://reactjs.org/docs/hooks-faq.html#how-to-create-expensive-objects-lazily\r\n */\n function getRootElem() {\n if (!rootElemRef.current) {\n rootElemRef.current = document.createElement('div');\n }\n return rootElemRef.current;\n }\n return getRootElem();\n}\nexport default usePortal;\nexport { usePortal };","export var Position = {\n AutoStart: 'auto-start',\n Auto: 'auto',\n AutoEnd: 'auto-end',\n TopStart: 'top-start',\n Top: 'top',\n TopEnd: 'top-end',\n BottomStart: 'bottom-start',\n Bottom: 'bottom',\n BottomEnd: 'bottom-end',\n LeftStart: 'left-start',\n Left: 'left',\n LeftEnd: 'left-end',\n RightStart: 'right-start',\n Right: 'right',\n RightEnd: 'right-end'\n};","export var Strategy = {\n Absloute: 'absolute',\n Fixed: 'fixed'\n};","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _PopperMixin;\nimport { css } from 'styled-components';\nimport { Position } from './types';\nexport var PopperMixin = (_PopperMixin = {}, _defineProperty(_PopperMixin, Position.Auto, css([\"top:0px;bottom:0px;left:0px;right:0px;\"])), _defineProperty(_PopperMixin, Position.AutoEnd, css([\"top:0px;bottom:0px;left:0px;right:0px;\"])), _defineProperty(_PopperMixin, Position.AutoStart, css([\"top:0px;bottom:0px;left:0px;right:0px;\"])), _defineProperty(_PopperMixin, Position.Right, css([\"left:-4px;\"])), _defineProperty(_PopperMixin, Position.RightEnd, css([\"left:-4px;\"])), _defineProperty(_PopperMixin, Position.RightStart, css([\"left:-4px;\"])), _defineProperty(_PopperMixin, Position.Left, css([\"right:-4px;\"])), _defineProperty(_PopperMixin, Position.LeftEnd, css([\"right:-4px;\"])), _defineProperty(_PopperMixin, Position.LeftStart, css([\"right:-4px;\"])), _defineProperty(_PopperMixin, Position.Top, css([\"bottom:-4px;\"])), _defineProperty(_PopperMixin, Position.TopEnd, css([\"bottom:-4px;\"])), _defineProperty(_PopperMixin, Position.TopStart, css([\"bottom:-4px;\"])), _defineProperty(_PopperMixin, Position.Bottom, css([\"top:-4px;\"])), _defineProperty(_PopperMixin, Position.BottomEnd, css([\"top:-4px;\"])), _defineProperty(_PopperMixin, Position.BottomStart, css([\"top:-4px;\"])), _PopperMixin);","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { Color as PColor } from '../../utils/types/palette';\nimport { PopperMixin } from './popper.mixin';\nimport { Position } from './types';\nvar baseClassName = 'Popper';\nvar Popper = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-1373tsp-0\"\n})([\"\"]);\nvar PopperWrapper = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'wrapper')\n}).withConfig({\n componentId: \"sc-1373tsp-1\"\n})(function (_ref) {\n var zIndex = _ref.zIndex;\n return css([\"position:relative;z-index:\", \";\"], zIndex);\n});\nvar Arrow = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'arrow')\n}).withConfig({\n componentId: \"sc-1373tsp-2\"\n})(function (_ref2) {\n var _ref2$warning = _ref2.warning,\n warning = _ref2$warning === void 0 ? false : _ref2$warning,\n _ref2$position = _ref2.position,\n position = _ref2$position === void 0 ? Position.Right : _ref2$position,\n theme = _ref2.theme;\n return css([\"width:8px;height:8px;position:absolute;&::before{content:'';background:\", \";width:8px;height:8px;transform:rotate(45deg);position:absolute;top:0;left:0;z-index:-1;}\", \"\"], warning ? theme.palette[PColor.BackgroundOrange] : theme.palette[PColor.BackgroundGrey], PopperMixin[position]);\n});\nvar Overlay = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'Overlay')\n}).withConfig({\n componentId: \"sc-1373tsp-3\"\n})(function () {\n return css([\"position:fixed;right:0;bottom:0;top:0;left:0;background-color:transparent;\"]);\n});\nvar Styled = applyDisplayNames({\n Popper: Popper,\n Overlay: Overlay,\n Arrow: Arrow,\n PopperWrapper: PopperWrapper\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"anchorEl\", \"children\", \"open\", \"warning\", \"position\", \"arrow\", \"popperOptions\", \"onClick\", \"overlay\", \"zIndex\", \"enableUnderlayingEvent\", \"wrapperStyles\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport React, { useRef, useEffect } from 'react';\nimport { createPortal } from 'react-dom';\nimport PT from 'prop-types';\nimport { createPopper } from '@popperjs/core';\nimport usePortal from '../../hooks/use-portal';\nimport { intrinsicComponent, generateClassNames, useForkRef, objectValues } from '../../utils/functions';\nimport { Position, Strategy } from './types';\nimport Styled from './popper.styles';\nvar Popper = intrinsicComponent(function (_ref, ref) {\n var anchorEl = _ref.anchorEl,\n children = _ref.children,\n open = _ref.open,\n _ref$warning = _ref.warning,\n warning = _ref$warning === void 0 ? false : _ref$warning,\n _ref$position = _ref.position,\n initialPlacement = _ref$position === void 0 ? 'bottom' : _ref$position,\n _ref$arrow = _ref.arrow,\n arrow = _ref$arrow === void 0 ? false : _ref$arrow,\n popperOptions = _ref.popperOptions,\n onClick = _ref.onClick,\n _ref$overlay = _ref.overlay,\n overlay = _ref$overlay === void 0 ? false : _ref$overlay,\n _ref$zIndex = _ref.zIndex,\n zIndex = _ref$zIndex === void 0 ? 1300 : _ref$zIndex,\n enableUnderlayingEvent = _ref.enableUnderlayingEvent,\n _ref$wrapperStyles = _ref.wrapperStyles,\n wrapperStyles = _ref$wrapperStyles === void 0 ? {} : _ref$wrapperStyles,\n rest = _objectWithoutProperties(_ref, _excluded);\n var target = usePortal(generateClassNames('Popper'));\n var popperRef = useRef(null);\n var handlePopperRef = useForkRef(popperRef, ref);\n useEffect(function () {\n if (!anchorEl || !open || popperRef.current === null) {\n return undefined;\n }\n var defaultModifiers = [{\n name: 'arrow',\n options: {\n element: '[data-popper-arrow]'\n }\n }, {\n name: 'offset',\n options: {\n offset: [0, 10]\n }\n }];\n var popperModifiers = arrow ? defaultModifiers : [];\n if (popperOptions && popperOptions.modifiers != null) {\n popperModifiers = popperModifiers.concat(popperOptions.modifiers);\n }\n var popper = createPopper(anchorEl, popperRef.current, _objectSpread(_objectSpread({\n placement: initialPlacement\n }, popperOptions), {}, {\n modifiers: popperModifiers\n }));\n handlePopperRef.current = popper;\n return function () {\n popper.destroy();\n handlePopperRef.current = null;\n };\n }, [anchorEl, open, popperOptions, initialPlacement, arrow]);\n var passEventToUnderlayingEvent = function passEventToUnderlayingEvent(event) {\n setTimeout(function () {\n if (event.clientX && event.clientY) {\n var elem = document.elementFromPoint(event.clientX, event.clientY);\n if (elem) {\n elem.dispatchEvent(event.nativeEvent);\n }\n }\n }, 0);\n };\n var handleOnClicking = function handleOnClicking(event) {\n event.persist();\n event.preventDefault();\n event.stopPropagation();\n if (onClick) {\n onClick(event);\n }\n if (enableUnderlayingEvent) {\n passEventToUnderlayingEvent(event);\n }\n };\n var renderOverlay = function renderOverlay() {\n return /*#__PURE__*/React.createElement(Styled.Overlay, {\n onClick: handleOnClicking,\n onContextMenu: handleOnClicking\n });\n };\n if (!open) {\n return /*#__PURE__*/React.createElement(\"div\", {\n ref: handlePopperRef\n });\n }\n var render = function render() {\n var _handlePopperRef$stat;\n return /*#__PURE__*/React.createElement(Styled.PopperWrapper, {\n zIndex: zIndex,\n style: _objectSpread({}, wrapperStyles)\n }, overlay && renderOverlay(), /*#__PURE__*/React.createElement(Styled.Popper, _extends({\n ref: handlePopperRef\n }, rest), children, arrow && /*#__PURE__*/React.createElement(Styled.Arrow, {\n warning: warning,\n \"data-popper-arrow\": true,\n position: (handlePopperRef === null || handlePopperRef === void 0 ? void 0 : (_handlePopperRef$stat = handlePopperRef.state) === null || _handlePopperRef$stat === void 0 ? void 0 : _handlePopperRef$stat.placement) || initialPlacement\n })));\n };\n return /*#__PURE__*/createPortal(render(), target);\n});\nPopper.defaultProps = {};\nexport var propTypes = {\n anchorEl: PT.oneOfType([PT.instanceOf(Element), PT.object]),\n popperOptions: PT.shape({\n modifiers: PT.arrayOf(PT.shape({\n data: PT.object,\n effect: PT.func,\n enabled: PT.bool,\n fn: PT.func,\n name: PT.any.isRequired,\n options: PT.object,\n phase: PT.oneOf(['afterMain', 'afterRead', 'afterWrite', 'beforeMain', 'beforeRead', 'beforeWrite', 'main', 'read', 'write']),\n requires: PT.arrayOf(PT.string),\n requiresIfExists: PT.arrayOf(PT.string)\n })),\n onFirstUpdate: PT.func,\n placement: PT.oneOf(objectValues(Position)),\n strategy: PT.oneOf(objectValues(Strategy))\n }),\n overlay: PT.bool,\n warning: PT.bool,\n arrow: PT.bool,\n zIndex: PT.number,\n enableUnderlayingEvent: PT.bool,\n wrapperStyles: PT.object\n};\nPopper.propTypes = propTypes;\nexport default Popper;","import styled, { css, keyframes } from 'styled-components';\nimport { generateClassNames, applyDisplayNames, scrollBar } from '../../utils/functions';\nimport { Color as PColor } from '../../utils/types/palette';\nimport { BorderRadiusSize as BRSize } from '../../utils/types/shape';\nvar baseClassName = 'Menu';\nvar Overlay = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'Overlay')\n}).withConfig({\n componentId: \"sc-10okxhw-0\"\n})(function () {\n return css([\"position:fixed;right:0;bottom:0;top:0;left:0;background-color:transparent;z-index:-1;\"]);\n});\nvar opacityKeyframes = /*#__PURE__*/keyframes([\"from{opacity:0;}to{opacity:1;}\"]);\nvar transformKeyframes = /*#__PURE__*/keyframes([\"from{transform:scale(0.97);margin-top:0px;}to{transform:scale(1);margin-top:4px;}\"]);\nvar fadeInAnimation = /*#__PURE__*/css([\"animation:\", \" 250ms 0ms cubic-bezier(0.4,0,0.2,1),\", \" 250ms cubic-bezier(0.4,0,0.2,1);\"], opacityKeyframes, transformKeyframes);\nvar Menu = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-10okxhw-1\"\n})(function (_ref) {\n var rect = _ref.rect,\n theme = _ref.theme,\n scroll = _ref.scroll,\n _ref$maxHeight = _ref.maxHeight,\n maxHeight = _ref$maxHeight === void 0 ? '' : _ref$maxHeight;\n return css([\"min-width:\", \"px;width:195px;min-height:16px;overflow-x:hidden;overflow-y:auto;transition:opacity 250ms cubic-bezier(0.4,0,0,1),transform 250ms cubic-bezier(0.4,0,0,1),margin-top 250ms cubic-bezier(0.4,0,0,1);outline:0;box-shadow:0 2px 4px \", \";border-radius:\", \";\", \" \", \" margin-top:4px;\", \"\"], rect.width, theme.palette[PColor.MediumShadow], theme.shape.borderRadius[BRSize.Md], scroll && scrollBar, maxHeight && css([\"max-height:\", \";\"], Number.isNaN(+maxHeight) ? maxHeight : \"\".concat(maxHeight, \"px\")), fadeInAnimation);\n});\nvar Styled = applyDisplayNames({\n Menu: Menu,\n Overlay: Overlay\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _slicedToArray from \"@babel/runtime/helpers/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"id\", \"children\", \"open\", \"fullWidth\", \"anchorElPosition\", \"anchorEl\", \"onClose\", \"containerProps\", \"alignCenter\", \"maxHeight\", \"position\", \"popperOptions\", \"enableOverlay\", \"zIndex\", \"hideScroll\", \"scroll\", \"enableUnderlayingEvent\", \"popperWrapperStyles\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport React, { useState, useEffect, useCallback, useRef } from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport { propTypes as popperPropTypes } from '../popper/popper.component';\nimport { Position } from '../popper/types';\nimport Popper from '../popper';\nimport Styled from './menu.styles';\nvar Menu = intrinsicComponent(function (_ref, ref) {\n var id = _ref.id,\n children = _ref.children,\n open = _ref.open,\n fullWidth = _ref.fullWidth,\n anchorElPosition = _ref.anchorElPosition,\n anchorEl = _ref.anchorEl,\n onClose = _ref.onClose,\n containerProps = _ref.containerProps,\n alignCenter = _ref.alignCenter,\n maxHeight = _ref.maxHeight,\n position = _ref.position,\n popperOptions = _ref.popperOptions,\n _ref$enableOverlay = _ref.enableOverlay,\n enableOverlay = _ref$enableOverlay === void 0 ? true : _ref$enableOverlay,\n zIndex = _ref.zIndex,\n _ref$hideScroll = _ref.hideScroll,\n hideScroll = _ref$hideScroll === void 0 ? true : _ref$hideScroll,\n _ref$scroll = _ref.scroll,\n scroll = _ref$scroll === void 0 ? true : _ref$scroll,\n _ref$enableUnderlayin = _ref.enableUnderlayingEvent,\n enableUnderlayingEvent = _ref$enableUnderlayin === void 0 ? false : _ref$enableUnderlayin,\n _ref$popperWrapperSty = _ref.popperWrapperStyles,\n popperWrapperStyles = _ref$popperWrapperSty === void 0 ? {} : _ref$popperWrapperSty,\n rest = _objectWithoutProperties(_ref, _excluded);\n var _useState = useState(null),\n _useState2 = _slicedToArray(_useState, 2),\n timeout = _useState2[0],\n setTimeoutState = _useState2[1];\n var _useState3 = useState(new DOMRect()),\n _useState4 = _slicedToArray(_useState3, 2),\n rect = _useState4[0],\n setRect = _useState4[1];\n var menuRef = useRef(null);\n var updateRect = useCallback(function () {\n var _anchorEl$getBounding;\n var defaultPosition = _objectSpread({\n top: 0,\n left: 0,\n height: 0,\n width: 0\n }, anchorElPosition || {});\n var defaultRect = new DOMRect(defaultPosition.left, defaultPosition.top, defaultPosition.width, defaultPosition.height);\n setRect((_anchorEl$getBounding = anchorEl === null || anchorEl === void 0 ? void 0 : anchorEl.getBoundingClientRect()) !== null && _anchorEl$getBounding !== void 0 ? _anchorEl$getBounding : defaultRect);\n }, [open, timeout, anchorEl]);\n var handleWindowSizeChanged = useCallback(function () {\n if (open) {\n if (timeout) {\n clearTimeout(timeout);\n }\n setTimeoutState(setTimeout(updateRect, 300));\n }\n }, [open, timeout]);\n useEffect(function () {\n window.addEventListener('resize', handleWindowSizeChanged);\n return function () {\n window.removeEventListener('resize', handleWindowSizeChanged);\n };\n }, [handleWindowSizeChanged]);\n useEffect(function () {\n updateRect();\n }, [anchorElPosition, updateRect]);\n useEffect(function () {\n if (hideScroll) {\n if (open) {\n document.body.classList.add('Menu-open');\n updateRect();\n } else {\n document.body.classList.remove('Menu-open');\n }\n return function () {\n document.body.classList.remove('Menu-open');\n };\n }\n }, [open, updateRect]);\n var handleClose = function handleClose(event) {\n if (typeof onClose === 'function') {\n onClose(event);\n }\n };\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Popper, {\n ref: menuRef,\n position: position || 'bottom-start',\n open: Boolean(anchorEl),\n anchorEl: anchorEl,\n overlay: Boolean(enableOverlay),\n onClick: handleClose,\n popperOptions: popperOptions,\n zIndex: zIndex,\n enableUnderlayingEvent: enableUnderlayingEvent,\n wrapperStyles: popperWrapperStyles\n }, /*#__PURE__*/React.createElement(Styled.Menu, _extends({}, containerProps, {\n alignCenter: Boolean(alignCenter),\n scroll: scroll,\n rect: rect\n }, rest, {\n ref: ref,\n maxHeight: maxHeight\n }), children)));\n});\nexport var defaultProps = {\n open: false,\n containerProps: {},\n maxHeight: 250,\n position: Position.BottomStart,\n enableOverlay: true,\n hideScroll: true,\n scroll: true\n};\nMenu.defaultProps = defaultProps;\nexport var propTypes = {\n anchorElPosition: PT.shape({\n left: PT.number,\n right: PT.number,\n top: PT.number,\n bottom: PT.number\n }),\n anchorEl: PT.instanceOf(Element),\n open: PT.bool,\n fullWidth: PT.bool,\n onClose: PT.func,\n id: PT.string,\n containerProps: PT.object,\n alignCenter: PT.bool,\n maxHeight: PT.oneOfType([PT.string, PT.number]),\n popperOptions: popperPropTypes.popperOptions,\n position: PT.oneOf(objectValues(Position)),\n enableOverlay: PT.bool,\n zIndex: PT.number,\n hideScroll: PT.bool,\n scroll: PT.bool,\n enableUnderlayingEvent: PT.bool,\n popperWrapperStyles: PT.object\n};\nMenu.propTypes = propTypes;\nexport default Menu;","export var Size = {\n Sm: 'sm',\n Md: 'md'\n};","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _sizeMenuItemMixin;\nimport { css } from 'styled-components';\n// import type { With } from '../../utils/types';\n\n// import { Color as PaletteColor } from '../../utils/types/palette';\nimport { FontVariant as FV } from '../../utils/types/typography';\nimport { Size } from './types';\nexport var sizeMenuItemMixin = (_sizeMenuItemMixin = {}, _defineProperty(_sizeMenuItemMixin, Size.Sm, function (_ref) {\n var font = _ref.theme.typography.font;\n return css([\"padding:8px 16px;min-height:32px;\", \"\"], font[FV.LabelMedium]);\n}), _defineProperty(_sizeMenuItemMixin, Size.Md, function (_ref2) {\n var font = _ref2.theme.typography.font;\n return css([\"padding:11px 16px;min-height:40px;\", \"\"], font[FV.LabelLarge]);\n}), _sizeMenuItemMixin);","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { Color as PColor } from '../../utils/types/palette';\n// import { BorderRadiusSize as BRSize } from '../../utils/types/shape';\n\nimport { sizeMenuItemMixin } from './menu-item.mixin';\nimport { Size } from './types';\nvar baseClassName = 'MenuItem';\nvar Icon = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'Icon')\n}).withConfig({\n componentId: \"sc-rrzye0-0\"\n})(function (_ref) {\n var palette = _ref.theme.palette,\n disabled = _ref.disabled;\n return css([\"flex-shrink:0;margin-right:10px;color:\", \";\"], disabled ? palette[PColor.TextPlaceholder] : palette[PColor.IconsPrimary]);\n});\nvar Actions = /*#__PURE__*/styled(Icon).attrs({\n className: generateClassNames(baseClassName, 'Actions')\n}).withConfig({\n componentId: \"sc-rrzye0-1\"\n})(function () {\n return css([\"margin-right:0px;margin-left:16px;\"]);\n});\nvar Label = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'Label')\n}).withConfig({\n componentId: \"sc-rrzye0-2\"\n})([\"align-items:center;column-gap:4px;flex-grow:1;\"]);\nvar MenuItemWrapper = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'wrapper')\n}).withConfig({\n componentId: \"sc-rrzye0-3\"\n})(function (_ref2) {\n var _ref2$divider = _ref2.divider,\n divider = _ref2$divider === void 0 ? false : _ref2$divider,\n _ref2$noOptionsText = _ref2.noOptionsText,\n noOptionsText = _ref2$noOptionsText === void 0 ? false : _ref2$noOptionsText,\n _ref2$disabled = _ref2.disabled,\n disabled = _ref2$disabled === void 0 ? false : _ref2$disabled,\n theme = _ref2.theme;\n return css([\"\", \" \", \"\"], divider && css([\"width:100%;height:1px;background:\", \";box-sizing:border-box;\"], theme.palette[PColor.BordersSecondary]), (noOptionsText || disabled) && css([\"color:\", \";\"], theme.palette[PColor.ButtonDisabledText]));\n});\nvar MenuItem = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-rrzye0-4\"\n})(function (_ref3) {\n var _ref3$size = _ref3.size,\n size = _ref3$size === void 0 ? Size.Sm : _ref3$size,\n active = _ref3.active,\n theme = _ref3.theme,\n _ref3$disableHover = _ref3.disableHover,\n disableHover = _ref3$disableHover === void 0 ? false : _ref3$disableHover,\n noOptionsText = _ref3.noOptionsText,\n disabled = _ref3.disabled;\n return css([\"display:flex;justify-content:space-between;flex-direction:row;align-items:center;width:100%;background:\", \";color:\", \";cursor:pointer;box-sizing:border-box;transition:all 100ms ease-out;\", \" &:focus-within,&:focus,&:hover{\", \";\", \"}\", \"\"], theme.palette[active ? PColor.BackgroundActive : PColor.BackgroundSecondary], theme.palette[PColor.TextPrimary], sizeMenuItemMixin[size], !disableHover && \"background-color: \".concat(theme.palette[PColor.BackgroundHover]), (noOptionsText || disabled) && css([\"cursor:default;background-color:white;\"]), (noOptionsText || disabled) && css([\"& > svg{path{fill:\", \";}}color:\", \";\"], theme.palette[PColor.ButtonDisabledText], theme.palette[PColor.ButtonDisabledText]));\n});\nvar MenuPrefix = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'prefix')\n}).withConfig({\n componentId: \"sc-rrzye0-5\"\n})(function () {\n return css([\"display:flex;\"]);\n});\nvar MenuContent = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'content')\n}).withConfig({\n componentId: \"sc-rrzye0-6\"\n})(function () {\n return css([\"flex-grow:1;line-height:16px;\"]);\n});\nvar MenuSuffix = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'suffix')\n}).withConfig({\n componentId: \"sc-rrzye0-7\"\n})(function () {\n return css([\"display:flex;margin-left:8px;\"]);\n});\nvar Styled = applyDisplayNames({\n MenuItemWrapper: MenuItemWrapper,\n MenuItem: MenuItem,\n MenuPrefix: MenuPrefix,\n MenuContent: MenuContent,\n MenuSuffix: MenuSuffix,\n Label: Label,\n Icon: Icon,\n Actions: Actions\n});\nexport default Styled;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"list\", \"depth\", \"children\", \"disableHover\", \"noOptionsText\", \"disabled\", \"enableScrollIntoView\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport React, { useRef, useEffect } from 'react';\nimport Arrow from '@scaleflex/icons/arrow';\nimport PT from 'prop-types';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport Menu from '../menu';\nimport { Size } from './types';\nimport Styled from './menu-item.styles';\nvar MenuItem = intrinsicComponent(function (_ref, ref) {\n var list = _ref.list,\n _ref$depth = _ref.depth,\n depth = _ref$depth === void 0 ? 0 : _ref$depth,\n children = _ref.children,\n disableHover = _ref.disableHover,\n noOptionsText = _ref.noOptionsText,\n disabled = _ref.disabled,\n enableScrollIntoView = _ref.enableScrollIntoView,\n props = _objectWithoutProperties(_ref, _excluded);\n var menuItemRef = useRef(null);\n var _React$useState = React.useState(null),\n _React$useState2 = _slicedToArray(_React$useState, 2),\n anchorEl = _React$useState2[0],\n setAnchorEl = _React$useState2[1];\n var _React$useState3 = React.useState([]),\n _React$useState4 = _slicedToArray(_React$useState3, 2),\n selectedIds = _React$useState4[0],\n setSelectedIds = _React$useState4[1];\n var handleOpenMenu = function handleOpenMenu(event) {\n setAnchorEl(event.currentTarget);\n };\n var handleScroll = function handleScroll() {\n var _menuItemRef$current;\n (_menuItemRef$current = menuItemRef.current) === null || _menuItemRef$current === void 0 ? void 0 : _menuItemRef$current.scrollIntoView({\n behavior: 'auto',\n block: 'nearest'\n });\n };\n useEffect(function () {\n if (props.active && enableScrollIntoView) {\n handleScroll();\n }\n }, [props.active]);\n var handleSelectedId = function handleSelectedId(ev, selected, depthLevel) {\n var updatedArray = selectedIds.slice(0);\n updatedArray[depthLevel] = selected;\n setSelectedIds(updatedArray);\n handleOpenMenu(ev);\n };\n var handleCloseSubMenu = function handleCloseSubMenu(depthLevel) {\n var updatedArray = selectedIds.slice(0);\n updatedArray[depthLevel] = '';\n setSelectedIds(updatedArray);\n setAnchorEl(null);\n };\n var renderItems = function renderItems(options) {\n var depthLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n return options.map(function (option) {\n var hasOptions = option.subList && option.subList.length > 0;\n var subMenu;\n if (selectedIds[depthLevel] === option.key && hasOptions) {\n var newDepthLevel = depthLevel + 1;\n subMenu = /*#__PURE__*/React.createElement(Menu, _extends({\n key: option.key,\n position: \"right\",\n open: Boolean(anchorEl),\n anchorEl: anchorEl,\n enableOverlay: false\n }, option.subMenuProps), /*#__PURE__*/React.createElement(MenuItem, _extends({\n list: option.subList,\n depth: newDepthLevel\n }, props)));\n }\n if (option.content === 'divider') {\n return /*#__PURE__*/React.createElement(Styled.MenuItemWrapper, {\n divider: true,\n key: option.key\n });\n }\n return /*#__PURE__*/React.createElement(Styled.MenuItemWrapper, _extends({\n disabled: false,\n key: option.key,\n onMouseLeave: function onMouseLeave() {\n return handleCloseSubMenu(depthLevel);\n }\n }, props), /*#__PURE__*/React.createElement(Styled.MenuItem, _extends({}, props, {\n className: option.className,\n ref: ref,\n active: Boolean(option.active),\n onClick: option.onClick ? function (event) {\n return option.onClick(_objectSpread({\n event: event\n }, props));\n } : undefined,\n onMouseEnter: function onMouseEnter(ev) {\n return handleSelectedId(ev, option.key, depthLevel);\n },\n disableHover: disableHover || option.disableHover\n }), option.prefix && /*#__PURE__*/React.createElement(Styled.MenuPrefix, null, typeof option.prefix === 'function' ? option.prefix(props) : option.prefix), option.content && /*#__PURE__*/React.createElement(Styled.MenuContent, null, typeof option.content === 'function' ? option.content(props) : option.content), (option.suffix || option.subList) && /*#__PURE__*/React.createElement(Styled.MenuSuffix, null, typeof option.suffix === 'function' ? option.suffix(props) : option.suffix, option.subList && /*#__PURE__*/React.createElement(Arrow, {\n size: 10,\n color: \"#768A9F\"\n }))), subMenu);\n });\n };\n if (!list) {\n return /*#__PURE__*/React.createElement(Styled.MenuItemWrapper, {\n noOptionsText: Boolean(noOptionsText),\n disabled: Boolean(disabled)\n }, /*#__PURE__*/React.createElement(Styled.MenuItem, _extends({}, props, {\n ref: menuItemRef,\n disableHover: disableHover,\n noOptionsText: noOptionsText,\n disabled: disabled\n }), children));\n }\n return /*#__PURE__*/React.createElement(React.Fragment, null, renderItems(list, depth));\n});\nMenuItem.displayName = 'MenuItem';\nexport var defaultProps = {\n size: Size.Sm,\n active: false\n};\nMenuItem.defaultProps = defaultProps;\nMenuItem.propTypes = {\n size: PT.oneOf(objectValues(Size)),\n children: PT.oneOfType([PT.node, PT.func]),\n active: PT.bool,\n value: PT.oneOfType([PT.string, PT.number, PT.oneOf([null])]),\n depth: PT.number,\n disableHover: PT.bool,\n noOptionsText: PT.bool,\n disabled: PT.bool,\n enableScrollIntoView: PT.bool\n};\nexport default MenuItem;\n// list: PT.arrayOf(\n// PT.shape({\n// key: PT.string.isRequired,\n// content: PT.oneOfType([PT.string, PT.node]).isRequired,\n// prefix: PT.oneOfType([PT.string, PT.node]),\n// subList: PT.arrayOf(PT.object),\n// suffix: PT.oneOfType([PT.string, PT.node]),\n// onClick: PT.func,\n// disabled: PT.bool,\n// })\n// ),","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\", \"disabled\", \"size\"];\nimport React from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport { Size } from './types';\nimport Styled from './menu-item.styles';\nvar getIconSize = function getIconSize(sizeName) {\n switch (sizeName) {\n case Size.Md:\n return 16;\n case Size.Sm:\n default:\n return 14;\n }\n};\nvar MenuItemIcon = intrinsicComponent(function (_ref, ref) {\n var children = _ref.children,\n disabled = _ref.disabled,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? Size.Md : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Styled.Icon, _extends({\n disabled: disabled\n }, rest, {\n ref: ref\n }), children && typeof children === 'function' ? children({\n size: getIconSize(size)\n }) : children);\n});\nMenuItemIcon.defaultProps = {\n size: Size.Md\n};\nMenuItemIcon.propTypes = {\n size: PT.oneOf(objectValues(Size)),\n children: PT.oneOfType([PT.node, PT.func]).isRequired,\n disabled: PT.bool\n};\nexport default MenuItemIcon;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\"];\nimport React from 'react';\nimport { intrinsicComponent } from '../../utils/functions';\nimport Styled from './menu-item.styles';\nvar MenuItemLabel = intrinsicComponent(function (_ref, ref) {\n var children = _ref.children,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Styled.Label, _extends({}, rest, {\n ref: ref\n }), children);\n});\nMenuItemLabel.displayName = 'MenuItemLabel';\nexport default MenuItemLabel;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\"];\nimport React from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport { Size } from './types';\nimport Styled from './menu-item.styles';\nvar MenuItemActions = intrinsicComponent(function (_ref, ref) {\n var children = _ref.children,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Styled.Actions, _extends({}, rest, {\n ref: ref\n }), children && typeof children === 'function' ? children({\n size: rest.size\n }) : children);\n});\nMenuItemActions.displayName = 'MenuItemActions';\nMenuItemActions.defaultProps = {\n size: Size.Md\n};\nMenuItemActions.propTypes = {\n size: PT.oneOf(objectValues(Size)),\n children: PT.oneOfType([PT.node, PT.func]).isRequired\n};\nexport default MenuItemActions;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var CrossOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 44 44\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M43.3196 40.0403C44.2253 40.9461 44.2253 42.4146 43.3196 43.3204C42.4138 44.2262 40.9453 44.2262 40.0396 43.3204L21.9997 25.2802L3.95952 43.3207C3.05376 44.2264 1.58525 44.2264 0.679494 43.3207C-0.226258 42.4149 -0.226258 40.9464 0.679495 40.0406L18.7197 22.0001L0.679313 3.95941C-0.226437 3.05364 -0.226439 1.5851 0.679314 0.679328C1.58507 -0.226442 3.05358 -0.226443 3.95934 0.679328L21.9997 18.72L40.0398 0.679604C40.9455 -0.226163 42.414 -0.226165 43.3198 0.679605C44.2255 1.58537 44.2255 3.05392 43.3198 3.95969L25.2797 22.0001L43.3196 40.0403Z\",\n fill: color\n }));\n});\nexport default CrossOutline;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _colorBadgeMixin;\nimport { css } from 'styled-components';\nimport { Color as PaletteColor } from '../../utils/types/palette';\nimport { BadgeColor } from '../../utils/types';\nexport var colorBadgeMixin = (_colorBadgeMixin = {}, _defineProperty(_colorBadgeMixin, BadgeColor.Primary, function (_ref) {\n var palette = _ref.theme.palette;\n return css([\"background-color:\", \";color:\", \";\"], palette[PaletteColor.AccentPrimary], palette[PaletteColor.ButtonPrimaryText]);\n}), _defineProperty(_colorBadgeMixin, BadgeColor.White, function (_ref2) {\n var palette = _ref2.theme.palette;\n return css([\"background-color:\", \";color:\", \";\"], palette[PaletteColor.ButtonPrimaryText], palette[PaletteColor.AccentPrimary]);\n}), _defineProperty(_colorBadgeMixin, BadgeColor.Secondary, function (_ref3) {\n var palette = _ref3.theme.palette;\n return css([\"background-color:\", \";color:\", \";\"], palette[PaletteColor.Accent_1_2_Opacity], palette[PaletteColor.TextPrimary]);\n}), _colorBadgeMixin);","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { colorBadgeMixin } from './badge.mixin';\nvar baseClassName = 'Badge';\nvar defaultSize = 20;\nvar BadgeRoot = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-1rfm40m-0\"\n})([\"position:relative;display:inline-flex;flex-shrink:0;vertical-align:middle;\"]);\nvar Badge = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName)\n}).withConfig({\n componentId: \"sc-1rfm40m-1\"\n})(function (_ref) {\n var size = _ref.size,\n _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'secondary' : _ref$color,\n fontSize = _ref.fontSize,\n _ref$padding = _ref.padding,\n padding = _ref$padding === void 0 ? '0 6px' : _ref$padding,\n inline = _ref.inline;\n return css([\"\", \" display:flex;flex-wrap:wrap;flex-direction:row;justify-content:center;align-items:center;align-content:center;height:\", \"px;min-width:\", \"px;line-height:1;padding:\", \";font-size:\", \";box-sizing:border-box;transition:transform 225ms cubic-bezier(0.4,0,0.2,1) 0ms;border-radius:\", \"px;z-index:1;\", \"\"], inline ? '' : 'position: absolute;', size || defaultSize, size || defaultSize, typeof padding === 'number' ? \"\".concat(padding, \"px\") : padding, typeof fontSize === 'number' ? \"\".concat(fontSize, \"px\") : fontSize, (size || defaultSize) / 2, colorBadgeMixin[color]);\n});\nvar Styled = applyDisplayNames({\n BadgeRoot: BadgeRoot,\n Badge: Badge\n});\nexport default Styled;","import _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"badgeContent\"];\nimport React from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport { BadgeColor } from '../../utils/types';\nimport Styled from './badge.styles';\nvar Badge = intrinsicComponent(function (_ref, ref) {\n var badgeContent = _ref.badgeContent,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Styled.BadgeRoot, {\n ref: ref\n }, /*#__PURE__*/React.createElement(Styled.Badge, rest, badgeContent));\n});\nBadge.defaultProps = {\n color: BadgeColor.Secondary,\n inline: false\n};\nBadge.propTypes = {\n color: PT.oneOf(objectValues(BadgeColor)),\n badgeContent: PT.node,\n size: PT.oneOfType([PT.number]),\n fontSize: PT.oneOfType([PT.number, PT.string]),\n padding: PT.oneOfType([PT.number, PT.string]),\n inline: PT.bool\n};\nexport default Badge;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Spinner = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 28 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M41.3465 44.355C33.5656 50.7844 22.9687 51.6268 14.3708 47.3665L17.8949 44.4545C24.754 47.117 32.7424 46.1093 38.709 41.1792C44.6755 36.249 47.1546 28.6071 45.8085 21.3893L49.3325 18.4773C51.9291 27.6967 49.1274 37.9256 41.3465 44.355Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M36.1749 2.63356L32.6509 5.54555C25.821 2.91828 17.838 3.86187 11.8366 8.82088C5.87009 13.7511 3.42028 21.4282 4.7372 28.6107L1.21311 31.5227C-1.38344 22.3034 1.45314 12.0456 9.19916 5.64502C16.9801 -0.784402 27.5768 -1.62682 36.1749 2.63356Z\",\n fill: color\n }));\n});\nexport default Spinner;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var TwoArrowsRight = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 12 12\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M5.74299 0.152553C5.95998 -0.056404 6.30528 -0.0498885 6.51424 0.167105C6.7232 0.384099 6.71668 0.7294 6.49969 0.938357L1.43832 5.81227L6.51398 11.0759C6.72309 11.2928 6.71681 11.6381 6.49996 11.8472C6.28311 12.0563 5.9378 12.05 5.7287 11.8332L0.274151 6.1766C0.17369 6.07242 0.118752 5.93258 0.121433 5.78788C0.124113 5.64317 0.184193 5.50547 0.288444 5.40508L5.74299 0.152553Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M10.9549 0.152554C11.1719 -0.0564031 11.5172 -0.0498876 11.7262 0.167106C11.9351 0.3841 11.9286 0.729401 11.7116 0.938357L6.65023 5.81227L11.7259 11.0759C11.935 11.2928 11.9287 11.6381 11.7119 11.8472C11.495 12.0563 11.1497 12.05 10.9406 11.8332L5.48606 6.1766C5.3856 6.07242 5.33067 5.93258 5.33335 5.78788C5.33603 5.64317 5.39611 5.50547 5.50036 5.40508L10.9549 0.152554Z\",\n fill: color\n }));\n});\nexport default TwoArrowsRight;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var TwoArrowsLeft = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 12 12\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M6.25714 11.8474C6.04014 12.0564 5.69484 12.0499 5.48588 11.8329C5.27693 11.6159 5.28344 11.2706 5.50043 11.0616L10.5618 6.18773L5.48614 0.924074C5.27704 0.707224 5.28331 0.361919 5.50016 0.152813C5.71701 -0.0562931 6.06232 -0.0500145 6.27143 0.166835L11.726 5.8234C11.8264 5.92758 11.8814 6.06742 11.8787 6.21212C11.876 6.35683 11.8159 6.49453 11.7117 6.59492L6.25714 11.8474Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M1.04522 11.8474C0.828227 12.0564 0.482925 12.0499 0.273969 11.8329C0.065012 11.6159 0.0715275 11.2706 0.288521 11.0616L5.34989 6.18773L0.274227 0.924074C0.0651226 0.707224 0.0714006 0.361919 0.28825 0.152813C0.5051 -0.0562931 0.850407 -0.0500145 1.05951 0.166835L6.51406 5.8234C6.61452 5.92758 6.66946 6.06742 6.66678 6.21212C6.6641 6.35683 6.60402 6.49453 6.49977 6.59492L1.04522 11.8474Z\",\n fill: color\n }));\n});\nexport default TwoArrowsLeft;","export var ButtonType = {\n Default: 'default',\n Sidebar: 'sidebar'\n};","export var SideBar = {\n Left: 'left',\n Right: 'right'\n};","import { ButtonSize } from '../../utils/types';\nexport var getIconSize = function getIconSize(sizeName) {\n switch (sizeName) {\n case ButtonSize.Lg:\n return 18;\n case ButtonSize.Md:\n return 16;\n case ButtonSize.Sm:\n return 14;\n case ButtonSize.Xs:\n return 12;\n default:\n return 16;\n }\n};\nexport var getSideBarIconSize = function getSideBarIconSize(sizeName) {\n switch (sizeName) {\n case ButtonSize.Lg:\n return 12;\n case ButtonSize.Md:\n return 11;\n case ButtonSize.Sm:\n return 10;\n default:\n return 11;\n }\n};","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _colorButtonMixin, _sizeButtonMixin, _sizeSecondaryButtonM, _sizeSidebarMixin, _sizeSidebarDividerMi, _paddingIconLabelMixi, _sizeButtonLabelMixin;\nimport { css } from 'styled-components';\nimport StyledBadge from '../badge/badge.styles';\nimport { Color as PaletteColor } from '../../utils/types/palette';\nimport { FontVariant } from '../../utils/types/typography';\nimport { ButtonSize, ButtonColor } from '../../utils/types';\nexport var colorButtonMixin = (_colorButtonMixin = {}, _defineProperty(_colorButtonMixin, ButtonColor.Primary, function (_ref) {\n var palette = _ref.theme.palette,\n active = _ref.active;\n return css([\"background-color:\", \";color:\", \";\", \"{color:\", \";background:transparent;}&:hover{background-color:\", \";}&:active{background-color:\", \";}\", \" &:disabled{color:\", \";background:\", \";cursor:default;\", \"{color:\", \";background:transparent;}}\"], palette[PaletteColor.AccentStateless], palette[PaletteColor.ButtonPrimaryText], StyledBadge.Badge, palette[PaletteColor.ButtonPrimaryText], palette[PaletteColor.AccentPrimaryHover], palette[PaletteColor.AccentPrimaryActive], active && css([\"background-color:\", \";&:hover,&:focus{background-color:\", \";}\"], palette[PaletteColor.AccentPrimaryActive], palette[PaletteColor.AccentPrimaryActive]), palette[PaletteColor.BordersDisabled], palette[PaletteColor.Accent_1_2_Opacity], StyledBadge.Badge, palette[PaletteColor.BordersDisabled]);\n}), _defineProperty(_colorButtonMixin, ButtonColor.Secondary, function (_ref2) {\n var palette = _ref2.theme.palette,\n active = _ref2.active;\n return css([\"background-color:\", \";color:\", \";border:1px solid \", \";\", \"{color:\", \";background:transparent;}&:hover{color:\", \";background-color:\", \";\", \"{color:\", \";}}&:focus{color:\", \";background-color:\", \";border:1px solid \", \";\", \"{color:\", \";}}&:active{color:\", \";background-color:\", \";\", \"{color:\", \";}}\", \" &:disabled{color:\", \";background:\", \";border:none;cursor:default;\", \"{color:\", \";}}\"], palette[PaletteColor.BackgroundStateless], palette[PaletteColor.AccentStateless], palette[PaletteColor.AccentStateless], StyledBadge.Badge, palette[PaletteColor.AccentStateless], palette[PaletteColor.ButtonPrimaryText], palette[PaletteColor.AccentPrimaryHover], StyledBadge.Badge, palette[PaletteColor.ButtonPrimaryText], palette[PaletteColor.AccentPrimaryActive], palette[PaletteColor.Accent_1_2_Opacity], palette[PaletteColor.AccentPrimaryActive], StyledBadge.Badge, palette[PaletteColor.AccentPrimaryActive], palette[PaletteColor.ButtonPrimaryText], palette[PaletteColor.AccentPrimaryActive], StyledBadge.Badge, palette[PaletteColor.ButtonPrimaryText], active && css([\"color:\", \";background-color:\", \";\", \"{color:\", \";}&:hover,&:focus{color:\", \";background-color:\", \";\", \"{color:\", \";}}\"], palette[PaletteColor.ButtonPrimaryText], palette[PaletteColor.AccentPrimaryActive], StyledBadge.Badge, palette[PaletteColor.ButtonPrimaryText], palette[PaletteColor.ButtonPrimaryText], palette[PaletteColor.AccentPrimaryActive], StyledBadge.Badge, palette[PaletteColor.ButtonPrimaryText]), palette[PaletteColor.BordersDisabled], palette[PaletteColor.Accent_1_2_Opacity], StyledBadge.Badge, palette[PaletteColor.BordersDisabled]);\n}), _defineProperty(_colorButtonMixin, ButtonColor.Basic, function (_ref3) {\n var palette = _ref3.theme.palette,\n active = _ref3.active;\n return css([\"background-color:transparent;border:1px solid \", \";color:\", \";\", \"{background-color:transparent;color:\", \";}&:hover{background-color:\", \";color:\", \";\", \"{color:\", \";}}&:active{background-color:\", \";color:\", \";\", \"{color:\", \";}}\", \" &:disabled{background-color:\", \";color:\", \";cursor:default;border:none;\", \"{color:\", \";}}\"], palette[PaletteColor.BordersButton], palette[PaletteColor.LinkStateless], StyledBadge.Badge, palette[PaletteColor.LinkStateless], palette[PaletteColor.BackgroundHover], palette[PaletteColor.LinkHover], StyledBadge.Badge, palette[PaletteColor.LinkHover], palette[PaletteColor.BackgroundActive], palette[PaletteColor.LinkHover], StyledBadge.Badge, palette[PaletteColor.LinkHover], active && css([\"background-color:\", \";color:\", \";\", \"{color:\", \";}&:hover,&:focus{background-color:\", \";color:\", \";}\"], palette[PaletteColor.BackgroundActive], palette[PaletteColor.LinkHover], StyledBadge.Badge, palette[PaletteColor.LinkHover], palette[PaletteColor.BackgroundActive], palette[PaletteColor.LinkHover]), palette[PaletteColor.Accent_1_2_Opacity], palette[PaletteColor.BordersDisabled], StyledBadge.Badge, palette[PaletteColor.BordersDisabled]);\n}), _defineProperty(_colorButtonMixin, ButtonColor.LinkPrimary, function (_ref4) {\n var palette = _ref4.theme.palette,\n active = _ref4.active;\n return css([\"color:\", \";background-color:transparent;padding:0px !important;&:hover{background-color:transparent;color:\", \";}&:active{color:\", \";}\", \" &:disabled{background-color:transparent;color:\", \";cursor:default;}\"], palette[PaletteColor.AccentStateless], palette[PaletteColor.AccentPrimaryHover], palette[PaletteColor.AccentPrimaryActive], active && css([\"color:\", \";&:hover,&:focus{color:\", \";\"], palette[PaletteColor.AccentPrimaryActive], palette[PaletteColor.AccentPrimaryActive]), palette[PaletteColor.BordersDisabled]);\n}), _defineProperty(_colorButtonMixin, ButtonColor.LinkSecondary, function (_ref5) {\n var palette = _ref5.theme.palette,\n active = _ref5.active;\n return css([\"color:\", \";background-color:transparent;padding:0px !important;&:hover{background-color:transparent;color:\", \";}&:active{color:\", \";}\", \" &:disabled{background-color:transparent;color:\", \";cursor:default;}\"], palette[PaletteColor.LinkStateless], palette[PaletteColor.AccentPrimaryHover], palette[PaletteColor.AccentPrimaryActive], active && css([\"color:\", \";&:hover,&:focus{color:\", \";}\"], palette[PaletteColor.AccentPrimaryActive], palette[PaletteColor.AccentPrimaryActive]), palette[PaletteColor.BordersDisabled]);\n}), _defineProperty(_colorButtonMixin, ButtonColor.LinkBasicPrimary, function (_ref6) {\n var palette = _ref6.theme.palette,\n active = _ref6.active;\n return css([\"color:\", \";background-color:transparent;padding:0px !important;&:hover{background-color:transparent;color:\", \";}&:active{color:\", \";}\", \" &:disabled{background-color:transparent;color:\", \";cursor:default;}\"], palette[PaletteColor.AccentStateless], palette[PaletteColor.AccentPrimaryHover], palette[PaletteColor.AccentPrimaryActive], active && css([\"color:\", \";&:hover,&:focus{color:\", \";}\"], palette[PaletteColor.AccentPrimaryActive], palette[PaletteColor.AccentPrimaryActive]), palette[PaletteColor.BordersDisabled]);\n}), _defineProperty(_colorButtonMixin, ButtonColor.LinkBasicSecondary, function (_ref7) {\n var palette = _ref7.theme.palette,\n active = _ref7.active;\n return css([\"color:\", \";background-color:transparent;padding:0px !important;&:hover{background-color:transparent;color:\", \";}&:active{color:\", \";}\", \" &:disabled{background-color:transparent;color:\", \";cursor:default;}\"], palette[PaletteColor.LinkStateless], palette[PaletteColor.AccentPrimaryHover], palette[PaletteColor.AccentPrimaryActive], active && css([\"color:\", \";&:hover,&:focus{color:\", \";}\"], palette[PaletteColor.AccentPrimaryActive], palette[PaletteColor.AccentPrimaryActive]), palette[PaletteColor.BordersDisabled]);\n}), _defineProperty(_colorButtonMixin, ButtonColor.ErrorPrimary, function (_ref8) {\n var palette = _ref8.theme.palette,\n active = _ref8.active;\n return css([\"background-color:\", \";color:\", \";\", \"{color:\", \";background:transparent;}&:hover{background-color:\", \";}&:active{background-color:\", \";}\", \" &:disabled{background-color:\", \";color:\", \";cursor:default;\", \"{color:\", \";background:transparent;}}\"], palette[PaletteColor.Error], palette[PaletteColor.ButtonPrimaryText], StyledBadge.Badge, palette[PaletteColor.ButtonPrimaryText], palette[PaletteColor.ErrorHover], palette[PaletteColor.ErrorActive], active && css([\"background-color:\", \";&:hover,&:focus{background-color:\", \";}\"], palette[PaletteColor.ErrorActive], palette[PaletteColor.ErrorActive]), palette[PaletteColor.Accent_1_2_Opacity], palette[PaletteColor.BordersDisabled], StyledBadge.Badge, palette[PaletteColor.BordersDisabled]);\n}), _defineProperty(_colorButtonMixin, ButtonColor.ErrorSecondary, function (_ref9) {\n var palette = _ref9.theme.palette,\n active = _ref9.active;\n return css([\"background-color:\", \";color:\", \";border:1px solid \", \";\", \"{color:\", \";background-color:transparent;}&:hover{background-color:\", \";color:\", \";border:none;\", \"{color:\", \";}}&:active{background-color:\", \";color:\", \";border:none;}\", \" &:disabled{color:\", \";background:\", \";border:none;cursor:default;\", \"{color:\", \";}}\"], palette[PaletteColor.BackgroundStateless], palette[PaletteColor.LinkStateless], palette[PaletteColor.BordersButton], StyledBadge.Badge, palette[PaletteColor.LinkStateless], palette[PaletteColor.ErrorHover], palette[PaletteColor.ButtonPrimaryText], StyledBadge.Badge, palette[PaletteColor.ButtonPrimaryText], palette[PaletteColor.ErrorActive], palette[PaletteColor.ButtonPrimaryText], active && css([\"background-color:\", \";color:\", \";border:none;&:hover,&:focus{background-color:\", \";}\"], palette[PaletteColor.ErrorActive], palette[PaletteColor.ButtonPrimaryText], palette[PaletteColor.ErrorActive]), palette[PaletteColor.BordersDisabled], palette[PaletteColor.Accent_1_2_Opacity], StyledBadge.Badge, palette[PaletteColor.BordersDisabled]);\n}), _defineProperty(_colorButtonMixin, ButtonColor.ErrorBasic, function (_ref10) {\n var palette = _ref10.theme.palette,\n active = _ref10.active;\n return css([\"color:\", \";background-color:transparent;&:hover{color:\", \";}&:active{color:\", \";}\", \" &:disabled{color:\", \";cursor:default;}\"], palette[PaletteColor.LinkStateless], palette[PaletteColor.ErrorHover], palette[PaletteColor.ErrorActive], active && css([\"color:\", \";&:hover,&:focus{color:\", \";}\"], palette[PaletteColor.ErrorActive], palette[PaletteColor.ErrorActive]), palette[PaletteColor.BordersDisabled]);\n}), _defineProperty(_colorButtonMixin, ButtonColor.WarningPrimary, function (_ref11) {\n var palette = _ref11.theme.palette,\n active = _ref11.active;\n return css([\"background-color:\", \";color:\", \";\", \"{color:\", \";background:transparent;}&:hover{background-color:\", \";}&:active{background-color:\", \";}\", \" &:disabled{background-color:\", \";color:\", \";cursor:default;\", \"{color:\", \";background:transparent;}}\"], palette[PaletteColor.Warning], palette[PaletteColor.ButtonPrimaryText], StyledBadge.Badge, palette[PaletteColor.ButtonPrimaryText], palette[PaletteColor.WarningHover], palette[PaletteColor.WarningActive], active && css([\"background-color:\", \";&:hover,&:focus{background-color:\", \";}\"], palette[PaletteColor.WarningActive], palette[PaletteColor.WarningActive]), palette[PaletteColor.Accent_1_2_Opacity], palette[PaletteColor.BordersDisabled], StyledBadge.Badge, palette[PaletteColor.BordersDisabled]);\n}), _defineProperty(_colorButtonMixin, ButtonColor.WarningSecondary, function (_ref12) {\n var palette = _ref12.theme.palette,\n active = _ref12.active;\n return css([\"background-color:\", \";color:\", \";border:1px solid \", \";\", \"{color:\", \";background-color:transparent;}&:hover{background-color:\", \";color:\", \";border:none;\", \"{color:\", \";}}&:active{background-color:\", \";color:\", \";border:none;}\", \" &:disabled{color:\", \";background:\", \";border:none;cursor:default;\", \"{color:\", \";}}\"], palette[PaletteColor.BackgroundStateless], palette[PaletteColor.LinkStateless], palette[PaletteColor.BordersButton], StyledBadge.Badge, palette[PaletteColor.LinkStateless], palette[PaletteColor.WarningHover], palette[PaletteColor.ButtonPrimaryText], StyledBadge.Badge, palette[PaletteColor.ButtonPrimaryText], palette[PaletteColor.WarningActive], palette[PaletteColor.ButtonPrimaryText], active && css([\"background-color:\", \";color:\", \";border:none;\", \"{color:\", \";background-color:transparent;}&:hover,&:focus{background-color:\", \";}\"], palette[PaletteColor.WarningActive], palette[PaletteColor.ButtonPrimaryText], StyledBadge.Badge, palette[PaletteColor.ButtonPrimaryText], palette[PaletteColor.WarningActive]), palette[PaletteColor.BordersDisabled], palette[PaletteColor.Accent_1_2_Opacity], StyledBadge.Badge, palette[PaletteColor.BordersDisabled]);\n}), _defineProperty(_colorButtonMixin, ButtonColor.WarningBasic, function (_ref13) {\n var palette = _ref13.theme.palette,\n active = _ref13.active;\n return css([\"color:\", \";background-color:transparent;&:hover{color:\", \";}&:active{color:\", \";}\", \" &:disabled{color:\", \";cursor:default;}\"], palette[PaletteColor.LinkStateless], palette[PaletteColor.WarningHover], palette[PaletteColor.WarningActive], active && css([\"color:\", \";&:hover,&:focus{color:\", \";}\"], palette[PaletteColor.WarningActive], palette[PaletteColor.WarningActive]), palette[PaletteColor.BordersDisabled]);\n}), _colorButtonMixin);\nexport var sizeButtonMixin = (_sizeButtonMixin = {}, _defineProperty(_sizeButtonMixin, ButtonSize.Xs, css([\"padding:5px 10px;\"])), _defineProperty(_sizeButtonMixin, ButtonSize.Sm, css([\"padding:8px 12px;\"])), _defineProperty(_sizeButtonMixin, ButtonSize.Md, css([\"padding:11px 16px;\"])), _defineProperty(_sizeButtonMixin, ButtonSize.Lg, css([\"padding:14px 24px;\"])), _sizeButtonMixin);\nexport var sizeSecondaryButtonMixin = (_sizeSecondaryButtonM = {}, _defineProperty(_sizeSecondaryButtonM, ButtonSize.Xs, css([\"padding:4px 10px;\"])), _defineProperty(_sizeSecondaryButtonM, ButtonSize.Sm, css([\"padding:7px 12px;\"])), _defineProperty(_sizeSecondaryButtonM, ButtonSize.Md, css([\"padding:10px 16px;\"])), _defineProperty(_sizeSecondaryButtonM, ButtonSize.Lg, css([\"padding:13px 24px;\"])), _sizeSecondaryButtonM);\nexport var sizeSidebarMixin = (_sizeSidebarMixin = {}, _defineProperty(_sizeSidebarMixin, ButtonSize.Xs, css([\"padding:5px 10px;\"])), _defineProperty(_sizeSidebarMixin, ButtonSize.Sm, css([\"padding:8px 12px;\"])), _defineProperty(_sizeSidebarMixin, ButtonSize.Md, css([\"padding:11px 14px;\"])), _defineProperty(_sizeSidebarMixin, ButtonSize.Lg, css([\"padding:14px 16px;\"])), _sizeSidebarMixin);\nexport var sizeSidebarDividerMixin = (_sizeSidebarDividerMi = {}, _defineProperty(_sizeSidebarDividerMi, ButtonSize.Xs, css([\"height:14px;\"])), _defineProperty(_sizeSidebarDividerMi, ButtonSize.Sm, css([\"height:16px;\"])), _defineProperty(_sizeSidebarDividerMi, ButtonSize.Md, css([\"height:18px;\"])), _defineProperty(_sizeSidebarDividerMi, ButtonSize.Lg, css([\"height:20px;\"])), _sizeSidebarDividerMi);\nexport var paddingIconLabelMixin = (_paddingIconLabelMixi = {}, _defineProperty(_paddingIconLabelMixi, ButtonSize.Xs, css([\"margin-right:5px;\"])), _defineProperty(_paddingIconLabelMixi, ButtonSize.Sm, css([\"margin-right:6px;\"])), _defineProperty(_paddingIconLabelMixi, ButtonSize.Md, css([\"margin-right:7px;\"])), _defineProperty(_paddingIconLabelMixi, ButtonSize.Lg, css([\"margin-right:8px;\"])), _paddingIconLabelMixi);\nexport var sizeButtonLabelMixin = (_sizeButtonLabelMixin = {}, _defineProperty(_sizeButtonLabelMixin, ButtonSize.Xs, function (_ref14) {\n var font = _ref14.theme.typography.font;\n return css(font[FontVariant.ButtonSm]);\n}), _defineProperty(_sizeButtonLabelMixin, ButtonSize.Sm, function (_ref15) {\n var font = _ref15.theme.typography.font;\n return css(font[FontVariant.ButtonMd]);\n}), _defineProperty(_sizeButtonLabelMixin, ButtonSize.Md, function (_ref16) {\n var font = _ref16.theme.typography.font;\n return css(font[FontVariant.ButtonLg]);\n}), _defineProperty(_sizeButtonLabelMixin, ButtonSize.Lg, function (_ref17) {\n var font = _ref17.theme.typography.font;\n return css(font[FontVariant.ButtonLgUp]);\n}), _sizeButtonLabelMixin);","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { BorderRadiusSize as BRSize } from '../../utils/types/shape';\nimport { colorButtonMixin, sizeButtonMixin, sizeButtonLabelMixin, sizeSidebarMixin, sizeSidebarDividerMixin, paddingIconLabelMixin, sizeSecondaryButtonMixin } from './button.mixin';\nimport { Color as PaletteColor } from '../../utils/types/palette';\nimport { ButtonSize, ButtonColor } from '../../utils/types';\nimport { ButtonType, SideBar } from './types';\nvar baseClassName = 'Button';\nvar Label = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'Label')\n}).withConfig({\n componentId: \"sc-lxwit0-0\"\n})([\"display:flex;\"]);\nvar Badge = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'Badge')\n}).withConfig({\n componentId: \"sc-lxwit0-1\"\n})([\"display:flex;margin-left:5px;\"]);\nvar Wrapper = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'Body')\n}).withConfig({\n componentId: \"sc-lxwit0-2\"\n})(function () {\n return css([\"display:flex;align-items:center;\"]);\n});\nvar Button = /*#__PURE__*/styled.button.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-lxwit0-3\"\n})(function (_ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? ButtonColor.Secondary : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? ButtonSize.Md : _ref$size,\n buttonType = _ref.buttonType,\n active = _ref.active,\n theme = _ref.theme;\n return css([\"display:inline-flex;flex-shrink:0;flex-direction:row;align-items:center;justify-content:center;border-radius:\", \";transition:all 100ms ease-out;border:0;cursor:pointer;outline:none;\", \" \", \" \", \" \", \"{\", \" \", \"}\", \"{\", \"}\", \"\"], theme.shape.borderRadius[BRSize.Md], buttonType !== ButtonType.Sidebar && colorButtonMixin[color], buttonType === ButtonType.Sidebar ? sizeSidebarMixin[size] : sizeButtonMixin[size], color === ButtonColor.Secondary && sizeSecondaryButtonMixin[size], Label, sizeButtonLabelMixin[size], (color === ButtonColor.LinkBasicPrimary || color === ButtonColor.LinkBasicSecondary) && \"font-weight: 400\", Badge, sizeButtonLabelMixin[size], buttonType === ButtonType.Sidebar && css([\"background-color:\", \";color:\", \";border:1px solid \", \";\", \" \", \" &:disabled{color:\", \";background:\", \";border:none;cursor:default;}\"], theme.palette[PaletteColor.ButtonPrimaryText], theme.palette[PaletteColor.LinkStateless], theme.palette[PaletteColor.BordersButton], !active && css([\"&:hover{color:\", \";background-color:\", \";border:none;}&:active{color:\", \";background-color:\", \";border:none;}\"], theme.palette[PaletteColor.ButtonPrimaryText], theme.palette[PaletteColor.AccentPrimaryHover], theme.palette[PaletteColor.ButtonPrimaryText], theme.palette[PaletteColor.AccentPrimaryActive]), active && css([\"background-color:\", \";color:\", \";border:1px solid \", \";\"], theme.palette[PaletteColor.Accent_1_2_Opacity], theme.palette[PaletteColor.AccentPrimaryActive], theme.palette[PaletteColor.AccentPrimaryActive]), theme.palette[PaletteColor.BordersDisabled], theme.palette[PaletteColor.AccentPrimaryDisabled]));\n});\nvar StartIcon = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'StartIcon')\n}).withConfig({\n componentId: \"sc-lxwit0-4\"\n})(function (_ref2) {\n var $loading = _ref2.$loading,\n _ref2$size = _ref2.size,\n size = _ref2$size === void 0 ? ButtonSize.Md : _ref2$size;\n return css([\"display:flex;svg{animation:\", \";}\", \"\"], $loading ? 'spinner 1.2s linear infinite' : '1.2s', paddingIconLabelMixin[size]);\n});\nvar SideArrows = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'SideBar')\n}).withConfig({\n componentId: \"sc-lxwit0-5\"\n})(function (_ref3) {\n var sideBarType = _ref3.sideBarType;\n return css([\"display:flex;\", \":12px;\"], \"margin-\".concat(sideBarType === SideBar.Left ? 'right' : 'left'));\n});\nvar Divider = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'Divider')\n}).withConfig({\n componentId: \"sc-lxwit0-6\"\n})(function (_ref4) {\n var sideBarType = _ref4.sideBarType,\n _ref4$size = _ref4.size,\n size = _ref4$size === void 0 ? ButtonSize.Md : _ref4$size;\n return css([\"border-left-style:solid;border-width:1px;\", \" \", \":12px;\"], sizeSidebarDividerMixin[size], \"margin-\".concat(sideBarType === SideBar.Left ? 'right' : 'left'));\n});\nvar EndIcon = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'EndIcon')\n}).withConfig({\n componentId: \"sc-lxwit0-7\"\n})([\"display:flex;margin-left:6px;\"]);\nvar Styled = applyDisplayNames({\n Button: Button,\n Wrapper: Wrapper,\n Label: Label,\n SideArrows: SideArrows,\n Divider: Divider,\n StartIcon: StartIcon,\n EndIcon: EndIcon,\n Badge: Badge\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\", \"startIcon\", \"endIcon\", \"badge\", \"color\", \"active\", \"buttonType\", \"sideBarType\", \"size\", \"loading\", \"disabled\"];\nimport React from 'react';\nimport PT from 'prop-types';\nimport SpinnerIcon from '@scaleflex/icons/spinner';\nimport TwoArrowsRight from '@scaleflex/icons/two-arrows-right';\nimport TwoArrowsLeft from '@scaleflex/icons/two-arrows-left';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport Badge from '../badge';\nimport { ButtonSize, ButtonColor } from '../../utils/types';\nimport { ButtonType, SideBar } from './types';\nimport { getIconSize, getSideBarIconSize } from './button.utils';\nimport Styled from './button.styles';\nvar Button = intrinsicComponent(function (_ref, ref) {\n var children = _ref.children,\n startIcon = _ref.startIcon,\n endIcon = _ref.endIcon,\n badge = _ref.badge,\n color = _ref.color,\n active = _ref.active,\n buttonType = _ref.buttonType,\n _ref$sideBarType = _ref.sideBarType,\n sideBarType = _ref$sideBarType === void 0 ? SideBar.Left : _ref$sideBarType,\n size = _ref.size,\n loading = _ref.loading,\n disabled = _ref.disabled,\n rest = _objectWithoutProperties(_ref, _excluded);\n var getSideBarArrows = function getSideBarArrows(props) {\n switch (sideBarType) {\n case SideBar.Right:\n return active ? /*#__PURE__*/React.createElement(TwoArrowsLeft, props) : /*#__PURE__*/React.createElement(TwoArrowsRight, props);\n case SideBar.Left:\n return active ? /*#__PURE__*/React.createElement(TwoArrowsRight, props) : /*#__PURE__*/React.createElement(TwoArrowsLeft, props);\n default:\n }\n };\n var getSideBarSection = function getSideBarSection() {\n var sideBarSection = [/*#__PURE__*/React.createElement(Styled.SideArrows, {\n key: \"arrows\",\n sideBarType: sideBarType\n }, getSideBarArrows({\n size: getSideBarIconSize(size)\n }))];\n var divider = /*#__PURE__*/React.createElement(Styled.Divider, {\n key: \"divider\",\n size: size,\n sideBarType: sideBarType\n });\n if (sideBarType === SideBar.Right) {\n sideBarSection.unshift(divider);\n } else {\n sideBarSection.push(divider);\n }\n return buttonType === ButtonType.Sidebar && sideBarSection;\n };\n return /*#__PURE__*/React.createElement(Styled.Button, _extends({\n type: \"button\",\n buttonType: buttonType\n }, rest, {\n disabled: loading || disabled,\n sideBarType: sideBarType,\n color: color,\n active: active,\n size: size,\n ref: ref\n }), sideBarType === SideBar.Left && getSideBarSection(), /*#__PURE__*/React.createElement(Styled.Wrapper, null, startIcon && /*#__PURE__*/React.createElement(Styled.StartIcon, {\n $loading: loading,\n size: size\n }, typeof startIcon === 'function' ? loading ? /*#__PURE__*/React.createElement(SpinnerIcon, {\n size: getIconSize(size)\n }) : startIcon({\n size: getIconSize(size)\n }) :\n // eslint-disable-next-line unicorn/no-nested-ternary\n loading ? /*#__PURE__*/React.createElement(SpinnerIcon, {\n size: getIconSize(size)\n }) : startIcon), loading && !startIcon && /*#__PURE__*/React.createElement(Styled.StartIcon, {\n $loading: loading\n }, /*#__PURE__*/React.createElement(SpinnerIcon, {\n size: getIconSize(size)\n })), /*#__PURE__*/React.createElement(Styled.Label, null, children), endIcon && /*#__PURE__*/React.createElement(Styled.EndIcon, null, typeof endIcon === 'function' ? endIcon({\n size: getIconSize(size)\n }) : endIcon)), sideBarType === SideBar.Right && getSideBarSection(), badge && /*#__PURE__*/React.createElement(Styled.Badge, null, /*#__PURE__*/React.createElement(Badge, {\n inline: true,\n size: 14,\n padding: \"0 1px\",\n badgeContent: badge,\n color: color === ButtonColor.Primary ? 'white' : 'secondary'\n })));\n});\nButton.defaultProps = {\n size: ButtonSize.Md,\n color: ButtonColor.Secondary,\n buttonType: ButtonType.Default,\n active: false\n};\nButton.propTypes = {\n size: PT.oneOf(objectValues(ButtonSize)),\n color: PT.oneOf(objectValues(ButtonColor)),\n buttonType: PT.oneOf(objectValues(ButtonType)),\n sideBarType: PT.oneOf(objectValues(SideBar)),\n startIcon: PT.oneOfType([PT.node, PT.func]),\n endIcon: PT.oneOfType([PT.node, PT.func]),\n badge: PT.node,\n active: PT.bool,\n loading: PT.bool,\n disabled: PT.bool\n};\nexport default Button;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Image2 = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 42 42\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0.483002 4.49014V37.5097C0.483002 38.5725 0.90519 39.5917 1.65669 40.3432C2.40819 41.0947 3.42745 41.5169 4.49023 41.5169H37.5098C38.5726 41.5169 39.5918 41.0947 40.3433 40.3432C41.0948 39.5917 41.517 38.5725 41.517 37.5097V4.49014C41.517 3.42735 41.0948 2.4081 40.3433 1.6566C39.5918 0.905099 38.5726 0.48291 37.5098 0.48291H4.49023C3.42745 0.48291 2.40819 0.905099 1.65669 1.6566C0.90519 2.4081 0.483002 3.42735 0.483002 4.49014ZM38.9272 5.87776V31.3044L26.3817 19.5446L21.8068 22.3356L14.8048 15.3337L3.07279 23.0543V6.06233C3.07279 5.2695 3.38775 4.50913 3.94836 3.94851C4.50898 3.38789 5.26935 3.07294 6.06218 3.07294H36.1222C36.8661 3.07294 37.5795 3.36844 38.1055 3.89444C38.6316 4.42044 38.9272 5.13385 38.9272 5.87776Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M30.4602 15.6943C33.066 15.6943 35.1784 13.5819 35.1784 10.976C35.1784 8.37021 33.066 6.25777 30.4602 6.25777C27.8543 6.25777 25.7419 8.37021 25.7419 10.976C25.7419 13.5819 27.8543 15.6943 30.4602 15.6943Z\",\n fill: color\n }));\n});\nexport default Image2;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Undo = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 40 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M39.5112 31.2036C39.5112 41.568 31.0785 50 20.7148 50H14.0613C12.9587 50 12.0652 49.1066 12.0652 48.004V47.3386C12.0652 46.2359 12.9586 45.3425 14.0613 45.3425H20.7148C28.5107 45.3425 34.8537 38.9995 34.8537 31.2036C34.8537 23.4078 28.5107 17.0648 20.7148 17.0648H8.4394L16.8935 25.5189C17.8015 26.4266 17.8015 27.9042 16.8935 28.8119C16.0124 29.6923 14.479 29.691 13.5999 28.8119L1.17111 16.3828C0.731285 15.943 0.488892 15.3581 0.488892 14.7359C0.488892 14.1142 0.731285 13.529 1.17111 13.0894L13.6006 0.65976C14.4797 -0.220001 16.0144 -0.220001 16.8936 0.65976C17.8016 1.56722 17.8016 3.04511 16.8936 3.95246L8.43951 12.4072H20.7148C31.0785 12.4072 39.5112 20.8395 39.5112 31.2036Z\",\n fill: color\n }));\n});\nexport default Undo;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Redo = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 40 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0.98 31.2037C0.98 41.568 9.41216 50 19.7752 50H26.4284C27.5309 50 28.4244 49.1066 28.4244 48.004V47.3386C28.4244 46.2359 27.531 45.3425 26.4284 45.3425H19.7752C11.9798 45.3425 5.6372 38.9995 5.6372 31.2037C5.6372 23.4079 11.9798 17.0648 19.7752 17.0648H32.05L23.5964 25.5189C22.6884 26.4266 22.6884 27.9043 23.5964 28.812C24.4774 29.6924 26.0107 29.6911 26.8897 28.812L39.3178 16.3828C39.7576 15.943 40 15.3582 40 14.736C40 14.1142 39.7576 13.5291 39.3178 13.0895L26.8891 0.659821C26.01 -0.21994 24.4754 -0.21994 23.5962 0.659821C22.6883 1.56728 22.6883 3.04517 23.5962 3.95252L32.0498 12.4073H19.7752C9.41216 12.4073 0.98 20.8396 0.98 31.2037Z\",\n fill: color\n }));\n});\nexport default Redo;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Line = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M40.1901 7.27549L7.59689 39.8687C6.83412 40.6315 6.83412 41.8681 7.59689 42.6308C8.35965 43.3936 9.59626 43.3936 10.359 42.6308L42.9522 10.0376C43.715 9.27486 43.715 8.03825 42.9522 7.27549C42.1895 6.51272 40.9529 6.51272 40.1901 7.27549Z\",\n fill: color\n }));\n});\nexport default Line;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var ImageFilters = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M41.2229 16.7653C41.3215 12.426 39.7436 8.284 36.6864 5.02956C33.6292 1.77513 29.4872 -2.09808e-05 25.0493 -2.09808e-05C20.6114 -2.09808e-05 16.3708 1.77513 13.3136 5.02956C10.2564 8.18538 8.6785 12.3274 8.77712 16.7653C3.45168 19.5266 0 25.1479 0 31.1637C0 37.2781 3.25444 42.6035 8.57988 45.4635C11.0454 46.7455 13.7081 47.4359 16.2722 47.4359C19.3294 47.4359 22.288 46.5483 24.9507 44.8718C29.9803 48.1262 36.0947 48.3234 41.4201 45.4635C46.7456 42.6035 50 37.2781 50 31.1637C50 25.0493 46.6469 19.5266 41.2229 16.7653ZM22.7811 43.0966C18.6391 45.3649 13.7081 45.3649 9.56607 42.998C5.22682 40.5325 2.66272 36.1933 2.66272 31.1637C2.66272 26.43 5.12821 22.0907 9.1716 19.6252C10.1578 24.359 13.3136 28.501 17.6529 30.6706C17.4556 35.4043 19.3294 39.8422 22.7811 43.0966ZM32.1499 27.8106C31.4596 24.5562 29.783 21.499 27.3176 19.2307C30.6706 17.357 34.8126 17.0611 38.4615 18.3432C37.7712 22.2879 35.503 25.7396 32.1499 27.8106ZM20.6114 28.1065C21.3018 25.2465 22.8797 22.6824 25.0493 20.8087C27.5148 22.8797 29.1913 25.8382 29.6844 28.9941C26.7258 30.0789 23.4714 30.0789 20.4142 28.9941C20.4142 28.6982 20.5128 28.4023 20.6114 28.1065ZM25.0493 17.4556C23.57 16.4694 21.8935 15.7791 20.1183 15.3846C19.428 15.1874 18.6391 15.6805 18.5404 16.3708C18.4418 16.7653 18.5404 17.0611 18.7377 17.357C18.9349 17.6528 19.2308 17.8501 19.5266 17.9487C20.7101 18.2446 21.7949 18.639 22.7811 19.2307C20.3156 21.499 18.6391 24.4576 17.9487 27.8106C14.5957 25.7396 12.2288 22.2879 11.6371 18.3432C11.9329 18.2446 12.1302 18.1459 12.426 18.0473C12.7219 17.9487 13.0178 17.7515 13.215 17.357C13.4122 17.0611 13.4122 16.6666 13.3136 16.3708C13.1164 15.6805 12.3274 15.286 11.6371 15.4832C11.5385 15.4832 11.5385 15.4832 11.4398 15.5818C11.8343 8.48124 17.7515 2.6627 25.0493 2.6627C32.3471 2.6627 38.2643 8.38262 38.6588 15.5818C34.0237 14.2012 28.9941 14.8915 25.0493 17.4556ZM29.783 31.7554C29.5858 35.5029 27.9093 39.0532 25.0493 41.5187C22.1893 39.0532 20.4142 35.6016 20.3156 31.7554C23.3728 32.7416 26.7258 32.7416 29.783 31.7554ZM32.4458 30.6706C36.785 28.4023 39.8422 24.359 40.927 19.6252C44.9704 22.0907 47.4359 26.43 47.4359 31.1637C47.4359 36.0947 44.8718 40.5325 40.5325 42.998C36.3905 45.3649 31.4596 45.3649 27.3176 43.0966C30.7692 39.8422 32.643 35.4043 32.4458 30.6706Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M15.5819 14.8915C14.9901 14.9901 14.497 15.5818 14.497 16.1735C14.497 16.8639 15.0888 17.5542 15.8777 17.5542C16.6667 17.5542 17.2584 16.9625 17.2584 16.1735C17.2584 15.7791 17.0611 15.3846 16.7653 15.1874C16.3708 14.9901 15.9763 14.8915 15.5819 14.8915Z\",\n fill: color\n }));\n});\nexport default ImageFilters;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Crop = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M5 2.00049C3.34315 2.00049 2 3.34364 2 5.00049V16.7505H5.5V5.50049H16.75V2.00049H5ZM45 2.00049H33.25V5.50049H44.5V16.7505H48V5.00049C48 3.34363 46.6569 2.00049 45 2.00049ZM5.5 33.2505H2V45.0005C2 46.6573 3.34315 48.0005 5 48.0005H16.75V44.5005H5.5V33.2505ZM48 33.2505H44.5V44.5005H33.25V48.0005H45C46.6569 48.0005 48 46.6573 48 45.0005V33.2505Z\",\n fill: color\n }));\n});\nexport default Crop;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var CropLandscape = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 53 37\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M4.11841 3.93799V32.063H47.8684V3.93799H4.11841ZM3.49341 0.812988C2.1127 0.812988 0.993408 1.91229 0.993408 3.26835V32.7326C0.993408 34.0887 2.1127 35.188 3.49341 35.188H48.4934C49.8741 35.188 50.9934 34.0887 50.9934 32.7326V3.26835C50.9934 1.91229 49.8741 0.812988 48.4934 0.812988H3.49341Z\",\n fill: color\n }));\n});\nexport default CropLandscape;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Resize = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0.5 0.5H3V2.375H2.375V3H0.5V0.5Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M0.5 21.125H3V21.2693H24.7308V43H24.875V45.5L0.5 45.5001V21.125ZM22.2308 43L3 43.0001V23.7693H22.2308V43Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M43 45.5H45.5V43H43.625V43.625H43V45.5Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M45.5 3V0.5H43V2.375H43.625V3H45.5Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M6.125 0.5V3H9.875V0.5H6.125Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13.625 0.5V3H17.375V0.5H13.625Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M21.125 0.5V3H24.875V0.5H21.125Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M28.625 0.5V3H32.375V0.5H28.625Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M36.125 0.5V3H39.875V0.5H36.125Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M45.5 6.125H43V9.875H45.5V6.125Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M45.5 13.625H43V17.375H45.5V13.625Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M45.5 21.125H43V24.875H45.5V21.125Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M45.5 28.625H43V32.375H45.5V28.625Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M45.5 36.125H43V39.875H45.5V36.125Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M39.875 45.5V43H36.125V45.5H39.875Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M32.375 45.5V43H28.625V45.5H32.375Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0.5 17.375H3V13.625H0.5V17.375Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0.5 9.875H3V6.125H0.5V9.875Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M35.1391 9.23718L26.3209 17.8619C25.8274 18.3446 25.8186 19.136 26.3013 19.6295C26.784 20.1231 27.5754 20.1319 28.069 19.6492L37.1012 10.815V16.9907C37.1012 17.681 37.6609 18.2407 38.3512 18.2407C39.0416 18.2407 39.6012 17.681 39.6012 16.9907V7.98718C39.6012 7.29683 39.0416 6.73718 38.3512 6.73718L29.3477 6.73718C28.6574 6.73718 28.0977 7.29683 28.0977 7.98718C28.0977 8.67754 28.6574 9.23718 29.3477 9.23718L35.1391 9.23718Z\",\n fill: color\n }));\n});\nexport default Resize;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Watermark = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M42.1323 0.500031H2.73399C1.42693 0.500031 0.399963 1.527 0.399963 2.83406V43.166C0.399963 44.4731 1.42693 45.5 2.73399 45.5H42.1323C43.4394 45.5 44.4664 44.4731 44.4664 43.166V2.83406C44.4664 1.527 43.4394 0.500031 42.1323 0.500031ZM41.6655 3.30086V25.8942L36.624 21.693C36.1572 21.2262 35.4103 21.2262 34.8502 21.5996L28.595 26.2677L15.5244 11.2365C15.3377 10.9565 14.9643 10.7697 14.5908 10.7697C14.2174 10.7697 13.8439 10.9565 13.5639 11.1432L3.20079 21.693V3.30086H41.6655ZM3.20079 42.6992V39.8984C4.22776 40.3652 5.72154 40.832 7.58876 40.832C9.36262 40.832 10.483 40.2718 11.3232 39.805C12.0701 39.4316 12.5369 39.1515 13.3771 39.2448C14.3108 39.3382 14.8709 39.5249 15.4311 39.805C16.2713 40.0851 17.2049 40.4585 18.9788 40.4585V38.3112C17.6717 38.3112 17.0182 38.0312 16.178 37.7511C15.5244 37.471 14.6842 37.1909 13.5639 37.0975C12.0701 36.9108 11.1365 37.471 10.2962 37.8444C9.54934 38.2179 8.80245 38.5913 7.4954 38.5913C5.06801 38.5913 3.6676 37.7511 3.10743 37.2843V35.0436C4.1344 35.5104 5.62818 35.9772 7.4954 35.9772C9.26926 35.9772 10.3896 35.417 11.2298 34.9502C11.9767 34.5768 12.4435 34.2967 13.2838 34.3901C14.2174 34.4834 14.7776 34.6702 15.3377 34.9502C16.178 35.2303 17.1116 35.6038 18.8854 35.6038V33.4565C17.5784 33.4565 16.9249 33.1764 16.0846 32.8963C15.4311 32.6162 14.5908 32.3361 13.4705 32.2428C11.9767 32.056 11.0431 32.6162 10.2029 32.9897C9.45598 33.3631 8.70909 33.7365 7.40204 33.7365C4.97465 33.7365 3.57424 32.8963 3.01407 32.4295V30.1888C4.04104 30.6556 5.53482 31.1224 7.40204 31.1224C9.1759 31.1224 10.2962 30.5623 11.1365 30.0955C11.8834 29.722 12.3502 29.4419 13.1904 29.5353C14.124 29.6287 14.6842 29.8154 15.2444 30.0955C16.0846 30.3755 17.0182 30.749 18.7921 30.749V28.6017C17.485 28.6017 16.8315 28.3216 15.9912 28.0415C15.3377 27.7614 14.4975 27.4814 13.3771 27.388C11.8834 27.2013 10.9498 27.7614 10.1095 28.1349C9.36262 28.5083 8.61573 28.8818 7.30868 28.8818C4.88129 28.8818 3.48088 28.0415 2.92071 27.5747V25.7075L14.124 14.2241L27.1012 29.0685C27.568 29.6287 28.4083 29.722 28.9684 29.2552L35.4103 24.4004L41.3854 29.4419V42.6058H3.20079V42.6992Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M32.7029 15.7179C35.4103 15.7179 37.651 13.4772 37.651 10.7697C37.651 8.06227 35.4103 5.82161 32.7029 5.82161C29.9954 5.82161 27.7547 8.06227 27.7547 10.7697C27.7547 13.4772 29.9954 15.7179 32.7029 15.7179ZM32.7029 8.15563C34.1966 8.15563 35.317 9.36933 35.317 10.7697C35.317 12.1702 34.1033 13.3838 32.7029 13.3838C31.3025 13.3838 30.0888 12.1702 30.0888 10.7697C30.0888 9.36933 31.2091 8.15563 32.7029 8.15563Z\",\n fill: color\n }));\n});\nexport default Watermark;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Images = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M43.4164 5.98527H1.06762C0.533808 5.98527 0 6.53674 0 7.08821V49C0 49.7353 0.533808 50.1029 1.06762 50.1029H43.4164C44.1281 50.1029 44.484 49.7353 44.484 49V7.08821C44.484 6.53674 44.1281 5.98527 43.4164 5.98527ZM35.7651 13.1544C37.9004 13.1544 39.5 15.0809 39.5 17.1029C39.5 19.3088 37.7224 20.6029 35.7651 20.6029C33.8078 20.6029 32 19.125 32 17.1029C31.8221 14.897 33.6299 13.1544 35.7651 13.1544ZM1.9573 45.875C2.13523 45.6912 14.2349 30.9853 16.548 27.8603C16.726 27.4926 17.2598 27.4926 17.4377 27.8603L29.7153 43.4853L35.0534 37.4191C35.4093 37.0514 35.7651 37.2353 35.9431 37.4191L42.5267 45.875H1.9573Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M48.9164 -3.8147e-06H6.74555C6.03381 -3.8147e-06 5.5 0.367643 5.5 1.10294V4.29294H7.5V2.20588H47.6892V39H46.2473V44.1176H48.9164C49.6281 44.1176 49.984 43.75 49.984 43.0147V1.10294C49.984 0.367643 49.6281 -3.8147e-06 48.9164 -3.8147e-06Z\",\n fill: color\n }));\n});\nexport default Images;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Reset = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 52 52\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M25 0C38.8071 0 50 11.1929 50 25C50 38.807 38.8071 50 25 50C14.111 50 4.854 43.0397 1.42326 33.333C0.963005 32.0312 1.6455 30.603 2.94725 30.143C4.249 29.6828 5.67725 30.365 6.1375 31.667C8.88425 39.4382 16.2957 45 25 45C36.0457 45 45 36.0457 45 25C45 13.9543 36.0457 5 25 5C21.121 5 17.8345 6.40292 14.7095 8.6015C12.6078 10.0803 10.663 11.8526 8.6895 13.75H16.25C17.6308 13.75 18.75 14.8693 18.75 16.25C18.75 17.6307 17.6308 18.75 16.25 18.75H2.5C1.11926 18.75 0 17.6307 0 16.25V2.5C0 1.1193 1.11926 0 2.5 0C3.88075 0 5 1.1193 5 2.5V10.3593C7.12075 8.31457 9.38601 6.23342 11.8325 4.51222C15.5128 1.9229 19.7882 0 25 0Z\",\n fill: color\n }));\n});\nexport default Reset;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Text = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M39.4229 8.89453L39.7891 16.6582H38.8613C38.6823 15.291 38.4382 14.3145 38.1289 13.7285C37.6243 12.7845 36.9489 12.0928 36.1025 11.6533C35.2725 11.1976 34.1738 10.9697 32.8066 10.9697H28.1436V36.2627C28.1436 38.2972 28.3633 39.5667 28.8027 40.0713C29.4212 40.7549 30.3734 41.0967 31.6592 41.0967H32.8066V42H18.7686V41.0967H19.9404C21.3402 41.0967 22.333 40.6735 22.9189 39.8271C23.277 39.3063 23.4561 38.1182 23.4561 36.2627V10.9697H19.4766C17.9303 10.9697 16.8317 11.0837 16.1807 11.3115C15.3343 11.6208 14.61 12.2148 14.0078 13.0938C13.4056 13.9727 13.0475 15.1608 12.9336 16.6582H12.0059L12.3965 8.89453H39.4229Z\",\n fill: color\n }));\n});\nexport default Text;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var TextAlignLeft = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 45 29\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0 1.89502C0 1.20466 0.559644 0.64502 1.25 0.64502H28.75C29.4404 0.64502 30 1.20466 30 1.89502C30 2.58538 29.4404 3.14502 28.75 3.14502H1.25C0.559645 3.14502 0 2.58538 0 1.89502Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0 14.395C0 13.7047 0.559644 13.145 1.25 13.145H43.75C44.4404 13.145 45 13.7047 45 14.395C45 15.0854 44.4404 15.645 43.75 15.645H1.25C0.559645 15.645 0 15.0854 0 14.395Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M1.25 25.645C0.559644 25.645 0 26.2047 0 26.895C0 27.5854 0.559645 28.145 1.25 28.145H28.75C29.4404 28.145 30 27.5854 30 26.895C30 26.2047 29.4404 25.645 28.75 25.645H1.25Z\",\n fill: color\n }));\n});\nexport default TextAlignLeft;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var TextAlignCenter = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 46 28\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M38 1.50049C38 0.810132 37.4404 0.250488 36.75 0.250488H9.25C8.55964 0.250488 8 0.810132 8 1.50049C8 2.19084 8.55964 2.75049 9.25 2.75049H36.75C37.4404 2.75049 38 2.19084 38 1.50049Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M45.5 14.0005C45.5 13.3101 44.9404 12.7505 44.25 12.7505H1.75C1.05964 12.7505 0.5 13.3101 0.5 14.0005C0.5 14.6908 1.05964 15.2505 1.75 15.2505H44.25C44.9404 15.2505 45.5 14.6908 45.5 14.0005Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M36.75 25.2505C37.4404 25.2505 38 25.8101 38 26.5005C38 27.1908 37.4404 27.7505 36.75 27.7505H9.25C8.55964 27.7505 8 27.1908 8 26.5005C8 25.8101 8.55964 25.2505 9.25 25.2505H36.75Z\",\n fill: color\n }));\n});\nexport default TextAlignCenter;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var RotationLeft = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 45 43\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M2.66027 14.6997L3.59752 14.4437L3.09232 3.93218C3.05918 3.24262 2.47331 2.71049 1.78375 2.74363C1.09419 2.77677 0.562061 3.36263 0.595202 4.05219L1.16041 15.8123C1.19355 16.5018 1.77942 17.034 2.46898 17.0008L14.2291 16.4356C14.9186 16.4025 15.4508 15.8166 15.4176 15.1271C15.3845 14.4375 14.7986 13.9054 14.1091 13.9385L5.48447 14.353C8.23224 7.41077 15.0052 2.50049 22.925 2.50049C33.2802 2.50049 41.6748 10.8951 41.6748 21.2503C41.6748 22.4035 41.5706 23.5324 41.3713 24.6281L43.7968 25.261C44.0449 23.9622 44.1748 22.6214 44.1748 21.2503C44.1748 9.51435 34.6609 0.000488281 22.925 0.000488281C15.0467 0.000488281 8.16974 4.28779 4.50001 10.6566L2.66027 14.6997Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9.88491 34.708L8.27773 36.6309C8.82614 37.1539 9.40248 37.6479 10.0043 38.1103L11.5276 36.128C10.9528 35.6863 10.4043 35.2121 9.88491 34.708Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12.3142 39.6567C13.9038 40.5764 15.6235 41.2961 17.439 41.7814L18.0846 39.3662C16.4846 38.9385 14.9685 38.3041 13.5662 37.4928L12.3142 39.6567Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M20.1654 42.3209C21.0738 42.4394 22.0002 42.5005 22.9408 42.5005C23.8815 42.5005 24.8079 42.4394 25.7162 42.3209L25.3929 39.8419C24.5915 39.9465 23.7731 40.0005 22.9408 40.0005C22.1086 40.0005 21.2902 39.9465 20.4888 39.8419L20.1654 42.3209Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M28.4427 41.7814C30.2582 41.2961 31.9779 40.5764 33.5674 39.6567L32.3154 37.4928C30.9132 38.3041 29.397 38.9385 27.7971 39.3662L28.4427 41.7814Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M35.8774 38.1103C37.3494 36.9791 38.6692 35.6594 39.8004 34.1873L37.8181 32.664C36.8193 33.9638 35.6538 35.1292 34.354 36.128L35.8774 38.1103Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M41.3468 31.8773C42.2665 30.2878 42.9862 28.5681 43.4715 26.7526L41.0563 26.107C40.6286 27.707 39.9942 29.2231 39.1829 30.6253L41.3468 31.8773Z\",\n fill: color\n }));\n});\nexport default RotationLeft;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var RotationRight = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"g\", {\n clipPath: \"url(#clip0)\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n d: \"M50.2753 26.8064H24.4689L36.5656 14.7096C32.735 11.0806 28.7027 9.66933 23.6624 9.66933C13.3802 9.66933 6.32372 15.3145 3.50118 25.5967L0.275391 24.7903C3.50118 13.0968 11.9689 6.44355 23.6625 6.44355C29.7109 6.44355 34.348 8.25806 38.9851 12.2903L50.2754 1L50.2753 26.8064Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M34.5495 46.3628L33.1382 44.3467C33.743 43.9435 34.3479 43.3386 34.9527 42.9355L36.5656 44.75C35.9608 45.1532 35.3559 45.758 34.5495 46.3628Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M27.2913 49.387C26.6865 49.5886 26.0817 49.5886 25.4768 49.7903L25.0736 47.3709C26.4848 47.1693 27.8962 46.7661 29.3074 46.3628L30.1139 48.5806C29.1058 48.9838 28.2994 49.1854 27.2913 49.387ZM20.4365 49.9919C18.8235 49.7903 17.2107 49.5886 15.5978 48.9838L16.4042 46.766C17.8155 47.1693 19.2268 47.5724 20.6381 47.5724L20.4365 49.9919ZM11.1623 46.9677C9.75104 46.1612 8.33971 45.1532 7.13003 43.9435L8.74296 42.129C9.75104 43.137 10.9607 43.9435 12.372 44.7499L11.1623 46.9677ZM3.90425 40.3144C2.89617 38.9032 2.08974 37.2903 1.6865 35.879L3.90425 35.0726C4.50909 36.4838 5.11393 37.6935 5.92036 38.9032L3.90425 40.3144Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M3.2996 30.0322L0.880241 30.2338C0.678647 29.2257 0.678647 28.4193 0.678647 27.4112H3.09801C3.09801 28.4193 3.2996 29.2258 3.2996 30.0322Z\",\n fill: color\n })), /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"rect\", {\n width: \"50\",\n height: \"50\",\n fill: \"white\",\n transform: \"translate(0.275391)\"\n })));\n});\nexport default RotationRight;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var LockOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 51 51\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M40.5 20H38V12.5C38 5.6 32.4 0 25.5 0C18.6 0 13 5.6 13 12.5V20H10.5C9.1 20 8 21.1 8 22.5V47.5C8 48.9 9.1 50 10.5 50H40.5C41.9 50 43 48.9 43 47.5V22.5C43 21.1 41.9 20 40.5 20ZM15.5 12.5C15.5 7 20 2.5 25.5 2.5C31 2.5 35.5 7 35.5 12.5V20H15.5V12.5ZM40.5 47.5H10.5V22.5H40.5V47.5Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M24.3 37.3V41.3H26.8V37.3C28.3 36.8 29.3 35.4 29.3 33.8C29.3 31.7 27.6 30 25.5 30C23.4 30 21.7 31.7 21.7 33.8C21.8 35.4 22.8 36.8 24.3 37.3ZM25.5 32.5C26.2 32.5 26.8 33.1 26.8 33.8C26.8 34.5 26.2 35.1 25.5 35.1C24.8 35.1 24.2 34.5 24.2 33.8C24.3 33.1 24.8 32.5 25.5 32.5Z\",\n fill: color\n }));\n});\nexport default LockOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var UnlockOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 52 52\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M36.2754 7.5C34.2754 3.1 29.8754 0 24.7754 0C17.8754 0 12.2754 5.6 12.2754 12.5V20H9.77539C8.37539 20 7.27539 21.1 7.27539 22.5V47.5C7.27539 48.9 8.37539 50 9.77539 50H39.7754C41.1754 50 42.2754 48.9 42.2754 47.5V22.5C42.2754 21.1 41.1754 20 39.7754 20H14.7754V12.5C14.7754 7 19.2754 2.5 24.7754 2.5C28.4754 2.5 31.7754 4.5 33.4754 7.6L36.2754 7.5ZM39.7754 47.5H9.77539V22.5H39.7754V47.5Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M24.7754 30C22.6754 30 20.9754 31.7 20.9754 33.7C20.9754 35.3 21.9754 36.7 23.4754 37.2V41.2H25.9754V37.2C27.4754 36.7 28.4754 35.3 28.4754 33.7C28.5754 31.7 26.8754 30 24.7754 30ZM24.7754 35C24.0754 35 23.4754 34.4 23.4754 33.7C23.4754 33 24.0754 32.4 24.7754 32.4C25.4754 32.4 25.9754 33 25.9754 33.7C25.9754 34.4 25.4754 35 24.7754 35Z\",\n fill: color\n }));\n});\nexport default UnlockOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Point = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"circle\", {\n cx: \"25\",\n cy: \"25\",\n r: \"8.33333\",\n fill: color\n }));\n});\nexport default Point;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var About = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M42.6793 7.32203C32.916 -2.44013 17.0863 -2.44122 7.32197 7.32203C-2.44128 17.0853 -2.4402 32.915 7.32197 42.6793C17.0852 52.4404 32.9149 52.4415 42.6793 42.6793C52.4414 32.915 52.4403 17.0864 42.6793 7.32203ZM28.2605 35.8705C28.2605 37.6716 26.8007 39.1314 24.9995 39.1314C23.1984 39.1314 21.7386 37.6716 21.7386 35.8705V22.8267C21.7386 21.0256 23.1984 19.5658 24.9995 19.5658C26.8007 19.5658 28.2605 21.0256 28.2605 22.8267V35.8705ZM24.9419 17.2527C23.0636 17.2527 21.8114 15.9222 21.8506 14.2798C21.8114 12.558 23.0636 11.2678 24.98 11.2678C26.8974 11.2678 28.1105 12.5591 28.1507 14.2798C28.1496 15.9222 26.8985 17.2527 24.9419 17.2527Z\",\n fill: color\n }));\n});\nexport default About;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Warning = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M48.9856 38.314L31.3034 3.80423C29.9688 1.42247 27.6118 0 24.9985 0C22.3852 0 20.0282 1.42247 18.6936 3.80423C18.6836 3.82245 18.6751 3.84067 18.665 3.8589L1.04158 38.2594C-0.321602 40.6914 -0.347383 43.612 0.971367 46.0713C2.29314 48.5321 4.67439 50 7.345 50H42.5544C45.225 50 47.7041 48.5321 49.0258 46.0713C50.3445 43.6121 50.3188 40.6913 48.9856 38.314ZM22.0659 15.8013C22.0659 14.0842 23.3789 12.6924 24.9985 12.6924C26.6182 12.6924 27.9311 14.0843 27.9311 15.8013V28.2372C27.9311 29.9541 26.6181 31.3462 24.9985 31.3462C23.3789 31.3462 22.0659 29.954 22.0659 28.2372V15.8013ZM24.9985 43.7821C22.5728 43.7821 20.5995 41.6902 20.5995 39.1186C20.5995 36.5471 22.5727 34.4552 24.9985 34.4552C27.4242 34.4552 29.3974 36.5471 29.3974 39.1186C29.3975 41.6901 27.4243 43.7821 24.9985 43.7821Z\",\n fill: color\n }));\n});\nexport default Warning;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var InfoOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M25 50C11.2033 50 0 38.7967 0 25C0 11.2033 11.2033 0 25 0C38.7967 0 50 11.2033 50 25C50 38.7967 38.6929 50 25 50ZM25 3.52697C13.1743 3.52697 3.63071 13.1743 3.63071 24.8963C3.63071 36.6183 13.278 46.2656 25 46.2656C36.8257 46.2656 46.3693 36.6183 46.3693 24.8963C46.3693 13.1743 36.8257 3.52697 25 3.52697Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M28.3755 13.125C28.3755 11.3992 26.9765 10 25.2505 10C23.5245 10 22.1255 11.3992 22.1255 13.125C22.1255 14.8516 23.5245 16.25 25.2505 16.25C26.9765 16.25 28.3755 14.8516 28.3755 13.125Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M20.563 38.5H29.938C30.8009 38.5 31.5005 37.8012 31.5005 36.9375C31.5005 36.0746 30.8009 35.375 29.938 35.375H28.3755V20.9375C28.3755 20.0746 27.6759 19.375 26.813 19.375H20.563C19.7001 19.375 19.0005 20.0746 19.0005 20.9375C19.0005 21.8012 19.7001 22.5 20.563 22.5H22.1255V35.375H20.563C19.7001 35.375 19.0005 36.0746 19.0005 36.9375C19.0005 37.8012 19.7001 38.5 20.563 38.5Z\",\n fill: color\n }));\n});\nexport default InfoOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var ImageOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M31.3032 17.8662C34.0646 17.8662 36.3032 15.6276 36.3032 12.8662C36.3032 10.1048 34.0646 7.86618 31.3032 7.86618C28.5418 7.86618 26.3032 10.1048 26.3032 12.8662C26.3032 15.6276 28.5418 17.8662 31.3032 17.8662ZM31.3032 15.3662C32.6839 15.3662 33.8032 14.2469 33.8032 12.8662C33.8032 11.4855 32.6839 10.3662 31.3032 10.3662C29.9225 10.3662 28.8032 11.4855 28.8032 12.8662C28.8032 14.2469 29.9225 15.3662 31.3032 15.3662Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M15.9372 15.1063C16.3967 15.0794 16.8338 15.3071 17.075 15.6991L25.0831 28.7141L29.8357 24.4289C30.0935 24.1966 30.4362 24.0818 30.7819 24.1121C31.1276 24.1424 31.4452 24.3151 31.6586 24.5887L40.2822 35.6497C40.5759 36.0264 40.6292 36.5376 40.4196 36.9668C40.21 37.396 39.7741 37.6683 39.2964 37.6683H6.70331C6.2766 37.6683 5.87937 37.4506 5.64974 37.091C5.42011 36.7313 5.38981 36.2794 5.56937 35.8923L14.8765 15.8282C15.0702 15.4106 15.4777 15.1333 15.9372 15.1063ZM16.1652 18.991L8.66108 35.1683H36.7368L30.5126 27.1848L25.6422 31.5761C25.3666 31.8246 24.9947 31.9378 24.6274 31.885C24.26 31.8322 23.9351 31.6189 23.7406 31.3027L16.1652 18.991Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M0.5 3C0.5 1.61929 1.61929 0.5 3 0.5H43C44.3807 0.5 45.5 1.61929 45.5 3V43C45.5 44.3807 44.3807 45.5 43 45.5H3C1.61929 45.5 0.5 44.3807 0.5 43V3ZM3 3H43V43H3V3Z\",\n fill: color\n }));\n});\nexport default ImageOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Custom = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M0.562515 0.562512H3.68752V2.90626H2.90627V3.68751H0.562515V0.562512ZM0.562515 44.3125V47.4375H3.68752V45.0938H2.90627V44.3125H0.562515ZM44.3125 47.4375H47.4375V44.3125H45.0938V45.0938H44.3125V47.4375ZM47.4375 3.68751V0.562512H44.3125V2.90626H45.0938V3.68751H47.4375ZM7.59376 0.562512V3.68751H12.2813V0.562512H7.59376ZM16.9688 0.562512V3.68751H21.6563V0.562512H16.9688ZM26.3438 0.562512V3.68751H31.0313V0.562512H26.3438ZM35.7188 0.562512V3.68751H40.4063V0.562512H35.7188ZM47.4375 7.59376H44.3125V12.2813H47.4375V7.59376ZM47.4375 16.9688H44.3125V21.6563H47.4375V16.9688ZM47.4375 26.3438H44.3125V31.0313H47.4375V26.3438ZM47.4375 35.7188H44.3125V40.4063H47.4375V35.7188ZM40.4063 47.4375V44.3125H35.7188V47.4375H40.4063ZM31.0313 47.4375V44.3125H26.3438V47.4375H31.0313ZM21.6563 47.4375V44.3125H16.9688V47.4375H21.6563ZM12.2813 47.4375V44.3125H7.59377V47.4375H12.2813ZM0.562515 40.4063H3.68752V35.7188H0.562515V40.4063ZM0.562515 31.0313H3.68752V26.3438H0.562515V31.0313ZM0.562515 21.6563H3.68752V16.9688H0.562515V21.6563ZM0.562515 12.2813H3.68752V7.59376H0.562515V12.2813Z\",\n fill: color\n }));\n});\nexport default Custom;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var FlipY = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M37.5001 24.0625C38.2086 24.0625 38.8284 23.5858 39.0102 22.901C39.1921 22.2162 38.8904 21.4948 38.2753 21.1433L3.27531 1.14333C2.79171 0.866989 2.19757 0.868973 1.71583 1.14854C1.23409 1.4281 0.937592 1.94298 0.937592 2.49996V22.5C0.937592 23.3629 1.63715 24.0625 2.50009 24.0625L37.5001 24.0625ZM4.06259 20.9375L4.06259 5.19243L31.6164 20.9375L4.06259 20.9375Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M38.2753 28.8566C38.8904 28.5051 39.1921 27.7837 39.0102 27.0989C38.8284 26.4142 38.2086 25.9375 37.5001 25.9375H35.3126V26.9504L34.5374 27.3933L35.3126 28.75V29.0625H35.4912L36.0878 30.1066L38.2753 28.8566Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M27.3378 35.1066L31.7128 32.6066L30.1624 29.8933L25.7874 32.3933L27.3378 35.1066Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M30.9376 25.9375H26.5626L26.5626 29.0625H30.9376L30.9376 25.9375Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M18.5878 40.1066L22.9628 37.6066L21.4124 34.8933L17.0374 37.3933L18.5878 40.1066Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M22.1876 25.9375H17.8126V29.0625H22.1876V25.9375Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9.83781 45.1066L14.2128 42.6066L12.6624 39.8933L8.28738 42.3933L9.83781 45.1066Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13.4376 25.9375H9.0626V29.0625H13.4376V25.9375Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M3.27531 48.8566L5.46281 47.6066L4.06259 45.1562V45H3.97331L3.91238 44.8933L3.72578 45H0.937592V47.5C0.937592 48.0569 1.23409 48.5718 1.71583 48.8514C2.19758 49.1309 2.79171 49.1329 3.27531 48.8566Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M4.6876 25.9375L2.50009 25.9375C1.63715 25.9375 0.937592 26.637 0.937592 27.5V30H4.06259V29.0625H4.6876V25.9375Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0.937592 35V40L4.06259 40V35H0.937592Z\",\n fill: color\n }));\n});\nexport default FlipY;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var FlipX = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M24.0625 1.93758C24.0625 1.22909 23.5858 0.609274 22.901 0.427427C22.2163 0.245581 21.4949 0.547225 21.1434 1.16237L1.14337 39.2874C0.867028 39.771 0.869012 40.3651 1.14858 40.8468C1.42814 41.3286 1.94302 41.6251 2.5 41.6251H22.5C23.3629 41.6251 24.0625 40.9255 24.0625 40.0626V1.93758ZM20.9375 38.5001H5.19247L20.9375 7.82128V38.5001Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M28.8566 1.16237C28.5051 0.547225 27.7837 0.245581 27.099 0.427428C26.4142 0.609274 25.9375 1.22909 25.9375 1.93758V4.12508H26.9504L27.3934 4.9003L28.75 4.12508H29.0625V3.94651L30.1066 3.34986L28.8566 1.16237Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M35.1066 12.0999L32.6066 7.72486L29.8934 9.2753L32.3934 13.6503L35.1066 12.0999Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M25.9375 8.50008V12.8751H29.0625V8.50008H25.9375Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M40.1066 23.9749L37.6066 19.5999L34.8934 21.1503L37.3934 25.5253L40.1066 23.9749Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M25.9375 20.3751V24.7501H29.0625V20.3751H25.9375Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M45.1066 32.7249L42.6066 28.3499L39.8934 29.9003L42.3934 34.2753L45.1066 32.7249Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M25.9375 29.1251V33.5001H29.0625V29.1251H25.9375Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M48.8566 39.2874L47.6066 37.0999L45.1562 38.5001H45V38.5894L44.8934 38.6503L45 38.8369V41.6251H47.5C48.057 41.6251 48.5719 41.3286 48.8514 40.8468C49.131 40.3651 49.133 39.771 48.8566 39.2874Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M25.9375 37.8751V40.0626C25.9375 40.9255 26.6371 41.6251 27.5 41.6251H30V38.5001H29.0625V37.8751H25.9375Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M35 41.6251H40V38.5001H35V41.6251Z\",\n fill: color\n }));\n});\nexport default FlipX;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Ellipse = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 52 52\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M25.2047 46.875C37.2859 46.875 47.0797 37.0812 47.0797 25C47.0797 12.9188 37.2859 3.125 25.2047 3.125C13.1235 3.125 3.32968 12.9188 3.32968 25C3.32968 37.0812 13.1235 46.875 25.2047 46.875ZM25.2047 50C39.0118 50 50.2047 38.8071 50.2047 25C50.2047 11.1929 39.0118 0 25.2047 0C11.3976 0 0.204681 11.1929 0.204681 25C0.204681 38.8071 11.3976 50 25.2047 50Z\",\n fill: color\n }));\n});\nexport default Ellipse;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Landscape = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 51 36\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M4.11841 3.93805V32.063H47.8684V3.93805H4.11841ZM3.49341 0.813049C2.1127 0.813049 0.993408 1.91235 0.993408 3.26841V32.7327C0.993408 34.0887 2.1127 35.188 3.49341 35.188H48.4934C49.8741 35.188 50.9934 34.0887 50.9934 32.7327V3.26841C50.9934 1.91235 49.8741 0.813049 48.4934 0.813049H3.49341Z\",\n fill: color\n }));\n});\nexport default Landscape;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Stroke = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M5.50015 7.9997C5.50015 6.61898 6.61944 5.49969 8.00015 5.49969H38.0002C39.3809 5.49969 40.5002 6.61898 40.5002 7.99969V37.9997C40.5002 39.3804 39.3809 40.4997 38.0002 40.4997H8.00015C6.61944 40.4997 5.50015 39.3804 5.50015 37.9997V7.9997ZM8.00015 7.99969H38.0002V37.9997H8.00015V7.99969Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M0.5 3C0.5 1.61929 1.61929 0.5 3 0.5H43C44.3807 0.5 45.5 1.61929 45.5 3V43C45.5 44.3807 44.3807 45.5 43 45.5H3C1.61929 45.5 0.5 44.3807 0.5 43V3ZM3 3H43V43H3V3Z\",\n fill: color\n }));\n});\nexport default Stroke;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Transparency = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0.166672 0.166664H8.50001V8.5H0.166672V0.166664Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M16.8333 8.5H8.50001V16.8333H0.166672V25.1667H8.50001V33.5H0.166672V41.8333H8.50001V33.5H16.8333V41.8333H25.1667V33.5H33.5V41.8333H41.8333V33.5H33.5V25.1667H41.8333V16.8333H33.5V8.5H41.8333V0.166664H33.5V8.5H25.1667V0.166664H16.8333V8.5ZM16.8333 16.8333V8.5H25.1667V16.8333H16.8333ZM16.8333 25.1667V33.5H25.1667V25.1667H33.5V16.8333H25.1667V25.1667H16.8333ZM16.8333 25.1667H8.50001V16.8333H16.8333V25.1667Z\",\n fill: color\n }));\n});\nexport default Transparency;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Shadow = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M2.95831 0.458374C1.5776 0.458374 0.458313 1.57766 0.458313 2.95837V35.4584C0.458313 36.8391 1.5776 37.9584 2.95831 37.9584H7.54167V43.7917C7.54167 45.8627 9.2206 47.5417 11.2917 47.5417H43.7917C45.8627 47.5417 47.5417 45.8627 47.5417 43.7917V11.2917C47.5417 9.22059 45.8627 7.54166 43.7917 7.54166H37.9583V2.95837C37.9583 1.57766 36.839 0.458374 35.4583 0.458374H2.95831ZM35.4583 2.95837H2.95831L2.95831 35.4584H35.4583V2.95837ZM15.7267 37.9584L10.0417 43.746V37.9584H15.7267ZM11.5135 45.0417L18.4712 37.9584H28.5529L21.4696 45.0417H11.5135ZM24.4159 45.0417H34.2932L45.0417 34.1339V24.0207L37.9583 31.3242V35.4584C37.9583 36.8391 36.839 37.9584 35.4583 37.9584H31.4912C31.4689 37.9859 31.445 38.0126 31.4194 38.0382L24.4159 45.0417ZM45.0417 21.3515L37.9583 28.655V18.9107L45.0417 11.8338V21.3515ZM37.0311 45.0417H43.7917C44.482 45.0417 45.0417 44.482 45.0417 43.7917V36.9124L37.0311 45.0417ZM43.8844 10.045C43.8538 10.0428 43.8229 10.0417 43.7917 10.0417H37.9583V15.9657L43.8844 10.045Z\",\n fill: color\n }));\n});\nexport default Shadow;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var RadiusCorner = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M3 3H23V0.5H3C1.61929 0.5 0.5 1.61929 0.5 3V43C0.5 44.3807 1.61929 45.5 3 45.5H43C44.3807 45.5 45.5 44.3807 45.5 43V23H43V43H3V3Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M45.5 7.25076H43V5.50076C43 5.15718 42.9321 4.83576 42.8113 4.54446L45.1206 3.58682C45.3651 4.17636 45.5 4.82281 45.5 5.50076V7.25076Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M24.75 0.500763V3.00076H28.25V0.500763H24.75Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M31.75 0.500763V3.00076H35.25V0.500763H31.75Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M38.75 0.500763V3.00076H40.5C40.8436 3.00076 41.165 3.06868 41.4563 3.18948L42.414 0.880166C41.8244 0.635694 41.178 0.500763 40.5 0.500763H38.75Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M45.5 10.7508H43V14.2508H45.5V10.7508Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M45.5 17.7508H43V21.2508H45.5V17.7508Z\",\n fill: color\n }));\n});\nexport default RadiusCorner;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Position = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9.25008 9.24878H11.7501V10.9675H10.9688V11.7488H9.25008V9.24878Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9.25008 34.2488V36.7488H11.7501V35.03H10.9688V34.2488H9.25008Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M34.2501 36.7488H36.7501V34.2488H35.0313V35.03H34.2501V36.7488Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M36.7501 11.7488V9.24878H34.2501V10.9675H35.0313V11.7488H36.7501Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M14.4063 9.24878V11.7488H17.8438V9.24878H14.4063Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M21.2813 9.24878V11.7488H24.7188V9.24878H21.2813Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M28.1563 9.24878V11.7488H31.5938V9.24878H28.1563Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M36.7501 14.405H34.2501V17.8425H36.7501V14.405Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M36.7501 21.28H34.2501V24.7175H36.7501V21.28Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M36.7501 28.155H34.2501V31.5925H36.7501V28.155Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M31.5938 36.7488V34.2488H28.1563V36.7488H31.5938Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M24.7188 36.7488V34.2488H21.2813V36.7488H24.7188Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M17.8438 36.7488V34.2488H14.4063V36.7488H17.8438Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9.25008 31.5925H11.7501V28.155H9.25008V31.5925Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9.25008 24.7175H11.7501V21.28H9.25008V24.7175Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M9.25008 17.8425H11.7501V14.405H9.25008V17.8425Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M23.0002 26.7497C25.0712 26.7497 26.7502 25.0708 26.7502 22.9997C26.7502 20.9286 25.0712 19.2497 23.0002 19.2497C20.9291 19.2497 19.2502 20.9286 19.2502 22.9997C19.2502 25.0708 20.9291 26.7497 23.0002 26.7497Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M3 0.5C1.61929 0.5 0.5 1.61929 0.5 3V43C0.5 44.3807 1.61929 45.5 3 45.5H43C44.3807 45.5 45.5 44.3807 45.5 43V3C45.5 1.61929 44.3807 0.5 43 0.5H3ZM43 3H3V43H43V3Z\",\n fill: color\n }));\n});\nexport default Position;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Spacing = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M4.29986 0.991788C4.78802 0.503633 5.57947 0.503633 6.06763 0.991788L9.367 4.29116C9.85516 4.77932 9.85516 5.57077 9.367 6.05893C8.87885 6.54708 8.08739 6.54708 7.59924 6.05893L6.43374 4.89344V34.0829L7.59924 32.9174C8.08739 32.4293 8.87885 32.4293 9.367 32.9174C9.85516 33.4056 9.85516 34.197 9.367 34.6852L6.06763 37.9846C5.8332 38.219 5.51524 38.3507 5.18371 38.3507C4.85217 38.3507 4.53422 38.219 4.29981 37.9845L1.00084 34.6851C0.512712 34.1969 0.512761 33.4055 1.00095 32.9174C1.48913 32.4292 2.28059 32.4293 2.76871 32.9175L3.93374 34.0827V4.89344L2.76825 6.05893C2.2801 6.54708 1.48864 6.54708 1.00049 6.05893C0.51233 5.57077 0.51233 4.77932 1.00049 4.29116L4.29986 0.991788ZM13.1588 8.34109V1.49725H46.3156V8.34102H43.398V7.19776C43.398 5.54595 42.0562 4.20442 40.4047 4.20442H31.8516V26.0992C31.8516 28.1387 33.5088 29.7957 35.5481 29.7957H36.5137V32.4599H23.01V29.7957H23.9756C26.0151 29.7957 27.6721 28.1387 27.6721 26.0992V4.20448H19.0697C17.418 4.20448 16.0763 5.54604 16.0763 7.19783V8.34109H13.1588ZM46.9995 39.7088C47.4877 39.2207 47.4877 38.4292 46.9995 37.9411L43.7001 34.6417C43.212 34.1535 42.4205 34.1535 41.9324 34.6417C41.4442 35.1298 41.4442 35.9213 41.9324 36.4095L43.0979 37.5749L15.0832 37.5749L16.2484 36.4099C16.7366 35.9218 16.7366 35.1303 16.2485 34.6421C15.7604 34.154 14.9689 34.1539 14.4807 34.642L11.1814 37.941C10.9469 38.1754 10.8152 38.4934 10.8152 38.8249C10.8152 39.1564 10.9469 39.4744 11.1813 39.7088L14.4807 43.0082C14.9688 43.4964 15.7603 43.4964 16.2485 43.0082C16.7366 42.5201 16.7366 41.7286 16.2485 41.2404L15.083 40.0749L43.0979 40.0749L41.9324 41.2404C41.4442 41.7286 41.4442 42.5201 41.9324 43.0082C42.4205 43.4964 43.212 43.4964 43.7001 43.0082L46.9995 39.7088Z\",\n fill: color\n }));\n});\nexport default Spacing;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Padding = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M13.8334 9.19949C13.8334 8.50914 14.3931 7.94949 15.0834 7.94949H31.3334C32.0238 7.94949 32.5834 8.50914 32.5834 9.19949C32.5834 9.88985 32.0238 10.4495 31.3334 10.4495H15.0834C14.3931 10.4495 13.8334 9.88985 13.8334 9.19949Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M15.0834 35.5496C14.3931 35.5496 13.8334 36.1092 13.8334 36.7996C13.8334 37.4899 14.3931 38.0496 15.0834 38.0496H31.3334C32.0238 38.0496 32.5834 37.4899 32.5834 36.7996C32.5834 36.1092 32.0238 35.5496 31.3334 35.5496H15.0834Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M36.8001 13.4163C37.4905 13.4163 38.0501 13.9759 38.0501 14.6663V30.9163C38.0501 31.6066 37.4905 32.1663 36.8001 32.1663C36.1098 32.1663 35.5501 31.6066 35.5501 30.9163V14.6663C35.5501 13.9759 36.1098 13.4163 36.8001 13.4163Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M10.45 14.6663C10.45 13.9759 9.89038 13.4163 9.20003 13.4163C8.50967 13.4163 7.95003 13.9759 7.95003 14.6663L7.95003 30.9163C7.95003 31.6066 8.50967 32.1663 9.20003 32.1663C9.89038 32.1663 10.45 31.6066 10.45 30.9163L10.45 14.6663Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M3 0.5C1.61929 0.5 0.5 1.61929 0.5 3V43C0.5 44.3807 1.61929 45.5 3 45.5H43C44.3807 45.5 45.5 44.3807 45.5 43V3C45.5 1.61929 44.3807 0.5 43 0.5H3ZM43 3H3V43H43V3Z\",\n fill: color\n }));\n});\nexport default Padding;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Polygon = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M44.103 18.4866L24.0002 3.8811L3.89749 18.4866L11.5761 42.1188H36.4244L44.103 18.4866ZM25.8371 1.35293C24.7418 0.557164 23.2587 0.557162 22.1634 1.35292L2.06066 15.9584C0.96539 16.7542 0.507082 18.1647 0.925439 19.4523L8.604 43.0845C9.02236 44.372 10.2222 45.2438 11.5761 45.2438H36.4244C37.7782 45.2438 38.9781 44.372 39.3965 43.0845L47.075 19.4523C47.4934 18.1647 47.0351 16.7542 45.9398 15.9584L25.8371 1.35293Z\",\n fill: color\n }));\n});\nexport default Polygon;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var PolygonSides = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 48\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M23.0078 29.9669H25.835L24.7803 35.9727H27.4609L28.5156 29.9669H32.2363V27.4473H28.9551L29.6875 23.2872H33.3496V20.7383H30.1416L31.2109 14.6446H28.5303L27.4609 20.7383H24.6191L25.6885 14.6446H23.0225L21.9531 20.7383H18.1006V23.2872H21.499L20.7666 27.4473H17.002V29.9669H20.3271L19.2725 35.9727H21.9531L23.0078 29.9669ZM26.2744 27.4473H23.4473L24.165 23.2872H27.0068L26.2744 27.4473Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M23.5448 0.821208C24.421 0.184598 25.6075 0.184597 26.4837 0.821207L48.4803 16.8026C49.3565 17.4392 49.7231 18.5677 49.3885 19.5977L40.9865 45.4562C40.6518 46.4862 39.692 47.1836 38.6089 47.1836H11.4197C10.3366 47.1836 9.37672 46.4862 9.04204 45.4562L0.640107 19.5977C0.305422 18.5677 0.672067 17.4392 1.54829 16.8026L23.5448 0.821208ZM25.0143 2.84375L47.0108 18.8252L38.6089 44.6836H11.4197L3.01775 18.8252L25.0143 2.84375Z\",\n fill: color\n }));\n});\nexport default PolygonSides;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var ArrowRight = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 46 30\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M45.5 15.0005C45.5 15.7079 45.2003 16.3822 44.6753 16.8562L30.8291 29.3562C29.8042 30.2814 28.2234 30.2006 27.2982 29.1758C26.373 28.1509 26.4537 26.57 27.4786 25.6448L36.5 17.5005L3 17.5005C1.61928 17.5005 0.499999 16.3812 0.499999 15.0005C0.499999 13.6198 1.61929 12.5005 3 12.5005L36.5 12.5005L27.4786 4.35618C26.4537 3.43096 26.373 1.85011 27.2982 0.82525C28.2234 -0.199608 29.8042 -0.280382 30.8291 0.644837L44.6753 13.1448C45.2003 13.6189 45.5 14.2931 45.5 15.0005Z\",\n fill: color\n }));\n});\nexport default ArrowRight;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var FontItalic = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M19 48L26.9931 2H31.2019L23.2087 48H19Z\",\n fill: color\n }));\n});\nexport default FontItalic;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var FontBold = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 14 18\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0.214966 17.4813V0.518677H6.61123C8.82693 0.518677 10.5075 0.914783 11.653 1.70699C12.7985 2.49144 13.3712 3.64481 13.3712 5.16709C13.3712 5.99814 13.1413 6.7321 12.6814 7.36898C12.2216 7.99809 11.5819 8.46021 10.7625 8.75535C11.699 8.97282 12.4348 9.41164 12.9699 10.0718C13.5133 10.732 13.7851 11.5397 13.7851 12.4951C13.7851 14.1261 13.2249 15.361 12.1045 16.1998C10.9841 17.0386 9.38713 17.4658 7.31357 17.4813H0.214966ZM3.97748 10.0951V14.6736H7.20069C8.08697 14.6736 8.77677 14.4795 9.27007 14.0911C9.77174 13.695 10.0226 13.1513 10.0226 12.4601C10.0226 10.9067 9.1572 10.1184 7.42644 10.0951H3.97748ZM3.97748 7.62528H6.76173C8.65971 7.59421 9.6087 6.89132 9.6087 5.5166C9.6087 4.74769 9.36623 4.19625 8.88128 3.86228C8.4047 3.52054 7.64801 3.34967 6.61123 3.34967H3.97748V7.62528Z\",\n fill: color\n }));\n});\nexport default FontBold;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var UploadOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M17.5911 1.54582C16.7075 0.680052 15.2937 0.680014 14.4101 1.54573L4.05296 11.6925C3.15635 12.5709 3.14159 14.0098 4.01999 14.9064C4.89839 15.8031 6.33733 15.8178 7.23394 14.9394L13.7278 8.57741V30.4419C13.7278 31.6971 14.7454 32.7147 16.0006 32.7147C17.2558 32.7147 18.2733 31.6971 18.2733 30.4419V8.57782L24.766 14.9393C25.6625 15.8178 27.1015 15.8031 27.9799 14.9065C28.8584 14.01 28.8437 12.571 27.9471 11.6926L17.5911 1.54582Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M2.78827 36.5543C1.53308 36.5543 0.515541 37.5719 0.515541 38.827C0.515541 40.0822 1.53308 41.0998 2.78827 41.0998H29.1519C30.4071 41.0998 31.4246 40.0822 31.4246 38.827C31.4246 37.5719 30.4071 36.5543 29.1519 36.5543H2.78827Z\",\n fill: color\n }));\n});\nexport default UploadOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var ArrowLeftOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 28 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M26.907 0.71085C25.7493 -0.292553 23.9445 -0.224769 22.8758 0.862251L0.931376 23.1837C-0.0773525 24.2097 -0.0773525 25.7913 0.931376 26.8173L22.8758 49.1388C23.9445 50.2258 25.7493 50.2936 26.907 49.2902C28.0647 48.2868 28.1369 46.5921 27.0683 45.5051L6.90997 25.0005L27.0683 4.49589C28.1369 3.40888 28.0647 1.71425 26.907 0.71085Z\",\n fill: color\n }));\n});\nexport default ArrowLeftOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var ArrowRightOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 28 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M1.09286 0.71085C2.25057 -0.292553 4.05541 -0.224769 5.12407 0.862251L27.0685 23.1837C28.0772 24.2097 28.0772 25.7913 27.0685 26.8173L5.12407 49.1388C4.05541 50.2258 2.25057 50.2936 1.09286 49.2902C-0.0648579 48.2868 -0.137051 46.5921 0.93161 45.5051L21.0899 25.0005L0.93161 4.49589C-0.137051 3.40888 -0.0648579 1.71425 1.09286 0.71085Z\",\n fill: color\n }));\n});\nexport default ArrowRightOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var PlusOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 38 38\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M16.9167 21.0838L16.9167 35.6672C16.9167 36.8177 17.8494 37.7505 19 37.7505C20.1506 37.7505 21.0833 36.8177 21.0833 35.6672L21.0833 21.0838H35.6667C36.8173 21.0838 37.75 20.1511 37.75 19.0005C37.75 17.8499 36.8173 16.9172 35.6667 16.9172L21.0833 16.9172L21.0833 2.33382C21.0833 1.18323 20.1506 0.250488 19 0.250488C17.8494 0.250488 16.9167 1.18323 16.9167 2.33382L16.9167 16.9172H2.33333C1.18274 16.9172 0.25 17.8499 0.25 19.0005C0.25 20.1511 1.18274 21.0838 2.33333 21.0838H16.9167Z\",\n fill: color\n }));\n});\nexport default PlusOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var ArrowTool = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M1.04757 38.9503C0.437373 38.3401 0.437373 37.3508 1.04757 36.7406L33.9229 3.86697L23.8354 3.33584C22.9736 3.29047 22.3118 2.5551 22.3572 1.69335C22.4026 0.831601 23.138 0.169794 23.9997 0.215167L37.5909 0.930759C38.3892 0.972794 39.027 1.61063 39.0691 2.40894L39.7846 16.0001C39.83 16.8619 39.1682 17.5972 38.3065 17.6426C37.4447 17.688 36.7093 17.0262 36.664 16.1644L36.1328 6.07651L3.25728 38.9503C2.64708 39.5605 1.65776 39.5605 1.04757 38.9503Z\",\n fill: color\n }));\n});\nexport default ArrowTool;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Compare = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 52 52\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M27.1607 4.16667V2.08333C27.1607 0.93274 26.2279 0 25.0773 0C23.9267 0 22.994 0.932741 22.994 2.08333V4.16667H4.244C1.94281 4.16667 0.0773315 6.03215 0.0773315 8.33333V41.6667C0.0773315 43.9679 1.94281 45.8333 4.244 45.8333H22.994V47.9167C22.994 49.0673 23.9267 50 25.0773 50C26.2279 50 27.1607 49.0673 27.1607 47.9167V45.8333H45.9107C48.2118 45.8333 50.0773 43.9678 50.0773 41.6667V8.33333C50.0773 6.03215 48.2119 4.16667 45.9107 4.16667H27.1607ZM22.994 8.33333H4.244L4.244 41.6667H22.994V8.33333ZM27.1607 41.6667V8.33333H45.9107V41.6667H27.1607Z\",\n fill: color\n }));\n});\nexport default Compare;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var MinusOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 38 6\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M35.835 5.0769L2.16498 5.0769C1.00277 5.0769 0.0606079 4.14726 0.0606079 3.00048C0.060608 1.85371 1.00277 0.924072 2.16498 0.924072L35.835 0.924074C36.9972 0.924074 37.9394 1.85372 37.9394 3.00049C37.9394 4.14726 36.9972 5.0769 35.835 5.0769Z\",\n fill: color\n }));\n});\nexport default MinusOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Temprature = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M9.48799 3.125H17.0311L17.0311 24.4063C17.0311 26.6148 18.1889 28.4084 19.5429 29.5401C21.7011 31.3438 23.0656 34.0456 23.0656 37.069C23.0656 42.4847 18.6753 46.875 13.2595 46.875C7.84382 46.875 3.45351 42.4847 3.45351 37.069C3.45351 34.0456 4.81799 31.3438 6.97617 29.5401C8.33021 28.4084 9.48799 26.6148 9.48799 24.4063V3.125ZM20.1561 3.125C20.1561 1.39911 18.757 0 17.0311 0H9.48799C7.7621 0 6.36299 1.39911 6.36299 3.125V24.4063C6.36299 25.4785 5.79482 26.4547 4.97216 27.1423C2.13398 29.5143 0.328506 33.0808 0.328506 37.069C0.328506 44.2106 6.11793 50 13.2595 50C20.4012 50 26.1906 44.2106 26.1906 37.069C26.1906 33.0808 24.3851 29.5143 21.5469 27.1423C20.7243 26.4547 20.1561 25.4785 20.1561 24.4063V3.125ZM35.6715 1.25C35.6715 0.559645 35.1119 0 34.4215 0H28.1715C27.4812 0 26.9215 0.559644 26.9215 1.25C26.9215 1.94036 27.4812 2.5 28.1715 2.5L34.4215 2.5C35.1119 2.5 35.6715 1.94036 35.6715 1.25ZM35.6715 8.24951C35.6715 7.55916 35.1119 6.99951 34.4215 6.99951H28.1715C27.4812 6.99951 26.9215 7.55916 26.9215 8.24951C26.9215 8.93987 27.4812 9.49951 28.1715 9.49951H34.4215C35.1119 9.49951 35.6715 8.93987 35.6715 8.24951ZM34.4215 13.999C35.1119 13.999 35.6715 14.5587 35.6715 15.249C35.6715 15.9394 35.1119 16.499 34.4215 16.499H28.1715C27.4812 16.499 26.9215 15.9394 26.9215 15.249C26.9215 14.5587 27.4812 13.999 28.1715 13.999H34.4215ZM13.2594 43.7501C16.366 43.7501 18.8844 41.2317 18.8844 38.1251C18.8844 35.4037 16.9519 33.1337 14.3844 32.6126V10.3662C14.3844 9.67582 13.8247 9.11617 13.1344 9.11617C12.444 9.11617 11.8844 9.67582 11.8844 10.3662V32.6694C9.44245 33.2829 7.63441 35.4928 7.63441 38.1251C7.63441 41.2317 10.1528 43.7501 13.2594 43.7501Z\",\n fill: color\n }));\n});\nexport default Temprature;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Contrast = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M20.4376 40.6858V38.5625V4.18746V3.31418C10.8133 4.10816 3.25006 12.1708 3.25006 22C3.25006 31.8292 10.8133 39.8918 20.4376 40.6858ZM40.7501 22C40.7501 31.8292 33.1868 39.8918 23.5626 40.6858V38.5625V4.18746V3.31418C33.1868 4.10816 40.7501 12.1708 40.7501 22ZM43.8751 22C43.8751 34.0812 34.0813 43.875 22.0001 43.875C9.91883 43.875 0.125061 34.0812 0.125061 22C0.125061 9.91877 9.91883 0.125 22.0001 0.125C34.0813 0.125 43.8751 9.91877 43.8751 22Z\",\n fill: color\n }));\n});\nexport default Contrast;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var FineTune = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M16.3679 7.50003C15.7995 10.005 13.5592 11.875 10.8823 11.875C8.20528 11.875 5.96506 10.005 5.39665 7.50003H1.5448C0.854444 7.50003 0.2948 6.94039 0.2948 6.25003C0.2948 5.55967 0.854444 5.00003 1.5448 5.00003H5.39665C5.96506 2.49504 8.20528 0.625031 10.8823 0.625031C13.5592 0.625031 15.7995 2.49504 16.3679 5.00003H48.4557C49.1461 5.00003 49.7057 5.55967 49.7057 6.25003C49.7057 6.94039 49.1461 7.50003 48.4557 7.50003H16.3679ZM14.0073 6.25003C14.0073 7.97592 12.6082 9.37503 10.8823 9.37503C9.15637 9.37503 7.75726 7.97592 7.75726 6.25003C7.75726 4.52414 9.15637 3.12503 10.8823 3.12503C12.6082 3.12503 14.0073 4.52414 14.0073 6.25003Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M34.5715 27.625C37.2485 27.625 39.4887 25.755 40.0571 23.25H48.4554C49.1458 23.25 49.7054 22.6904 49.7054 22C49.7054 21.3096 49.1458 20.75 48.4554 20.75H40.0571C39.4887 18.245 37.2485 16.375 34.5715 16.375C31.8946 16.375 29.6543 18.245 29.0859 20.75H1.5448C0.854444 20.75 0.2948 21.3096 0.2948 22C0.2948 22.6904 0.854444 23.25 1.5448 23.25H29.0859C29.6543 25.755 31.8946 27.625 34.5715 27.625ZM34.5715 25.125C36.2974 25.125 37.6965 23.7259 37.6965 22C37.6965 20.2741 36.2974 18.875 34.5715 18.875C32.8456 18.875 31.4465 20.2741 31.4465 22C31.4465 23.7259 32.8456 25.125 34.5715 25.125Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M22.7702 39C22.2018 41.505 19.9615 43.375 17.2845 43.375C14.6076 43.375 12.3673 41.505 11.7989 39H1.5448C0.854444 39 0.2948 38.4403 0.2948 37.75C0.2948 37.0596 0.854444 36.5 1.5448 36.5H11.7989C12.3673 33.995 14.6076 32.125 17.2845 32.125C19.9615 32.125 22.2018 33.995 22.7702 36.5H48.4554C49.1458 36.5 49.7054 37.0596 49.7054 37.75C49.7054 38.4403 49.1458 39 48.4554 39H22.7702ZM20.4095 37.75C20.4095 39.4759 19.0104 40.875 17.2845 40.875C15.5587 40.875 14.1595 39.4759 14.1595 37.75C14.1595 36.0241 15.5587 34.625 17.2845 34.625C19.0104 34.625 20.4095 36.0241 20.4095 37.75Z\",\n fill: color\n }));\n});\nexport default FineTune;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Saturation = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M37.2341 37.6984H37.5121V37.4237C41.4447 33.4687 43.875 28.0182 43.875 22C43.875 15.9819 41.4447 10.5314 37.5121 6.57632V6.30045H37.2328C33.2942 2.47819 27.9219 0.125031 22 0.125031C9.91877 0.125031 0.125 9.9188 0.125 22C0.125 34.0813 9.91877 43.875 22 43.875C24.718 43.875 27.3203 43.3793 29.7213 42.4733H30.5303V42.1494C33.0389 41.0861 35.308 39.5679 37.2341 37.6984ZM20.4257 3.31519C10.807 4.1148 3.25 12.1749 3.25 22C3.25 31.8252 10.807 39.8853 20.4257 40.6849V3.31519ZM34.3871 36.0759C33.221 37.1029 31.9263 37.9873 30.5303 38.7017V5.29836C31.9263 6.01281 33.221 6.89715 34.3871 7.92411V36.0759ZM37.5121 11.4641C39.5556 14.4669 40.75 18.094 40.75 22C40.75 25.9061 39.5556 29.5332 37.5121 32.536V11.4641ZM23.5507 40.6868C24.8796 40.578 26.1693 40.3307 27.4053 39.9592V4.04089C26.1693 3.66941 24.8796 3.42203 23.5507 3.31324V40.6868Z\",\n fill: color\n }));\n});\nexport default Saturation;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Annotate = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M46.1442 31.379C45.4585 31.379 44.8974 31.9429 44.8974 32.6321V43.7349C44.8974 45.8025 43.2267 47.4817 41.157 47.4943H6.22156C4.16433 47.4943 2.49361 45.8151 2.48114 43.7349V11.1283C2.48114 9.06067 4.15186 7.38147 6.22156 7.36894H17.2807C17.9665 7.36894 18.5275 6.80503 18.5275 6.1158C18.5275 5.42658 17.9665 4.86267 17.2807 4.86267H6.22156C2.79284 4.8752 0 7.66969 0 11.1283V43.7349C0 47.1935 2.79284 50.0005 6.22156 50.0005H41.157C44.5982 50.0005 47.3786 47.1935 47.3786 43.7474V32.6321C47.391 31.9429 46.83 31.379 46.1442 31.379Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M46.8923 1.65462C44.698 -0.55089 41.157 -0.55089 38.9627 1.65462L16.7571 23.9729C16.6075 24.1233 16.4953 24.3113 16.4329 24.5243L13.5154 35.1258C13.3907 35.5644 13.5154 36.0281 13.8396 36.3413C14.1513 36.6546 14.6251 36.7799 15.049 36.6672L25.5969 33.7348C25.8089 33.6722 25.9959 33.5719 26.1455 33.409L48.3636 11.0782C50.5455 8.87267 50.5455 5.31377 48.3636 3.10826L46.8923 1.65462ZM19.4751 24.7875L37.6535 6.51678L43.5135 12.4065L25.3351 30.6897L19.4751 24.7875ZM18.3031 27.1559L22.9911 31.8677L16.5077 33.6722L18.3031 27.1559ZM46.5931 9.31127L45.2715 10.6396L39.4115 4.74986L40.7331 3.42154C41.9425 2.206 43.9249 2.206 45.1343 3.42154L46.5931 4.88771C47.815 6.11578 47.815 8.09573 46.5931 9.31127Z\",\n fill: color\n }));\n});\nexport default Annotate;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Blur = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M18.3626 41.293C17.5103 41.4285 16.7096 40.8474 16.5742 39.9952C16.4387 39.143 17.0198 38.3423 17.872 38.2068C18.2902 38.1403 18.6988 38.0456 19.0958 37.9246C21.9368 37.059 24.1957 34.8468 25.1254 32.0335C25.2671 31.6049 25.378 31.1621 25.4555 30.7076C25.6005 29.857 26.4076 29.2849 27.2583 29.4299C28.109 29.5749 28.681 30.3821 28.536 31.2327C28.432 31.8429 28.283 32.4379 28.0926 33.0142C26.8449 36.7893 23.8206 39.7519 20.0065 40.914C19.4728 41.0766 18.9239 41.2038 18.3626 41.293Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M33.9356 31.0645C33.9356 23.9644 24.1764 8.59028 19.4747 1.59549C18.2785 -0.184172 15.7216 -0.184172 14.5254 1.59548C9.82374 8.59028 0.0645752 23.9644 0.0645752 31.0645C0.0645752 40.4177 7.64685 48 17.0001 48C26.3533 48 33.9356 40.4177 33.9356 31.0645ZM30.8106 31.0645C30.8106 29.8836 30.375 28.0316 29.4236 25.578C28.5 23.1959 27.1988 20.5159 25.7187 17.7756C22.8106 12.3913 19.3287 6.98743 17.0001 3.51586C14.6715 6.98743 11.1895 12.3913 8.28145 17.7756C6.80135 20.5159 5.50017 23.1959 4.57655 25.578C3.62517 28.0316 3.18958 29.8836 3.18958 31.0645C3.18958 38.6918 9.37274 44.875 17.0001 44.875C24.6274 44.875 30.8106 38.6918 30.8106 31.0645Z\",\n fill: color\n }));\n});\nexport default Blur;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var PinOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M43.0081 15.2287L36.7869 17.6214L28.935 29.9601C30.5809 33.9266 30.3662 38.0903 27.1408 41.3158L26.5656 41.8909C25.9554 42.5011 24.9661 42.5011 24.3559 41.8909L14.4122 31.9472L2.99211 43.3673C2.38192 43.9775 1.3926 43.9775 0.782403 43.3673C0.17221 42.7571 0.172211 41.7678 0.782403 41.1576L12.2025 29.7375L2.25883 19.7938C1.64864 19.1836 1.64864 18.1943 2.25883 17.5841L2.50512 17.3378C5.73058 14.1123 10.2231 13.5688 14.1897 15.2147L26.5283 7.36283L28.9211 1.14165C29.327 0.0863053 30.6847 -0.201832 31.4843 0.597706L43.552 12.6655C44.3516 13.465 44.0634 14.8228 43.0081 15.2287ZM29.0752 9.44618L30.9747 4.50752L39.6422 13.1751L34.7035 15.0745L25.4251 29.655L26.0486 31.1577C27.234 34.0146 27.0773 36.5309 25.4342 38.5498L5.64209 18.7576C7.75439 17.2384 10.4304 17.0382 12.992 18.1011L14.4948 18.7246L29.0752 9.44618Z\",\n fill: color\n }));\n});\nexport default PinOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Duplicate = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M0.312012 34.847V3.39883C0.312012 1.67294 1.71112 0.273834 3.43701 0.273834H26.807C28.5329 0.273834 29.932 1.67294 29.932 3.39883V34.847C29.932 36.5729 28.5329 37.972 26.807 37.972H3.43701C1.71112 37.972 0.312012 36.5729 0.312012 34.847ZM3.43701 34.847V3.39883L26.807 3.39883L26.807 34.847L3.43701 34.847Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M35.6874 12.5434C35.6874 11.6805 34.9878 10.9809 34.1249 10.9809C33.2619 10.9809 32.5624 11.6805 32.5624 12.5434V40.6009H9.89033C9.02739 40.6009 8.32783 41.3005 8.32783 42.1634C8.32783 43.0263 9.02739 43.7259 9.89033 43.7259H34.1249C34.9878 43.7259 35.6874 43.0263 35.6874 42.1634V12.5434Z\",\n fill: color\n }));\n});\nexport default Duplicate;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var DeleteOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M15.75 17.3125C15.75 16.4496 16.4496 15.75 17.3125 15.75C18.1754 15.75 18.875 16.4496 18.875 17.3125L18.875 32.9375C18.875 33.8005 18.1754 34.5 17.3125 34.5C16.4496 34.5 15.75 33.8005 15.75 32.9375L15.75 17.3125Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M26.6875 15.75C25.8246 15.75 25.125 16.4496 25.125 17.3125L25.125 32.9375C25.125 33.8005 25.8246 34.5 26.6875 34.5C27.5504 34.5 28.25 33.8005 28.25 32.9375V17.3125C28.25 16.4496 27.5504 15.75 26.6875 15.75Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M12.625 6.37503V3.25003C12.625 1.52414 14.0241 0.125031 15.75 0.125031H28.25C29.9759 0.125031 31.375 1.52414 31.375 3.25003V6.37503H42.3125C43.1754 6.37503 43.875 7.07459 43.875 7.93753C43.875 8.80048 43.1754 9.50003 42.3125 9.50003H39.1875V40.75C39.1875 42.4759 37.7884 43.875 36.0625 43.875H7.9375C6.21161 43.875 4.8125 42.4759 4.8125 40.75V9.50003L1.6875 9.50003C0.824554 9.50003 0.125 8.80048 0.125 7.93753C0.125 7.07459 0.824555 6.37503 1.6875 6.37503H12.625ZM15.75 3.25003H28.25V6.37503H15.75V3.25003ZM7.9375 9.50003L7.9375 40.75H36.0625V9.50003H7.9375Z\",\n fill: color\n }));\n});\nexport default DeleteOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var CropFrame = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M43 3H31.75V0.5H43C44.3807 0.5 45.5 1.61929 45.5 3V14.25H43V3Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M3 14.25V3H14.25V0.5H3C1.61929 0.5 0.5 1.61929 0.5 3V14.25H3Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M0.5 31.75V43C0.5 44.3807 1.61929 45.5 3 45.5H14.25V43H3V31.75H0.5Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M43 31.75H45.5V43C45.5 44.3807 44.3807 45.5 43 45.5H31.75V43H43V31.75Z\",\n fill: color\n }));\n});\nexport default CropFrame;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Portrait = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 36 52\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M32.0559 46.8755L32.0559 3.12555L3.93091 3.12555L3.93091 46.8755H32.0559ZM35.1809 3.12555C35.1809 1.39966 33.7818 0.000549316 32.0559 0.000549316H3.93091C2.20502 0.000549316 0.805908 1.39966 0.805908 3.12555V46.8755C0.805908 48.6014 2.20502 50.0005 3.93091 50.0005H32.0559C33.7818 50.0005 35.1809 48.6014 35.1809 46.8755L35.1809 3.12555Z\",\n fill: color\n }));\n});\nexport default Portrait;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var WarningOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M45.961 39.0119L28.2837 7.27185C27.5934 6.17538 26.3971 5.5 24.9981 5.5C23.5956 5.5 22.3967 6.17887 21.7073 7.28034L4.06571 38.9613L4.03009 39.0197C3.33595 40.159 3.32316 41.4697 3.9939 42.6216C4.67405 43.786 5.89 44.5 7.34459 44.5H42.554C44.0596 44.5 45.3464 43.7436 46.0016 42.6231C46.6817 41.4564 46.652 40.1455 45.9968 39.0706L45.961 39.0119ZM49.0254 44.3856C47.7038 46.6495 45.2246 48 42.554 48H7.34459C4.67398 48 2.29272 46.6495 0.970942 44.3856C-0.347811 42.1231 -0.322029 39.4361 1.04116 37.1987L18.6646 5.55018C18.6697 5.5418 18.6743 5.53342 18.6789 5.52504C18.6836 5.51666 18.6882 5.50828 18.6932 5.49989C20.0278 3.30867 22.3849 2 24.9981 2C27.6114 2 29.9685 3.30867 31.303 5.49989L48.9853 37.2489C50.3185 39.436 50.3442 42.1232 49.0254 44.3856Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M22.0001 16C22.0001 14.3431 23.3433 13 25.0001 13C26.657 13 28.0001 14.3431 28.0001 16V28C28.0001 29.6569 26.657 31 25.0001 31C23.3433 31 22.0001 29.6569 22.0001 28V16Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M28.0001 37C28.0001 38.6569 26.657 40 25.0001 40C23.3433 40 22.0001 38.6569 22.0001 37C22.0001 35.3431 23.3433 34 25.0001 34C26.657 34 28.0001 35.3431 28.0001 37Z\",\n fill: color\n }));\n});\nexport default WarningOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Success = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 21 21\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M20.5 10.5001C20.5 16.023 16.0228 20.5001 10.5 20.5001C4.97714 20.5001 0.5 16.023 0.5 10.5001C0.5 4.97727 4.97714 0.500122 10.5 0.500122C16.0228 0.500122 20.5 4.97727 20.5 10.5001ZM7.88239 9.56904C8.00439 9.62145 8.11473 9.69763 8.20698 9.79314L9.49998 11.0861L12.793 7.79314C12.8852 7.69763 12.9956 7.62145 13.1176 7.56904C13.2396 7.51663 13.3708 7.48905 13.5036 7.48789C13.6363 7.48674 13.768 7.51204 13.8909 7.56232C14.0138 7.6126 14.1255 7.68686 14.2194 7.78075C14.3133 7.87464 14.3875 7.98629 14.4378 8.10919C14.4881 8.23208 14.5134 8.36376 14.5122 8.49654C14.5111 8.62932 14.4835 8.76054 14.4311 8.88255C14.3787 9.00455 14.3025 9.1149 14.207 9.20714L10.207 13.2071C10.0194 13.3946 9.76514 13.4999 9.49998 13.4999C9.23482 13.4999 8.98051 13.3946 8.79298 13.2071L6.79298 11.2071C6.69747 11.1149 6.62129 11.0046 6.56888 10.8825C6.51647 10.7605 6.48889 10.6293 6.48773 10.4965C6.48658 10.3638 6.51188 10.2321 6.56216 10.1092C6.61244 9.98629 6.6867 9.87464 6.78059 9.78075C6.87448 9.68686 6.98613 9.6126 7.10903 9.56232C7.23193 9.51204 7.3636 9.48674 7.49638 9.48789C7.62916 9.48905 7.76038 9.51663 7.88239 9.56904Z\",\n fill: color\n }));\n});\nexport default Success;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Error = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 21 21\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M10.5 20.5001C16.0228 20.5001 20.5 16.023 20.5 10.5001C20.5 4.97727 16.0228 0.500122 10.5 0.500122C4.97715 0.500122 0.5 4.97727 0.5 10.5001C0.5 16.023 4.97715 20.5001 10.5 20.5001ZM15.4375 7.0912L11.8155 10.7132L15.4638 14.309C15.6213 14.4665 15.7 14.6503 15.7 14.8865C15.7 15.1227 15.6213 15.3064 15.4638 15.4639C15.3063 15.6214 15.1226 15.7001 14.8864 15.7001C14.6501 15.7001 14.4664 15.6214 14.3089 15.4639L10.6869 11.8419L7.06483 15.4639C6.77612 15.7789 6.25118 15.7789 5.93622 15.4639C5.77874 15.3064 5.7 15.0964 5.7 14.8865C5.7 14.6765 5.77874 14.4928 5.93622 14.3353L9.55827 10.7132L5.93622 7.0912C5.77874 6.93372 5.7 6.72374 5.7 6.51377C5.7 6.3038 5.77874 6.12007 5.93622 5.96259C6.25118 5.64763 6.74987 5.64763 7.06483 5.96259L10.6869 9.58464L14.3089 5.93634C14.5976 5.62138 15.1226 5.62138 15.4375 5.93634C15.595 6.09382 15.6738 6.27755 15.6738 6.51377C15.6738 6.74999 15.595 6.93372 15.4375 7.0912Z\",\n fill: color\n }));\n});\nexport default Error;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var ErrorOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 52 52\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M37.3438 16.4782L28.2887 25.5333L37.4095 34.5228C37.8032 34.9165 38 35.3758 38 35.9664C38 36.5569 37.8032 37.0162 37.4095 37.4099C37.0158 37.8036 36.5564 38.0005 35.9659 38.0005C35.3753 38.0005 34.916 37.8036 34.5223 37.4099L25.4672 28.3548L16.4121 37.4099C15.6903 38.1973 14.378 38.1973 13.5906 37.4099C13.1969 37.0162 13 36.4913 13 35.9664C13 35.4414 13.1969 34.9821 13.5906 34.5884L22.6457 25.5333L13.5906 16.4782C13.1969 16.0845 13 15.5595 13 15.0346C13 14.5097 13.1969 14.0504 13.5906 13.6567C14.378 12.8693 15.6247 12.8693 16.4121 13.6567L25.4672 22.7118L34.5223 13.591C35.2441 12.8036 36.5564 12.8036 37.3438 13.591C37.7375 13.9847 37.9344 14.4441 37.9344 15.0346C37.9344 15.6252 37.7375 16.0845 37.3438 16.4782Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M-0.000488281 25.0005C-0.000488281 38.7972 11.2028 50.0005 24.9995 50.0005C38.6925 50.0005 49.9995 38.7972 49.9995 25.0005C49.9995 11.2038 38.7962 0.000488281 24.9995 0.000488281C11.2028 0.000488281 -0.000488281 11.2038 -0.000488281 25.0005ZM3.63022 24.8968C3.63022 13.1748 13.1738 3.52746 24.9995 3.52746C36.8252 3.52746 46.3688 13.1748 46.3688 24.8968C46.3688 36.6187 36.8252 46.266 24.9995 46.266C13.2775 46.266 3.63022 36.6187 3.63022 24.8968Z\",\n fill: color\n }));\n});\nexport default ErrorOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Loading = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M29.9338 5.26853C27.8524 4.75154 25.7006 4.56814 23.5381 4.72351C22.4874 4.799 21.4379 4.95535 20.4183 5.18855L19.3724 0.636496C20.6245 0.350265 21.9128 0.158175 23.2017 0.065597C25.8579 -0.125223 28.5034 0.100753 31.0653 0.737277L29.9338 5.26853Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n opacity: \"0.9\",\n d: \"M40.6131 11.9278C38.5498 9.48098 35.9044 7.52805 32.963 6.2805L34.7952 1.98303C38.4106 3.51633 41.6615 5.91575 44.1962 8.922L40.6131 11.9278Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n opacity: \"0.8\",\n d: \"M45.3329 23.5739L45.3303 23.5392C45.097 20.3085 44.1359 17.275 42.4734 14.5227L46.4838 12.1129C48.5302 15.501 49.7133 19.2325 50 23.2036L45.3329 23.5739Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n opacity: \"0.7\",\n d: \"M46.2688 38.2308L42.2981 35.7565C43.9958 33.0458 45.0372 29.9357 45.3095 26.7618L49.9744 27.1604C49.639 31.0674 48.3577 34.8958 46.2688 38.2308Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n opacity: \"0.6\",\n d: \"M34.4209 48.1735L32.6626 43.8456C35.6192 42.6505 38.2938 40.7405 40.3975 38.3222L43.9338 41.3828C41.3483 44.3551 38.0588 46.7033 34.4209 48.1735V48.1735Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n opacity: \"0.5\",\n d: \"M26.8033 49.9345C24.1593 50.1242 21.5262 49.9011 18.9766 49.2716L20.1013 44.7386C22.1729 45.25 24.3148 45.4309 26.4673 45.2766C27.5283 45.2004 28.5879 45.0416 29.6165 44.8049L30.6697 49.3551C29.4061 49.6459 28.1052 49.841 26.8033 49.9345V49.9345Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n opacity: \"0.4\",\n d: \"M15.2449 48.0311C11.6272 46.5033 8.37276 44.1086 5.83362 41.1063L9.412 38.0952C11.479 40.5388 14.1272 42.4877 17.0704 43.7306L15.2449 48.0311Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n opacity: \"0.3\",\n d: \"M3.54069 37.9198C1.48217 34.5223 0.292537 30.78 0.00479729 26.7959L0 26.7274L4.66972 26.3918L4.67579 26.478C4.90861 29.7017 5.87511 32.7443 7.54751 35.504L3.54069 37.9198Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n opacity: \"0.2\",\n d: \"M4.69761 23.2075L0.0335693 22.802C0.374666 18.8955 1.66191 15.0691 3.75587 11.7373L7.72274 14.2175C6.02088 16.9257 4.97478 20.0344 4.69761 23.2075V23.2075Z\",\n fill: color\n }));\n});\nexport default Loading;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"color2\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var ColorPicker = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$color2 = _ref.color2,\n color2 = _ref$color2 === void 0 ? '#F8FAFB' : _ref$color2,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 42 42\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M42.0001 6.11477C42.0001 4.48089 41.3639 2.94468 40.2086 1.78931C37.8238 -0.595528 33.9433 -0.595878 31.5582 1.78931L25.666 7.68191L22.9908 5.00654C22.5351 4.5509 21.7965 4.5509 21.3407 5.00654L17.8405 8.50695C17.3849 8.96259 17.3849 9.70141 17.8405 10.1572L20.5157 12.8325L3.63971 29.7097C3.5116 29.8378 3.41511 29.9939 3.35783 30.1658L2.27826 33.4048L1.30626 34.3769C-0.435198 36.1186 -0.435314 38.9525 1.30626 40.6943C3.04783 42.436 5.88157 42.4359 7.62314 40.6943L8.59514 39.7223L11.834 38.6426C12.0058 38.5853 12.1619 38.4888 12.29 38.3607L29.1661 21.4835L31.8413 24.1588C32.297 24.6145 33.0357 24.6145 33.4914 24.1588L36.9916 20.6584C37.4472 20.2028 37.4472 19.464 36.9916 19.0082L34.3164 16.3328L40.2086 10.4402C41.3639 9.28486 42.0001 7.74876 42.0001 6.11477ZM20.5157 26.8341H9.81507L22.1658 14.4826L27.516 19.8333L20.5157 26.8341ZM32.6663 21.6836L20.3156 9.332L22.1657 7.48168L34.5163 19.8333L32.6663 21.6836ZM38.5585 8.79014L32.6663 14.6827L27.316 9.332L33.2081 3.4394C34.6833 1.96421 37.0835 1.96409 38.5584 3.4394C40.0263 4.84774 40.0261 7.3818 38.5585 8.79014Z\",\n fill: color\n }));\n});\nexport default ColorPicker;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Menu = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M0 7.75049C0 6.92206 0.671573 6.25049 1.5 6.25049H48.5C49.3284 6.25049 50 6.92206 50 7.75049V9.43806C50 10.2665 49.3284 10.9381 48.5 10.9381H1.5C0.671571 10.9381 0 10.2665 0 9.43806V7.75049ZM0 24.1567C0 23.3283 0.671573 22.6567 1.5 22.6567H48.5C49.3284 22.6567 50 23.3283 50 24.1567V25.8443C50 26.6727 49.3284 27.3443 48.5 27.3443H1.5C0.671571 27.3443 0 26.6727 0 25.8443V24.1567ZM1.5 39.0629C0.671573 39.0629 0 39.7345 0 40.5629V42.2505C0 43.0789 0.671571 43.7505 1.5 43.7505H48.5C49.3284 43.7505 50 43.0789 50 42.2505V40.5629C50 39.7345 49.3284 39.0629 48.5 39.0629H1.5Z\",\n fill: color\n }));\n});\nexport default Menu;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var MoveDownOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 46 26\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M1.23229 1.23267C2.20863 0.256387 3.79154 0.256434 4.76782 1.23277L22.9989 19.465L41.2323 1.23267C42.2086 0.256387 43.7915 0.256434 44.7678 1.23277C45.7441 2.20911 45.7441 3.79203 44.7677 4.76831L24.7665 24.7683C24.2977 25.2371 23.6618 25.5005 22.9987 25.5005C22.3357 25.5005 21.6998 25.2371 21.231 24.7682L1.23218 4.7682C0.255899 3.79186 0.255946 2.20895 1.23229 1.23267Z\",\n fill: color\n }));\n});\nexport default MoveDownOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var MoveUpOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 46 26\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M21.2326 1.23271C22.2089 0.256404 23.7918 0.256417 24.7681 1.23274L44.7678 21.2327C45.7441 22.2091 45.7441 23.792 44.7678 24.7683C43.7914 25.7446 42.2085 25.7446 41.2322 24.7682L23.0003 6.53602L4.76775 24.7683C3.79143 25.7446 2.20852 25.7446 1.23222 24.7682C0.255916 23.7919 0.255928 22.209 1.23225 21.2327L21.2326 1.23271Z\",\n fill: color\n }));\n});\nexport default MoveUpOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var ArrowSidebarLeftOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M25 47.5006C37.4264 47.5006 47.5 37.427 47.5 25.0006C47.5 12.5742 37.4264 2.50061 25 2.50061C12.5736 2.50061 2.5 12.5742 2.5 25.0006C2.5 37.427 12.5736 47.5006 25 47.5006ZM25 50.0006C38.8071 50.0006 50 38.8077 50 25.0006C50 11.1935 38.8071 0.000610352 25 0.000610352C11.1929 0.000610352 0 11.1935 0 25.0006C0 38.8077 11.1929 50.0006 25 50.0006Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M27.7355 35.1357C27.1751 35.7705 26.2217 35.7926 25.6359 35.1773L17.3026 26.423C17.0301 26.1368 16.8819 25.755 16.8752 25.3647C16.8686 24.9745 17.0037 24.5881 17.2652 24.2923L25.5985 14.8647C26.1593 14.2302 27.1128 14.2089 27.6981 14.8247C28.2539 15.4093 28.2679 16.3516 27.7348 16.9546L20.36 25.2978L27.6974 33.0057C28.2536 33.59 28.2681 34.5323 27.7355 35.1357ZM26.6695 34.3756C26.7058 34.3748 26.753 34.3599 26.7984 34.3085C26.9042 34.1886 26.8989 33.9798 26.792 33.8676L19.0594 25.7444C18.8357 25.5095 18.829 25.1425 19.0438 24.8995L26.7983 16.1268C26.9041 16.007 26.899 15.7983 26.7921 15.6859C26.7464 15.6377 26.7001 15.6249 26.6639 15.6256C26.6276 15.6263 26.5805 15.6412 26.5351 15.6926L18.2017 25.1202C18.1562 25.1717 18.1235 25.2514 18.1251 25.3435C18.1266 25.4356 18.1619 25.5128 18.208 25.5612L26.5413 34.3154C26.5871 34.3635 26.6334 34.3763 26.6695 34.3756Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M26.7984 34.3085C26.753 34.3599 26.7058 34.3748 26.6695 34.3756C26.6334 34.3763 26.5871 34.3635 26.5413 34.3154L18.208 25.5612C18.1619 25.5128 18.1266 25.4356 18.1251 25.3435C18.1235 25.2514 18.1562 25.1717 18.2017 25.1202L26.5351 15.6926C26.5805 15.6412 26.6276 15.6263 26.6639 15.6256C26.7001 15.6249 26.7464 15.6377 26.7921 15.6859C26.899 15.7983 26.9041 16.007 26.7983 16.1268L19.0438 24.8995C18.829 25.1425 18.8357 25.5095 19.0594 25.7444L26.792 33.8676C26.8989 33.9798 26.9042 34.1886 26.7984 34.3085Z\",\n fill: color\n }));\n});\nexport default ArrowSidebarLeftOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var ArrowSidebarRightOutline = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M25 47.5006C37.4264 47.5006 47.5 37.427 47.5 25.0006C47.5 12.5742 37.4264 2.50061 25 2.50061C12.5736 2.50061 2.5 12.5742 2.5 25.0006C2.5 37.427 12.5736 47.5006 25 47.5006ZM25 50.0006C38.8071 50.0006 50 38.8077 50 25.0006C50 11.1935 38.8071 0.000610352 25 0.000610352C11.1929 0.000610352 0 11.1935 0 25.0006C0 38.8077 11.1929 50.0006 25 50.0006Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M22.2645 14.8655C22.8249 14.2307 23.7783 14.2086 24.3641 14.8239L32.6974 23.5781C32.9699 23.8644 33.1181 24.2461 33.1248 24.6364C33.1314 25.0267 32.9963 25.4131 32.7348 25.7089L24.4015 35.1365C23.8406 35.7709 22.8872 35.7923 22.3019 35.1765C21.7461 34.5919 21.7321 33.6496 22.2652 33.0465L29.6399 24.7034L22.3026 16.9954C21.7464 16.4112 21.7319 15.4689 22.2645 14.8655ZM23.3305 15.6256C23.2942 15.6264 23.247 15.6413 23.2016 15.6927C23.0958 15.8126 23.1011 16.0214 23.208 16.1336L30.9406 24.2568C31.1643 24.4917 31.171 24.8586 30.9562 25.1016L23.2017 33.8744C23.0959 33.9942 23.101 34.2029 23.2079 34.3153C23.2536 34.3634 23.2999 34.3763 23.3361 34.3756C23.3724 34.3748 23.4195 34.36 23.4649 34.3086L31.7983 24.881C31.8438 24.8295 31.8765 24.7497 31.8749 24.6577C31.8734 24.5656 31.838 24.4883 31.792 24.44L23.4587 15.6858C23.4129 15.6377 23.3666 15.6249 23.3305 15.6256Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M23.2016 15.6927C23.247 15.6413 23.2942 15.6264 23.3305 15.6256C23.3666 15.6249 23.4129 15.6377 23.4587 15.6858L31.792 24.44C31.838 24.4883 31.8734 24.5656 31.8749 24.6577C31.8765 24.7497 31.8438 24.8295 31.7983 24.881L23.4649 34.3086C23.4195 34.36 23.3724 34.3748 23.3361 34.3756C23.2999 34.3763 23.2536 34.3634 23.2079 34.3153C23.101 34.2029 23.0959 33.9942 23.2017 33.8744L30.9562 25.1016C31.171 24.8586 31.1643 24.4917 30.9406 24.2568L23.208 16.1336C23.1011 16.0214 23.0958 15.8126 23.2016 15.6927Z\",\n fill: color\n }));\n});\nexport default ArrowSidebarRightOutline;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Annotation = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 50 50\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M48.5577 38.9423H34.8557C31.8069 38.9423 29.327 41.4224 29.327 44.4712C29.327 45.9293 28.1406 47.1157 26.6827 47.1157H5.52902C4.07066 47.1157 2.88467 45.9293 2.88467 44.4712V42.5459C2.88467 41.0886 4.07028 39.9025 5.5275 39.9018L9.33952 39.8999C9.34067 39.8999 9.34219 39.8995 9.34334 39.8995C9.38683 39.8995 9.43031 39.8968 9.47418 39.893C9.49211 39.8915 9.50966 39.8884 9.52759 39.8861C9.54628 39.8835 9.56535 39.8819 9.58405 39.8789L19.7636 38.1229C19.7689 38.1217 19.7739 38.1206 19.7788 38.1195C19.7948 38.1164 19.8105 38.113 19.8261 38.1095C19.8517 38.1038 19.8769 38.0981 19.9017 38.0908C19.9192 38.0863 19.9368 38.0809 19.9543 38.0756C19.9776 38.068 20.0008 38.0599 20.0241 38.0512C20.0409 38.0447 20.0581 38.039 20.0748 38.0321C20.1107 38.0168 20.1458 38.0008 20.1805 37.9829C20.1942 37.9756 20.208 37.9672 20.2217 37.9596C20.2461 37.9459 20.2702 37.9321 20.2938 37.9169C20.3083 37.9077 20.3228 37.8978 20.3373 37.8879C20.3602 37.8719 20.3831 37.8551 20.4052 37.8375C20.417 37.8284 20.4292 37.8192 20.4411 37.8093C20.4746 37.7815 20.5074 37.7525 20.5383 37.7212L46.2479 12.0109C48.3097 9.94895 48.3097 6.59377 46.2479 4.53146L43.2632 1.54708C41.2014 -0.515234 37.846 -0.514853 35.7841 1.54708L10.075 27.2574C10.0437 27.2883 10.0147 27.3215 9.9865 27.355C9.97696 27.3665 9.9678 27.3783 9.95865 27.3901C9.9411 27.4127 9.92432 27.4355 9.90829 27.4588C9.89838 27.4729 9.88846 27.4874 9.8793 27.5019C9.86443 27.5252 9.85069 27.5488 9.83734 27.5729C9.82857 27.5885 9.81941 27.6042 9.81102 27.6198C9.79424 27.653 9.77898 27.6862 9.76448 27.7205C9.75723 27.7377 9.75113 27.7556 9.74426 27.7732C9.73625 27.7953 9.72824 27.8178 9.72099 27.8403C9.71527 27.8586 9.70993 27.8769 9.70497 27.8952C9.69849 27.9189 9.69276 27.9429 9.68742 27.9673C9.68361 27.9841 9.67979 28.0009 9.67674 28.0177C9.6756 28.0226 9.67445 28.0272 9.67369 28.0318L8.12378 37.0158L5.52597 37.017C2.47879 37.0185 0 39.4989 0 42.5459V44.4712C0 47.5201 2.48032 50.0005 5.52902 50.0005H26.6827C29.7314 50.0005 32.2117 47.5201 32.2117 44.4712C32.2117 43.0132 33.3977 41.8267 34.8557 41.8267H48.5577C49.3542 41.8267 50 41.1813 50 40.3847C50 39.5878 49.3542 38.9423 48.5577 38.9423ZM12.043 31.2653L16.5306 35.7531L11.1076 36.6885L12.043 31.2653ZM33.5567 7.85382L35.7288 10.026L15.3065 30.4493L13.1344 28.2771L33.5567 7.85382ZM19.5183 34.6613L17.3462 32.4891L37.7689 12.0658L39.941 14.238L19.5183 34.6613ZM37.8239 3.58651C38.7611 2.64958 40.2859 2.64958 41.2235 3.58651L44.2078 6.57126C45.145 7.50858 45.145 9.03376 44.2078 9.97108L41.9804 12.1986L35.5965 5.81401L37.8239 3.58651Z\",\n fill: color\n }));\n});\nexport default Annotation;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"color\", \"size\"];\nimport React from 'react';\nimport { intrinsicComponent } from './utils/functions';\nexport var Rotate90 = intrinsicComponent(function (_ref, ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? 'currentColor' : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 14 : _ref$size,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n ref: ref,\n width: size,\n height: size,\n viewBox: \"0 0 52 42\",\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, rest), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M46.4326 40.0282C46.1217 40.5666 45.6098 40.9595 45.0093 41.1204C44.4088 41.2813 43.7691 41.197 43.2307 40.8862C42.6923 40.5754 42.2995 40.0634 42.1386 39.463C41.9777 38.8625 42.0619 38.2227 42.3727 37.6843C45.2819 32.6454 46.0703 26.6571 44.5644 21.0369C43.0584 15.4167 39.3816 10.6249 34.3426 7.71563C25.1427 2.4043 13.7736 4.38306 6.93632 12.1744L14.5457 12.0831H14.5744C15.196 12.0795 15.7937 12.3229 16.2358 12.7599C16.678 13.1969 16.9284 13.7916 16.9321 14.4133C16.9357 15.0349 16.6923 15.6326 16.2553 16.0747C15.8183 16.5169 15.2236 16.7673 14.6019 16.771L2.37222 16.9175H2.34409C2.03391 16.9175 1.72681 16.856 1.44059 16.7364C1.15437 16.6169 0.894721 16.4417 0.676697 16.2211C0.458674 16.0004 0.28661 15.7387 0.170478 15.4511C0.0543471 15.1635 -0.00354164 14.8557 0.000167612 14.5455L0.147346 2.31591C0.151046 2.00811 0.215338 1.70404 0.336549 1.42108C0.457761 1.13812 0.633519 0.881802 0.853788 0.666765C1.07406 0.451728 1.33453 0.282182 1.62032 0.167807C1.90611 0.0534328 2.21164 -0.00353076 2.51944 0.000169355C2.82725 0.00386947 3.13132 0.0681609 3.41428 0.189372C3.69724 0.310584 3.95356 0.486342 4.16859 0.706611C4.38363 0.926881 4.55318 1.18735 4.66755 1.47314C4.78193 1.75894 4.83889 2.06446 4.83519 2.37227L4.77171 7.65586C9.37537 3.16334 15.4496 0.489016 21.8718 0.127065C28.2941 -0.234886 34.6303 1.74001 39.7096 5.6868C44.7889 9.63359 48.2679 15.2855 49.5038 21.5981C50.7397 27.9107 49.6485 34.4574 46.4326 40.0282Z\",\n fill: color\n }), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n clipRule: \"evenodd\",\n d: \"M25 28C26.6569 28 28 26.6569 28 25C28 23.3431 26.6569 22 25 22C23.3431 22 22 23.3431 22 25C22 26.6569 23.3431 28 25 28ZM25 32C28.866 32 32 28.866 32 25C32 21.134 28.866 18 25 18C21.134 18 18 21.134 18 25C18 28.866 21.134 32 25 32Z\",\n fill: color\n }));\n});\nexport default Rotate90;","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { Color as PColor } from '../../utils/types/palette';\n// import { BorderRadiusSize as BRSize } from '../../utils/types/shape';\nimport InputStyled from '../input/input.styles';\nimport { fontSizeInputMixin } from '../input/input.mixin';\nimport { Size } from '../menu-item/types';\nvar baseClassName = 'Select';\nvar Icon = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'Icon')\n}).withConfig({\n componentId: \"sc-mfrapg-0\"\n})(function (_ref) {\n var palette = _ref.theme.palette,\n size = _ref.size;\n return css([\"display:flex;flex-shrink:0;color:\", \";padding:\", \";margin-left:6px;\"], palette[PColor.IconsPrimary], size === Size.Md ? '2.5px' : '2px');\n});\nvar TickIcon = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'tickIcon')\n}).withConfig({\n componentId: \"sc-mfrapg-1\"\n})(function (_ref2) {\n var palette = _ref2.theme.palette;\n return css([\"color:\", \";\"], palette[PColor.AccentStateless]);\n});\nvar Container = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'Container')\n}).withConfig({\n componentId: \"sc-mfrapg-2\"\n})(function (_ref3) {\n var _ref3$fullWidth = _ref3.fullWidth,\n fullWidth = _ref3$fullWidth === void 0 ? false : _ref3$fullWidth;\n return css([\"position:relative;display:inline-flex;\", \"\"], fullWidth ? 'width: 100%' : '');\n});\nvar Select = /*#__PURE__*/styled(InputStyled.Input).attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-mfrapg-3\"\n})(function (_ref4) {\n var palette = _ref4.theme.palette,\n disabled = _ref4.disabled,\n readOnly = _ref4.readOnly,\n _ref4$size = _ref4.size,\n size = _ref4$size === void 0 ? 'sm' : _ref4$size;\n return css([\"cursor:\", \";user-select:none;background:\", \";\", \";\"], disabled || readOnly ? 'default' : 'pointer', disabled ? palette[PColor.BackgroundHover] : palette[PColor.BackgroundStateless], fontSizeInputMixin[size]);\n});\nvar Label = /*#__PURE__*/styled.label.attrs({\n className: generateClassNames(baseClassName, 'Label')\n}).withConfig({\n componentId: \"sc-mfrapg-4\"\n})([\"flex-grow:1;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;\"]);\nvar Placeholder = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'Placeholder')\n}).withConfig({\n componentId: \"sc-mfrapg-5\"\n})(function (_ref5) {\n var palette = _ref5.theme.palette,\n size = _ref5.size;\n return css([\"width:100%;color:\", \";margin-right:\", \"px;\"], palette[PColor.TextPlaceholder], size === Size.Md ? 10 : 6);\n});\nvar Input = /*#__PURE__*/styled.input.attrs({\n className: generateClassNames(baseClassName, 'Input'),\n 'aria-hidden': 'true',\n tabindex: '-1'\n}).withConfig({\n componentId: \"sc-mfrapg-6\"\n})([\"left:0;width:100%;bottom:0;opacity:0;position:absolute;pointer-events:none;box-sizing:border-box;\"]);\nvar Styled = applyDisplayNames({\n Container: Container,\n Select: Select,\n Label: Label,\n Icon: Icon,\n TickIcon: TickIcon,\n Input: Input,\n Placeholder: Placeholder\n});\nexport default Styled;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _typeof from \"@babel/runtime/helpers/typeof\";\nimport _toConsumableArray from \"@babel/runtime/helpers/toConsumableArray\";\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport React from 'react';\nimport { Tick } from '@scaleflex/icons/tick';\nimport { MenuItemActions, MenuItemLabel } from '../menu-item';\nimport { InputSize } from '../../utils/types';\nimport Styled from './select.styles';\nexport var getIconSize = function getIconSize(size) {\n switch (size) {\n case InputSize.Md:\n return 11;\n case InputSize.Sm:\n default:\n return 10;\n }\n};\nexport var renderIcon = function renderIcon(_icon, size) {\n return _icon ? /*#__PURE__*/React.createElement(Styled.Icon, null, typeof _icon === 'function' ? _icon({\n size: getIconSize(size)\n }) : _icon) : undefined;\n};\nvar generateChildren = function generateChildren(children) {\n var isActive = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var size = arguments.length > 2 ? arguments[2] : undefined;\n var hideMenuItemsActions = arguments.length > 3 ? arguments[3] : undefined;\n var miChildren = /*#__PURE__*/React.createElement(MenuItemLabel, null, children);\n if (isActive && children) {\n var miActions = /*#__PURE__*/React.createElement(MenuItemActions, null, /*#__PURE__*/React.createElement(Styled.TickIcon, null, /*#__PURE__*/React.createElement(Tick, {\n size: getIconSize(size)\n })));\n if (React.Children.count(children) === 1) {\n return /*#__PURE__*/React.createElement(React.Fragment, null, miChildren, !hideMenuItemsActions && miActions);\n }\n if (React.Children.count(children) > 1 && !React.Children.toArray(children).some(function (child) {\n var _child$type;\n return (child === null || child === void 0 ? void 0 : (_child$type = child.type) === null || _child$type === void 0 ? void 0 : _child$type.displayName) === 'MenuItemActions';\n })) {\n return /*#__PURE__*/React.createElement(React.Fragment, null, children, miActions);\n }\n }\n return miChildren;\n};\nexport var renderOption = function renderOption(menuItem, _ref) {\n var _type, _props, _props2, _props3;\n var value = _ref.value,\n _ref$multiple = _ref.multiple,\n multiple = _ref$multiple === void 0 ? false : _ref$multiple,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? InputSize.Md : _ref$size,\n _ref$hideMenuItemsAct = _ref.hideMenuItemsActions,\n hideMenuItemsActions = _ref$hideMenuItemsAct === void 0 ? false : _ref$hideMenuItemsAct,\n onClose = _ref.onClose,\n onChange = _ref.onChange;\n if (! /*#__PURE__*/React.isValidElement(menuItem)) {\n return menuItem;\n }\n if (((_type = menuItem.type) === null || _type === void 0 ? void 0 : _type.displayName) !== 'MenuItem') {\n return /*#__PURE__*/React.cloneElement(menuItem);\n }\n var menuItemValue = menuItem === null || menuItem === void 0 ? void 0 : (_props = menuItem.props) === null || _props === void 0 ? void 0 : _props.value;\n var valueArr = multiple ? Array.isArray(value) ? value : [] : [value];\n var active = valueArr.length > 0 && valueArr.includes(menuItemValue);\n var isDisabledMenuItem = menuItem === null || menuItem === void 0 ? void 0 : (_props2 = menuItem.props) === null || _props2 === void 0 ? void 0 : _props2.disabled;\n return /*#__PURE__*/React.cloneElement(menuItem, {\n active: active,\n size: size,\n children: generateChildren(menuItem === null || menuItem === void 0 ? void 0 : (_props3 = menuItem.props) === null || _props3 === void 0 ? void 0 : _props3.children, active, size, hideMenuItemsActions),\n onClick: function onClick() {\n var _menuItemValue$toStri;\n if (!multiple && typeof onClose === 'function') {\n onClose();\n }\n if (typeof onChange === 'function' && !isDisabledMenuItem && !!(menuItemValue !== null && menuItemValue !== void 0 && (_menuItemValue$toStri = menuItemValue.toString()) !== null && _menuItemValue$toStri !== void 0 && _menuItemValue$toStri.length)) {\n var newValue = menuItemValue;\n if (multiple) {\n newValue = _toConsumableArray(Array.isArray(value) ? value : []);\n var index = newValue.indexOf(menuItemValue);\n if (index > -1) {\n newValue.splice(index, 1);\n } else {\n newValue.push(menuItemValue);\n }\n }\n onChange(newValue);\n }\n }\n });\n};\nvar getOptionValue = function getOptionValue(option) {\n var children = option.props ? option.props.children : option;\n if (Array.isArray(children)) return children.map(function (child) {\n return getOptionValue(child);\n }).join(' ');\n if (_typeof(children) === 'object') return getOptionValue(children.props.children);\n return children;\n};\nvar renderOptionValue = function renderOptionValue(option, showSelectionKey) {\n if (option && option.children) {\n var child = showSelectionKey ? option.value : option.children;\n while (typeof child !== 'string') {\n if (Array.isArray(child)) {\n child = getOptionValue(child[1]);\n } else {\n child = getOptionValue(child);\n }\n }\n return child;\n }\n};\nexport var renderValue = function renderValue(_ref2) {\n var value = _ref2.value,\n _ref2$multiple = _ref2.multiple,\n multiple = _ref2$multiple === void 0 ? false : _ref2$multiple,\n children = _ref2.children,\n _ref2$showSelectionKe = _ref2.showSelectionKey,\n showSelectionKey = _ref2$showSelectionKe === void 0 ? false : _ref2$showSelectionKe;\n var optionsProps = [];\n React.Children.forEach(children, function (child) {\n if ( /*#__PURE__*/React.isValidElement(child)) {\n var _type2 = child === null || child === void 0 ? void 0 : child.type,\n displayName = _type2.displayName;\n if (displayName === 'MenuItem' && Boolean(child.props)) {\n optionsProps.push(_objectSpread({}, child.props));\n }\n }\n });\n var activeOptions = multiple ? optionsProps.filter(function (itemProps) {\n return Array.isArray(value) && value.includes(itemProps.value);\n }) : [optionsProps.find(function (itemProps) {\n return itemProps.value === value;\n })];\n if (activeOptions.length > 0) {\n return activeOptions.map(function (option) {\n return renderOptionValue(option, showSelectionKey);\n }).join(', ');\n }\n return Array.isArray(value) ? value.join(', ') : value;\n};","import _extends from \"@babel/runtime/helpers/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\", \"size\", \"error\", \"multiple\", \"onChange\", \"value\", \"fullWidth\", \"selectProps\", \"MenuProps\", \"readOnly\", \"disabled\", \"scroll\", \"placeholder\", \"showSelectionKey\", \"hideMenuItemsActions\", \"renderLabel\", \"onRequestClose\"];\nimport React, { useState } from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport ArrowTick from '../arrow-tick';\nimport Menu from '../menu';\nimport { propTypes as menuPropTypes } from '../menu/menu.component';\nimport { renderValue, renderOption } from './select.utils';\nimport { InputSize } from '../../utils/types';\nimport Styled from './select.styles';\nimport { Size } from '../menu-item/types';\nvar Select = intrinsicComponent(function (_ref, ref) {\n var _value$toString;\n var children = _ref.children,\n size = _ref.size,\n error = _ref.error,\n multiple = _ref.multiple,\n onChange = _ref.onChange,\n value = _ref.value,\n fullWidth = _ref.fullWidth,\n selectProps = _ref.selectProps,\n MenuProps = _ref.MenuProps,\n readOnly = _ref.readOnly,\n disabled = _ref.disabled,\n _ref$scroll = _ref.scroll,\n scroll = _ref$scroll === void 0 ? true : _ref$scroll,\n placeholder = _ref.placeholder,\n showSelectionKey = _ref.showSelectionKey,\n hideMenuItemsActions = _ref.hideMenuItemsActions,\n renderLabel = _ref.renderLabel,\n onRequestClose = _ref.onRequestClose,\n rest = _objectWithoutProperties(_ref, _excluded);\n var _useState = useState(undefined),\n _useState2 = _slicedToArray(_useState, 2),\n anchorEl = _useState2[0],\n setAnchorEl = _useState2[1];\n var open = Boolean(anchorEl);\n var handleClick = function handleClick(event) {\n return setAnchorEl(event.currentTarget);\n };\n var isValueExists = Array.isArray(value) ? !!value.length : !!(value !== null && value !== void 0 && (_value$toString = value.toString()) !== null && _value$toString !== void 0 && _value$toString.length);\n var handleClose = function handleClose() {\n if (onRequestClose) {\n onRequestClose();\n }\n setAnchorEl(undefined);\n };\n return /*#__PURE__*/React.createElement(Styled.Container, {\n ref: ref,\n fullWidth: Boolean(fullWidth)\n }, /*#__PURE__*/React.createElement(Styled.Select, _extends({}, rest, {\n disabled: disabled,\n size: size,\n error: error,\n fullWidth: Boolean(fullWidth),\n readOnly: readOnly,\n showSelectionKey: showSelectionKey,\n onClick: readOnly || disabled ? undefined : handleClick\n }), isValueExists && /*#__PURE__*/React.createElement(Styled.Label, null, typeof renderLabel === 'function' ? renderLabel(value) : renderValue({\n value: value,\n multiple: multiple,\n children: children,\n showSelectionKey: showSelectionKey\n })), !isValueExists && /*#__PURE__*/React.createElement(Styled.Placeholder, {\n size: size\n }, placeholder), /*#__PURE__*/React.createElement(Styled.Icon, {\n size: size\n }, /*#__PURE__*/React.createElement(ArrowTick, {\n type: open ? 'top' : 'bottom',\n IconProps: {\n size: size === Size.Md ? 11 : 10\n }\n })), /*#__PURE__*/React.createElement(Styled.Input, selectProps)), /*#__PURE__*/React.createElement(Menu, _extends({\n onClose: handleClose,\n scroll: scroll,\n open: open,\n anchorEl: anchorEl\n }, MenuProps), React.Children.map(children, function (child) {\n return renderOption(child, {\n value: value,\n multiple: multiple,\n size: size,\n hideMenuItemsActions: hideMenuItemsActions,\n onClose: handleClose,\n onChange: readOnly || disabled ? undefined : onChange\n });\n })));\n});\nexport var defaultProps = {\n size: InputSize.Md,\n error: false,\n multiple: false,\n fullWidth: false,\n readOnly: false,\n disabled: false,\n scroll: true,\n hideMenuItemsActions: false\n};\nSelect.defaultProps = defaultProps;\nexport var simpleValuePropTypes = PT.oneOfType([PT.string, PT.number, PT.oneOf([null])]);\nexport var propTypes = {\n size: PT.oneOf(objectValues(InputSize)),\n error: PT.bool,\n multiple: PT.bool,\n fullWidth: PT.bool,\n children: PT.oneOfType([PT.element, PT.arrayOf(PT.element)]),\n value: PT.oneOfType([PT.string, PT.number, PT.oneOf([null]), PT.arrayOf(simpleValuePropTypes)]),\n onChange: PT.func,\n MenuProps: PT.exact(menuPropTypes),\n // eslint-disable-next-line react/forbid-prop-types\n selectProps: PT.object,\n readOnly: PT.bool,\n disabled: PT.bool,\n hideMenuItemsActions: PT.bool,\n showSelectionKey: PT.bool,\n scroll: PT.bool,\n renderLabel: PT.func,\n onRequestClose: PT.func\n};\nSelect.propTypes = propTypes;\nexport default Select;","function useDrag(onMove, onStart, onEnd) {\n var onDragging = function onDragging(e) {\n if (typeof onMove === 'function') {\n var _e$touches;\n onMove(((_e$touches = e.touches) === null || _e$touches === void 0 ? void 0 : _e$touches[0]) || e);\n }\n };\n var disableSliding = function disableSliding(e) {\n document.removeEventListener('mousemove', onDragging);\n document.removeEventListener('mouseup', disableSliding);\n document.removeEventListener('mouseleave', disableSliding);\n document.removeEventListener('touchmove', onDragging);\n document.removeEventListener('touchend', disableSliding);\n document.removeEventListener('touchcancel', disableSliding);\n if (typeof onEnd === 'function') {\n var _e$touches2;\n onEnd(((_e$touches2 = e.touches) === null || _e$touches2 === void 0 ? void 0 : _e$touches2[0]) || e);\n }\n };\n var enableDrag = function enableDrag(e) {\n document.addEventListener('mousemove', onDragging);\n document.addEventListener('mouseup', disableSliding);\n document.addEventListener('mouseleave', disableSliding);\n document.addEventListener('touchmove', onDragging);\n document.addEventListener('touchend', disableSliding);\n document.addEventListener('touchcancel', disableSliding);\n if (typeof onStart === 'function') {\n var _e$touches3;\n onStart(((_e$touches3 = e.touches) === null || _e$touches3 === void 0 ? void 0 : _e$touches3[0]) || e);\n }\n };\n return {\n onMouseDown: enableDrag,\n onTouchStart: enableDrag\n };\n}\nexport default useDrag;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { Color as PColor } from '../../utils/types/palette';\nvar baseClassName = 'ColorPicker';\nvar colorItemClassName = 'ColorItem';\n\n// const ColorPicker = styled.div.attrs({\n// className: generateClassNames(baseClassName, 'root'),\n// })`\n// display: flex;\n// flex-direction: column;\n// align-items: center;\n// `;\n\nvar ColorPickerWrapper = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-qj4xo5-0\"\n})([\"background-color:\", \";box-shadow:0px 1px 2px rgba(78,77,77,0.15);border-radius:2px;padding:12px;max-width:300px;\"], function (_ref) {\n var theme = _ref.theme;\n return theme.palette[PColor.BackgroundSecondary];\n});\nvar ColorPickerIcon = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'icon')\n}).withConfig({\n componentId: \"sc-qj4xo5-1\"\n})([\"display:flex;justify-content:space-between;align-items:center;cursor:pointer;\"]);\nvar RangePickerWrapper = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'range-picker')\n}).withConfig({\n componentId: \"sc-qj4xo5-2\"\n})(function (_ref2) {\n var color = _ref2.color;\n return css([\"position:relative;border-radius:2px;width:100%;height:180px;user-select:none;cursor:crosshair;background-color:\", \";\"], color);\n});\nvar WhiteGradient = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'white-gradient')\n}).withConfig({\n componentId: \"sc-qj4xo5-3\"\n})([\"background:linear-gradient(to right,white 0%,rgba(255,255,255,0) 100%);z-index:0;position:absolute;width:100%;height:100%;border-radius:2px;user-select:none;pointer-events:none;top:-1px;\"]);\nvar BlackGradient = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'black-gradient')\n}).withConfig({\n componentId: \"sc-qj4xo5-4\"\n})([\"background:linear-gradient(to bottom,rgba(0,0,0,0) 0%,black 100%);z-index:1;position:absolute;width:100%;height:100%;border-radius:2px;user-select:none;pointer-events:none;\"]);\nvar ColorPointer = /*#__PURE__*/styled.span.attrs(function (_ref3) {\n var _ref3$left = _ref3.left,\n left = _ref3$left === void 0 ? 0 : _ref3$left,\n _ref3$top = _ref3.top,\n top = _ref3$top === void 0 ? 0 : _ref3$top,\n _ref3$considerTopWidt = _ref3.considerTopWidth,\n considerTopWidth = _ref3$considerTopWidt === void 0 ? false : _ref3$considerTopWidt,\n style = _ref3.style;\n return {\n className: generateClassNames(baseClassName, 'pointer'),\n style: _objectSpread({\n left: left - 7,\n // 7\n top: top - (considerTopWidth ? 7 : 0)\n }, style)\n };\n}).withConfig({\n componentId: \"sc-qj4xo5-5\"\n})(function (_ref4) {\n var theme = _ref4.theme,\n pointerColor = _ref4.pointerColor;\n return css([\"display:inline-block;box-sizing:border-box;width:15px;height:15px;border-radius:20px;box-shadow:0px 1px 2px rgba(78,77,77,0.15);border:2px solid \", \";background-color:\", \";position:absolute;cursor:pointer;z-index:11;user-select:none;outline:none;\"], theme.palette[PColor.BackgroundSecondary], pointerColor);\n});\nvar BarWrapper = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'bar-wrapper')\n}).withConfig({\n componentId: \"sc-qj4xo5-6\"\n})([\"margin-top:8px;position:relative;width:100%;height:12px;\"]);\nvar Bar = /*#__PURE__*/styled.table.attrs({\n className: generateClassNames(baseClassName, 'bar')\n}).withConfig({\n componentId: \"sc-qj4xo5-7\"\n})([\"border-radius:4px;width:100%;height:8px;border-collapse:collapse;\"]);\nvar BarColorStop = /*#__PURE__*/styled.td.attrs(function (_ref5) {\n var $color = _ref5.$color;\n return {\n className: generateClassNames(baseClassName, 'stop'),\n style: {\n backgroundColor: $color\n }\n };\n}).withConfig({\n componentId: \"sc-qj4xo5-8\"\n})([\"padding:0;user-select:none;pointer-events:none;&:first-child{width:4px;border-top-left-radius:4px;border-bottom-left-radius:4px;}&:last-child{width:4px;border-top-right-radius:4px;border-bottom-right-radius:4px;}\"]);\nvar ColorPickerAction = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'action')\n}).withConfig({\n componentId: \"sc-qj4xo5-9\"\n})([\"display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:12px;\"]);\nvar ColorItemWrapper = /*#__PURE__*/styled.label.attrs({\n className: generateClassNames(colorItemClassName, 'label')\n}).withConfig({\n componentId: \"sc-qj4xo5-10\"\n})(function (_ref6) {\n var theme = _ref6.theme,\n size = _ref6.size,\n color = _ref6.color,\n stroke = _ref6.stroke,\n value = _ref6.value;\n return css([\"border-radius:2px;border:\", \";box-sizing:border-box;width:\", \"px;height:\", \"px;background-color:\", \";user-select:none;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all 300ms;margin-bottom:8px;background:\", \";input{display:none;}\"], \"1px solid \".concat(stroke), size, size, color, value === 'rgba(0,0,0,0)' && \"repeating-conic-gradient(\".concat(theme.palette[PColor.LinkPrimary], \" 0% 25%, transparent 0% 50%) 50% / 8px 8px\"));\n});\nvar ColorItemsContainer = /*#__PURE__*/styled.div.withConfig({\n componentId: \"sc-qj4xo5-11\"\n})([\"display:flex;flex-wrap:wrap;align-content:space-between;margin-top:14px;margin-left:12px;& > .item{margin-right:8px;display:flex;justify-content:center;}\"]);\nvar Select = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'select')\n}).withConfig({\n componentId: \"sc-qj4xo5-12\"\n})(function (_ref7) {\n var value = _ref7.value;\n return css([\"width:\", \";\"], value === 'rgb' ? '25%' : '35%');\n});\nvar Styled = applyDisplayNames({\n ColorPickerWrapper: ColorPickerWrapper,\n RangePickerWrapper: RangePickerWrapper,\n WhiteGradient: WhiteGradient,\n BlackGradient: BlackGradient,\n ColorPointer: ColorPointer,\n BarWrapper: BarWrapper,\n Bar: Bar,\n BarColorStop: BarColorStop,\n ColorPickerAction: ColorPickerAction,\n ColorPickerIcon: ColorPickerIcon,\n ColorItemsContainer: ColorItemsContainer,\n ColorItemWrapper: ColorItemWrapper,\n Select: Select\n});\nexport default Styled;","import React, { useMemo } from 'react';\nimport PT from 'prop-types';\nimport Tick from '@scaleflex/icons/tick';\nimport { intrinsicComponent } from '../../utils/functions';\nimport Styled from './color-picker.styles';\nvar ColorItem = intrinsicComponent(function (_ref, ref) {\n var value = _ref.value,\n onChange = _ref.onChange,\n checked = _ref.checked,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? 24 : _ref$size;\n var checkIconColor = useMemo(function () {\n if (value === '#ffffff' || value === 'rgba(0,0,0,0)') {\n return 'black';\n }\n return 'white';\n }, [value]);\n return /*#__PURE__*/React.createElement(Styled.ColorItemWrapper, {\n ref: ref,\n color: value,\n size: size,\n stroke: value === 'rgba(0,0,0,0)' ? '#a8a8a8' : '#E9EEF2',\n value: value\n }, /*#__PURE__*/React.createElement(\"input\", {\n type: \"radio\",\n value: value,\n checked: checked,\n onChange: onChange\n }), checked && /*#__PURE__*/React.createElement(Tick, {\n color: checkIconColor\n }));\n});\nColorItem.defaultProps = {};\nColorItem.propTypes = {\n value: PT.string.isRequired,\n checked: PT.bool,\n onChange: PT.func.isRequired,\n size: PT.number\n};\nexport default ColorItem;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _toConsumableArray from \"@babel/runtime/helpers/toConsumableArray\";\nimport _slicedToArray from \"@babel/runtime/helpers/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"defaultColor\", \"onChange\", \"pinnedColors\", \"showTransparentColor\", \"containerProps\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport React, { useState, useMemo, useEffect } from 'react';\nimport PT from 'prop-types';\nimport { PinOutline, DeleteOutline } from '@scaleflex/icons';\nimport Select from '../select';\nimport MenuItem from '../menu-item';\nimport Input from '../input';\nimport useDrag from '../../hooks/use-drag';\nimport { intrinsicComponent, colorToHsl, hexToRgb, hslToHex, hslToHsv, hsvToHsl, restrictNumber, mapNumber, colorToHex, getElemDocumentCoords, rgbToHex, validateHex, rgbStringToArray } from '../../utils/functions';\nimport Styled from './color-picker.styles';\nimport ColorItem from './color-item.component';\nvar transparentColor = ['rgba(0,0,0,0)'];\nvar transparentColorHex = '#00000000';\nvar colorsHuesCount = 360;\nvar ColorPicker = intrinsicComponent(function (_ref, ref) {\n var _ref$defaultColor = _ref.defaultColor,\n defaultColor = _ref$defaultColor === void 0 ? '#000000' : _ref$defaultColor,\n onChange = _ref.onChange,\n _ref$pinnedColors = _ref.pinnedColors,\n pinnedColors = _ref$pinnedColors === void 0 ? [] : _ref$pinnedColors,\n _ref$showTransparentC = _ref.showTransparentColor,\n showTransparentColor = _ref$showTransparentC === void 0 ? false : _ref$showTransparentC,\n containerProps = _ref.containerProps,\n rest = _objectWithoutProperties(_ref, _excluded);\n var showedColors = showTransparentColor ? transparentColor.concat(pinnedColors) : pinnedColors;\n var isTransparentColor = function isTransparentColor(color) {\n return color === transparentColorHex || color === transparentColor[0];\n };\n var _useState = useState({\n color: '#ff0000',\n pointerLeft: 0\n }),\n _useState2 = _slicedToArray(_useState, 2),\n bar = _useState2[0],\n setBar = _useState2[1];\n var _useState3 = useState({\n color: isTransparentColor(defaultColor) ? '#00000000' : colorToHex(defaultColor) || '#000000',\n pointer: {\n left: 0,\n top: 0\n }\n }),\n _useState4 = _slicedToArray(_useState3, 2),\n rangePicker = _useState4[0],\n setRangePicker = _useState4[1];\n var _useState5 = useState(showedColors),\n _useState6 = _slicedToArray(_useState5, 2),\n localPinnedColors = _useState6[0],\n setLocalPinnedColors = _useState6[1];\n var _useState7 = useState('hex'),\n _useState8 = _slicedToArray(_useState7, 2),\n inputType = _useState8[0],\n setInputType = _useState8[1];\n var _useState9 = useState([]),\n _useState10 = _slicedToArray(_useState9, 2),\n rgbColorValue = _useState10[0],\n setRgbColorValue = _useState10[1];\n var _useState11 = useState(colorToHex(rangePicker.color)),\n _useState12 = _slicedToArray(_useState11, 2),\n hexInputValue = _useState12[0],\n setHexInputValue = _useState12[1];\n var _useState13 = useState(null),\n _useState14 = _slicedToArray(_useState13, 2),\n barRef = _useState14[0],\n setBarRef = _useState14[1];\n var _useState15 = useState(null),\n _useState16 = _slicedToArray(_useState15, 2),\n rangePickerRef = _useState16[0],\n setRangePickerRef = _useState16[1];\n var isColorChecked = function isColorChecked(checkedColor) {\n if (checkedColor === transparentColor[0] && rangePicker.color === transparentColorHex) {\n return true;\n }\n return checkedColor === rangePicker.color;\n };\n var filterTransparentColor = function filterTransparentColor(colors) {\n return colors.filter(function (item) {\n return item !== 'rgba(0,0,0,0)';\n });\n };\n var getRgbColor = function getRgbColor(color) {\n return isTransparentColor(color) ? transparentColor[0] : \"rgb(\".concat(hexToRgb(color).join(', '), \")\");\n };\n var handlePinnedColors = function handlePinnedColors(hexColor, type) {\n if (type === 'add') {\n var newLocalPinnedColors = [].concat(_toConsumableArray(localPinnedColors), [hexColor]);\n setLocalPinnedColors(newLocalPinnedColors);\n if (typeof onChange === 'function') {\n onChange(rangePicker.color, getRgbColor(hexColor), filterTransparentColor(newLocalPinnedColors));\n }\n } else {\n var _newLocalPinnedColors = localPinnedColors.filter(function (item) {\n return item !== rangePicker.color;\n });\n setLocalPinnedColors(_newLocalPinnedColors);\n if (typeof onChange === 'function') {\n onChange(rangePicker.color, getRgbColor(hexColor), filterTransparentColor(_newLocalPinnedColors));\n }\n }\n };\n var changeBarPosByColor = function changeBarPosByColor(color) {\n if (barRef !== null) {\n var _ref2 = getElemDocumentCoords(barRef),\n left = _ref2.left;\n var _colorToHsl = colorToHsl(color || rangePicker.color),\n _colorToHsl2 = _slicedToArray(_colorToHsl, 1),\n h = _colorToHsl2[0];\n var targetColorElem = barRef.querySelector(\"[data-hue='\".concat(h, \"']\"));\n if (targetColorElem !== null) {\n var targetColorRgb = targetColorElem.style.backgroundColor || bar.color;\n setBar({\n color: targetColorRgb,\n pointerLeft: getElemDocumentCoords(targetColorElem).left - left || bar.pointerLeft\n });\n }\n }\n };\n var handleRgbInput = function handleRgbInput(value, index) {\n if (value > 255 || Number.isNaN(value)) {\n return;\n }\n var rgbArr = rgbColorValue;\n rgbArr[index] = value;\n var newHexColor = rgbToHex.apply(void 0, _toConsumableArray(rgbArr));\n setRgbColorValue(_toConsumableArray(rgbArr));\n if (validateHex(newHexColor)) {\n setRangePicker(_objectSpread(_objectSpread({}, rangePicker), {}, {\n color: newHexColor\n }));\n changeBarPosByColor(newHexColor);\n }\n };\n var updateRgb = function updateRgb(color) {\n if (color.includes('rgb')) {\n setRgbColorValue(rgbStringToArray(color));\n } else {\n setRgbColorValue(hexToRgb(color));\n }\n };\n var getHexColor = function getHexColor(color) {\n return isTransparentColor(color) ? transparentColorHex : color;\n };\n var changeRangePickerPointerPosByColor = function changeRangePickerPointerPosByColor(color) {\n if (rangePickerRef !== null) {\n var _ref3 = getElemDocumentCoords(rangePickerRef),\n width = _ref3.width,\n height = _ref3.height;\n var colorHsl = colorToHsl(color);\n var colorHsv = hslToHsv(colorHsl[0], colorHsl[1] / 100, colorHsl[2] / 100);\n var left = mapNumber(colorHsv[1], 0, 100, 0, width);\n var top = height - mapNumber(colorHsv[2], 0, 100, 0, height);\n setRangePicker({\n color: getHexColor(color),\n pointer: {\n left: left,\n top: top\n }\n });\n changeBarPosByColor(color);\n updateRgb(color);\n if (typeof onChange === 'function') {\n onChange(getHexColor(color), getRgbColor(color), filterTransparentColor(localPinnedColors));\n }\n }\n };\n var changeRangePickerColorByPosition = function changeRangePickerColorByPosition(left, top, barColor) {\n if (rangePickerRef !== null) {\n var _ref4 = getElemDocumentCoords(rangePickerRef),\n width = _ref4.width,\n height = _ref4.height;\n var _colorToHsl3 = colorToHsl(barColor),\n _colorToHsl4 = _slicedToArray(_colorToHsl3, 1),\n barColorHue = _colorToHsl4[0];\n var restrictedLeft = restrictNumber(left, 0, width) || 0;\n var restrictedTop = restrictNumber(top, 0, height) || 0;\n var hsl = hsvToHsl(barColorHue, restrictedLeft / width, (height - restrictedTop) / height);\n var hexColor = hslToHex(hsl[0], hsl[1], hsl[2]);\n setRangePicker({\n color: hexColor,\n pointer: {\n left: restrictedLeft,\n top: restrictedTop\n }\n });\n if (typeof onChange === 'function') {\n onChange(hexColor, \"rgb(\".concat(hexToRgb(hexColor).join(', '), \")\"), filterTransparentColor(localPinnedColors));\n }\n }\n };\n var changeBarColorByPosition = function changeBarColorByPosition(pointerLeft) {\n var barElem = barRef;\n if (barElem !== null) {\n var _ref5 = getElemDocumentCoords(barElem),\n width = _ref5.width;\n var mappedPointerLeft = restrictNumber(Math.round(mapNumber(pointerLeft, 0, width, 0, colorsHuesCount)), 0, colorsHuesCount);\n var targetColorElem = barElem.querySelector(\"[data-hue='\".concat(mappedPointerLeft, \"']\"));\n var targetColorRgb = targetColorElem.style.backgroundColor;\n setBar({\n color: targetColorRgb,\n pointerLeft: restrictNumber(pointerLeft, 0, width)\n });\n return targetColorRgb;\n }\n return bar.color;\n };\n var updateBarColor = function updateBarColor(e) {\n var barElem = barRef;\n if (barElem !== null) {\n var _e$touches;\n var _ref6 = getElemDocumentCoords(barElem),\n left = _ref6.left;\n var pointerEvent = ((_e$touches = e.touches) === null || _e$touches === void 0 ? void 0 : _e$touches[0]) || e;\n var barColor = changeBarColorByPosition(pointerEvent.pageX - left);\n changeRangePickerColorByPosition(rangePicker.pointer.left, rangePicker.pointer.top, barColor);\n }\n };\n var updateRangePickerColor = function updateRangePickerColor(e) {\n var rangePickerElem = rangePickerRef;\n if (rangePickerElem !== null) {\n var _ref7 = getElemDocumentCoords(rangePickerElem),\n left = _ref7.left,\n top = _ref7.top,\n height = _ref7.height,\n width = _ref7.width;\n var pointerLeft = e ? restrictNumber(e.pageX - left, 0, width) : rangePicker.pointer.left || 0;\n var pointerTop = e ? restrictNumber(e.pageY - top, 0, height) : rangePicker.pointer.left || 0;\n changeRangePickerColorByPosition(pointerLeft, pointerTop, bar.color);\n }\n };\n var moveBarPointerByArrows = function moveBarPointerByArrows(e) {\n if (e.key !== 'ArrowLeft' && e.key !== 'ArrowRight') {\n return;\n }\n changeBarColorByPosition(bar.pointerLeft + (e.key === 'ArrowLeft' ? -1 : 1));\n };\n var moveRangePickerPointerByArrows = function moveRangePickerPointerByArrows(e) {\n var currentDirection = 0;\n if (e.key === 'ArrowLeft' || e.key === 'ArrowUp') {\n currentDirection = -1;\n } else if (e.key === 'ArrowRight' || e.key === 'ArrowDown') {\n currentDirection = 1;\n }\n if (currentDirection) {\n changeRangePickerColorByPosition((rangePicker.pointer.left || 0) + (['ArrowLeft', 'ArrowRight'].includes(e.key) ? currentDirection : 0), (rangePicker.pointer.top || 0) + (['ArrowUp', 'ArrowDown'].includes(e.key) ? currentDirection : 0), bar.color);\n }\n };\n var validateHexAndUpdate = function validateHexAndUpdate(color) {\n var testHex = validateHex(color);\n if (testHex) {\n changeRangePickerPointerPosByColor(color);\n }\n setHexInputValue(color);\n };\n useEffect(function () {\n changeBarPosByColor(rangePicker.color);\n changeRangePickerPointerPosByColor(rangePicker.color);\n }, [barRef]);\n useEffect(function () {\n setHexInputValue(rangePicker.color);\n updateRgb(rangePicker.color);\n }, [rangePicker.color]);\n var barColors = useMemo(function () {\n return _toConsumableArray(new Array(colorsHuesCount + 1)).map(function (_, h) {\n return /*#__PURE__*/React.createElement(Styled.BarColorStop, {\n key: h,\n $color: \"hsl(\".concat(h, \", 100%, 50%)\"),\n \"data-hue\": h\n });\n });\n }, []);\n var barPointSliding = useDrag(updateBarColor, updateBarColor, null);\n var rangePickerPointSliding = useDrag(updateRangePickerColor, updateRangePickerColor, null);\n return /*#__PURE__*/React.createElement(Styled.ColorPickerWrapper, _extends({\n ref: ref\n }, rest), /*#__PURE__*/React.createElement(Styled.ColorPickerAction, null, /*#__PURE__*/React.createElement(Styled.Select, {\n value: inputType\n }, /*#__PURE__*/React.createElement(Select, {\n size: \"sm\",\n value: inputType,\n MenuProps: _objectSpread({\n zIndex: 11112\n }, containerProps),\n onChange: function onChange(ev) {\n return setInputType(ev);\n },\n fullWidth: true\n }, /*#__PURE__*/React.createElement(MenuItem, {\n value: \"hex\"\n }, \"Hex\"), /*#__PURE__*/React.createElement(MenuItem, {\n value: \"rgb\"\n }, \"RGB\"))), inputType === 'hex' ? /*#__PURE__*/React.createElement(Input, {\n size: \"sm\",\n error: !/^#([\\da-f]{3}){1,2}$/i.test(rangePicker.color),\n value: hexInputValue,\n onChange: function onChange(e) {\n return validateHexAndUpdate(e.target.value);\n },\n style: {\n width: '45%'\n }\n }) : rgbColorValue.map(function (rgb, index) {\n return /*#__PURE__*/React.createElement(Input, {\n key: index,\n size: \"sm\",\n value: rgb,\n onChange: function onChange(e) {\n var _e$target;\n return handleRgbInput(Number((_e$target = e.target) === null || _e$target === void 0 ? void 0 : _e$target.value), index);\n },\n style: {\n width: '20%'\n }\n });\n }), rangePicker.color !== transparentColorHex && /*#__PURE__*/React.createElement(Styled.ColorPickerIcon, {\n onClick: function onClick() {\n return localPinnedColors.some(function (checkedColor) {\n return isColorChecked(checkedColor);\n }) ? handlePinnedColors(rangePicker.color, 'delete') : handlePinnedColors(rangePicker.color, 'add');\n }\n }, localPinnedColors.some(function (checkedColor) {\n return isColorChecked(checkedColor);\n }) ? /*#__PURE__*/React.createElement(DeleteOutline, null) : /*#__PURE__*/React.createElement(PinOutline, null))), /*#__PURE__*/React.createElement(Styled.RangePickerWrapper, _extends({\n ref: setRangePickerRef,\n color: bar.color\n }, rangePickerPointSliding), /*#__PURE__*/React.createElement(Styled.WhiteGradient, null), /*#__PURE__*/React.createElement(Styled.BlackGradient, null), /*#__PURE__*/React.createElement(Styled.ColorPointer, {\n tabIndex: -1,\n left: rangePicker.pointer.left || 0,\n top: rangePicker.pointer.top || 0,\n onKeyDown: moveRangePickerPointerByArrows,\n pointerColor: hexInputValue,\n considerTopWidth: true\n })), /*#__PURE__*/React.createElement(Styled.BarWrapper, barPointSliding, /*#__PURE__*/React.createElement(Styled.Bar, {\n ref: setBarRef\n }, /*#__PURE__*/React.createElement(\"tbody\", null, /*#__PURE__*/React.createElement(\"tr\", null, barColors))), /*#__PURE__*/React.createElement(Styled.ColorPointer, {\n tabIndex: -1,\n left: bar.pointerLeft,\n onKeyDown: moveBarPointerByArrows,\n considerTopWidth: false,\n pointerColor: hexInputValue,\n style: {\n top: -3\n }\n })), /*#__PURE__*/React.createElement(Styled.ColorItemsContainer, null, localPinnedColors.map(function (color) {\n return /*#__PURE__*/React.createElement(\"div\", {\n className: \"item\",\n key: color\n }, /*#__PURE__*/React.createElement(ColorItem, {\n value: color,\n checked: isColorChecked(color),\n onChange: function onChange(ev) {\n return changeRangePickerPointerPosByColor(ev.target.value);\n }\n }));\n })));\n});\nColorPicker.defaultProps = {\n defaultColor: '#000000',\n pinnedColors: [],\n showTransparentColor: false\n};\nColorPicker.propTypes = {\n defaultColor: PT.string,\n onChange: PT.func,\n pinnedColors: PT.array,\n showTransparentColor: PT.bool\n};\nexport default ColorPicker;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _colorButtonMixin, _squarePaddingMixin;\nimport { css } from 'styled-components';\nimport { Color as PaletteColor } from '../../utils/types/palette';\nimport { ButtonSize, IconButtonColor } from '../../utils/types';\nexport var colorButtonMixin = (_colorButtonMixin = {}, _defineProperty(_colorButtonMixin, IconButtonColor.Primary, function (_ref) {\n var palette = _ref.theme.palette,\n active = _ref.active;\n return css([\"background-color:\", \";color:\", \";&:hover{background-color:\", \";}&:focus{background-color:\", \";}&:active{background-color:\", \";}\", \" &:disabled{color:\", \";background:\", \";cursor:default;}\"], palette[PaletteColor.AccentStateless], palette[PaletteColor.IconsInvert], palette[PaletteColor.AccentPrimaryHover], palette[PaletteColor.AccentPrimaryActive], palette[PaletteColor.AccentPrimaryActive], active && css([\"background-color:\", \";&:hover,&:focus{background-color:\", \";}\"], palette[PaletteColor.AccentPrimaryActive], palette[PaletteColor.AccentPrimaryActive]), palette[PaletteColor.BordersDisabled], palette[PaletteColor.Accent_1_2_Opacity]);\n}), _defineProperty(_colorButtonMixin, IconButtonColor.Secondary, function (_ref2) {\n var palette = _ref2.theme.palette,\n active = _ref2.active;\n return css([\"background-color:\", \";color:\", \";border:1px solid \", \";&:hover{color:\", \";background-color:\", \";}&:focus{background-color:\", \";color:\", \";border:1px solid \", \";}&:active{color:\", \";background-color:\", \";}\", \" &:disabled{color:\", \";background:\", \";border:none;cursor:default;}\"], palette[PaletteColor.BackgroundStateless], palette[PaletteColor.AccentStateless], palette[PaletteColor.AccentStateless], palette[PaletteColor.IconsInvert], palette[PaletteColor.AccentPrimaryHover], palette[PaletteColor.Accent_1_2_Opacity], palette[PaletteColor.AccentPrimaryActive], palette[PaletteColor.AccentPrimaryActive], palette[PaletteColor.IconsInvert], palette[PaletteColor.AccentPrimaryActive], active && css([\"color:\", \";background-color:\", \";&:hover,&:focus{color:\", \";background-color:\", \";}\"], palette[PaletteColor.IconsInvert], palette[PaletteColor.AccentPrimaryActive], palette[PaletteColor.IconsInvert], palette[PaletteColor.AccentPrimaryActive]), palette[PaletteColor.BordersDisabled], palette[PaletteColor.Accent_1_2_Opacity]);\n}), _defineProperty(_colorButtonMixin, IconButtonColor.Basic, function (_ref3) {\n var palette = _ref3.theme.palette,\n active = _ref3.active;\n return css([\"background-color:transparent;color:\", \";border:none;&:hover{background-color:\", \";color:\", \";}&:focus{background-color:\", \";color:\", \";}&:active{background-color:\", \";color:\", \";}\", \" &:disabled{background-color:transparent;color:\", \";cursor:default;}\"], palette[PaletteColor.IconsPrimary], palette[PaletteColor.BackgroundHover], palette[PaletteColor.IconsPrimaryHover], palette[PaletteColor.BackgroundActive], palette[PaletteColor.LinkActive], palette[PaletteColor.BackgroundActive], palette[PaletteColor.LinkActive], active && css([\"background-color:\", \";color:\", \";&:hover,&:focus{background-color:\", \";color:\", \";}\"], palette[PaletteColor.BackgroundActive], palette[PaletteColor.LinkActive], palette[PaletteColor.BackgroundActive], palette[PaletteColor.LinkActive]), palette[PaletteColor.BordersDisabled]);\n}), _colorButtonMixin);\nexport var squarePaddingMixin = (_squarePaddingMixin = {}, _defineProperty(_squarePaddingMixin, ButtonSize.Xs, css([\"padding:6px;\"])), _defineProperty(_squarePaddingMixin, ButtonSize.Sm, css([\"padding:9px;\"])), _defineProperty(_squarePaddingMixin, ButtonSize.Md, css([\"padding:12px;\"])), _defineProperty(_squarePaddingMixin, ButtonSize.Lg, css([\"padding:11px;\"])), _squarePaddingMixin);","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport ButtonStyled from '../button/button.styles';\nimport { colorButtonMixin, squarePaddingMixin } from './icon-button.mixin';\nimport { ButtonSize, IconButtonColor } from '../../utils/types';\nvar baseClassName = 'IconButton';\nvar IconButton = /*#__PURE__*/styled(ButtonStyled.Button).attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-10edh45-0\"\n})(function (_ref) {\n var _ref$color = _ref.color,\n color = _ref$color === void 0 ? IconButtonColor.Secondary : _ref$color,\n _ref$size = _ref.size,\n size = _ref$size === void 0 ? ButtonSize.Md : _ref$size;\n return css([\"\", \" \", \"\"], squarePaddingMixin[size], colorButtonMixin[color]);\n});\nvar Styled = applyDisplayNames({\n IconButton: IconButton\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\"];\nimport React from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport { getIconSize } from '../button/button.utils';\nimport { ButtonSize, IconButtonColor } from '../../utils/types';\nimport Styled from './icon-button.styles';\nvar IconButton = intrinsicComponent(function (_ref, ref) {\n var children = _ref.children,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Styled.IconButton, _extends({}, rest, {\n ref: ref\n }), children && (typeof children === 'function' ? children({\n size: getIconSize(rest.size)\n }) : children));\n});\nIconButton.defaultProps = {\n size: ButtonSize.Md,\n color: IconButtonColor.Secondary,\n active: false\n};\nIconButton.propTypes = {\n children: PT.oneOfType([PT.node, PT.func]).isRequired,\n size: PT.oneOf(objectValues(ButtonSize)),\n color: PT.oneOf(objectValues(IconButtonColor)),\n disabled: PT.bool,\n active: PT.bool\n};\nexport default IconButton;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _sizeTextAreaMixin;\nimport { css } from 'styled-components';\nimport { InputSize } from '../../utils/types';\nimport { Color as PaletteColor } from '../../utils/types/palette';\nimport { FontVariant as FV } from '../../utils/types/typography';\nexport var errorMixin = function errorMixin(_ref) {\n var palette = _ref.theme.palette;\n return css([\"background:\", \" !important;border:1px solid \", \" !important;\"], palette[PaletteColor.BackgroundSecondary], palette[PaletteColor.Error]);\n};\nexport var sizeTextAreaMixin = (_sizeTextAreaMixin = {}, _defineProperty(_sizeTextAreaMixin, InputSize.Sm, function (_ref2) {\n var font = _ref2.theme.typography.font;\n return css([\"padding:6px 12px;height:64px;\", \"\"], font[FV.InputMd]);\n}), _defineProperty(_sizeTextAreaMixin, InputSize.Md, function (_ref3) {\n var font = _ref3.theme.typography.font;\n return css([\"padding:9px 16px;height:80px;\", \"\"], font[FV.InputLg]);\n}), _sizeTextAreaMixin);","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { InputSize } from '../../utils/types';\nimport { Color as PColor } from '../../utils/types/palette';\nimport { BorderRadiusSize as BRSize } from '../../utils/types/shape';\nimport { errorMixin, sizeTextAreaMixin } from './textarea.mixin';\nimport { getInputBackgroundColor, getInputTextColor, getInputBorderColor } from '../input/input.utils';\nvar baseClassName = 'Textarea';\nvar Textarea = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-1usif6k-0\"\n})(function (_ref) {\n var _ref$size = _ref.size,\n size = _ref$size === void 0 ? InputSize.Md : _ref$size,\n _ref$error = _ref.error,\n error = _ref$error === void 0 ? false : _ref$error,\n _ref$fullWidth = _ref.fullWidth,\n fullWidth = _ref$fullWidth === void 0 ? false : _ref$fullWidth,\n _ref$readOnly = _ref.readOnly,\n readOnly = _ref$readOnly === void 0 ? false : _ref$readOnly,\n _ref$disabled = _ref.disabled,\n disabled = _ref$disabled === void 0 ? false : _ref$disabled,\n _ref$autoSize = _ref.autoSize,\n autoSize = _ref$autoSize === void 0 ? false : _ref$autoSize,\n theme = _ref.theme;\n return css([\"position:relative;display:inline-flex;flex-direction:column;align-items:flex-end;justify-content:space-between;cursor:text;box-sizing:border-box;transition:all 100ms ease-out;width:\", \";pointer-events:\", \";background-color:\", \";border-radius:\", \";border:1px solid \", \";color:\", \";\", \" \", \" &:hover{color:\", \";}\", \" \", \"\"], fullWidth ? '100%' : '300px', disabled ? 'none' : 'auto', getInputBackgroundColor(readOnly, disabled), theme.shape.borderRadius[BRSize.Md], getInputBorderColor(readOnly, disabled), disabled ? theme.palette[PColor.TextPlaceholder] : theme.palette[PColor.TextPrimary], sizeTextAreaMixin[size], !readOnly && !disabled && css([\"&:focus-within{background-color:\", \"!important;border:1px solid \", \";&:hover{border:1px solid \", \";}}&:hover{background-color:\", \";border:1px solid \", \";}\"], theme.palette[PColor.BackgroundSecondary], theme.palette[PColor.AccentStateless], theme.palette[PColor.AccentStateless], theme.palette[PColor.BackgroundStateless], theme.palette[PColor.BordersPrimaryHover]), getInputTextColor(readOnly, disabled), error && errorMixin, autoSize && css([\"width:auto;height:auto;\"]));\n});\nvar Base = /*#__PURE__*/styled.textarea.attrs({\n className: generateClassNames(baseClassName, 'Base')\n}).withConfig({\n componentId: \"sc-1usif6k-1\"\n})(function (_ref2) {\n var palette = _ref2.theme.palette;\n return css([\"display:block;width:100%;height:100%;color:inherit;outline:none;resize:none;min-width:0;margin:0;padding:0;border:0;background-color:transparent;outline:none;font-size:inherit;line-height:inherit;color:inherit;font-weight:inherit;font-family:inherit;&::placeholder{color:\", \";}\"], palette[PColor.TextPlaceholder]);\n});\nvar CopyIcon = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'CopyIcon')\n}).withConfig({\n componentId: \"sc-1usif6k-2\"\n})(function (_ref3) {\n var palette = _ref3.theme.palette;\n return css([\"display:flex;color:\", \";cursor:pointer;\"], palette[PColor.IconsPrimary]);\n});\nvar Styled = applyDisplayNames({\n Textarea: Textarea,\n CopyIcon: CopyIcon,\n Base: Base\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"fullWidth\", \"size\", \"value\", \"readOnly\", \"disabled\", \"error\", \"cols\", \"rows\", \"copyTextMessage\", \"copySuccessIcon\"];\nimport React, { useState, useEffect } from 'react';\nimport PT from 'prop-types';\nimport CopyOutline from '@scaleflex/icons/copy-outline';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport { InputSize } from '../../utils/types';\nimport { handleCopyIcon } from '../input/input.utils';\nimport InputStyled from '../input/input.styles';\nimport Styled from './textarea.styles';\nimport { Size } from '../menu-item/types';\nvar Textarea = intrinsicComponent(function (_ref, ref) {\n var fullWidth = _ref.fullWidth,\n size = _ref.size,\n value = _ref.value,\n readOnly = _ref.readOnly,\n disabled = _ref.disabled,\n error = _ref.error,\n cols = _ref.cols,\n rows = _ref.rows,\n _ref$copyTextMessage = _ref.copyTextMessage,\n copyTextMessage = _ref$copyTextMessage === void 0 ? '' : _ref$copyTextMessage,\n copySuccessIcon = _ref.copySuccessIcon,\n rest = _objectWithoutProperties(_ref, _excluded);\n var _useState = useState(false),\n _useState2 = _slicedToArray(_useState, 2),\n isHovering = _useState2[0],\n setIsHovering = _useState2[1];\n var _useState3 = useState(false),\n _useState4 = _slicedToArray(_useState3, 2),\n showCopyMessage = _useState4[0],\n setShowCopyMessage = _useState4[1];\n useEffect(function () {\n setTimeout(function () {\n return setShowCopyMessage(false);\n }, 2000);\n }, [showCopyMessage]);\n var handleEntering = function handleEntering() {\n setTimeout(function () {\n setIsHovering(true);\n }, 150);\n };\n var handleLeaving = function handleLeaving() {\n setTimeout(function () {\n setIsHovering(false);\n }, 200);\n };\n var renderCopyText = function renderCopyText() {\n return /*#__PURE__*/React.createElement(InputStyled.NotificationBox, {\n size: size,\n style: {\n bottom: size === Size.Md ? 83 : 68\n }\n }, /*#__PURE__*/React.createElement(InputStyled.NotificationIcon, null, copySuccessIcon), /*#__PURE__*/React.createElement(InputStyled.NotificationText, null, copyTextMessage));\n };\n return /*#__PURE__*/React.createElement(Styled.Textarea, {\n size: size,\n value: value,\n onMouseEnter: handleEntering,\n onMouseLeave: handleLeaving,\n readOnly: readOnly,\n disabled: disabled,\n fullWidth: Boolean(fullWidth),\n error: error,\n autoSize: Boolean(cols) || Boolean(rows)\n }, /*#__PURE__*/React.createElement(Styled.Base, _extends({}, rest, {\n value: value,\n ref: ref,\n readOnly: readOnly,\n disabled: disabled\n })), isHovering && readOnly ? /*#__PURE__*/React.createElement(Styled.CopyIcon, {\n onClick: function onClick() {\n return handleCopyIcon(value, setShowCopyMessage);\n }\n }, /*#__PURE__*/React.createElement(CopyOutline, {\n size: 16\n })) : undefined, showCopyMessage && renderCopyText());\n});\nTextarea.defaultProps = {\n size: InputSize.Md,\n error: false,\n fullWidth: false,\n readOnly: false,\n disabled: false\n};\nexport var propTypes = {\n error: PT.bool,\n readOnly: PT.bool,\n disabled: PT.bool,\n fullWidth: PT.bool,\n value: PT.any,\n size: PT.oneOf(objectValues(InputSize)),\n copySuccessIcon: PT.oneOfType([PT.node, PT.func]),\n copyTextMessage: PT.string,\n cols: PT.number,\n rows: PT.number\n};\nTextarea.propTypes = propTypes;\nexport default Textarea;","export var Type = {\n Input: 'input',\n Textarea: 'textarea'\n};","import styled from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport StyledLabel from '../label/label.styles';\nimport StyledFormHint from '../form-hint/form-hint.styles';\nvar baseClassName = 'InputGroup';\nvar InputGroup = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-zhtjwh-0\"\n})([\"\", \"{margin-top:4px;}\", \"{margin-bottom:4px;}\"], StyledFormHint.FormHint, StyledLabel.Label);\nvar Styled = applyDisplayNames({\n InputGroup: InputGroup\n});\nexport default Styled;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _typeof from \"@babel/runtime/helpers/typeof\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\", \"type\", \"error\", \"label\", \"hint\", \"LabelProps\", \"InputProps\", \"inputProps\", \"inputRef\", \"TextareaProps\", \"readOnly\", \"disabled\", \"size\", \"value\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport React from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport Label from '../label';\nimport { propTypes as labelPropTypes } from '../label/label.component';\nimport Input from '../input';\nimport { propTypes as inputPropTypes } from '../input/input.component';\nimport { InputSize } from '../../utils/types';\nimport Textarea from '../textarea';\nimport { propTypes as textareaPropTypes } from '../textarea/textarea.component';\nimport FormHint from '../form-hint';\nimport { Type } from './types';\nimport Styled from './input-group.styles';\nvar InputGroup = intrinsicComponent(function (_ref, ref) {\n var children = _ref.children,\n type = _ref.type,\n error = _ref.error,\n label = _ref.label,\n hint = _ref.hint,\n LabelPropsData = _ref.LabelProps,\n InputPropsData = _ref.InputProps,\n inputProps = _ref.inputProps,\n inputRef = _ref.inputRef,\n TextareaPropsData = _ref.TextareaProps,\n readOnly = _ref.readOnly,\n disabled = _ref.disabled,\n size = _ref.size,\n value = _ref.value,\n rest = _objectWithoutProperties(_ref, _excluded);\n var renderLabel = function renderLabel() {\n if (label) {\n if (typeof label === 'function') {\n return label({\n error: error\n });\n }\n if (_typeof(label) === 'object') {\n return label;\n }\n return /*#__PURE__*/React.createElement(Label, _extends({\n size: size,\n error: error,\n disabled: disabled\n }, LabelPropsData || {}), label);\n }\n return null;\n };\n var renderField = function renderField() {\n var fieldProps = _objectSpread({\n value: value,\n readOnly: readOnly,\n disabled: disabled,\n size: size,\n error: error\n }, rest);\n if (type === Type.Input) {\n return /*#__PURE__*/React.createElement(Input, _extends({}, fieldProps, InputPropsData || {}, inputProps, {\n ref: (inputRef === null || inputRef === void 0 ? void 0 : inputRef.ref) || inputRef,\n readOnly: readOnly,\n disabled: disabled\n }));\n }\n if (type === Type.Textarea) {\n return /*#__PURE__*/React.createElement(Textarea, _extends({}, fieldProps, TextareaPropsData || {}));\n }\n return null;\n };\n var renderHint = function renderHint() {\n if (hint) {\n if (typeof hint === 'function') {\n return hint({\n error: error\n });\n }\n if (_typeof(hint) === 'object') {\n return hint;\n }\n return /*#__PURE__*/React.createElement(FormHint, {\n size: size,\n error: error,\n disabled: disabled\n }, hint);\n }\n return null;\n };\n return /*#__PURE__*/React.createElement(Styled.InputGroup, {\n ref: ref\n }, renderLabel(), renderField(), renderHint());\n});\nInputGroup.defaultProps = {\n type: Type.Input,\n error: false,\n readOnly: false\n};\nInputGroup.propTypes = {\n type: PT.oneOf(objectValues(Type)),\n size: PT.oneOf(objectValues(InputSize)),\n label: PT.node,\n hint: PT.node,\n error: PT.bool,\n value: PT.any,\n LabelProps: PT.exact(labelPropTypes),\n InputProps: PT.exact(inputPropTypes),\n inputProps: PT.object,\n inputRef: PT.oneOfType([PT.func, PT.object]),\n TextareaProps: PT.exact(textareaPropTypes),\n readOnly: PT.bool,\n disabled: PT.bool\n};\nexport default InputGroup;","export default function _objectDestructuringEmpty(obj) {\n if (obj == null) throw new TypeError(\"Cannot destructure \" + obj);\n}","export var Size = {\n Xs: 'xs',\n Sm: 'sm',\n Md: 'md',\n Lg: 'lg',\n Xl: 'xl'\n};","import * as React from 'react';\nvar ModalMenuContext = /*#__PURE__*/React.createContext({\n modalOpened: false\n});\nif (process.env.NODE_ENV !== 'production') {\n ModalMenuContext.displayName = 'ModalMenuContext';\n}\nexport default ModalMenuContext;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _modalSizeMixin;\nimport { css } from 'styled-components';\nimport { Size } from './types';\nexport var modalSizeMixin = (_modalSizeMixin = {}, _defineProperty(_modalSizeMixin, Size.Xs, css([\"max-width:300px;\"])), _defineProperty(_modalSizeMixin, Size.Sm, css([\"max-width:600px;\"])), _defineProperty(_modalSizeMixin, Size.Md, css([\"max-width:960px;\"])), _defineProperty(_modalSizeMixin, Size.Lg, css([\"max-width:1280px;\"])), _defineProperty(_modalSizeMixin, Size.Xl, css([\"max-width:1920px;\"])), _modalSizeMixin);","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { Color as PColor } from '../../utils/types/palette';\nimport { BorderRadiusSize as BRSize } from '../../utils/types/shape';\nimport { modalSizeMixin } from './modal.mixin';\nimport { Size } from './types';\nvar baseClassName = 'Modal';\nvar Wrapper = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'Wrapper')\n}).withConfig({\n componentId: \"sc-80m07l-0\"\n})(function (_ref) {\n var open = _ref.open;\n return css([\"position:fixed;right:0px;bottom:0px;top:0px;left:0px;z-index:1200;visibility:\", \";\"], open ? 'visible' : 'hidden');\n});\nvar Overlay = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'Overlay')\n}).withConfig({\n componentId: \"sc-80m07l-1\"\n})(function (_ref2) {\n var open = _ref2.open;\n return css([\"position:fixed;right:0px;bottom:0px;top:0px;left:0px;background-color:rgba(0,0,0,0.5);z-index:-1;transition:opacity 251ms cubic-bezier(0.4,0,0.2,1) 0ms;opacity:\", \";\"], open ? '1' : '0');\n});\nvar Container = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'Container')\n}).withConfig({\n componentId: \"sc-80m07l-2\"\n})(function (_ref3) {\n var theme = _ref3.theme,\n _ref3$open = _ref3.open,\n open = _ref3$open === void 0 ? false : _ref3$open,\n _ref3$fullWidth = _ref3.fullWidth,\n fullWidth = _ref3$fullWidth === void 0 ? false : _ref3$fullWidth,\n _ref3$maxWidth = _ref3.maxWidth,\n maxWidth = _ref3$maxWidth === void 0 ? Size.Sm : _ref3$maxWidth;\n return css([\"position:absolute;overflow-x:hidden;overflow-y:auto;transition:opacity 251ms cubic-bezier(0.4,0,0.2,1) 0ms,transform 167ms cubic-bezier(0.4,0,0.2,1) 0ms;outline:0;border-radius:\", \";background-color:\", \";box-shadow:0px 2px 4px \", \";visibility:\", \";opacity:\", \";display:flex;max-height:calc(100% - 64px);flex-direction:column;\", \" \", \" top:50%;left:50%;transform:translate(-50%,-50%);\"], theme.shape.borderRadius[BRSize.Lg], theme.palette[PColor.BackgroundSecondary], theme.palette[PColor.LightShadow], open ? 'visible' : 'hidden', open ? '1' : '0', fullWidth && css([\"width:calc(100% - 64px);\"]), modalSizeMixin[maxWidth]);\n});\nvar Modal = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-80m07l-3\"\n})(function () {\n return css([\"position:relative;padding-top:8px;padding-bottom:8px;margin:0;padding:0;outline:0;display:flex;flex-direction:column;\"]);\n});\nvar Styled = applyDisplayNames({\n Modal: Modal,\n Wrapper: Wrapper,\n Overlay: Overlay,\n Container: Container\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\", \"open\", \"onClose\", \"maxWidth\", \"fullWidth\", \"modalStyles\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport React, { useEffect, isValidElement } from 'react';\nimport { createPortal } from 'react-dom';\nimport PT from 'prop-types';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport { Size } from './types';\nimport ModalMenuContext from './modal-menu-context';\nimport Styled from './modal.styles';\nvar isValidSingleFragmentChildren = function isValidSingleFragmentChildren(children) {\n return children && /*#__PURE__*/isValidElement(children) && React.Children.count(children) === 1 && children.type === React.Fragment;\n};\nvar Modal = intrinsicComponent(function (_ref, ref) {\n var _children = _ref.children,\n open = _ref.open,\n onClose = _ref.onClose,\n maxWidth = _ref.maxWidth,\n fullWidth = _ref.fullWidth,\n modalStyles = _ref.modalStyles,\n rest = _objectWithoutProperties(_ref, _excluded);\n var children = isValidSingleFragmentChildren(_children) ? _children.props.children : _children;\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n var target = document.querySelector('body');\n useEffect(function () {\n if (open) {\n document.body.classList.add('Modal-open');\n } else {\n document.body.classList.remove('Modal-open');\n }\n return function () {\n document.body.classList.remove('Modal-open');\n };\n }, [open]);\n var handleClose = function handleClose() {\n if (typeof onClose === 'function') {\n onClose();\n }\n };\n useEffect(function () {\n var keyListener = function keyListener(ev) {\n if (ev.key === 'Escape') {\n handleClose();\n }\n };\n document.addEventListener('keydown', keyListener);\n return function () {\n return document.removeEventListener('keydown', keyListener);\n };\n });\n var render = function render() {\n return /*#__PURE__*/React.createElement(ModalMenuContext.Provider, {\n value: {\n modalOpened: Boolean(open)\n }\n }, /*#__PURE__*/React.createElement(Styled.Wrapper, {\n style: _objectSpread({}, modalStyles),\n open: Boolean(open),\n ref: ref\n }, /*#__PURE__*/React.createElement(Styled.Overlay, {\n onClick: handleClose,\n open: Boolean(open)\n }), /*#__PURE__*/React.createElement(Styled.Container, _extends({}, rest, {\n maxWidth: maxWidth,\n fullWidth: fullWidth,\n open: Boolean(open)\n }), /*#__PURE__*/React.createElement(Styled.Modal, null, React.Children.map(children, function (child) {\n if ( /*#__PURE__*/isValidElement(child) && child.type.displayName === 'ModalTitle') {\n return /*#__PURE__*/React.cloneElement(child, _objectSpread({\n onClose: handleClose\n }, child.props || {}));\n }\n return child;\n })))));\n };\n return /*#__PURE__*/createPortal(render(), target);\n});\nexport var defaultProps = {\n open: false,\n fullWidth: false,\n maxWidth: Size.Xs\n};\nModal.defaultProps = defaultProps;\nexport var propTypes = {\n onClose: PT.func,\n modalStyles: PT.object,\n children: PT.node.isRequired,\n maxWidth: PT.oneOf(objectValues(Size)),\n open: PT.bool,\n fullWidth: PT.bool\n};\nModal.propTypes = propTypes;\nexport default Modal;","export var Align = {\n Left: 'left',\n Center: 'center',\n Right: 'right'\n};","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { Align } from './types';\nvar baseClassName = 'ModalActions';\nvar ModalActions = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-1wg6u00-0\"\n})(function (_ref) {\n var _ref$align = _ref.align,\n align = _ref$align === void 0 ? Align.Center : _ref$align;\n return css([\"position:relative;display:flex;align-items:center;padding:24px;justify-content:\", \";> *:not(:first-child){margin-left:8px;}\"], align === Align.Right ? 'flex-end' : align);\n});\nvar Styled = applyDisplayNames({\n ModalActions: ModalActions\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\"];\nimport React from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport Styled from './modal-actions.styles';\nimport { Align } from './types';\nvar ModalActions = intrinsicComponent(function (_ref, ref) {\n var children = _ref.children,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Styled.ModalActions, _extends({}, rest, {\n ref: ref\n }), children);\n});\nModalActions.defaultProps = {\n align: Align.Center\n};\nModalActions.propTypes = {\n children: PT.node.isRequired,\n align: PT.oneOf(objectValues(Align))\n};\nModalActions.displayName = 'ModalActions';\nexport default ModalActions;","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nvar baseClassName = 'ModalContent';\nvar ModalContent = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-1ng1w0v-0\"\n})(function () {\n return css([\"position:relative;padding:12px 24px 0px;\"]);\n});\nvar Styled = applyDisplayNames({\n ModalContent: ModalContent\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\"];\nimport React from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent } from '../../utils/functions';\nimport Styled from './modal-content.styles';\nvar ModalContent = intrinsicComponent(function (_ref, ref) {\n var children = _ref.children,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Styled.ModalContent, _extends({}, rest, {\n ref: ref\n }), children);\n});\nModalContent.defaultProps = {};\nModalContent.propTypes = {\n children: PT.node.isRequired\n};\nModalContent.displayName = 'ModalContent';\nexport default ModalContent;","export var Size = {\n Sm: 'sm',\n Md: 'md',\n Lg: 'lg'\n};","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _crossButtonPaddingMi;\nimport styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { Color as PaletteColor } from '../../utils/types/palette';\nimport { Size } from './types';\nvar baseClassName = 'CrossButton';\nvar crossButtonPaddingMixin = (_crossButtonPaddingMi = {}, _defineProperty(_crossButtonPaddingMi, Size.Sm, css([\"padding:6px;\"])), _defineProperty(_crossButtonPaddingMi, Size.Md, css([\"padding:9px;\"])), _defineProperty(_crossButtonPaddingMi, Size.Lg, css([\"padding:12px;\"])), _crossButtonPaddingMi);\nvar CrossButton = /*#__PURE__*/styled.button.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-ygfku-0\"\n})(function (_ref) {\n var _ref$size = _ref.size,\n size = _ref$size === void 0 ? Size.Lg : _ref$size,\n theme = _ref.theme;\n return css([\"display:flex;justify-content:center;align-items:center;cursor:pointer;\", \" color:\", \";background:transparent;border:none;transition:all 100ms ease-out;&:hover{color:\", \";background:\", \";;}&:active{color:\", \";background:\", \";}\"], crossButtonPaddingMixin[size], theme.palette[PaletteColor.IconsSecondary], theme.palette[PaletteColor.IconsPrimary], theme.palette[PaletteColor.BackgroundHover], theme.palette[PaletteColor.IconsPrimaryHover], theme.palette[PaletteColor.BackgroundActive]);\n});\nvar Styled = applyDisplayNames({\n CrossButton: CrossButton\n});\nexport default Styled;","import _objectDestructuringEmpty from \"@babel/runtime/helpers/objectDestructuringEmpty\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport React from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport CrossOutline from '@scaleflex/icons/cross-outline';\nimport { Size } from './types';\nimport Styled from './cross-button.styles';\nvar getIconSize = function getIconSize(sizeName) {\n switch (sizeName) {\n case Size.Lg:\n return 16;\n case Size.Sm:\n default:\n return 12;\n }\n};\nvar CrossButton = intrinsicComponent(function (_ref, ref) {\n var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));\n return /*#__PURE__*/React.createElement(Styled.CrossButton, _extends({}, rest, {\n ref: ref\n }), /*#__PURE__*/React.createElement(CrossOutline, {\n size: getIconSize(rest.size)\n }));\n});\nCrossButton.defaultProps = {\n size: Size.Lg\n};\nCrossButton.propTypes = {\n size: PT.oneOf(objectValues(Size))\n};\nexport default CrossButton;","export var Variant = {\n Default: 'default',\n WithIcon: 'with-icon'\n};","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { Color as PColor } from '../../utils/types/palette';\nimport { BorderRadiusSize as BRSize } from '../../utils/types/shape';\nimport { Variant } from './types';\nvar baseClassName = 'ModalTitle';\nvar Icon = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'Icon')\n}).withConfig({\n componentId: \"sc-l3tf49-0\"\n})(function (_ref) {\n var palette = _ref.theme.palette;\n return css([\"display:flex;margin-bottom:8px;padding:14.5px;border-radius:50%;background:\", \";color:\", \";\"], palette[PColor.Accent_1_2_Opacity], palette[PColor.AccentStateless]);\n});\nvar LabelPrimary = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'LabelPrimary')\n}).withConfig({\n componentId: \"sc-l3tf49-1\"\n})(function (_ref2) {\n var _ref2$variant = _ref2.variant,\n variant = _ref2$variant === void 0 ? Variant.Default : _ref2$variant;\n return css([\"font-size:18px;line-height:27px;font-weight:\", \";\"], variant === Variant.Default ? 400 : 500);\n});\nvar LabelSecondary = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'LabelSecondary')\n}).withConfig({\n componentId: \"sc-l3tf49-2\"\n})([\"font-size:12px;line-height:14px;margin-top:4px;\"]);\nvar Close = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'Close')\n}).withConfig({\n componentId: \"sc-l3tf49-3\"\n})(function (_ref3) {\n var _ref3$variant = _ref3.variant,\n variant = _ref3$variant === void 0 ? Variant.Default : _ref3$variant,\n palette = _ref3.theme.palette;\n return css([\"position:absolute;display:flex;top:\", \"px;right:\", \"px;color:\", \";&:hover{color:\", \";}cursor:pointer;\"], variant === Variant.WithIcon ? 2 : 8, variant === Variant.WithIcon ? 2 : 8, palette[PColor.IconsSecondary], palette[PColor.AccentPrimary]);\n});\nvar ModalTitle = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-l3tf49-4\"\n})(function (_ref4) {\n var _ref4$variant = _ref4.variant,\n variant = _ref4$variant === void 0 ? Variant.Default : _ref4$variant,\n _ref4$theme = _ref4.theme,\n palette = _ref4$theme.palette,\n borderRadius = _ref4$theme.shape.borderRadius;\n return css([\"position:relative;color:\", \";border-radius:\", \" \", \" 0px 0px;\", \" \", \" \", \"\"], palette[PColor.TextPrimary], borderRadius[BRSize.Md], borderRadius[BRSize.Md], function () {\n var paddingY = variant === Variant.WithIcon ? 26 : 14;\n var paddingX = variant === Variant.WithIcon ? 12 : 14;\n var paddingLeft = 18;\n var paddingRight = variant === Variant.WithIcon ? paddingLeft : 40;\n return css([\"padding:\", \"px \", \"px \", \"px \", \"px;\"], paddingY, paddingRight, paddingX, paddingLeft);\n }, variant === Variant.Default && css([\"background:\", \";border-bottom:1px solid \", \";\"], palette[PColor.BackgroundPrimary], palette[PColor.BordersSecondary]), variant === Variant.WithIcon && css([\"display:flex;align-items:center;flex-direction:column;\"]));\n});\nvar Styled = applyDisplayNames({\n ModalTitle: ModalTitle,\n LabelPrimary: LabelPrimary,\n LabelSecondary: LabelSecondary,\n Close: Close,\n Icon: Icon\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"secondary\", \"onClose\"];\nimport React from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport CrossButton from '../cross-button';\nimport Styled from './modal-title.styles';\nimport { Variant } from './types';\nvar ModalTitle = intrinsicComponent(function (_ref, ref) {\n var secondary = _ref.secondary,\n onClose = _ref.onClose,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Styled.ModalTitle, _extends({}, rest, {\n ref: ref\n }), rest.icon && /*#__PURE__*/React.createElement(Styled.Icon, {\n iconShadow: Boolean(rest.iconShadow)\n }, rest.icon), /*#__PURE__*/React.createElement(Styled.LabelPrimary, rest, rest.primary), rest.variant === Variant.WithIcon && secondary && /*#__PURE__*/React.createElement(Styled.LabelSecondary, null, secondary), /*#__PURE__*/React.createElement(Styled.Close, {\n variant: rest.variant\n }, /*#__PURE__*/React.createElement(CrossButton, {\n size: \"lg\",\n onClick: onClose\n })));\n});\nModalTitle.defaultProps = {\n iconShadow: true,\n variant: Variant.Default\n};\nModalTitle.propTypes = {\n primary: PT.node.isRequired,\n secondary: PT.node,\n icon: PT.node,\n iconShadow: PT.bool,\n onClose: PT.func,\n variant: PT.oneOf(objectValues(Variant))\n};\nModalTitle.displayName = 'ModalTitle';\nexport default ModalTitle;","export var Status = {\n Success: 'success',\n Info: 'info',\n Error: 'error',\n Warning: 'warning'\n};","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nvar baseClassName = 'PopupStatus';\nvar PopupStatus = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-qash56-0\"\n})(function () {\n return css([\"display:flex;\"]);\n});\nvar Styled = applyDisplayNames({\n PopupStatus: PopupStatus\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"status\", \"notificationBackground\"];\nimport React from 'react';\nimport PT from 'prop-types';\nimport { Success, About, Error, Warning, InfoOutline, WarningOutline, ErrorOutline } from '@scaleflex/icons';\nimport { lightPalette } from '@scaleflex/ui/theme/roots/palette';\nimport { Color } from '@scaleflex/ui/utils/types/palette';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport { Status } from './types';\nimport Styled from './popup-status.styles';\nvar getPopupStatusIcon = function getPopupStatusIcon(status, notificationBackground) {\n switch (status) {\n case Status.Warning:\n return notificationBackground ? /*#__PURE__*/React.createElement(Warning, {\n color: lightPalette[Color.Warning],\n size: 20\n }) : /*#__PURE__*/React.createElement(WarningOutline, {\n color: lightPalette[Color.Warning],\n size: 12\n });\n case Status.Error:\n return notificationBackground ? /*#__PURE__*/React.createElement(Error, {\n color: lightPalette[Color.Error],\n size: 20\n }) : /*#__PURE__*/React.createElement(ErrorOutline, {\n color: lightPalette[Color.Error],\n size: 12\n });\n case Status.Info:\n return notificationBackground ? /*#__PURE__*/React.createElement(About, {\n color: lightPalette[Color.Info],\n size: 20\n }) : /*#__PURE__*/React.createElement(InfoOutline, {\n color: lightPalette[Color.Info],\n size: 12\n });\n case Status.Success:\n default:\n return /*#__PURE__*/React.createElement(Success, {\n color: lightPalette[Color.Success],\n size: 20\n });\n }\n};\nvar PopupStatus = intrinsicComponent(function (_ref, ref) {\n var status = _ref.status,\n _ref$notificationBack = _ref.notificationBackground,\n notificationBackground = _ref$notificationBack === void 0 ? true : _ref$notificationBack,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Styled.PopupStatus, _extends({\n status: status\n }, rest, {\n ref: ref\n }), getPopupStatusIcon(status, notificationBackground));\n});\nexport var defaultProps = {\n status: Status.Success\n};\nPopupStatus.defaultProps = defaultProps;\nexport var propTypes = {\n status: PT.oneOf(objectValues(Status))\n};\nPopupStatus.propTypes = propTypes;\nexport default PopupStatus;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _popupContentMixin;\nimport { css } from 'styled-components';\nimport { Color as PaletteColor } from '@scaleflex/ui/utils/types/palette';\nimport { Status } from '../popup-status/types';\nexport var popupContentMixin = (_popupContentMixin = {}, _defineProperty(_popupContentMixin, Status.Success, function (_ref) {\n var palette = _ref.theme.palette;\n return css([\"background-color:\", \";\"], palette[PaletteColor.BackgroundGreen]);\n}), _defineProperty(_popupContentMixin, Status.Info, function (_ref2) {\n var palette = _ref2.theme.palette;\n return css([\"background-color:\", \";\"], palette[PaletteColor.BackgroundBlue]);\n}), _defineProperty(_popupContentMixin, Status.Error, function (_ref3) {\n var palette = _ref3.theme.palette;\n return css([\"background-color:\", \";\"], palette[PaletteColor.BackgroundRed]);\n}), _defineProperty(_popupContentMixin, Status.Warning, function (_ref4) {\n var palette = _ref4.theme.palette;\n return css([\"background-color:\", \";\"], palette[PaletteColor.BackgroundOrange]);\n}), _popupContentMixin);","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { Color as PColor } from '../../utils/types/palette';\nimport { FontVariant } from '../../utils/types/typography';\nimport { popupContentMixin } from './popup-content.mixin';\nvar baseClassName = 'PopupContent';\nvar LabelWrapper = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'LabelWrapper')\n}).withConfig({\n componentId: \"sc-njbmnt-0\"\n})(function (_ref) {\n var palette = _ref.theme.palette;\n return css([\"display:flex;flex-grow:1;margin-left:44px;margin-right:28px;padding:16px;padding-right:0;overflow:hidden;background:\", \";\"], palette[PColor.ButtonPrimaryText]);\n});\nvar Label = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'Label')\n}).withConfig({\n componentId: \"sc-njbmnt-1\"\n})(function (_ref2) {\n var _ref2$theme = _ref2.theme,\n palette = _ref2$theme.palette,\n font = _ref2$theme.typography.font;\n return css([\"max-width:100%;overflow:hidden;text-overflow:ellipsis;color:\", \";\", \"\"], palette[PColor.TextPrimary], font[FontVariant.TextSmallUp]);\n});\nvar PopupContent = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'PopupContent')\n}).withConfig({\n componentId: \"sc-njbmnt-2\"\n})(function (_ref3) {\n var theme = _ref3.theme;\n return css([\"position:relative;display:flex;align-items:center;width:360px;border-radius:4px;box-shadow:0px 2px 6px \", \";\"], theme.palette[PColor.LargeShadow]);\n});\nvar CloseWrapper = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'PopupContent')\n}).withConfig({\n componentId: \"sc-njbmnt-3\"\n})(function (_ref4) {\n var theme = _ref4.theme;\n return css([\"position:absolute;top:0;right:0;display:flex;justify-content:center;align-items:flex-start;box-sizing:border-box;padding:2px;height:fit-content;cursor:pointer;background:\", \";border-radius:0 4px 4px 0;\"], theme.palette[PColor.BackgroundStateless]);\n});\nvar PopupStatus = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'PopupStatus')\n}).withConfig({\n componentId: \"sc-njbmnt-4\"\n})(function (_ref5) {\n var _ref5$status = _ref5.status,\n status = _ref5$status === void 0 ? 'success' : _ref5$status;\n return css([\"position:absolute;display:flex;left:0;z-index:1;height:100%;min-width:44px;align-items:center;justify-content:center;box-sizing:border-box;border-radius:4px 0 0 4px;\", \"\"], popupContentMixin[status]);\n});\nvar Styled = applyDisplayNames({\n PopupContent: PopupContent,\n PopupStatus: PopupStatus,\n LabelWrapper: LabelWrapper,\n CloseWrapper: CloseWrapper,\n Label: Label\n});\nexport default Styled;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"onClose\", \"message\", \"status\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport React from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent } from '../../utils/functions';\nimport PopupStatus from '../popup-status';\nimport CrossButton from '../cross-button/cross-button.component';\nimport { defaultProps as popupStatusDefaultProps, propTypes as popupStatusPropTypes } from '../popup-status/popup-status.component';\nimport Styled from './popup-content.styles';\nvar PopupContent = intrinsicComponent(function (_ref, ref) {\n var onClose = _ref.onClose,\n message = _ref.message,\n status = _ref.status,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Styled.PopupContent, _extends({}, rest, {\n ref: ref\n }), /*#__PURE__*/React.createElement(Styled.PopupStatus, _extends({\n status: status,\n message: message\n }, rest), /*#__PURE__*/React.createElement(PopupStatus, {\n status: status\n })), /*#__PURE__*/React.createElement(Styled.LabelWrapper, null, /*#__PURE__*/React.createElement(Styled.Label, null, message)), /*#__PURE__*/React.createElement(Styled.CloseWrapper, null, /*#__PURE__*/React.createElement(CrossButton, {\n size: \"sm\",\n onClick: onClose\n })));\n});\nexport var defaultProps = _objectSpread({}, popupStatusDefaultProps);\nPopupContent.defaultProps = defaultProps;\nexport var propTypes = _objectSpread(_objectSpread({}, popupStatusPropTypes), {}, {\n message: PT.node.isRequired,\n onClose: PT.func\n});\nPopupContent.propTypes = propTypes;\nexport default PopupContent;","export var Horizontal = {\n Center: 'center',\n Left: 'left',\n Right: 'right'\n};","export var Vertical = {\n Top: 'top',\n Bottom: 'bottom'\n};","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nvar _positionHorizontalMi, _positionVerticalMixi;\nimport { css } from 'styled-components';\n// import type { WithTheme } from '../../theme/entity';\n// import { Color as PaletteColor } from '../../utils/types/palette';\nimport { Horizontal, Vertical } from './types';\nexport var positionHorizontalMixin = (_positionHorizontalMi = {}, _defineProperty(_positionHorizontalMi, Horizontal.Left, css([\"left:25px;right:auto;\"])), _defineProperty(_positionHorizontalMi, Horizontal.Center, css([\"left:50%;right:auto;transform:translateX(-50%);\"])), _defineProperty(_positionHorizontalMi, Horizontal.Right, css([\"left:auto;right:25px;\"])), _positionHorizontalMi);\nexport var positionVerticalMixin = (_positionVerticalMixi = {}, _defineProperty(_positionVerticalMixi, Vertical.Top, css([\"top:25px;bottom:auto;\"])), _defineProperty(_positionVerticalMixi, Vertical.Bottom, css([\"top:auto;bottom:25px;\"])), _positionVerticalMixi);\n\n// export const errorMixin = ({ theme: { palette } }: WithTheme) => css`\n// background: ${palette[PaletteColor.BackgroundSecondary]} !important;\n// border: 1px solid ${palette[PaletteColor.Error]} !important;\n// `;","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\n// import type { WithTheme } from '../../theme/entity';\n// import { Color as PColor } from '../../utils/types/palette';\n// import { FontVariant } from '../../utils/types/typography';\n// import { BorderRadiusSize as BRSize } from '../../utils/types/shape';\n\nimport { positionHorizontalMixin, positionVerticalMixin } from './popup.mixin';\nimport { Horizontal, Vertical } from './types';\nvar baseClassName = 'Popup';\nvar Popup = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-jmtjri-0\"\n})(function (_ref) {\n var anchorOrigin = _ref.anchorOrigin;\n return css([\"position:fixed;display:flex;align-items:center;justify-content:center;z-index:1400;\", \" \", \"\"], positionHorizontalMixin[(anchorOrigin === null || anchorOrigin === void 0 ? void 0 : anchorOrigin.horizontal) || Horizontal.Left], positionVerticalMixin[(anchorOrigin === null || anchorOrigin === void 0 ? void 0 : anchorOrigin.vertical) || Vertical.Bottom]);\n});\nvar Styled = applyDisplayNames({\n Popup: Popup\n});\nexport default Styled;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"autoHideDuration\", \"anchorOrigin\", \"open\", \"onClose\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport React, { useEffect, useState } from 'react';\nimport { createPortal } from 'react-dom';\nimport PT from 'prop-types';\nimport { intrinsicComponent, objectValues, generateClassNames } from '../../utils/functions';\nimport usePortal from '../../hooks/use-portal';\nimport PopupContent, { defaultProps as cDefaultProps, propTypes as cPropTypes } from '../popup-content/popup-content.component';\nimport { Horizontal, Vertical } from './types';\nimport Styled from './popup.styles';\nvar Popup = intrinsicComponent(function (props, ref) {\n var autoHideDuration = props.autoHideDuration,\n anchorOrigin = props.anchorOrigin,\n open = props.open,\n onClose = props.onClose,\n rest = _objectWithoutProperties(props, _excluded);\n var target = usePortal(generateClassNames('Popup'));\n var _useState = useState(autoHideDuration),\n _useState2 = _slicedToArray(_useState, 2),\n hoverHideDuration = _useState2[0],\n setHoverHideDuration = _useState2[1];\n var _useState3 = useState(false),\n _useState4 = _slicedToArray(_useState3, 2),\n isHovering = _useState4[0],\n setIsHovering = _useState4[1];\n var handleMouseLeave = function handleMouseLeave() {\n setIsHovering(false);\n setHoverHideDuration(1000);\n };\n useEffect(function () {\n if (open) setHoverHideDuration(autoHideDuration);\n }, [open]);\n useEffect(function () {\n var timeout = null;\n if (open && !isHovering && hoverHideDuration && typeof onClose === 'function') {\n timeout = setTimeout(onClose, hoverHideDuration);\n }\n return function () {\n if (timeout) {\n clearTimeout(timeout);\n }\n };\n }, [hoverHideDuration, isHovering, open, onClose]);\n var render = function render() {\n if (!open) {\n return null;\n }\n return /*#__PURE__*/React.createElement(Styled.Popup, _extends({\n onMouseEnter: function onMouseEnter() {\n return setIsHovering(true);\n },\n onMouseLeave: handleMouseLeave\n }, props), /*#__PURE__*/React.createElement(PopupContent, _extends({\n onClose: onClose\n }, rest, {\n ref: ref\n })));\n };\n return /*#__PURE__*/createPortal(render(), target);\n});\nPopup.defaultProps = _objectSpread(_objectSpread({}, cDefaultProps), {}, {\n open: false,\n autoHideDuration: 5000,\n anchorOrigin: {\n vertical: Vertical.Bottom,\n horizontal: Horizontal.Left\n }\n});\nPopup.propTypes = _objectSpread(_objectSpread({}, cPropTypes), {}, {\n anchorOrigin: PT.exact({\n vertical: PT.oneOf(objectValues(Vertical)),\n horizontal: PT.oneOf(objectValues(Horizontal))\n }),\n open: PT.bool,\n autoHideDuration: PT.number,\n onClose: PT.func\n});\nexport default Popup;","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { Color as PC } from '../../utils/types/palette';\nvar baseClassName = 'RotationSlider';\nvar RotationSliderList = /*#__PURE__*/styled.ul.attrs({\n className: generateClassNames(baseClassName, 'list')\n}).withConfig({\n componentId: \"sc-1xuruq0-0\"\n})([\"display:flex;align-items:center;position:relative;padding:0;width:100%;list-style:none;\"]);\nvar RotationSliderBigDot = /*#__PURE__*/styled.li.attrs({\n className: generateClassNames(baseClassName, 'big-dot')\n}).withConfig({\n componentId: \"sc-1xuruq0-1\"\n})(function (_ref) {\n var palette = _ref.theme.palette;\n return css([\"width:8px;height:8px;border-radius:50%;background-color:\", \";cursor:pointer;\"], palette[PC.LinkPrimary]);\n});\nvar RotationSliderSmallDotWrapper = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'small-dot-wrapper')\n}).withConfig({\n componentId: \"sc-1xuruq0-2\"\n})([\"padding:2px;\"]);\nvar RotationSliderSmallDot = /*#__PURE__*/styled.li.attrs({\n className: generateClassNames(baseClassName, 'small-dot')\n}).withConfig({\n componentId: \"sc-1xuruq0-3\"\n})(function (_ref2) {\n var palette = _ref2.theme.palette;\n return css([\"width:2px;height:2px;border-radius:50%;background-color:\", \";cursor:pointer;\"], palette[PC.LinkPrimary]);\n});\nvar RotationSliderControl = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'control')\n}).withConfig({\n componentId: \"sc-1xuruq0-4\"\n})(function (_ref3) {\n var palette = _ref3.theme.palette;\n return css([\"display:flex;justify-content:center;align-items:center;position:absolute;height:18px;width:2px;transform:translate(-50%,-50%);top:50%;background-color:\", \";& > input{border:0px;clip:rect(0px,0px,0px,0px);height:100%;margin:-1px;overflow:hidden;padding:0px;position:absolute;white-space:nowrap;width:100%;direction:ltr;}&::before{position:absolute;content:'';border-radius:inherit;width:100%;height:100%;box-shadow:0px 3px 1px -2px rgb(0 0 0 / 20%),0px 2px 2px 0px rgb(0 0 0 / 14%),0px 1px 5px 0px rgb(0 0 0 / 12%);}&::after{position:absolute;content:'';border-radius:50%;width:42px;height:42px;top:50%;left:50%;transform:translate(-50%,-50%);}\"], palette[PC.LinkActive]);\n});\nvar RotationSliderMark = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'mark')\n}).withConfig({\n componentId: \"sc-1xuruq0-5\"\n})([\"padding:4px;\"]);\nvar RotationSliderMarkText = /*#__PURE__*/styled.span.attrs({\n className: generateClassNames(baseClassName, 'mark-text')\n}).withConfig({\n componentId: \"sc-1xuruq0-6\"\n})(function (_ref4) {\n var palette = _ref4.theme.palette;\n return css([\"position:absolute;top:20px;font-size:14px;transform:translateX(-10%);color:\", \";\"], palette[PC.TextPrimary]);\n});\nvar Styled = applyDisplayNames({\n RotationSliderList: RotationSliderList,\n RotationSliderBigDot: RotationSliderBigDot,\n RotationSliderSmallDotWrapper: RotationSliderSmallDotWrapper,\n RotationSliderSmallDot: RotationSliderSmallDot,\n RotationSliderControl: RotationSliderControl,\n RotationSliderMark: RotationSliderMark,\n RotationSliderMarkText: RotationSliderMarkText\n});\nexport default Styled;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"min\", \"max\", \"angle\", \"onChange\", \"onMouseDown\", \"onMouseUp\", \"step\", \"labelTooltipOptions\", \"annotation\", \"hideMarkText\", \"showCurrentMarkText\", \"value\", \"railProps\", \"trackProps\", \"thumbProps\", \"labelTooltipProps\", \"markStyles\", \"markTextStyles\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport React from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport Slider from '../slider';\nimport { LabelTooltip } from '../slider/types';\nimport Styled from './rotation-slider.styles';\nvar RotationSlider = intrinsicComponent(function (_ref, ref) {\n var _ref$min = _ref.min,\n min = _ref$min === void 0 ? 0 : _ref$min,\n _ref$max = _ref.max,\n max = _ref$max === void 0 ? 100 : _ref$max,\n _ref$angle = _ref.angle,\n angle = _ref$angle === void 0 ? 10 : _ref$angle,\n onChange = _ref.onChange,\n onMouseDown = _ref.onMouseDown,\n onMouseUp = _ref.onMouseUp,\n _ref$step = _ref.step,\n step = _ref$step === void 0 ? 1 : _ref$step,\n _ref$labelTooltipOpti = _ref.labelTooltipOptions,\n labelTooltipOptions = _ref$labelTooltipOpti === void 0 ? LabelTooltip.Off : _ref$labelTooltipOpti,\n _ref$annotation = _ref.annotation,\n annotation = _ref$annotation === void 0 ? '°' : _ref$annotation,\n _ref$hideMarkText = _ref.hideMarkText,\n hideMarkText = _ref$hideMarkText === void 0 ? false : _ref$hideMarkText,\n _ref$showCurrentMarkT = _ref.showCurrentMarkText,\n showCurrentMarkText = _ref$showCurrentMarkT === void 0 ? false : _ref$showCurrentMarkT,\n value = _ref.value,\n _ref$railProps = _ref.railProps,\n railProps = _ref$railProps === void 0 ? {} : _ref$railProps,\n _ref$trackProps = _ref.trackProps,\n trackProps = _ref$trackProps === void 0 ? {} : _ref$trackProps,\n _ref$thumbProps = _ref.thumbProps,\n thumbProps = _ref$thumbProps === void 0 ? {} : _ref$thumbProps,\n _ref$labelTooltipProp = _ref.labelTooltipProps,\n labelTooltipProps = _ref$labelTooltipProp === void 0 ? {} : _ref$labelTooltipProp,\n _ref$markStyles = _ref.markStyles,\n markStyles = _ref$markStyles === void 0 ? {} : _ref$markStyles,\n _ref$markTextStyles = _ref.markTextStyles,\n markTextStyles = _ref$markTextStyles === void 0 ? {} : _ref$markTextStyles,\n rest = _objectWithoutProperties(_ref, _excluded);\n var handleChange = function handleChange(event, newValue) {\n if (onChange) {\n onChange(event, newValue);\n }\n };\n var getValue = function getValue() {\n if (value || value === 0) {\n if (value > max) {\n return max;\n }\n if (value < min) {\n return min;\n }\n return value;\n }\n return min;\n };\n var showMarkText = function showMarkText(index) {\n if (hideMarkText) return false;\n if (!showCurrentMarkText) return true;\n return getValue() === index;\n };\n var renderBar = function renderBar() {\n var barDom = [];\n var barDiv;\n for (var i = min; i <= max; i += step) {\n barDiv = [];\n if (i % angle === 0 || i === max) {\n barDiv = /*#__PURE__*/React.createElement(Styled.RotationSliderMark, {\n key: i,\n style: _objectSpread({}, markStyles)\n }, showMarkText(i) && /*#__PURE__*/React.createElement(Styled.RotationSliderMarkText, {\n style: _objectSpread({}, markTextStyles)\n }, i === min + 1 ? max : i, /*#__PURE__*/React.createElement(\"sup\", null, annotation)), /*#__PURE__*/React.createElement(Styled.RotationSliderBigDot, null));\n } else if (i % 10 === 0) {\n barDiv = /*#__PURE__*/React.createElement(Styled.RotationSliderSmallDotWrapper, {\n key: i\n }, /*#__PURE__*/React.createElement(Styled.RotationSliderSmallDot, null));\n }\n if (!Array.isArray(barDiv)) {\n barDom.push(barDiv);\n }\n }\n return barDom;\n };\n return /*#__PURE__*/React.createElement(Slider, _extends({\n min: min,\n max: max,\n step: step,\n value: getValue(),\n hideTrack: true,\n hideAnnotation: true,\n annotation: annotation,\n onChange: handleChange,\n labelTooltip: labelTooltipOptions,\n ref: ref,\n components: {\n Rail: function Rail(props, style) {\n return /*#__PURE__*/React.createElement(Styled.RotationSliderList, _extends({}, props, {\n styles: _objectSpread({}, style)\n }), renderBar());\n },\n Thumb: Styled.RotationSliderControl\n },\n componentsProps: {\n rail: _objectSpread(_objectSpread({}, railProps), {}, {\n style: _objectSpread({}, railProps.style)\n }),\n track: _objectSpread(_objectSpread({}, trackProps), {}, {\n style: _objectSpread({}, trackProps.style)\n }),\n thumb: _objectSpread(_objectSpread({}, thumbProps), {}, {\n style: _objectSpread({\n top: '15%'\n }, thumbProps.style)\n }),\n labelTooltip: _objectSpread(_objectSpread({}, labelTooltipProps), {}, {\n style: _objectSpread({}, labelTooltipProps.style)\n })\n }\n }, rest, {\n defaultValue: Number(rest.defaultValue),\n style: _objectSpread({\n width: 'auto',\n height: 'auto'\n }, rest.style)\n }));\n});\nRotationSlider.defaultProps = {\n annotation: '°',\n min: 0,\n max: 100,\n step: 1,\n labelTooltipOptions: LabelTooltip.Off\n};\nRotationSlider.propTypes = {\n value: PT.oneOfType([PT.array, PT.number]),\n min: PT.number,\n max: PT.number,\n angle: PT.number,\n onChange: PT.func,\n onMouseDown: PT.func,\n onMouseUp: PT.func,\n step: PT.number,\n annotation: PT.string,\n hideMarkText: PT.bool,\n showCurrentMarkText: PT.bool,\n railProps: PT.object,\n trackProps: PT.object,\n thumbProps: PT.object,\n labelTooltipProps: PT.object,\n markStyles: PT.object,\n markTextStyles: PT.object,\n labelTooltipOptions: PT.oneOf(objectValues(LabelTooltip))\n};\nexport default RotationSlider;","import styled from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\n// import type { With } from '../../utils/types';\n// import type { WithTheme } from '../../theme/entity';\n// import { Color as PColor } from '../../utils/types/palette';\n// import type { SelectGroupProps } from './select-group.props';\nimport StyledInputGroup from '../input-group/input-group.styles';\nvar baseClassName = 'SelectGroup';\nvar SelectGroup = /*#__PURE__*/styled(StyledInputGroup.InputGroup).attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-1uvutwe-0\"\n})([\"\"]);\nvar Styled = applyDisplayNames({\n SelectGroup: SelectGroup\n});\nexport default Styled;","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _typeof from \"@babel/runtime/helpers/typeof\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\", \"size\", \"error\", \"label\", \"placeholder\", \"hint\", \"LabelProps\", \"SelectProps\", \"selectProps\", \"scroll\", \"fullWidth\", \"showSelectionKey\", \"value\", \"multiple\", \"hideMenuItemsActions\", \"onChange\", \"readOnly\", \"disabled\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport React from 'react';\nimport PT from 'prop-types';\nimport { InputSize } from '../../utils/types';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport Label from '../label';\nimport { propTypes as labelPropTypes } from '../label/label.component';\nimport Select from '../select';\nimport { propTypes as selectPropTypes } from '../select/select.component';\nimport FormHint from '../form-hint';\nimport Styled from './select-group.styles';\nvar SelectGroup = intrinsicComponent(function (_ref, ref) {\n var children = _ref.children,\n size = _ref.size,\n error = _ref.error,\n label = _ref.label,\n placeholder = _ref.placeholder,\n hint = _ref.hint,\n LabelPropsData = _ref.LabelProps,\n SelectPropsData = _ref.SelectProps,\n selectProps = _ref.selectProps,\n _ref$scroll = _ref.scroll,\n scroll = _ref$scroll === void 0 ? true : _ref$scroll,\n fullWidth = _ref.fullWidth,\n showSelectionKey = _ref.showSelectionKey,\n value = _ref.value,\n multiple = _ref.multiple,\n hideMenuItemsActions = _ref.hideMenuItemsActions,\n onChange = _ref.onChange,\n readOnly = _ref.readOnly,\n disabled = _ref.disabled,\n rest = _objectWithoutProperties(_ref, _excluded);\n var renderLabel = function renderLabel() {\n if (label) {\n if (typeof label === 'function') {\n return label({\n error: error\n });\n }\n if (_typeof(label) === 'object') {\n return label;\n }\n return /*#__PURE__*/React.createElement(Label, _extends({\n error: error\n }, LabelPropsData || {}), label);\n }\n return null;\n };\n var renderHint = function renderHint() {\n if (hint) {\n if (typeof hint === 'function') {\n return hint({\n error: error\n });\n }\n if (_typeof(hint) === 'object') {\n return hint;\n }\n return /*#__PURE__*/React.createElement(FormHint, {\n error: error\n }, hint);\n }\n return null;\n };\n return /*#__PURE__*/React.createElement(Styled.SelectGroup, _extends({}, rest, {\n ref: ref\n }), renderLabel(), /*#__PURE__*/React.createElement(Select, _extends({\n error: error,\n value: value,\n size: size,\n scroll: scroll,\n onChange: onChange,\n multiple: multiple,\n fullWidth: Boolean(fullWidth)\n }, SelectPropsData || {}, {\n selectProps: selectProps,\n readOnly: readOnly,\n disabled: disabled,\n placeholder: placeholder,\n showSelectionKey: showSelectionKey,\n hideMenuItemsActions: hideMenuItemsActions\n }), children), renderHint());\n});\nSelectGroup.defaultProps = {\n error: false,\n fullWidth: false,\n readOnly: false,\n disabled: false,\n scroll: true,\n hideMenuItemsActions: false\n};\nvar size = selectPropTypes.size,\n restSelectPropTypes = _objectWithoutProperties(selectPropTypes, [\"size\"]);\nSelectGroup.propTypes = _objectSpread(_objectSpread({}, restSelectPropTypes), {}, {\n // Extends from SelectProps: multiple, error, children, value, onChange\n fullWidth: PT.bool,\n size: PT.oneOf(objectValues(InputSize)),\n label: PT.node,\n hint: PT.node,\n LabelProps: PT.exact(labelPropTypes),\n SelectProps: PT.exact(selectPropTypes),\n selectProps: PT.object,\n readOnly: PT.bool,\n scroll: PT.bool,\n showSelectionKey: PT.bool,\n disabled: PT.bool\n});\nexport default SelectGroup;","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames } from '../../utils/functions';\nimport { Color as PColor } from '../../utils/types/palette';\nvar baseClassName = 'Backdrop';\nvar Backdrop = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-txa5a-0\"\n})(function (_ref) {\n var palette = _ref.theme.palette;\n return css([\"position:fixed;display:flex;align-items:center;justify-content:center;inset:0px;background-color:\", \";transition:opacity 251ms cubic-bezier(0.4,0,0.2,1) 0ms;opacity:1;z-index:-1;\"], palette[PColor.Extra_0_3_Overlay]);\n});\nvar Styled = applyDisplayNames({\n Backdrop: Backdrop\n});\nexport default Styled;","import _objectDestructuringEmpty from \"@babel/runtime/helpers/objectDestructuringEmpty\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport React from 'react';\nimport { intrinsicComponent } from '../../utils/functions';\nimport Styled from './backdrop.styles';\nvar Backdrop = intrinsicComponent(function (_ref, ref) {\n var rest = _extends({}, (_objectDestructuringEmpty(_ref), _ref));\n return /*#__PURE__*/React.createElement(Styled.Backdrop, _extends({}, rest, {\n ref: ref\n }));\n});\nBackdrop.defaultProps = {};\nBackdrop.propTypes = {};\nexport default Backdrop;","import styled, { css } from 'styled-components';\nimport { generateClassNames, applyDisplayNames, scrollBar } from '../../utils/functions';\nimport { Color as PColor } from '../../utils/types/palette';\nimport { Shadows as PShadows } from '../../utils/types/shadows';\nimport { FontVariant as FV } from '../../utils/types/typography/font-variant';\nimport Accordion from '../accordion/accordion.component';\nimport AccordionHeaderStyled from '../accordion-header/accordion-header.styles';\nimport AccordionDetailsStyled from '../accordion-details/accordion-details.styles';\nvar baseClassName = 'Drawer';\nvar TemporaryDrawer = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'temporary')\n}).withConfig({\n componentId: \"sc-1riasfx-0\"\n})(function (_ref) {\n var open = _ref.open;\n return css([\"position:absolute;inset:0px;z-index:1200;visibility:\", \";\"], !open && 'hidden');\n});\nvar PersistentDrawer = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'persistent')\n}).withConfig({\n componentId: \"sc-1riasfx-1\"\n})([\"\"]);\nvar Drawer = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'root')\n}).withConfig({\n componentId: \"sc-1riasfx-2\"\n})(function (_ref2) {\n var open = _ref2.open,\n isCollapsed = _ref2.isCollapsed,\n _ref2$top = _ref2.top,\n top = _ref2$top === void 0 ? 0 : _ref2$top,\n _ref2$theme = _ref2.theme,\n palette = _ref2$theme.palette,\n shadows = _ref2$theme.shadows,\n breakpoints = _ref2$theme.breakpoints;\n return css([\"display:flex;flex-direction:column;flex:1 0 auto;background-color:\", \";box-shadow:\", \";overflow-y:overlay;overflow-x:hidden;transform:\", \";visibility:\", \";transition:200ms;height:calc(100% - \", \"px);\", \"{margin-top:0px;height:100%;}\", \" &{margin-top:0px;height:100%;}box-sizing:border-box;width:\", \";padding:\", \";\", \"\"], palette[PColor.BackgroundStateless], shadows[PShadows.LeftPanelMd], open ? 'none' : 'translateX(-100%)', !open && 'hidden', top, breakpoints.down('md'), breakpoints.classes.sm, isCollapsed ? '68px' : '302px', isCollapsed && '0px 12px', scrollBar);\n});\nvar Header = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'header')\n}).withConfig({\n componentId: \"sc-1riasfx-3\"\n})(function (_ref3) {\n var isCollapsed = _ref3.isCollapsed;\n return css([\"display:\", \";justify-content:flex-start;align-items:center;position:relative;text-decoration:none;width:100%;box-sizing:border-box;text-align:left;margin-top:12px;transition:background-color 100ms ease-out;\"], isCollapsed ? 'none' : 'flex');\n});\nvar Body = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'body')\n}).withConfig({\n componentId: \"sc-1riasfx-4\"\n})([\"flex:1 1 auto;.SfxAccordionDetails-root{margin:0;}\"]);\nvar Footer = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'footer')\n}).withConfig({\n componentId: \"sc-1riasfx-5\"\n})(function (_ref4) {\n var isCollapsed = _ref4.isCollapsed;\n return css([\"display:flex;flex-direction:column;width:100%;padding:\", \";\"], isCollapsed ? '0px' : '0px 8px');\n});\nvar List = /*#__PURE__*/styled.ul.attrs({\n className: generateClassNames(baseClassName, 'list')\n}).withConfig({\n componentId: \"sc-1riasfx-6\"\n})(function () {\n return css([\"list-style:none;margin:12px 0;padding:0;position:relative;\"]);\n});\nvar Item = /*#__PURE__*/styled.li.attrs({\n className: generateClassNames(baseClassName, 'item')\n}).withConfig({\n componentId: \"sc-1riasfx-7\"\n})(function (_ref5) {\n var palette = _ref5.theme.palette,\n isCollapsed = _ref5.isCollapsed,\n selected = _ref5.selected;\n return css([\"display:\", \";justify-content:flex-start;align-items:center;position:relative;text-decoration:none;width:100%;box-sizing:border-box;text-align:left;padding:13px 16px;transition:background-color 100ms ease-out;margin-bottom:4px;cursor:pointer;&:hover{background-color:\", \";& > *{color:\", \";}}\", \"\"], isCollapsed ? 'none' : 'flex', palette[PColor.BackgroundActive], palette[PColor.AccentStateless], selected && css([\"background-color:\", \";& > *{color:\", \" !important;}\"], palette[PColor.BackgroundActive], palette[PColor.AccentStateless]));\n});\nvar ItemText = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'text')\n}).withConfig({\n componentId: \"sc-1riasfx-8\"\n})(function (_ref6) {\n var _ref6$theme = _ref6.theme,\n palette = _ref6$theme.palette,\n font = _ref6$theme.typography.font,\n fontKey = _ref6.font,\n isCollapsed = _ref6.isCollapsed;\n return css([\"flex:1 1 auto;color:\", \";\", \";transition:color 100ms ease-out;display:\", \";user-select:none;\"], palette[PColor.TextPrimary], font[fontKey || FV.LabelLarge], isCollapsed && 'none');\n});\nvar Icon = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'icon')\n}).withConfig({\n componentId: \"sc-1riasfx-9\"\n})(function (_ref7) {\n var palette = _ref7.theme.palette,\n isCollapsed = _ref7.isCollapsed;\n return css([\"display:flex;flex-shrink:0;color:\", \";margin-right:\", \";transition:color 100ms ease-out;\"], palette[PColor.IconsPrimary], isCollapsed ? '0px' : '12px');\n});\nvar ItemButton = /*#__PURE__*/styled.div.attrs({\n className: generateClassNames(baseClassName, 'item-button')\n}).withConfig({\n componentId: \"sc-1riasfx-10\"\n})(function (_ref8) {\n var palette = _ref8.theme.palette,\n isCollapsed = _ref8.isCollapsed,\n selected = _ref8.selected;\n return css([\"display:flex;justify-content:\", \";align-items:center;border-radius:4px;box-sizing:border-box;text-align:left;padding:\", \";transition:background-color 150ms cubic-bezier(0.4,0,0.2,1) 0ms;margin-bottom:8px;cursor:pointer;&:hover{background-color:\", \";& > *{color:\", \";}}\", \"\"], isCollapsed ? 'center' : 'flex-start', isCollapsed ? '13px' : '13px 16px', palette[PColor.BackgroundActive], palette[PColor.AccentStateless], selected && css([\"background-color:\", \";& > *{color:\", \";}\"], palette[PColor.BackgroundActive], palette[PColor.AccentStateless]));\n});\nvar CollapsedButton = /*#__PURE__*/styled(ItemButton).attrs({\n className: generateClassNames(baseClassName, 'item-button')\n}).withConfig({\n componentId: \"sc-1riasfx-11\"\n})(function (_ref9) {\n var isCollapsed = _ref9.isCollapsed;\n return css([\"\", \"\"], !isCollapsed && css([\"padding:13px 24px;\"]));\n});\nvar DrawerAccordion = /*#__PURE__*/styled(Accordion).attrs({\n className: generateClassNames(baseClassName, 'accordion')\n}).withConfig({\n componentId: \"sc-1riasfx-12\"\n})(function (_ref10) {\n var _ref10$theme = _ref10.theme,\n palette = _ref10$theme.palette,\n font = _ref10$theme.typography.font,\n selected = _ref10.selected;\n return css([\"\", \"{padding:13px 16px;transition:background-color 100ms ease-out;\", \"{\", \";color:\", \";}&:hover{background-color:\", \";& > *{color:\", \";}}\", \"}\", \"{padding:0px 16px;}\"], AccordionHeaderStyled.Header, AccordionHeaderStyled.Label, font[FV.LabelLargeEmphasis], palette[PColor.TextPrimary], palette[PColor.BackgroundActive], palette[PColor.AccentStateless], selected && css([\"\", \"{color:\", \";}\"], AccordionHeaderStyled.Label, palette[PColor.AccentStateless]), AccordionDetailsStyled.AccordionDetails);\n});\nvar Styled = applyDisplayNames({\n TemporaryDrawer: TemporaryDrawer,\n PersistentDrawer: PersistentDrawer,\n Drawer: Drawer,\n Header: Header,\n Body: Body,\n Footer: Footer,\n List: List,\n Item: Item,\n ItemButton: ItemButton,\n Icon: Icon,\n ItemText: ItemText,\n DrawerAccordion: DrawerAccordion,\n CollapsedButton: CollapsedButton\n});\nexport default Styled;","import { createContext } from 'react';\nvar DrawerContext = /*#__PURE__*/createContext({\n isCollapsed: false,\n size: 20\n});\nif (process.env.NODE_ENV !== 'production') {\n DrawerContext.displayName = 'DrawerContext';\n}\nexport default DrawerContext;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\", \"font\"];\nimport React, { useContext } from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport { FontVariant } from '../../utils/types/typography/font-variant';\nimport Styled from './drawer.styles';\nimport DrawerContext from './drawer.context';\nvar DrawerItemText = intrinsicComponent(function (_ref, ref) {\n var children = _ref.children,\n font = _ref.font,\n rest = _objectWithoutProperties(_ref, _excluded);\n var _useContext = useContext(DrawerContext),\n isCollapsed = _useContext.isCollapsed;\n return /*#__PURE__*/React.createElement(Styled.ItemText, _extends({\n font: font,\n isCollapsed: isCollapsed\n }, rest, {\n ref: ref\n }), children);\n});\nDrawerItemText.defaultProps = {};\nDrawerItemText.propTypes = {\n font: PT.oneOf(objectValues(FontVariant))\n};\nexport default DrawerItemText;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\", \"size\"];\nimport React, { useContext } from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent } from '../../utils/functions';\nimport Styled from './drawer.styles';\nimport DrawerContext from './drawer.context';\nvar DrawerItemIcon = intrinsicComponent(function (_ref, ref) {\n var children = _ref.children,\n iconSize = _ref.size,\n rest = _objectWithoutProperties(_ref, _excluded);\n var _useContext = useContext(DrawerContext),\n isCollapsed = _useContext.isCollapsed,\n size = _useContext.size;\n return /*#__PURE__*/React.createElement(Styled.Icon, _extends({}, rest, {\n isCollapsed: isCollapsed,\n ref: ref\n }), children && typeof children === 'function' ? children({\n size: size || iconSize\n }) : children);\n});\nDrawerItemIcon.defaultProps = {\n size: 20\n};\nDrawerItemIcon.propTypes = {\n size: PT.number,\n children: PT.oneOfType([PT.node, PT.func]).isRequired\n};\nexport default DrawerItemIcon;","export var Variant = {\n Auto: 'auto',\n Temporary: 'temporary',\n Persistent: 'persistent'\n};","import _defineProperty from \"@babel/runtime/helpers/defineProperty\";\nimport _extends from \"@babel/runtime/helpers/extends\";\nimport _slicedToArray from \"@babel/runtime/helpers/slicedToArray\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\", \"open\", \"iconsSize\", \"collapsed\", \"top\", \"hideBackdrop\", \"disablePortal\", \"collapseButtonLabel\", \"persistentDrawerStyles\", \"temproryDrawerStyles\", \"variant\", \"onClose\", \"onCollapse\", \"onCollapseClick\"];\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }\nimport React, { useState, useEffect, useMemo, useRef } from 'react';\nimport { createPortal } from 'react-dom';\nimport PT from 'prop-types';\nimport ArrowSidebarLeftOutline from '@scaleflex/icons/arrow-sidebar-left-outline';\nimport ArrowSidebarRightOutline from '@scaleflex/icons/arrow-sidebar-right-outline';\nimport { intrinsicComponent, objectValues } from '../../utils/functions';\nimport { useMediaQuery, useTheme } from '../../theme/hooks';\nimport DrawerItemText from './drawer-item-text-component';\nimport DrawerItemIcon from './drawer-item-icon.component';\nimport DrawerContext from './drawer.context';\nimport Backdrop from '../backdrop';\nimport Styled from './drawer.styles';\nimport { Variant } from './types';\nvar Drawer = intrinsicComponent(function (_ref, ref) {\n var children = _ref.children,\n open = _ref.open,\n _ref$iconsSize = _ref.iconsSize,\n iconsSize = _ref$iconsSize === void 0 ? 20 : _ref$iconsSize,\n _ref$collapsed = _ref.collapsed,\n collapsed = _ref$collapsed === void 0 ? false : _ref$collapsed,\n top = _ref.top,\n hideBackdrop = _ref.hideBackdrop,\n disablePortal = _ref.disablePortal,\n _ref$collapseButtonLa = _ref.collapseButtonLabel,\n collapseButtonLabel = _ref$collapseButtonLa === void 0 ? 'Collapse menu' : _ref$collapseButtonLa,\n _ref$persistentDrawer = _ref.persistentDrawerStyles,\n persistentDrawerStyles = _ref$persistentDrawer === void 0 ? {} : _ref$persistentDrawer,\n _ref$temproryDrawerSt = _ref.temproryDrawerStyles,\n temproryDrawerStyles = _ref$temproryDrawerSt === void 0 ? {} : _ref$temproryDrawerSt,\n _ref$variant = _ref.variant,\n variant = _ref$variant === void 0 ? Variant.Auto : _ref$variant,\n onClose = _ref.onClose,\n onCollapse = _ref.onCollapse,\n onCollapseClick = _ref.onCollapseClick,\n rest = _objectWithoutProperties(_ref, _excluded);\n var theme = useTheme();\n var matchDownXl = useMediaQuery(theme.breakpoints.down('xl'));\n var _useState = useState(collapsed),\n _useState2 = _slicedToArray(_useState, 2),\n isCollapsed = _useState2[0],\n setIsCollapsed = _useState2[1];\n var temproryDrawerRef = useRef(null);\n var DrawerIconsSize = useMemo(function () {\n return iconsSize;\n }, [iconsSize]);\n var target = document.querySelector('body');\n useEffect(function () {\n setIsCollapsed(collapsed);\n }, [collapsed]);\n useEffect(function () {\n if (onCollapse) {\n onCollapse(isCollapsed);\n }\n }, [isCollapsed]);\n var handleCollapse = function handleCollapse() {\n var newCollpaseState = !isCollapsed;\n setIsCollapsed(newCollpaseState);\n if (onCollapseClick) {\n onCollapseClick(newCollpaseState);\n }\n };\n var handleClose = function handleClose() {\n if (typeof onClose === 'function') {\n onClose();\n }\n };\n var keyListener = function keyListener(ev) {\n var isTemporaryDrawer = false;\n if (temproryDrawerRef !== null && temproryDrawerRef !== void 0 && temproryDrawerRef.current) {\n var _temproryDrawerRef$cu;\n isTemporaryDrawer = (temproryDrawerRef === null || temproryDrawerRef === void 0 ? void 0 : (_temproryDrawerRef$cu = temproryDrawerRef.current) === null || _temproryDrawerRef$cu === void 0 ? void 0 : _temproryDrawerRef$cu.offsetWidth) > 0;\n }\n if (ev.key === 'Escape' && isTemporaryDrawer) {\n handleClose();\n }\n };\n useEffect(function () {\n document.addEventListener('keydown', keyListener);\n return function () {\n return document.removeEventListener('keydown', keyListener);\n };\n }, []);\n var renderDrawer = function renderDrawer(showCollapsedButton) {\n return /*#__PURE__*/React.createElement(Styled.Drawer, _extends({\n open: open,\n top: top\n }, rest, {\n isCollapsed: showCollapsedButton ? isCollapsed : false,\n ref: ref\n }), children, showCollapsedButton && /*#__PURE__*/React.createElement(Styled.CollapsedButton, {\n onClick: handleCollapse,\n isCollapsed: isCollapsed\n }, /*#__PURE__*/React.createElement(DrawerItemIcon, null, isCollapsed ? function (props) {\n return /*#__PURE__*/React.createElement(ArrowSidebarRightOutline, _extends({}, props, {\n size: iconsSize\n }));\n } : function (props) {\n return /*#__PURE__*/React.createElement(ArrowSidebarLeftOutline, _extends({}, props, {\n size: iconsSize\n }));\n }), /*#__PURE__*/React.createElement(DrawerItemText, null, collapseButtonLabel)));\n };\n var renderBackdrop = function renderBackdrop() {\n return !hideBackdrop && open ? /*#__PURE__*/React.createElement(Backdrop, {\n onClick: onClose\n }) : null;\n };\n var temporaryDrawer = function temporaryDrawer() {\n return disablePortal ? /*#__PURE__*/React.createElement(Styled.TemporaryDrawer, {\n ref: temproryDrawerRef,\n style: _objectSpread({}, temproryDrawerStyles),\n open: open\n }, renderBackdrop(), renderDrawer(false)) : /*#__PURE__*/createPortal( /*#__PURE__*/React.createElement(Styled.TemporaryDrawer, {\n ref: temproryDrawerRef,\n style: _objectSpread({}, temproryDrawerStyles),\n open: open\n }, renderBackdrop(), renderDrawer(false)), target);\n };\n var persistentDrawer = function persistentDrawer() {\n return /*#__PURE__*/React.createElement(Styled.PersistentDrawer, {\n style: _objectSpread({}, persistentDrawerStyles)\n }, renderDrawer(true));\n };\n var getDrawerVariant = function getDrawerVariant() {\n switch (variant) {\n case Variant.Auto:\n return matchDownXl ? temporaryDrawer() : persistentDrawer();\n case Variant.Temporary:\n return temporaryDrawer();\n case Variant.Persistent:\n return persistentDrawer();\n default:\n return matchDownXl ? temporaryDrawer() : persistentDrawer();\n }\n };\n return /*#__PURE__*/React.createElement(DrawerContext.Provider, {\n value: {\n isCollapsed: !matchDownXl ? isCollapsed : false,\n size: DrawerIconsSize\n }\n }, getDrawerVariant());\n});\nexport var defaultProps = {\n open: false,\n hideBackdrop: false,\n iconsSize: 20,\n variant: Variant.Auto\n};\nDrawer.defaultProps = defaultProps;\nexport var propTypes = {\n onClose: PT.func.isRequired,\n onCollapse: PT.func,\n onCollapseClick: PT.func,\n children: PT.node.isRequired,\n top: PT.number,\n iconsSize: PT.number,\n open: PT.bool,\n hideBackdrop: PT.bool,\n collapsed: PT.bool,\n disablePortal: PT.bool,\n collapseButtonLabel: PT.string,\n persistentDrawerStyles: PT.object,\n temproryDrawerStyles: PT.object,\n variant: PT.oneOf(objectValues(Variant))\n};\nDrawer.propTypes = propTypes;\nexport default Drawer;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\"];\nimport React, { useContext } from 'react';\nimport { intrinsicComponent } from '../../utils/functions';\nimport DrawerContext from './drawer.context';\nimport Styled from './drawer.styles';\nvar DrawerHeader = intrinsicComponent(function (_ref, ref) {\n var children = _ref.children,\n rest = _objectWithoutProperties(_ref, _excluded);\n var _useContext = useContext(DrawerContext),\n isCollapsed = _useContext.isCollapsed;\n return /*#__PURE__*/React.createElement(Styled.Header, _extends({}, rest, {\n isCollapsed: isCollapsed,\n ref: ref\n }), children);\n});\nDrawerHeader.defaultProps = {};\nDrawerHeader.propTypes = {};\nexport default DrawerHeader;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\"];\nimport React from 'react';\nimport { intrinsicComponent } from '../../utils/functions';\nimport Styled from './drawer.styles';\nvar DrawerBody = intrinsicComponent(function (_ref, ref) {\n var children = _ref.children,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Styled.Body, _extends({}, rest, {\n ref: ref\n }), children);\n});\nDrawerBody.defaultProps = {};\nDrawerBody.propTypes = {};\nexport default DrawerBody;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\"];\nimport React from 'react';\nimport { intrinsicComponent } from '../../utils/functions';\nimport Styled from './drawer.styles';\nvar DrawerList = intrinsicComponent(function (_ref, ref) {\n var children = _ref.children,\n rest = _objectWithoutProperties(_ref, _excluded);\n return /*#__PURE__*/React.createElement(Styled.List, _extends({}, rest, {\n ref: ref\n }), children);\n});\nDrawerList.defaultProps = {};\nDrawerList.propTypes = {};\nexport default DrawerList;","import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutProperties from \"@babel/runtime/helpers/objectWithoutProperties\";\nvar _excluded = [\"children\", \"selected\"];\nimport React, { useContext } from 'react';\nimport PT from 'prop-types';\nimport { intrinsicComponent } from '../../utils/functions';\nimport DrawerContext from './drawer.context';\nimport Styled from './drawer.styles';\nvar DrawerItem = intrinsicComponent(function (_ref, ref) {\n var children = _ref.children,\n selected = _ref.selected,\n rest = _objectWithoutProperties(_ref, _excluded);\n var _useContext = useContext(DrawerContext),\n isCollapsed = _useContext.isCollapsed;\n return /*#__PURE__*/React.createElement(Styled.Item, _extends({\n selected: selected,\n isCollapsed: isCollapsed\n }, rest, {\n ref: ref\n }), children);\n});\nDrawerItem.defaultProps = {\n selected: false\n};\nDrawerItem.propTypes = {\n selected: PT.bool\n};\nexport default DrawerItem;","import{Input,Label}from\"@scaleflex/ui/core\";import styled from\"styled-components\";import{FontVariant as FV}from\"@scaleflex/ui/utils/types/typography\";var StyledHSVOptions=styled.div.withConfig({componentId:\"sc-1rfxjvn-0\"})([\"display:flex;width:100%;justify-content:space-between;gap:10px;.SfxSlider-root{min-width:100px;}\",\"\"],function(a){var b=a.isPhoneScreen;return b&&\"\\n flex-direction: column;\\n\\n .SfxSlider-root {\\n min-width: 230px;\\n }\\n \"}),StyledSliderContainer=styled.div.withConfig({componentId:\"sc-1rfxjvn-1\"})([\"display:flex;flex-direction:column;\"]),StyledSliderLabel=styled(Label).withConfig({componentId:\"sc-1rfxjvn-2\"})([\"\",\";\"],function(a){var b=a.theme;return b.typography.font[FV.LabelExtraSmallUp]}),StyledSliderWrapper=styled.div.withConfig({componentId:\"sc-1rfxjvn-3\"})([\"display:flex;align-items:center;\"]),StyledSliderInput=styled(Input).withConfig({componentId:\"sc-1rfxjvn-4\"})([\"display:inline-block;width:40px;height:28px;padding:6px 2px;margin-left:10px;border:none;.SfxInput-Base{text-align:center;}\"]);export{StyledHSVOptions,StyledSliderContainer,StyledSliderLabel,StyledSliderWrapper,StyledSliderInput};","import _slicedToArray from\"@babel/runtime/helpers/slicedToArray\";import React from\"react\";import Konva from\"konva\";import{useFinetune}from\"../../../hooks\";import restrictNumber from\"../../../utils/restrictNumber\";import Slider from\"../../common/Slider\";import{StyledSliderContainer,StyledSliderInput,StyledSliderLabel,StyledSliderWrapper}from\"../tools.styled\";var MIN_VALUE=-1,DEFAULT_VALUE={brightness:0},MAX_VALUE=1,sliderStyle={width:150,padding:0,margin:0},BrightnessOptions=function(a){var b,c,d=a.t,e=useFinetune(Konva.Filters.Brighten,DEFAULT_VALUE),f=_slicedToArray(e,2),g=f[0],h=f[1],i=function(a){h({brightness:restrictNumber(a,MIN_VALUE,MAX_VALUE)})};return React.createElement(StyledSliderContainer,{className:\"FIE_brightness-option-wrapper\"},React.createElement(StyledSliderLabel,{className:\"FIE_brightness-option-label\"},d(\"brightness\")),React.createElement(StyledSliderWrapper,null,React.createElement(Slider,{className:\"FIE_brightness-option\",min:MIN_VALUE,step:.05,max:MAX_VALUE,width:\"124px\",value:null!==(b=g.brightness)&&void 0!==b?b:DEFAULT_VALUE.brightness,onChange:i,style:sliderStyle}),React.createElement(StyledSliderInput,{value:null!==(c=g.brightness)&&void 0!==c?c:DEFAULT_VALUE.brightness,onChange:function onChange(a){var b=a.target.value;return i(b)}})))};export default BrightnessOptions;","import{DEFAULT_ZOOM_FACTOR}from\"./constants\";var getZoomFitFactor=function(a,b){return Math.min(a.width/b.width,a.height/b.height)||DEFAULT_ZOOM_FACTOR};export default getZoomFitFactor;","import Custom from\"@scaleflex/icons/custom\";import Ellipse from\"@scaleflex/icons/ellipse\";import Landscape from\"@scaleflex/icons/landscape\";import Portrait from\"@scaleflex/icons/portrait\";import ImageOutline from\"@scaleflex/icons/image-outline\";import{CUSTOM_CROP,ELLIPSE_CROP,ORIGINAL_CROP}from\"../../../utils/constants\";import toPrecisedFloat from\"../../../utils/toPrecisedFloat\";export var DEFAULT_CROP_PRESETS=[{titleKey:\"custom\",ratio:CUSTOM_CROP,icon:Custom,hide:function hide(){var a=0n.width||d.height>n.height?getZoomFitFactor(n,d):DEFAULT_ZOOM_FACTOR}})),c()};return React.createElement(React.Fragment,null,React.createElement(StyledToolsBarItemButtonWrapper,null,React.createElement(StyledToolsBarItemButtonLabel,{className:\"FIE_crop-tool-label FIE_selected-crop-preset-label\",isPhoneScreen:r},g(l||\"cropTool\")),React.createElement(StyledOpenMenuButton,{className:\"FIE_crop-presets-opener-button\",color:\"link-secondary\",size:\"lg\"},b?React.createElement(MoveUpOutline,{size:10}):React.createElement(MoveDownOutline,{size:10}))),React.createElement(Menu,{className:\"FIE_crop-presets-menu\",anchorEl:b,enableOverlay:!0,onClose:c,open:!!b,position:\"top\",popperOptions:{modifiers:[{name:\"offset\",options:{offset:[0,4]}}]},maxHeight:\"100%\"},React.createElement(StyledMenu,null,s.map(function renderPreset(a){var b=a.titleKey,c=a.descriptionKey,d=a.ratio,e=a.width,f=a.height,h=a.groups,i=a.icon,j=a.disableManualResize,l=a.noEffect;return h?React.createElement(CropPresetGroupsList,{key:b,titleKey:b,groups:h,Icon:i,theme:p,onItemSelect:t,t:g,disableManualResize:j}):React.createElement(CropPresetItem,{key:d,ratio:null!==d&&void 0!==d?d:toPrecisedFloat(e/f),titleKey:b,t:g,description:g(c),Icon:i,isActive:(k||ORIGINAL_CROP)===(null!==d&&void 0!==d?d:toPrecisedFloat(e/f))&&!m,theme:p,width:e,height:f,onClick:t,disableManualResize:j,noEffect:l})}))))};CropPresetsOption.defaultProps={anchorEl:null};export default CropPresetsOption;","import _slicedToArray from\"@babel/runtime/helpers/slicedToArray\";import React,{useState}from\"react\";import{Crop as CropIcon}from\"@scaleflex/icons/crop\";import{useStore}from\"../../../hooks\";import ToolsBarItemButton from\"../../ToolsBar/ToolsBarItemButton\";import{TOOLS_IDS}from\"../../../utils/constants\";import{StyledToolsBarItemButtonLabel}from\"../../ToolsBar/ToolsBar.styled\";import CropPresetsOption from\"./CropPresetsOption\";var Crop=function(a){var b=a.selectTool,c=a.isSelected,d=useStore(),e=d.config,f=d.t,g=useState(),h=_slicedToArray(g,2),i=h[0],j=h[1];return React.createElement(ToolsBarItemButton,{className:\"FIE_crop-tool\",id:TOOLS_IDS.CROP,Icon:CropIcon,onClick:function selectToolAndShowPresets(a,c){b(a),j(c.currentTarget)},isSelected:c},e[TOOLS_IDS.CROP].noPresets?React.createElement(StyledToolsBarItemButtonLabel,{className:\"FIE_crop-tool-label\"},f(\"cropTool\")):React.createElement(CropPresetsOption,{anchorEl:i,onClose:function closeCropPresets(){j(null)}}))};Crop.defaultProps={isSelected:!1};export default Crop;","import React,{useCallback,useMemo}from\"react\";import{FlipX as FlipXIcon}from\"@scaleflex/icons/flip-x\";import ToolsBarItemButton from\"../../ToolsBar/ToolsBarItemButton\";import{FLIP_DIRECTIONS,TOOLS_IDS}from\"../../../utils/constants\";import{TOGGLE_FLIP}from\"../../../actions\";import{usePhoneScreen,useStore}from\"../../../hooks\";var xFlipReverseSideStyle={transform:\"scaleX(-1)\"},FlipX=function(a){var b=a.selectTool,c=a.isSelected,d=a.t,e=useStore(),f=e.dispatch,g=e.adjustments.isFlippedX,h=usePhoneScreen(320),i=useMemo(function(){return{reverseLabelOfCurrXFlipDir:g?d(\"unFlipX\"):d(\"flipX\"),reverseIconOfCurrXFlipDir:function(){return React.createElement(FlipXIcon,{size:h?20:16,style:g?xFlipReverseSideStyle:void 0})}}},[g]),j=i.reverseLabelOfCurrXFlipDir,k=i.reverseIconOfCurrXFlipDir,l=useCallback(function(){f({type:TOGGLE_FLIP,payload:{direction:FLIP_DIRECTIONS.X}})},[]),m=useCallback(function(a){b(a),l()},[]);return React.createElement(ToolsBarItemButton,{className:\"FIE_flip-x-tool-button\",id:TOOLS_IDS.FLIP_X,label:j,Icon:k,onClick:m,isSelected:c})};FlipX.defaultProps={isSelected:!1};export default FlipX;","import React,{useCallback,useMemo}from\"react\";import{FlipY as FlipYIcon}from\"@scaleflex/icons/flip-y\";import ToolsBarItemButton from\"../../ToolsBar/ToolsBarItemButton\";import{FLIP_DIRECTIONS,TOOLS_IDS}from\"../../../utils/constants\";import{TOGGLE_FLIP}from\"../../../actions\";import{usePhoneScreen,useStore}from\"../../../hooks\";var xFlipReverseSideStyle={transform:\"scaleY(-1)\"},FlipY=function(a){var b=a.selectTool,c=a.isSelected,d=a.t,e=useStore(),f=e.dispatch,g=e.adjustments.isFlippedY,h=usePhoneScreen(320),i=useMemo(function(){return{reverseLabelOfCurrXFlipDir:g?d(\"unFlipY\"):d(\"flipY\"),reverseIconOfCurrXFlipDir:function(){return React.createElement(FlipYIcon,{size:h?20:16,style:g?xFlipReverseSideStyle:void 0})}}},[g]),j=i.reverseLabelOfCurrXFlipDir,k=i.reverseIconOfCurrXFlipDir,l=useCallback(function(){f({type:TOGGLE_FLIP,payload:{direction:FLIP_DIRECTIONS.Y}})},[]),m=useCallback(function(a){b(a),l()},[]);return React.createElement(ToolsBarItemButton,{className:\"FIE_flip-y-tool-button\",id:TOOLS_IDS.FLIP_Y,label:j,Icon:k,onClick:m,isSelected:c})};FlipY.defaultProps={isSelected:!1};export default FlipY;","import React from\"react\";import{RotationLeft as RotateIcon}from\"@scaleflex/icons/rotation-left\";import ToolsBarItemButton from\"../../ToolsBar/ToolsBarItemButton\";import{TOOLS_IDS}from\"../../../utils/constants\";var RotateButton=function(a){var b=a.selectTool,c=a.isSelected,d=a.t;return React.createElement(ToolsBarItemButton,{className:\"FIE_rotate-tool-button\",id:TOOLS_IDS.ROTATE,label:d(\"rotateTool\"),Icon:RotateIcon,onClick:b,isSelected:c})};RotateButton.defaultProps={isSelected:!1};export default RotateButton;","import styled from\"styled-components\";import{IconButton,RotationSlider}from\"@scaleflex/ui/core\";import{Color as PC}from\"@scaleflex/ui/utils/types/palette\";var StyledRotationOptions=styled.div.withConfig({componentId:\"sc-wbx58r-0\"})([\"display:flex;align-items:center;gap:16px;\"]),StyledRotationSlider=styled(RotationSlider).withConfig({componentId:\"sc-wbx58r-1\"})([\".SfxRotationSlider-control{width:1px;height:10px;background-color:\",\";&:before{box-shadow:unset;}}.SfxRotationSlider-mark,.SfxRotationSlider-small-dot-wrapper{padding:0;.SfxRotationSlider-mark-text{top:10px;}.SfxRotationSlider-big-dot{width:4px;height:4px;}.SfxRotationSlider-small-dot{width:1px;height:1px;}}.SfxRotationSlider-list{gap:4px;}\"],function(a){var b=a.theme.palette;return b[PC.IconsSecondary]}),StyledRotateButton=styled(IconButton).withConfig({componentId:\"sc-wbx58r-2\"})([\"\"]);export{StyledRotationOptions,StyledRotationSlider,StyledRotateButton};","import React from\"react\";import RotationLeft from\"@scaleflex/icons/rotation-left\";import RotationRight from\"@scaleflex/icons/rotation-right\";import{Rotate90}from\"@scaleflex/icons\";import{useDebouncedCallback,usePhoneScreen,useStore}from\"../../../hooks\";import{CHANGE_ROTATION,SET_RESIZE}from\"../../../actions\";import restrictNumber from\"../../../utils/restrictNumber\";import getSizeAfterRotation from\"../../../utils/getSizeAfterRotation\";import{TOOLS_IDS}from\"../../../utils/constants\";import ToolsBarItemButton from\"../../ToolsBar/ToolsBarItemButton\";import{StyledRotationOptions,StyledRotationSlider,StyledRotateButton}from\"./Rotate.styled\";var RotateOptions=function(){var a=useStore(),b=a.dispatch,c=a.adjustments.rotation,d=void 0===c?0:c,e=a.resize,f=void 0===e?{}:e,g=a.config,h=g[TOOLS_IDS.ROTATE],i=usePhoneScreen(),j=useDebouncedCallback(function(a,c){var d=restrictNumber(c,-180,180);if(b({type:CHANGE_ROTATION,payload:{rotation:d}}),f.width&&f.height){var e=getSizeAfterRotation(f.width,f.height,d);b({type:SET_RESIZE,payload:{width:e.width,height:e.height}})}},20);return\"buttons\"===h.componentType?React.createElement(React.Fragment,null,React.createElement(ToolsBarItemButton,{className:\"FIE_rotate_button_left\",id:TOOLS_IDS.IMAGE,label:\"-\".concat(h.angle,\"\\xB0\"),Icon:RotationLeft,onClick:function changeRotationButtonNegative(a){var b=d-h.angle;j(a,b)}}),React.createElement(ToolsBarItemButton,{className:\"FIE_rotate_button_right\",id:TOOLS_IDS.IMAGE,label:\"+\".concat(h.angle,\"\\xB0\"),Icon:RotationRight,onClick:function changeRotationButtonPositive(a){var b=d+h.angle;j(a,b)}})):React.createElement(StyledRotationOptions,null,React.createElement(StyledRotationSlider,{className:\"FIE_rotate-slider\",showCurrentMarkText:!0,min:-180,max:180,step:i?h.angle/3:1,value:d,angle:h.angle||90,onChange:j}),React.createElement(StyledRotateButton,{size:\"sm\",color:\"basic\",onClick:function onClick(a){return j(a,d+90)}},React.createElement(Rotate90,{width:15})))};export default RotateOptions;","import React from\"react\";import{Contrast as ContrastIcon}from\"@scaleflex/icons/contrast\";import ToolsBarItemButton from\"../../ToolsBar/ToolsBarItemButton\";import{TOOLS_IDS}from\"../../../utils/constants\";var Contrast=function(a){var b=a.selectTool,c=a.isSelected,d=a.t;return React.createElement(ToolsBarItemButton,{className:\"FIE_contrast-tool-button\",id:TOOLS_IDS.CONTRAST,label:d(\"contrastTool\"),Icon:ContrastIcon,onClick:b,isSelected:c})};Contrast.defaultProps={isSelected:!1};export default Contrast;","import _slicedToArray from\"@babel/runtime/helpers/slicedToArray\";import React from\"react\";import Konva from\"konva\";import{useFinetune}from\"../../../hooks\";import restrictNumber from\"../../../utils/restrictNumber\";import Slider from\"../../common/Slider\";import{StyledSliderContainer,StyledSliderInput,StyledSliderLabel,StyledSliderWrapper}from\"../tools.styled\";var MIN_VALUE=-100,DEFAULT_VALUE={contrast:0},MAX_VALUE=100,sliderStyle={width:150,padding:0,margin:0},ContrastOptions=function(a){var b,c,d=a.t,e=useFinetune(Konva.Filters.Contrast,DEFAULT_VALUE),f=_slicedToArray(e,2),g=f[0],h=f[1],i=function(a){h({contrast:restrictNumber(a,MIN_VALUE,MAX_VALUE)})};return React.createElement(StyledSliderContainer,{className:\"FIE_contrast-option-wrapper\"},React.createElement(StyledSliderLabel,{className:\"FIE_contrast-option-label\"},d(\"contrastTool\")),React.createElement(StyledSliderWrapper,null,React.createElement(Slider,{className:\"FIE_contrast-option\",min:MIN_VALUE,max:MAX_VALUE,width:\"124px\",value:null!==(b=g.contrast)&&void 0!==b?b:DEFAULT_VALUE.contrast,onChange:i,style:sliderStyle}),React.createElement(StyledSliderInput,{value:null!==(c=g.contrast)&&void 0!==c?c:DEFAULT_VALUE.contrast,onChange:function onChange(a){var b=a.target.value;return i(b)}})))};export default ContrastOptions;","import React from\"react\";import{Saturation as SaturationIcon}from\"@scaleflex/icons/saturation\";import ToolsBarItemButton from\"../../ToolsBar/ToolsBarItemButton\";import{TOOLS_IDS}from\"../../../utils/constants\";var HSV=function(a){var b=a.selectTool,c=a.isSelected,d=a.t;return React.createElement(ToolsBarItemButton,{className:\"FIE_hsv-tool-button\",id:TOOLS_IDS.HSV,label:d(\"hsvTool\"),Icon:SaturationIcon,onClick:b,isSelected:c})};HSV.defaultProps={isSelected:!1};export default HSV;","import _defineProperty from\"@babel/runtime/helpers/defineProperty\";import _slicedToArray from\"@babel/runtime/helpers/slicedToArray\";import React from\"react\";import Konva from\"konva\";import{useFinetune,usePhoneScreen}from\"../../../hooks\";import Slider from\"../../common/Slider\";import{StyledHSVOptions,StyledSliderContainer,StyledSliderLabel,StyledSliderInput,StyledSliderWrapper}from\"../tools.styled\";var DEFAULT_VALUE={hue:0,saturation:0,value:0},MAX_VALUE={hue:259,saturation:10,value:2},sliderStyle={padding:0,margin:0},isPhoneScreen=usePhoneScreen(),HSVOptions=function(a){var b,c,d,e,f,g,h=a.t,i=useFinetune(Konva.Filters.HSV,DEFAULT_VALUE),j=_slicedToArray(i,2),k=j[0],l=j[1],m=function(a,b){l(_defineProperty({},a,b>MAX_VALUE[a]?MAX_VALUE[a]:+b))};return React.createElement(StyledHSVOptions,{isPhoneScreen:isPhoneScreen},React.createElement(StyledSliderContainer,{className:\"FIE_hue-option-wrapper\"},React.createElement(StyledSliderLabel,{className:\"FIE_hue-option-label\"},h(\"hue\")),React.createElement(StyledSliderWrapper,null,React.createElement(Slider,{className:\"FIE_hue-option\",min:0,step:1,max:259,value:null!==(b=k.hue)&&void 0!==b?b:DEFAULT_VALUE.hue,onChange:function onChange(a){return m(\"hue\",a)},style:sliderStyle}),React.createElement(StyledSliderInput,{value:null!==(c=k.hue)&&void 0!==c?c:DEFAULT_VALUE.hue,onChange:function onChange(a){var b=a.target.value;return m(\"hue\",b)}}))),React.createElement(StyledSliderContainer,{className:\"FIE_saturation-option-wrapper\"},React.createElement(StyledSliderLabel,{className:\"FIE_saturation-option-label\"},h(\"saturation\")),React.createElement(StyledSliderWrapper,null,React.createElement(Slider,{className:\"FIE_saturation-option\",min:-2,step:.5,max:10,value:null!==(d=k.saturation)&&void 0!==d?d:DEFAULT_VALUE.saturation,onChange:function onChange(a){return m(\"saturation\",a)},style:sliderStyle}),React.createElement(StyledSliderInput,{value:null!==(e=k.saturation)&&void 0!==e?e:DEFAULT_VALUE.saturation,onChange:function onChange(a){var b=a.target.value;return m(\"saturation\",b)}}))),React.createElement(StyledSliderContainer,{className:\"FIE_value-option-wrapper\"},React.createElement(StyledSliderLabel,{className:\"FIE_value-option-label\"},h(\"value\")),React.createElement(StyledSliderWrapper,null,React.createElement(Slider,{className:\"FIE_value-option\",min:-2,step:.1,max:2,value:null!==(f=k.value)&&void 0!==f?f:DEFAULT_VALUE.value,onChange:function onChange(a){return m(\"value\",a)},style:sliderStyle}),React.createElement(StyledSliderInput,{value:null!==(g=k.value)&&void 0!==g?g:DEFAULT_VALUE.value,onChange:function onChange(a){var b=a.target.value;return m(\"value\",b)}}))))};export default HSVOptions;","import React from\"react\";import{Blur as BlurIcon}from\"@scaleflex/icons/blur\";import ToolsBarItemButton from\"../../ToolsBar/ToolsBarItemButton\";import{TOOLS_IDS}from\"../../../utils/constants\";var Blur=function(a){var b=a.selectTool,c=a.isSelected,d=a.t;return React.createElement(ToolsBarItemButton,{className:\"FIE_blur-tool-button\",id:TOOLS_IDS.BLUR,label:d(\"blurTool\"),Icon:BlurIcon,onClick:b,isSelected:c})};Blur.defaultProps={isSelected:!1};export default Blur;","import _slicedToArray from\"@babel/runtime/helpers/slicedToArray\";import React from\"react\";import Konva from\"konva\";import{useFinetune}from\"../../../hooks\";import restrictNumber from\"../../../utils/restrictNumber\";import Slider from\"../../common/Slider\";import{StyledSliderContainer,StyledSliderInput,StyledSliderLabel,StyledSliderWrapper}from\"../tools.styled\";var MIN_VALUE=0,DEFAULT_VALUE={blurRadius:0},MAX_VALUE=100,sliderStyle={width:150,padding:0,margin:0},BlurOptions=function(a){var b,c,d=a.t,e=useFinetune(Konva.Filters.Blur,DEFAULT_VALUE),f=_slicedToArray(e,2),g=f[0],h=f[1],i=function(a){h({blurRadius:restrictNumber(a,MIN_VALUE,MAX_VALUE)})};return React.createElement(StyledSliderContainer,{className:\"FIE_blur-option-wrapper\"},React.createElement(StyledSliderLabel,{className:\"FIE_blur-option-label\"},d(\"blur\")),React.createElement(StyledSliderWrapper,null,React.createElement(Slider,{className:\"FIE_blur-option\",min:MIN_VALUE,max:MAX_VALUE,width:\"124px\",value:null!==(b=g.blurRadius)&&void 0!==b?b:DEFAULT_VALUE.blurRadius,onChange:i,style:sliderStyle}),React.createElement(StyledSliderInput,{value:null!==(c=g.blurRadius)&&void 0!==c?c:DEFAULT_VALUE.blurRadius,onChange:function onChange(a){var b=a.target.value;return i(b)}})))};export default BlurOptions;","import React from\"react\";import{Temprature as WarmthIcon}from\"@scaleflex/icons/tempreture\";import ToolsBarItemButton from\"../../ToolsBar/ToolsBarItemButton\";import{TOOLS_IDS}from\"../../../utils/constants\";var Warmth=function(a){var b=a.selectTool,c=a.isSelected,d=a.t;return React.createElement(ToolsBarItemButton,{className:\"FIE_warmth-tool-button\",id:TOOLS_IDS.WARMTH,label:d(\"warmthTool\"),Icon:WarmthIcon,onClick:b,isSelected:c})};Warmth.defaultProps={isSelected:!1};export default Warmth;","import _slicedToArray from\"@babel/runtime/helpers/slicedToArray\";import React from\"react\";import{useFinetune}from\"../../../hooks\";import restrictNumber from\"../../../utils/restrictNumber\";import{Warmth as CustomWarmth}from\"../../../custom/finetunes\";import Slider from\"../../common/Slider\";import{StyledSliderContainer,StyledSliderInput,StyledSliderLabel,StyledSliderWrapper}from\"../tools.styled\";var MIN_VALUE=0,DEFAULT_VALUE={warmth:0},MAX_VALUE=200,sliderStyle={width:150,padding:0,margin:0},WarmthOptions=function(a){var b,c,d=a.t,e=useFinetune(CustomWarmth,DEFAULT_VALUE),f=_slicedToArray(e,2),g=f[0],h=f[1],i=function(a){h({warmth:restrictNumber(a,MIN_VALUE,MAX_VALUE)})};return React.createElement(StyledSliderContainer,{className:\"FIE_warmth-option-wrapper\"},React.createElement(StyledSliderLabel,{className:\"FIE_warmth-option-label\"},d(\"warmthTool\")),React.createElement(StyledSliderWrapper,null,React.createElement(Slider,{className:\"FIE_warmth-option\",min:MIN_VALUE,max:MAX_VALUE,width:\"124px\",value:null!==(b=g.warmth)&&void 0!==b?b:DEFAULT_VALUE.warmth,onChange:i,style:sliderStyle}),React.createElement(StyledSliderInput,{value:null!==(c=g.warmth)&&void 0!==c?c:DEFAULT_VALUE.warmth,onChange:function onChange(a){var b=a.target.value;return i(b)}})))};export default WarmthOptions;","import styled,{css}from\"styled-components\";import{Color as PC}from\"@scaleflex/ui/utils/types/palette\";var StyledCarouselWrapper=styled.div.withConfig({componentId:\"sc-1nr0bka-0\"})([\"max-width:680px;min-width:150px;position:relative;overflow:hidden;touch-action:pan-y pinch-zoom;\"]),StyledCarousel=styled.ul.withConfig({componentId:\"sc-1nr0bka-1\"})([\"padding:0;margin:0;white-space:nowrap;overflow:hidden;\"]),StyledCarouselItem=styled.li.withConfig({componentId:\"sc-1nr0bka-2\"})([\"padding:4px;display:inline-block;list-style-type:none;user-select:none;\"]),arrowsCommonStyles=css([\"position:absolute;top:0;height:100%;width:60px;cursor:pointer;display:flex;align-items:center;justify-content:center;z-index:1;svg{color:\",\";}\"],function(a){var b=a.theme.palette;return b[PC.IconsSecondary]}),StyledPrevArrowWrapper=styled.div.withConfig({componentId:\"sc-1nr0bka-3\"})([\"\",\" left:0;justify-content:flex-start;background:linear-gradient( 90deg,#ffffff 1.56%,rgba(255,255,255,0.89) 52.4%,rgba(255,255,255,0.532165) 76.04%,rgba(255,255,255,0) 100% );\"],arrowsCommonStyles),StyledNextArrowWrapper=styled.div.withConfig({componentId:\"sc-1nr0bka-4\"})([\"\",\" right:0;justify-content:flex-end;background:linear-gradient( 270deg,#ffffff 1.56%,rgba(255,255,255,0.89) 52.4%,rgba(255,255,255,0.532165) 76.04%,rgba(255,255,255,0) 100% );\"],arrowsCommonStyles);export{StyledCarouselWrapper,StyledCarousel,StyledCarouselItem,StyledPrevArrowWrapper,StyledNextArrowWrapper};","import _slicedToArray from\"@babel/runtime/helpers/slicedToArray\";import React,{Children,useRef,useState,useEffect}from\"react\";import{ArrowLeftOutline,ArrowRightOutline}from\"@scaleflex/icons\";import{useResizeObserver}from\"../../../hooks\";import debounce from\"../../../utils/debounce\";import getScrollOffset from\"../../../utils/getScrollOffset\";import{StyledCarouselWrapper,StyledCarousel,StyledCarouselItem,StyledNextArrowWrapper,StyledPrevArrowWrapper}from\"./Carousel.styled\";var Carousel=function(a){var b=a.children,c=a.style,d=a.className,f=useRef(!1),g=useRef(),h=useResizeObserver(),i=_slicedToArray(h,1),j=i[0],k=useState(!1),l=_slicedToArray(k,2),m=l[0],n=l[1],o=useState(!1),p=_slicedToArray(o,2),q=p[0],r=p[1],s=Children.toArray(b),t=function(){if(g.current){var a=g.current,b=a.scrollWidth,c=a.offsetWidth,d=a.scrollLeft,e=Math.round(b-c),f=Math.round(e-d);n(0j,l=k?MAX_FILTER_PREVIEW_WIDTH:MAX_FILTER_PREVIEW_HEIGHT*j,m=k?MAX_FILTER_PREVIEW_WIDTH/j:MAX_FILTER_PREVIEW_HEIGHT;return React.createElement(StyledFilterItem,{className:\"FIE_filters-item\",onClick:h,\"aria-selected\":e},React.createElement(FilterItemPreview,{className:\"FIE_filters-item-preview\",width:MAX_FILTER_PREVIEW_WIDTH,height:MAX_FILTER_PREVIEW_HEIGHT},React.createElement(Layer,{onTap:h},React.createElement(Image,{image:f,filters:c?[c]:[],width:l,height:m,x:-(l-MAX_FILTER_PREVIEW_WIDTH)/2,y:-(m-MAX_FILTER_PREVIEW_HEIGHT)/2,ref:g}))),React.createElement(FilterItemLabel,{className:\"FIE_filters-item-label\"},b))};FilterItem.defaultProps={filterFn:void 0};export default memo(FilterItem);","import Konva from\"konva\";import*as CustomKonvaFilters from\"../../../custom/filters\";var konvaFilters=Konva.Filters;export var AVAILABLE_FILTERS=[{label:\"Original\",filterFn:null},{label:\"Invert\",filterFn:konvaFilters.Invert},{label:\"Black & White\",filterFn:CustomKonvaFilters.BlackAndWhite},{label:\"Sepia\",filterFn:konvaFilters.Sepia},{label:\"Solarize\",filterFn:konvaFilters.Solarize},{label:\"Clarendon\",filterFn:CustomKonvaFilters.Clarendon},{label:\"Gingham\",filterFn:CustomKonvaFilters.Gingham},{label:\"Moon\",filterFn:CustomKonvaFilters.Moon},{label:\"Lark\",filterFn:CustomKonvaFilters.Lark},{label:\"Reyes\",filterFn:CustomKonvaFilters.Reyes},{label:\"Juno\",filterFn:CustomKonvaFilters.Juno},{label:\"Slumber\",filterFn:CustomKonvaFilters.Slumber},{label:\"Crema\",filterFn:CustomKonvaFilters.Crema},{label:\"Ludwig\",filterFn:CustomKonvaFilters.Ludwig},{label:\"Aden\",filterFn:CustomKonvaFilters.Aden},{label:\"Perpetua\",filterFn:CustomKonvaFilters.Perpetua},{label:\"Amaro\",filterFn:CustomKonvaFilters.Amaro},{label:\"Mayfair\",filterFn:CustomKonvaFilters.Mayfair},{label:\"Rise\",filterFn:CustomKonvaFilters.Rise},{label:\"Hudson\",filterFn:CustomKonvaFilters.Hudson},{label:\"Valencia\",filterFn:CustomKonvaFilters.Valencia},{label:\"X-Pro II\",filterFn:CustomKonvaFilters.XPro2},{label:\"Sierra\",filterFn:CustomKonvaFilters.Sierra},{label:\"Willow\",filterFn:CustomKonvaFilters.Willow},{label:\"Lo-Fi\",filterFn:CustomKonvaFilters.LoFi},{label:\"Inkwell\",filterFn:konvaFilters.Grayscale},{label:\"Hefe\",filterFn:CustomKonvaFilters.Hefe},{label:\"Nashville\",filterFn:CustomKonvaFilters.Nashville},{label:\"Stinson\",filterFn:CustomKonvaFilters.Stinson},{label:\"Vesper\",filterFn:CustomKonvaFilters.Vesper},{label:\"Earlybird\",filterFn:CustomKonvaFilters.Earlybird},{label:\"Brannan\",filterFn:CustomKonvaFilters.Brannan},{label:\"Sutro\",filterFn:CustomKonvaFilters.Sutro},{label:\"Toaster\",filterFn:CustomKonvaFilters.Toaster},{label:\"Walden\",filterFn:CustomKonvaFilters.Walden},{label:\"1977\",filterFn:CustomKonvaFilters.NinteenSeventySeven},{label:\"Kelvin\",filterFn:CustomKonvaFilters.Kelvin},{label:\"Maven\",filterFn:CustomKonvaFilters.Maven},{label:\"Ginza\",filterFn:CustomKonvaFilters.Ginza},{label:\"Skyline\",filterFn:CustomKonvaFilters.Skyline},{label:\"Dogpatch\",filterFn:CustomKonvaFilters.Dogpatch},{label:\"Brooklyn\",filterFn:CustomKonvaFilters.Brooklyn},{label:\"Helena\",filterFn:CustomKonvaFilters.Helena},{label:\"Ashby\",filterFn:CustomKonvaFilters.Ashby},{label:\"Charmes\",filterFn:CustomKonvaFilters.Charmes}];","import _slicedToArray from\"@babel/runtime/helpers/slicedToArray\";import React from\"react\";import{useFilter,useStore}from\"../../../hooks\";import Carousel from\"../../common/Carousel\";import FilterItem from\"./FilterItem\";import{AVAILABLE_FILTERS}from\"./Filters.constants\";var style={maxWidth:\"100%\",width:\"100%\"},Filters=function(){var a=useStore(),b=a.originalImage,c=useFilter(),d=_slicedToArray(c,2),e=d[0],f=d[1];return React.createElement(Carousel,{className:\"FIE_filters\",style:style},AVAILABLE_FILTERS.map(function(a){return React.createElement(FilterItem,{key:a.label,filterLabel:a.label,filterFn:a.filterFn,applyFilter:f,isActive:e===a.filterFn,image:b})}))};export default Filters;","import React from\"react\";import{Text as TextIcon}from\"@scaleflex/icons/text\";import ToolsBarItemButton from\"../../ToolsBar/ToolsBarItemButton\";import{TOOLS_IDS}from\"../../../utils/constants\";var TextButton=function(a){var b=a.selectTool,c=a.isSelected,d=a.t;return React.createElement(ToolsBarItemButton,{className:\"FIE_text-tool-button\",id:TOOLS_IDS.TEXT,label:d(\"textTool\"),Icon:TextIcon,onClick:b,isSelected:c})};TextButton.defaultProps={isSelected:!1};export default TextButton;","import styled from\"styled-components\";import Label from\"@scaleflex/ui/core/label\";import{Color as PC}from\"@scaleflex/ui/utils/types/palette\";var StyledOptions=styled.div.withConfig({componentId:\"sc-qvjmv1-0\"})([\"display:flex;align-items:center;justify-content:center;padding:8px 16px;margin-top:4px;gap:8px;flex-wrap:wrap;\",\" svg{color:\",\";}\"],function(a){var b=a.isPhoneScreen;return b&&\"\\n max-width: 315px;\\n padding: 0;\\n \"},function(a){var b=a.theme.palette;return b[PC.IconsPrimary]}),StyledOptionsWrapper=styled.div.withConfig({componentId:\"sc-qvjmv1-1\"})([\"display:flex;flex-wrap:wrap;margin-left:-4px;gap:4px;.FIE_annotation-option-triggerer{padding:6px;}\"]),StyledOptionPopupContent=styled.div.withConfig({componentId:\"sc-qvjmv1-2\"})([\"background:\",\";border-radius:4px;display:flex;flex-direction:column;padding:8px 12px;overflow:visible;\",\" \",\" *{font-family:'Roboto',sans-serif;}\"],function(a){var b=a.theme;return b.palette[\"bg-secondary\"]},function(a){var b=a.position;return b&&\"\\n display: grid;\\n grid-template-columns: repeat(4, auto);\\n padding: 0;\\n margin-top: 8px;\\n box-shadow: 0px 1px 2px \".concat(function(a){var b=a.theme;return b.palette[\"light-shadow\"]},\";\\n \")},function(a){var b=a.disablePadding;return b&&\"\\n padding: 0;\\n \"}),StyledSpacedOptionFields=styled.div.withConfig({componentId:\"sc-qvjmv1-3\"})([\"display:flex;align-items:center;gap:8px;\",\"\"],function(a){var b=a.preventFlex;return b&&\"\\n display: block;\\n \\n label {\\n margin-bottom: 8px;\\n }\\n \"}),StyledTwoColumnsContainer=styled.div.withConfig({componentId:\"sc-qvjmv1-4\"})([\"display:flex;align-items:center;justify-content:space-between;\"]),StyledColumn=styled.div.withConfig({componentId:\"sc-qvjmv1-5\"})([\"&:not(:first-child){margin-left:12px;}\"]),StyledIconWrapper=styled.div.withConfig({componentId:\"sc-qvjmv1-6\"})(function(a){var b=a.theme,c=a.addThinBorder,d=a.secondaryIconColor,e=a.active,f=a.watermarkTool;return\"\\n cursor: pointer;\\n padding: \".concat(f?\"6px\":\"8px 12px\",\";\\n border-radius: 2px;\\n display: flex;\\n justify-content: center;\\n align-items: center;\\n gap: 6px;\\n\\n svg {\\n vertical-align: middle;\\n margin: 0 auto;\\n }\\n\\n \").concat(c?\"border: 0.5px solid \".concat(b.palette[\"borders-secondary\"],\";\\n padding: 8px 8px;\"):\"\",\";\\n color: \").concat(d?b.palette[PC.IconsSecondary]:\"\",\";\\n\\n \").concat(e&&\"\\n border-radius: 4px;\\n border-color: \".concat(b.palette[PC.AccentStateless],\";\\n background-color: \").concat(b.palette[PC.BackgroundActive],\";\\n\\n * {\\n color: \").concat(b.palette[PC.AccentStateless],\";\\n }\\n \"),\"\\n\\n :hover {\\n background: \").concat(b.palette[\"bg-primary-active\"],\";\\n }\\n \")}),StyledIconLabel=styled(Label).withConfig({componentId:\"sc-qvjmv1-7\"})([\"color:\",\";\"],function(a){var b=a.theme.palette;return b[PC.TextPrimary]});export{StyledTwoColumnsContainer,StyledColumn,StyledIconWrapper,StyledSpacedOptionFields,StyledOptions,StyledOptionsWrapper,StyledOptionPopupContent,StyledIconLabel};","import React from\"react\";import restrictNumber from\"../../../utils/restrictNumber\";import{Label}from\"@scaleflex/ui/core\";import{StyledSpacedOptionFields,StyledIconLabel,StyledOptionPopupContent}from\"./AnnotationOptions.styled\";import Slider from\"../Slider\";var MIN_PERCENTANGE=0,MAX_PERCENTANGE=1,OpacityField=function(a){var b=a.annotation,c=a.updateAnnotation,d=a.t,e=b.opacity,f=Math.round(100*e);return React.createElement(StyledOptionPopupContent,{disablePadding:!0},React.createElement(Label,null,d(\"transparency\")),React.createElement(StyledSpacedOptionFields,null,React.createElement(Slider,{annotation:\"%\",onChange:function changeOpacity(a){c({opacity:restrictNumber(a/100,MIN_PERCENTANGE,MAX_PERCENTANGE)})},value:f,noMargin:!0}),React.createElement(StyledIconLabel,null,\"\".concat(f,\"%\"))))};export default OpacityField;","import{Modal,ModalActions as SfxModalActions}from\"@scaleflex/ui/core\";import styled from\"styled-components\";import{Color as PC}from\"@scaleflex/ui/utils/types/palette\";var ColorPickerModal=styled(Modal).withConfig({componentId:\"sc-7tf41j-0\"})([\"max-width:350px;\"]),ColorPickerWrap=styled.div.withConfig({componentId:\"sc-7tf41j-1\"})([\".SfxColorPicker-root{max-width:100%;padding:0;box-shadow:none;border:none;\",\"}.SfxColorPicker-action{display:flex;gap:12px;.SfxColorPicker-select{width:100px;}.SfxInput-root{width:190px !important;}}.SfxColorPicker-icon{color:\",\";}.SfxColorPicker-range-picker,.SfxColorPicker-bar-wrapper{width:100%;}\"],function(a){var b=a.hideModalTitle;return b&&\"padding-top: 12px;\"},function(a){var b=a.theme.palette;return b[PC.IconsPrimary]}),ModalActions=styled(SfxModalActions).withConfig({componentId:\"sc-7tf41j-2\"})([\"gap:12px;padding:24px;.SfxButton-root{flex:1;margin:0;height:40px;}\"]),Styled={ColorPickerModal:ColorPickerModal,ColorPickerWrap:ColorPickerWrap,ModalActions:ModalActions};export default Styled;","import React from\"react\";import{Button,ColorPicker,ModalContent,ModalTitle}from\"@scaleflex/ui/core\";import ColorPickerIcon from\"@scaleflex/icons/color-picker\";import{useStore}from\"../../../hooks\";import Styled from\"./ColorPickerModal.styled\";var modalStyles={zIndex:1301},ColorPickerModal=function(a){var b=a.hideModalTitle,c=a.defaultColor,d=void 0===c?\"\":c,e=a.onChange,f=a.open,g=a.pinnedColors,h=a.onClose,i=useStore(),j=i.t;return f?React.createElement(Styled.ColorPickerModal,{onClose:h,open:f,fullWidth:!0,modalStyles:modalStyles},!b&&React.createElement(ModalTitle,{onClose:h,primary:j(\"colorPickerModalTitleLabel\",\"Pick color\"),icon:React.createElement(ColorPickerIcon,{size:29}),iconShadow:!0,variant:\"with-icon\"}),React.createElement(ModalContent,null,React.createElement(Styled.ColorPickerWrap,{hideModalTitle:b},React.createElement(ColorPicker,{onChange:e,pinnedColors:g,defaultColor:d,showTransparentColor:!0}))),React.createElement(Styled.ModalActions,null,React.createElement(Button,{color:\"basic\",onClick:h},j(\"cancel\")),React.createElement(Button,{color:\"primary\",onClick:h},j(\"apply\")))):null};ColorPickerModal.defaultProps={defaultColor:\"\",pinnedColors:[],onChange:function onChange(){},open:!1,hideModalTitle:!1,onClose:function onClose(){}};export default ColorPickerModal;","import styled from\"styled-components\";import{Color as PC}from\"@scaleflex/ui/utils/types/palette\";var StyledPickerTrigger=styled.div.attrs(function(a){var b=a.$color;return{style:{background:\"rgba(0,0,0,0)\"===b?\"repeating-conic-gradient(#5d6d7e 0% 25%, transparent 0% 50%) 50% / 8px 8px\":b}}}).withConfig({componentId:\"sc-zmv0gj-0\"})([\"background:\",\";border-radius:4px;width:32px;height:32px;border:1px solid \",\";cursor:pointer;box-sizing:border-box;\"],function(a){var b=a.theme;return b.palette[\"icons-primary\"]},function(a){var b=a.theme;return b.palette[PC.BorderPrimaryStateless]});export{StyledPickerTrigger};","import _defineProperty from\"@babel/runtime/helpers/defineProperty\";import _slicedToArray from\"@babel/runtime/helpers/slicedToArray\";import React,{useEffect,useState}from\"react\";import{useStore}from\"../../../hooks\";import{SET_LATEST_COLOR}from\"../../../actions\";import ColorPickerModal from\"../ColorPickerModal\";import{StyledPickerTrigger}from\"./ColorInput.styled\";var pinnedColorsKey=\"FIE_pinnedColors\",ColorInput=function(a){var b,c=a.onChange,d=a.color,e=a.colorFor,f=useStore(),g=f.selectionsIds,h=void 0===g?[]:g,i=f.config.annotationsCommon,j=void 0===i?{}:i,k=f.dispatch,l=f.latestColors,m=void 0===l?{}:l,n=m[e],o=useState(),p=_slicedToArray(o,2),q=p[0],r=p[1],s=useState(function(){return n||d||j.fill}),t=_slicedToArray(s,2),u=t[0],v=t[1],w=useState(null!==(b=window)&&void 0!==b&&b.localStorage?JSON.parse(localStorage.getItem(pinnedColorsKey)||\"[]\"):[]),x=_slicedToArray(w,2),y=x[0],z=x[1],A=function(a){var b;if(null!==(b=window)&&void 0!==b&&b.localStorage){var c=window.localStorage.getItem(pinnedColorsKey);if(JSON.stringify(a)!==c){var d=a.slice(-9);window.localStorage.setItem(pinnedColorsKey,JSON.stringify(d)),z(d)}}},B=function(a){r(q?null:a.currentTarget)};return useEffect(function(){var a=0===h.length&&n||d;v(a),c(a)},[d,h]),React.createElement(React.Fragment,null,React.createElement(StyledPickerTrigger,{className:\"FIE_color-picker-triggerer\",onClick:B,$color:u,onChange:c}),React.createElement(ColorPickerModal,{hideModalTitle:!0,onChange:function changeColor(a,b,d){v(b),c(b),A(d),n!==b&&k({type:SET_LATEST_COLOR,payload:{latestColors:_defineProperty({},e,b)}})},defaultColor:u,pinnedColors:y,open:!!q,onClose:B}))};ColorInput.defaultProps={color:void 0};export default ColorInput;","import React from\"react\";import restrictNumber from\"../../../utils/restrictNumber\";import ColorInput from\"../ColorInput\";import{StyledSpacedOptionFields}from\"./AnnotationOptions.styled\";import Slider from\"../Slider\";var MIN_PERCENTANGE=0,MAX_PERCENTANGE=100,StrokeFields=function(a){var b=a.annotation,c=a.updateAnnotation,d=b.stroke,e=b.strokeWidth;return React.createElement(StyledSpacedOptionFields,null,React.createElement(Slider,{annotation:\"px\",onChange:function changeStrokeWidth(a){c({strokeWidth:restrictNumber(a,MIN_PERCENTANGE,MAX_PERCENTANGE)})},value:e,noMargin:!0}),React.createElement(ColorInput,{color:d,onChange:function changeStrokeColor(a){c({stroke:a})},colorFor:\"stroke\"}))};export default StrokeFields;","import _defineProperty from\"@babel/runtime/helpers/defineProperty\";import React from\"react\";import Label from\"@scaleflex/ui/core/label\";import restrictNumber from\"../../../utils/restrictNumber\";import ColorInput from\"../ColorInput\";import{StyledTwoColumnsContainer,StyledColumn,StyledSpacedOptionFields}from\"./AnnotationOptions.styled\";import Slider from\"../Slider\";var ShadowFields=function(a){var b=a.annotation,c=a.updateAnnotation,d=a.t,e=b.shadowOffsetX,f=b.shadowOffsetY,g=b.shadowBlur,h=b.shadowColor,i=b.shadowOpacity,j=function(a,b){var d=2parseFloat(g))){var l=Math.min(10*i.width,10*i.height),n=getSizeAfterRotation(i.width,i.height,o),p=_defineProperty({},f,g?restrictNumber(g,0,l):g),q=\"height\"===f,r=q?\"width\":\"height\",s=null!==(d=c.ratioUnlocked)&&void 0!==d?d:j.ratioUnlocked;if(!s){var t=n.width/n.height;p[r]=q?Math.round(p[f]*t):Math.round(p[f]/t)}if(p[f]!==j[f]||p[r]!==j[r]){if(\"function\"==typeof b)return void b(p);h({type:SET_RESIZE,payload:p});var u=m.width&&m.height&&m||k,v=_objectSpread(_objectSpread({},j),p);h({type:ZOOM_CANVAS,payload:{factor:v.width&&v.height?getZoomFitFactor(u,v):DEFAULT_ZOOM_FACTOR,isAbsoluteZoom:!0}})}}},s=\"undefined\"==typeof j.width&&\"undefined\"==typeof j.height||i.width===j.width&&i.height===j.height,t=getProperDimensions((c.width||c.height)&&c||j,m,k,i,o),u=j.manualChangeDisabled,v=\"undefined\"!=typeof j.width&&!j.width,w=\"undefined\"!=typeof j.height&&!j.height;return React.createElement(StyledResizeWrapper,{className:\"FIE_resize-tool-options\",alignment:e,disableWrap:f},React.createElement(StyledResizeInput,{className:\"FIE_resize-width-option\",value:v?\"\":t.width,name:\"width\",onChange:u?void 0:r,inputMode:\"numeric\",title:q(\"resizeWidthTitle\"),label:q(\"width\"),inputProps:{type:\"number\"},size:\"sm\",iconEnd:\"px\",placeholder:\"Width\",disableWrap:f,disabled:u}),React.createElement(StyledRatioLockIcon,{className:\"FIE_resize-ratio-locker\",title:q(\"toggleRatioLockTitle\"),onClick:u?void 0:function toggleRatioLock(){return\"function\"==typeof b?void b({ratioUnlocked:!c.ratioUnlocked}):void h({type:SET_RESIZE,payload:{ratioUnlocked:!j.ratioUnlocked}})},color:\"basic\",size:\"sm\",disabled:u},c.ratioUnlocked||j.ratioUnlocked?React.createElement(UnlockOutline,{size:16,color:p.palette.success}):React.createElement(LockOutline,{size:16,color:p.palette.error})),React.createElement(StyledResizeInput,{className:\"FIE_resize-height-option\",value:w?\"\":t.height,name:\"height\",onChange:u?void 0:r,inputMode:\"numeric\",title:q(\"resizeHeightTitle\"),label:q(\"height\"),inputProps:{type:\"number\"},size:\"sm\",iconEnd:\"px\",placeholder:\"Height\",disableWrap:f,disabled:u}),!d&&React.createElement(StyledResetButton,{className:\"FIE_resize-reset-button\",size:\"sm\",color:\"basic\",onClick:s||u?void 0:function resetResize(){h({type:SET_RESIZE,payload:{width:void 0,height:void 0,ratioUnlocked:!1}});var a=m.width&&m.height&&m||k;h({type:ZOOM_CANVAS,payload:{factor:getZoomFitFactor(a,a)}})},disabled:s||u},React.createElement(Reset,null)))};Resize.defaultProps={onChange:void 0,currentSize:{},hideResetButton:!1,alignment:\"center\",disableWrap:!1};export default Resize;","import styled from\"styled-components\";var StyledWatermarkWrapper=styled.div.withConfig({componentId:\"sc-fvaj5j-0\"})([\"display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px;overflow:hidden;\",\";\"],function(a){var b=a.noWrap;return b?\"flex-wrap: nowrap;\":\"\"}),StyledControlsWrapper=styled.div.withConfig({componentId:\"sc-fvaj5j-1\"})([\"margin-bottom:8px;\"]),StyledWatermarkGalleryItem=styled.div.withConfig({componentId:\"sc-fvaj5j-2\"})(function(a){var b=a.theme;return\"\\n padding: 6px 4px;\\n border: 1px solid \".concat(b.palette[\"borders-secondary\"],\";\\n width: fit-content;\\n height: 32px;\\n border-radius: 2px;\\n overflow: hidden;\\n cursor: pointer;\\n border-radius: 4px;\\n\\n :hover {\\n background: \").concat(b.palette[\"bg-primary-active\"],\";\\n }\\n\\n &[aria-selected='true'] {\\n background: \").concat(b.palette[\"bg-primary-active\"],\";\\n border-color: \").concat(b.palette[\"accent-primary-active\"],\";\\n }\\n\\n img {\\n max-width: 100%;\\n max-height: 100%;\\n }\\n \")});export{StyledWatermarkWrapper,StyledControlsWrapper,StyledWatermarkGalleryItem};","import React,{useMemo}from\"react\";import{useStore}from\"../../../hooks\";import{TOOLS_IDS,WATERMARK_ANNOTATION_ID}from\"../../../utils/constants\";import Carousel from\"../../common/Carousel\";import{SET_FEEDBACK}from\"../../../actions\";import{StyledWatermarkGalleryItem}from\"./Watermark.styled\";var WatermarksGallery=function(a){var b=a.addImgWatermark,c=a.loadAndSetWatermarkImg,d=a.style,e=useStore(),f=e.config,g=e.annotations,h=e.dispatch,i=e.t,j=useMemo(function(){var a;return null===(a=(g[WATERMARK_ANNOTATION_ID]||{}).image)||void 0===a?void 0:a.src},[g[WATERMARK_ANNOTATION_ID]]),k=function(a){var c=a.currentTarget.children[0];if(c.complete){if(!c.naturalWidth)return void h({type:SET_FEEDBACK,payload:{feedback:{message:i(\"mutualizedFailedToLoadImg\"),duration:2e3}}});b(c)}},l=f[TOOLS_IDS.WATERMARK]||{},m=l.gallery,n=void 0===m?[]:m;return 0===n.length?null:React.createElement(Carousel,{className:\"FIE_watermark-gallery\",style:d},n.map(function(a){var b=(null===a||void 0===a?void 0:a.url)||a,d=(null===a||void 0===a?void 0:a.previewUrl)||b;return React.createElement(StyledWatermarkGalleryItem,{className:\"FIE_watermark-selected-item\",onClick:function onClick(a){return b===d?k(a):c(b)},key:b,\"aria-selected\":b===j},React.createElement(\"img\",{src:d,alt:\"Failed to load.\",crossOrigin:\"Anonymous\",draggable:!1}))}))};WatermarksGallery.defaultProps={style:void 0};export default WatermarksGallery;","import _slicedToArray from\"@babel/runtime/helpers/slicedToArray\";import React,{useState}from\"react\";import Menu from\"@scaleflex/ui/core/menu\";import Padding from\"@scaleflex/icons/padding\";import restrictNumber from\"../../../utils/restrictNumber\";import{StyledSpacedOptionFields,StyledIconWrapper,StyledOptionPopupContent,StyledIconLabel}from\"../../common/AnnotationOptions/AnnotationOptions.styled\";import Slider from\"../../common/Slider\";import{Label}from\"@scaleflex/ui/core\";var WatermarkPadding=function(a){var b=a.watermark,c=a.saveWatermark,d=a.t,e=useState(null),f=_slicedToArray(e,2),g=f[0],h=f[1],i=b.padding||0;return React.createElement(React.Fragment,null,React.createElement(StyledIconWrapper,{className:\"FIE_watermark-padding-triggerer\",title:d(\"padding\"),onClick:function openOptionPopup(a){h(a.currentTarget)},active:g},React.createElement(Padding,{size:20})),React.createElement(Menu,{className:\"FIE_watermark-padding-popup\",anchorEl:g,open:!!g,onClose:function closeOptionPopup(){h(null)},position:\"top\"},React.createElement(StyledOptionPopupContent,null,React.createElement(Label,null,d(\"padding\")),React.createElement(StyledSpacedOptionFields,null,React.createElement(Slider,{annotation:\"px\",onChange:function updatePadding(a){c({padding:restrictNumber(a,0,100)})},value:i,noMargin:!0}),React.createElement(StyledIconLabel,null,\"\".concat(i,\"px\"))))))};export default WatermarkPadding;","import _defineProperty from\"@babel/runtime/helpers/defineProperty\";import _slicedToArray from\"@babel/runtime/helpers/slicedToArray\";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;cr){var d=s*w/a.height;c.height=a.height*d,c.width=c.height*b}else{var g=r*w/a.width;c.width=a.width*g,c.height=c.width/b}var h=_objectSpread(_objectSpread(_objectSpread(_objectSpread({},e.annotationsCommon),e[TOOLS_IDS.IMAGE]),c),{},{padding:1,image:a,x:t+r/2-c.width/2,y:u+s/2-c.height/2,id:WATERMARK_ANNOTATION_ID,name:TOOLS_IDS.IMAGE,replaceCurrent:!0});f({type:SET_ANNOTATION,payload:h})},y=function(a){f({type:SET_ANNOTATION,payload:_objectSpread(_objectSpread({},\"function\"==typeof a?a(q):a),{},{id:WATERMARK_ANNOTATION_ID})})},z=function(a){f({type:SET_FEEDBACK,payload:{feedback:{message:a,status:FEEDBACK_STATUSES.WARNING}}})},A=function(a,b){if(a){n(!0);var c=new Image;c.onload=function(){x(c),b&&URL.revokeObjectURL(a),n(!1)},c.onerror=function(){z(g(\"mutualizedFailedToLoadImg\")),b&&URL.revokeObjectURL(a),n(!1)},c.src=a}};useEffect(function(){q&&(f({type:CLEAR_ANNOTATIONS_SELECTIONS}),f({type:SELECT_ANNOTATION,payload:{annotationId:\"watermark\"}}))},[q]),useEffect(function(){q&&(0===d.length||d[0].id!==WATERMARK_ANNOTATION_ID)&&f({type:SELECT_ANNOTATION,payload:{annotationId:\"watermark\"}})},[d]);var B=[(!e.useCloudimage||\"function\"==typeof p.onUploadWatermarkImgClick)&&{key:\"upload-watermark\",label:g(\"uploadWatermark\"),icon:UploadOutline,onClick:function handleUploadWatermarkClick(){if(\"function\"==typeof p.onUploadWatermarkImgClick){var a=p.onUploadWatermarkImgClick(A);return void(a instanceof Promise&&a.then(function(){var a=0b.factor,f={x:(a.x-b.x||0)/b.factor,y:(a.y-b.y||0)/b.factor},g={x:a.x-f.x*a.factor,y:a.y-f.y*a.factor};if(e&&1===b.factor||(g.x=Math.min(0,Math.max(g.x,c*(1-b.factor))),g.y=Math.min(0,Math.max(g.y,d*(1-b.factor)))),1>a.factor){var h=c-c*a.factor,i=d-d*a.factor;g.x+=h/2,g.y+=i/2}return _objectSpread(_objectSpread({},g),{},{factor:a.factor})};export default calculateZoomData;","import _defineProperty from\"@babel/runtime/helpers/defineProperty\";import _objectWithoutProperties from\"@babel/runtime/helpers/objectWithoutProperties\";var _excluded=[\"preparedDimensions\"];function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;cf.x+f.width&&(g.width=f.x+f.width-g.x),g.y+g.height>f.y+f.height&&(g.height=f.y+f.height-g.y),\"number\"==typeof d&&!compareRatios(g.width/g.height,d)){var h=g.height*d,i=g.width/d;toPrecisedFloat(g.y+i)<=f.y+f.height?g.height=i:g.width=h}if((e.minWidth&&g.width<=e.minWidth||e.maxWidth&&g.width>=e.maxWidth)&&(g.width=restrictNumber(g.width,e.minWidth,e.maxWidth),g.x=a.x,g.y=a.y,\"number\"==typeof d&&(g.height=g.width/d)),(e.minHeight&&b.height<=e.minHeight||e.maxHeight&&b.height>=e.maxHeight)&&(g.height=restrictNumber(g.height,e.minHeight,e.maxHeight),g.x=a.x,g.y=a.y,\"number\"==typeof d&&(g.width=g.height*d)),\"string\"==typeof e.lockCropAreaAt){var j=getPositionByPlaceLabel(e.lockCropAreaAt,f,g),k=j.x,l=j.y;g.x=k,g.y=l}return g};","import _extends from\"@babel/runtime/helpers/extends\";import _defineProperty from\"@babel/runtime/helpers/defineProperty\";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c=n.width&&j.height>=n.height;n.width&&n.height&&(df.scaledBy?f.scaledBy:1,J=_objectSpread(_objectSpread({},f),{},{width:f.width/I,height:f.height/I});F=boundResizing(J,_objectSpread(_objectSpread({},J),{},{x:0,y:0}),_objectSpread(_objectSpread({},J),{},{abstractX:0,abstractY:0}),!(A||B)&&C(),v)}else F=j;var K=F,L=K.x,M=void 0===L?0:L,x=K.y,N=void 0===x?0:x,y=K.width,O=K.height,P={x:k?f.width-M-y:M,y:l?f.height-N-O:N,ref:q,fill:\"#FFFFFF\",scaleX:1,scaleY:1,globalCompositeOperation:\"destination-out\",onDragEnd:w?void 0:H,onDragMove:w?void 0:function limitDragging(a){var b=a.target;b.setAttrs(boundDragging(b.attrs,t.current))},onTransformEnd:w?void 0:H,draggable:!w};return React.createElement(React.Fragment,null,React.createElement(Image,{image:e,x:k?f.width:0,y:l?f.height:0,width:f.width,height:f.height,filters:[Konva.Filters.Blur,Konva.Filters.Brighten],blurRadius:10,brightness:-.3,scaleX:k?-1:1,scaleY:l?-1:1,ref:s}),B?React.createElement(Ellipse,_extends({},P,{radiusX:y/2,radiusY:O/2,offset:{x:-y/2,y:-O/2}})):React.createElement(Rect,_extends({},P,{width:j.noEffect?0:y,height:j.noEffect?0:O})),j.noEffect&&React.createElement(TextNode,{name:\"Text\",id:\"no-preview-text-node\",text:p(\"cropItemNoEffect\"),x:f.width/2-noEffectTextDimensions.width/2,y:f.height/2-noEffectTextDimensions.height/2,fontSize:20,fill:\"#ffffff\",stroke:\"#ff0000\",strokeWidth:.2,shadowColor:\"#ff0000\",shadowBlur:10,annotationEvents:{},align:\"center\",width:noEffectTextDimensions.width,height:noEffectTextDimensions.height}),React.createElement(Transformer,{centeredScaling:!1,flipEnabled:!1,rotateEnabled:!1,nodes:q.current?[q.current]:[],anchorSize:14,anchorCornerRadius:7,enabledAnchors:G,ignoreStroke:!1,anchorStroke:c.palette[\"accent-primary\"],anchorFill:c.palette[\"access-primary\"],anchorStrokeWidth:2,borderStroke:c.palette[\"accent-primary\"],borderStrokeWidth:2,borderDash:[4],keepRatio:!A||!B,ref:r,boundBoxFunc:function boundBoxFunc(a,b){return boundResizing(a,b,t.current,!(A||B)&&C(),v)}}))};export default CropTransformer;","import React,{useMemo}from\"react\";import{Transformer}from\"react-konva\";import{NODES_TRANSFORMER_ID,POINTER_ICONS,TOOLS_IDS}from\"../../../utils/constants\";import{useStore}from\"../../../hooks\";import{CHANGE_POINTER_ICON,ENABLE_TEXT_CONTENT_EDIT}from\"../../../actions\";var NodesTransformer=function(){var a,b=useStore(),c=b.selectionsIds,d=void 0===c?[]:c,e=b.theme,f=b.designLayer,g=b.dispatch,h=b.config.useCloudimage,i=useMemo(function(){return null!==f&&void 0!==f&&f.findOne?d.map(function(a){return f.findOne(\"#\".concat(a))}).filter(Boolean):[]},[d]),j=function(){1===i.length&&i[0].name()===TOOLS_IDS.TEXT&&g({type:ENABLE_TEXT_CONTENT_EDIT,payload:{textIdOfEditableContent:i[0].id()}})},k=h?[\"top-left\",\"bottom-left\",\"top-right\",\"bottom-right\"]:void 0;return React.createElement(Transformer,{id:NODES_TRANSFORMER_ID,centeredScaling:!1,rotationSnaps:[0,45,90,135,180,225,270,315],nodes:i,rotateAnchorOffset:30,anchorSize:14,anchorCornerRadius:7,padding:1===i.length?null!==(a=i[0].attrs.padding)&&void 0!==a?a:1:1,ignoreStroke:!1,anchorStroke:e.palette[\"accent-primary\"],anchorFill:e.palette[\"access-primary\"],anchorStrokeWidth:2,borderStroke:e.palette[\"accent-primary\"],borderStrokeWidth:2,borderDash:[4],rotateEnabled:!h,onMouseOver:function changePointerIconToMove(){g({type:CHANGE_POINTER_ICON,payload:{pointerCssIcon:POINTER_ICONS.MOVE}})},onMouseLeave:function changePointerIconToDraw(){g({type:CHANGE_POINTER_ICON,payload:{pointerCssIcon:POINTER_ICONS.DRAW}})},onDblClick:j,onDblTap:j,enabledAnchors:k,flipEnabled:!h,shouldOverdrawWholeArea:!0})};export default NodesTransformer;","import React from\"react\";import{Layer}from\"react-konva\";import{useStore}from\"../../../hooks\";import{TOOLS_IDS,TRANSFORMERS_LAYER_ID}from\"../../../utils/constants\";import CropTransformer from\"./CropTransformer\";import NodesTransformer from\"./NodesTransformer\";var TransformersLayer=function(){var a=useStore(),b=a.toolId,c=a.shownImageDimensions;return React.createElement(Layer,{id:TRANSFORMERS_LAYER_ID,x:c.abstractX||0,y:c.abstractY||0},React.createElement(NodesTransformer,null),b===TOOLS_IDS.CROP&&React.createElement(CropTransformer,null))};export default TransformersLayer;","import styled from\"styled-components\";var StyledNodeControls=styled.div.withConfig({componentId:\"sc-1tst9ex-0\"})(function(a){var b=a.theme,c=a.top,d=a.left;return\"\\n position: absolute;\\n z-index: 1;\\n background: \".concat(b.palette[\"bg-secondary\"],\";\\n border-radius: 2px;\\n display: flex;\\n align-items: center;\\n justify-content: center;\\n box-shadow: 0px 1px 2px \").concat(b.palette[\"light-shadow\"],\";\\n top: \").concat((c||0)+8,\"px;\\n left: \").concat((d||0)+4,\"px;\\n transform: translateX(-50%);\\n height: 32px;\\n\")});export{StyledNodeControls};","import _slicedToArray from\"@babel/runtime/helpers/slicedToArray\";import React,{useEffect,useMemo,useState}from\"react\";import IconButton from\"@scaleflex/ui/core/icon-button\";import DeleteOutline from\"@scaleflex/icons/delete-outline\";import Duplicate from\"@scaleflex/icons/duplicate\";import{useStore}from\"../../hooks\";import{DUPLICATE_ANNOTATIONS,REMOVE_ANNOTATIONS}from\"../../actions\";import{NODES_TRANSFORMER_ID,WATERMARK_ANNOTATION_ID}from\"../../utils/constants\";import debounce from\"../../utils/debounce\";import{StyledNodeControls}from\"./NodeControls.styled\";var NodeControls=function(){var a=useStore(),b=a.selectionsIds,c=void 0===b?[]:b,d=a.designLayer,e=a.annotations,f=a.dispatch,g=useState({left:0,top:0}),h=_slicedToArray(g,2),i=h[0],j=h[1],k=useMemo(function(){var a;return null===d||void 0===d||null===(a=d.getStage())||void 0===a?void 0:a.findOne(\"#\".concat(NODES_TRANSFORMER_ID))},[d]),l=c.length,m=debounce(function(){k&&j({left:(k.x()+k.width()/2)*k.scaleX(),top:(k.y()+k.height())*k.scaleY()})},0);if(useEffect(function(){m()},[c,k,e]),0===l||!k)return null;return React.createElement(StyledNodeControls,{className:\"FIE_annotation-controls-overlay\",left:i.left,top:i.top},c[0]!==WATERMARK_ANNOTATION_ID&&React.createElement(IconButton,{color:\"basic\",size:\"sm\",onClick:function duplicateSelectedNodes(){f({type:DUPLICATE_ANNOTATIONS,payload:{annotationsIds:c}})}},React.createElement(Duplicate,null)),React.createElement(IconButton,{color:\"basic\",size:\"sm\",onClick:function removeSelectedNodes(){f({type:REMOVE_ANNOTATIONS,payload:{annotationsIds:c}})}},React.createElement(DeleteOutline,null)))};export default NodeControls;","import _defineProperty from\"@babel/runtime/helpers/defineProperty\";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;ct),w=_slicedToArray(v,2),x=w[0],y=w[1],z=useMemo(function(){return{cursor:g===POINTER_ICONS.DEFAULT&&h===TABS_IDS.ANNOTATE?POINTER_ICONS.DRAW:g}},[h,g]),A=function(a){f({type:ZOOM_CANVAS,payload:a})},B=useCallback(function(a){var b,c;a.evt.preventDefault(),null===(b=(c=a.currentTarget).container)||void 0===b||b.call(c).focus(),a.target instanceof Konva.Stage&&0t&&u&&(a.preventDefault(),y(!0),f({type:CHANGE_POINTER_ICON,payload:{pointerCssIcon:POINTER_ICONS.DRAG}}))},E=function(a){\"Space\"===a.code&&(a.preventDefault(),C())},F=function(){c.current&&c.current.container().focus()};useEffect(function(){f({type:CHANGE_POINTER_ICON,payload:{pointerCssIcon:POINTER_ICONS[x?\"DRAG\":\"DEFAULT\"]}})},[x]),useEffect(function(){y(h!==TABS_IDS.ANNOTATE&&h!==TABS_IDS.WATERMARK&&p.factor>t);var a;return c.current&&(a=c.current.container(),a.addEventListener(\"mouseenter\",F),a.addEventListener(\"keydown\",D),a.addEventListener(\"keyup\",E)),function(){a&&(a.removeEventListener(\"mouseenter\",F),a.removeEventListener(\"keydown\",D),a.removeEventListener(\"keyup\",E))}},[h,p.factor,t]);var G=l*(u&&p.factor||t);return React.createElement(StyledCanvasNode,{className:\"FIE_canvas-node\",tabIndex:-1,ref:c,width:j,height:k,scaleX:G,scaleY:G,x:u&&p.x||null,y:u&&p.y||null,zoomFactor:u&&p.factor||t,onWheel:u?function handleZoom(a){a.evt.preventDefault();var b=(p.factor||t)+a.evt.deltaY*-ZOOM_DELTA_TO_SCALE_CONVERT_FACTOR,c=a.currentTarget.getPointerPosition();A(_objectSpread(_objectSpread({},c),{},{factor:b}))}:void 0,onTap:B,onClick:B,onTouchMove:u?function(a){return zoomOnTouchesMove(a,A)}:void 0,onDragStart:function preventDraggingIfMultiTouches(a){var b;1<(null===(b=a.evt.touches)||void 0===b?void 0:b.length)&&y(!1)},onTouchEnd:u?function endTouchesZoomingEnablePanning(){endTouchesZooming(C)}:void 0,dragBoundFunc:function dragBoundFunc(a){var b=Math.min(0,Math.max(a.x,j*(1-p.factor))),c=Math.min(0,Math.max(a.y,k*(1-p.factor)));return{x:b,y:c}},draggable:u&&x,onDragEnd:function handleCanvasDragEnd(a){a.currentTarget.draggable()&&\"stage\"===a.target.nodeType.toLowerCase()&&u&&x&&A({factor:p.factor,x:a.target.x(),y:a.target.y(),preparedDimensions:!0})},style:z},b)};export default memo(CanvasNode);","import _slicedToArray from\"@babel/runtime/helpers/slicedToArray\";import React,{useCallback,useEffect,useRef}from\"react\";import{DesignLayer,TransformersLayer}from\"../Layers\";import{AppProviderOverridenValue}from\"../../context\";import{SET_CANVAS_SIZE}from\"../../actions\";import{useResizeObserver,useStore}from\"../../hooks\";import NodeControls from\"../NodeControls\";import CanvasNode from\"./CanvasNode\";import{CanvasContainer,StyledOrignalImage}from\"./MainCanvas.styled\";var MainCanvas=function(){var a=useResizeObserver(),b=_slicedToArray(a,1),c=b[0],d=useStore(),e=useRef(null),f=useCallback(function(a){var b=a.width,c=a.height;d.dispatch({type:SET_CANVAS_SIZE,payload:{canvasWidth:b,canvasHeight:c}})},[]);return useEffect(function(){c(e.current,f)},[]),React.createElement(CanvasContainer,{className:\"FIE_canvas-container\",ref:e},!d.textIdOfEditableContent&&React.createElement(NodeControls,null),d.isShowOriginalImage&&React.createElement(StyledOrignalImage,{className:\"FIE_original-image-compare\",src:d.originalImage.src}),React.createElement(CanvasNode,null,React.createElement(AppProviderOverridenValue,{overridingValue:d},React.createElement(DesignLayer,null),React.createElement(TransformersLayer,null))))};export default MainCanvas;","import styled from\"styled-components\";import{Color as PC}from\"@scaleflex/ui/utils/types/palette\";var StyledSeparator=styled.div.withConfig({componentId:\"sc-etsyb6-0\"})([\"display:inline-block;height:\",\";width:\",\";border-radius:1px;background:\",\";\"],function(a){return a.height},function(a){return a.width},function(a){var b=a.theme.palette;return b[PC.BordersSecondary]});export{StyledSeparator};","import React from\"react\";import{StyledSeparator}from\"./Separator.styled\";var Separator=function(a){var b=a.height,c=a.width;return React.createElement(StyledSeparator,{height:b,width:c})};Separator.defaultProps={height:\"24px\",width:\"1px\"};export default Separator;","import styled from\"styled-components\";import Button from\"@scaleflex/ui/core/button\";import IconButton from\"@scaleflex/ui/core/icon-button\";import Label from\"@scaleflex/ui/core/label\";import{CrossButton,InputGroup,SelectGroup}from\"@scaleflex/ui/core\";import{Color as PC}from\"@scaleflex/ui/utils/types/palette\";import{FontVariant as FV}from\"@scaleflex/ui/utils/types/typography\";var StyledTopbar=styled.div.withConfig({componentId:\"sc-21g986-0\"})([\"padding:16px;box-sizing:border-box;position:relative;width:100%;display:flex;flex-wrap:wrap;gap:16px;align-items:center;justify-content:space-between;border-bottom:1px solid \",\";[data-phone='true'] &{padding:6px 6px 4px 6px;\",\"}\"],function(a){var b=a.theme.palette;return b[PC.BordersSecondary]},function(a){var b=a.isPhoneScreen;return b&&\"\\n padding: 12px 12px 0px;\\n gap: 12px;\\n \"}),StyledMainButtonsWrapper=styled.div.withConfig({componentId:\"sc-21g986-1\"})([\"display:flex;align-items:center;order:1;\"]),StyledControlButtonsWrapper=styled.div.withConfig({componentId:\"sc-21g986-2\"})([\"display:flex;align-items:center;order:3;gap:4px;\"]),StyledHistoryButton=styled(IconButton).withConfig({componentId:\"sc-21g986-3\"})([\"margin:\",\";svg{color:\",\";}\"],function(a){var b=a.margin;return null!==b&&void 0!==b?b:\"0 4px\"},function(a){var b=a.theme.palette,c=a.disabled;return c?b[PC.IconsMuted]:b[PC.IconsPrimary]}),StyledZoomingWrapper=styled.div.withConfig({componentId:\"sc-21g986-4\"})([\"display:flex;align-items:center;gap:2px;\"]),StyledDimensionsLabel=styled(Label).withConfig({componentId:\"sc-21g986-5\"})([\"flex-shrink:0;color:\",\";\",\";\"],function(a){var b=a.theme.palette;return b[PC.TextPlaceholder]},function(a){var b=a.theme.typography;return b.font[FV.LabelMedium]}),StyledSmallButton=styled(IconButton).withConfig({componentId:\"sc-21g986-6\"})([\"padding:8px;svg{color:\",\";}\"],function(a){var b=a.theme.palette,c=a.showBackButton;return c?b[PC.IconsPrimary]:b[PC.IconsMuted]}),StyledFlexCenterAlignedContainer=styled.div.withConfig({componentId:\"sc-21g986-7\"})([\"width:\",\";height:32px;display:block;width:100%;order:4;\",\";@media (min-width:761px){display:flex;align-items:center;justify-content:center;width:fit-content;order:2;}\"],function(a){var b=a.showBackButton;return b?\"318px\":\"384px\"},function(a){var b=a.reverseDirection;return b?\"flex-direction: row-reverse\":\"\"}),StyledZoomPercentageLabel=styled(Label).withConfig({componentId:\"sc-21g986-8\"})([\"cursor:pointer;color:\",\";\",\";\"],function(a){var b=a.theme.palette;return b[PC.TextPrimary]},function(a){var b=a.theme.typography;return b.font[FV.InputMd]}),StyledBackButtonLabel=styled.span.withConfig({componentId:\"sc-21g986-9\"})([\"\",\";\"],function(a){var b=a.theme.typography;return b.font[FV.ButtonMdEmphasis]}),StyledCloseButton=styled(CrossButton).withConfig({componentId:\"sc-21g986-10\"})([\"padding:8px;z-index:111;\"]),StyledSaveButton=styled(Button).withConfig({componentId:\"sc-21g986-11\"})([\"padding:4px 12px;\"]),StyledFileNameInput=styled(InputGroup).withConfig({componentId:\"sc-21g986-12\"})([\"\"]),StyledFileExtensionSelect=styled(SelectGroup).withConfig({componentId:\"sc-21g986-13\"})([\"margin-top:16px;\"]),StyledQualityWrapper=styled.div.withConfig({componentId:\"sc-21g986-14\"})([\"width:100%;margin-top:16px;\"]),StyledResizeOnSave=styled.div.withConfig({componentId:\"sc-21g986-15\"})([\"margin-top:16px;width:100%;\"]),StyledResizeOnSaveLabel=styled(Label).withConfig({componentId:\"sc-21g986-16\"})([\"margin-bottom:4px;\"]),StyledHistoryButtons=styled.div.withConfig({componentId:\"sc-21g986-17\"})([\"display:flex;gap:6px;\"]),StyledImageOptionsButtons=styled.div.withConfig({componentId:\"sc-21g986-18\"})([\"display:flex;gap:12px;justify-content:\",\";\"],function(a){var b=a.isPhoneScreen;return b?\"space-between\":\"center\"}),StyledMenuIconButton=styled(IconButton).withConfig({componentId:\"sc-21g986-19\"})([\"@media (min-width:761px){display:none;}\"]),StyledDimensionsButtons=styled.div.withConfig({componentId:\"sc-21g986-20\"})([\"display:flex;gap:12px;align-items:center;\"]);export{StyledTopbar,StyledFlexCenterAlignedContainer,StyledHistoryButton,StyledZoomingWrapper,StyledSmallButton,StyledZoomPercentageLabel,StyledBackButtonLabel,StyledCloseButton,StyledSaveButton,StyledFileNameInput,StyledFileExtensionSelect,StyledQualityWrapper,StyledResizeOnSave,StyledDimensionsLabel,StyledMainButtonsWrapper,StyledControlButtonsWrapper,StyledHistoryButtons,StyledImageOptionsButtons,StyledMenuIconButton,StyledDimensionsButtons,StyledResizeOnSaveLabel};","import styled,{css}from\"styled-components\";import modalTitle from\"@scaleflex/ui/core/modal-title\";import{Modal,ModalActions}from\"@scaleflex/ui/core\";import{Color as PC}from\"@scaleflex/ui/utils/types/palette\";import{FontVariant as FV}from\"@scaleflex/ui/utils/types/typography\";var StyledModal=styled(Modal).withConfig({componentId:\"sc-kpjpf5-0\"})([\"width:\",\";max-width:unset;\"],function(a){var b=a.width;return b||\"300px\"}),StyledModalTitle=styled(modalTitle).withConfig({componentId:\"sc-kpjpf5-1\"})(function(a){var b=a.theme,c=a.isWarning;return css([\"padding-bottom:0;.SfxModalTitle-Icon{background-color:\",\";}.SfxModalTitle-LabelPrimary{margin-bottom:24px;\",\";}.SfxModalTitle-LabelSecondary{\",\";text-align:center;}\"],c&&b.palette[PC.Orange_0_1_Overlay],b.typography.font[FV.TitleH3],b.typography.font[FV.TextLarge])}),StyledModalActions=styled(ModalActions).withConfig({componentId:\"sc-kpjpf5-2\"})([\"gap:12px;padding:24px;.SfxButton-root{flex:1;margin:0;height:40px;}\"]);export{StyledModal,StyledModalTitle,StyledModalActions};","import React from\"react\";import{Button,ModalContent}from\"@scaleflex/ui/core\";import{StyledModal,StyledModalTitle,StyledModalActions}from\"./Modal.styled\";var Modal=function(a){var b=a.title,c=a.hint,d=a.Icon,f=a.onDone,g=a.onCancel,h=a.doneLabel,i=a.cancelLabel,j=a.isOpened,k=a.doneButtonStyle,l=a.doneButtonColor,m=void 0===l?\"basic\":l,n=a.cancelButtonColor,o=void 0===n?\"basic\":n,p=a.children,q=a.areButtonsDisabled,r=a.zIndex,s=a.className,t=a.width,u=a.isWarning;return React.createElement(StyledModal,{className:s,open:j,onClose:g,style:{zIndex:r},onKeyUp:function onKeyUp(a){\"Enter\"===a.key&&f(a)},width:t},React.createElement(StyledModalTitle,{icon:React.createElement(d,{size:25}),iconShadow:!0,isWarning:u,onClose:g,primary:b,secondary:c,variant:\"with-icon\"}),p&&React.createElement(ModalContent,null,p),React.createElement(StyledModalActions,{align:\"center\"},React.createElement(Button,{color:o,onClick:g,size:\"md\",disabled:q},i),React.createElement(Button,{color:m,onClick:f,size:\"md\",warning:u,style:k,disabled:q},h)))};Modal.defaultProps={hint:\"\",isOpened:!1,doneLabel:\"Yes\",cancelLabel:\"No\",doneButtonStyle:void 0,doneButtonColor:\"basic\",cancelButtonColor:\"basic\",children:void 0,areButtonsDisabled:!1,zIndex:void 0,className:void 0,width:\"\",isWarning:!1};export default Modal;","import _slicedToArray from\"@babel/runtime/helpers/slicedToArray\";import React,{useState,useCallback}from\"react\";import{Warning}from\"@scaleflex/icons\";import{useStore}from\"../../hooks\";import{RESET}from\"../../actions\";import Modal from\"../common/Modal\";import{CLOSING_REASONS}from\"../../utils/constants\";var ConfirmationModal=function(a){var b=a.children,c=a.isReset,d=useStore(),e=d.t,f=d.theme,g=d.config,h=d.dispatch,i=d.isResetted,j=d.haveNotSavedChanges,k=d.config.onClose,l=useState(!1),m=_slicedToArray(l,2),n=m[0],o=m[1];if(\"function\"!=typeof k&&!c)return React.createElement(\"span\",null);var p=function(){o(!1)},q=useCallback(function(){h({type:RESET,payload:{config:g}}),p()},[g]),r=function(){c||(k(CLOSING_REASONS.CLOSE_BUTTON,j),q())};return React.createElement(React.Fragment,null,React.cloneElement(b,{onClick:!(void 0!==i)||i?r:function openModal(){o(!0)}}),n&&React.createElement(Modal,{title:c?e(\"warning\"):e(\"discardChanges\"),hint:c?e(\"changesLoseWarningHint\"):e(\"discardChangesWarningHint\"),isOpened:n,onCancel:p,onDone:c?q:r,Icon:function WarningIcon(){return React.createElement(Warning,{color:f.palette.warning,size:25})},doneLabel:e(\"confirm\"),doneButtonColor:\"warning-primary\",cancelLabel:e(\"cancel\"),width:\"400px\",isWarning:!0}))};ConfirmationModal.defaultProps={isReset:!1};export default ConfirmationModal;","import React from\"react\";import CrossOutline from\"@scaleflex/icons/cross-outline\";import{useStore}from\"../../hooks\";import Separator from\"../common/Separator\";import{StyledCloseButton}from\"./Topbar.styled\";import ConfirmationModal from\"./ConfirmationModal\";var CloseButton=function(){var a=useStore(),b=a.config.onClose;return\"function\"==typeof b?React.createElement(React.Fragment,null,React.createElement(Separator,null),React.createElement(ConfirmationModal,null,React.createElement(StyledCloseButton,{className:\"FIE_topbar-close-button\",color:\"basic\",size:\"md\"},React.createElement(CrossOutline,null)))):null};export default CloseButton;","import{DEFAULT_SAVE_QUALITY}from\"./constants\";var getDefaultSaveQuality=function(a){return 0>=a||1 svg:not([color]){color:\",\"}:disabled,[aria-disabled=\\\"true\\\"]{cursor:not-allowed;}&::-webkit-scrollbar{width:4px;height:4px;}&::-webkit-scrollbar-track{background:rgba(203,211,218,0.35);}&::-webkit-scrollbar-thumb{background:rgba(203,211,218,1);border-radius:10px;}}\"],ROOT_CONTAINER_CLASS_NAME,ROOT_CONTAINER_CLASS_NAME,function(a){var b=a.theme;return b.palette[\"icons-primary\"]});export{FontsFaces,OverrideDefaultStyles};","import React,{memo}from\"react\";import ThemeProvider from\"@scaleflex/ui/theme\";import App from\"../App\";import{AppProvider}from\"../../context\";import defaultConfig from\"../../context/defaultConfig\";import deepMerge from\"../../utils/deepMerge\";import{FontsFaces,OverrideDefaultStyles}from\"./globalStyles\";var AssemblyPoint=function(a){var b=a.img,c=a.source,d=a.useCloudimage,e=a.cloudimage;if(b)throw new Error(\"`img` is renamed to `source` please consider renaming it from your configurations.\");if(!c||\"string\"!=typeof c&&!(c instanceof HTMLImageElement))throw new Error(\"`source` property is required either a string of image url or a HTMLImageElement for the image that will be edited.\");if(d){var f,g;if(null!==e&&void 0!==e&&null!==(f=e.imageSealing)&&void 0!==f&&f.enable&&!(null!==e&&void 0!==e&&null!==(g=e.imageSealing)&&void 0!==g&&g.salt))throw new Error(\"`salt` property of imageSealing object is required in cloudimage mode as long as `imageSealing` is enabled.\")}var h=deepMerge(defaultConfig,a);return React.createElement(React.StrictMode,null,React.createElement(ThemeProvider,{theme:h.theme},React.createElement(FontsFaces,null),React.createElement(OverrideDefaultStyles,null),React.createElement(AppProvider,{config:h},React.createElement(App,null))))};AssemblyPoint.defaultProps={useCloudimage:!1,cloudimage:{},img:void 0};export default memo(AssemblyPoint);","import _typeof from\"@babel/runtime/helpers/typeof\";import _classCallCheck from\"@babel/runtime/helpers/classCallCheck\";import _createClass from\"@babel/runtime/helpers/createClass\";import _defineProperty from\"@babel/runtime/helpers/defineProperty\";import _classPrivateFieldGet from\"@babel/runtime/helpers/classPrivateFieldGet\";import _classPrivateFieldSet from\"@babel/runtime/helpers/classPrivateFieldSet\";function ownKeys(a,b){var c=Object.keys(a);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(a);b&&(d=d.filter(function(b){return Object.getOwnPropertyDescriptor(a,b).enumerable})),c.push.apply(c,d)}return c}function _objectSpread(a){for(var b,c=1;c