@esri/calcite-components 3.0.0-next.99 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/calcite/22RQB3WE.js +4 -0
- package/dist/calcite/{2JRSKQML.js → 24SER2VV.js} +4 -6
- package/dist/calcite/2BGMAPSV.js +4 -0
- package/dist/calcite/2JKKAEPM.js +4 -0
- package/dist/calcite/{JLIVSPKC.js → 2M4WCGKG.js} +4 -6
- package/dist/calcite/2YAXZHP2.js +4 -0
- package/dist/calcite/{AUEN6VFD.js → 345Q4UHX.js} +4 -6
- package/dist/calcite/{O7B4THLC.js → 36DMRAV2.js} +4 -6
- package/dist/calcite/{EBQYJBDQ.js → 3DGJ6ZQI.js} +4 -6
- package/dist/calcite/3GICXOBQ.js +4 -0
- package/dist/calcite/3IV6JSC2.js +4 -0
- package/dist/calcite/{Y5IWWVKB.js → 3TOVZEQB.js} +4 -6
- package/dist/calcite/45GA6INB.js +4 -0
- package/dist/calcite/46U4MKUU.js +4 -0
- package/dist/calcite/4BSCJ722.js +4 -0
- package/dist/calcite/4SEPDFCP.js +5 -0
- package/dist/calcite/{B77QRUX7.js → 4TQLSUKH.js} +4 -6
- package/dist/calcite/4YZ27QWL.js +4 -0
- package/dist/calcite/4Z7JRTON.js +4 -0
- package/dist/calcite/5AVZLE2Q.js +4 -0
- package/dist/calcite/{OMBBOPRI.js → 5EPP4MG3.js} +4 -6
- package/dist/calcite/{KWWKG3YN.js → 66B2H27W.js} +4 -6
- package/dist/calcite/6LW27BEV.js +4 -0
- package/dist/calcite/6OZRZ36X.js +4 -0
- package/dist/calcite/6X2SD2PW.js +4 -0
- package/dist/calcite/{ZWGCNMZF.js → 6XTYGXNG.js} +4 -6
- package/dist/calcite/6ZTWHW63.js +4 -0
- package/dist/calcite/{BZOCG27F.js → 7D3VEEUX.js} +4 -6
- package/dist/calcite/7E342YOK.js +4 -0
- package/dist/calcite/{4OYBMKUB.js → 7KSGVDSR.js} +4 -6
- package/dist/calcite/{DF7SVAJW.js → 7PWETOIU.js} +4 -6
- package/dist/calcite/7QHUEK5R.js +4 -0
- package/dist/calcite/{BGQR3WLU.js → 7SX3RD7P.js} +4 -6
- package/dist/calcite/7U7FF3Y4.js +4 -0
- package/dist/calcite/7WG5I3MP.js +4 -0
- package/dist/calcite/{KHDHQPVO.js → A5GGYTUQ.js} +4 -6
- package/dist/calcite/{3SE2Z2VK.js → AI3R3SU6.js} +5 -7
- package/dist/calcite/ARHYATTG.js +4 -0
- package/dist/calcite/{ELXZUEDC.js → ATHBUWBY.js} +4 -6
- package/dist/calcite/AXXJNFKZ.js +4 -0
- package/dist/calcite/{AASA6526.js → AYZ73RWQ.js} +4 -6
- package/dist/calcite/{S6AE7RHT.js → BAHIPAHM.js} +4 -6
- package/dist/calcite/BRTDMTZ3.js +4 -0
- package/dist/calcite/BRTESQOJ.js +4 -0
- package/dist/calcite/{3LYDW23E.js → BSRMWMHQ.js} +4 -6
- package/dist/calcite/{2UYJUU43.js → BZKF5ZXQ.js} +4 -6
- package/dist/calcite/C46JYVUP.js +4 -0
- package/dist/calcite/C54C5E23.js +4 -0
- package/dist/calcite/CBSMKHOY.js +4 -0
- package/dist/calcite/CFRBQXK4.js +4 -0
- package/dist/calcite/CIV3PH3Z.js +4 -0
- package/dist/calcite/CJYTY62F.js +4 -0
- package/dist/calcite/CK6HQQX6.js +4 -0
- package/dist/calcite/CMO3X257.js +4 -0
- package/dist/calcite/{3Z3RDAUW.js → CNO6NFH5.js} +4 -6
- package/dist/calcite/CWPRBG3T.js +4 -0
- package/dist/calcite/CY6C2FDZ.js +4 -0
- package/dist/calcite/D2HDFE7S.js +22 -0
- package/dist/calcite/D36VWSDW.js +4 -0
- package/dist/calcite/{3QV5TGZD.js → DBVNMM6Q.js} +4 -6
- package/dist/calcite/{4JU7BKXB.js → DDJ75RTI.js} +4 -6
- package/dist/calcite/DH4ISGHV.js +4 -0
- package/dist/calcite/{3PJ42556.js → DNYBIAUI.js} +4 -6
- package/dist/calcite/DT67ZFPX.js +4 -0
- package/dist/calcite/{EWQKTTIO.js → DTL2LM6T.js} +4 -6
- package/dist/calcite/E3R5SMVW.js +4 -0
- package/dist/calcite/{AGLAEQKV.js → E4NMFIKN.js} +4 -6
- package/dist/calcite/{FMI6FJW4.js → EAML4EDI.js} +4 -6
- package/dist/calcite/{XEW3B3B5.js → ECEZ4R6E.js} +4 -6
- package/dist/calcite/EFI2G5WL.js +4 -0
- package/dist/calcite/EHZCT5YZ.js +4 -0
- package/dist/calcite/{SYOTV4D4.js → EOHVH6PN.js} +4 -6
- package/dist/calcite/ESBOJTBS.js +4 -0
- package/dist/calcite/F6EGRKXW.js +4 -0
- package/dist/calcite/FCN5RMLA.js +4 -0
- package/dist/calcite/FDIM6DYL.js +4 -0
- package/dist/calcite/FE3A3YUN.js +4 -0
- package/dist/calcite/FHBFGCTR.js +4 -0
- package/dist/calcite/FNFWOOMR.js +4 -0
- package/dist/calcite/{UPY24BFQ.js → FNM4DZZH.js} +3 -5
- package/dist/calcite/G2KHDAZD.js +4 -0
- package/dist/calcite/{P64WY2HI.js → G3LH75CQ.js} +4 -6
- package/dist/calcite/{UZAQE6XP.js → G3ZJ2KQT.js} +4 -6
- package/dist/calcite/{GIRDDKPZ.js → G7WFYVUC.js} +4 -6
- package/dist/calcite/{3RLXG3NR.js → GAAXSGWK.js} +4 -6
- package/dist/calcite/{QNGBOTGF.js → GE63ETFI.js} +4 -6
- package/dist/calcite/{DO5AYUNU.js → GFC7NS6P.js} +4 -6
- package/dist/calcite/GGO5TMB4.js +4 -0
- package/dist/calcite/GKKCWEZX.js +4 -0
- package/dist/calcite/GN5CPLSJ.js +4 -0
- package/dist/calcite/GNUSLZWJ.js +4 -0
- package/dist/calcite/{L4IJ6KQT.js → GOOHYN3D.js} +4 -6
- package/dist/calcite/GPUFLCIT.js +4 -0
- package/dist/calcite/GSXEMGSW.js +4 -0
- package/dist/calcite/GYQTRH4V.js +4 -0
- package/dist/calcite/HFIRIAQA.js +4 -0
- package/dist/calcite/{6EFD6XES.js → HGTV36FX.js} +4 -6
- package/dist/calcite/HKHPJJ34.js +4 -0
- package/dist/calcite/{CM4U5UKC.js → HMVKZP47.js} +4 -6
- package/dist/calcite/I2OIH73C.js +4 -0
- package/dist/calcite/{W4D5O4P2.js → I32TMNTO.js} +3 -5
- package/dist/calcite/{KBVTFWRR.js → I62DUDHI.js} +4 -6
- package/dist/calcite/IH4RXHJJ.js +4 -0
- package/dist/calcite/{EUXG27WD.js → IJCTXZQB.js} +4 -6
- package/dist/calcite/{5LAQP62T.js → IXRMDUEL.js} +4 -6
- package/dist/calcite/IYDN67SF.js +4 -0
- package/dist/calcite/JCWM5Z43.js +4 -0
- package/dist/calcite/{26ES3CRO.js → JEX42CPR.js} +4 -6
- package/dist/calcite/JFYDLHH7.js +4 -0
- package/dist/calcite/JLZYAYOL.js +4 -0
- package/dist/calcite/{3KND2KKH.js → JUNCR7R2.js} +4 -6
- package/dist/calcite/{K3F2CI4A.js → JVNEJ36Z.js} +4 -6
- package/dist/calcite/K3ZBW4GY.js +4 -0
- package/dist/calcite/{G4Q2QH6B.js → KBDXI6DJ.js} +4 -6
- package/dist/calcite/{XFHDAVBK.js → KBNS3CCT.js} +4 -6
- package/dist/calcite/KI2NOBMU.js +4 -0
- package/dist/calcite/KSNEQFZX.js +4 -0
- package/dist/calcite/KSVYAIHK.js +4 -0
- package/dist/calcite/KULDQOV2.js +4 -0
- package/dist/calcite/KVSCG5E3.js +6 -0
- package/dist/calcite/{JFBHBHJE.js → KW57BHXD.js} +4 -6
- package/dist/calcite/{VP4IW6MN.js → KWOOGTG2.js} +4 -6
- package/dist/calcite/L5FDXQMT.js +4 -0
- package/dist/calcite/{UFV4E5V5.js → LB5ATL5Q.js} +4 -6
- package/dist/calcite/LH7KSBQC.js +4 -0
- package/dist/calcite/{6YQ42X6L.js → LHSAAMYQ.js} +4 -6
- package/dist/calcite/LILDCWFX.js +4 -0
- package/dist/calcite/LLSB73WA.js +4 -0
- package/dist/calcite/{MRVEUN2O.js → LOZEGKG2.js} +4 -6
- package/dist/calcite/{LR6EXHT2.js → MBQZPRQ5.js} +4 -6
- package/dist/calcite/MCSX2S5T.js +4 -0
- package/dist/calcite/{5MEU7SU4.js → MIKGJ3NM.js} +4 -6
- package/dist/calcite/MPAVJ7UH.js +4 -0
- package/dist/calcite/{RWW7CETF.js → MPX2M2VX.js} +4 -6
- package/dist/calcite/{N7NWH5SX.js → MQYH4ONZ.js} +3 -5
- package/dist/calcite/MUWK32IE.js +4 -0
- package/dist/calcite/{6FI3WN2Y.js → MZRO54UT.js} +4 -6
- package/dist/calcite/N2BVYYYP.js +4 -0
- package/dist/calcite/{WIGL5RKK.js → N4MN6VQ7.js} +4 -6
- package/dist/calcite/{ESS6BUTG.js → N55N67N5.js} +4 -6
- package/dist/calcite/NODC2JA6.js +4 -0
- package/dist/calcite/{FSQJ72IH.js → NVBNX55L.js} +4 -6
- package/dist/calcite/{Z2ZTWA3F.js → NWVCPRVB.js} +3 -5
- package/dist/calcite/{W3WKINVO.js → O4O3TSE5.js} +4 -6
- package/dist/calcite/OE2AH2NC.js +4 -0
- package/dist/calcite/OGED6PPP.js +4 -0
- package/dist/calcite/{QBG5T6W3.js → OHOS32IT.js} +4 -6
- package/dist/calcite/{KA53KK35.js → OLMX7G3J.js} +3 -5
- package/dist/calcite/OOSULFCY.js +4 -0
- package/dist/calcite/OPBQNK7J.js +4 -0
- package/dist/calcite/OTHVFLNW.js +4 -0
- package/dist/calcite/{G75XVKLZ.js → OTUG3NVT.js} +4 -6
- package/dist/calcite/PNHR5K2L.js +4 -0
- package/dist/calcite/{2YSVELPG.js → PT2XMADA.js} +3 -5
- package/dist/calcite/PZLVQQMT.js +4 -0
- package/dist/calcite/{I2N2BRJR.js → QAYSDI3M.js} +3 -5
- package/dist/calcite/QCGLMLKW.js +4 -0
- package/dist/calcite/QHASLHZN.js +4 -0
- package/dist/calcite/QK2H5T7J.js +4 -0
- package/dist/calcite/QLKHJI4P.js +4 -0
- package/dist/calcite/QQ67AVDV.js +4 -0
- package/dist/calcite/{CTQ5YHOP.js → QU33PBBI.js} +4 -6
- package/dist/calcite/QYGED6CL.js +4 -0
- package/dist/calcite/R3HMG2D6.js +4 -0
- package/dist/calcite/{OU4N4K2U.js → R4RMVIKH.js} +4 -6
- package/dist/calcite/R6GNPMSV.js +4 -0
- package/dist/calcite/{ARFAFPKS.js → RAFCSOOQ.js} +4 -6
- package/dist/calcite/{GU2SFYM4.js → RAQWKUOJ.js} +4 -6
- package/dist/calcite/RESHLE2Y.js +4 -0
- package/dist/calcite/RJLKHCRB.js +4 -0
- package/dist/calcite/RLSQLIV6.js +4 -0
- package/dist/calcite/{57L4ZYLO.js → RMGYRZXR.js} +4 -6
- package/dist/calcite/RSAEDAEX.js +4 -0
- package/dist/calcite/{SFWNFANJ.js → RUTUU2EH.js} +4 -6
- package/dist/calcite/{XFKIMAJU.js → RVMVJW6K.js} +4 -6
- package/dist/calcite/RVQMJBNS.js +4 -0
- package/dist/calcite/{QLJX2F4K.js → S76CXQTI.js} +4 -6
- package/dist/calcite/SBZ6VJ75.js +4 -0
- package/dist/calcite/SJKTCGW6.js +4 -0
- package/dist/calcite/{G27BUJJG.js → SKDMJE3X.js} +3 -5
- package/dist/calcite/SMUXJLDL.js +4 -0
- package/dist/calcite/SYEQSDHG.js +4 -0
- package/dist/calcite/T3NRBBZP.js +4 -0
- package/dist/calcite/T5UPGHU3.js +4 -0
- package/dist/calcite/{XOA2TSHC.js → T6HODD4B.js} +4 -6
- package/dist/calcite/TNR5VZG2.js +4 -0
- package/dist/calcite/TQIVV2F7.js +4 -0
- package/dist/calcite/{UCGUHOUO.js → TQTAM3XB.js} +4 -6
- package/dist/calcite/{XR2WLB7D.js → TSJJLMPA.js} +3 -5
- package/dist/calcite/{VM4VUQ54.js → TVDZM7WT.js} +4 -6
- package/dist/calcite/U3WK4DZT.js +4 -0
- package/dist/calcite/U725E4ID.js +4 -0
- package/dist/calcite/UELGJSYH.js +4 -0
- package/dist/calcite/UJL3BWDH.js +4 -0
- package/dist/calcite/{AFH6KP7M.js → URM3R65T.js} +4 -6
- package/dist/calcite/US3PQV6O.js +4 -0
- package/dist/calcite/{BNYX7IBO.js → V4JZRN7T.js} +4 -6
- package/dist/calcite/{3JQJ24PZ.js → VCSXFNPO.js} +4 -6
- package/dist/calcite/VG7BJBFG.js +4 -0
- package/dist/calcite/{6LWRLBVD.js → VJD4CRQ3.js} +4 -6
- package/dist/calcite/VMRLYKNI.js +4 -0
- package/dist/calcite/{LQ5ITYNE.js → VNQNKQ2J.js} +4 -6
- package/dist/calcite/VST65PDC.js +4 -0
- package/dist/calcite/WKTGTKRJ.js +4 -0
- package/dist/calcite/WPAMFFBY.js +4 -0
- package/dist/calcite/{3ATQZBKY.js → WSGL37LB.js} +4 -6
- package/dist/calcite/{4TWMM7Z6.js → WWUBU6N5.js} +4 -6
- package/dist/calcite/{QFH3VN2R.js → X2UHFJHG.js} +4 -6
- package/dist/calcite/XBZLGRRI.js +4 -0
- package/dist/calcite/XOVG6UH3.js +4 -0
- package/dist/calcite/{7NVGCG7Q.js → XT32TCZG.js} +3 -5
- package/dist/calcite/XXZIOSXQ.js +4 -0
- package/dist/calcite/{MNBTRJLH.js → Y6VF7HSM.js} +4 -6
- package/dist/calcite/YA5A7PJR.js +4 -0
- package/dist/calcite/{MYJH43DB.js → YMRTHS5X.js} +4 -6
- package/dist/calcite/{ZQSF4K7D.js → YTRT5XZT.js} +4 -6
- package/dist/calcite/{O2KBYT33.js → YXLQFMOA.js} +4 -6
- package/dist/calcite/{J7RY7DXT.js → YYJSHQR3.js} +3 -5
- package/dist/calcite/{SZP7YBVQ.js → Z6GA347Y.js} +4 -6
- package/dist/calcite/{VFBPWVKE.js → Z7VNUC77.js} +4 -6
- package/dist/calcite/ZA76CHET.js +4 -0
- package/dist/calcite/ZGXTLCGJ.js +4 -0
- package/dist/calcite/{KMLCSDZJ.js → ZQO6E4FO.js} +4 -6
- package/dist/calcite/ZV442E6X.js +4 -0
- package/dist/calcite/assets/icon/crosshair16.json +1 -0
- package/dist/calcite/assets/icon/crosshair24.json +1 -0
- package/dist/calcite/assets/icon/crosshair32.json +1 -0
- package/dist/calcite/assets/icon/dualImageArea16.json +1 -0
- package/dist/calcite/assets/icon/dualImageArea24.json +1 -0
- package/dist/calcite/assets/icon/dualImageArea32.json +1 -0
- package/dist/calcite/assets/icon/dualImageDistance16.json +1 -0
- package/dist/calcite/assets/icon/dualImageDistance24.json +1 -0
- package/dist/calcite/assets/icon/dualImageDistance32.json +1 -0
- package/dist/calcite/assets/icon/dualImageLocation16.json +1 -0
- package/dist/calcite/assets/icon/dualImageLocation24.json +1 -0
- package/dist/calcite/assets/icon/dualImageLocation32.json +1 -0
- package/dist/calcite/assets/icon/hammerCoin16.json +1 -0
- package/dist/calcite/assets/icon/hammerCoin24.json +1 -0
- package/dist/calcite/assets/icon/hammerCoin32.json +1 -0
- package/dist/calcite/assets/icon/hammerLock16.json +1 -0
- package/dist/calcite/assets/icon/hammerLock24.json +1 -0
- package/dist/calcite/assets/icon/hammerLock32.json +1 -0
- package/dist/calcite/assets/icon/utilityNetworkLayer16.json +1 -0
- package/dist/calcite/assets/icon/utilityNetworkLayer24.json +1 -0
- package/dist/calcite/assets/icon/utilityNetworkLayer32.json +1 -0
- package/dist/calcite/calcite.css +1 -1
- package/dist/calcite/calcite.esm.js +4 -6
- package/dist/chunks/ExpandToggle.js +3 -5
- package/dist/chunks/FloatingArrow.js +6 -8
- package/dist/chunks/Heading.js +3 -5
- package/dist/chunks/Validation.js +3 -5
- package/dist/chunks/_commonjsHelpers.js +3 -5
- package/dist/chunks/array.js +3 -5
- package/dist/chunks/component.js +13 -11
- package/dist/chunks/core.js +3 -5
- package/dist/chunks/date.js +3 -5
- package/dist/chunks/dom.js +218 -234
- package/dist/chunks/dynamicClasses.js +3 -5
- package/dist/chunks/filter.js +3 -5
- package/dist/chunks/floating-ui.js +61 -65
- package/dist/chunks/focusTrapComponent.js +25 -30
- package/dist/chunks/form.js +19 -21
- package/dist/chunks/global.js +14 -14
- package/dist/chunks/guid.js +3 -5
- package/dist/chunks/input.js +3 -5
- package/dist/chunks/interact.min.js +3 -5
- package/dist/chunks/interactive.js +3 -5
- package/dist/chunks/key.js +3 -5
- package/dist/chunks/label.js +7 -9
- package/dist/chunks/loadable.js +11 -22
- package/dist/chunks/locale.js +3 -5
- package/dist/chunks/logger.js +3 -5
- package/dist/chunks/math.js +3 -5
- package/dist/chunks/observers.js +3 -5
- package/dist/chunks/openCloseComponent.js +5 -7
- package/dist/chunks/resources.js +3 -5
- package/dist/chunks/resources2.js +3 -5
- package/dist/chunks/resources3.js +8 -14
- package/dist/chunks/resources4.js +3 -5
- package/dist/chunks/resources5.js +3 -5
- package/dist/chunks/resources6.js +3 -5
- package/dist/chunks/resources7.js +3 -5
- package/dist/chunks/responsive.js +9 -12
- package/dist/chunks/runtime.js +39 -43
- package/dist/chunks/sortableComponent.js +49 -39
- package/dist/chunks/text.js +3 -5
- package/dist/chunks/time.js +12 -14
- package/dist/chunks/useFocusTrap.js +49 -0
- package/dist/chunks/useT9n.js +3 -5
- package/dist/chunks/utils.js +19 -17
- package/dist/chunks/utils2.js +3 -5
- package/dist/chunks/utils3.js +15 -16
- package/dist/chunks/utils4.js +264 -271
- package/dist/components/calcite-accordion/customElement.js +3 -5
- package/dist/components/calcite-accordion-item/customElement.js +10 -14
- package/dist/components/calcite-action/customElement.js +17 -21
- package/dist/components/calcite-action-bar/customElement.js +24 -27
- package/dist/components/calcite-action-group/customElement.js +20 -24
- package/dist/components/calcite-action-menu/customElement.js +14 -18
- package/dist/components/calcite-action-pad/customElement.js +21 -25
- package/dist/components/calcite-alert/customElement.js +50 -63
- package/dist/components/calcite-autocomplete/customElement.d.ts +10 -4
- package/dist/components/calcite-autocomplete/customElement.js +50 -52
- package/dist/components/calcite-autocomplete-item/customElement.js +17 -21
- package/dist/components/calcite-autocomplete-item-group/customElement.js +3 -5
- package/dist/components/calcite-avatar/customElement.js +8 -10
- package/dist/components/calcite-block/customElement.d.ts +18 -1
- package/dist/components/calcite-block/customElement.js +54 -40
- package/dist/components/calcite-block/index.d.ts +1 -1
- package/dist/components/calcite-block/index.js +1 -1
- package/dist/components/calcite-block/utils.d.ts +2 -0
- package/dist/components/calcite-block-group/customElement.d.ts +50 -0
- package/dist/components/calcite-block-group/customElement.js +177 -0
- package/dist/components/calcite-block-group/index.d.ts +2 -0
- package/dist/components/calcite-block-group/index.js +2 -0
- package/dist/components/calcite-block-group/interfaces.d.ts +14 -0
- package/dist/components/calcite-block-group/resources.d.ts +8 -0
- package/dist/components/calcite-block-group/utils.d.ts +1 -0
- package/dist/components/calcite-block-section/customElement.js +19 -23
- package/dist/components/calcite-button/customElement.js +28 -30
- package/dist/components/calcite-card/customElement.js +17 -23
- package/dist/components/calcite-card-group/customElement.js +15 -18
- package/dist/components/calcite-carousel/customElement.js +29 -32
- package/dist/components/calcite-carousel-item/customElement.js +3 -5
- package/dist/components/calcite-checkbox/customElement.d.ts +4 -1
- package/dist/components/calcite-checkbox/customElement.js +18 -22
- package/dist/components/calcite-chip/customElement.js +42 -44
- package/dist/components/calcite-chip-group/customElement.js +10 -14
- package/dist/components/calcite-color-picker/customElement.d.ts +1 -1
- package/dist/components/calcite-color-picker/customElement.js +200 -178
- package/dist/components/calcite-color-picker/resources.d.ts +7 -16
- package/dist/components/calcite-color-picker/utils.d.ts +4 -3
- package/dist/components/calcite-color-picker-hex-input/customElement.js +27 -31
- package/dist/components/calcite-color-picker-swatch/customElement.js +3 -5
- package/dist/components/calcite-combobox/customElement.d.ts +5 -3
- package/dist/components/calcite-combobox/customElement.js +166 -160
- package/dist/components/calcite-combobox/resources.d.ts +1 -0
- package/dist/components/calcite-combobox-item/customElement.d.ts +2 -1
- package/dist/components/calcite-combobox-item/customElement.js +47 -38
- package/dist/components/calcite-combobox-item-group/customElement.js +13 -15
- package/dist/components/calcite-date-picker/customElement.d.ts +8 -2
- package/dist/components/calcite-date-picker/customElement.js +28 -31
- package/dist/components/calcite-date-picker-day/customElement.js +16 -19
- package/dist/components/calcite-date-picker-month/customElement.js +39 -41
- package/dist/components/calcite-date-picker-month-header/customElement.js +40 -44
- package/dist/components/calcite-dialog/customElement.d.ts +20 -4
- package/dist/components/calcite-dialog/customElement.js +78 -72
- package/dist/components/calcite-dialog/resources.d.ts +1 -0
- package/dist/components/calcite-dropdown/customElement.d.ts +1 -1
- package/dist/components/calcite-dropdown/customElement.js +63 -70
- package/dist/components/calcite-dropdown/resources.d.ts +1 -0
- package/dist/components/calcite-dropdown-group/customElement.js +4 -6
- package/dist/components/calcite-dropdown-item/customElement.js +20 -23
- package/dist/components/calcite-fab/customElement.js +19 -23
- package/dist/components/calcite-filter/customElement.js +20 -25
- package/dist/components/calcite-flow/customElement.js +19 -22
- package/dist/components/calcite-flow-item/customElement.js +26 -30
- package/dist/components/calcite-graph/customElement.js +52 -50
- package/dist/components/calcite-graph/interfaces.d.ts +1 -5
- package/dist/components/calcite-graph/resources.d.ts +5 -0
- package/dist/components/calcite-handle/customElement.d.ts +3 -0
- package/dist/components/calcite-handle/customElement.js +20 -18
- package/dist/components/calcite-icon/customElement.js +23 -25
- package/dist/components/calcite-inline-editable/customElement.js +25 -29
- package/dist/components/calcite-input/customElement.d.ts +14 -6
- package/dist/components/calcite-input/customElement.js +26 -29
- package/dist/components/calcite-input-date-picker/customElement.d.ts +12 -3
- package/dist/components/calcite-input-date-picker/customElement.js +84 -88
- package/dist/components/calcite-input-message/customElement.js +3 -5
- package/dist/components/calcite-input-number/customElement.d.ts +12 -5
- package/dist/components/calcite-input-number/customElement.js +30 -36
- package/dist/components/calcite-input-text/customElement.d.ts +10 -4
- package/dist/components/calcite-input-text/customElement.js +61 -65
- package/dist/components/calcite-input-time-picker/customElement.d.ts +8 -3
- package/dist/components/calcite-input-time-picker/customElement.js +45 -47
- package/dist/components/calcite-input-time-zone/customElement.js +53 -55
- package/dist/components/calcite-label/customElement.js +3 -5
- package/dist/components/calcite-link/customElement.js +10 -14
- package/dist/components/calcite-list/customElement.js +67 -70
- package/dist/components/calcite-list-item/customElement.js +54 -73
- package/dist/components/calcite-list-item/utils.d.ts +1 -0
- package/dist/components/calcite-list-item-group/customElement.js +3 -5
- package/dist/components/calcite-loader/customElement.js +3 -7
- package/dist/components/calcite-menu/customElement.js +12 -16
- package/dist/components/calcite-menu-item/customElement.js +12 -16
- package/dist/components/calcite-meter/customElement.js +26 -28
- package/dist/components/calcite-modal/customElement.d.ts +16 -3
- package/dist/components/calcite-modal/customElement.js +61 -61
- package/dist/components/calcite-navigation/customElement.js +17 -21
- package/dist/components/calcite-navigation-logo/customElement.js +12 -16
- package/dist/components/calcite-navigation-user/customElement.js +10 -14
- package/dist/components/calcite-notice/customElement.js +25 -28
- package/dist/components/calcite-option/customElement.js +3 -5
- package/dist/components/calcite-option-group/customElement.js +3 -5
- package/dist/components/calcite-pagination/customElement.js +15 -17
- package/dist/components/calcite-panel/customElement.js +45 -48
- package/dist/components/calcite-popover/customElement.d.ts +10 -7
- package/dist/components/calcite-popover/customElement.js +70 -79
- package/dist/components/calcite-progress/customElement.js +3 -5
- package/dist/components/calcite-radio-button/customElement.d.ts +4 -1
- package/dist/components/calcite-radio-button/customElement.js +17 -20
- package/dist/components/calcite-radio-button-group/customElement.d.ts +4 -1
- package/dist/components/calcite-radio-button-group/customElement.js +14 -17
- package/dist/components/calcite-rating/customElement.js +21 -23
- package/dist/components/calcite-scrim/customElement.js +3 -5
- package/dist/components/calcite-segmented-control/customElement.d.ts +4 -1
- package/dist/components/calcite-segmented-control/customElement.js +14 -17
- package/dist/components/calcite-segmented-control-item/customElement.js +28 -30
- package/dist/components/calcite-select/customElement.d.ts +4 -1
- package/dist/components/calcite-select/customElement.js +19 -22
- package/dist/components/calcite-sheet/customElement.d.ts +17 -3
- package/dist/components/calcite-sheet/customElement.js +59 -62
- package/dist/components/calcite-shell/customElement.js +3 -6
- package/dist/components/calcite-shell-center-row/customElement.js +3 -5
- package/dist/components/calcite-shell-panel/customElement.js +16 -20
- package/dist/components/calcite-slider/customElement.d.ts +4 -1
- package/dist/components/calcite-slider/customElement.js +18 -21
- package/dist/components/calcite-sort-handle/customElement.js +45 -35
- package/dist/components/calcite-sort-handle/index.d.ts +1 -1
- package/dist/components/calcite-sort-handle/index.js +1 -1
- package/dist/components/calcite-sortable-list/customElement.d.ts +4 -1
- package/dist/components/calcite-sortable-list/customElement.js +21 -16
- package/dist/components/calcite-split-button/customElement.js +13 -20
- package/dist/components/calcite-stack/customElement.js +4 -6
- package/dist/components/calcite-stepper/customElement.js +36 -39
- package/dist/components/calcite-stepper-item/customElement.js +23 -22
- package/dist/components/calcite-switch/customElement.js +10 -14
- package/dist/components/calcite-tab/customElement.js +3 -5
- package/dist/components/calcite-tab-nav/customElement.js +3 -5
- package/dist/components/calcite-tab-title/customElement.js +3 -5
- package/dist/components/calcite-table/customElement.js +44 -47
- package/dist/components/calcite-table-cell/customElement.js +22 -25
- package/dist/components/calcite-table-header/customElement.js +18 -21
- package/dist/components/calcite-table-row/customElement.js +6 -8
- package/dist/components/calcite-tabs/customElement.js +3 -5
- package/dist/components/calcite-text-area/customElement.d.ts +10 -3
- package/dist/components/calcite-text-area/customElement.js +30 -37
- package/dist/components/calcite-tile/customElement.js +16 -20
- package/dist/components/calcite-tile-group/customElement.js +3 -5
- package/dist/components/calcite-tile-select/customElement.js +17 -22
- package/dist/components/calcite-tile-select-group/customElement.js +3 -5
- package/dist/components/calcite-time-picker/customElement.d.ts +1 -0
- package/dist/components/calcite-time-picker/customElement.js +19 -23
- package/dist/components/calcite-tip/customElement.js +3 -5
- package/dist/components/calcite-tip-group/customElement.js +3 -5
- package/dist/components/calcite-tip-manager/customElement.js +3 -5
- package/dist/components/calcite-tooltip/customElement.js +41 -40
- package/dist/components/calcite-tree/customElement.js +3 -5
- package/dist/components/calcite-tree-item/customElement.js +16 -14
- package/dist/components/interfaces.d.ts +4 -0
- package/dist/controllers/useFocusTrap.d.ts +67 -0
- package/dist/custom-theme/block.d.ts +4 -5
- package/dist/custom-theme/calcite-shell-panel.d.ts +13 -0
- package/dist/custom-theme/date-picker.d.ts +28 -0
- package/dist/custom-theme/flow.d.ts +21 -0
- package/dist/custom-theme/graph.d.ts +4 -0
- package/dist/custom-theme/inline-editable.d.ts +10 -0
- package/dist/custom-theme/segmented-control.d.ts +7 -0
- package/dist/docs/api.json +1141 -159
- package/dist/docs/docs.json +1093 -126
- package/dist/docs/supported-browsers.json +1 -1
- package/dist/docs/vscode.css-custom-data.json +315 -7
- package/dist/docs/vscode.html-custom-data.json +107 -60
- package/dist/docs/web-types.json +659 -119
- package/dist/extras/vscode-data.json +107 -60
- package/dist/index.d.ts +25 -0
- package/dist/index.js +3 -5
- package/dist/loader.js +16 -17
- package/dist/types/lumina.d.ts +18 -6
- package/dist/types/preact.d.ts +19 -6
- package/dist/types/react.d.ts +180 -165
- package/dist/types/stencil.d.ts +18 -6
- package/dist/utils/component.d.ts +4 -0
- package/dist/utils/focusTrapComponent.d.ts +9 -0
- package/dist/utils/loadable.d.ts +26 -43
- package/dist/utils/openCloseComponent.d.ts +17 -18
- package/hydrate/index.d.ts +1 -0
- package/hydrate/index.js +1 -0
- package/hydrate/index.mjs +1 -0
- package/package.json +11 -12
- package/readme.md +5 -69
- package/dist/calcite/2AZY343I.js +0 -6
- package/dist/calcite/2CPZ6K5L.js +0 -6
- package/dist/calcite/2M35C4DF.js +0 -6
- package/dist/calcite/2VVNNU7Q.js +0 -6
- package/dist/calcite/2XACBT2N.js +0 -6
- package/dist/calcite/32P7BAVF.js +0 -6
- package/dist/calcite/3HC2LTHR.js +0 -6
- package/dist/calcite/455MOJA6.js +0 -6
- package/dist/calcite/4DVWRXRA.js +0 -6
- package/dist/calcite/4TF5UO7R.js +0 -6
- package/dist/calcite/572RARTY.js +0 -6
- package/dist/calcite/5I36CFLM.js +0 -6
- package/dist/calcite/5OJMVZTI.js +0 -6
- package/dist/calcite/5YZTHYBK.js +0 -6
- package/dist/calcite/6L5EBECQ.js +0 -6
- package/dist/calcite/73JK3C3F.js +0 -6
- package/dist/calcite/7557S5FH.js +0 -6
- package/dist/calcite/7FJOFJBG.js +0 -6
- package/dist/calcite/7KUN772K.js +0 -6
- package/dist/calcite/7LABYE24.js +0 -6
- package/dist/calcite/7NPWRWEK.js +0 -6
- package/dist/calcite/7PQTHMQD.js +0 -6
- package/dist/calcite/AEIISXUM.js +0 -6
- package/dist/calcite/AT2QAEKC.js +0 -6
- package/dist/calcite/BHLCJMB4.js +0 -6
- package/dist/calcite/BOMPAJVU.js +0 -6
- package/dist/calcite/BYURAML5.js +0 -6
- package/dist/calcite/CRBGPV2Y.js +0 -6
- package/dist/calcite/CY2QE4I2.js +0 -6
- package/dist/calcite/D26RI2OE.js +0 -6
- package/dist/calcite/DCAWR655.js +0 -6
- package/dist/calcite/DSYDJ57C.js +0 -6
- package/dist/calcite/E2PVAX5K.js +0 -6
- package/dist/calcite/EH7S4XKL.js +0 -6
- package/dist/calcite/FGCHRTFU.js +0 -6
- package/dist/calcite/FIJQNNLL.js +0 -6
- package/dist/calcite/FIVGOTUL.js +0 -6
- package/dist/calcite/FPZSDG22.js +0 -6
- package/dist/calcite/FQJWCM6B.js +0 -6
- package/dist/calcite/FRK56FXW.js +0 -6
- package/dist/calcite/FSORFWYW.js +0 -6
- package/dist/calcite/FWSMKN2T.js +0 -6
- package/dist/calcite/GGQW5H6B.js +0 -6
- package/dist/calcite/GHY53YEU.js +0 -6
- package/dist/calcite/GWGCBSIN.js +0 -6
- package/dist/calcite/HH5FL6GD.js +0 -6
- package/dist/calcite/HNNE5R46.js +0 -6
- package/dist/calcite/HRVN7KZA.js +0 -6
- package/dist/calcite/I3TEC7IS.js +0 -6
- package/dist/calcite/I5SQS3SN.js +0 -6
- package/dist/calcite/I74ZLJFG.js +0 -6
- package/dist/calcite/I7SBXLRM.js +0 -6
- package/dist/calcite/IEJMBPJU.js +0 -6
- package/dist/calcite/IK3QCAZN.js +0 -6
- package/dist/calcite/IKOOMPAX.js +0 -6
- package/dist/calcite/IPDH2LDG.js +0 -6
- package/dist/calcite/IUBUCDD6.js +0 -6
- package/dist/calcite/JCMCWR7J.js +0 -6
- package/dist/calcite/JHGP2C56.js +0 -6
- package/dist/calcite/JMNIVK3R.js +0 -6
- package/dist/calcite/KDCUMRGX.js +0 -6
- package/dist/calcite/KEFBUO23.js +0 -6
- package/dist/calcite/KHNXDA3R.js +0 -6
- package/dist/calcite/KLEV3IGL.js +0 -6
- package/dist/calcite/LIT6HBCV.js +0 -6
- package/dist/calcite/LKXA7MRG.js +0 -6
- package/dist/calcite/LMTPIXJD.js +0 -6
- package/dist/calcite/M3MFRN64.js +0 -6
- package/dist/calcite/M5MPF4VA.js +0 -6
- package/dist/calcite/MWGGE65N.js +0 -6
- package/dist/calcite/MXNAKF47.js +0 -6
- package/dist/calcite/NNKZWGGT.js +0 -6
- package/dist/calcite/NVQN43XK.js +0 -6
- package/dist/calcite/OHLVZUJX.js +0 -6
- package/dist/calcite/OHR7IMVY.js +0 -6
- package/dist/calcite/OJ5D52RG.js +0 -6
- package/dist/calcite/OJ5H4H4N.js +0 -6
- package/dist/calcite/OTT2SAVW.js +0 -6
- package/dist/calcite/OTYNRKUI.js +0 -6
- package/dist/calcite/PB4E6L52.js +0 -6
- package/dist/calcite/PO4EKM6H.js +0 -6
- package/dist/calcite/PPU55N5C.js +0 -6
- package/dist/calcite/PRGXXMHF.js +0 -6
- package/dist/calcite/PZ34QZ44.js +0 -6
- package/dist/calcite/PZ65523C.js +0 -6
- package/dist/calcite/PZGFP3J5.js +0 -6
- package/dist/calcite/Q2OAKI4L.js +0 -7
- package/dist/calcite/QIOSM7C2.js +0 -6
- package/dist/calcite/QS2B427U.js +0 -6
- package/dist/calcite/QVG465DZ.js +0 -6
- package/dist/calcite/RJU34JMH.js +0 -6
- package/dist/calcite/RL6ENWBS.js +0 -6
- package/dist/calcite/RWRTOY74.js +0 -6
- package/dist/calcite/S66ATD4V.js +0 -6
- package/dist/calcite/SHIZHTEP.js +0 -6
- package/dist/calcite/SY776R43.js +0 -6
- package/dist/calcite/T2M3KJPZ.js +0 -6
- package/dist/calcite/T7AHSVKE.js +0 -6
- package/dist/calcite/TBZM4XEW.js +0 -6
- package/dist/calcite/THTH4FYX.js +0 -6
- package/dist/calcite/TI4ZYY5Y.js +0 -6
- package/dist/calcite/TKE6VYZT.js +0 -6
- package/dist/calcite/TR3TLSTJ.js +0 -6
- package/dist/calcite/TSUCKRY4.js +0 -6
- package/dist/calcite/TWZNPBFB.js +0 -6
- package/dist/calcite/U5AZRHO7.js +0 -6
- package/dist/calcite/UE43U5QZ.js +0 -6
- package/dist/calcite/UHCCT74Q.js +0 -6
- package/dist/calcite/USP47AIY.js +0 -6
- package/dist/calcite/V3ZZW4SK.js +0 -6
- package/dist/calcite/WBOLRFTK.js +0 -6
- package/dist/calcite/WH3NETOG.js +0 -6
- package/dist/calcite/WHD4MFC3.js +0 -6
- package/dist/calcite/WJ6LOMWZ.js +0 -6
- package/dist/calcite/WKI76QXV.js +0 -6
- package/dist/calcite/WRQMW4QF.js +0 -24
- package/dist/calcite/X4RLJXN2.js +0 -6
- package/dist/calcite/XDGCDDNX.js +0 -8
- package/dist/calcite/XL6QBGWC.js +0 -6
- package/dist/calcite/XVBU5M6P.js +0 -6
- package/dist/calcite/Z4XCJ5VE.js +0 -6
- package/dist/calcite/ZQERQE2F.js +0 -6
- package/dist/calcite/ZYUUIPOD.js +0 -6
package/dist/chunks/utils4.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { g as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var N = { exports: {} }, q = {
|
|
1
|
+
import { g as Q } from "./_commonjsHelpers.js";
|
|
2
|
+
import { h as V, i as tt, j as nt } from "./global.js";
|
|
3
|
+
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
4
|
+
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
5
|
+
v3.0.0 */
|
|
6
|
+
var N = { exports: {} }, T = {
|
|
8
7
|
aliceblue: [240, 248, 255],
|
|
9
8
|
antiquewhite: [250, 235, 215],
|
|
10
9
|
aqua: [0, 255, 255],
|
|
@@ -153,12 +152,12 @@ var N = { exports: {} }, q = {
|
|
|
153
152
|
whitesmoke: [245, 245, 245],
|
|
154
153
|
yellow: [255, 255, 0],
|
|
155
154
|
yellowgreen: [154, 205, 50]
|
|
156
|
-
}, P = { exports: {} },
|
|
155
|
+
}, P = { exports: {} }, et = function(n) {
|
|
157
156
|
return !n || typeof n == "string" ? !1 : n instanceof Array || Array.isArray(n) || n.length >= 0 && (n.splice instanceof Function || Object.getOwnPropertyDescriptor(n, n.length - 1) && n.constructor.name !== "String");
|
|
158
|
-
},
|
|
157
|
+
}, rt = et, st = Array.prototype.concat, ot = Array.prototype.slice, _ = P.exports = function(n) {
|
|
159
158
|
for (var e = [], r = 0, s = n.length; r < s; r++) {
|
|
160
|
-
var
|
|
161
|
-
|
|
159
|
+
var o = n[r];
|
|
160
|
+
rt(o) ? e = st.call(e, ot.call(o)) : e.push(o);
|
|
162
161
|
}
|
|
163
162
|
return e;
|
|
164
163
|
};
|
|
@@ -167,97 +166,97 @@ _.wrap = function(t) {
|
|
|
167
166
|
return t(_(arguments));
|
|
168
167
|
};
|
|
169
168
|
};
|
|
170
|
-
var
|
|
171
|
-
for (var
|
|
172
|
-
|
|
173
|
-
var
|
|
169
|
+
var at = P.exports, M = T, F = at, q = Object.hasOwnProperty, W = /* @__PURE__ */ Object.create(null);
|
|
170
|
+
for (var I in M)
|
|
171
|
+
q.call(M, I) && (W[M[I]] = I);
|
|
172
|
+
var m = N.exports = {
|
|
174
173
|
to: {},
|
|
175
174
|
get: {}
|
|
176
175
|
};
|
|
177
|
-
|
|
176
|
+
m.get = function(t) {
|
|
178
177
|
var n = t.substring(0, 3).toLowerCase(), e, r;
|
|
179
178
|
switch (n) {
|
|
180
179
|
case "hsl":
|
|
181
|
-
e =
|
|
180
|
+
e = m.get.hsl(t), r = "hsl";
|
|
182
181
|
break;
|
|
183
182
|
case "hwb":
|
|
184
|
-
e =
|
|
183
|
+
e = m.get.hwb(t), r = "hwb";
|
|
185
184
|
break;
|
|
186
185
|
default:
|
|
187
|
-
e =
|
|
186
|
+
e = m.get.rgb(t), r = "rgb";
|
|
188
187
|
break;
|
|
189
188
|
}
|
|
190
189
|
return e ? { model: r, value: e } : null;
|
|
191
190
|
};
|
|
192
|
-
|
|
191
|
+
m.get.rgb = function(t) {
|
|
193
192
|
if (!t)
|
|
194
193
|
return null;
|
|
195
|
-
var n = /^#([a-f0-9]{3,4})$/i, e = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i, r = /^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/, s = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/,
|
|
194
|
+
var n = /^#([a-f0-9]{3,4})$/i, e = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i, r = /^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/, s = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/, o = /^(\w+)$/, a = [0, 0, 0, 1], i, l, h;
|
|
196
195
|
if (i = t.match(e)) {
|
|
197
196
|
for (h = i[2], i = i[1], l = 0; l < 3; l++) {
|
|
198
197
|
var b = l * 2;
|
|
199
|
-
|
|
198
|
+
a[l] = parseInt(i.slice(b, b + 2), 16);
|
|
200
199
|
}
|
|
201
|
-
h && (
|
|
200
|
+
h && (a[3] = parseInt(h, 16) / 255);
|
|
202
201
|
} else if (i = t.match(n)) {
|
|
203
202
|
for (i = i[1], h = i[3], l = 0; l < 3; l++)
|
|
204
|
-
|
|
205
|
-
h && (
|
|
203
|
+
a[l] = parseInt(i[l] + i[l], 16);
|
|
204
|
+
h && (a[3] = parseInt(h + h, 16) / 255);
|
|
206
205
|
} else if (i = t.match(r)) {
|
|
207
206
|
for (l = 0; l < 3; l++)
|
|
208
|
-
|
|
209
|
-
i[4] && (i[5] ?
|
|
207
|
+
a[l] = parseInt(i[l + 1], 0);
|
|
208
|
+
i[4] && (i[5] ? a[3] = parseFloat(i[4]) * 0.01 : a[3] = parseFloat(i[4]));
|
|
210
209
|
} else if (i = t.match(s)) {
|
|
211
210
|
for (l = 0; l < 3; l++)
|
|
212
|
-
|
|
213
|
-
i[4] && (i[5] ?
|
|
214
|
-
} else return (i = t.match(
|
|
211
|
+
a[l] = Math.round(parseFloat(i[l + 1]) * 2.55);
|
|
212
|
+
i[4] && (i[5] ? a[3] = parseFloat(i[4]) * 0.01 : a[3] = parseFloat(i[4]));
|
|
213
|
+
} else return (i = t.match(o)) ? i[1] === "transparent" ? [0, 0, 0, 0] : q.call(M, i[1]) ? (a = M[i[1]], a[3] = 1, a) : null : null;
|
|
215
214
|
for (l = 0; l < 3; l++)
|
|
216
|
-
|
|
217
|
-
return
|
|
215
|
+
a[l] = w(a[l], 0, 255);
|
|
216
|
+
return a[3] = w(a[3], 0, 1), a;
|
|
218
217
|
};
|
|
219
|
-
|
|
218
|
+
m.get.hsl = function(t) {
|
|
220
219
|
if (!t)
|
|
221
220
|
return null;
|
|
222
221
|
var n = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/, e = t.match(n);
|
|
223
222
|
if (e) {
|
|
224
|
-
var r = parseFloat(e[4]), s = (parseFloat(e[1]) % 360 + 360) % 360,
|
|
225
|
-
return [s,
|
|
223
|
+
var r = parseFloat(e[4]), s = (parseFloat(e[1]) % 360 + 360) % 360, o = w(parseFloat(e[2]), 0, 100), a = w(parseFloat(e[3]), 0, 100), i = w(isNaN(r) ? 1 : r, 0, 1);
|
|
224
|
+
return [s, o, a, i];
|
|
226
225
|
}
|
|
227
226
|
return null;
|
|
228
227
|
};
|
|
229
|
-
|
|
228
|
+
m.get.hwb = function(t) {
|
|
230
229
|
if (!t)
|
|
231
230
|
return null;
|
|
232
231
|
var n = /^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/, e = t.match(n);
|
|
233
232
|
if (e) {
|
|
234
|
-
var r = parseFloat(e[4]), s = (parseFloat(e[1]) % 360 + 360) % 360,
|
|
235
|
-
return [s,
|
|
233
|
+
var r = parseFloat(e[4]), s = (parseFloat(e[1]) % 360 + 360) % 360, o = w(parseFloat(e[2]), 0, 100), a = w(parseFloat(e[3]), 0, 100), i = w(isNaN(r) ? 1 : r, 0, 1);
|
|
234
|
+
return [s, o, a, i];
|
|
236
235
|
}
|
|
237
236
|
return null;
|
|
238
237
|
};
|
|
239
|
-
|
|
238
|
+
m.to.hex = function() {
|
|
240
239
|
var t = F(arguments);
|
|
241
240
|
return "#" + C(t[0]) + C(t[1]) + C(t[2]) + (t[3] < 1 ? C(Math.round(t[3] * 255)) : "");
|
|
242
241
|
};
|
|
243
|
-
|
|
242
|
+
m.to.rgb = function() {
|
|
244
243
|
var t = F(arguments);
|
|
245
244
|
return t.length < 4 || t[3] === 1 ? "rgb(" + Math.round(t[0]) + ", " + Math.round(t[1]) + ", " + Math.round(t[2]) + ")" : "rgba(" + Math.round(t[0]) + ", " + Math.round(t[1]) + ", " + Math.round(t[2]) + ", " + t[3] + ")";
|
|
246
245
|
};
|
|
247
|
-
|
|
246
|
+
m.to.rgb.percent = function() {
|
|
248
247
|
var t = F(arguments), n = Math.round(t[0] / 255 * 100), e = Math.round(t[1] / 255 * 100), r = Math.round(t[2] / 255 * 100);
|
|
249
248
|
return t.length < 4 || t[3] === 1 ? "rgb(" + n + "%, " + e + "%, " + r + "%)" : "rgba(" + n + "%, " + e + "%, " + r + "%, " + t[3] + ")";
|
|
250
249
|
};
|
|
251
|
-
|
|
250
|
+
m.to.hsl = function() {
|
|
252
251
|
var t = F(arguments);
|
|
253
252
|
return t.length < 4 || t[3] === 1 ? "hsl(" + t[0] + ", " + t[1] + "%, " + t[2] + "%)" : "hsla(" + t[0] + ", " + t[1] + "%, " + t[2] + "%, " + t[3] + ")";
|
|
254
253
|
};
|
|
255
|
-
|
|
254
|
+
m.to.hwb = function() {
|
|
256
255
|
var t = F(arguments), n = "";
|
|
257
256
|
return t.length >= 4 && t[3] !== 1 && (n = ", " + t[3]), "hwb(" + t[0] + ", " + t[1] + "%, " + t[2] + "%" + n + ")";
|
|
258
257
|
};
|
|
259
|
-
|
|
260
|
-
return
|
|
258
|
+
m.to.keyword = function(t) {
|
|
259
|
+
return W[t.slice(0, 3)];
|
|
261
260
|
};
|
|
262
261
|
function w(t, n, e) {
|
|
263
262
|
return Math.min(Math.max(n, t), e);
|
|
@@ -266,10 +265,10 @@ function C(t) {
|
|
|
266
265
|
var n = Math.round(t).toString(16).toUpperCase();
|
|
267
266
|
return n.length < 2 ? "0" + n : n;
|
|
268
267
|
}
|
|
269
|
-
var
|
|
270
|
-
const A =
|
|
268
|
+
var it = N.exports;
|
|
269
|
+
const A = T, D = {};
|
|
271
270
|
for (const t of Object.keys(A))
|
|
272
|
-
|
|
271
|
+
D[A[t]] = t;
|
|
273
272
|
const c = {
|
|
274
273
|
rgb: { channels: 3, labels: "rgb" },
|
|
275
274
|
hsl: { channels: 3, labels: "hsl" },
|
|
@@ -287,7 +286,7 @@ const c = {
|
|
|
287
286
|
apple: { channels: 3, labels: ["r16", "g16", "b16"] },
|
|
288
287
|
gray: { channels: 1, labels: ["gray"] }
|
|
289
288
|
};
|
|
290
|
-
var
|
|
289
|
+
var X = c;
|
|
291
290
|
for (const t of Object.keys(c)) {
|
|
292
291
|
if (!("channels" in c[t]))
|
|
293
292
|
throw new Error("missing channels property: " + t);
|
|
@@ -299,44 +298,44 @@ for (const t of Object.keys(c)) {
|
|
|
299
298
|
delete c[t].channels, delete c[t].labels, Object.defineProperty(c[t], "channels", { value: n }), Object.defineProperty(c[t], "labels", { value: e });
|
|
300
299
|
}
|
|
301
300
|
c.rgb.hsl = function(t) {
|
|
302
|
-
const n = t[0] / 255, e = t[1] / 255, r = t[2] / 255, s = Math.min(n, e, r),
|
|
301
|
+
const n = t[0] / 255, e = t[1] / 255, r = t[2] / 255, s = Math.min(n, e, r), o = Math.max(n, e, r), a = o - s;
|
|
303
302
|
let i, l;
|
|
304
|
-
|
|
305
|
-
const h = (s +
|
|
306
|
-
return
|
|
303
|
+
o === s ? i = 0 : n === o ? i = (e - r) / a : e === o ? i = 2 + (r - n) / a : r === o && (i = 4 + (n - e) / a), i = Math.min(i * 60, 360), i < 0 && (i += 360);
|
|
304
|
+
const h = (s + o) / 2;
|
|
305
|
+
return o === s ? l = 0 : h <= 0.5 ? l = a / (o + s) : l = a / (2 - o - s), [i, l * 100, h * 100];
|
|
307
306
|
};
|
|
308
307
|
c.rgb.hsv = function(t) {
|
|
309
|
-
let n, e, r, s,
|
|
310
|
-
const
|
|
311
|
-
return (h -
|
|
308
|
+
let n, e, r, s, o;
|
|
309
|
+
const a = t[0] / 255, i = t[1] / 255, l = t[2] / 255, h = Math.max(a, i, l), b = h - Math.min(a, i, l), y = function(Z) {
|
|
310
|
+
return (h - Z) / 6 / b + 1 / 2;
|
|
312
311
|
};
|
|
313
|
-
return b === 0 ? (s = 0,
|
|
312
|
+
return b === 0 ? (s = 0, o = 0) : (o = b / h, n = y(a), e = y(i), r = y(l), a === h ? s = r - e : i === h ? s = 1 / 3 + n - r : l === h && (s = 2 / 3 + e - n), s < 0 ? s += 1 : s > 1 && (s -= 1)), [
|
|
314
313
|
s * 360,
|
|
315
|
-
|
|
314
|
+
o * 100,
|
|
316
315
|
h * 100
|
|
317
316
|
];
|
|
318
317
|
};
|
|
319
318
|
c.rgb.hwb = function(t) {
|
|
320
319
|
const n = t[0], e = t[1];
|
|
321
320
|
let r = t[2];
|
|
322
|
-
const s = c.rgb.hsl(t)[0],
|
|
323
|
-
return r = 1 - 1 / 255 * Math.max(n, Math.max(e, r)), [s,
|
|
321
|
+
const s = c.rgb.hsl(t)[0], o = 1 / 255 * Math.min(n, Math.min(e, r));
|
|
322
|
+
return r = 1 - 1 / 255 * Math.max(n, Math.max(e, r)), [s, o * 100, r * 100];
|
|
324
323
|
};
|
|
325
324
|
c.rgb.cmyk = function(t) {
|
|
326
|
-
const n = t[0] / 255, e = t[1] / 255, r = t[2] / 255, s = Math.min(1 - n, 1 - e, 1 - r),
|
|
327
|
-
return [
|
|
325
|
+
const n = t[0] / 255, e = t[1] / 255, r = t[2] / 255, s = Math.min(1 - n, 1 - e, 1 - r), o = (1 - n - s) / (1 - s) || 0, a = (1 - e - s) / (1 - s) || 0, i = (1 - r - s) / (1 - s) || 0;
|
|
326
|
+
return [o * 100, a * 100, i * 100, s * 100];
|
|
328
327
|
};
|
|
329
|
-
function
|
|
328
|
+
function lt(t, n) {
|
|
330
329
|
return (t[0] - n[0]) ** 2 + (t[1] - n[1]) ** 2 + (t[2] - n[2]) ** 2;
|
|
331
330
|
}
|
|
332
331
|
c.rgb.keyword = function(t) {
|
|
333
|
-
const n =
|
|
332
|
+
const n = D[t];
|
|
334
333
|
if (n)
|
|
335
334
|
return n;
|
|
336
335
|
let e = 1 / 0, r;
|
|
337
336
|
for (const s of Object.keys(A)) {
|
|
338
|
-
const
|
|
339
|
-
|
|
337
|
+
const o = A[s], a = lt(t, o);
|
|
338
|
+
a < e && (e = a, r = s);
|
|
340
339
|
}
|
|
341
340
|
return r;
|
|
342
341
|
};
|
|
@@ -346,135 +345,135 @@ c.keyword.rgb = function(t) {
|
|
|
346
345
|
c.rgb.xyz = function(t) {
|
|
347
346
|
let n = t[0] / 255, e = t[1] / 255, r = t[2] / 255;
|
|
348
347
|
n = n > 0.04045 ? ((n + 0.055) / 1.055) ** 2.4 : n / 12.92, e = e > 0.04045 ? ((e + 0.055) / 1.055) ** 2.4 : e / 12.92, r = r > 0.04045 ? ((r + 0.055) / 1.055) ** 2.4 : r / 12.92;
|
|
349
|
-
const s = n * 0.4124 + e * 0.3576 + r * 0.1805,
|
|
350
|
-
return [s * 100,
|
|
348
|
+
const s = n * 0.4124 + e * 0.3576 + r * 0.1805, o = n * 0.2126 + e * 0.7152 + r * 0.0722, a = n * 0.0193 + e * 0.1192 + r * 0.9505;
|
|
349
|
+
return [s * 100, o * 100, a * 100];
|
|
351
350
|
};
|
|
352
351
|
c.rgb.lab = function(t) {
|
|
353
352
|
const n = c.rgb.xyz(t);
|
|
354
353
|
let e = n[0], r = n[1], s = n[2];
|
|
355
354
|
e /= 95.047, r /= 100, s /= 108.883, e = e > 8856e-6 ? e ** (1 / 3) : 7.787 * e + 16 / 116, r = r > 8856e-6 ? r ** (1 / 3) : 7.787 * r + 16 / 116, s = s > 8856e-6 ? s ** (1 / 3) : 7.787 * s + 16 / 116;
|
|
356
|
-
const
|
|
357
|
-
return [
|
|
355
|
+
const o = 116 * r - 16, a = 500 * (e - r), i = 200 * (r - s);
|
|
356
|
+
return [o, a, i];
|
|
358
357
|
};
|
|
359
358
|
c.hsl.rgb = function(t) {
|
|
360
359
|
const n = t[0] / 360, e = t[1] / 100, r = t[2] / 100;
|
|
361
|
-
let s,
|
|
360
|
+
let s, o, a;
|
|
362
361
|
if (e === 0)
|
|
363
|
-
return
|
|
362
|
+
return a = r * 255, [a, a, a];
|
|
364
363
|
r < 0.5 ? s = r * (1 + e) : s = r + e - r * e;
|
|
365
364
|
const i = 2 * r - s, l = [0, 0, 0];
|
|
366
365
|
for (let h = 0; h < 3; h++)
|
|
367
|
-
|
|
366
|
+
o = n + 1 / 3 * -(h - 1), o < 0 && o++, o > 1 && o--, 6 * o < 1 ? a = i + (s - i) * 6 * o : 2 * o < 1 ? a = s : 3 * o < 2 ? a = i + (s - i) * (2 / 3 - o) * 6 : a = i, l[h] = a * 255;
|
|
368
367
|
return l;
|
|
369
368
|
};
|
|
370
369
|
c.hsl.hsv = function(t) {
|
|
371
370
|
const n = t[0];
|
|
372
371
|
let e = t[1] / 100, r = t[2] / 100, s = e;
|
|
373
|
-
const
|
|
374
|
-
r *= 2, e *= r <= 1 ? r : 2 - r, s *=
|
|
375
|
-
const
|
|
376
|
-
return [n, i * 100,
|
|
372
|
+
const o = Math.max(r, 0.01);
|
|
373
|
+
r *= 2, e *= r <= 1 ? r : 2 - r, s *= o <= 1 ? o : 2 - o;
|
|
374
|
+
const a = (r + e) / 2, i = r === 0 ? 2 * s / (o + s) : 2 * e / (r + e);
|
|
375
|
+
return [n, i * 100, a * 100];
|
|
377
376
|
};
|
|
378
377
|
c.hsv.rgb = function(t) {
|
|
379
378
|
const n = t[0] / 60, e = t[1] / 100;
|
|
380
379
|
let r = t[2] / 100;
|
|
381
|
-
const s = Math.floor(n) % 6,
|
|
380
|
+
const s = Math.floor(n) % 6, o = n - Math.floor(n), a = 255 * r * (1 - e), i = 255 * r * (1 - e * o), l = 255 * r * (1 - e * (1 - o));
|
|
382
381
|
switch (r *= 255, s) {
|
|
383
382
|
case 0:
|
|
384
|
-
return [r, l,
|
|
383
|
+
return [r, l, a];
|
|
385
384
|
case 1:
|
|
386
|
-
return [i, r,
|
|
385
|
+
return [i, r, a];
|
|
387
386
|
case 2:
|
|
388
|
-
return [
|
|
387
|
+
return [a, r, l];
|
|
389
388
|
case 3:
|
|
390
|
-
return [
|
|
389
|
+
return [a, i, r];
|
|
391
390
|
case 4:
|
|
392
|
-
return [l,
|
|
391
|
+
return [l, a, r];
|
|
393
392
|
case 5:
|
|
394
|
-
return [r,
|
|
393
|
+
return [r, a, i];
|
|
395
394
|
}
|
|
396
395
|
};
|
|
397
396
|
c.hsv.hsl = function(t) {
|
|
398
397
|
const n = t[0], e = t[1] / 100, r = t[2] / 100, s = Math.max(r, 0.01);
|
|
399
|
-
let
|
|
400
|
-
|
|
398
|
+
let o, a;
|
|
399
|
+
a = (2 - e) * r;
|
|
401
400
|
const i = (2 - e) * s;
|
|
402
|
-
return
|
|
401
|
+
return o = e * s, o /= i <= 1 ? i : 2 - i, o = o || 0, a /= 2, [n, o * 100, a * 100];
|
|
403
402
|
};
|
|
404
403
|
c.hwb.rgb = function(t) {
|
|
405
404
|
const n = t[0] / 360;
|
|
406
405
|
let e = t[1] / 100, r = t[2] / 100;
|
|
407
406
|
const s = e + r;
|
|
408
|
-
let
|
|
407
|
+
let o;
|
|
409
408
|
s > 1 && (e /= s, r /= s);
|
|
410
|
-
const
|
|
411
|
-
|
|
412
|
-
const l = e +
|
|
413
|
-
let h, b,
|
|
414
|
-
switch (
|
|
409
|
+
const a = Math.floor(6 * n), i = 1 - r;
|
|
410
|
+
o = 6 * n - a, a & 1 && (o = 1 - o);
|
|
411
|
+
const l = e + o * (i - e);
|
|
412
|
+
let h, b, y;
|
|
413
|
+
switch (a) {
|
|
415
414
|
default:
|
|
416
415
|
case 6:
|
|
417
416
|
case 0:
|
|
418
|
-
h = i, b = l,
|
|
417
|
+
h = i, b = l, y = e;
|
|
419
418
|
break;
|
|
420
419
|
case 1:
|
|
421
|
-
h = l, b = i,
|
|
420
|
+
h = l, b = i, y = e;
|
|
422
421
|
break;
|
|
423
422
|
case 2:
|
|
424
|
-
h = e, b = i,
|
|
423
|
+
h = e, b = i, y = l;
|
|
425
424
|
break;
|
|
426
425
|
case 3:
|
|
427
|
-
h = e, b = l,
|
|
426
|
+
h = e, b = l, y = i;
|
|
428
427
|
break;
|
|
429
428
|
case 4:
|
|
430
|
-
h = l, b = e,
|
|
429
|
+
h = l, b = e, y = i;
|
|
431
430
|
break;
|
|
432
431
|
case 5:
|
|
433
|
-
h = i, b = e,
|
|
432
|
+
h = i, b = e, y = l;
|
|
434
433
|
break;
|
|
435
434
|
}
|
|
436
|
-
return [h * 255, b * 255,
|
|
435
|
+
return [h * 255, b * 255, y * 255];
|
|
437
436
|
};
|
|
438
437
|
c.cmyk.rgb = function(t) {
|
|
439
|
-
const n = t[0] / 100, e = t[1] / 100, r = t[2] / 100, s = t[3] / 100,
|
|
440
|
-
return [
|
|
438
|
+
const n = t[0] / 100, e = t[1] / 100, r = t[2] / 100, s = t[3] / 100, o = 1 - Math.min(1, n * (1 - s) + s), a = 1 - Math.min(1, e * (1 - s) + s), i = 1 - Math.min(1, r * (1 - s) + s);
|
|
439
|
+
return [o * 255, a * 255, i * 255];
|
|
441
440
|
};
|
|
442
441
|
c.xyz.rgb = function(t) {
|
|
443
442
|
const n = t[0] / 100, e = t[1] / 100, r = t[2] / 100;
|
|
444
|
-
let s,
|
|
445
|
-
return s = n * 3.2406 + e * -1.5372 + r * -0.4986,
|
|
443
|
+
let s, o, a;
|
|
444
|
+
return s = n * 3.2406 + e * -1.5372 + r * -0.4986, o = n * -0.9689 + e * 1.8758 + r * 0.0415, a = n * 0.0557 + e * -0.204 + r * 1.057, s = s > 31308e-7 ? 1.055 * s ** (1 / 2.4) - 0.055 : s * 12.92, o = o > 31308e-7 ? 1.055 * o ** (1 / 2.4) - 0.055 : o * 12.92, a = a > 31308e-7 ? 1.055 * a ** (1 / 2.4) - 0.055 : a * 12.92, s = Math.min(Math.max(0, s), 1), o = Math.min(Math.max(0, o), 1), a = Math.min(Math.max(0, a), 1), [s * 255, o * 255, a * 255];
|
|
446
445
|
};
|
|
447
446
|
c.xyz.lab = function(t) {
|
|
448
447
|
let n = t[0], e = t[1], r = t[2];
|
|
449
448
|
n /= 95.047, e /= 100, r /= 108.883, n = n > 8856e-6 ? n ** (1 / 3) : 7.787 * n + 16 / 116, e = e > 8856e-6 ? e ** (1 / 3) : 7.787 * e + 16 / 116, r = r > 8856e-6 ? r ** (1 / 3) : 7.787 * r + 16 / 116;
|
|
450
|
-
const s = 116 * e - 16,
|
|
451
|
-
return [s,
|
|
449
|
+
const s = 116 * e - 16, o = 500 * (n - e), a = 200 * (e - r);
|
|
450
|
+
return [s, o, a];
|
|
452
451
|
};
|
|
453
452
|
c.lab.xyz = function(t) {
|
|
454
453
|
const n = t[0], e = t[1], r = t[2];
|
|
455
|
-
let s,
|
|
456
|
-
|
|
457
|
-
const i =
|
|
458
|
-
return
|
|
454
|
+
let s, o, a;
|
|
455
|
+
o = (n + 16) / 116, s = e / 500 + o, a = o - r / 200;
|
|
456
|
+
const i = o ** 3, l = s ** 3, h = a ** 3;
|
|
457
|
+
return o = i > 8856e-6 ? i : (o - 16 / 116) / 7.787, s = l > 8856e-6 ? l : (s - 16 / 116) / 7.787, a = h > 8856e-6 ? h : (a - 16 / 116) / 7.787, s *= 95.047, o *= 100, a *= 108.883, [s, o, a];
|
|
459
458
|
};
|
|
460
459
|
c.lab.lch = function(t) {
|
|
461
460
|
const n = t[0], e = t[1], r = t[2];
|
|
462
461
|
let s;
|
|
463
462
|
s = Math.atan2(r, e) * 360 / 2 / Math.PI, s < 0 && (s += 360);
|
|
464
|
-
const
|
|
465
|
-
return [n,
|
|
463
|
+
const a = Math.sqrt(e * e + r * r);
|
|
464
|
+
return [n, a, s];
|
|
466
465
|
};
|
|
467
466
|
c.lch.lab = function(t) {
|
|
468
|
-
const n = t[0], e = t[1], s = t[2] / 360 * 2 * Math.PI,
|
|
469
|
-
return [n,
|
|
467
|
+
const n = t[0], e = t[1], s = t[2] / 360 * 2 * Math.PI, o = e * Math.cos(s), a = e * Math.sin(s);
|
|
468
|
+
return [n, o, a];
|
|
470
469
|
};
|
|
471
470
|
c.rgb.ansi16 = function(t, n = null) {
|
|
472
471
|
const [e, r, s] = t;
|
|
473
|
-
let
|
|
474
|
-
if (
|
|
472
|
+
let o = n === null ? c.rgb.hsv(t)[2] : n;
|
|
473
|
+
if (o = Math.round(o / 50), o === 0)
|
|
475
474
|
return 30;
|
|
476
|
-
let
|
|
477
|
-
return
|
|
475
|
+
let a = 30 + (Math.round(s / 255) << 2 | Math.round(r / 255) << 1 | Math.round(e / 255));
|
|
476
|
+
return o === 2 && (a += 60), a;
|
|
478
477
|
};
|
|
479
478
|
c.hsv.ansi16 = function(t) {
|
|
480
479
|
return c.rgb.ansi16(c.hsv.rgb(t), t[2]);
|
|
@@ -487,13 +486,13 @@ c.ansi16.rgb = function(t) {
|
|
|
487
486
|
let n = t % 10;
|
|
488
487
|
if (n === 0 || n === 7)
|
|
489
488
|
return t > 50 && (n += 3.5), n = n / 10.5 * 255, [n, n, n];
|
|
490
|
-
const e = (~~(t > 50) + 1) * 0.5, r = (n & 1) * e * 255, s = (n >> 1 & 1) * e * 255,
|
|
491
|
-
return [r, s,
|
|
489
|
+
const e = (~~(t > 50) + 1) * 0.5, r = (n & 1) * e * 255, s = (n >> 1 & 1) * e * 255, o = (n >> 2 & 1) * e * 255;
|
|
490
|
+
return [r, s, o];
|
|
492
491
|
};
|
|
493
492
|
c.ansi256.rgb = function(t) {
|
|
494
493
|
if (t >= 232) {
|
|
495
|
-
const
|
|
496
|
-
return [
|
|
494
|
+
const o = (t - 232) * 10 + 8;
|
|
495
|
+
return [o, o, o];
|
|
497
496
|
}
|
|
498
497
|
t -= 16;
|
|
499
498
|
let n;
|
|
@@ -510,13 +509,13 @@ c.hex.rgb = function(t) {
|
|
|
510
509
|
return [0, 0, 0];
|
|
511
510
|
let e = n[0];
|
|
512
511
|
n[0].length === 3 && (e = e.split("").map((i) => i + i).join(""));
|
|
513
|
-
const r = parseInt(e, 16), s = r >> 16 & 255,
|
|
514
|
-
return [s,
|
|
512
|
+
const r = parseInt(e, 16), s = r >> 16 & 255, o = r >> 8 & 255, a = r & 255;
|
|
513
|
+
return [s, o, a];
|
|
515
514
|
};
|
|
516
515
|
c.rgb.hcg = function(t) {
|
|
517
|
-
const n = t[0] / 255, e = t[1] / 255, r = t[2] / 255, s = Math.max(Math.max(n, e), r),
|
|
516
|
+
const n = t[0] / 255, e = t[1] / 255, r = t[2] / 255, s = Math.max(Math.max(n, e), r), o = Math.min(Math.min(n, e), r), a = s - o;
|
|
518
517
|
let i, l;
|
|
519
|
-
return
|
|
518
|
+
return a < 1 ? i = o / (1 - a) : i = 0, a <= 0 ? l = 0 : s === n ? l = (e - r) / a % 6 : s === e ? l = 2 + (r - n) / a : l = 4 + (n - e) / a, l /= 6, l %= 1, [l * 360, a * 100, i * 100];
|
|
520
519
|
};
|
|
521
520
|
c.hsl.hcg = function(t) {
|
|
522
521
|
const n = t[1] / 100, e = t[2] / 100, r = e < 0.5 ? 2 * n * e : 2 * n * (1 - e);
|
|
@@ -532,23 +531,23 @@ c.hcg.rgb = function(t) {
|
|
|
532
531
|
const n = t[0] / 360, e = t[1] / 100, r = t[2] / 100;
|
|
533
532
|
if (e === 0)
|
|
534
533
|
return [r * 255, r * 255, r * 255];
|
|
535
|
-
const s = [0, 0, 0],
|
|
534
|
+
const s = [0, 0, 0], o = n % 1 * 6, a = o % 1, i = 1 - a;
|
|
536
535
|
let l = 0;
|
|
537
|
-
switch (Math.floor(
|
|
536
|
+
switch (Math.floor(o)) {
|
|
538
537
|
case 0:
|
|
539
|
-
s[0] = 1, s[1] =
|
|
538
|
+
s[0] = 1, s[1] = a, s[2] = 0;
|
|
540
539
|
break;
|
|
541
540
|
case 1:
|
|
542
541
|
s[0] = i, s[1] = 1, s[2] = 0;
|
|
543
542
|
break;
|
|
544
543
|
case 2:
|
|
545
|
-
s[0] = 0, s[1] = 1, s[2] =
|
|
544
|
+
s[0] = 0, s[1] = 1, s[2] = a;
|
|
546
545
|
break;
|
|
547
546
|
case 3:
|
|
548
547
|
s[0] = 0, s[1] = i, s[2] = 1;
|
|
549
548
|
break;
|
|
550
549
|
case 4:
|
|
551
|
-
s[0] =
|
|
550
|
+
s[0] = a, s[1] = 0, s[2] = 1;
|
|
552
551
|
break;
|
|
553
552
|
default:
|
|
554
553
|
s[0] = 1, s[1] = 0, s[2] = i;
|
|
@@ -575,8 +574,8 @@ c.hcg.hwb = function(t) {
|
|
|
575
574
|
};
|
|
576
575
|
c.hwb.hcg = function(t) {
|
|
577
576
|
const n = t[1] / 100, r = 1 - t[2] / 100, s = r - n;
|
|
578
|
-
let
|
|
579
|
-
return s < 1 && (
|
|
577
|
+
let o = 0;
|
|
578
|
+
return s < 1 && (o = (r - s) / (1 - s)), [t[0], s * 100, o * 100];
|
|
580
579
|
};
|
|
581
580
|
c.apple.rgb = function(t) {
|
|
582
581
|
return [t[0] / 65535 * 255, t[1] / 65535 * 255, t[2] / 65535 * 255];
|
|
@@ -607,8 +606,8 @@ c.gray.hex = function(t) {
|
|
|
607
606
|
c.rgb.gray = function(t) {
|
|
608
607
|
return [(t[0] + t[1] + t[2]) / 3 / 255 * 100];
|
|
609
608
|
};
|
|
610
|
-
const z =
|
|
611
|
-
function
|
|
609
|
+
const z = X;
|
|
610
|
+
function ct() {
|
|
612
611
|
const t = {}, n = Object.keys(z);
|
|
613
612
|
for (let e = n.length, r = 0; r < e; r++)
|
|
614
613
|
t[n[r]] = {
|
|
@@ -619,46 +618,46 @@ function ot() {
|
|
|
619
618
|
};
|
|
620
619
|
return t;
|
|
621
620
|
}
|
|
622
|
-
function
|
|
623
|
-
const n =
|
|
621
|
+
function ht(t) {
|
|
622
|
+
const n = ct(), e = [t];
|
|
624
623
|
for (n[t].distance = 0; e.length; ) {
|
|
625
624
|
const r = e.pop(), s = Object.keys(z[r]);
|
|
626
|
-
for (let
|
|
627
|
-
const i = s[
|
|
625
|
+
for (let o = s.length, a = 0; a < o; a++) {
|
|
626
|
+
const i = s[a], l = n[i];
|
|
628
627
|
l.distance === -1 && (l.distance = n[r].distance + 1, l.parent = r, e.unshift(i));
|
|
629
628
|
}
|
|
630
629
|
}
|
|
631
630
|
return n;
|
|
632
631
|
}
|
|
633
|
-
function
|
|
632
|
+
function ut(t, n) {
|
|
634
633
|
return function(e) {
|
|
635
634
|
return n(t(e));
|
|
636
635
|
};
|
|
637
636
|
}
|
|
638
|
-
function
|
|
637
|
+
function ft(t, n) {
|
|
639
638
|
const e = [n[t].parent, t];
|
|
640
639
|
let r = z[n[t].parent][t], s = n[t].parent;
|
|
641
640
|
for (; n[s].parent; )
|
|
642
|
-
e.unshift(n[s].parent), r =
|
|
641
|
+
e.unshift(n[s].parent), r = ut(z[n[s].parent][s], r), s = n[s].parent;
|
|
643
642
|
return r.conversion = e, r;
|
|
644
643
|
}
|
|
645
|
-
var
|
|
646
|
-
const n =
|
|
647
|
-
for (let s = r.length,
|
|
648
|
-
const
|
|
649
|
-
n[
|
|
644
|
+
var dt = function(t) {
|
|
645
|
+
const n = ht(t), e = {}, r = Object.keys(n);
|
|
646
|
+
for (let s = r.length, o = 0; o < s; o++) {
|
|
647
|
+
const a = r[o];
|
|
648
|
+
n[a].parent !== null && (e[a] = ft(a, n));
|
|
650
649
|
}
|
|
651
650
|
return e;
|
|
652
651
|
};
|
|
653
|
-
const E =
|
|
654
|
-
function
|
|
652
|
+
const E = X, gt = dt, x = {}, pt = Object.keys(E);
|
|
653
|
+
function bt(t) {
|
|
655
654
|
const n = function(...e) {
|
|
656
655
|
const r = e[0];
|
|
657
656
|
return r == null ? r : (r.length > 1 && (e = r), t(e));
|
|
658
657
|
};
|
|
659
658
|
return "conversion" in t && (n.conversion = t.conversion), n;
|
|
660
659
|
}
|
|
661
|
-
function
|
|
660
|
+
function vt(t) {
|
|
662
661
|
const n = function(...e) {
|
|
663
662
|
const r = e[0];
|
|
664
663
|
if (r == null)
|
|
@@ -666,36 +665,36 @@ function dt(t) {
|
|
|
666
665
|
r.length > 1 && (e = r);
|
|
667
666
|
const s = t(e);
|
|
668
667
|
if (typeof s == "object")
|
|
669
|
-
for (let
|
|
670
|
-
s[
|
|
668
|
+
for (let o = s.length, a = 0; a < o; a++)
|
|
669
|
+
s[a] = Math.round(s[a]);
|
|
671
670
|
return s;
|
|
672
671
|
};
|
|
673
672
|
return "conversion" in t && (n.conversion = t.conversion), n;
|
|
674
673
|
}
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
const n =
|
|
674
|
+
pt.forEach((t) => {
|
|
675
|
+
x[t] = {}, Object.defineProperty(x[t], "channels", { value: E[t].channels }), Object.defineProperty(x[t], "labels", { value: E[t].labels });
|
|
676
|
+
const n = gt(t);
|
|
678
677
|
Object.keys(n).forEach((r) => {
|
|
679
678
|
const s = n[r];
|
|
680
|
-
|
|
679
|
+
x[t][r] = vt(s), x[t][r].raw = bt(s);
|
|
681
680
|
});
|
|
682
681
|
});
|
|
683
|
-
var
|
|
684
|
-
const
|
|
682
|
+
var mt = x;
|
|
683
|
+
const k = it, v = mt, U = [
|
|
685
684
|
// To be honest, I don't really feel like keyword belongs in color convert, but eh.
|
|
686
685
|
"keyword",
|
|
687
686
|
// Gray conflicts with some method names, and has its own method defined.
|
|
688
687
|
"gray",
|
|
689
688
|
// Shouldn't really be in color-convert either...
|
|
690
689
|
"hex"
|
|
691
|
-
],
|
|
690
|
+
], O = {};
|
|
692
691
|
for (const t of Object.keys(v))
|
|
693
|
-
|
|
692
|
+
O[[...v[t].labels].sort().join("")] = t;
|
|
694
693
|
const $ = {};
|
|
695
694
|
function p(t, n) {
|
|
696
695
|
if (!(this instanceof p))
|
|
697
696
|
return new p(t, n);
|
|
698
|
-
if (n && n in
|
|
697
|
+
if (n && n in U && (n = null), n && !(n in v))
|
|
699
698
|
throw new Error("Unknown model: " + n);
|
|
700
699
|
let e, r;
|
|
701
700
|
if (t == null)
|
|
@@ -703,14 +702,14 @@ function p(t, n) {
|
|
|
703
702
|
else if (t instanceof p)
|
|
704
703
|
this.model = t.model, this.color = [...t.color], this.valpha = t.valpha;
|
|
705
704
|
else if (typeof t == "string") {
|
|
706
|
-
const s =
|
|
705
|
+
const s = k.get(t);
|
|
707
706
|
if (s === null)
|
|
708
707
|
throw new Error("Unable to parse color from string: " + t);
|
|
709
708
|
this.model = s.model, r = v[this.model].channels, this.color = s.value.slice(0, r), this.valpha = typeof s.value[r] == "number" ? s.value[r] : 1;
|
|
710
709
|
} else if (t.length > 0) {
|
|
711
710
|
this.model = n || "rgb", r = v[this.model].channels;
|
|
712
711
|
const s = Array.prototype.slice.call(t, 0, r);
|
|
713
|
-
this.color =
|
|
712
|
+
this.color = L(s, r), this.valpha = typeof t[r] == "number" ? t[r] : 1;
|
|
714
713
|
} else if (typeof t == "number")
|
|
715
714
|
this.model = "rgb", this.color = [
|
|
716
715
|
t >> 16 & 255,
|
|
@@ -721,14 +720,14 @@ function p(t, n) {
|
|
|
721
720
|
this.valpha = 1;
|
|
722
721
|
const s = Object.keys(t);
|
|
723
722
|
"alpha" in t && (s.splice(s.indexOf("alpha"), 1), this.valpha = typeof t.alpha == "number" ? t.alpha : 0);
|
|
724
|
-
const
|
|
725
|
-
if (!(
|
|
723
|
+
const o = s.sort().join("");
|
|
724
|
+
if (!(o in O))
|
|
726
725
|
throw new Error("Unable to parse color from object: " + JSON.stringify(t));
|
|
727
|
-
this.model =
|
|
728
|
-
const { labels:
|
|
729
|
-
for (e = 0; e <
|
|
730
|
-
i.push(t[
|
|
731
|
-
this.color =
|
|
726
|
+
this.model = O[o];
|
|
727
|
+
const { labels: a } = v[this.model], i = [];
|
|
728
|
+
for (e = 0; e < a.length; e++)
|
|
729
|
+
i.push(t[a[e]]);
|
|
730
|
+
this.color = L(i);
|
|
732
731
|
}
|
|
733
732
|
if ($[this.model])
|
|
734
733
|
for (r = v[this.model].channels, e = 0; e < r; e++) {
|
|
@@ -745,14 +744,14 @@ p.prototype = {
|
|
|
745
744
|
return this[this.model]();
|
|
746
745
|
},
|
|
747
746
|
string(t) {
|
|
748
|
-
let n = this.model in
|
|
747
|
+
let n = this.model in k.to ? this : this.rgb();
|
|
749
748
|
n = n.round(typeof t == "number" ? t : 1);
|
|
750
749
|
const e = n.valpha === 1 ? n.color : [...n.color, this.valpha];
|
|
751
|
-
return
|
|
750
|
+
return k.to[n.model](e);
|
|
752
751
|
},
|
|
753
752
|
percentString(t) {
|
|
754
753
|
const n = this.rgb().round(typeof t == "number" ? t : 1), e = n.valpha === 1 ? n.color : [...n.color, this.valpha];
|
|
755
|
-
return
|
|
754
|
+
return k.to.rgb.percent(e);
|
|
756
755
|
},
|
|
757
756
|
array() {
|
|
758
757
|
return this.valpha === 1 ? [...this.color] : [...this.color, this.valpha];
|
|
@@ -772,7 +771,7 @@ p.prototype = {
|
|
|
772
771
|
return t.r /= 255, t.g /= 255, t.b /= 255, this.valpha !== 1 && (t.alpha = this.valpha), t;
|
|
773
772
|
},
|
|
774
773
|
round(t) {
|
|
775
|
-
return t = Math.max(t || 0, 0), new p([...this.color.map(
|
|
774
|
+
return t = Math.max(t || 0, 0), new p([...this.color.map(wt(t)), this.valpha], this.model);
|
|
776
775
|
},
|
|
777
776
|
alpha(t) {
|
|
778
777
|
return t !== void 0 ? new p([...this.color, Math.max(0, Math.min(1, t))], this.model) : this.valpha;
|
|
@@ -804,14 +803,14 @@ p.prototype = {
|
|
|
804
803
|
return t !== void 0 ? new p(t) : v[this.model].keyword(this.color);
|
|
805
804
|
},
|
|
806
805
|
hex(t) {
|
|
807
|
-
return t !== void 0 ? new p(t) :
|
|
806
|
+
return t !== void 0 ? new p(t) : k.to.hex(this.rgb().round().color);
|
|
808
807
|
},
|
|
809
808
|
hexa(t) {
|
|
810
809
|
if (t !== void 0)
|
|
811
810
|
return new p(t);
|
|
812
811
|
const n = this.rgb().round().color;
|
|
813
812
|
let e = Math.round(this.valpha * 255).toString(16).toUpperCase();
|
|
814
|
-
return e.length === 1 && (e = "0" + e),
|
|
813
|
+
return e.length === 1 && (e = "0" + e), k.to.hex(n) + e;
|
|
815
814
|
},
|
|
816
815
|
rgbNumber() {
|
|
817
816
|
const t = this.rgb().color;
|
|
@@ -888,7 +887,7 @@ p.prototype = {
|
|
|
888
887
|
mix(t, n) {
|
|
889
888
|
if (!t || !t.rgb)
|
|
890
889
|
throw new Error('Argument to "mix" was not a Color instance, but rather an instance of ' + typeof t);
|
|
891
|
-
const e = t.rgb(), r = this.rgb(), s = n === void 0 ? 0.5 : n,
|
|
890
|
+
const e = t.rgb(), r = this.rgb(), s = n === void 0 ? 0.5 : n, o = 2 * s - 1, a = e.alpha() - r.alpha(), i = ((o * a === -1 ? o : (o + a) / (1 + o * a)) + 1) / 2, l = 1 - i;
|
|
892
891
|
return p.rgb(
|
|
893
892
|
i * e.red() + l * r.red(),
|
|
894
893
|
i * e.green() + l * r.green(),
|
|
@@ -898,22 +897,22 @@ p.prototype = {
|
|
|
898
897
|
}
|
|
899
898
|
};
|
|
900
899
|
for (const t of Object.keys(v)) {
|
|
901
|
-
if (
|
|
900
|
+
if (U.includes(t))
|
|
902
901
|
continue;
|
|
903
902
|
const { channels: n } = v[t];
|
|
904
903
|
p.prototype[t] = function(...e) {
|
|
905
|
-
return this.model === t ? new p(this) : e.length > 0 ? new p(e, t) : new p([...
|
|
904
|
+
return this.model === t ? new p(this) : e.length > 0 ? new p(e, t) : new p([...St(v[this.model][t].raw(this.color)), this.valpha], t);
|
|
906
905
|
}, p[t] = function(...e) {
|
|
907
906
|
let r = e[0];
|
|
908
|
-
return typeof r == "number" && (r =
|
|
907
|
+
return typeof r == "number" && (r = L(e, n)), new p(r, t);
|
|
909
908
|
};
|
|
910
909
|
}
|
|
911
|
-
function
|
|
910
|
+
function yt(t, n) {
|
|
912
911
|
return Number(t.toFixed(n));
|
|
913
912
|
}
|
|
914
|
-
function
|
|
913
|
+
function wt(t) {
|
|
915
914
|
return function(n) {
|
|
916
|
-
return
|
|
915
|
+
return yt(n, t);
|
|
917
916
|
};
|
|
918
917
|
}
|
|
919
918
|
function u(t, n, e) {
|
|
@@ -930,16 +929,16 @@ function g(t) {
|
|
|
930
929
|
return Math.max(0, Math.min(t, n));
|
|
931
930
|
};
|
|
932
931
|
}
|
|
933
|
-
function
|
|
932
|
+
function St(t) {
|
|
934
933
|
return Array.isArray(t) ? t : [t];
|
|
935
934
|
}
|
|
936
|
-
function
|
|
935
|
+
function L(t, n) {
|
|
937
936
|
for (let e = 0; e < n; e++)
|
|
938
937
|
typeof t[e] != "number" && (t[e] = 0);
|
|
939
938
|
return t;
|
|
940
939
|
}
|
|
941
|
-
var
|
|
942
|
-
const
|
|
940
|
+
var xt = p;
|
|
941
|
+
const kt = /* @__PURE__ */ Q(xt), Lt = {
|
|
943
942
|
channel: "channel",
|
|
944
943
|
channels: "channels",
|
|
945
944
|
colorField: "color-field",
|
|
@@ -970,103 +969,94 @@ const mt = /* @__PURE__ */ Z(yt), Ht = {
|
|
|
970
969
|
slider: "slider",
|
|
971
970
|
sliders: "sliders",
|
|
972
971
|
splitSection: "section--split"
|
|
973
|
-
},
|
|
972
|
+
}, Rt = kt("#007AC2"), _t = "calcite-color-", Bt = {
|
|
974
973
|
r: 255,
|
|
975
974
|
g: 255,
|
|
976
975
|
b: 255
|
|
977
|
-
},
|
|
976
|
+
}, Mt = {
|
|
978
977
|
h: 360,
|
|
979
978
|
s: 100,
|
|
980
979
|
v: 100
|
|
981
|
-
},
|
|
980
|
+
}, Gt = Mt.h - 1, Nt = {
|
|
982
981
|
min: 0,
|
|
983
982
|
max: 100
|
|
984
|
-
},
|
|
983
|
+
}, At = {
|
|
985
984
|
s: {
|
|
985
|
+
gap: parseInt(nt),
|
|
986
986
|
slider: {
|
|
987
|
-
height: 12
|
|
988
|
-
width: 142
|
|
989
|
-
},
|
|
990
|
-
colorField: {
|
|
991
|
-
height: 110,
|
|
992
|
-
width: 198
|
|
987
|
+
height: 12
|
|
993
988
|
},
|
|
994
989
|
thumb: {
|
|
995
990
|
radius: 7
|
|
996
991
|
},
|
|
997
992
|
preview: {
|
|
998
993
|
size: 20
|
|
999
|
-
}
|
|
994
|
+
},
|
|
995
|
+
minWidth: 200
|
|
1000
996
|
},
|
|
1001
997
|
m: {
|
|
998
|
+
gap: parseInt(tt),
|
|
1002
999
|
slider: {
|
|
1003
|
-
height: 12
|
|
1004
|
-
width: 170
|
|
1005
|
-
},
|
|
1006
|
-
colorField: {
|
|
1007
|
-
height: 132,
|
|
1008
|
-
width: 238
|
|
1000
|
+
height: 12
|
|
1009
1001
|
},
|
|
1010
1002
|
thumb: {
|
|
1011
1003
|
radius: 7
|
|
1012
1004
|
},
|
|
1013
1005
|
preview: {
|
|
1014
1006
|
size: 24
|
|
1015
|
-
}
|
|
1007
|
+
},
|
|
1008
|
+
minWidth: 240
|
|
1016
1009
|
},
|
|
1017
1010
|
l: {
|
|
1011
|
+
gap: parseInt(V),
|
|
1018
1012
|
slider: {
|
|
1019
|
-
height: 12
|
|
1020
|
-
width: 222
|
|
1021
|
-
},
|
|
1022
|
-
colorField: {
|
|
1023
|
-
height: 168,
|
|
1024
|
-
width: 302
|
|
1013
|
+
height: 12
|
|
1025
1014
|
},
|
|
1026
1015
|
thumb: {
|
|
1027
1016
|
radius: 7
|
|
1028
1017
|
},
|
|
1029
1018
|
preview: {
|
|
1030
1019
|
size: 32
|
|
1031
|
-
}
|
|
1020
|
+
},
|
|
1021
|
+
minWidth: 304
|
|
1032
1022
|
}
|
|
1033
|
-
},
|
|
1023
|
+
}, Tt = 1, Pt = /^[0-9A-F]$/i, Ft = /^#[0-9A-F]{3}$/i, Ct = /^#[0-9A-F]{6}$/i, Ht = /^#[0-9A-F]{4}$/i, zt = /^#[0-9A-F]{8}$/i, qt = (t) => Number((t * 100).toFixed()), Wt = (t) => Number((t / 100).toFixed(2));
|
|
1034
1024
|
function K(t, n = !1) {
|
|
1035
|
-
return R(t, n) ||
|
|
1025
|
+
return R(t, n) || $t(t, n);
|
|
1036
1026
|
}
|
|
1037
1027
|
function j(t, n, e) {
|
|
1038
1028
|
return t ? t.length === n && e.test(t) : !1;
|
|
1039
1029
|
}
|
|
1040
1030
|
function R(t, n = !1) {
|
|
1041
|
-
return j(t, n ? 5 : 4, n ?
|
|
1031
|
+
return j(t, n ? 5 : 4, n ? Ht : Ft);
|
|
1042
1032
|
}
|
|
1043
|
-
function
|
|
1044
|
-
return j(t, n ? 9 : 7, n ?
|
|
1033
|
+
function $t(t, n = !1) {
|
|
1034
|
+
return j(t, n ? 9 : 7, n ? zt : Ct);
|
|
1045
1035
|
}
|
|
1046
|
-
function
|
|
1036
|
+
function Dt(t, n = !1, e = !1) {
|
|
1047
1037
|
if (t = t.toLowerCase(), t.startsWith("#") || (t = `#${t}`), R(t, n))
|
|
1048
|
-
return G(
|
|
1038
|
+
return B(G(t, n));
|
|
1049
1039
|
if (n && e && K(
|
|
1050
1040
|
t,
|
|
1051
1041
|
!1
|
|
1052
1042
|
/* we only care about RGB hex for conversion */
|
|
1053
1043
|
)) {
|
|
1054
1044
|
const r = R(t, !1);
|
|
1055
|
-
return G(
|
|
1045
|
+
return B(G(`${t}${r ? "f" : "ff"}`, !0));
|
|
1056
1046
|
}
|
|
1057
1047
|
return t;
|
|
1058
1048
|
}
|
|
1059
|
-
function
|
|
1049
|
+
function Xt(t, n = !1) {
|
|
1060
1050
|
return n ? t.hexa() : t.hex();
|
|
1061
1051
|
}
|
|
1062
|
-
function
|
|
1063
|
-
const { r: n, g: e, b: r } = t, s = H(n),
|
|
1064
|
-
return `#${s}${
|
|
1052
|
+
function B(t) {
|
|
1053
|
+
const { r: n, g: e, b: r } = t, s = H(n), o = H(e), a = H(r), i = "a" in t ? H(t.a * 255) : "";
|
|
1054
|
+
return `#${s}${o}${a}${i}`.toLowerCase();
|
|
1065
1055
|
}
|
|
1066
1056
|
function H(t) {
|
|
1067
1057
|
return t.toString(16).padStart(2, "0");
|
|
1068
1058
|
}
|
|
1069
|
-
function
|
|
1059
|
+
function Ut(t) {
|
|
1070
1060
|
const n = {
|
|
1071
1061
|
...t,
|
|
1072
1062
|
a: t.alpha ?? 1
|
|
@@ -1074,21 +1064,21 @@ function qt(t) {
|
|
|
1074
1064
|
};
|
|
1075
1065
|
return delete n.alpha, n;
|
|
1076
1066
|
}
|
|
1077
|
-
function
|
|
1067
|
+
function Kt(t) {
|
|
1078
1068
|
const n = { ...t, alpha: t.a ?? 1 };
|
|
1079
1069
|
return delete n.a, n;
|
|
1080
1070
|
}
|
|
1081
|
-
function
|
|
1071
|
+
function G(t, n = !1) {
|
|
1082
1072
|
if (!K(t, n))
|
|
1083
1073
|
return null;
|
|
1084
1074
|
t = t.replace("#", "");
|
|
1085
|
-
let e, r, s,
|
|
1075
|
+
let e, r, s, o;
|
|
1086
1076
|
if (t.length === 3 || t.length === 4) {
|
|
1087
1077
|
const [i, l, h, b] = t.split("");
|
|
1088
|
-
e = parseInt(`${i}${i}`, 16), r = parseInt(`${l}${l}`, 16), s = parseInt(`${h}${h}`, 16),
|
|
1078
|
+
e = parseInt(`${i}${i}`, 16), r = parseInt(`${l}${l}`, 16), s = parseInt(`${h}${h}`, 16), o = parseInt(`${b}${b}`, 16) / 255;
|
|
1089
1079
|
} else
|
|
1090
|
-
e = parseInt(t.slice(0, 2), 16), r = parseInt(t.slice(2, 4), 16), s = parseInt(t.slice(4, 6), 16),
|
|
1091
|
-
return isNaN(
|
|
1080
|
+
e = parseInt(t.slice(0, 2), 16), r = parseInt(t.slice(2, 4), 16), s = parseInt(t.slice(4, 6), 16), o = parseInt(t.slice(6, 8), 16) / 255;
|
|
1081
|
+
return isNaN(o) ? { r: e, g: r, b: s } : { r: e, g: r, b: s, a: o };
|
|
1092
1082
|
}
|
|
1093
1083
|
const J = (t) => t, f = J({
|
|
1094
1084
|
HEX: "hex",
|
|
@@ -1105,7 +1095,7 @@ const J = (t) => t, f = J({
|
|
|
1105
1095
|
HSV: "hsv",
|
|
1106
1096
|
HSVA: "hsva"
|
|
1107
1097
|
});
|
|
1108
|
-
function
|
|
1098
|
+
function jt(t) {
|
|
1109
1099
|
if (typeof t == "string") {
|
|
1110
1100
|
if (t.startsWith("#")) {
|
|
1111
1101
|
const { length: n } = t;
|
|
@@ -1136,56 +1126,59 @@ function Tt(t) {
|
|
|
1136
1126
|
function S(t, ...n) {
|
|
1137
1127
|
return n.every((e) => e && t && `${e}` in t);
|
|
1138
1128
|
}
|
|
1139
|
-
function
|
|
1129
|
+
function Jt(t, n) {
|
|
1140
1130
|
return t?.rgb().array().toString() === n?.rgb().array().toString();
|
|
1141
1131
|
}
|
|
1142
|
-
function
|
|
1132
|
+
function Yt(t) {
|
|
1143
1133
|
return t === f.HEXA || t === f.RGBA_CSS || t === f.HSLA_CSS || t === d.RGBA || t === d.HSLA || t === d.HSVA;
|
|
1144
1134
|
}
|
|
1145
|
-
function
|
|
1135
|
+
function Zt(t) {
|
|
1146
1136
|
return t === f.HEX ? f.HEXA : t === f.RGB_CSS ? f.RGBA_CSS : t === f.HSL_CSS ? f.HSLA_CSS : t === d.RGB ? d.RGBA : t === d.HSL ? d.HSLA : t === d.HSV ? d.HSVA : t;
|
|
1147
1137
|
}
|
|
1148
|
-
function
|
|
1138
|
+
function Qt(t) {
|
|
1149
1139
|
return t === f.HEXA ? f.HEX : t === f.RGBA_CSS ? f.RGB_CSS : t === f.HSLA_CSS ? f.HSL_CSS : t === d.RGBA ? d.RGB : t === d.HSLA ? d.HSL : t === d.HSVA ? d.HSV : t;
|
|
1150
1140
|
}
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1141
|
+
const It = 1, Y = It * 2;
|
|
1142
|
+
function Vt(t, n, e) {
|
|
1143
|
+
const r = e ? At.l.preview.size : n.preview.size, s = t - Y, o = n.gap * 3;
|
|
1144
|
+
return Math.max(s - o - r, 0);
|
|
1145
|
+
}
|
|
1146
|
+
function tn(t) {
|
|
1147
|
+
const e = t - Y;
|
|
1148
|
+
return {
|
|
1149
|
+
width: Math.max(e, 0),
|
|
1150
|
+
height: Math.max(Math.floor(e / 1.8), 0)
|
|
1151
|
+
};
|
|
1160
1152
|
}
|
|
1161
1153
|
export {
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1154
|
+
kt as C,
|
|
1155
|
+
Rt as D,
|
|
1156
|
+
Mt as H,
|
|
1157
|
+
Nt as O,
|
|
1158
|
+
Bt as R,
|
|
1159
|
+
At as S,
|
|
1160
|
+
$t as a,
|
|
1169
1161
|
R as b,
|
|
1170
|
-
|
|
1171
|
-
|
|
1162
|
+
qt as c,
|
|
1163
|
+
Pt as d,
|
|
1172
1164
|
f as e,
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1165
|
+
tn as f,
|
|
1166
|
+
Vt as g,
|
|
1167
|
+
Xt as h,
|
|
1176
1168
|
K as i,
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1169
|
+
_t as j,
|
|
1170
|
+
Yt as k,
|
|
1171
|
+
Kt as l,
|
|
1172
|
+
Jt as m,
|
|
1173
|
+
Dt as n,
|
|
1174
|
+
Wt as o,
|
|
1175
|
+
jt as p,
|
|
1176
|
+
Lt as q,
|
|
1177
|
+
B as r,
|
|
1178
|
+
Qt as s,
|
|
1179
|
+
Zt as t,
|
|
1180
|
+
Gt as u,
|
|
1181
|
+
Ut as v,
|
|
1182
|
+
Tt as w,
|
|
1183
|
+
G as x
|
|
1191
1184
|
};
|