@aussieljk/forkbook 0.0.0-stage → 0.0.1-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +22 -0
- package/README.md +77 -2
- package/assets/addon-vitest/templates/vitest.config.4.template.ts +36 -0
- package/assets/browser/favicon-wrapper.svg +46 -0
- package/assets/browser/favicon.svg +1 -0
- package/assets/browser/nunito-sans-bold-italic.woff2 +0 -0
- package/assets/browser/nunito-sans-bold.woff2 +0 -0
- package/assets/browser/nunito-sans-italic.woff2 +0 -0
- package/assets/browser/nunito-sans-regular.woff2 +0 -0
- package/assets/builder-vite/iframe.html +99 -0
- package/assets/create/rendererAssets/.eslintrc.json +16 -0
- package/assets/create/rendererAssets/common/Configure.mdx +388 -0
- package/assets/create/rendererAssets/common/assets/accessibility.png +0 -0
- package/assets/create/rendererAssets/common/assets/accessibility.svg +1 -0
- package/assets/create/rendererAssets/common/assets/addon-library.png +0 -0
- package/assets/create/rendererAssets/common/assets/assets.png +0 -0
- package/assets/create/rendererAssets/common/assets/avif-test-image.avif +0 -0
- package/assets/create/rendererAssets/common/assets/context.png +0 -0
- package/assets/create/rendererAssets/common/assets/discord.svg +1 -0
- package/assets/create/rendererAssets/common/assets/docs.png +0 -0
- package/assets/create/rendererAssets/common/assets/figma-plugin.png +0 -0
- package/assets/create/rendererAssets/common/assets/github.svg +1 -0
- package/assets/create/rendererAssets/common/assets/share.png +0 -0
- package/assets/create/rendererAssets/common/assets/styling.png +0 -0
- package/assets/create/rendererAssets/common/assets/testing.png +0 -0
- package/assets/create/rendererAssets/common/assets/theming.png +0 -0
- package/assets/create/rendererAssets/common/assets/tutorials.svg +1 -0
- package/assets/create/rendererAssets/common/assets/youtube.svg +1 -0
- package/assets/create/rendererAssets/common/button.css +30 -0
- package/assets/create/rendererAssets/common/header.css +32 -0
- package/assets/create/rendererAssets/common/page.css +68 -0
- package/assets/create/templates/react-native/index.expo.js +20 -0
- package/assets/create/templates/react-native/index.js +25 -0
- package/assets/docs/addon-backgrounds.gif +0 -0
- package/assets/docs/addon-controls-args-annotated.png +0 -0
- package/assets/docs/addon-controls-args-background-color.png +0 -0
- package/assets/docs/addon-controls-args-background-string.png +0 -0
- package/assets/docs/addon-controls-args-docs.png +0 -0
- package/assets/docs/addon-controls-args-logging.png +0 -0
- package/assets/docs/addon-controls-args-no-annotation.png +0 -0
- package/assets/docs/addon-controls-args-reflow-slider.png +0 -0
- package/assets/docs/addon-controls-args-reflow.png +0 -0
- package/assets/docs/addon-controls-args-template.png +0 -0
- package/assets/docs/addon-controls-expanded.png +0 -0
- package/assets/docs/addon-controls-hero.gif +0 -0
- package/assets/docs/addon-controls-install.png +0 -0
- package/assets/docs/hero.gif +0 -0
- package/assets/docs/highlight.png +0 -0
- package/assets/docs/message-reference.png +0 -0
- package/assets/docs/viewport.png +0 -0
- package/assets/react-native/metro-env.d.ts +69 -0
- package/assets/server/addon.tsconfig.json +6 -0
- package/assets/server/base-preview-body.html +116 -0
- package/assets/server/base-preview-head.html +494 -0
- package/assets/server/openBrowser.applescript +94 -0
- package/assets/server/template.ejs +87 -0
- package/dist/.build-stamp +0 -0
- package/dist/_browser-chunks/Color-PCLE2J36.js +1025 -0
- package/dist/_browser-chunks/DocsRenderer-JXND3PVQ.js +10 -0
- package/dist/_browser-chunks/WithTooltip-XSQFTBMB.js +1619 -0
- package/dist/_browser-chunks/chunk-2JDQ35OA.js +247 -0
- package/dist/_browser-chunks/chunk-2JT76G3E.js +104 -0
- package/dist/_browser-chunks/chunk-2MEPHP35.js +17 -0
- package/dist/_browser-chunks/chunk-2SCZVUKW.js +24 -0
- package/dist/_browser-chunks/chunk-46Z7NGAS.js +41 -0
- package/dist/_browser-chunks/chunk-4ATQOMJB.js +30 -0
- package/dist/_browser-chunks/chunk-52CW7FF7.js +49 -0
- package/dist/_browser-chunks/chunk-5I7E4GMO.js +62 -0
- package/dist/_browser-chunks/chunk-5P4QA6MY.js +20 -0
- package/dist/_browser-chunks/chunk-5WMXI5GW.js +816 -0
- package/dist/_browser-chunks/chunk-66OCZ54D.js +2604 -0
- package/dist/_browser-chunks/chunk-6SXYJQST.js +253 -0
- package/dist/_browser-chunks/chunk-AYRF6EJB.js +36 -0
- package/dist/_browser-chunks/chunk-B4AUNNU4.js +156 -0
- package/dist/_browser-chunks/chunk-BCP2FFXF.js +369 -0
- package/dist/_browser-chunks/chunk-C3D4HEFY.js +3396 -0
- package/dist/_browser-chunks/chunk-CFAOWGL7.js +43 -0
- package/dist/_browser-chunks/chunk-CFWWCCZV.js +223 -0
- package/dist/_browser-chunks/chunk-CNED6RYH.js +18 -0
- package/dist/_browser-chunks/chunk-DRQKCCAG.js +136 -0
- package/dist/_browser-chunks/chunk-ECQ75MKQ.js +0 -0
- package/dist/_browser-chunks/chunk-EIYAKDGP.js +302 -0
- package/dist/_browser-chunks/chunk-ENKK74N4.js +12 -0
- package/dist/_browser-chunks/chunk-FENFYI4X.js +698 -0
- package/dist/_browser-chunks/chunk-FJGWSWL5.js +155 -0
- package/dist/_browser-chunks/chunk-FVSEPWWX.js +2810 -0
- package/dist/_browser-chunks/chunk-GNZY6LOW.js +10116 -0
- package/dist/_browser-chunks/chunk-IE4ULIOQ.js +14 -0
- package/dist/_browser-chunks/chunk-IMSF75WX.js +42 -0
- package/dist/_browser-chunks/chunk-IWQGIXJS.js +14 -0
- package/dist/_browser-chunks/chunk-JMC7AIKT.js +108 -0
- package/dist/_browser-chunks/chunk-JPUOQJUI.js +8 -0
- package/dist/_browser-chunks/chunk-JSBKXXXF.js +218 -0
- package/dist/_browser-chunks/chunk-JWSKPMPC.js +73 -0
- package/dist/_browser-chunks/chunk-JYVGARBG.js +2943 -0
- package/dist/_browser-chunks/chunk-KBK7GKBN.js +35 -0
- package/dist/_browser-chunks/chunk-KQ7CRO2B.js +108 -0
- package/dist/_browser-chunks/chunk-LAWXTSXK.js +18 -0
- package/dist/_browser-chunks/chunk-LE2LTDW3.js +14 -0
- package/dist/_browser-chunks/chunk-LEVSOOLQ.js +48 -0
- package/dist/_browser-chunks/chunk-LV5PIKV4.js +93 -0
- package/dist/_browser-chunks/chunk-MDOL7KML.js +56 -0
- package/dist/_browser-chunks/chunk-MFMDGWP6.js +34 -0
- package/dist/_browser-chunks/chunk-MLBOOZL4.js +67 -0
- package/dist/_browser-chunks/chunk-NQUD4B7H.js +91 -0
- package/dist/_browser-chunks/chunk-NULBREPZ.js +43 -0
- package/dist/_browser-chunks/chunk-NZMVUW5T.js +7 -0
- package/dist/_browser-chunks/chunk-OD6IBQCC.js +117 -0
- package/dist/_browser-chunks/chunk-ODVJ3XZJ.js +157 -0
- package/dist/_browser-chunks/chunk-OQWFVDIN.js +386 -0
- package/dist/_browser-chunks/chunk-OVH3USFB.js +20 -0
- package/dist/_browser-chunks/chunk-OZZPSYQR.js +14 -0
- package/dist/_browser-chunks/chunk-P6PK47TQ.js +1970 -0
- package/dist/_browser-chunks/chunk-PFRNG3UC.js +22 -0
- package/dist/_browser-chunks/chunk-PJSMZ27A.js +13 -0
- package/dist/_browser-chunks/chunk-QC4HFS6K.js +41 -0
- package/dist/_browser-chunks/chunk-QDXFODK4.js +274 -0
- package/dist/_browser-chunks/chunk-RBCHTR7C.js +28 -0
- package/dist/_browser-chunks/chunk-RMYQ3QN3.js +294 -0
- package/dist/_browser-chunks/chunk-RNTIV5CE.js +411 -0
- package/dist/_browser-chunks/chunk-RSPAQWVJ.js +80 -0
- package/dist/_browser-chunks/chunk-S6TK43XQ.js +836 -0
- package/dist/_browser-chunks/chunk-SC67XZST.js +18 -0
- package/dist/_browser-chunks/chunk-SFVA4SBT.js +683 -0
- package/dist/_browser-chunks/chunk-SZYFOQMT.js +25 -0
- package/dist/_browser-chunks/chunk-TBJCJXK4.js +18 -0
- package/dist/_browser-chunks/chunk-UMDO3KB7.js +205 -0
- package/dist/_browser-chunks/chunk-V2G23FV7.js +11 -0
- package/dist/_browser-chunks/chunk-V5M7Q4HT.js +88 -0
- package/dist/_browser-chunks/chunk-W5M6NPS3.js +198 -0
- package/dist/_browser-chunks/chunk-W7NE2JXW.js +84 -0
- package/dist/_browser-chunks/chunk-WGVAAM43.js +1110 -0
- package/dist/_browser-chunks/chunk-WHQRNHXD.js +8 -0
- package/dist/_browser-chunks/chunk-WOSOWBCA.js +12 -0
- package/dist/_browser-chunks/chunk-WZ7KR7SH.js +85 -0
- package/dist/_browser-chunks/chunk-YEKO6BHJ.js +20 -0
- package/dist/_browser-chunks/chunk-YI2IBIQS.js +7 -0
- package/dist/_browser-chunks/chunk-YTIT5NA5.js +1966 -0
- package/dist/_browser-chunks/chunk-ZEHRUHTA.js +6 -0
- package/dist/_browser-chunks/chunk-ZTQ5MEJ5.js +203 -0
- package/dist/_browser-chunks/matchers-YLBYSYAF.js +1263 -0
- package/dist/_browser-chunks/react-dom-client-4OHE3QDV.js +9 -0
- package/dist/_node-chunks/attached-runtime-I2G4WLJI.js +282 -0
- package/dist/_node-chunks/builder-manager-VVHYQXCH.js +1661 -0
- package/dist/_node-chunks/chunk-2BUPBPFB.js +82 -0
- package/dist/_node-chunks/chunk-2DSIDINN.js +884 -0
- package/dist/_node-chunks/chunk-2RU7BKEW.js +23 -0
- package/dist/_node-chunks/chunk-34EO2PUT.js +26 -0
- package/dist/_node-chunks/chunk-3BKIBF5S.js +3008 -0
- package/dist/_node-chunks/chunk-3SDUYDXH.js +98 -0
- package/dist/_node-chunks/chunk-3T4ZSNPH.js +662 -0
- package/dist/_node-chunks/chunk-3W7F2B7P.js +79 -0
- package/dist/_node-chunks/chunk-3Y6AAY5H.js +80 -0
- package/dist/_node-chunks/chunk-42UWAGPW.js +1193 -0
- package/dist/_node-chunks/chunk-4FEANXWU.js +1986 -0
- package/dist/_node-chunks/chunk-5DQFEZEA.js +40 -0
- package/dist/_node-chunks/chunk-6KEHV53S.js +1218 -0
- package/dist/_node-chunks/chunk-6LMWA44H.js +3837 -0
- package/dist/_node-chunks/chunk-6YKBRP72.js +20 -0
- package/dist/_node-chunks/chunk-7GUDZVRQ.js +110 -0
- package/dist/_node-chunks/chunk-B5J7Q7J4.js +21 -0
- package/dist/_node-chunks/chunk-BS2WMZMR.js +90 -0
- package/dist/_node-chunks/chunk-BSKFCWQD.js +47 -0
- package/dist/_node-chunks/chunk-BXVYT7SB.js +36 -0
- package/dist/_node-chunks/chunk-CCOTJ4FC.js +688 -0
- package/dist/_node-chunks/chunk-CQKMLL5J.js +33 -0
- package/dist/_node-chunks/chunk-CXRU72ET.js +63 -0
- package/dist/_node-chunks/chunk-DC7DKR5K.js +20 -0
- package/dist/_node-chunks/chunk-DHJFTB4K.js +25 -0
- package/dist/_node-chunks/chunk-DUR55DJJ.js +1094 -0
- package/dist/_node-chunks/chunk-E6YESGLX.js +7032 -0
- package/dist/_node-chunks/chunk-EHUNOMDD.js +52345 -0
- package/dist/_node-chunks/chunk-ET7PWEO7.js +298 -0
- package/dist/_node-chunks/chunk-EWOX7HPJ.js +20 -0
- package/dist/_node-chunks/chunk-F3ZFKBHY.js +844 -0
- package/dist/_node-chunks/chunk-FK7KGTV7.js +26 -0
- package/dist/_node-chunks/chunk-FPZB5OI7.js +35 -0
- package/dist/_node-chunks/chunk-FW2HQUBQ.js +25 -0
- package/dist/_node-chunks/chunk-FY6UXW6G.js +11 -0
- package/dist/_node-chunks/chunk-GEFQN7K3.js +499 -0
- package/dist/_node-chunks/chunk-GRBLDJCR.js +989 -0
- package/dist/_node-chunks/chunk-H32DYT6P.js +87 -0
- package/dist/_node-chunks/chunk-H4PPVMP5.js +23 -0
- package/dist/_node-chunks/chunk-HMP2G23X.js +25 -0
- package/dist/_node-chunks/chunk-ICPBH3E7.js +59 -0
- package/dist/_node-chunks/chunk-IDEL2J23.js +23 -0
- package/dist/_node-chunks/chunk-IK4FGZLR.js +223 -0
- package/dist/_node-chunks/chunk-JDXXX6LB.js +68 -0
- package/dist/_node-chunks/chunk-JGGFYIG5.js +5468 -0
- package/dist/_node-chunks/chunk-JPAZLYJ3.js +29 -0
- package/dist/_node-chunks/chunk-JZOO7GGC.js +48 -0
- package/dist/_node-chunks/chunk-KISMCCP5.js +4744 -0
- package/dist/_node-chunks/chunk-LCK4ZQKG.js +115 -0
- package/dist/_node-chunks/chunk-LO56I6E2.js +132 -0
- package/dist/_node-chunks/chunk-LXBD4UL4.js +104 -0
- package/dist/_node-chunks/chunk-MA24JW6C.js +7162 -0
- package/dist/_node-chunks/chunk-MK2KYAI6.js +5414 -0
- package/dist/_node-chunks/chunk-NDWKJ4CL.js +2102 -0
- package/dist/_node-chunks/chunk-NIBT7XDZ.js +168 -0
- package/dist/_node-chunks/chunk-NPO45IMH.js +33 -0
- package/dist/_node-chunks/chunk-OISX4AGQ.js +414 -0
- package/dist/_node-chunks/chunk-OUW6R7C3.js +26 -0
- package/dist/_node-chunks/chunk-OWNFOGTA.js +194 -0
- package/dist/_node-chunks/chunk-Q7QNUM5H.js +49 -0
- package/dist/_node-chunks/chunk-QEQLR22M.js +1877 -0
- package/dist/_node-chunks/chunk-RRN2V55B.js +45 -0
- package/dist/_node-chunks/chunk-RWFIFGO5.js +144 -0
- package/dist/_node-chunks/chunk-RXNJDRGO.js +209 -0
- package/dist/_node-chunks/chunk-RZMQ7S3L.js +92 -0
- package/dist/_node-chunks/chunk-SIEXZVCR.js +51 -0
- package/dist/_node-chunks/chunk-SLWQNBGO.js +2034 -0
- package/dist/_node-chunks/chunk-SVTBJ7Q3.js +35 -0
- package/dist/_node-chunks/chunk-SWO5CDYU.js +32 -0
- package/dist/_node-chunks/chunk-TD5PLLQG.js +121 -0
- package/dist/_node-chunks/chunk-TEQGGSP7.js +33 -0
- package/dist/_node-chunks/chunk-TFCEV2XX.js +155 -0
- package/dist/_node-chunks/chunk-TFEWM4E3.js +1073 -0
- package/dist/_node-chunks/chunk-TINO74G5.js +21 -0
- package/dist/_node-chunks/chunk-TNJIXE37.js +40 -0
- package/dist/_node-chunks/chunk-TWI4GVH7.js +19 -0
- package/dist/_node-chunks/chunk-U5W53R2J.js +1011 -0
- package/dist/_node-chunks/chunk-UBOGWBEA.js +148 -0
- package/dist/_node-chunks/chunk-UMUBKI6E.js +3787 -0
- package/dist/_node-chunks/chunk-UVINFLGY.js +56 -0
- package/dist/_node-chunks/chunk-V2DY426G.js +1133 -0
- package/dist/_node-chunks/chunk-VLOXOXXE.js +45 -0
- package/dist/_node-chunks/chunk-W4OMYLSP.js +1297 -0
- package/dist/_node-chunks/chunk-WAXVSN3O.js +18 -0
- package/dist/_node-chunks/chunk-WCULS5TP.js +3767 -0
- package/dist/_node-chunks/chunk-WNZ2UMFM.js +153 -0
- package/dist/_node-chunks/chunk-WZJF2OUH.js +74 -0
- package/dist/_node-chunks/chunk-XGIUVY52.js +611 -0
- package/dist/_node-chunks/chunk-XHL2LVBM.js +415 -0
- package/dist/_node-chunks/chunk-XI6B6P47.js +59 -0
- package/dist/_node-chunks/chunk-XLP2ZKXV.js +60 -0
- package/dist/_node-chunks/chunk-YCMRA6RX.js +95 -0
- package/dist/_node-chunks/chunk-YZFWBA5L.js +2700 -0
- package/dist/_node-chunks/chunk-ZMAMXQKP.js +4731 -0
- package/dist/_node-chunks/chunk-ZWBCQ4MJ.js +110 -0
- package/dist/_node-chunks/dist-VTSTZKUB.js +16 -0
- package/dist/_node-chunks/globby-OEMHPBFY.js +2884 -0
- package/dist/_node-chunks/jiti-NFX6UU74.js +3848 -0
- package/dist/_node-chunks/lib-MDVARD7W.js +366 -0
- package/dist/_node-chunks/local-runtime-NTKIN2QT.js +78 -0
- package/dist/_node-chunks/mdx-plugin-MWISDWDQ.js +5680 -0
- package/dist/_node-chunks/monorepo-LIRFMQXE.js +121 -0
- package/dist/_node-chunks/monorepo-optimized-tests-relaxed-limits-no-story-deletion-CPDW4XTW.js +121 -0
- package/dist/_node-chunks/optimized-tests-HDOLR3EY.js +22 -0
- package/dist/_node-chunks/pattern-copy-play-EKHIUAU2.js +807 -0
- package/dist/_node-chunks/postinstallAddon-GYGMWDL6.js +20 -0
- package/dist/_node-chunks/rehype-external-links-BUN3HUCO.js +121 -0
- package/dist/_node-chunks/rehype-slug-PLADX223.js +52 -0
- package/dist/_node-chunks/relaxed-limits-GBHW6KIQ.js +117 -0
- package/dist/_node-chunks/run-KDTIZNSY.js +103 -0
- package/dist/_node-chunks/run-NL66VTNR.js +4532 -0
- package/dist/_node-chunks/session-id-KIIVOQLR.js +23 -0
- package/dist/_node-chunks/setup-MGC7BQO6.js +278 -0
- package/dist/_node-chunks/vitest.config.4.template-JH2THZFG.js +54 -0
- package/dist/actions/decorator.d.ts +7 -0
- package/dist/actions/decorator.js +43 -0
- package/dist/actions/index.d.ts +67 -0
- package/dist/actions/index.js +28 -0
- package/dist/addon-a11y/index.d.ts +52 -0
- package/dist/addon-a11y/index.js +16 -0
- package/dist/addon-a11y/manager.js +1429 -0
- package/dist/addon-a11y/preset.js +18 -0
- package/dist/addon-a11y/preview.d.ts +17 -0
- package/dist/addon-a11y/preview.js +15 -0
- package/dist/addon-docs/blocks.d.ts +1061 -0
- package/dist/addon-docs/blocks.js +2461 -0
- package/dist/addon-docs/index.d.ts +236 -0
- package/dist/addon-docs/index.js +16 -0
- package/dist/addon-docs/manager.js +90 -0
- package/dist/addon-docs/mdx-react-shim.d.ts +1 -0
- package/dist/addon-docs/mdx-react-shim.js +2 -0
- package/dist/addon-docs/preset.js +378 -0
- package/dist/addon-docs/preview.d.ts +4 -0
- package/dist/addon-docs/preview.js +7 -0
- package/dist/addon-links/index.d.ts +22 -0
- package/dist/addon-links/index.js +20 -0
- package/dist/addon-links/manager.js +14 -0
- package/dist/addon-links/preview.d.ts +6 -0
- package/dist/addon-links/preview.js +9 -0
- package/dist/addon-links/react/index.d.ts +25 -0
- package/dist/addon-links/react/index.js +52 -0
- package/dist/addon-mcp/preset.js +1345 -0
- package/dist/addon-mcp/preview.js +29 -0
- package/dist/addon-mcp/tools/preview-stories/preview-stories-app-script.js +1153 -0
- package/dist/addon-ondevice-actions/index.d.ts +4 -0
- package/dist/addon-ondevice-actions/index.js +7 -0
- package/dist/addon-ondevice-actions/register.js +7 -0
- package/dist/addon-ondevice-controls/index.d.ts +6 -0
- package/dist/addon-ondevice-controls/index.js +14 -0
- package/dist/addon-ondevice-controls/register.js +10 -0
- package/dist/addon-pseudo-states/index.d.ts +35 -0
- package/dist/addon-pseudo-states/index.js +15 -0
- package/dist/addon-pseudo-states/manager.js +53 -0
- package/dist/addon-pseudo-states/preview.d.ts +9 -0
- package/dist/addon-pseudo-states/preview.js +10 -0
- package/dist/addon-themes/index.d.ts +80 -0
- package/dist/addon-themes/index.js +104 -0
- package/dist/addon-themes/manager.js +97 -0
- package/dist/addon-themes/postinstall.js +33 -0
- package/dist/addon-themes/preview.d.ts +6 -0
- package/dist/addon-themes/preview.js +8 -0
- package/dist/addon-vitest/constants.d.ts +132 -0
- package/dist/addon-vitest/constants.js +66 -0
- package/dist/addon-vitest/index.d.ts +4 -0
- package/dist/addon-vitest/index.js +8 -0
- package/dist/addon-vitest/manager.js +665 -0
- package/dist/addon-vitest/node/coverage-reporter.js +1284 -0
- package/dist/addon-vitest/node/vitest.js +674 -0
- package/dist/addon-vitest/postinstall.js +24 -0
- package/dist/addon-vitest/preset.js +943 -0
- package/dist/addon-vitest/vitest-plugin/global-setup.js +162 -0
- package/dist/addon-vitest/vitest-plugin/index.d.ts +56 -0
- package/dist/addon-vitest/vitest-plugin/index.js +463 -0
- package/dist/addon-vitest/vitest-plugin/setup-file-with-project-annotations.js +9 -0
- package/dist/addon-vitest/vitest-plugin/setup-file.browser.4.js +20 -0
- package/dist/addon-vitest/vitest-plugin/setup-file.js +50 -0
- package/dist/addon-vitest/vitest-plugin/test-utils.js +128 -0
- package/dist/babel/index.d.ts +2301 -0
- package/dist/babel/index.js +61 -0
- package/dist/backgrounds/index.d.ts +6 -0
- package/dist/backgrounds/index.js +15 -0
- package/dist/bin/core.js +1705 -0
- package/dist/bin/dispatcher.js +43 -0
- package/dist/bin/loader.js +115 -0
- package/dist/builder-vite/index.d.ts +50 -0
- package/dist/builder-vite/index.js +245 -0
- package/dist/builder-vite/preset.js +27 -0
- package/dist/channels/index.d.ts +2 -0
- package/dist/channels/index.js +352 -0
- package/dist/chunk-B2t1tGRh.d.ts +284 -0
- package/dist/chunk-BCoJQE-f.d.ts +602 -0
- package/dist/chunk-BGkgZp-H.d.ts +214 -0
- package/dist/chunk-BTVrWliM.d.ts +115 -0
- package/dist/chunk-BXLImeLy.d.ts +197 -0
- package/dist/chunk-BfBzpgct.d.ts +916 -0
- package/dist/chunk-Bpi2tz-6.d.ts +511 -0
- package/dist/chunk-BxWufQms.d.ts +142 -0
- package/dist/chunk-C-bavsOH.d.ts +34 -0
- package/dist/chunk-C2p5r3Vt.d.ts +13001 -0
- package/dist/chunk-C6PAgHLT.d.ts +12 -0
- package/dist/chunk-CMeX4WRe.d.ts +179 -0
- package/dist/chunk-Ct9xd6IM.d.ts +65 -0
- package/dist/chunk-CwQKNaYL.d.ts +15 -0
- package/dist/chunk-D7DwV41f.d.ts +3622 -0
- package/dist/chunk-DEVFdzxR.d.ts +253 -0
- package/dist/chunk-DaVb55-_.d.ts +124 -0
- package/dist/chunk-DgRNfmj_.d.ts +40 -0
- package/dist/chunk-DoIGKY33.d.ts +666 -0
- package/dist/chunk-Dr3R0DXk.d.ts +40 -0
- package/dist/chunk-DtHByo32.d.ts +55 -0
- package/dist/chunk-Dw1z1Pki.d.ts +933 -0
- package/dist/chunk-DzuY9DXg.d.ts +79 -0
- package/dist/chunk-FjDVzZTj.d.ts +62 -0
- package/dist/chunk-Kt1tW-D1.d.ts +59 -0
- package/dist/chunk-XP8oHzpE.d.ts +6 -0
- package/dist/chunk-gCX81nOr.d.ts +61 -0
- package/dist/chunk-pcFXCimE.d.ts +741 -0
- package/dist/cli/index.d.ts +1174 -0
- package/dist/cli/index.js +5613 -0
- package/dist/cli/skills/content/index.d.ts +72 -0
- package/dist/cli/skills/content/index.js +335 -0
- package/dist/cli/tools/sdk/child-host.d.ts +61 -0
- package/dist/cli/tools/sdk/child-host.js +131 -0
- package/dist/cli/tools/sdk/index.d.ts +137 -0
- package/dist/cli/tools/sdk/index.js +44 -0
- package/dist/cli-commands/bin/index.js +25 -0
- package/dist/client-logger/index.d.ts +31 -0
- package/dist/client-logger/index.js +63 -0
- package/dist/common/index.d.ts +1103 -0
- package/dist/common/index.js +364 -0
- package/dist/components/index.d.ts +1924 -0
- package/dist/components/index.js +13759 -0
- package/dist/core-events/index.d.ts +155 -0
- package/dist/core-events/index.js +136 -0
- package/dist/core-server/index.d.ts +2200 -0
- package/dist/core-server/index.js +4165 -0
- package/dist/core-server/presets/common-manager.css +170 -0
- package/dist/core-server/presets/common-manager.js +4168 -0
- package/dist/core-server/presets/common-override-preset.js +81 -0
- package/dist/core-server/presets/common-preset.js +2187 -0
- package/dist/create/bin/index.js +23 -0
- package/dist/create/index.js +25 -0
- package/dist/csf/csf-utils.d.ts +2 -0
- package/dist/csf/csf-utils.js +19 -0
- package/dist/csf/index.d.ts +7 -0
- package/dist/csf/index.js +2142 -0
- package/dist/csf-tools/index.d.ts +1157 -0
- package/dist/csf-tools/index.js +736 -0
- package/dist/docs-tools/index.d.ts +197 -0
- package/dist/docs-tools/index.js +61 -0
- package/dist/highlight/index.d.ts +10 -0
- package/dist/highlight/index.js +15 -0
- package/dist/instrumenter/index.d.ts +113 -0
- package/dist/instrumenter/index.js +2595 -0
- package/dist/manager/_manager-chunks/globals-runtime-8HkdnU2F.js +6144 -0
- package/dist/manager/_manager-chunks/globals-runtime-BIKBO23x.js +3389 -0
- package/dist/manager/_manager-chunks/globals-runtime-BdGkqNEt.js +45 -0
- package/dist/manager/_manager-chunks/globals-runtime-BmphMP6z.js +1190 -0
- package/dist/manager/_manager-chunks/globals-runtime-BvM-NY2g.js +13307 -0
- package/dist/manager/_manager-chunks/globals-runtime-C02fvgcd.js +9243 -0
- package/dist/manager/_manager-chunks/globals-runtime-DkAPXCvc.js +9766 -0
- package/dist/manager/_manager-chunks/globals-runtime-DpNYC-qi.js +5564 -0
- package/dist/manager/_manager-chunks/globals-runtime-DtcOnYHR.js +5357 -0
- package/dist/manager/_manager-chunks/globals-runtime-DwFqpqya.js +722 -0
- package/dist/manager/_manager-chunks/globals-runtime-FC201B7s.js +6837 -0
- package/dist/manager/_manager-chunks/globals-runtime-Rp_zjGnh.js +121 -0
- package/dist/manager/_manager-chunks/globals-runtime-ZHrQFa3-.js +10463 -0
- package/dist/manager/_manager-chunks/globals-runtime-eLPTIfX-.js +7759 -0
- package/dist/manager/_manager-chunks/globals-runtime-qKvCZHFY.js +4468 -0
- package/dist/manager/_manager-chunks/globals-runtime-sGpNlIJ1.js +5102 -0
- package/dist/manager/_manager-chunks/runtime-B1L9TH89.js +452 -0
- package/dist/manager/_manager-chunks/runtime-BK0zF7FN.js +22 -0
- package/dist/manager/_manager-chunks/runtime-BhkT2CXl.js +1408 -0
- package/dist/manager/_manager-chunks/runtime-Bly6WJLN.js +998 -0
- package/dist/manager/_manager-chunks/runtime-D0UOWx0U.js +979 -0
- package/dist/manager/_manager-chunks/runtime-D94Vq3oR.js +4014 -0
- package/dist/manager/_manager-chunks/runtime-DMig8mT7.js +77 -0
- package/dist/manager/_manager-chunks/runtime-EITvVbkG.js +46 -0
- package/dist/manager/_manager-chunks/runtime-cp5pazY2.js +8936 -0
- package/dist/manager/_manager-chunks/runtime-eDVAYF7N.js +6860 -0
- package/dist/manager/_manager-chunks/runtime-i-PDAHLR.js +2493 -0
- package/dist/manager/globals-runtime.js +2 -0
- package/dist/manager/globals.d.ts +23 -0
- package/dist/manager/globals.js +26 -0
- package/dist/manager/manager-stores.d.ts +2 -0
- package/dist/manager/manager-stores.js +19 -0
- package/dist/manager/runtime.js +2 -0
- package/dist/manager-api/index.d.ts +2 -0
- package/dist/manager-api/index.js +3257 -0
- package/dist/manager-errors.d.ts +89 -0
- package/dist/manager-errors.js +20 -0
- package/dist/mcp/index.d.ts +270 -0
- package/dist/mcp/index.js +305 -0
- package/dist/mocking-utils/index.d.ts +689 -0
- package/dist/mocking-utils/index.js +521 -0
- package/dist/mocking-utils/mocker-runtime.js +1254 -0
- package/dist/nextjs-vite/config/preview.js +3 -0
- package/dist/nextjs-vite/export-mocks/cache/index.d.ts +25 -0
- package/dist/nextjs-vite/export-mocks/cache/index.js +29 -0
- package/dist/nextjs-vite/export-mocks/headers/index.d.ts +37 -0
- package/dist/nextjs-vite/export-mocks/headers/index.js +54 -0
- package/dist/nextjs-vite/export-mocks/link/index.d.ts +9 -0
- package/dist/nextjs-vite/export-mocks/link/index.js +59 -0
- package/dist/nextjs-vite/export-mocks/navigation/index.d.ts +28 -0
- package/dist/nextjs-vite/export-mocks/navigation/index.js +58 -0
- package/dist/nextjs-vite/export-mocks/router/index.d.ts +34 -0
- package/dist/nextjs-vite/export-mocks/router/index.js +63 -0
- package/dist/nextjs-vite/index.d.ts +92 -0
- package/dist/nextjs-vite/index.js +58 -0
- package/dist/nextjs-vite/node/index.d.ts +6 -0
- package/dist/nextjs-vite/node/index.js +20 -0
- package/dist/nextjs-vite/preset.js +648 -0
- package/dist/nextjs-vite/preview.d.ts +20 -0
- package/dist/nextjs-vite/preview.js +11 -0
- package/dist/nextjs-vite/vite-plugin/index.d.ts +6 -0
- package/dist/nextjs-vite/vite-plugin/index.js +19 -0
- package/dist/nextjs-vite-plugin/index.d.ts +28 -0
- package/dist/nextjs-vite-plugin/index.js +923 -0
- package/dist/nextjs-vite-plugin/mocks/storybook.global.js +29 -0
- package/dist/nextjs-vite-plugin/plugins/next-image/alias/image-context.js +8 -0
- package/dist/nextjs-vite-plugin/plugins/next-image/alias/image-default-loader.js +23 -0
- package/dist/nextjs-vite-plugin/plugins/next-image/alias/next-image.js +28 -0
- package/dist/nextjs-vite-plugin/plugins/next-image/alias/next-legacy-image.js +17 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/cache/index.js +29 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/dynamic/index.js +40 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/headers/index.js +55 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/link/index.js +63 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/navigation/index.js +71 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/router/index.js +74 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/rsc/server-only.js +7 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/safe-stable-stringify/index.js +13 -0
- package/dist/nextjs-vite-plugin/plugins/next-mocks/compatibility/draft-mode.compat.js +7 -0
- package/dist/node-logger/index.d.ts +495 -0
- package/dist/node-logger/index.js +42 -0
- package/dist/oxc-parser/index.d.ts +99 -0
- package/dist/oxc-parser/index.js +275 -0
- package/dist/oxc-parser/worker.js +37 -0
- package/dist/preview/_chunks/runtime-BIzIdDbb.js +10263 -0
- package/dist/preview/_chunks/runtime-BTPtVY1p.js +1102 -0
- package/dist/preview/_chunks/runtime-BZSnICCg.js +8484 -0
- package/dist/preview/_chunks/runtime-BdGkqNEt.js +45 -0
- package/dist/preview/_chunks/runtime-BwSxqk3t.js +63 -0
- package/dist/preview/_chunks/runtime-CqHxptiK.js +6143 -0
- package/dist/preview/_chunks/runtime-CsV4HZPV.js +5064 -0
- package/dist/preview/_chunks/runtime-CxZK_Ln3.js +284 -0
- package/dist/preview/_chunks/runtime-DZToXfvO.js +9767 -0
- package/dist/preview/_chunks/runtime-DrTjJkPY.js +3872 -0
- package/dist/preview/_chunks/runtime-DuHdxMFA.js +387 -0
- package/dist/preview/_chunks/runtime-iXdo8CR8.js +3635 -0
- package/dist/preview/_chunks/runtime-q3wt0e_N.js +6838 -0
- package/dist/preview/globals.d.ts +16 -0
- package/dist/preview/globals.js +20 -0
- package/dist/preview/runtime.js +6 -0
- package/dist/preview-api/index.d.ts +4 -0
- package/dist/preview-api/index.js +147 -0
- package/dist/preview-errors.d.ts +186 -0
- package/dist/preview-errors.js +56 -0
- package/dist/react/docgen/docgen-worker.js +38 -0
- package/dist/react/entry-preview-argtypes.js +9 -0
- package/dist/react/entry-preview-docs.js +12 -0
- package/dist/react/entry-preview-rsc.js +11 -0
- package/dist/react/entry-preview.js +21 -0
- package/dist/react/index.d.ts +119 -0
- package/dist/react/index.js +26 -0
- package/dist/react/preset.js +301 -0
- package/dist/react/preview.d.ts +2 -0
- package/dist/react/preview.js +11 -0
- package/dist/react-native/bin/get-stories.js +34 -0
- package/dist/react-native/index.d.ts +160 -0
- package/dist/react-native/index.js +1547 -0
- package/dist/react-native/metro/node.d.ts +83 -0
- package/dist/react-native/metro/node.js +21 -0
- package/dist/react-native/metro/withStorybook.d.ts +2269 -0
- package/dist/react-native/metro/withStorybook.js +138 -0
- package/dist/react-native/preview.d.ts +6 -0
- package/dist/react-native/preview.js +20 -0
- package/dist/react-native/scripts/generate.d.ts +22 -0
- package/dist/react-native/scripts/generate.js +18 -0
- package/dist/react-native/stub.js +20 -0
- package/dist/react-native-theming/index.d.ts +175 -0
- package/dist/react-native-theming/index.js +2591 -0
- package/dist/react-native-ui/index.d.ts +130 -0
- package/dist/react-native-ui/index.js +1448 -0
- package/dist/react-native-ui-common/index.d.ts +230 -0
- package/dist/react-native-ui-common/index.js +514 -0
- package/dist/react-vite/index.d.ts +4 -0
- package/dist/react-vite/index.js +8 -0
- package/dist/react-vite/node/index.d.ts +6 -0
- package/dist/react-vite/node/index.js +20 -0
- package/dist/react-vite/preset.d.ts +6 -0
- package/dist/react-vite/preset.js +21 -0
- package/dist/router/index.d.ts +141 -0
- package/dist/router/index.js +1217 -0
- package/dist/server-errors.d.ts +2 -0
- package/dist/server-errors.js +149 -0
- package/dist/shared/open-service/index.d.ts +3 -0
- package/dist/shared/open-service/index.js +115 -0
- package/dist/shared/open-service/services/docgen/worker/docgen-worker.js +75 -0
- package/dist/shared/open-service/toolsets/docs/public.d.ts +1296 -0
- package/dist/shared/open-service/toolsets/docs/public.js +991 -0
- package/dist/telemetry/index.d.ts +314 -0
- package/dist/telemetry/index.js +103 -0
- package/dist/test/index.d.ts +158 -0
- package/dist/test/index.js +19421 -0
- package/dist/theming/create.d.ts +15 -0
- package/dist/theming/create.js +11 -0
- package/dist/theming/index.d.ts +54 -0
- package/dist/theming/index.js +511 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/index.js +48 -0
- package/dist/viewport/index.d.ts +275 -0
- package/dist/viewport/index.js +21 -0
- package/package.json +1054 -4
- package/template/nextjs-vite/cli/.eslintrc.json +6 -0
- package/template/nextjs-vite/cli/js/Button.jsx +42 -0
- package/template/nextjs-vite/cli/js/Button.stories.js +49 -0
- package/template/nextjs-vite/cli/js/Configure.mdx +470 -0
- package/template/nextjs-vite/cli/js/Header.jsx +58 -0
- package/template/nextjs-vite/cli/js/Header.stories.js +30 -0
- package/template/nextjs-vite/cli/js/Page.jsx +68 -0
- package/template/nextjs-vite/cli/js/Page.stories.js +28 -0
- package/template/nextjs-vite/cli/ts/Button.stories.ts +54 -0
- package/template/nextjs-vite/cli/ts/Button.tsx +39 -0
- package/template/nextjs-vite/cli/ts/Configure.mdx +446 -0
- package/template/nextjs-vite/cli/ts/Header.stories.ts +34 -0
- package/template/nextjs-vite/cli/ts/Header.tsx +54 -0
- package/template/nextjs-vite/cli/ts/Page.stories.ts +33 -0
- package/template/nextjs-vite/cli/ts/Page.tsx +73 -0
- package/template/react/cli/.eslintrc.json +5 -0
- package/template/react/cli/js/Button.jsx +39 -0
- package/template/react/cli/js/Button.stories.js +49 -0
- package/template/react/cli/js/Header.jsx +56 -0
- package/template/react/cli/js/Header.stories.js +29 -0
- package/template/react/cli/js/Page.jsx +69 -0
- package/template/react/cli/js/Page.stories.js +28 -0
- package/template/react/cli/ts/Button.stories.ts +54 -0
- package/template/react/cli/ts/Button.tsx +37 -0
- package/template/react/cli/ts/Header.stories.ts +34 -0
- package/template/react/cli/ts/Header.tsx +56 -0
- package/template/react/cli/ts/Page.stories.ts +33 -0
- package/template/react/cli/ts/Page.tsx +73 -0
- package/template/react-vite/cli/.eslintrc.json +5 -0
- package/template/react-vite/cli/js/Button.jsx +39 -0
- package/template/react-vite/cli/js/Button.stories.js +49 -0
- package/template/react-vite/cli/js/Header.jsx +56 -0
- package/template/react-vite/cli/js/Header.stories.js +29 -0
- package/template/react-vite/cli/js/Page.jsx +69 -0
- package/template/react-vite/cli/js/Page.stories.js +28 -0
- package/template/react-vite/cli/ts/Button.stories.ts +54 -0
- package/template/react-vite/cli/ts/Button.tsx +37 -0
- package/template/react-vite/cli/ts/Header.stories.ts +34 -0
- package/template/react-vite/cli/ts/Header.tsx +56 -0
- package/template/react-vite/cli/ts/Page.stories.ts +33 -0
- package/template/react-vite/cli/ts/Page.tsx +73 -0
|
@@ -0,0 +1,2493 @@
|
|
|
1
|
+
import { a as __toCommonJS, i as __require, n as __esmMin, o as __toESM, t as __commonJSMin } from "./runtime-EITvVbkG.js";
|
|
2
|
+
import { Sr as useState, er as Component, fr as useCallback, lr as init__storybook_global_react, nr as _storybook_global_react_default, rr as _storybook_global_react_exports } from "./runtime-Bly6WJLN.js";
|
|
3
|
+
import { a as _inheritsLoose, i as init_wrapNativeSuper, l as _extends, o as init_inheritsLoose, r as _wrapNativeSuper, s as _assertThisInitialized } from "./runtime-eDVAYF7N.js";
|
|
4
|
+
import { f as require_browser } from "./runtime-D94Vq3oR.js";
|
|
5
|
+
//#region ../../node_modules/prop-types/lib/ReactPropTypesSecret.js
|
|
6
|
+
/**
|
|
7
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the MIT license found in the
|
|
10
|
+
* LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/
|
|
12
|
+
var require_ReactPropTypesSecret = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
13
|
+
module.exports = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
14
|
+
}));
|
|
15
|
+
//#endregion
|
|
16
|
+
//#region ../../node_modules/prop-types/factoryWithThrowingShims.js
|
|
17
|
+
/**
|
|
18
|
+
* Copyright (c) 2013-present, Facebook, Inc.
|
|
19
|
+
*
|
|
20
|
+
* This source code is licensed under the MIT license found in the
|
|
21
|
+
* LICENSE file in the root directory of this source tree.
|
|
22
|
+
*/
|
|
23
|
+
var require_factoryWithThrowingShims = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
24
|
+
var ReactPropTypesSecret = require_ReactPropTypesSecret();
|
|
25
|
+
function emptyFunction() {}
|
|
26
|
+
function emptyFunctionWithReset() {}
|
|
27
|
+
emptyFunctionWithReset.resetWarningCache = emptyFunction;
|
|
28
|
+
module.exports = function() {
|
|
29
|
+
function shim(props, propName, componentName, location, propFullName, secret) {
|
|
30
|
+
if (secret === ReactPropTypesSecret) return;
|
|
31
|
+
var err = /* @__PURE__ */ new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");
|
|
32
|
+
err.name = "Invariant Violation";
|
|
33
|
+
throw err;
|
|
34
|
+
}
|
|
35
|
+
shim.isRequired = shim;
|
|
36
|
+
function getShim() {
|
|
37
|
+
return shim;
|
|
38
|
+
}
|
|
39
|
+
var ReactPropTypes = {
|
|
40
|
+
array: shim,
|
|
41
|
+
bigint: shim,
|
|
42
|
+
bool: shim,
|
|
43
|
+
func: shim,
|
|
44
|
+
number: shim,
|
|
45
|
+
object: shim,
|
|
46
|
+
string: shim,
|
|
47
|
+
symbol: shim,
|
|
48
|
+
any: shim,
|
|
49
|
+
arrayOf: getShim,
|
|
50
|
+
element: shim,
|
|
51
|
+
elementType: shim,
|
|
52
|
+
instanceOf: getShim,
|
|
53
|
+
node: shim,
|
|
54
|
+
objectOf: getShim,
|
|
55
|
+
oneOf: getShim,
|
|
56
|
+
oneOfType: getShim,
|
|
57
|
+
shape: getShim,
|
|
58
|
+
exact: getShim,
|
|
59
|
+
checkPropTypes: emptyFunctionWithReset,
|
|
60
|
+
resetWarningCache: emptyFunction
|
|
61
|
+
};
|
|
62
|
+
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
63
|
+
return ReactPropTypes;
|
|
64
|
+
};
|
|
65
|
+
}));
|
|
66
|
+
//#endregion
|
|
67
|
+
//#region ../../node_modules/prop-types/index.js
|
|
68
|
+
var require_prop_types = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
69
|
+
module.exports = require_factoryWithThrowingShims()();
|
|
70
|
+
}));
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region ../../node_modules/react-fast-compare/index.js
|
|
73
|
+
var require_react_fast_compare = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
74
|
+
var hasElementType = typeof Element !== "undefined";
|
|
75
|
+
var hasMap = typeof Map === "function";
|
|
76
|
+
var hasSet = typeof Set === "function";
|
|
77
|
+
var hasArrayBuffer = typeof ArrayBuffer === "function" && !!ArrayBuffer.isView;
|
|
78
|
+
function equal(a, b) {
|
|
79
|
+
if (a === b) return true;
|
|
80
|
+
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
81
|
+
if (a.constructor !== b.constructor) return false;
|
|
82
|
+
var length, i, keys;
|
|
83
|
+
if (Array.isArray(a)) {
|
|
84
|
+
length = a.length;
|
|
85
|
+
if (length != b.length) return false;
|
|
86
|
+
for (i = length; i-- !== 0;) if (!equal(a[i], b[i])) return false;
|
|
87
|
+
return true;
|
|
88
|
+
}
|
|
89
|
+
var it;
|
|
90
|
+
if (hasMap && a instanceof Map && b instanceof Map) {
|
|
91
|
+
if (a.size !== b.size) return false;
|
|
92
|
+
it = a.entries();
|
|
93
|
+
while (!(i = it.next()).done) if (!b.has(i.value[0])) return false;
|
|
94
|
+
it = a.entries();
|
|
95
|
+
while (!(i = it.next()).done) if (!equal(i.value[1], b.get(i.value[0]))) return false;
|
|
96
|
+
return true;
|
|
97
|
+
}
|
|
98
|
+
if (hasSet && a instanceof Set && b instanceof Set) {
|
|
99
|
+
if (a.size !== b.size) return false;
|
|
100
|
+
it = a.entries();
|
|
101
|
+
while (!(i = it.next()).done) if (!b.has(i.value[0])) return false;
|
|
102
|
+
return true;
|
|
103
|
+
}
|
|
104
|
+
if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {
|
|
105
|
+
length = a.length;
|
|
106
|
+
if (length != b.length) return false;
|
|
107
|
+
for (i = length; i-- !== 0;) if (a[i] !== b[i]) return false;
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
111
|
+
if (a.valueOf !== Object.prototype.valueOf && typeof a.valueOf === "function" && typeof b.valueOf === "function") return a.valueOf() === b.valueOf();
|
|
112
|
+
if (a.toString !== Object.prototype.toString && typeof a.toString === "function" && typeof b.toString === "function") return a.toString() === b.toString();
|
|
113
|
+
keys = Object.keys(a);
|
|
114
|
+
length = keys.length;
|
|
115
|
+
if (length !== Object.keys(b).length) return false;
|
|
116
|
+
for (i = length; i-- !== 0;) if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
117
|
+
if (hasElementType && a instanceof Element) return false;
|
|
118
|
+
for (i = length; i-- !== 0;) {
|
|
119
|
+
if ((keys[i] === "_owner" || keys[i] === "__v" || keys[i] === "__o") && a.$$typeof) continue;
|
|
120
|
+
if (!equal(a[keys[i]], b[keys[i]])) return false;
|
|
121
|
+
}
|
|
122
|
+
return true;
|
|
123
|
+
}
|
|
124
|
+
return a !== a && b !== b;
|
|
125
|
+
}
|
|
126
|
+
module.exports = function isEqual(a, b) {
|
|
127
|
+
try {
|
|
128
|
+
return equal(a, b);
|
|
129
|
+
} catch (error) {
|
|
130
|
+
if ((error.message || "").match(/stack|recursion/i)) {
|
|
131
|
+
console.warn("react-fast-compare cannot handle circular refs");
|
|
132
|
+
return false;
|
|
133
|
+
}
|
|
134
|
+
throw error;
|
|
135
|
+
}
|
|
136
|
+
};
|
|
137
|
+
}));
|
|
138
|
+
//#endregion
|
|
139
|
+
//#region ../../node_modules/shallowequal/index.js
|
|
140
|
+
var require_shallowequal = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
141
|
+
module.exports = function shallowEqual(objA, objB, compare, compareContext) {
|
|
142
|
+
var ret = compare ? compare.call(compareContext, objA, objB) : void 0;
|
|
143
|
+
if (ret !== void 0) return !!ret;
|
|
144
|
+
if (objA === objB) return true;
|
|
145
|
+
if (typeof objA !== "object" || !objA || typeof objB !== "object" || !objB) return false;
|
|
146
|
+
var keysA = Object.keys(objA);
|
|
147
|
+
var keysB = Object.keys(objB);
|
|
148
|
+
if (keysA.length !== keysB.length) return false;
|
|
149
|
+
var bHasOwnProperty = Object.prototype.hasOwnProperty.bind(objB);
|
|
150
|
+
for (var idx = 0; idx < keysA.length; idx++) {
|
|
151
|
+
var key = keysA[idx];
|
|
152
|
+
if (!bHasOwnProperty(key)) return false;
|
|
153
|
+
var valueA = objA[key];
|
|
154
|
+
var valueB = objB[key];
|
|
155
|
+
ret = compare ? compare.call(compareContext, valueA, valueB, key) : void 0;
|
|
156
|
+
if (ret === false || ret === void 0 && valueA !== valueB) return false;
|
|
157
|
+
}
|
|
158
|
+
return true;
|
|
159
|
+
};
|
|
160
|
+
}));
|
|
161
|
+
//#endregion
|
|
162
|
+
//#region ../../node_modules/react-helmet-async/lib/index.module.js
|
|
163
|
+
function a() {
|
|
164
|
+
return a = Object.assign || function(t) {
|
|
165
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
166
|
+
var r = arguments[e];
|
|
167
|
+
for (var n in r) Object.prototype.hasOwnProperty.call(r, n) && (t[n] = r[n]);
|
|
168
|
+
}
|
|
169
|
+
return t;
|
|
170
|
+
}, a.apply(this, arguments);
|
|
171
|
+
}
|
|
172
|
+
function s(t, e) {
|
|
173
|
+
t.prototype = Object.create(e.prototype), t.prototype.constructor = t, c(t, e);
|
|
174
|
+
}
|
|
175
|
+
function c(t, e) {
|
|
176
|
+
return c = Object.setPrototypeOf || function(t, e) {
|
|
177
|
+
return t.__proto__ = e, t;
|
|
178
|
+
}, c(t, e);
|
|
179
|
+
}
|
|
180
|
+
function u(t, e) {
|
|
181
|
+
if (null == t) return {};
|
|
182
|
+
var r, n, i = {}, o = Object.keys(t);
|
|
183
|
+
for (n = 0; n < o.length; n++) e.indexOf(r = o[n]) >= 0 || (i[r] = t[r]);
|
|
184
|
+
return i;
|
|
185
|
+
}
|
|
186
|
+
var import_prop_types, import_react_fast_compare, import_browser, import_shallowequal, l, p, f, d, h, m, y, T, g, b, v, A, C, O, S, E, I, P, w, x, L, j, M, k, H, N, R, D, U, q, Y, B, K, _, z, F, G, W;
|
|
187
|
+
function init_index_module() {
|
|
188
|
+
return (init_index_module = __esmMin((() => {
|
|
189
|
+
init__storybook_global_react();
|
|
190
|
+
import_prop_types = /* @__PURE__ */ __toESM(require_prop_types());
|
|
191
|
+
import_react_fast_compare = /* @__PURE__ */ __toESM(require_react_fast_compare());
|
|
192
|
+
import_browser = /* @__PURE__ */ __toESM(require_browser());
|
|
193
|
+
import_shallowequal = /* @__PURE__ */ __toESM(require_shallowequal());
|
|
194
|
+
l = {
|
|
195
|
+
BASE: "base",
|
|
196
|
+
BODY: "body",
|
|
197
|
+
HEAD: "head",
|
|
198
|
+
HTML: "html",
|
|
199
|
+
LINK: "link",
|
|
200
|
+
META: "meta",
|
|
201
|
+
NOSCRIPT: "noscript",
|
|
202
|
+
SCRIPT: "script",
|
|
203
|
+
STYLE: "style",
|
|
204
|
+
TITLE: "title",
|
|
205
|
+
FRAGMENT: "Symbol(react.fragment)"
|
|
206
|
+
};
|
|
207
|
+
p = { rel: [
|
|
208
|
+
"amphtml",
|
|
209
|
+
"canonical",
|
|
210
|
+
"alternate"
|
|
211
|
+
] };
|
|
212
|
+
f = { type: ["application/ld+json"] };
|
|
213
|
+
d = {
|
|
214
|
+
charset: "",
|
|
215
|
+
name: ["robots", "description"],
|
|
216
|
+
property: [
|
|
217
|
+
"og:type",
|
|
218
|
+
"og:title",
|
|
219
|
+
"og:url",
|
|
220
|
+
"og:image",
|
|
221
|
+
"og:image:alt",
|
|
222
|
+
"og:description",
|
|
223
|
+
"twitter:url",
|
|
224
|
+
"twitter:title",
|
|
225
|
+
"twitter:description",
|
|
226
|
+
"twitter:image",
|
|
227
|
+
"twitter:image:alt",
|
|
228
|
+
"twitter:card",
|
|
229
|
+
"twitter:site"
|
|
230
|
+
]
|
|
231
|
+
};
|
|
232
|
+
h = Object.keys(l).map(function(t) {
|
|
233
|
+
return l[t];
|
|
234
|
+
});
|
|
235
|
+
m = {
|
|
236
|
+
accesskey: "accessKey",
|
|
237
|
+
charset: "charSet",
|
|
238
|
+
class: "className",
|
|
239
|
+
contenteditable: "contentEditable",
|
|
240
|
+
contextmenu: "contextMenu",
|
|
241
|
+
"http-equiv": "httpEquiv",
|
|
242
|
+
itemprop: "itemProp",
|
|
243
|
+
tabindex: "tabIndex"
|
|
244
|
+
};
|
|
245
|
+
y = Object.keys(m).reduce(function(t, e) {
|
|
246
|
+
return t[m[e]] = e, t;
|
|
247
|
+
}, {});
|
|
248
|
+
T = function(t, e) {
|
|
249
|
+
for (var r = t.length - 1; r >= 0; r -= 1) {
|
|
250
|
+
var n = t[r];
|
|
251
|
+
if (Object.prototype.hasOwnProperty.call(n, e)) return n[e];
|
|
252
|
+
}
|
|
253
|
+
return null;
|
|
254
|
+
};
|
|
255
|
+
g = function(t) {
|
|
256
|
+
var e = T(t, l.TITLE), r = T(t, "titleTemplate");
|
|
257
|
+
if (Array.isArray(e) && (e = e.join("")), r && e) return r.replace(/%s/g, function() {
|
|
258
|
+
return e;
|
|
259
|
+
});
|
|
260
|
+
var n = T(t, "defaultTitle");
|
|
261
|
+
return e || n || void 0;
|
|
262
|
+
};
|
|
263
|
+
b = function(t) {
|
|
264
|
+
return T(t, "onChangeClientState") || function() {};
|
|
265
|
+
};
|
|
266
|
+
v = function(t, e) {
|
|
267
|
+
return e.filter(function(e) {
|
|
268
|
+
return void 0 !== e[t];
|
|
269
|
+
}).map(function(e) {
|
|
270
|
+
return e[t];
|
|
271
|
+
}).reduce(function(t, e) {
|
|
272
|
+
return a({}, t, e);
|
|
273
|
+
}, {});
|
|
274
|
+
};
|
|
275
|
+
A = function(t, e) {
|
|
276
|
+
return e.filter(function(t) {
|
|
277
|
+
return void 0 !== t[l.BASE];
|
|
278
|
+
}).map(function(t) {
|
|
279
|
+
return t[l.BASE];
|
|
280
|
+
}).reverse().reduce(function(e, r) {
|
|
281
|
+
if (!e.length) for (var n = Object.keys(r), i = 0; i < n.length; i += 1) {
|
|
282
|
+
var o = n[i].toLowerCase();
|
|
283
|
+
if (-1 !== t.indexOf(o) && r[o]) return e.concat(r);
|
|
284
|
+
}
|
|
285
|
+
return e;
|
|
286
|
+
}, []);
|
|
287
|
+
};
|
|
288
|
+
C = function(t, e, r) {
|
|
289
|
+
var n = {};
|
|
290
|
+
return r.filter(function(e) {
|
|
291
|
+
return !!Array.isArray(e[t]) || (void 0 !== e[t] && console && "function" == typeof console.warn && console.warn("Helmet: " + t + " should be of type \"Array\". Instead found type \"" + typeof e[t] + "\""), !1);
|
|
292
|
+
}).map(function(e) {
|
|
293
|
+
return e[t];
|
|
294
|
+
}).reverse().reduce(function(t, r) {
|
|
295
|
+
var i = {};
|
|
296
|
+
r.filter(function(t) {
|
|
297
|
+
for (var r, o = Object.keys(t), a = 0; a < o.length; a += 1) {
|
|
298
|
+
var s = o[a], c = s.toLowerCase();
|
|
299
|
+
-1 === e.indexOf(c) || "rel" === r && "canonical" === t[r].toLowerCase() || "rel" === c && "stylesheet" === t[c].toLowerCase() || (r = c), -1 === e.indexOf(s) || "innerHTML" !== s && "cssText" !== s && "itemprop" !== s || (r = s);
|
|
300
|
+
}
|
|
301
|
+
if (!r || !t[r]) return !1;
|
|
302
|
+
var u = t[r].toLowerCase();
|
|
303
|
+
return n[r] || (n[r] = {}), i[r] || (i[r] = {}), !n[r][u] && (i[r][u] = !0, !0);
|
|
304
|
+
}).reverse().forEach(function(e) {
|
|
305
|
+
return t.push(e);
|
|
306
|
+
});
|
|
307
|
+
for (var o = Object.keys(i), s = 0; s < o.length; s += 1) {
|
|
308
|
+
var c = o[s];
|
|
309
|
+
n[c] = a({}, n[c], i[c]);
|
|
310
|
+
}
|
|
311
|
+
return t;
|
|
312
|
+
}, []).reverse();
|
|
313
|
+
};
|
|
314
|
+
O = function(t, e) {
|
|
315
|
+
if (Array.isArray(t) && t.length) {
|
|
316
|
+
for (var r = 0; r < t.length; r += 1) if (t[r][e]) return !0;
|
|
317
|
+
}
|
|
318
|
+
return !1;
|
|
319
|
+
};
|
|
320
|
+
S = function(t) {
|
|
321
|
+
return Array.isArray(t) ? t.join("") : t;
|
|
322
|
+
};
|
|
323
|
+
E = function(t, e) {
|
|
324
|
+
return Array.isArray(t) ? t.reduce(function(t, r) {
|
|
325
|
+
return function(t, e) {
|
|
326
|
+
for (var r = Object.keys(t), n = 0; n < r.length; n += 1) if (e[r[n]] && e[r[n]].includes(t[r[n]])) return !0;
|
|
327
|
+
return !1;
|
|
328
|
+
}(r, e) ? t.priority.push(r) : t.default.push(r), t;
|
|
329
|
+
}, {
|
|
330
|
+
priority: [],
|
|
331
|
+
default: []
|
|
332
|
+
}) : { default: t };
|
|
333
|
+
};
|
|
334
|
+
I = function(t, e) {
|
|
335
|
+
var r;
|
|
336
|
+
return a({}, t, ((r = {})[e] = void 0, r));
|
|
337
|
+
};
|
|
338
|
+
P = [
|
|
339
|
+
l.NOSCRIPT,
|
|
340
|
+
l.SCRIPT,
|
|
341
|
+
l.STYLE
|
|
342
|
+
];
|
|
343
|
+
w = function(t, e) {
|
|
344
|
+
return void 0 === e && (e = !0), !1 === e ? String(t) : String(t).replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
345
|
+
};
|
|
346
|
+
x = function(t) {
|
|
347
|
+
return Object.keys(t).reduce(function(e, r) {
|
|
348
|
+
var n = void 0 !== t[r] ? r + "=\"" + t[r] + "\"" : "" + r;
|
|
349
|
+
return e ? e + " " + n : n;
|
|
350
|
+
}, "");
|
|
351
|
+
};
|
|
352
|
+
L = function(t, e) {
|
|
353
|
+
return void 0 === e && (e = {}), Object.keys(t).reduce(function(e, r) {
|
|
354
|
+
return e[m[r] || r] = t[r], e;
|
|
355
|
+
}, e);
|
|
356
|
+
};
|
|
357
|
+
j = function(e, r) {
|
|
358
|
+
return r.map(function(r, n) {
|
|
359
|
+
var i, o = ((i = { key: n })["data-rh"] = !0, i);
|
|
360
|
+
return Object.keys(r).forEach(function(t) {
|
|
361
|
+
var e = m[t] || t;
|
|
362
|
+
"innerHTML" === e || "cssText" === e ? o.dangerouslySetInnerHTML = { __html: r.innerHTML || r.cssText } : o[e] = r[t];
|
|
363
|
+
}), _storybook_global_react_default.createElement(e, o);
|
|
364
|
+
});
|
|
365
|
+
};
|
|
366
|
+
M = function(e, r, n) {
|
|
367
|
+
switch (e) {
|
|
368
|
+
case l.TITLE: return {
|
|
369
|
+
toComponent: function() {
|
|
370
|
+
return n = r.titleAttributes, (i = { key: e = r.title })["data-rh"] = !0, o = L(n, i), [_storybook_global_react_default.createElement(l.TITLE, o, e)];
|
|
371
|
+
var e, n, i, o;
|
|
372
|
+
},
|
|
373
|
+
toString: function() {
|
|
374
|
+
return function(t, e, r, n) {
|
|
375
|
+
var i = x(r), o = S(e);
|
|
376
|
+
return i ? "<" + t + " data-rh=\"true\" " + i + ">" + w(o, n) + "</" + t + ">" : "<" + t + " data-rh=\"true\">" + w(o, n) + "</" + t + ">";
|
|
377
|
+
}(e, r.title, r.titleAttributes, n);
|
|
378
|
+
}
|
|
379
|
+
};
|
|
380
|
+
case "bodyAttributes":
|
|
381
|
+
case "htmlAttributes": return {
|
|
382
|
+
toComponent: function() {
|
|
383
|
+
return L(r);
|
|
384
|
+
},
|
|
385
|
+
toString: function() {
|
|
386
|
+
return x(r);
|
|
387
|
+
}
|
|
388
|
+
};
|
|
389
|
+
default: return {
|
|
390
|
+
toComponent: function() {
|
|
391
|
+
return j(e, r);
|
|
392
|
+
},
|
|
393
|
+
toString: function() {
|
|
394
|
+
return function(t, e, r) {
|
|
395
|
+
return e.reduce(function(e, n) {
|
|
396
|
+
var i = Object.keys(n).filter(function(t) {
|
|
397
|
+
return !("innerHTML" === t || "cssText" === t);
|
|
398
|
+
}).reduce(function(t, e) {
|
|
399
|
+
var i = void 0 === n[e] ? e : e + "=\"" + w(n[e], r) + "\"";
|
|
400
|
+
return t ? t + " " + i : i;
|
|
401
|
+
}, ""), o = n.innerHTML || n.cssText || "", a = -1 === P.indexOf(t);
|
|
402
|
+
return e + "<" + t + " data-rh=\"true\" " + i + (a ? "/>" : ">" + o + "</" + t + ">");
|
|
403
|
+
}, "");
|
|
404
|
+
}(e, r, n);
|
|
405
|
+
}
|
|
406
|
+
};
|
|
407
|
+
}
|
|
408
|
+
};
|
|
409
|
+
k = function(t) {
|
|
410
|
+
var e = t.baseTag, r = t.bodyAttributes, n = t.encode, i = t.htmlAttributes, o = t.noscriptTags, a = t.styleTags, s = t.title, c = void 0 === s ? "" : s, u = t.titleAttributes, h = t.linkTags, m = t.metaTags, y = t.scriptTags, T = {
|
|
411
|
+
toComponent: function() {},
|
|
412
|
+
toString: function() {
|
|
413
|
+
return "";
|
|
414
|
+
}
|
|
415
|
+
};
|
|
416
|
+
if (t.prioritizeSeoTags) {
|
|
417
|
+
var g = function(t) {
|
|
418
|
+
var e = t.linkTags, r = t.scriptTags, n = t.encode, i = E(t.metaTags, d), o = E(e, p), a = E(r, f);
|
|
419
|
+
return {
|
|
420
|
+
priorityMethods: {
|
|
421
|
+
toComponent: function() {
|
|
422
|
+
return [].concat(j(l.META, i.priority), j(l.LINK, o.priority), j(l.SCRIPT, a.priority));
|
|
423
|
+
},
|
|
424
|
+
toString: function() {
|
|
425
|
+
return M(l.META, i.priority, n) + " " + M(l.LINK, o.priority, n) + " " + M(l.SCRIPT, a.priority, n);
|
|
426
|
+
}
|
|
427
|
+
},
|
|
428
|
+
metaTags: i.default,
|
|
429
|
+
linkTags: o.default,
|
|
430
|
+
scriptTags: a.default
|
|
431
|
+
};
|
|
432
|
+
}(t);
|
|
433
|
+
T = g.priorityMethods, h = g.linkTags, m = g.metaTags, y = g.scriptTags;
|
|
434
|
+
}
|
|
435
|
+
return {
|
|
436
|
+
priority: T,
|
|
437
|
+
base: M(l.BASE, e, n),
|
|
438
|
+
bodyAttributes: M("bodyAttributes", r, n),
|
|
439
|
+
htmlAttributes: M("htmlAttributes", i, n),
|
|
440
|
+
link: M(l.LINK, h, n),
|
|
441
|
+
meta: M(l.META, m, n),
|
|
442
|
+
noscript: M(l.NOSCRIPT, o, n),
|
|
443
|
+
script: M(l.SCRIPT, y, n),
|
|
444
|
+
style: M(l.STYLE, a, n),
|
|
445
|
+
title: M(l.TITLE, {
|
|
446
|
+
title: c,
|
|
447
|
+
titleAttributes: u
|
|
448
|
+
}, n)
|
|
449
|
+
};
|
|
450
|
+
};
|
|
451
|
+
H = [];
|
|
452
|
+
N = function(t, e) {
|
|
453
|
+
var r = this;
|
|
454
|
+
void 0 === e && (e = "undefined" != typeof document), this.instances = [], this.value = {
|
|
455
|
+
setHelmet: function(t) {
|
|
456
|
+
r.context.helmet = t;
|
|
457
|
+
},
|
|
458
|
+
helmetInstances: {
|
|
459
|
+
get: function() {
|
|
460
|
+
return r.canUseDOM ? H : r.instances;
|
|
461
|
+
},
|
|
462
|
+
add: function(t) {
|
|
463
|
+
(r.canUseDOM ? H : r.instances).push(t);
|
|
464
|
+
},
|
|
465
|
+
remove: function(t) {
|
|
466
|
+
var e = (r.canUseDOM ? H : r.instances).indexOf(t);
|
|
467
|
+
(r.canUseDOM ? H : r.instances).splice(e, 1);
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
}, this.context = t, this.canUseDOM = e, e || (t.helmet = k({
|
|
471
|
+
baseTag: [],
|
|
472
|
+
bodyAttributes: {},
|
|
473
|
+
encodeSpecialCharacters: !0,
|
|
474
|
+
htmlAttributes: {},
|
|
475
|
+
linkTags: [],
|
|
476
|
+
metaTags: [],
|
|
477
|
+
noscriptTags: [],
|
|
478
|
+
scriptTags: [],
|
|
479
|
+
styleTags: [],
|
|
480
|
+
title: "",
|
|
481
|
+
titleAttributes: {}
|
|
482
|
+
}));
|
|
483
|
+
};
|
|
484
|
+
R = _storybook_global_react_default.createContext({});
|
|
485
|
+
D = import_prop_types.default.shape({
|
|
486
|
+
setHelmet: import_prop_types.default.func,
|
|
487
|
+
helmetInstances: import_prop_types.default.shape({
|
|
488
|
+
get: import_prop_types.default.func,
|
|
489
|
+
add: import_prop_types.default.func,
|
|
490
|
+
remove: import_prop_types.default.func
|
|
491
|
+
})
|
|
492
|
+
});
|
|
493
|
+
U = "undefined" != typeof document;
|
|
494
|
+
q = /*#__PURE__*/ function(e) {
|
|
495
|
+
function r(t) {
|
|
496
|
+
var n;
|
|
497
|
+
return (n = e.call(this, t) || this).helmetData = new N(n.props.context, r.canUseDOM), n;
|
|
498
|
+
}
|
|
499
|
+
return s(r, e), r.prototype.render = function() {
|
|
500
|
+
/*#__PURE__*/ return _storybook_global_react_default.createElement(R.Provider, { value: this.helmetData.value }, this.props.children);
|
|
501
|
+
}, r;
|
|
502
|
+
}(Component);
|
|
503
|
+
q.canUseDOM = U, q.propTypes = {
|
|
504
|
+
context: import_prop_types.default.shape({ helmet: import_prop_types.default.shape() }),
|
|
505
|
+
children: import_prop_types.default.node.isRequired
|
|
506
|
+
}, q.defaultProps = { context: {} }, q.displayName = "HelmetProvider";
|
|
507
|
+
Y = function(t, e) {
|
|
508
|
+
var r, n = document.head || document.querySelector(l.HEAD), i = n.querySelectorAll(t + "[data-rh]"), o = [].slice.call(i), a = [];
|
|
509
|
+
return e && e.length && e.forEach(function(e) {
|
|
510
|
+
var n = document.createElement(t);
|
|
511
|
+
for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && ("innerHTML" === i ? n.innerHTML = e.innerHTML : "cssText" === i ? n.styleSheet ? n.styleSheet.cssText = e.cssText : n.appendChild(document.createTextNode(e.cssText)) : n.setAttribute(i, void 0 === e[i] ? "" : e[i]));
|
|
512
|
+
n.setAttribute("data-rh", "true"), o.some(function(t, e) {
|
|
513
|
+
return r = e, n.isEqualNode(t);
|
|
514
|
+
}) ? o.splice(r, 1) : a.push(n);
|
|
515
|
+
}), o.forEach(function(t) {
|
|
516
|
+
return t.parentNode.removeChild(t);
|
|
517
|
+
}), a.forEach(function(t) {
|
|
518
|
+
return n.appendChild(t);
|
|
519
|
+
}), {
|
|
520
|
+
oldTags: o,
|
|
521
|
+
newTags: a
|
|
522
|
+
};
|
|
523
|
+
};
|
|
524
|
+
B = function(t, e) {
|
|
525
|
+
var r = document.getElementsByTagName(t)[0];
|
|
526
|
+
if (r) {
|
|
527
|
+
for (var n = r.getAttribute("data-rh"), i = n ? n.split(",") : [], o = [].concat(i), a = Object.keys(e), s = 0; s < a.length; s += 1) {
|
|
528
|
+
var c = a[s], u = e[c] || "";
|
|
529
|
+
r.getAttribute(c) !== u && r.setAttribute(c, u), -1 === i.indexOf(c) && i.push(c);
|
|
530
|
+
var l = o.indexOf(c);
|
|
531
|
+
-1 !== l && o.splice(l, 1);
|
|
532
|
+
}
|
|
533
|
+
for (var p = o.length - 1; p >= 0; p -= 1) r.removeAttribute(o[p]);
|
|
534
|
+
i.length === o.length ? r.removeAttribute("data-rh") : r.getAttribute("data-rh") !== a.join(",") && r.setAttribute("data-rh", a.join(","));
|
|
535
|
+
}
|
|
536
|
+
};
|
|
537
|
+
K = function(t, e) {
|
|
538
|
+
var r = t.baseTag, n = t.htmlAttributes, i = t.linkTags, o = t.metaTags, a = t.noscriptTags, s = t.onChangeClientState, c = t.scriptTags, u = t.styleTags, p = t.title, f = t.titleAttributes;
|
|
539
|
+
B(l.BODY, t.bodyAttributes), B(l.HTML, n), function(t, e) {
|
|
540
|
+
void 0 !== t && document.title !== t && (document.title = S(t)), B(l.TITLE, e);
|
|
541
|
+
}(p, f);
|
|
542
|
+
var d = {
|
|
543
|
+
baseTag: Y(l.BASE, r),
|
|
544
|
+
linkTags: Y(l.LINK, i),
|
|
545
|
+
metaTags: Y(l.META, o),
|
|
546
|
+
noscriptTags: Y(l.NOSCRIPT, a),
|
|
547
|
+
scriptTags: Y(l.SCRIPT, c),
|
|
548
|
+
styleTags: Y(l.STYLE, u)
|
|
549
|
+
}, h = {}, m = {};
|
|
550
|
+
Object.keys(d).forEach(function(t) {
|
|
551
|
+
var e = d[t], r = e.newTags, n = e.oldTags;
|
|
552
|
+
r.length && (h[t] = r), n.length && (m[t] = d[t].oldTags);
|
|
553
|
+
}), e && e(), s(t, h, m);
|
|
554
|
+
};
|
|
555
|
+
_ = null;
|
|
556
|
+
z = /*#__PURE__*/ function(t) {
|
|
557
|
+
function e() {
|
|
558
|
+
for (var e, r = arguments.length, n = new Array(r), i = 0; i < r; i++) n[i] = arguments[i];
|
|
559
|
+
return (e = t.call.apply(t, [this].concat(n)) || this).rendered = !1, e;
|
|
560
|
+
}
|
|
561
|
+
s(e, t);
|
|
562
|
+
var r = e.prototype;
|
|
563
|
+
return r.shouldComponentUpdate = function(t) {
|
|
564
|
+
return !(0, import_shallowequal.default)(t, this.props);
|
|
565
|
+
}, r.componentDidUpdate = function() {
|
|
566
|
+
this.emitChange();
|
|
567
|
+
}, r.componentWillUnmount = function() {
|
|
568
|
+
this.props.context.helmetInstances.remove(this), this.emitChange();
|
|
569
|
+
}, r.emitChange = function() {
|
|
570
|
+
var t, e, r = this.props.context, n = r.setHelmet, i = null, o = (t = r.helmetInstances.get().map(function(t) {
|
|
571
|
+
var e = a({}, t.props);
|
|
572
|
+
return delete e.context, e;
|
|
573
|
+
}), {
|
|
574
|
+
baseTag: A(["href"], t),
|
|
575
|
+
bodyAttributes: v("bodyAttributes", t),
|
|
576
|
+
defer: T(t, "defer"),
|
|
577
|
+
encode: T(t, "encodeSpecialCharacters"),
|
|
578
|
+
htmlAttributes: v("htmlAttributes", t),
|
|
579
|
+
linkTags: C(l.LINK, ["rel", "href"], t),
|
|
580
|
+
metaTags: C(l.META, [
|
|
581
|
+
"name",
|
|
582
|
+
"charset",
|
|
583
|
+
"http-equiv",
|
|
584
|
+
"property",
|
|
585
|
+
"itemprop"
|
|
586
|
+
], t),
|
|
587
|
+
noscriptTags: C(l.NOSCRIPT, ["innerHTML"], t),
|
|
588
|
+
onChangeClientState: b(t),
|
|
589
|
+
scriptTags: C(l.SCRIPT, ["src", "innerHTML"], t),
|
|
590
|
+
styleTags: C(l.STYLE, ["cssText"], t),
|
|
591
|
+
title: g(t),
|
|
592
|
+
titleAttributes: v("titleAttributes", t),
|
|
593
|
+
prioritizeSeoTags: O(t, "prioritizeSeoTags")
|
|
594
|
+
});
|
|
595
|
+
q.canUseDOM ? (e = o, _ && cancelAnimationFrame(_), e.defer ? _ = requestAnimationFrame(function() {
|
|
596
|
+
K(e, function() {
|
|
597
|
+
_ = null;
|
|
598
|
+
});
|
|
599
|
+
}) : (K(e), _ = null)) : k && (i = k(o)), n(i);
|
|
600
|
+
}, r.init = function() {
|
|
601
|
+
this.rendered || (this.rendered = !0, this.props.context.helmetInstances.add(this), this.emitChange());
|
|
602
|
+
}, r.render = function() {
|
|
603
|
+
return this.init(), null;
|
|
604
|
+
}, e;
|
|
605
|
+
}(Component);
|
|
606
|
+
z.propTypes = { context: D.isRequired }, z.displayName = "HelmetDispatcher";
|
|
607
|
+
F = ["children"];
|
|
608
|
+
G = ["children"];
|
|
609
|
+
W = /*#__PURE__*/ function(e) {
|
|
610
|
+
function r() {
|
|
611
|
+
return e.apply(this, arguments) || this;
|
|
612
|
+
}
|
|
613
|
+
s(r, e);
|
|
614
|
+
var o = r.prototype;
|
|
615
|
+
return o.shouldComponentUpdate = function(t) {
|
|
616
|
+
return !(0, import_react_fast_compare.default)(I(this.props, "helmetData"), I(t, "helmetData"));
|
|
617
|
+
}, o.mapNestedChildrenToProps = function(t, e) {
|
|
618
|
+
if (!e) return null;
|
|
619
|
+
switch (t.type) {
|
|
620
|
+
case l.SCRIPT:
|
|
621
|
+
case l.NOSCRIPT: return { innerHTML: e };
|
|
622
|
+
case l.STYLE: return { cssText: e };
|
|
623
|
+
default: throw new Error("<" + t.type + " /> elements are self-closing and can not contain children. Refer to our API for more information.");
|
|
624
|
+
}
|
|
625
|
+
}, o.flattenArrayTypeChildren = function(t) {
|
|
626
|
+
var e, r = t.child, n = t.arrayTypeChildren;
|
|
627
|
+
return a({}, n, ((e = {})[r.type] = [].concat(n[r.type] || [], [a({}, t.newChildProps, this.mapNestedChildrenToProps(r, t.nestedChildren))]), e));
|
|
628
|
+
}, o.mapObjectTypeChildren = function(t) {
|
|
629
|
+
var e, r, n = t.child, i = t.newProps, o = t.newChildProps, s = t.nestedChildren;
|
|
630
|
+
switch (n.type) {
|
|
631
|
+
case l.TITLE: return a({}, i, ((e = {})[n.type] = s, e.titleAttributes = a({}, o), e));
|
|
632
|
+
case l.BODY: return a({}, i, { bodyAttributes: a({}, o) });
|
|
633
|
+
case l.HTML: return a({}, i, { htmlAttributes: a({}, o) });
|
|
634
|
+
default: return a({}, i, ((r = {})[n.type] = a({}, o), r));
|
|
635
|
+
}
|
|
636
|
+
}, o.mapArrayTypeChildrenToProps = function(t, e) {
|
|
637
|
+
var r = a({}, e);
|
|
638
|
+
return Object.keys(t).forEach(function(e) {
|
|
639
|
+
var n;
|
|
640
|
+
r = a({}, r, ((n = {})[e] = t[e], n));
|
|
641
|
+
}), r;
|
|
642
|
+
}, o.warnOnInvalidChildren = function(t, e) {
|
|
643
|
+
return (0, import_browser.default)(h.some(function(e) {
|
|
644
|
+
return t.type === e;
|
|
645
|
+
}), "function" == typeof t.type ? "You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information." : "Only elements types " + h.join(", ") + " are allowed. Helmet does not support rendering <" + t.type + "> elements. Refer to our API for more information."), (0, import_browser.default)(!e || "string" == typeof e || Array.isArray(e) && !e.some(function(t) {
|
|
646
|
+
return "string" != typeof t;
|
|
647
|
+
}), "Helmet expects a string as a child of <" + t.type + ">. Did you forget to wrap your children in braces? ( <" + t.type + ">{``}</" + t.type + "> ) Refer to our API for more information."), !0;
|
|
648
|
+
}, o.mapChildrenToProps = function(e, r) {
|
|
649
|
+
var n = this, i = {};
|
|
650
|
+
return _storybook_global_react_default.Children.forEach(e, function(t) {
|
|
651
|
+
if (t && t.props) {
|
|
652
|
+
var e = t.props, o = e.children, a = u(e, F), s = Object.keys(a).reduce(function(t, e) {
|
|
653
|
+
return t[y[e] || e] = a[e], t;
|
|
654
|
+
}, {}), c = t.type;
|
|
655
|
+
switch ("symbol" == typeof c ? c = c.toString() : n.warnOnInvalidChildren(t, o), c) {
|
|
656
|
+
case l.FRAGMENT:
|
|
657
|
+
r = n.mapChildrenToProps(o, r);
|
|
658
|
+
break;
|
|
659
|
+
case l.LINK:
|
|
660
|
+
case l.META:
|
|
661
|
+
case l.NOSCRIPT:
|
|
662
|
+
case l.SCRIPT:
|
|
663
|
+
case l.STYLE:
|
|
664
|
+
i = n.flattenArrayTypeChildren({
|
|
665
|
+
child: t,
|
|
666
|
+
arrayTypeChildren: i,
|
|
667
|
+
newChildProps: s,
|
|
668
|
+
nestedChildren: o
|
|
669
|
+
});
|
|
670
|
+
break;
|
|
671
|
+
default: r = n.mapObjectTypeChildren({
|
|
672
|
+
child: t,
|
|
673
|
+
newProps: r,
|
|
674
|
+
newChildProps: s,
|
|
675
|
+
nestedChildren: o
|
|
676
|
+
});
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
}), this.mapArrayTypeChildrenToProps(i, r);
|
|
680
|
+
}, o.render = function() {
|
|
681
|
+
var e = this.props, r = e.children, n = u(e, G), i = a({}, n), o = n.helmetData;
|
|
682
|
+
return r && (i = this.mapChildrenToProps(r, i)), !o || o instanceof N || (o = new N(o.context, o.instances)), o ? /*#__PURE__*/ _storybook_global_react_default.createElement(z, a({}, i, {
|
|
683
|
+
context: o.value,
|
|
684
|
+
helmetData: void 0
|
|
685
|
+
})) : /*#__PURE__*/ _storybook_global_react_default.createElement(R.Consumer, null, function(e) {
|
|
686
|
+
/*#__PURE__*/ return _storybook_global_react_default.createElement(z, a({}, i, { context: e }));
|
|
687
|
+
});
|
|
688
|
+
}, r;
|
|
689
|
+
}(Component);
|
|
690
|
+
W.propTypes = {
|
|
691
|
+
base: import_prop_types.default.object,
|
|
692
|
+
bodyAttributes: import_prop_types.default.object,
|
|
693
|
+
children: import_prop_types.default.oneOfType([import_prop_types.default.arrayOf(import_prop_types.default.node), import_prop_types.default.node]),
|
|
694
|
+
defaultTitle: import_prop_types.default.string,
|
|
695
|
+
defer: import_prop_types.default.bool,
|
|
696
|
+
encodeSpecialCharacters: import_prop_types.default.bool,
|
|
697
|
+
htmlAttributes: import_prop_types.default.object,
|
|
698
|
+
link: import_prop_types.default.arrayOf(import_prop_types.default.object),
|
|
699
|
+
meta: import_prop_types.default.arrayOf(import_prop_types.default.object),
|
|
700
|
+
noscript: import_prop_types.default.arrayOf(import_prop_types.default.object),
|
|
701
|
+
onChangeClientState: import_prop_types.default.func,
|
|
702
|
+
script: import_prop_types.default.arrayOf(import_prop_types.default.object),
|
|
703
|
+
style: import_prop_types.default.arrayOf(import_prop_types.default.object),
|
|
704
|
+
title: import_prop_types.default.string,
|
|
705
|
+
titleAttributes: import_prop_types.default.object,
|
|
706
|
+
titleTemplate: import_prop_types.default.string,
|
|
707
|
+
prioritizeSeoTags: import_prop_types.default.bool,
|
|
708
|
+
helmetData: import_prop_types.default.object
|
|
709
|
+
}, W.defaultProps = {
|
|
710
|
+
defer: !0,
|
|
711
|
+
encodeSpecialCharacters: !0,
|
|
712
|
+
prioritizeSeoTags: !1
|
|
713
|
+
}, W.displayName = "Helmet";
|
|
714
|
+
})))();
|
|
715
|
+
}
|
|
716
|
+
//#endregion
|
|
717
|
+
//#region ../../node_modules/react-transition-state/dist/esm/internal.mjs
|
|
718
|
+
var STATUS, getState, startOrEnd, getEndStatus, getTimeout, nextTick;
|
|
719
|
+
function init_internal() {
|
|
720
|
+
return (init_internal = __esmMin((() => {
|
|
721
|
+
STATUS = [
|
|
722
|
+
"preEnter",
|
|
723
|
+
"entering",
|
|
724
|
+
"entered",
|
|
725
|
+
"preExit",
|
|
726
|
+
"exiting",
|
|
727
|
+
"exited",
|
|
728
|
+
"unmounted"
|
|
729
|
+
];
|
|
730
|
+
getState = (status) => ({
|
|
731
|
+
$: status,
|
|
732
|
+
status: STATUS[status],
|
|
733
|
+
isEnter: status < 3,
|
|
734
|
+
isMounted: status !== 6,
|
|
735
|
+
isResolved: status === 2 || status > 4
|
|
736
|
+
});
|
|
737
|
+
startOrEnd = (unmounted) => unmounted ? 6 : 5;
|
|
738
|
+
getEndStatus = (status, unmountOnExit) => {
|
|
739
|
+
switch (status) {
|
|
740
|
+
case 1:
|
|
741
|
+
case 0: return 2;
|
|
742
|
+
case 4:
|
|
743
|
+
case 3: return startOrEnd(unmountOnExit);
|
|
744
|
+
}
|
|
745
|
+
};
|
|
746
|
+
getTimeout = (timeout) => typeof timeout === "object" ? [timeout.enter, timeout.exit] : [timeout, timeout];
|
|
747
|
+
nextTick = (callback, config) => {
|
|
748
|
+
config.r = requestAnimationFrame(() => {
|
|
749
|
+
config.r = requestAnimationFrame(callback);
|
|
750
|
+
});
|
|
751
|
+
};
|
|
752
|
+
})))();
|
|
753
|
+
}
|
|
754
|
+
//#endregion
|
|
755
|
+
//#region ../../node_modules/react-transition-state/dist/esm/useTransitionState.mjs
|
|
756
|
+
var updateState, useTransitionState;
|
|
757
|
+
function init_useTransitionState() {
|
|
758
|
+
return (init_useTransitionState = __esmMin((() => {
|
|
759
|
+
init_internal();
|
|
760
|
+
init__storybook_global_react();
|
|
761
|
+
updateState = (status, setState, ref, onChange) => {
|
|
762
|
+
clearTimeout(ref.t);
|
|
763
|
+
cancelAnimationFrame(ref.r);
|
|
764
|
+
const state = getState(status);
|
|
765
|
+
setState(state);
|
|
766
|
+
ref.s = state;
|
|
767
|
+
onChange?.({ current: state });
|
|
768
|
+
};
|
|
769
|
+
useTransitionState = ({ enter = true, exit = true, preEnter, preExit, timeout, initialEntered, mountOnEnter, unmountOnExit, onStateChange: onChange } = {}) => {
|
|
770
|
+
const [state, setState] = useState(() => getState(initialEntered ? 2 : startOrEnd(mountOnEnter)));
|
|
771
|
+
const [ref] = useState({
|
|
772
|
+
s: state,
|
|
773
|
+
r: 0
|
|
774
|
+
});
|
|
775
|
+
const [enterTimeout, exitTimeout] = getTimeout(timeout);
|
|
776
|
+
const endTransition = useCallback(() => {
|
|
777
|
+
const status = getEndStatus(ref.s.$, unmountOnExit);
|
|
778
|
+
if (status) updateState(status, setState, ref, onChange);
|
|
779
|
+
}, [
|
|
780
|
+
onChange,
|
|
781
|
+
unmountOnExit,
|
|
782
|
+
ref
|
|
783
|
+
]);
|
|
784
|
+
return [
|
|
785
|
+
state,
|
|
786
|
+
useCallback((toEnter) => {
|
|
787
|
+
const transitState = (status) => {
|
|
788
|
+
updateState(status, setState, ref, onChange);
|
|
789
|
+
switch (status) {
|
|
790
|
+
case 1:
|
|
791
|
+
if (enterTimeout >= 0) ref.t = setTimeout(endTransition, enterTimeout);
|
|
792
|
+
break;
|
|
793
|
+
case 4:
|
|
794
|
+
if (exitTimeout >= 0) ref.t = setTimeout(endTransition, exitTimeout);
|
|
795
|
+
break;
|
|
796
|
+
case 0:
|
|
797
|
+
case 3: nextTick(() => transitState(status + 1), ref);
|
|
798
|
+
}
|
|
799
|
+
};
|
|
800
|
+
const enterStage = ref.s.isEnter;
|
|
801
|
+
if (typeof toEnter !== "boolean") toEnter = !enterStage;
|
|
802
|
+
if (toEnter) !enterStage && transitState(enter ? preEnter ? 0 : 1 : 2);
|
|
803
|
+
else enterStage && transitState(exit ? preExit ? 3 : 4 : startOrEnd(unmountOnExit));
|
|
804
|
+
}, [
|
|
805
|
+
ref,
|
|
806
|
+
endTransition,
|
|
807
|
+
onChange,
|
|
808
|
+
enter,
|
|
809
|
+
exit,
|
|
810
|
+
preEnter,
|
|
811
|
+
preExit,
|
|
812
|
+
enterTimeout,
|
|
813
|
+
exitTimeout,
|
|
814
|
+
unmountOnExit
|
|
815
|
+
]),
|
|
816
|
+
endTransition
|
|
817
|
+
];
|
|
818
|
+
};
|
|
819
|
+
})))();
|
|
820
|
+
}
|
|
821
|
+
//#endregion
|
|
822
|
+
//#region ../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js
|
|
823
|
+
/**
|
|
824
|
+
* @license React
|
|
825
|
+
* use-sync-external-store-shim.production.js
|
|
826
|
+
*
|
|
827
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
828
|
+
*
|
|
829
|
+
* This source code is licensed under the MIT license found in the
|
|
830
|
+
* LICENSE file in the root directory of this source tree.
|
|
831
|
+
*/
|
|
832
|
+
var require_use_sync_external_store_shim_production = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
833
|
+
var React = (init__storybook_global_react(), __toCommonJS(_storybook_global_react_exports));
|
|
834
|
+
function is(x, y) {
|
|
835
|
+
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
836
|
+
}
|
|
837
|
+
var objectIs = "function" === typeof Object.is ? Object.is : is;
|
|
838
|
+
var useState = React.useState;
|
|
839
|
+
var useEffect = React.useEffect;
|
|
840
|
+
var useLayoutEffect = React.useLayoutEffect;
|
|
841
|
+
var useDebugValue = React.useDebugValue;
|
|
842
|
+
function useSyncExternalStore$2(subscribe, getSnapshot) {
|
|
843
|
+
var value = getSnapshot(), _useState = useState({ inst: {
|
|
844
|
+
value,
|
|
845
|
+
getSnapshot
|
|
846
|
+
} }), inst = _useState[0].inst, forceUpdate = _useState[1];
|
|
847
|
+
useLayoutEffect(function() {
|
|
848
|
+
inst.value = value;
|
|
849
|
+
inst.getSnapshot = getSnapshot;
|
|
850
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
851
|
+
}, [
|
|
852
|
+
subscribe,
|
|
853
|
+
value,
|
|
854
|
+
getSnapshot
|
|
855
|
+
]);
|
|
856
|
+
useEffect(function() {
|
|
857
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
858
|
+
return subscribe(function() {
|
|
859
|
+
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
|
|
860
|
+
});
|
|
861
|
+
}, [subscribe]);
|
|
862
|
+
useDebugValue(value);
|
|
863
|
+
return value;
|
|
864
|
+
}
|
|
865
|
+
function checkIfSnapshotChanged(inst) {
|
|
866
|
+
var latestGetSnapshot = inst.getSnapshot;
|
|
867
|
+
inst = inst.value;
|
|
868
|
+
try {
|
|
869
|
+
var nextValue = latestGetSnapshot();
|
|
870
|
+
return !objectIs(inst, nextValue);
|
|
871
|
+
} catch (error) {
|
|
872
|
+
return !0;
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
function useSyncExternalStore$1(subscribe, getSnapshot) {
|
|
876
|
+
return getSnapshot();
|
|
877
|
+
}
|
|
878
|
+
var shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
|
|
879
|
+
exports.useSyncExternalStore = void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;
|
|
880
|
+
}));
|
|
881
|
+
//#endregion
|
|
882
|
+
//#region ../../node_modules/use-sync-external-store/shim/index.js
|
|
883
|
+
var require_shim = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
884
|
+
module.exports = require_use_sync_external_store_shim_production();
|
|
885
|
+
}));
|
|
886
|
+
//#endregion
|
|
887
|
+
//#region ../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js
|
|
888
|
+
/**
|
|
889
|
+
* @license React
|
|
890
|
+
* use-sync-external-store-shim/with-selector.production.js
|
|
891
|
+
*
|
|
892
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
893
|
+
*
|
|
894
|
+
* This source code is licensed under the MIT license found in the
|
|
895
|
+
* LICENSE file in the root directory of this source tree.
|
|
896
|
+
*/
|
|
897
|
+
var require_with_selector_production = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
898
|
+
var React = (init__storybook_global_react(), __toCommonJS(_storybook_global_react_exports));
|
|
899
|
+
var shim = require_shim();
|
|
900
|
+
function is(x, y) {
|
|
901
|
+
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
|
|
902
|
+
}
|
|
903
|
+
var objectIs = "function" === typeof Object.is ? Object.is : is;
|
|
904
|
+
var useSyncExternalStore = shim.useSyncExternalStore;
|
|
905
|
+
var useRef = React.useRef;
|
|
906
|
+
var useEffect = React.useEffect;
|
|
907
|
+
var useMemo = React.useMemo;
|
|
908
|
+
var useDebugValue = React.useDebugValue;
|
|
909
|
+
exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
|
|
910
|
+
var instRef = useRef(null);
|
|
911
|
+
if (null === instRef.current) {
|
|
912
|
+
var inst = {
|
|
913
|
+
hasValue: !1,
|
|
914
|
+
value: null
|
|
915
|
+
};
|
|
916
|
+
instRef.current = inst;
|
|
917
|
+
} else inst = instRef.current;
|
|
918
|
+
instRef = useMemo(function() {
|
|
919
|
+
function memoizedSelector(nextSnapshot) {
|
|
920
|
+
if (!hasMemo) {
|
|
921
|
+
hasMemo = !0;
|
|
922
|
+
memoizedSnapshot = nextSnapshot;
|
|
923
|
+
nextSnapshot = selector(nextSnapshot);
|
|
924
|
+
if (void 0 !== isEqual && inst.hasValue) {
|
|
925
|
+
var currentSelection = inst.value;
|
|
926
|
+
if (isEqual(currentSelection, nextSnapshot)) return memoizedSelection = currentSelection;
|
|
927
|
+
}
|
|
928
|
+
return memoizedSelection = nextSnapshot;
|
|
929
|
+
}
|
|
930
|
+
currentSelection = memoizedSelection;
|
|
931
|
+
if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;
|
|
932
|
+
var nextSelection = selector(nextSnapshot);
|
|
933
|
+
if (void 0 !== isEqual && isEqual(currentSelection, nextSelection)) return memoizedSnapshot = nextSnapshot, currentSelection;
|
|
934
|
+
memoizedSnapshot = nextSnapshot;
|
|
935
|
+
return memoizedSelection = nextSelection;
|
|
936
|
+
}
|
|
937
|
+
var hasMemo = !1, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
|
|
938
|
+
return [function() {
|
|
939
|
+
return memoizedSelector(getSnapshot());
|
|
940
|
+
}, null === maybeGetServerSnapshot ? void 0 : function() {
|
|
941
|
+
return memoizedSelector(maybeGetServerSnapshot());
|
|
942
|
+
}];
|
|
943
|
+
}, [
|
|
944
|
+
getSnapshot,
|
|
945
|
+
getServerSnapshot,
|
|
946
|
+
selector,
|
|
947
|
+
isEqual
|
|
948
|
+
]);
|
|
949
|
+
var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);
|
|
950
|
+
useEffect(function() {
|
|
951
|
+
inst.hasValue = !0;
|
|
952
|
+
inst.value = value;
|
|
953
|
+
}, [value]);
|
|
954
|
+
useDebugValue(value);
|
|
955
|
+
return value;
|
|
956
|
+
};
|
|
957
|
+
}));
|
|
958
|
+
//#endregion
|
|
959
|
+
//#region ../../node_modules/use-sync-external-store/shim/with-selector.js
|
|
960
|
+
var require_with_selector = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
961
|
+
module.exports = require_with_selector_production();
|
|
962
|
+
}));
|
|
963
|
+
//#endregion
|
|
964
|
+
//#region ../../node_modules/memoizerific/memoizerific.js
|
|
965
|
+
var require_memoizerific = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
966
|
+
(function(f) {
|
|
967
|
+
if (typeof exports === "object" && typeof module !== "undefined") module.exports = f();
|
|
968
|
+
else if (typeof define === "function" && define.amd) define([], f);
|
|
969
|
+
else {
|
|
970
|
+
var g;
|
|
971
|
+
if (typeof window !== "undefined") g = window;
|
|
972
|
+
else if (typeof global !== "undefined") g = global;
|
|
973
|
+
else if (typeof self !== "undefined") g = self;
|
|
974
|
+
else g = this;
|
|
975
|
+
g.memoizerific = f();
|
|
976
|
+
}
|
|
977
|
+
})(function() {
|
|
978
|
+
return (function e(t, n, r) {
|
|
979
|
+
function s(o, u) {
|
|
980
|
+
if (!n[o]) {
|
|
981
|
+
if (!t[o]) {
|
|
982
|
+
var a = typeof __require == "function" && __require;
|
|
983
|
+
if (!u && a) return a(o, !0);
|
|
984
|
+
if (i) return i(o, !0);
|
|
985
|
+
var f = /* @__PURE__ */ new Error("Cannot find module '" + o + "'");
|
|
986
|
+
throw f.code = "MODULE_NOT_FOUND", f;
|
|
987
|
+
}
|
|
988
|
+
var l = n[o] = { exports: {} };
|
|
989
|
+
t[o][0].call(l.exports, function(e) {
|
|
990
|
+
var n = t[o][1][e];
|
|
991
|
+
return s(n ? n : e);
|
|
992
|
+
}, l, l.exports, e, t, n, r);
|
|
993
|
+
}
|
|
994
|
+
return n[o].exports;
|
|
995
|
+
}
|
|
996
|
+
var i = typeof __require == "function" && __require;
|
|
997
|
+
for (var o = 0; o < r.length; o++) s(r[o]);
|
|
998
|
+
return s;
|
|
999
|
+
})({
|
|
1000
|
+
1: [function(_dereq_, module, exports) {
|
|
1001
|
+
module.exports = function(forceSimilar) {
|
|
1002
|
+
if (typeof Map !== "function" || forceSimilar) return new (_dereq_("./similar"))();
|
|
1003
|
+
else return /* @__PURE__ */ new Map();
|
|
1004
|
+
};
|
|
1005
|
+
}, { "./similar": 2 }],
|
|
1006
|
+
2: [function(_dereq_, module, exports) {
|
|
1007
|
+
function Similar() {
|
|
1008
|
+
this.list = [];
|
|
1009
|
+
this.lastItem = void 0;
|
|
1010
|
+
this.size = 0;
|
|
1011
|
+
return this;
|
|
1012
|
+
}
|
|
1013
|
+
Similar.prototype.get = function(key) {
|
|
1014
|
+
var index;
|
|
1015
|
+
if (this.lastItem && this.isEqual(this.lastItem.key, key)) return this.lastItem.val;
|
|
1016
|
+
index = this.indexOf(key);
|
|
1017
|
+
if (index >= 0) {
|
|
1018
|
+
this.lastItem = this.list[index];
|
|
1019
|
+
return this.list[index].val;
|
|
1020
|
+
}
|
|
1021
|
+
};
|
|
1022
|
+
Similar.prototype.set = function(key, val) {
|
|
1023
|
+
var index;
|
|
1024
|
+
if (this.lastItem && this.isEqual(this.lastItem.key, key)) {
|
|
1025
|
+
this.lastItem.val = val;
|
|
1026
|
+
return this;
|
|
1027
|
+
}
|
|
1028
|
+
index = this.indexOf(key);
|
|
1029
|
+
if (index >= 0) {
|
|
1030
|
+
this.lastItem = this.list[index];
|
|
1031
|
+
this.list[index].val = val;
|
|
1032
|
+
return this;
|
|
1033
|
+
}
|
|
1034
|
+
this.lastItem = {
|
|
1035
|
+
key,
|
|
1036
|
+
val
|
|
1037
|
+
};
|
|
1038
|
+
this.list.push(this.lastItem);
|
|
1039
|
+
this.size++;
|
|
1040
|
+
return this;
|
|
1041
|
+
};
|
|
1042
|
+
Similar.prototype.delete = function(key) {
|
|
1043
|
+
var index;
|
|
1044
|
+
if (this.lastItem && this.isEqual(this.lastItem.key, key)) this.lastItem = void 0;
|
|
1045
|
+
index = this.indexOf(key);
|
|
1046
|
+
if (index >= 0) {
|
|
1047
|
+
this.size--;
|
|
1048
|
+
return this.list.splice(index, 1)[0];
|
|
1049
|
+
}
|
|
1050
|
+
};
|
|
1051
|
+
Similar.prototype.has = function(key) {
|
|
1052
|
+
var index;
|
|
1053
|
+
if (this.lastItem && this.isEqual(this.lastItem.key, key)) return true;
|
|
1054
|
+
index = this.indexOf(key);
|
|
1055
|
+
if (index >= 0) {
|
|
1056
|
+
this.lastItem = this.list[index];
|
|
1057
|
+
return true;
|
|
1058
|
+
}
|
|
1059
|
+
return false;
|
|
1060
|
+
};
|
|
1061
|
+
Similar.prototype.forEach = function(callback, thisArg) {
|
|
1062
|
+
var i = 0;
|
|
1063
|
+
for (; i < this.size; i++) callback.call(thisArg || this, this.list[i].val, this.list[i].key, this);
|
|
1064
|
+
};
|
|
1065
|
+
Similar.prototype.indexOf = function(key) {
|
|
1066
|
+
var i = 0;
|
|
1067
|
+
for (; i < this.size; i++) if (this.isEqual(this.list[i].key, key)) return i;
|
|
1068
|
+
return -1;
|
|
1069
|
+
};
|
|
1070
|
+
Similar.prototype.isEqual = function(val1, val2) {
|
|
1071
|
+
return val1 === val2 || val1 !== val1 && val2 !== val2;
|
|
1072
|
+
};
|
|
1073
|
+
module.exports = Similar;
|
|
1074
|
+
}, {}],
|
|
1075
|
+
3: [function(_dereq_, module, exports) {
|
|
1076
|
+
var MapOrSimilar = _dereq_("map-or-similar");
|
|
1077
|
+
module.exports = function(limit) {
|
|
1078
|
+
var cache = new MapOrSimilar(false), lru = [];
|
|
1079
|
+
return function(fn) {
|
|
1080
|
+
var memoizerific = function() {
|
|
1081
|
+
var currentCache = cache, newMap, fnResult, argsLengthMinusOne = arguments.length - 1, lruPath = Array(argsLengthMinusOne + 1), isMemoized = true, i;
|
|
1082
|
+
if ((memoizerific.numArgs || memoizerific.numArgs === 0) && memoizerific.numArgs !== argsLengthMinusOne + 1) throw new Error("Memoizerific functions should always be called with the same number of arguments");
|
|
1083
|
+
for (i = 0; i < argsLengthMinusOne; i++) {
|
|
1084
|
+
lruPath[i] = {
|
|
1085
|
+
cacheItem: currentCache,
|
|
1086
|
+
arg: arguments[i]
|
|
1087
|
+
};
|
|
1088
|
+
if (currentCache.has(arguments[i])) {
|
|
1089
|
+
currentCache = currentCache.get(arguments[i]);
|
|
1090
|
+
continue;
|
|
1091
|
+
}
|
|
1092
|
+
isMemoized = false;
|
|
1093
|
+
newMap = new MapOrSimilar(false);
|
|
1094
|
+
currentCache.set(arguments[i], newMap);
|
|
1095
|
+
currentCache = newMap;
|
|
1096
|
+
}
|
|
1097
|
+
if (isMemoized) {
|
|
1098
|
+
if (currentCache.has(arguments[argsLengthMinusOne])) fnResult = currentCache.get(arguments[argsLengthMinusOne]);
|
|
1099
|
+
else isMemoized = false;
|
|
1100
|
+
}
|
|
1101
|
+
if (!isMemoized) {
|
|
1102
|
+
fnResult = fn.apply(null, arguments);
|
|
1103
|
+
currentCache.set(arguments[argsLengthMinusOne], fnResult);
|
|
1104
|
+
}
|
|
1105
|
+
if (limit > 0) {
|
|
1106
|
+
lruPath[argsLengthMinusOne] = {
|
|
1107
|
+
cacheItem: currentCache,
|
|
1108
|
+
arg: arguments[argsLengthMinusOne]
|
|
1109
|
+
};
|
|
1110
|
+
if (isMemoized) moveToMostRecentLru(lru, lruPath);
|
|
1111
|
+
else lru.push(lruPath);
|
|
1112
|
+
if (lru.length > limit) removeCachedResult(lru.shift());
|
|
1113
|
+
}
|
|
1114
|
+
memoizerific.wasMemoized = isMemoized;
|
|
1115
|
+
memoizerific.numArgs = argsLengthMinusOne + 1;
|
|
1116
|
+
return fnResult;
|
|
1117
|
+
};
|
|
1118
|
+
memoizerific.limit = limit;
|
|
1119
|
+
memoizerific.wasMemoized = false;
|
|
1120
|
+
memoizerific.cache = cache;
|
|
1121
|
+
memoizerific.lru = lru;
|
|
1122
|
+
return memoizerific;
|
|
1123
|
+
};
|
|
1124
|
+
};
|
|
1125
|
+
function moveToMostRecentLru(lru, lruPath) {
|
|
1126
|
+
var lruLen = lru.length, lruPathLen = lruPath.length, isMatch, i = 0, ii;
|
|
1127
|
+
for (; i < lruLen; i++) {
|
|
1128
|
+
isMatch = true;
|
|
1129
|
+
for (ii = 0; ii < lruPathLen; ii++) if (!isEqual(lru[i][ii].arg, lruPath[ii].arg)) {
|
|
1130
|
+
isMatch = false;
|
|
1131
|
+
break;
|
|
1132
|
+
}
|
|
1133
|
+
if (isMatch) break;
|
|
1134
|
+
}
|
|
1135
|
+
lru.push(lru.splice(i, 1)[0]);
|
|
1136
|
+
}
|
|
1137
|
+
function removeCachedResult(removedLru) {
|
|
1138
|
+
var removedLruLen = removedLru.length, currentLru = removedLru[removedLruLen - 1], tmp, i;
|
|
1139
|
+
currentLru.cacheItem.delete(currentLru.arg);
|
|
1140
|
+
for (i = removedLruLen - 2; i >= 0; i--) {
|
|
1141
|
+
currentLru = removedLru[i];
|
|
1142
|
+
tmp = currentLru.cacheItem.get(currentLru.arg);
|
|
1143
|
+
if (!tmp || !tmp.size) currentLru.cacheItem.delete(currentLru.arg);
|
|
1144
|
+
else break;
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
function isEqual(val1, val2) {
|
|
1148
|
+
return val1 === val2 || val1 !== val1 && val2 !== val2;
|
|
1149
|
+
}
|
|
1150
|
+
}, { "map-or-similar": 1 }]
|
|
1151
|
+
}, {}, [3])(3);
|
|
1152
|
+
});
|
|
1153
|
+
}));
|
|
1154
|
+
//#endregion
|
|
1155
|
+
//#region ../../node_modules/polished/dist/polished.esm.js
|
|
1156
|
+
/**
|
|
1157
|
+
* Check if a string ends with something
|
|
1158
|
+
* @private
|
|
1159
|
+
*/
|
|
1160
|
+
function endsWith(string, suffix) {
|
|
1161
|
+
return string.substr(-suffix.length) === suffix;
|
|
1162
|
+
}
|
|
1163
|
+
/**
|
|
1164
|
+
* Returns a given CSS value minus its unit of measure.
|
|
1165
|
+
*
|
|
1166
|
+
* @example
|
|
1167
|
+
* // Styles as object usage
|
|
1168
|
+
* const styles = {
|
|
1169
|
+
* '--dimension': stripUnit('100px')
|
|
1170
|
+
* }
|
|
1171
|
+
*
|
|
1172
|
+
* // styled-components usage
|
|
1173
|
+
* const div = styled.div`
|
|
1174
|
+
* --dimension: ${stripUnit('100px')};
|
|
1175
|
+
* `
|
|
1176
|
+
*
|
|
1177
|
+
* // CSS in JS Output
|
|
1178
|
+
*
|
|
1179
|
+
* element {
|
|
1180
|
+
* '--dimension': 100
|
|
1181
|
+
* }
|
|
1182
|
+
*/
|
|
1183
|
+
function stripUnit(value) {
|
|
1184
|
+
if (typeof value !== "string") return value;
|
|
1185
|
+
return value.match(cssRegex$1) ? parseFloat(value) : value;
|
|
1186
|
+
}
|
|
1187
|
+
function colorToInt(color) {
|
|
1188
|
+
return Math.round(color * 255);
|
|
1189
|
+
}
|
|
1190
|
+
function convertToInt(red, green, blue) {
|
|
1191
|
+
return colorToInt(red) + "," + colorToInt(green) + "," + colorToInt(blue);
|
|
1192
|
+
}
|
|
1193
|
+
function hslToRgb(hue, saturation, lightness, convert) {
|
|
1194
|
+
if (convert === void 0) convert = convertToInt;
|
|
1195
|
+
if (saturation === 0) return convert(lightness, lightness, lightness);
|
|
1196
|
+
var huePrime = (hue % 360 + 360) % 360 / 60;
|
|
1197
|
+
var chroma = (1 - Math.abs(2 * lightness - 1)) * saturation;
|
|
1198
|
+
var secondComponent = chroma * (1 - Math.abs(huePrime % 2 - 1));
|
|
1199
|
+
var red = 0;
|
|
1200
|
+
var green = 0;
|
|
1201
|
+
var blue = 0;
|
|
1202
|
+
if (huePrime >= 0 && huePrime < 1) {
|
|
1203
|
+
red = chroma;
|
|
1204
|
+
green = secondComponent;
|
|
1205
|
+
} else if (huePrime >= 1 && huePrime < 2) {
|
|
1206
|
+
red = secondComponent;
|
|
1207
|
+
green = chroma;
|
|
1208
|
+
} else if (huePrime >= 2 && huePrime < 3) {
|
|
1209
|
+
green = chroma;
|
|
1210
|
+
blue = secondComponent;
|
|
1211
|
+
} else if (huePrime >= 3 && huePrime < 4) {
|
|
1212
|
+
green = secondComponent;
|
|
1213
|
+
blue = chroma;
|
|
1214
|
+
} else if (huePrime >= 4 && huePrime < 5) {
|
|
1215
|
+
red = secondComponent;
|
|
1216
|
+
blue = chroma;
|
|
1217
|
+
} else if (huePrime >= 5 && huePrime < 6) {
|
|
1218
|
+
red = chroma;
|
|
1219
|
+
blue = secondComponent;
|
|
1220
|
+
}
|
|
1221
|
+
var lightnessModification = lightness - chroma / 2;
|
|
1222
|
+
var finalRed = red + lightnessModification;
|
|
1223
|
+
var finalGreen = green + lightnessModification;
|
|
1224
|
+
var finalBlue = blue + lightnessModification;
|
|
1225
|
+
return convert(finalRed, finalGreen, finalBlue);
|
|
1226
|
+
}
|
|
1227
|
+
/**
|
|
1228
|
+
* Checks if a string is a CSS named color and returns its equivalent hex value, otherwise returns the original color.
|
|
1229
|
+
* @private
|
|
1230
|
+
*/
|
|
1231
|
+
function nameToHex(color) {
|
|
1232
|
+
if (typeof color !== "string") return color;
|
|
1233
|
+
var normalizedColorName = color.toLowerCase();
|
|
1234
|
+
return namedColorMap[normalizedColorName] ? "#" + namedColorMap[normalizedColorName] : color;
|
|
1235
|
+
}
|
|
1236
|
+
/**
|
|
1237
|
+
* Returns an RgbColor or RgbaColor object. This utility function is only useful
|
|
1238
|
+
* if want to extract a color component. With the color util `toColorString` you
|
|
1239
|
+
* can convert a RgbColor or RgbaColor object back to a string.
|
|
1240
|
+
*
|
|
1241
|
+
* @example
|
|
1242
|
+
* // Assigns `{ red: 255, green: 0, blue: 0 }` to color1
|
|
1243
|
+
* const color1 = parseToRgb('rgb(255, 0, 0)');
|
|
1244
|
+
* // Assigns `{ red: 92, green: 102, blue: 112, alpha: 0.75 }` to color2
|
|
1245
|
+
* const color2 = parseToRgb('hsla(210, 10%, 40%, 0.75)');
|
|
1246
|
+
*/
|
|
1247
|
+
function parseToRgb(color) {
|
|
1248
|
+
if (typeof color !== "string") throw new PolishedError(3);
|
|
1249
|
+
var normalizedColor = nameToHex(color);
|
|
1250
|
+
if (normalizedColor.match(hexRegex)) return {
|
|
1251
|
+
red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
|
|
1252
|
+
green: parseInt("" + normalizedColor[3] + normalizedColor[4], 16),
|
|
1253
|
+
blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16)
|
|
1254
|
+
};
|
|
1255
|
+
if (normalizedColor.match(hexRgbaRegex)) {
|
|
1256
|
+
var alpha = parseFloat((parseInt("" + normalizedColor[7] + normalizedColor[8], 16) / 255).toFixed(2));
|
|
1257
|
+
return {
|
|
1258
|
+
red: parseInt("" + normalizedColor[1] + normalizedColor[2], 16),
|
|
1259
|
+
green: parseInt("" + normalizedColor[3] + normalizedColor[4], 16),
|
|
1260
|
+
blue: parseInt("" + normalizedColor[5] + normalizedColor[6], 16),
|
|
1261
|
+
alpha
|
|
1262
|
+
};
|
|
1263
|
+
}
|
|
1264
|
+
if (normalizedColor.match(reducedHexRegex)) return {
|
|
1265
|
+
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
1266
|
+
green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
|
|
1267
|
+
blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16)
|
|
1268
|
+
};
|
|
1269
|
+
if (normalizedColor.match(reducedRgbaHexRegex)) {
|
|
1270
|
+
var _alpha = parseFloat((parseInt("" + normalizedColor[4] + normalizedColor[4], 16) / 255).toFixed(2));
|
|
1271
|
+
return {
|
|
1272
|
+
red: parseInt("" + normalizedColor[1] + normalizedColor[1], 16),
|
|
1273
|
+
green: parseInt("" + normalizedColor[2] + normalizedColor[2], 16),
|
|
1274
|
+
blue: parseInt("" + normalizedColor[3] + normalizedColor[3], 16),
|
|
1275
|
+
alpha: _alpha
|
|
1276
|
+
};
|
|
1277
|
+
}
|
|
1278
|
+
var rgbMatched = rgbRegex.exec(normalizedColor);
|
|
1279
|
+
if (rgbMatched) return {
|
|
1280
|
+
red: parseInt("" + rgbMatched[1], 10),
|
|
1281
|
+
green: parseInt("" + rgbMatched[2], 10),
|
|
1282
|
+
blue: parseInt("" + rgbMatched[3], 10)
|
|
1283
|
+
};
|
|
1284
|
+
var rgbaMatched = rgbaRegex.exec(normalizedColor.substring(0, 50));
|
|
1285
|
+
if (rgbaMatched) return {
|
|
1286
|
+
red: parseInt("" + rgbaMatched[1], 10),
|
|
1287
|
+
green: parseInt("" + rgbaMatched[2], 10),
|
|
1288
|
+
blue: parseInt("" + rgbaMatched[3], 10),
|
|
1289
|
+
alpha: parseFloat("" + rgbaMatched[4]) > 1 ? parseFloat("" + rgbaMatched[4]) / 100 : parseFloat("" + rgbaMatched[4])
|
|
1290
|
+
};
|
|
1291
|
+
var hslMatched = hslRegex.exec(normalizedColor);
|
|
1292
|
+
if (hslMatched) {
|
|
1293
|
+
var rgbColorString = "rgb(" + hslToRgb(parseInt("" + hslMatched[1], 10), parseInt("" + hslMatched[2], 10) / 100, parseInt("" + hslMatched[3], 10) / 100) + ")";
|
|
1294
|
+
var hslRgbMatched = rgbRegex.exec(rgbColorString);
|
|
1295
|
+
if (!hslRgbMatched) throw new PolishedError(4, normalizedColor, rgbColorString);
|
|
1296
|
+
return {
|
|
1297
|
+
red: parseInt("" + hslRgbMatched[1], 10),
|
|
1298
|
+
green: parseInt("" + hslRgbMatched[2], 10),
|
|
1299
|
+
blue: parseInt("" + hslRgbMatched[3], 10)
|
|
1300
|
+
};
|
|
1301
|
+
}
|
|
1302
|
+
var hslaMatched = hslaRegex.exec(normalizedColor.substring(0, 50));
|
|
1303
|
+
if (hslaMatched) {
|
|
1304
|
+
var _rgbColorString = "rgb(" + hslToRgb(parseInt("" + hslaMatched[1], 10), parseInt("" + hslaMatched[2], 10) / 100, parseInt("" + hslaMatched[3], 10) / 100) + ")";
|
|
1305
|
+
var _hslRgbMatched = rgbRegex.exec(_rgbColorString);
|
|
1306
|
+
if (!_hslRgbMatched) throw new PolishedError(4, normalizedColor, _rgbColorString);
|
|
1307
|
+
return {
|
|
1308
|
+
red: parseInt("" + _hslRgbMatched[1], 10),
|
|
1309
|
+
green: parseInt("" + _hslRgbMatched[2], 10),
|
|
1310
|
+
blue: parseInt("" + _hslRgbMatched[3], 10),
|
|
1311
|
+
alpha: parseFloat("" + hslaMatched[4]) > 1 ? parseFloat("" + hslaMatched[4]) / 100 : parseFloat("" + hslaMatched[4])
|
|
1312
|
+
};
|
|
1313
|
+
}
|
|
1314
|
+
throw new PolishedError(5);
|
|
1315
|
+
}
|
|
1316
|
+
function rgbToHsl(color) {
|
|
1317
|
+
var red = color.red / 255;
|
|
1318
|
+
var green = color.green / 255;
|
|
1319
|
+
var blue = color.blue / 255;
|
|
1320
|
+
var max = Math.max(red, green, blue);
|
|
1321
|
+
var min = Math.min(red, green, blue);
|
|
1322
|
+
var lightness = (max + min) / 2;
|
|
1323
|
+
if (max === min) {
|
|
1324
|
+
if (color.alpha !== void 0) return {
|
|
1325
|
+
hue: 0,
|
|
1326
|
+
saturation: 0,
|
|
1327
|
+
lightness,
|
|
1328
|
+
alpha: color.alpha
|
|
1329
|
+
};
|
|
1330
|
+
else return {
|
|
1331
|
+
hue: 0,
|
|
1332
|
+
saturation: 0,
|
|
1333
|
+
lightness
|
|
1334
|
+
};
|
|
1335
|
+
}
|
|
1336
|
+
var hue;
|
|
1337
|
+
var delta = max - min;
|
|
1338
|
+
var saturation = lightness > .5 ? delta / (2 - max - min) : delta / (max + min);
|
|
1339
|
+
switch (max) {
|
|
1340
|
+
case red:
|
|
1341
|
+
hue = (green - blue) / delta + (green < blue ? 6 : 0);
|
|
1342
|
+
break;
|
|
1343
|
+
case green:
|
|
1344
|
+
hue = (blue - red) / delta + 2;
|
|
1345
|
+
break;
|
|
1346
|
+
default: hue = (red - green) / delta + 4;
|
|
1347
|
+
}
|
|
1348
|
+
hue *= 60;
|
|
1349
|
+
if (color.alpha !== void 0) return {
|
|
1350
|
+
hue,
|
|
1351
|
+
saturation,
|
|
1352
|
+
lightness,
|
|
1353
|
+
alpha: color.alpha
|
|
1354
|
+
};
|
|
1355
|
+
return {
|
|
1356
|
+
hue,
|
|
1357
|
+
saturation,
|
|
1358
|
+
lightness
|
|
1359
|
+
};
|
|
1360
|
+
}
|
|
1361
|
+
/**
|
|
1362
|
+
* Returns an HslColor or HslaColor object. This utility function is only useful
|
|
1363
|
+
* if want to extract a color component. With the color util `toColorString` you
|
|
1364
|
+
* can convert a HslColor or HslaColor object back to a string.
|
|
1365
|
+
*
|
|
1366
|
+
* @example
|
|
1367
|
+
* // Assigns `{ hue: 0, saturation: 1, lightness: 0.5 }` to color1
|
|
1368
|
+
* const color1 = parseToHsl('rgb(255, 0, 0)');
|
|
1369
|
+
* // Assigns `{ hue: 128, saturation: 1, lightness: 0.5, alpha: 0.75 }` to color2
|
|
1370
|
+
* const color2 = parseToHsl('hsla(128, 100%, 50%, 0.75)');
|
|
1371
|
+
*/
|
|
1372
|
+
function parseToHsl(color) {
|
|
1373
|
+
return rgbToHsl(parseToRgb(color));
|
|
1374
|
+
}
|
|
1375
|
+
function numberToHex(value) {
|
|
1376
|
+
var hex = value.toString(16);
|
|
1377
|
+
return hex.length === 1 ? "0" + hex : hex;
|
|
1378
|
+
}
|
|
1379
|
+
function colorToHex(color) {
|
|
1380
|
+
return numberToHex(Math.round(color * 255));
|
|
1381
|
+
}
|
|
1382
|
+
function convertToHex(red, green, blue) {
|
|
1383
|
+
return reduceHexValue$1("#" + colorToHex(red) + colorToHex(green) + colorToHex(blue));
|
|
1384
|
+
}
|
|
1385
|
+
function hslToHex(hue, saturation, lightness) {
|
|
1386
|
+
return hslToRgb(hue, saturation, lightness, convertToHex);
|
|
1387
|
+
}
|
|
1388
|
+
/**
|
|
1389
|
+
* Returns a string value for the color. The returned result is the smallest possible hex notation.
|
|
1390
|
+
*
|
|
1391
|
+
* @example
|
|
1392
|
+
* // Styles as object usage
|
|
1393
|
+
* const styles = {
|
|
1394
|
+
* background: hsl(359, 0.75, 0.4),
|
|
1395
|
+
* background: hsl({ hue: 360, saturation: 0.75, lightness: 0.4 }),
|
|
1396
|
+
* }
|
|
1397
|
+
*
|
|
1398
|
+
* // styled-components usage
|
|
1399
|
+
* const div = styled.div`
|
|
1400
|
+
* background: ${hsl(359, 0.75, 0.4)};
|
|
1401
|
+
* background: ${hsl({ hue: 360, saturation: 0.75, lightness: 0.4 })};
|
|
1402
|
+
* `
|
|
1403
|
+
*
|
|
1404
|
+
* // CSS in JS Output
|
|
1405
|
+
*
|
|
1406
|
+
* element {
|
|
1407
|
+
* background: "#b3191c";
|
|
1408
|
+
* background: "#b3191c";
|
|
1409
|
+
* }
|
|
1410
|
+
*/
|
|
1411
|
+
function hsl(value, saturation, lightness) {
|
|
1412
|
+
if (typeof value === "number" && typeof saturation === "number" && typeof lightness === "number") return hslToHex(value, saturation, lightness);
|
|
1413
|
+
else if (typeof value === "object" && saturation === void 0 && lightness === void 0) return hslToHex(value.hue, value.saturation, value.lightness);
|
|
1414
|
+
throw new PolishedError(1);
|
|
1415
|
+
}
|
|
1416
|
+
/**
|
|
1417
|
+
* Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.
|
|
1418
|
+
*
|
|
1419
|
+
* @example
|
|
1420
|
+
* // Styles as object usage
|
|
1421
|
+
* const styles = {
|
|
1422
|
+
* background: hsla(359, 0.75, 0.4, 0.7),
|
|
1423
|
+
* background: hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 }),
|
|
1424
|
+
* background: hsla(359, 0.75, 0.4, 1),
|
|
1425
|
+
* }
|
|
1426
|
+
*
|
|
1427
|
+
* // styled-components usage
|
|
1428
|
+
* const div = styled.div`
|
|
1429
|
+
* background: ${hsla(359, 0.75, 0.4, 0.7)};
|
|
1430
|
+
* background: ${hsla({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0,7 })};
|
|
1431
|
+
* background: ${hsla(359, 0.75, 0.4, 1)};
|
|
1432
|
+
* `
|
|
1433
|
+
*
|
|
1434
|
+
* // CSS in JS Output
|
|
1435
|
+
*
|
|
1436
|
+
* element {
|
|
1437
|
+
* background: "rgba(179,25,28,0.7)";
|
|
1438
|
+
* background: "rgba(179,25,28,0.7)";
|
|
1439
|
+
* background: "#b3191c";
|
|
1440
|
+
* }
|
|
1441
|
+
*/
|
|
1442
|
+
function hsla(value, saturation, lightness, alpha) {
|
|
1443
|
+
if (typeof value === "number" && typeof saturation === "number" && typeof lightness === "number" && typeof alpha === "number") return alpha >= 1 ? hslToHex(value, saturation, lightness) : "rgba(" + hslToRgb(value, saturation, lightness) + "," + alpha + ")";
|
|
1444
|
+
else if (typeof value === "object" && saturation === void 0 && lightness === void 0 && alpha === void 0) return value.alpha >= 1 ? hslToHex(value.hue, value.saturation, value.lightness) : "rgba(" + hslToRgb(value.hue, value.saturation, value.lightness) + "," + value.alpha + ")";
|
|
1445
|
+
throw new PolishedError(2);
|
|
1446
|
+
}
|
|
1447
|
+
/**
|
|
1448
|
+
* Returns a string value for the color. The returned result is the smallest possible hex notation.
|
|
1449
|
+
*
|
|
1450
|
+
* @example
|
|
1451
|
+
* // Styles as object usage
|
|
1452
|
+
* const styles = {
|
|
1453
|
+
* background: rgb(255, 205, 100),
|
|
1454
|
+
* background: rgb({ red: 255, green: 205, blue: 100 }),
|
|
1455
|
+
* }
|
|
1456
|
+
*
|
|
1457
|
+
* // styled-components usage
|
|
1458
|
+
* const div = styled.div`
|
|
1459
|
+
* background: ${rgb(255, 205, 100)};
|
|
1460
|
+
* background: ${rgb({ red: 255, green: 205, blue: 100 })};
|
|
1461
|
+
* `
|
|
1462
|
+
*
|
|
1463
|
+
* // CSS in JS Output
|
|
1464
|
+
*
|
|
1465
|
+
* element {
|
|
1466
|
+
* background: "#ffcd64";
|
|
1467
|
+
* background: "#ffcd64";
|
|
1468
|
+
* }
|
|
1469
|
+
*/
|
|
1470
|
+
function rgb(value, green, blue) {
|
|
1471
|
+
if (typeof value === "number" && typeof green === "number" && typeof blue === "number") return reduceHexValue$1("#" + numberToHex(value) + numberToHex(green) + numberToHex(blue));
|
|
1472
|
+
else if (typeof value === "object" && green === void 0 && blue === void 0) return reduceHexValue$1("#" + numberToHex(value.red) + numberToHex(value.green) + numberToHex(value.blue));
|
|
1473
|
+
throw new PolishedError(6);
|
|
1474
|
+
}
|
|
1475
|
+
/**
|
|
1476
|
+
* Returns a string value for the color. The returned result is the smallest possible rgba or hex notation.
|
|
1477
|
+
*
|
|
1478
|
+
* Can also be used to fade a color by passing a hex value or named CSS color along with an alpha value.
|
|
1479
|
+
*
|
|
1480
|
+
* @example
|
|
1481
|
+
* // Styles as object usage
|
|
1482
|
+
* const styles = {
|
|
1483
|
+
* background: rgba(255, 205, 100, 0.7),
|
|
1484
|
+
* background: rgba({ red: 255, green: 205, blue: 100, alpha: 0.7 }),
|
|
1485
|
+
* background: rgba(255, 205, 100, 1),
|
|
1486
|
+
* background: rgba('#ffffff', 0.4),
|
|
1487
|
+
* background: rgba('black', 0.7),
|
|
1488
|
+
* }
|
|
1489
|
+
*
|
|
1490
|
+
* // styled-components usage
|
|
1491
|
+
* const div = styled.div`
|
|
1492
|
+
* background: ${rgba(255, 205, 100, 0.7)};
|
|
1493
|
+
* background: ${rgba({ red: 255, green: 205, blue: 100, alpha: 0.7 })};
|
|
1494
|
+
* background: ${rgba(255, 205, 100, 1)};
|
|
1495
|
+
* background: ${rgba('#ffffff', 0.4)};
|
|
1496
|
+
* background: ${rgba('black', 0.7)};
|
|
1497
|
+
* `
|
|
1498
|
+
*
|
|
1499
|
+
* // CSS in JS Output
|
|
1500
|
+
*
|
|
1501
|
+
* element {
|
|
1502
|
+
* background: "rgba(255,205,100,0.7)";
|
|
1503
|
+
* background: "rgba(255,205,100,0.7)";
|
|
1504
|
+
* background: "#ffcd64";
|
|
1505
|
+
* background: "rgba(255,255,255,0.4)";
|
|
1506
|
+
* background: "rgba(0,0,0,0.7)";
|
|
1507
|
+
* }
|
|
1508
|
+
*/
|
|
1509
|
+
function rgba(firstValue, secondValue, thirdValue, fourthValue) {
|
|
1510
|
+
if (typeof firstValue === "string" && typeof secondValue === "number") {
|
|
1511
|
+
var rgbValue = parseToRgb(firstValue);
|
|
1512
|
+
return "rgba(" + rgbValue.red + "," + rgbValue.green + "," + rgbValue.blue + "," + secondValue + ")";
|
|
1513
|
+
} else if (typeof firstValue === "number" && typeof secondValue === "number" && typeof thirdValue === "number" && typeof fourthValue === "number") return fourthValue >= 1 ? rgb(firstValue, secondValue, thirdValue) : "rgba(" + firstValue + "," + secondValue + "," + thirdValue + "," + fourthValue + ")";
|
|
1514
|
+
else if (typeof firstValue === "object" && secondValue === void 0 && thirdValue === void 0 && fourthValue === void 0) return firstValue.alpha >= 1 ? rgb(firstValue.red, firstValue.green, firstValue.blue) : "rgba(" + firstValue.red + "," + firstValue.green + "," + firstValue.blue + "," + firstValue.alpha + ")";
|
|
1515
|
+
throw new PolishedError(7);
|
|
1516
|
+
}
|
|
1517
|
+
/**
|
|
1518
|
+
* Converts a RgbColor, RgbaColor, HslColor or HslaColor object to a color string.
|
|
1519
|
+
* This util is useful in case you only know on runtime which color object is
|
|
1520
|
+
* used. Otherwise we recommend to rely on `rgb`, `rgba`, `hsl` or `hsla`.
|
|
1521
|
+
*
|
|
1522
|
+
* @example
|
|
1523
|
+
* // Styles as object usage
|
|
1524
|
+
* const styles = {
|
|
1525
|
+
* background: toColorString({ red: 255, green: 205, blue: 100 }),
|
|
1526
|
+
* background: toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 }),
|
|
1527
|
+
* background: toColorString({ hue: 240, saturation: 1, lightness: 0.5 }),
|
|
1528
|
+
* background: toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 }),
|
|
1529
|
+
* }
|
|
1530
|
+
*
|
|
1531
|
+
* // styled-components usage
|
|
1532
|
+
* const div = styled.div`
|
|
1533
|
+
* background: ${toColorString({ red: 255, green: 205, blue: 100 })};
|
|
1534
|
+
* background: ${toColorString({ red: 255, green: 205, blue: 100, alpha: 0.72 })};
|
|
1535
|
+
* background: ${toColorString({ hue: 240, saturation: 1, lightness: 0.5 })};
|
|
1536
|
+
* background: ${toColorString({ hue: 360, saturation: 0.75, lightness: 0.4, alpha: 0.72 })};
|
|
1537
|
+
* `
|
|
1538
|
+
*
|
|
1539
|
+
* // CSS in JS Output
|
|
1540
|
+
* element {
|
|
1541
|
+
* background: "#ffcd64";
|
|
1542
|
+
* background: "rgba(255,205,100,0.72)";
|
|
1543
|
+
* background: "#00f";
|
|
1544
|
+
* background: "rgba(179,25,25,0.72)";
|
|
1545
|
+
* }
|
|
1546
|
+
*/
|
|
1547
|
+
function toColorString(color) {
|
|
1548
|
+
if (typeof color !== "object") throw new PolishedError(8);
|
|
1549
|
+
if (isRgba(color)) return rgba(color);
|
|
1550
|
+
if (isRgb(color)) return rgb(color);
|
|
1551
|
+
if (isHsla(color)) return hsla(color);
|
|
1552
|
+
if (isHsl(color)) return hsl(color);
|
|
1553
|
+
throw new PolishedError(8);
|
|
1554
|
+
}
|
|
1555
|
+
function curried(f, length, acc) {
|
|
1556
|
+
return function fn() {
|
|
1557
|
+
var combined = acc.concat(Array.prototype.slice.call(arguments));
|
|
1558
|
+
return combined.length >= length ? f.apply(this, combined) : curried(f, length, combined);
|
|
1559
|
+
};
|
|
1560
|
+
}
|
|
1561
|
+
function curry(f) {
|
|
1562
|
+
return curried(f, f.length, []);
|
|
1563
|
+
}
|
|
1564
|
+
/**
|
|
1565
|
+
* Changes the hue of the color. Hue is a number between 0 to 360. The first
|
|
1566
|
+
* argument for adjustHue is the amount of degrees the color is rotated around
|
|
1567
|
+
* the color wheel, always producing a positive hue value.
|
|
1568
|
+
*
|
|
1569
|
+
* @example
|
|
1570
|
+
* // Styles as object usage
|
|
1571
|
+
* const styles = {
|
|
1572
|
+
* background: adjustHue(180, '#448'),
|
|
1573
|
+
* background: adjustHue('180', 'rgba(101,100,205,0.7)'),
|
|
1574
|
+
* }
|
|
1575
|
+
*
|
|
1576
|
+
* // styled-components usage
|
|
1577
|
+
* const div = styled.div`
|
|
1578
|
+
* background: ${adjustHue(180, '#448')};
|
|
1579
|
+
* background: ${adjustHue('180', 'rgba(101,100,205,0.7)')};
|
|
1580
|
+
* `
|
|
1581
|
+
*
|
|
1582
|
+
* // CSS in JS Output
|
|
1583
|
+
* element {
|
|
1584
|
+
* background: "#888844";
|
|
1585
|
+
* background: "rgba(136,136,68,0.7)";
|
|
1586
|
+
* }
|
|
1587
|
+
*/
|
|
1588
|
+
function adjustHue(degree, color) {
|
|
1589
|
+
if (color === "transparent") return color;
|
|
1590
|
+
var hslColor = parseToHsl(color);
|
|
1591
|
+
return toColorString(_extends({}, hslColor, { hue: hslColor.hue + parseFloat(degree) }));
|
|
1592
|
+
}
|
|
1593
|
+
function guard(lowerBoundary, upperBoundary, value) {
|
|
1594
|
+
return Math.max(lowerBoundary, Math.min(upperBoundary, value));
|
|
1595
|
+
}
|
|
1596
|
+
/**
|
|
1597
|
+
* Returns a string value for the darkened color.
|
|
1598
|
+
*
|
|
1599
|
+
* @example
|
|
1600
|
+
* // Styles as object usage
|
|
1601
|
+
* const styles = {
|
|
1602
|
+
* background: darken(0.2, '#FFCD64'),
|
|
1603
|
+
* background: darken('0.2', 'rgba(255,205,100,0.7)'),
|
|
1604
|
+
* }
|
|
1605
|
+
*
|
|
1606
|
+
* // styled-components usage
|
|
1607
|
+
* const div = styled.div`
|
|
1608
|
+
* background: ${darken(0.2, '#FFCD64')};
|
|
1609
|
+
* background: ${darken('0.2', 'rgba(255,205,100,0.7)')};
|
|
1610
|
+
* `
|
|
1611
|
+
*
|
|
1612
|
+
* // CSS in JS Output
|
|
1613
|
+
*
|
|
1614
|
+
* element {
|
|
1615
|
+
* background: "#ffbd31";
|
|
1616
|
+
* background: "rgba(255,189,49,0.7)";
|
|
1617
|
+
* }
|
|
1618
|
+
*/
|
|
1619
|
+
function darken(amount, color) {
|
|
1620
|
+
if (color === "transparent") return color;
|
|
1621
|
+
var hslColor = parseToHsl(color);
|
|
1622
|
+
return toColorString(_extends({}, hslColor, { lightness: guard(0, 1, hslColor.lightness - parseFloat(amount)) }));
|
|
1623
|
+
}
|
|
1624
|
+
/**
|
|
1625
|
+
* Decreases the intensity of a color. Its range is between 0 to 1. The first
|
|
1626
|
+
* argument of the desaturate function is the amount by how much the color
|
|
1627
|
+
* intensity should be decreased.
|
|
1628
|
+
*
|
|
1629
|
+
* @example
|
|
1630
|
+
* // Styles as object usage
|
|
1631
|
+
* const styles = {
|
|
1632
|
+
* background: desaturate(0.2, '#CCCD64'),
|
|
1633
|
+
* background: desaturate('0.2', 'rgba(204,205,100,0.7)'),
|
|
1634
|
+
* }
|
|
1635
|
+
*
|
|
1636
|
+
* // styled-components usage
|
|
1637
|
+
* const div = styled.div`
|
|
1638
|
+
* background: ${desaturate(0.2, '#CCCD64')};
|
|
1639
|
+
* background: ${desaturate('0.2', 'rgba(204,205,100,0.7)')};
|
|
1640
|
+
* `
|
|
1641
|
+
*
|
|
1642
|
+
* // CSS in JS Output
|
|
1643
|
+
* element {
|
|
1644
|
+
* background: "#b8b979";
|
|
1645
|
+
* background: "rgba(184,185,121,0.7)";
|
|
1646
|
+
* }
|
|
1647
|
+
*/
|
|
1648
|
+
function desaturate(amount, color) {
|
|
1649
|
+
if (color === "transparent") return color;
|
|
1650
|
+
var hslColor = parseToHsl(color);
|
|
1651
|
+
return toColorString(_extends({}, hslColor, { saturation: guard(0, 1, hslColor.saturation - parseFloat(amount)) }));
|
|
1652
|
+
}
|
|
1653
|
+
/**
|
|
1654
|
+
* Returns a string value for the lightened color.
|
|
1655
|
+
*
|
|
1656
|
+
* @example
|
|
1657
|
+
* // Styles as object usage
|
|
1658
|
+
* const styles = {
|
|
1659
|
+
* background: lighten(0.2, '#CCCD64'),
|
|
1660
|
+
* background: lighten('0.2', 'rgba(204,205,100,0.7)'),
|
|
1661
|
+
* }
|
|
1662
|
+
*
|
|
1663
|
+
* // styled-components usage
|
|
1664
|
+
* const div = styled.div`
|
|
1665
|
+
* background: ${lighten(0.2, '#FFCD64')};
|
|
1666
|
+
* background: ${lighten('0.2', 'rgba(204,205,100,0.7)')};
|
|
1667
|
+
* `
|
|
1668
|
+
*
|
|
1669
|
+
* // CSS in JS Output
|
|
1670
|
+
*
|
|
1671
|
+
* element {
|
|
1672
|
+
* background: "#e5e6b1";
|
|
1673
|
+
* background: "rgba(229,230,177,0.7)";
|
|
1674
|
+
* }
|
|
1675
|
+
*/
|
|
1676
|
+
function lighten(amount, color) {
|
|
1677
|
+
if (color === "transparent") return color;
|
|
1678
|
+
var hslColor = parseToHsl(color);
|
|
1679
|
+
return toColorString(_extends({}, hslColor, { lightness: guard(0, 1, hslColor.lightness + parseFloat(amount)) }));
|
|
1680
|
+
}
|
|
1681
|
+
/**
|
|
1682
|
+
* Mixes the two provided colors together by calculating the average of each of the RGB components weighted to the first color by the provided weight.
|
|
1683
|
+
*
|
|
1684
|
+
* @example
|
|
1685
|
+
* // Styles as object usage
|
|
1686
|
+
* const styles = {
|
|
1687
|
+
* background: mix(0.5, '#f00', '#00f')
|
|
1688
|
+
* background: mix(0.25, '#f00', '#00f')
|
|
1689
|
+
* background: mix('0.5', 'rgba(255, 0, 0, 0.5)', '#00f')
|
|
1690
|
+
* }
|
|
1691
|
+
*
|
|
1692
|
+
* // styled-components usage
|
|
1693
|
+
* const div = styled.div`
|
|
1694
|
+
* background: ${mix(0.5, '#f00', '#00f')};
|
|
1695
|
+
* background: ${mix(0.25, '#f00', '#00f')};
|
|
1696
|
+
* background: ${mix('0.5', 'rgba(255, 0, 0, 0.5)', '#00f')};
|
|
1697
|
+
* `
|
|
1698
|
+
*
|
|
1699
|
+
* // CSS in JS Output
|
|
1700
|
+
*
|
|
1701
|
+
* element {
|
|
1702
|
+
* background: "#7f007f";
|
|
1703
|
+
* background: "#3f00bf";
|
|
1704
|
+
* background: "rgba(63, 0, 191, 0.75)";
|
|
1705
|
+
* }
|
|
1706
|
+
*/
|
|
1707
|
+
function mix(weight, color, otherColor) {
|
|
1708
|
+
if (color === "transparent") return otherColor;
|
|
1709
|
+
if (otherColor === "transparent") return color;
|
|
1710
|
+
if (weight === 0) return otherColor;
|
|
1711
|
+
var parsedColor1 = parseToRgb(color);
|
|
1712
|
+
var color1 = _extends({}, parsedColor1, { alpha: typeof parsedColor1.alpha === "number" ? parsedColor1.alpha : 1 });
|
|
1713
|
+
var parsedColor2 = parseToRgb(otherColor);
|
|
1714
|
+
var color2 = _extends({}, parsedColor2, { alpha: typeof parsedColor2.alpha === "number" ? parsedColor2.alpha : 1 });
|
|
1715
|
+
var alphaDelta = color1.alpha - color2.alpha;
|
|
1716
|
+
var x = parseFloat(weight) * 2 - 1;
|
|
1717
|
+
var weight1 = ((x * alphaDelta === -1 ? x : x + alphaDelta) / (1 + x * alphaDelta) + 1) / 2;
|
|
1718
|
+
var weight2 = 1 - weight1;
|
|
1719
|
+
return rgba({
|
|
1720
|
+
red: Math.floor(color1.red * weight1 + color2.red * weight2),
|
|
1721
|
+
green: Math.floor(color1.green * weight1 + color2.green * weight2),
|
|
1722
|
+
blue: Math.floor(color1.blue * weight1 + color2.blue * weight2),
|
|
1723
|
+
alpha: color1.alpha * parseFloat(weight) + color2.alpha * (1 - parseFloat(weight))
|
|
1724
|
+
});
|
|
1725
|
+
}
|
|
1726
|
+
/**
|
|
1727
|
+
* Increases the opacity of a color. Its range for the amount is between 0 to 1.
|
|
1728
|
+
*
|
|
1729
|
+
*
|
|
1730
|
+
* @example
|
|
1731
|
+
* // Styles as object usage
|
|
1732
|
+
* const styles = {
|
|
1733
|
+
* background: opacify(0.1, 'rgba(255, 255, 255, 0.9)');
|
|
1734
|
+
* background: opacify(0.2, 'hsla(0, 0%, 100%, 0.5)'),
|
|
1735
|
+
* background: opacify('0.5', 'rgba(255, 0, 0, 0.2)'),
|
|
1736
|
+
* }
|
|
1737
|
+
*
|
|
1738
|
+
* // styled-components usage
|
|
1739
|
+
* const div = styled.div`
|
|
1740
|
+
* background: ${opacify(0.1, 'rgba(255, 255, 255, 0.9)')};
|
|
1741
|
+
* background: ${opacify(0.2, 'hsla(0, 0%, 100%, 0.5)')},
|
|
1742
|
+
* background: ${opacify('0.5', 'rgba(255, 0, 0, 0.2)')},
|
|
1743
|
+
* `
|
|
1744
|
+
*
|
|
1745
|
+
* // CSS in JS Output
|
|
1746
|
+
*
|
|
1747
|
+
* element {
|
|
1748
|
+
* background: "#fff";
|
|
1749
|
+
* background: "rgba(255,255,255,0.7)";
|
|
1750
|
+
* background: "rgba(255,0,0,0.7)";
|
|
1751
|
+
* }
|
|
1752
|
+
*/
|
|
1753
|
+
function opacify(amount, color) {
|
|
1754
|
+
if (color === "transparent") return color;
|
|
1755
|
+
var parsedColor = parseToRgb(color);
|
|
1756
|
+
var alpha = typeof parsedColor.alpha === "number" ? parsedColor.alpha : 1;
|
|
1757
|
+
return rgba(_extends({}, parsedColor, { alpha: guard(0, 1, (alpha * 100 + parseFloat(amount) * 100) / 100) }));
|
|
1758
|
+
}
|
|
1759
|
+
/**
|
|
1760
|
+
* Increases the intensity of a color. Its range is between 0 to 1. The first
|
|
1761
|
+
* argument of the saturate function is the amount by how much the color
|
|
1762
|
+
* intensity should be increased.
|
|
1763
|
+
*
|
|
1764
|
+
* @example
|
|
1765
|
+
* // Styles as object usage
|
|
1766
|
+
* const styles = {
|
|
1767
|
+
* background: saturate(0.2, '#CCCD64'),
|
|
1768
|
+
* background: saturate('0.2', 'rgba(204,205,100,0.7)'),
|
|
1769
|
+
* }
|
|
1770
|
+
*
|
|
1771
|
+
* // styled-components usage
|
|
1772
|
+
* const div = styled.div`
|
|
1773
|
+
* background: ${saturate(0.2, '#FFCD64')};
|
|
1774
|
+
* background: ${saturate('0.2', 'rgba(204,205,100,0.7)')};
|
|
1775
|
+
* `
|
|
1776
|
+
*
|
|
1777
|
+
* // CSS in JS Output
|
|
1778
|
+
*
|
|
1779
|
+
* element {
|
|
1780
|
+
* background: "#e0e250";
|
|
1781
|
+
* background: "rgba(224,226,80,0.7)";
|
|
1782
|
+
* }
|
|
1783
|
+
*/
|
|
1784
|
+
function saturate(amount, color) {
|
|
1785
|
+
if (color === "transparent") return color;
|
|
1786
|
+
var hslColor = parseToHsl(color);
|
|
1787
|
+
return toColorString(_extends({}, hslColor, { saturation: guard(0, 1, hslColor.saturation + parseFloat(amount)) }));
|
|
1788
|
+
}
|
|
1789
|
+
/**
|
|
1790
|
+
* Sets the hue of a color to the provided value. The hue range can be
|
|
1791
|
+
* from 0 and 359.
|
|
1792
|
+
*
|
|
1793
|
+
* @example
|
|
1794
|
+
* // Styles as object usage
|
|
1795
|
+
* const styles = {
|
|
1796
|
+
* background: setHue(42, '#CCCD64'),
|
|
1797
|
+
* background: setHue('244', 'rgba(204,205,100,0.7)'),
|
|
1798
|
+
* }
|
|
1799
|
+
*
|
|
1800
|
+
* // styled-components usage
|
|
1801
|
+
* const div = styled.div`
|
|
1802
|
+
* background: ${setHue(42, '#CCCD64')};
|
|
1803
|
+
* background: ${setHue('244', 'rgba(204,205,100,0.7)')};
|
|
1804
|
+
* `
|
|
1805
|
+
*
|
|
1806
|
+
* // CSS in JS Output
|
|
1807
|
+
* element {
|
|
1808
|
+
* background: "#cdae64";
|
|
1809
|
+
* background: "rgba(107,100,205,0.7)";
|
|
1810
|
+
* }
|
|
1811
|
+
*/
|
|
1812
|
+
function setHue(hue, color) {
|
|
1813
|
+
if (color === "transparent") return color;
|
|
1814
|
+
return toColorString(_extends({}, parseToHsl(color), { hue: parseFloat(hue) }));
|
|
1815
|
+
}
|
|
1816
|
+
/**
|
|
1817
|
+
* Sets the lightness of a color to the provided value. The lightness range can be
|
|
1818
|
+
* from 0 and 1.
|
|
1819
|
+
*
|
|
1820
|
+
* @example
|
|
1821
|
+
* // Styles as object usage
|
|
1822
|
+
* const styles = {
|
|
1823
|
+
* background: setLightness(0.2, '#CCCD64'),
|
|
1824
|
+
* background: setLightness('0.75', 'rgba(204,205,100,0.7)'),
|
|
1825
|
+
* }
|
|
1826
|
+
*
|
|
1827
|
+
* // styled-components usage
|
|
1828
|
+
* const div = styled.div`
|
|
1829
|
+
* background: ${setLightness(0.2, '#CCCD64')};
|
|
1830
|
+
* background: ${setLightness('0.75', 'rgba(204,205,100,0.7)')};
|
|
1831
|
+
* `
|
|
1832
|
+
*
|
|
1833
|
+
* // CSS in JS Output
|
|
1834
|
+
* element {
|
|
1835
|
+
* background: "#4d4d19";
|
|
1836
|
+
* background: "rgba(223,224,159,0.7)";
|
|
1837
|
+
* }
|
|
1838
|
+
*/
|
|
1839
|
+
function setLightness(lightness, color) {
|
|
1840
|
+
if (color === "transparent") return color;
|
|
1841
|
+
return toColorString(_extends({}, parseToHsl(color), { lightness: parseFloat(lightness) }));
|
|
1842
|
+
}
|
|
1843
|
+
/**
|
|
1844
|
+
* Sets the saturation of a color to the provided value. The saturation range can be
|
|
1845
|
+
* from 0 and 1.
|
|
1846
|
+
*
|
|
1847
|
+
* @example
|
|
1848
|
+
* // Styles as object usage
|
|
1849
|
+
* const styles = {
|
|
1850
|
+
* background: setSaturation(0.2, '#CCCD64'),
|
|
1851
|
+
* background: setSaturation('0.75', 'rgba(204,205,100,0.7)'),
|
|
1852
|
+
* }
|
|
1853
|
+
*
|
|
1854
|
+
* // styled-components usage
|
|
1855
|
+
* const div = styled.div`
|
|
1856
|
+
* background: ${setSaturation(0.2, '#CCCD64')};
|
|
1857
|
+
* background: ${setSaturation('0.75', 'rgba(204,205,100,0.7)')};
|
|
1858
|
+
* `
|
|
1859
|
+
*
|
|
1860
|
+
* // CSS in JS Output
|
|
1861
|
+
* element {
|
|
1862
|
+
* background: "#adad84";
|
|
1863
|
+
* background: "rgba(228,229,76,0.7)";
|
|
1864
|
+
* }
|
|
1865
|
+
*/
|
|
1866
|
+
function setSaturation(saturation, color) {
|
|
1867
|
+
if (color === "transparent") return color;
|
|
1868
|
+
return toColorString(_extends({}, parseToHsl(color), { saturation: parseFloat(saturation) }));
|
|
1869
|
+
}
|
|
1870
|
+
/**
|
|
1871
|
+
* Shades a color by mixing it with black. `shade` can produce
|
|
1872
|
+
* hue shifts, where as `darken` manipulates the luminance channel and therefore
|
|
1873
|
+
* doesn't produce hue shifts.
|
|
1874
|
+
*
|
|
1875
|
+
* @example
|
|
1876
|
+
* // Styles as object usage
|
|
1877
|
+
* const styles = {
|
|
1878
|
+
* background: shade(0.25, '#00f')
|
|
1879
|
+
* }
|
|
1880
|
+
*
|
|
1881
|
+
* // styled-components usage
|
|
1882
|
+
* const div = styled.div`
|
|
1883
|
+
* background: ${shade(0.25, '#00f')};
|
|
1884
|
+
* `
|
|
1885
|
+
*
|
|
1886
|
+
* // CSS in JS Output
|
|
1887
|
+
*
|
|
1888
|
+
* element {
|
|
1889
|
+
* background: "#00003f";
|
|
1890
|
+
* }
|
|
1891
|
+
*/
|
|
1892
|
+
function shade(percentage, color) {
|
|
1893
|
+
if (color === "transparent") return color;
|
|
1894
|
+
return mix$1(parseFloat(percentage), "rgb(0, 0, 0)", color);
|
|
1895
|
+
}
|
|
1896
|
+
/**
|
|
1897
|
+
* Tints a color by mixing it with white. `tint` can produce
|
|
1898
|
+
* hue shifts, where as `lighten` manipulates the luminance channel and therefore
|
|
1899
|
+
* doesn't produce hue shifts.
|
|
1900
|
+
*
|
|
1901
|
+
* @example
|
|
1902
|
+
* // Styles as object usage
|
|
1903
|
+
* const styles = {
|
|
1904
|
+
* background: tint(0.25, '#00f')
|
|
1905
|
+
* }
|
|
1906
|
+
*
|
|
1907
|
+
* // styled-components usage
|
|
1908
|
+
* const div = styled.div`
|
|
1909
|
+
* background: ${tint(0.25, '#00f')};
|
|
1910
|
+
* `
|
|
1911
|
+
*
|
|
1912
|
+
* // CSS in JS Output
|
|
1913
|
+
*
|
|
1914
|
+
* element {
|
|
1915
|
+
* background: "#bfbfff";
|
|
1916
|
+
* }
|
|
1917
|
+
*/
|
|
1918
|
+
function tint(percentage, color) {
|
|
1919
|
+
if (color === "transparent") return color;
|
|
1920
|
+
return mix$1(parseFloat(percentage), "rgb(255, 255, 255)", color);
|
|
1921
|
+
}
|
|
1922
|
+
/**
|
|
1923
|
+
* Decreases the opacity of a color. Its range for the amount is between 0 to 1.
|
|
1924
|
+
*
|
|
1925
|
+
*
|
|
1926
|
+
* @example
|
|
1927
|
+
* // Styles as object usage
|
|
1928
|
+
* const styles = {
|
|
1929
|
+
* background: transparentize(0.1, '#fff'),
|
|
1930
|
+
* background: transparentize(0.2, 'hsl(0, 0%, 100%)'),
|
|
1931
|
+
* background: transparentize('0.5', 'rgba(255, 0, 0, 0.8)'),
|
|
1932
|
+
* }
|
|
1933
|
+
*
|
|
1934
|
+
* // styled-components usage
|
|
1935
|
+
* const div = styled.div`
|
|
1936
|
+
* background: ${transparentize(0.1, '#fff')};
|
|
1937
|
+
* background: ${transparentize(0.2, 'hsl(0, 0%, 100%)')};
|
|
1938
|
+
* background: ${transparentize('0.5', 'rgba(255, 0, 0, 0.8)')};
|
|
1939
|
+
* `
|
|
1940
|
+
*
|
|
1941
|
+
* // CSS in JS Output
|
|
1942
|
+
*
|
|
1943
|
+
* element {
|
|
1944
|
+
* background: "rgba(255,255,255,0.9)";
|
|
1945
|
+
* background: "rgba(255,255,255,0.8)";
|
|
1946
|
+
* background: "rgba(255,0,0,0.3)";
|
|
1947
|
+
* }
|
|
1948
|
+
*/
|
|
1949
|
+
function transparentize(amount, color) {
|
|
1950
|
+
if (color === "transparent") return color;
|
|
1951
|
+
var parsedColor = parseToRgb(color);
|
|
1952
|
+
var alpha = typeof parsedColor.alpha === "number" ? parsedColor.alpha : 1;
|
|
1953
|
+
return rgba(_extends({}, parsedColor, { alpha: guard(0, 1, +(alpha * 100 - parseFloat(amount) * 100).toFixed(2) / 100) }));
|
|
1954
|
+
}
|
|
1955
|
+
var PolishedError, cssRegex$1, pixelsto, namedColorMap, hexRegex, hexRgbaRegex, reducedHexRegex, reducedRgbaHexRegex, rgbRegex, rgbaRegex, hslRegex, hslaRegex, reduceHexValue$1, isRgb, isRgba, isHsl, isHsla, mix$1, curriedTransparentize$1;
|
|
1956
|
+
function init_polished_esm() {
|
|
1957
|
+
return (init_polished_esm = __esmMin((() => {
|
|
1958
|
+
init_inheritsLoose();
|
|
1959
|
+
init_wrapNativeSuper();
|
|
1960
|
+
PolishedError = /*#__PURE__*/ function(_Error) {
|
|
1961
|
+
_inheritsLoose(PolishedError, _Error);
|
|
1962
|
+
function PolishedError(code) {
|
|
1963
|
+
var _this = _Error.call(this, "An error occurred. See https://github.com/styled-components/polished/blob/main/src/internalHelpers/errors.md#" + code + " for more information.") || this;
|
|
1964
|
+
return _assertThisInitialized(_this);
|
|
1965
|
+
}
|
|
1966
|
+
return PolishedError;
|
|
1967
|
+
}(/*#__PURE__*/ _wrapNativeSuper(Error));
|
|
1968
|
+
cssRegex$1 = /^([+-]?(?:\d+|\d*\.\d+))([a-z]*|%)$/;
|
|
1969
|
+
pixelsto = function pxtoFactory(to) {
|
|
1970
|
+
return function(pxval, base) {
|
|
1971
|
+
if (base === void 0) base = "16px";
|
|
1972
|
+
var newPxval = pxval;
|
|
1973
|
+
var newBase = base;
|
|
1974
|
+
if (typeof pxval === "string") {
|
|
1975
|
+
if (!endsWith(pxval, "px")) throw new PolishedError(69, to, pxval);
|
|
1976
|
+
newPxval = stripUnit(pxval);
|
|
1977
|
+
}
|
|
1978
|
+
if (typeof base === "string") {
|
|
1979
|
+
if (!endsWith(base, "px")) throw new PolishedError(70, to, base);
|
|
1980
|
+
newBase = stripUnit(base);
|
|
1981
|
+
}
|
|
1982
|
+
if (typeof newPxval === "string") throw new PolishedError(71, pxval, to);
|
|
1983
|
+
if (typeof newBase === "string") throw new PolishedError(72, base, to);
|
|
1984
|
+
return "" + newPxval / newBase + to;
|
|
1985
|
+
};
|
|
1986
|
+
};
|
|
1987
|
+
pixelsto("em");
|
|
1988
|
+
pixelsto("rem");
|
|
1989
|
+
namedColorMap = {
|
|
1990
|
+
aliceblue: "f0f8ff",
|
|
1991
|
+
antiquewhite: "faebd7",
|
|
1992
|
+
aqua: "00ffff",
|
|
1993
|
+
aquamarine: "7fffd4",
|
|
1994
|
+
azure: "f0ffff",
|
|
1995
|
+
beige: "f5f5dc",
|
|
1996
|
+
bisque: "ffe4c4",
|
|
1997
|
+
black: "000",
|
|
1998
|
+
blanchedalmond: "ffebcd",
|
|
1999
|
+
blue: "0000ff",
|
|
2000
|
+
blueviolet: "8a2be2",
|
|
2001
|
+
brown: "a52a2a",
|
|
2002
|
+
burlywood: "deb887",
|
|
2003
|
+
cadetblue: "5f9ea0",
|
|
2004
|
+
chartreuse: "7fff00",
|
|
2005
|
+
chocolate: "d2691e",
|
|
2006
|
+
coral: "ff7f50",
|
|
2007
|
+
cornflowerblue: "6495ed",
|
|
2008
|
+
cornsilk: "fff8dc",
|
|
2009
|
+
crimson: "dc143c",
|
|
2010
|
+
cyan: "00ffff",
|
|
2011
|
+
darkblue: "00008b",
|
|
2012
|
+
darkcyan: "008b8b",
|
|
2013
|
+
darkgoldenrod: "b8860b",
|
|
2014
|
+
darkgray: "a9a9a9",
|
|
2015
|
+
darkgreen: "006400",
|
|
2016
|
+
darkgrey: "a9a9a9",
|
|
2017
|
+
darkkhaki: "bdb76b",
|
|
2018
|
+
darkmagenta: "8b008b",
|
|
2019
|
+
darkolivegreen: "556b2f",
|
|
2020
|
+
darkorange: "ff8c00",
|
|
2021
|
+
darkorchid: "9932cc",
|
|
2022
|
+
darkred: "8b0000",
|
|
2023
|
+
darksalmon: "e9967a",
|
|
2024
|
+
darkseagreen: "8fbc8f",
|
|
2025
|
+
darkslateblue: "483d8b",
|
|
2026
|
+
darkslategray: "2f4f4f",
|
|
2027
|
+
darkslategrey: "2f4f4f",
|
|
2028
|
+
darkturquoise: "00ced1",
|
|
2029
|
+
darkviolet: "9400d3",
|
|
2030
|
+
deeppink: "ff1493",
|
|
2031
|
+
deepskyblue: "00bfff",
|
|
2032
|
+
dimgray: "696969",
|
|
2033
|
+
dimgrey: "696969",
|
|
2034
|
+
dodgerblue: "1e90ff",
|
|
2035
|
+
firebrick: "b22222",
|
|
2036
|
+
floralwhite: "fffaf0",
|
|
2037
|
+
forestgreen: "228b22",
|
|
2038
|
+
fuchsia: "ff00ff",
|
|
2039
|
+
gainsboro: "dcdcdc",
|
|
2040
|
+
ghostwhite: "f8f8ff",
|
|
2041
|
+
gold: "ffd700",
|
|
2042
|
+
goldenrod: "daa520",
|
|
2043
|
+
gray: "808080",
|
|
2044
|
+
green: "008000",
|
|
2045
|
+
greenyellow: "adff2f",
|
|
2046
|
+
grey: "808080",
|
|
2047
|
+
honeydew: "f0fff0",
|
|
2048
|
+
hotpink: "ff69b4",
|
|
2049
|
+
indianred: "cd5c5c",
|
|
2050
|
+
indigo: "4b0082",
|
|
2051
|
+
ivory: "fffff0",
|
|
2052
|
+
khaki: "f0e68c",
|
|
2053
|
+
lavender: "e6e6fa",
|
|
2054
|
+
lavenderblush: "fff0f5",
|
|
2055
|
+
lawngreen: "7cfc00",
|
|
2056
|
+
lemonchiffon: "fffacd",
|
|
2057
|
+
lightblue: "add8e6",
|
|
2058
|
+
lightcoral: "f08080",
|
|
2059
|
+
lightcyan: "e0ffff",
|
|
2060
|
+
lightgoldenrodyellow: "fafad2",
|
|
2061
|
+
lightgray: "d3d3d3",
|
|
2062
|
+
lightgreen: "90ee90",
|
|
2063
|
+
lightgrey: "d3d3d3",
|
|
2064
|
+
lightpink: "ffb6c1",
|
|
2065
|
+
lightsalmon: "ffa07a",
|
|
2066
|
+
lightseagreen: "20b2aa",
|
|
2067
|
+
lightskyblue: "87cefa",
|
|
2068
|
+
lightslategray: "789",
|
|
2069
|
+
lightslategrey: "789",
|
|
2070
|
+
lightsteelblue: "b0c4de",
|
|
2071
|
+
lightyellow: "ffffe0",
|
|
2072
|
+
lime: "0f0",
|
|
2073
|
+
limegreen: "32cd32",
|
|
2074
|
+
linen: "faf0e6",
|
|
2075
|
+
magenta: "f0f",
|
|
2076
|
+
maroon: "800000",
|
|
2077
|
+
mediumaquamarine: "66cdaa",
|
|
2078
|
+
mediumblue: "0000cd",
|
|
2079
|
+
mediumorchid: "ba55d3",
|
|
2080
|
+
mediumpurple: "9370db",
|
|
2081
|
+
mediumseagreen: "3cb371",
|
|
2082
|
+
mediumslateblue: "7b68ee",
|
|
2083
|
+
mediumspringgreen: "00fa9a",
|
|
2084
|
+
mediumturquoise: "48d1cc",
|
|
2085
|
+
mediumvioletred: "c71585",
|
|
2086
|
+
midnightblue: "191970",
|
|
2087
|
+
mintcream: "f5fffa",
|
|
2088
|
+
mistyrose: "ffe4e1",
|
|
2089
|
+
moccasin: "ffe4b5",
|
|
2090
|
+
navajowhite: "ffdead",
|
|
2091
|
+
navy: "000080",
|
|
2092
|
+
oldlace: "fdf5e6",
|
|
2093
|
+
olive: "808000",
|
|
2094
|
+
olivedrab: "6b8e23",
|
|
2095
|
+
orange: "ffa500",
|
|
2096
|
+
orangered: "ff4500",
|
|
2097
|
+
orchid: "da70d6",
|
|
2098
|
+
palegoldenrod: "eee8aa",
|
|
2099
|
+
palegreen: "98fb98",
|
|
2100
|
+
paleturquoise: "afeeee",
|
|
2101
|
+
palevioletred: "db7093",
|
|
2102
|
+
papayawhip: "ffefd5",
|
|
2103
|
+
peachpuff: "ffdab9",
|
|
2104
|
+
peru: "cd853f",
|
|
2105
|
+
pink: "ffc0cb",
|
|
2106
|
+
plum: "dda0dd",
|
|
2107
|
+
powderblue: "b0e0e6",
|
|
2108
|
+
purple: "800080",
|
|
2109
|
+
rebeccapurple: "639",
|
|
2110
|
+
red: "f00",
|
|
2111
|
+
rosybrown: "bc8f8f",
|
|
2112
|
+
royalblue: "4169e1",
|
|
2113
|
+
saddlebrown: "8b4513",
|
|
2114
|
+
salmon: "fa8072",
|
|
2115
|
+
sandybrown: "f4a460",
|
|
2116
|
+
seagreen: "2e8b57",
|
|
2117
|
+
seashell: "fff5ee",
|
|
2118
|
+
sienna: "a0522d",
|
|
2119
|
+
silver: "c0c0c0",
|
|
2120
|
+
skyblue: "87ceeb",
|
|
2121
|
+
slateblue: "6a5acd",
|
|
2122
|
+
slategray: "708090",
|
|
2123
|
+
slategrey: "708090",
|
|
2124
|
+
snow: "fffafa",
|
|
2125
|
+
springgreen: "00ff7f",
|
|
2126
|
+
steelblue: "4682b4",
|
|
2127
|
+
tan: "d2b48c",
|
|
2128
|
+
teal: "008080",
|
|
2129
|
+
thistle: "d8bfd8",
|
|
2130
|
+
tomato: "ff6347",
|
|
2131
|
+
turquoise: "40e0d0",
|
|
2132
|
+
violet: "ee82ee",
|
|
2133
|
+
wheat: "f5deb3",
|
|
2134
|
+
white: "fff",
|
|
2135
|
+
whitesmoke: "f5f5f5",
|
|
2136
|
+
yellow: "ff0",
|
|
2137
|
+
yellowgreen: "9acd32"
|
|
2138
|
+
};
|
|
2139
|
+
hexRegex = /^#[a-fA-F0-9]{6}$/;
|
|
2140
|
+
hexRgbaRegex = /^#[a-fA-F0-9]{8}$/;
|
|
2141
|
+
reducedHexRegex = /^#[a-fA-F0-9]{3}$/;
|
|
2142
|
+
reducedRgbaHexRegex = /^#[a-fA-F0-9]{4}$/;
|
|
2143
|
+
rgbRegex = /^rgb\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*\)$/i;
|
|
2144
|
+
rgbaRegex = /^rgb(?:a)?\(\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,)?\s*(\d{1,3})\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
|
|
2145
|
+
hslRegex = /^hsl\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*\)$/i;
|
|
2146
|
+
hslaRegex = /^hsl(?:a)?\(\s*(\d{0,3}[.]?[0-9]+(?:deg)?)\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,)?\s*(\d{1,3}[.]?[0-9]?)%\s*(?:,|\/)\s*([-+]?\d*[.]?\d+[%]?)\s*\)$/i;
|
|
2147
|
+
reduceHexValue$1 = function reduceHexValue(value) {
|
|
2148
|
+
if (value.length === 7 && value[1] === value[2] && value[3] === value[4] && value[5] === value[6]) return "#" + value[1] + value[3] + value[5];
|
|
2149
|
+
return value;
|
|
2150
|
+
};
|
|
2151
|
+
isRgb = function isRgb(color) {
|
|
2152
|
+
return typeof color.red === "number" && typeof color.green === "number" && typeof color.blue === "number" && (typeof color.alpha !== "number" || typeof color.alpha === "undefined");
|
|
2153
|
+
};
|
|
2154
|
+
isRgba = function isRgba(color) {
|
|
2155
|
+
return typeof color.red === "number" && typeof color.green === "number" && typeof color.blue === "number" && typeof color.alpha === "number";
|
|
2156
|
+
};
|
|
2157
|
+
isHsl = function isHsl(color) {
|
|
2158
|
+
return typeof color.hue === "number" && typeof color.saturation === "number" && typeof color.lightness === "number" && (typeof color.alpha !== "number" || typeof color.alpha === "undefined");
|
|
2159
|
+
};
|
|
2160
|
+
isHsla = function isHsla(color) {
|
|
2161
|
+
return typeof color.hue === "number" && typeof color.saturation === "number" && typeof color.lightness === "number" && typeof color.alpha === "number";
|
|
2162
|
+
};
|
|
2163
|
+
curry(adjustHue);
|
|
2164
|
+
curry(darken);
|
|
2165
|
+
curry(desaturate);
|
|
2166
|
+
curry(lighten);
|
|
2167
|
+
mix$1 = curry(mix);
|
|
2168
|
+
curry(opacify);
|
|
2169
|
+
curry(saturate);
|
|
2170
|
+
curry(setHue);
|
|
2171
|
+
curry(setLightness);
|
|
2172
|
+
curry(setSaturation);
|
|
2173
|
+
curry(shade);
|
|
2174
|
+
curry(tint);
|
|
2175
|
+
curriedTransparentize$1 = curry(transparentize);
|
|
2176
|
+
})))();
|
|
2177
|
+
}
|
|
2178
|
+
//#endregion
|
|
2179
|
+
//#region ../../node_modules/ts-dedent/esm/index.js
|
|
2180
|
+
function dedent(templ) {
|
|
2181
|
+
var values = [];
|
|
2182
|
+
for (var _i = 1; _i < arguments.length; _i++) values[_i - 1] = arguments[_i];
|
|
2183
|
+
var strings = Array.from(typeof templ === "string" ? [templ] : templ);
|
|
2184
|
+
strings[strings.length - 1] = strings[strings.length - 1].replace(/\r?\n([\t ]*)$/, "");
|
|
2185
|
+
var indentLengths = strings.reduce(function(arr, str) {
|
|
2186
|
+
var matches = str.match(/\n([\t ]+|(?!\s).)/g);
|
|
2187
|
+
if (matches) return arr.concat(matches.map(function(match) {
|
|
2188
|
+
var _a, _b;
|
|
2189
|
+
return (_b = (_a = match.match(/[\t ]/g)) === null || _a === void 0 ? void 0 : _a.length) !== null && _b !== void 0 ? _b : 0;
|
|
2190
|
+
}));
|
|
2191
|
+
return arr;
|
|
2192
|
+
}, []);
|
|
2193
|
+
if (indentLengths.length) {
|
|
2194
|
+
var pattern_1 = new RegExp("\n[ ]{".concat(Math.min.apply(Math, indentLengths), "}"), "g");
|
|
2195
|
+
strings = strings.map(function(str) {
|
|
2196
|
+
return str.replace(pattern_1, "\n");
|
|
2197
|
+
});
|
|
2198
|
+
}
|
|
2199
|
+
strings[0] = strings[0].replace(/^\r?\n/, "");
|
|
2200
|
+
var string = strings[0];
|
|
2201
|
+
values.forEach(function(value, i) {
|
|
2202
|
+
var endentations = string.match(/(?:^|\n)( *)$/);
|
|
2203
|
+
var endentation = endentations ? endentations[1] : "";
|
|
2204
|
+
var indentedValue = value;
|
|
2205
|
+
if (typeof value === "string" && value.includes("\n")) indentedValue = String(value).split("\n").map(function(str, i) {
|
|
2206
|
+
return i === 0 ? str : "".concat(endentation).concat(str);
|
|
2207
|
+
}).join("\n");
|
|
2208
|
+
string += indentedValue + strings[i + 1];
|
|
2209
|
+
});
|
|
2210
|
+
return string;
|
|
2211
|
+
}
|
|
2212
|
+
function init_esm() {
|
|
2213
|
+
return (init_esm = __esmMin((() => {})))();
|
|
2214
|
+
}
|
|
2215
|
+
//#endregion
|
|
2216
|
+
//#region ../../node_modules/react-is/cjs/react-is.production.min.js
|
|
2217
|
+
/**
|
|
2218
|
+
* @license React
|
|
2219
|
+
* react-is.production.min.js
|
|
2220
|
+
*
|
|
2221
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
2222
|
+
*
|
|
2223
|
+
* This source code is licensed under the MIT license found in the
|
|
2224
|
+
* LICENSE file in the root directory of this source tree.
|
|
2225
|
+
*/
|
|
2226
|
+
var require_react_is_production_min = /* @__PURE__ */ __commonJSMin(((exports) => {}));
|
|
2227
|
+
//#endregion
|
|
2228
|
+
//#region ../../node_modules/react-is/index.js
|
|
2229
|
+
var require_react_is = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
2230
|
+
module.exports = require_react_is_production_min();
|
|
2231
|
+
}));
|
|
2232
|
+
//#endregion
|
|
2233
|
+
//#region ../../node_modules/store2/dist/store2.js
|
|
2234
|
+
var require_store2 = /* @__PURE__ */ __commonJSMin(((exports, module, this$1) => {
|
|
2235
|
+
/*! store2 - v2.14.4 - 2024-12-26
|
|
2236
|
+
* Copyright (c) 2024 Nathan Bubna; Licensed MIT */
|
|
2237
|
+
(function(window, define) {
|
|
2238
|
+
var _ = {
|
|
2239
|
+
version: "2.14.4",
|
|
2240
|
+
areas: {},
|
|
2241
|
+
apis: {},
|
|
2242
|
+
nsdelim: ".",
|
|
2243
|
+
inherit: function(api, o) {
|
|
2244
|
+
for (var p in api) if (!o.hasOwnProperty(p)) Object.defineProperty(o, p, Object.getOwnPropertyDescriptor(api, p));
|
|
2245
|
+
return o;
|
|
2246
|
+
},
|
|
2247
|
+
stringify: function(d, fn) {
|
|
2248
|
+
return d === void 0 || typeof d === "function" ? d + "" : JSON.stringify(d, fn || _.replace);
|
|
2249
|
+
},
|
|
2250
|
+
parse: function(s, fn) {
|
|
2251
|
+
try {
|
|
2252
|
+
return JSON.parse(s, fn || _.revive);
|
|
2253
|
+
} catch (e) {
|
|
2254
|
+
return s;
|
|
2255
|
+
}
|
|
2256
|
+
},
|
|
2257
|
+
fn: function(name, fn) {
|
|
2258
|
+
_.storeAPI[name] = fn;
|
|
2259
|
+
for (var api in _.apis) _.apis[api][name] = fn;
|
|
2260
|
+
},
|
|
2261
|
+
get: function(area, key) {
|
|
2262
|
+
return area.getItem(key);
|
|
2263
|
+
},
|
|
2264
|
+
set: function(area, key, string) {
|
|
2265
|
+
area.setItem(key, string);
|
|
2266
|
+
},
|
|
2267
|
+
remove: function(area, key) {
|
|
2268
|
+
area.removeItem(key);
|
|
2269
|
+
},
|
|
2270
|
+
key: function(area, i) {
|
|
2271
|
+
return area.key(i);
|
|
2272
|
+
},
|
|
2273
|
+
length: function(area) {
|
|
2274
|
+
return area.length;
|
|
2275
|
+
},
|
|
2276
|
+
clear: function(area) {
|
|
2277
|
+
area.clear();
|
|
2278
|
+
},
|
|
2279
|
+
Store: function(id, area, namespace) {
|
|
2280
|
+
var store = _.inherit(_.storeAPI, function(key, data, overwrite) {
|
|
2281
|
+
if (arguments.length === 0) return store.getAll();
|
|
2282
|
+
if (typeof data === "function") return store.transact(key, data, overwrite);
|
|
2283
|
+
if (data !== void 0) return store.set(key, data, overwrite);
|
|
2284
|
+
if (typeof key === "string" || typeof key === "number") return store.get(key);
|
|
2285
|
+
if (typeof key === "function") return store.each(key);
|
|
2286
|
+
if (!key) return store.clear();
|
|
2287
|
+
return store.setAll(key, data);
|
|
2288
|
+
});
|
|
2289
|
+
store._id = id;
|
|
2290
|
+
try {
|
|
2291
|
+
var testKey = "__store2_test";
|
|
2292
|
+
area.setItem(testKey, "ok");
|
|
2293
|
+
store._area = area;
|
|
2294
|
+
area.removeItem(testKey);
|
|
2295
|
+
} catch (e) {
|
|
2296
|
+
store._area = _.storage("fake");
|
|
2297
|
+
}
|
|
2298
|
+
store._ns = namespace || "";
|
|
2299
|
+
if (!_.areas[id]) _.areas[id] = store._area;
|
|
2300
|
+
if (!_.apis[store._ns + store._id]) _.apis[store._ns + store._id] = store;
|
|
2301
|
+
return store;
|
|
2302
|
+
},
|
|
2303
|
+
storeAPI: {
|
|
2304
|
+
area: function(id, area) {
|
|
2305
|
+
var store = this[id];
|
|
2306
|
+
if (!store || !store.area) {
|
|
2307
|
+
store = _.Store(id, area, this._ns);
|
|
2308
|
+
if (!this[id]) this[id] = store;
|
|
2309
|
+
}
|
|
2310
|
+
return store;
|
|
2311
|
+
},
|
|
2312
|
+
namespace: function(namespace, singleArea, delim) {
|
|
2313
|
+
delim = delim || this._delim || _.nsdelim;
|
|
2314
|
+
if (!namespace) return this._ns ? this._ns.substring(0, this._ns.length - delim.length) : "";
|
|
2315
|
+
var ns = namespace, store = this[ns];
|
|
2316
|
+
if (!store || !store.namespace) {
|
|
2317
|
+
store = _.Store(this._id, this._area, this._ns + ns + delim);
|
|
2318
|
+
store._delim = delim;
|
|
2319
|
+
if (!this[ns]) this[ns] = store;
|
|
2320
|
+
if (!singleArea) for (var name in _.areas) store.area(name, _.areas[name]);
|
|
2321
|
+
}
|
|
2322
|
+
return store;
|
|
2323
|
+
},
|
|
2324
|
+
isFake: function(force) {
|
|
2325
|
+
if (force) {
|
|
2326
|
+
this._real = this._area;
|
|
2327
|
+
this._area = _.storage("fake");
|
|
2328
|
+
} else if (force === false) this._area = this._real || this._area;
|
|
2329
|
+
return this._area.name === "fake";
|
|
2330
|
+
},
|
|
2331
|
+
toString: function() {
|
|
2332
|
+
return "store" + (this._ns ? "." + this.namespace() : "") + "[" + this._id + "]";
|
|
2333
|
+
},
|
|
2334
|
+
has: function(key) {
|
|
2335
|
+
if (this._area.has) return this._area.has(this._in(key));
|
|
2336
|
+
return !!(this._in(key) in this._area);
|
|
2337
|
+
},
|
|
2338
|
+
size: function() {
|
|
2339
|
+
return this.keys().length;
|
|
2340
|
+
},
|
|
2341
|
+
each: function(fn, fill) {
|
|
2342
|
+
for (var i = 0, m = _.length(this._area); i < m; i++) {
|
|
2343
|
+
var key = this._out(_.key(this._area, i));
|
|
2344
|
+
if (key !== void 0) {
|
|
2345
|
+
if (fn.call(this, key, this.get(key), fill) === false) break;
|
|
2346
|
+
}
|
|
2347
|
+
if (m > _.length(this._area)) {
|
|
2348
|
+
m--;
|
|
2349
|
+
i--;
|
|
2350
|
+
}
|
|
2351
|
+
}
|
|
2352
|
+
return fill || this;
|
|
2353
|
+
},
|
|
2354
|
+
keys: function(fillList) {
|
|
2355
|
+
return this.each(function(k, v, list) {
|
|
2356
|
+
list.push(k);
|
|
2357
|
+
}, fillList || []);
|
|
2358
|
+
},
|
|
2359
|
+
get: function(key, alt) {
|
|
2360
|
+
var s = _.get(this._area, this._in(key)), fn;
|
|
2361
|
+
if (typeof alt === "function") {
|
|
2362
|
+
fn = alt;
|
|
2363
|
+
alt = null;
|
|
2364
|
+
}
|
|
2365
|
+
return s !== null ? _.parse(s, fn) : alt != null ? alt : s;
|
|
2366
|
+
},
|
|
2367
|
+
getAll: function(fillObj) {
|
|
2368
|
+
return this.each(function(k, v, all) {
|
|
2369
|
+
all[k] = v;
|
|
2370
|
+
}, fillObj || {});
|
|
2371
|
+
},
|
|
2372
|
+
transact: function(key, fn, alt) {
|
|
2373
|
+
var val = this.get(key, alt), ret = fn(val);
|
|
2374
|
+
this.set(key, ret === void 0 ? val : ret);
|
|
2375
|
+
return this;
|
|
2376
|
+
},
|
|
2377
|
+
set: function(key, data, overwrite) {
|
|
2378
|
+
var d = this.get(key), replacer;
|
|
2379
|
+
if (d != null && overwrite === false) return data;
|
|
2380
|
+
if (typeof overwrite === "function") {
|
|
2381
|
+
replacer = overwrite;
|
|
2382
|
+
overwrite = void 0;
|
|
2383
|
+
}
|
|
2384
|
+
return _.set(this._area, this._in(key), _.stringify(data, replacer), overwrite) || d;
|
|
2385
|
+
},
|
|
2386
|
+
setAll: function(data, overwrite) {
|
|
2387
|
+
var changed, val;
|
|
2388
|
+
for (var key in data) {
|
|
2389
|
+
val = data[key];
|
|
2390
|
+
if (this.set(key, val, overwrite) !== val) changed = true;
|
|
2391
|
+
}
|
|
2392
|
+
return changed;
|
|
2393
|
+
},
|
|
2394
|
+
add: function(key, data, replacer) {
|
|
2395
|
+
var d = this.get(key);
|
|
2396
|
+
if (d instanceof Array) data = d.concat(data);
|
|
2397
|
+
else if (d !== null) {
|
|
2398
|
+
var type = typeof d;
|
|
2399
|
+
if (type === typeof data && type === "object") {
|
|
2400
|
+
for (var k in data) d[k] = data[k];
|
|
2401
|
+
data = d;
|
|
2402
|
+
} else data = d + data;
|
|
2403
|
+
}
|
|
2404
|
+
_.set(this._area, this._in(key), _.stringify(data, replacer));
|
|
2405
|
+
return data;
|
|
2406
|
+
},
|
|
2407
|
+
remove: function(key, alt) {
|
|
2408
|
+
var d = this.get(key, alt);
|
|
2409
|
+
_.remove(this._area, this._in(key));
|
|
2410
|
+
return d;
|
|
2411
|
+
},
|
|
2412
|
+
clear: function() {
|
|
2413
|
+
if (!this._ns) _.clear(this._area);
|
|
2414
|
+
else this.each(function(k) {
|
|
2415
|
+
_.remove(this._area, this._in(k));
|
|
2416
|
+
}, 1);
|
|
2417
|
+
return this;
|
|
2418
|
+
},
|
|
2419
|
+
clearAll: function() {
|
|
2420
|
+
var area = this._area;
|
|
2421
|
+
for (var id in _.areas) if (_.areas.hasOwnProperty(id)) {
|
|
2422
|
+
this._area = _.areas[id];
|
|
2423
|
+
this.clear();
|
|
2424
|
+
}
|
|
2425
|
+
this._area = area;
|
|
2426
|
+
return this;
|
|
2427
|
+
},
|
|
2428
|
+
_in: function(k) {
|
|
2429
|
+
if (typeof k !== "string") k = _.stringify(k);
|
|
2430
|
+
return this._ns ? this._ns + k : k;
|
|
2431
|
+
},
|
|
2432
|
+
_out: function(k) {
|
|
2433
|
+
return this._ns ? k && k.indexOf(this._ns) === 0 ? k.substring(this._ns.length) : void 0 : k;
|
|
2434
|
+
}
|
|
2435
|
+
},
|
|
2436
|
+
storage: function(name) {
|
|
2437
|
+
return _.inherit(_.storageAPI, {
|
|
2438
|
+
items: {},
|
|
2439
|
+
name
|
|
2440
|
+
});
|
|
2441
|
+
},
|
|
2442
|
+
storageAPI: {
|
|
2443
|
+
length: 0,
|
|
2444
|
+
has: function(k) {
|
|
2445
|
+
return this.items.hasOwnProperty(k);
|
|
2446
|
+
},
|
|
2447
|
+
key: function(i) {
|
|
2448
|
+
var c = 0;
|
|
2449
|
+
for (var k in this.items) if (this.has(k) && i === c++) return k;
|
|
2450
|
+
},
|
|
2451
|
+
setItem: function(k, v) {
|
|
2452
|
+
if (!this.has(k)) this.length++;
|
|
2453
|
+
this.items[k] = v;
|
|
2454
|
+
},
|
|
2455
|
+
removeItem: function(k) {
|
|
2456
|
+
if (this.has(k)) {
|
|
2457
|
+
delete this.items[k];
|
|
2458
|
+
this.length--;
|
|
2459
|
+
}
|
|
2460
|
+
},
|
|
2461
|
+
getItem: function(k) {
|
|
2462
|
+
return this.has(k) ? this.items[k] : null;
|
|
2463
|
+
},
|
|
2464
|
+
clear: function() {
|
|
2465
|
+
for (var k in this.items) this.removeItem(k);
|
|
2466
|
+
}
|
|
2467
|
+
}
|
|
2468
|
+
};
|
|
2469
|
+
var store = _.Store("local", (function() {
|
|
2470
|
+
try {
|
|
2471
|
+
return localStorage;
|
|
2472
|
+
} catch (e) {}
|
|
2473
|
+
})());
|
|
2474
|
+
store.local = store;
|
|
2475
|
+
store._ = _;
|
|
2476
|
+
store.area("session", (function() {
|
|
2477
|
+
try {
|
|
2478
|
+
return sessionStorage;
|
|
2479
|
+
} catch (e) {}
|
|
2480
|
+
})());
|
|
2481
|
+
store.area("page", _.storage("page"));
|
|
2482
|
+
if (typeof define === "function" && define.amd !== void 0) define("store2", [], function() {
|
|
2483
|
+
return store;
|
|
2484
|
+
});
|
|
2485
|
+
else if (typeof module !== "undefined" && module.exports) module.exports = store;
|
|
2486
|
+
else {
|
|
2487
|
+
if (window.store) _.conflict = window.store;
|
|
2488
|
+
window.store = store;
|
|
2489
|
+
}
|
|
2490
|
+
})(this$1, this$1 && this$1.define);
|
|
2491
|
+
}));
|
|
2492
|
+
//#endregion
|
|
2493
|
+
export { curriedTransparentize$1 as a, require_with_selector as c, useTransitionState as d, W as f, require_prop_types as h, init_esm as i, require_shim as l, q as m, require_react_is as n, init_polished_esm as o, init_index_module as p, dedent as r, require_memoizerific as s, require_store2 as t, init_useTransitionState as u };
|