@esri/calcite-components 5.0.0-next.2 → 5.0.0-next.4
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/{YWWOX5W3.js → 26KO5WLB.js} +2 -2
- package/dist/calcite/{HNZOEWL7.js → 2C6PV6LO.js} +1 -1
- package/dist/calcite/{QUSE2BTR.js → 2CJWVM4R.js} +2 -2
- package/dist/calcite/{6G4YIOVX.js → 2DX2SAQ7.js} +1 -1
- package/dist/calcite/{YLT7ECGR.js → 2GMLRXCX.js} +2 -2
- package/dist/calcite/{NYTC7VVQ.js → 2J5IS422.js} +2 -2
- package/dist/calcite/{732CITAT.js → 2JFH2WAM.js} +2 -2
- package/dist/calcite/{FDJBCYHX.js → 2VXNPHIO.js} +2 -2
- package/dist/calcite/{5DRLQB2T.js → 32YCYEKN.js} +1 -1
- package/dist/calcite/{GQIOILN4.js → 35DVUKKJ.js} +2 -2
- package/dist/calcite/{5QMODV7V.js → 3PSVZRKA.js} +1 -1
- package/dist/calcite/{NO25YNZI.js → 4VQGRHEV.js} +2 -2
- package/dist/calcite/544AASIY.js +4 -0
- package/dist/calcite/{QCJFC5LS.js → 5FUKNERA.js} +2 -2
- package/dist/calcite/{K6SZIYUC.js → 63S6JWID.js} +1 -1
- package/dist/calcite/{2ZC3AAAG.js → 6CJF3ZME.js} +2 -2
- package/dist/calcite/{MVRE5C3I.js → 6G3IVAVE.js} +2 -2
- package/dist/calcite/{OAAKVSOG.js → 6OSIXZYU.js} +2 -2
- package/dist/calcite/{26A44OD3.js → 6PIHPAZF.js} +2 -2
- package/dist/calcite/{VC3LAQJK.js → 6TAH2TAT.js} +2 -2
- package/dist/calcite/{A7LIGMJQ.js → 7SVIAOHO.js} +1 -1
- package/dist/calcite/{KXFX476X.js → 7TJP2ISL.js} +2 -2
- package/dist/calcite/{RSGHKHKR.js → A2TCAPW4.js} +2 -2
- package/dist/calcite/{6YKZNLEV.js → A5CVK7TL.js} +2 -2
- package/dist/calcite/{DSYP2L5X.js → AAV5EWQK.js} +2 -2
- package/dist/calcite/{MRLX7ZWB.js → AE4AQEU5.js} +2 -2
- package/dist/calcite/{G3LW5GU5.js → AICLNUQ5.js} +2 -2
- package/dist/calcite/AILXQSIJ.js +4 -0
- package/dist/calcite/{UQCEQ44M.js → AK4EMEY2.js} +2 -2
- package/dist/calcite/{YTKNZCQJ.js → AKR5JHPW.js} +2 -2
- package/dist/calcite/{MFSHN3IL.js → ALQH5DCZ.js} +2 -2
- package/dist/calcite/{7NSIROF7.js → AS2E2XYE.js} +1 -1
- package/dist/calcite/{LQ6VE45D.js → B3KV4G2W.js} +2 -2
- package/dist/calcite/{Y53A45DR.js → BG5JIUF3.js} +2 -2
- package/dist/calcite/{2XQID652.js → BK2W2RW3.js} +2 -2
- package/dist/calcite/{UMPKFWZZ.js → BQI7TWVC.js} +2 -2
- package/dist/calcite/{GZNEHDFX.js → C3BIK3DY.js} +1 -1
- package/dist/calcite/{5ZVESTKT.js → C77NX62C.js} +2 -2
- package/dist/calcite/{TDYNRNC3.js → C7C75GTM.js} +2 -2
- package/dist/calcite/{AUWGPSX4.js → CAHGZMOM.js} +2 -2
- package/dist/calcite/{VOP2KDER.js → CDLGLCFD.js} +2 -2
- package/dist/calcite/{C7SWOQAB.js → CSQVLDPF.js} +2 -2
- package/dist/calcite/{QYME6L2Y.js → CYVISXIT.js} +2 -2
- package/dist/calcite/{GBKXT23N.js → D5SFHDV6.js} +2 -2
- package/dist/calcite/{WFBFQEOK.js → DNVDDGB7.js} +2 -2
- package/dist/calcite/{LYOVUI3B.js → E3C36U7C.js} +2 -2
- package/dist/calcite/{LQZRO6V7.js → EDVRYPYX.js} +2 -2
- package/dist/calcite/{CAAAOTNT.js → EKOGELYT.js} +2 -2
- package/dist/calcite/{V25MLN7E.js → EQC2JW3I.js} +1 -1
- package/dist/calcite/{VC23VSV3.js → ETHM6IZM.js} +2 -2
- package/dist/calcite/{B3CZZZ3T.js → ETUOSTGW.js} +2 -2
- package/dist/calcite/{2QAR72YP.js → EWNCXKJC.js} +2 -2
- package/dist/calcite/{EZFX7GFD.js → FKYJEFNP.js} +1 -1
- package/dist/calcite/{G3NSWBMZ.js → FNH5JSBK.js} +2 -2
- package/dist/calcite/{GO7QOJ4G.js → FX45OPBE.js} +2 -2
- package/dist/calcite/{Y5N22JX4.js → G73EBLG4.js} +2 -2
- package/dist/calcite/{ZUW5HJLD.js → GCPYRD7U.js} +2 -2
- package/dist/calcite/{PV4KB5V4.js → GTU5X7O7.js} +2 -2
- package/dist/calcite/{2AWS3TTU.js → GU5MLWDX.js} +2 -2
- package/dist/calcite/{FEP2O2MA.js → GV755OVW.js} +2 -2
- package/dist/calcite/{7MNPDRSG.js → H3EPIYLG.js} +1 -1
- package/dist/calcite/{AN7BJW6E.js → H42LHYUA.js} +2 -2
- package/dist/calcite/{LT7C6GNK.js → HBVWYA2B.js} +2 -2
- package/dist/calcite/{57G6CI2K.js → HIB3Q63Z.js} +1 -1
- package/dist/calcite/{H6ACIWPU.js → HKNQLLG7.js} +2 -2
- package/dist/calcite/{UMUEMXJF.js → HKVRX5SD.js} +2 -2
- package/dist/calcite/{SQE7VYLC.js → HOUDAAST.js} +2 -2
- package/dist/calcite/{M7JX436Q.js → HPWHHEM4.js} +2 -2
- package/dist/calcite/{S6DQTLRI.js → HZVCGOQL.js} +2 -2
- package/dist/calcite/{AND4R747.js → INNX6VTE.js} +2 -2
- package/dist/calcite/{FFVF2J2J.js → INNXW35W.js} +2 -2
- package/dist/calcite/{Z6R3XFLS.js → IXK4BTNI.js} +2 -2
- package/dist/calcite/{Z7ARDFVR.js → J2ACTXE5.js} +2 -2
- package/dist/calcite/{5HYWAM3T.js → J2NLU7RP.js} +1 -1
- package/dist/calcite/{GI7F3WH2.js → JAM3DZYC.js} +1 -1
- package/dist/calcite/{JX2SCNZH.js → JBMFTM4R.js} +2 -2
- package/dist/calcite/{HG4ISKH4.js → JCGVWBAA.js} +2 -2
- package/dist/calcite/{FMHT4PTX.js → JDPMMX2J.js} +2 -2
- package/dist/calcite/{FHD6A3EJ.js → JIKG4DHH.js} +2 -2
- package/dist/calcite/{RKHTX2IT.js → JJNFTIBI.js} +2 -2
- package/dist/calcite/{66UJIY7C.js → JJOW6LLC.js} +2 -2
- package/dist/calcite/{3625VFO5.js → JRPSHIET.js} +2 -2
- package/dist/calcite/{EJNDGPN2.js → K6FTZ2ZF.js} +2 -2
- package/dist/calcite/{7ZV336XQ.js → KCVWP63F.js} +2 -2
- package/dist/calcite/{QB3MUPVE.js → KSITDI7Y.js} +2 -2
- package/dist/calcite/{WEUU4GYG.js → LAAEPNIM.js} +2 -2
- package/dist/calcite/{43WQ54NQ.js → M5QNDD4X.js} +1 -1
- package/dist/calcite/{A7FBHSOE.js → M6OBWXQN.js} +2 -2
- package/dist/calcite/{UO6GJMZS.js → M7H4RC23.js} +2 -2
- package/dist/calcite/{6MJOAFKY.js → MDLPBZOZ.js} +2 -2
- package/dist/calcite/{KIBRPNHY.js → MHGTLCFX.js} +2 -2
- package/dist/calcite/{3IXSIT7M.js → MM5GOLON.js} +2 -2
- package/dist/calcite/{C23DAAYV.js → MPZ73UTT.js} +2 -2
- package/dist/calcite/{YPW2IFI6.js → N7QD2WXH.js} +2 -2
- package/dist/calcite/{CP6672N4.js → NFBDMCMY.js} +2 -2
- package/dist/calcite/{SLER6GVJ.js → NI3OLQU4.js} +2 -2
- package/dist/calcite/{BTKNJZBD.js → NPXLX7L5.js} +2 -2
- package/dist/calcite/{N7OPKIOO.js → NS7XIDPL.js} +2 -2
- package/dist/calcite/{L63F4E2F.js → OTRRBSYY.js} +1 -1
- package/dist/calcite/{I2XGTS34.js → P2J4VCQF.js} +2 -2
- package/dist/calcite/{5NYJ6WZZ.js → PLRKNZ2Y.js} +2 -2
- package/dist/calcite/{EU53PNIW.js → PNBL2IVW.js} +2 -2
- package/dist/calcite/{XLVC3WVH.js → POOH5QBE.js} +2 -2
- package/dist/calcite/{BW34ER3N.js → PQACJ4N6.js} +2 -2
- package/dist/calcite/{MNOO2GEE.js → PRB44CR7.js} +2 -2
- package/dist/calcite/{M3SKP2LL.js → PWWVHZBN.js} +2 -2
- package/dist/calcite/{BWBMNUXP.js → Q2KBZ6FQ.js} +2 -2
- package/dist/calcite/{IGR4KAKH.js → QDXVT7UF.js} +2 -2
- package/dist/calcite/{ULK65WQH.js → QK7SZUAI.js} +2 -2
- package/dist/calcite/{TZGCNMHE.js → QNVFFZ3F.js} +2 -2
- package/dist/calcite/{3PF6L44U.js → QRBJKU6C.js} +2 -2
- package/dist/calcite/{KGQ7IO5B.js → QSTLY3DQ.js} +2 -2
- package/dist/calcite/{SYNATVXJ.js → QW2OFS26.js} +2 -2
- package/dist/calcite/{N3EON3SQ.js → QWN5XHMG.js} +2 -2
- package/dist/calcite/{AZVSLWKE.js → QYCVH2VH.js} +2 -2
- package/dist/calcite/{32TESKME.js → R2KPGC7W.js} +2 -2
- package/dist/calcite/{2NLH7XFG.js → R4PTX2BD.js} +2 -2
- package/dist/calcite/{66PQSM5C.js → R534LDNQ.js} +2 -2
- package/dist/calcite/{34C2CSRC.js → RBJEATU3.js} +2 -2
- package/dist/calcite/{4AL3SLA3.js → RFA6VADW.js} +2 -2
- package/dist/calcite/{EF5KMWOQ.js → RPLPMP3J.js} +2 -2
- package/dist/calcite/{GRMS7FQY.js → RSHJ2ULC.js} +1 -1
- package/dist/calcite/{ZR7MTX2F.js → RUMWLVIQ.js} +2 -2
- package/dist/calcite/{XPW6AWHY.js → S6HTKBNB.js} +1 -1
- package/dist/calcite/{Z5QL3IGF.js → SBO2DPVJ.js} +2 -2
- package/dist/calcite/{ZS5AQJG2.js → SHXU5GEM.js} +2 -2
- package/dist/calcite/{ZRF2LJED.js → SLUOB5WF.js} +2 -2
- package/dist/calcite/{XWCNDKFU.js → SOFELOS3.js} +2 -2
- package/dist/calcite/{67224TPH.js → SQ25UCSA.js} +2 -2
- package/dist/calcite/{5Z6FCIBA.js → SU2JQIB4.js} +1 -1
- package/dist/calcite/{JYXQNDBZ.js → T3UNO6JW.js} +2 -2
- package/dist/calcite/{ONRCFAXM.js → TCB3D44T.js} +2 -2
- package/dist/calcite/{ZVUSRWWY.js → TDROT2JJ.js} +2 -2
- package/dist/calcite/{KJXOD5Z2.js → TLLHA7VC.js} +2 -2
- package/dist/calcite/{SKEE2RVS.js → TPG23UCD.js} +2 -2
- package/dist/calcite/{7C5HX3U5.js → TS65SISB.js} +1 -1
- package/dist/calcite/{R5RXEIYL.js → TU2PNKWS.js} +2 -2
- package/dist/calcite/{APWPUFHK.js → TXZPVAH4.js} +2 -2
- package/dist/calcite/{RJQBTNQM.js → U3G47NPB.js} +2 -2
- package/dist/calcite/{VM37RG4J.js → U3RNUZF6.js} +2 -2
- package/dist/calcite/{YA2XH3BT.js → U5ZHIRE4.js} +1 -1
- package/dist/calcite/{TCRZHHM4.js → V6JTY5IT.js} +2 -2
- package/dist/calcite/{GPIRDMOU.js → VBGPBKJL.js} +2 -2
- package/dist/calcite/{QV5VJGK4.js → VLOLYD36.js} +2 -2
- package/dist/calcite/{7HYMMGRS.js → VV3MILRZ.js} +2 -2
- package/dist/calcite/{2HCOP3OW.js → VVCB7N7V.js} +2 -2
- package/dist/calcite/{UBGSVRI6.js → VZVYZPXQ.js} +2 -2
- package/dist/calcite/{6REOS7VN.js → W2KQ3FF5.js} +2 -2
- package/dist/calcite/{PPKBJQ5Q.js → WDKPAPPB.js} +2 -2
- package/dist/calcite/{YEEEKHTO.js → WGQ2SERU.js} +2 -2
- package/dist/calcite/{EFMQFOY3.js → WJA2X3C2.js} +2 -2
- package/dist/calcite/{O6YPQQ5N.js → WLLFG3M7.js} +2 -2
- package/dist/calcite/{QYN4Y2UO.js → WNEJDZTS.js} +1 -1
- package/dist/calcite/{J5KIXHJQ.js → WSETKDK2.js} +2 -2
- package/dist/calcite/{UKTG6YHR.js → WYHGKROL.js} +2 -2
- package/dist/calcite/{YGIF2DGN.js → X2PZLQSO.js} +2 -2
- package/dist/calcite/{AQJZ34DW.js → X7GVFGBQ.js} +2 -2
- package/dist/calcite/{IEON5PAG.js → XGLTZ4HO.js} +2 -2
- package/dist/calcite/{ZQKP4DDJ.js → XHCNKCYX.js} +2 -2
- package/dist/calcite/{DULSFTYX.js → XM6I5JZM.js} +2 -2
- package/dist/calcite/{JKJRBKHB.js → XQGQJEI2.js} +2 -2
- package/dist/calcite/{OFPYAEOU.js → XRJOD24G.js} +1 -1
- package/dist/calcite/{NPB7VDJV.js → XYU7WBO7.js} +2 -2
- package/dist/calcite/{DX5CTXCH.js → Y6BDELTJ.js} +2 -2
- package/dist/calcite/{KTT2ROP5.js → Y7L5PL4A.js} +2 -2
- package/dist/calcite/{BXLQRGO6.js → YA3YNL2F.js} +2 -2
- package/dist/calcite/{KQAALLEV.js → YASA2V4I.js} +2 -2
- package/dist/calcite/{K5VUM3MK.js → YGYOIYMF.js} +2 -2
- package/dist/calcite/{67W7PMC5.js → YUOVY5RN.js} +2 -2
- package/dist/calcite/{S4PILGWU.js → Z6CRZOOK.js} +2 -2
- package/dist/calcite/{6VQKSVQZ.js → ZCWFURSE.js} +2 -2
- package/dist/calcite/{52HAQJHJ.js → ZUMJB5U3.js} +2 -2
- package/dist/calcite/calcite.esm.js +2 -2
- package/dist/chunks/runtime.js +4 -4
- package/dist/components/calcite-action/customElement.d.ts +1 -1
- package/dist/components/calcite-action-pad/customElement.d.ts +1 -1
- package/dist/components/calcite-block/customElement.d.ts +4 -4
- package/dist/components/calcite-block/customElement.js +1 -1
- package/dist/components/calcite-block-group/customElement.d.ts +1 -1
- package/dist/components/calcite-block-section/customElement.d.ts +2 -2
- package/dist/components/calcite-card/customElement.d.ts +1 -1
- package/dist/components/calcite-card/customElement.js +1 -1
- package/dist/components/calcite-combobox-item/customElement.d.ts +1 -1
- package/dist/components/calcite-dialog/customElement.d.ts +1 -1
- package/dist/components/calcite-dropdown/customElement.d.ts +1 -1
- package/dist/components/calcite-input-number/customElement.d.ts +2 -2
- package/dist/components/calcite-list/customElement.d.ts +1 -1
- package/dist/components/calcite-list-item/customElement.d.ts +1 -1
- package/dist/components/calcite-sheet/customElement.d.ts +2 -2
- package/dist/components/calcite-shell-panel/customElement.d.ts +4 -4
- package/dist/components/calcite-stepper/customElement.d.ts +1 -1
- package/dist/components/calcite-tile/customElement.d.ts +2 -2
- package/dist/components/calcite-tooltip/customElement.d.ts +1 -1
- package/dist/docs/api.json +50 -50
- package/dist/docs/docs.json +28 -28
- package/dist/docs/vscode.html-custom-data.json +23 -23
- package/dist/docs/web-types.json +24 -24
- package/package.json +3 -3
- package/dist/calcite/U2QCHDBN.js +0 -4
- package/dist/calcite/X3DBNTLH.js +0 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{j as C,k as v}from"./
|
|
3
|
+
v5.0.0-next.4 */
|
|
4
|
+
import{j as C,k as v}from"./Z6CRZOOK.js";import{h as I}from"./CSQVLDPF.js";var V=["calcite-input","calcite-input-number","calcite-input-text","calcite-text-area"];function H(e){return`${e.split("-").map((n,i)=>i===0?n:`${n[0].toUpperCase()}${n.slice(1)}`).join("")}${V.includes(e)?"Input":"Change"}`}var m="hidden-form-input";function E(e){return"checked"in e}var h=new WeakMap,g=new WeakSet;function L(e,t){if(v(t.parentElement,"[form]"))return!0;let n="calciteInternalFormComponentRegister",i=!1;return e.addEventListener(n,o=>{i=o.composedPath().some(l=>g.has(l)),o.stopPropagation()},{once:!0}),t.dispatchEvent(new CustomEvent(n,{bubbles:!0,composed:!0})),i}function R(e,{status:t,message:a,icon:n}){"status"in e&&(e.status=t),"validationIcon"in e&&typeof e.validationIcon!="string"&&(e.validationIcon=n),"validationMessage"in e&&!e.validationMessage&&(e.validationMessage=a)}function y(e){return e.nodeName==="CALCITE-RADIO-BUTTON"?v(e,"calcite-radio-button-group"):e}var A=new CustomEvent("calciteInvalid",{bubbles:!0,composed:!0});function p(e){let t=e?.target,a=t?.validationMessage,n=y(t?.parentElement);if(!n)return;let i=n?.nodeName?.toLowerCase(),o=i?.split("-");if(o.length<2||o[0]!=="calcite")return;e?.preventDefault(),"validity"in n&&(n.validity=t?.validity),n.dispatchEvent(A),R(n,{message:a,icon:!0,status:"invalid"});let l=H(i);n.addEventListener(l,()=>{"status"in n&&(n.status="idle"),"validationIcon"in n&&(!n.validationIcon||n.validationIcon===!0)&&(n.validationIcon=!1),"validationMessage"in n&&n.validationMessage===a&&(n.validationMessage=""),"validity"in n&&(n.validity=t?.validity)},{once:!0})}function x(e){let{formEl:t}=e;return t?(t.addEventListener("invalid",p,!0),t.requestSubmit(),t.removeEventListener("invalid",p,!0),requestAnimationFrame(()=>{let a=t.querySelectorAll("[status=invalid]");for(let n of a)if(n?.validationMessage){n?.setFocus();break}}),!0):!1}function D(e){e.formEl?.reset()}function W(e){let{el:t,value:a}=e,n=w(e);if(!n||L(n,t))return;e.formEl=n,e.defaultValue=a,E(e)&&(e.defaultChecked=e.checked);let i=q.bind(e);n.addEventListener("reset",i),h.set(e.el,i),g.add(t)}function w(e){let{el:t,form:a}=e;return a?C(t,{id:a}):v(t,"form")}function q(){if("status"in this&&(this.status="idle"),"validationIcon"in this&&(this.validationIcon=!1),"validationMessage"in this&&(this.validationMessage=""),E(this)){this.checked=this.defaultChecked;return}this.value=this.defaultValue,this.onFormReset?.()}function O(e){let{el:t,formEl:a}=e;if(!a)return;let n=h.get(t);a.removeEventListener("reset",n),h.delete(t),e.formEl=null,g.delete(t)}function B(e,t){e.defaultValue=t}var P="calciteInternalHiddenInputInput",k=e=>{e.target.dispatchEvent(new CustomEvent(P,{bubbles:!0}))},F=e=>e.removeEventListener("input",k);function N(e){let{el:t,formEl:a,name:n,value:i}=e,{ownerDocument:o}=t;if(!1)return;let l=t.querySelectorAll(`input[slot="${m}"]`);if(!a||!n){l.forEach(s=>{F(s),s.remove()});return}let f=Array.isArray(i)?i:[i],d=[],u=new Set;l.forEach(s=>{let r=f.find(M=>M==s.value);r!=null?(u.add(r),b(e,s,r)):d.push(s)});let c;f.forEach(s=>{if(u.has(s))return;let r=d.pop();r||(r=o.createElement("input"),r.ariaHidden="true",r.slot=m),c||(c=o.createDocumentFragment()),c.append(r),r.addEventListener("input",k),b(e,r,s)}),c&&t.append(c),d.forEach(s=>{F(s),s.remove()})}function b(e,t,a){let{defaultValue:n,disabled:i,form:o,name:l,required:f}=e;t.defaultValue=n,t.disabled=i,t.name=l,t.required=f,t.tabIndex=-1,o?t.setAttribute("form",o):t.removeAttribute("form"),E(e)?(t.checked=e.checked,t.defaultChecked=e.defaultChecked,t.value=e.checked?a||"on":""):t.value=a||"",e.syncHiddenFormInput?.(t);let d=y(e.el);if(d&&"validity"in d)for(let u in{...t?.validity})d.validity[u]=t.validity[u]}var U=({component:e})=>(N(e),I`<slot name=${m}></slot>`);export{x as a,D as b,W as c,w as d,O as e,B as f,P as g,U as h};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{b as C}from"./S6DQTLRI.js";import{a as I,b as w}from"./MNOO2GEE.js";import{a as x}from"./AN7BJW6E.js";import{a as l,b as g}from"./5HYWAM3T.js";import{a as z}from"./EU53PNIW.js";import"./GBKXT23N.js";import{a as b}from"./KJXOD5Z2.js";import"./UBGSVRI6.js";import{c as y,e as d,q as T}from"./S4PILGWU.js";import{a as k}from"./OFPYAEOU.js";import{B as p,C as f,D as m,E as n,H as s,P as v,g as u,h as r,o as e}from"./C7SWOQAB.js";var o={container:"container",containerBottom:"container--bottom",content:"content",contentHasText:"content--has-text",iconEnd:"icon-end",iconPresent:"icon-present",iconStart:"icon-start",titleIcon:"calcite-tab-title--icon",scale:a=>`scale-${a}`,selectedIndicator:"selected-indicator"},A="calcite-tab-title",R={host:a=>`${A}-${a}`},S=u`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block;outline:2px solid transparent;outline-offset:2px;margin-inline-start:0px}:host([layout=inline]){flex:0 1 auto}:host([layout=center]){flex:1 1 auto}.content{position:relative;margin-block-end:.125rem;box-sizing:border-box;display:flex;block-size:100%;align-items:center;justify-content:center}.scale-s .content{padding-block:.25rem;font-size:var(--calcite-font-size--2);line-height:1rem}.scale-s .x-button{inline-size:1.25rem}.scale-m .content{padding-block:.5rem;font-size:var(--calcite-font-size--1);line-height:1rem}.scale-m .x-button{inline-size:1.75rem}.scale-l .content{padding-block:.625rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}.scale-l .x-button{inline-size:2rem}:host([closable]) .content{border-block-end-color:transparent}:host([layout=inline]) .content,:host([layout=center]) .content{padding-inline:.25rem}:host([layout=center]) .scale-s,:host([layout=center]) .scale-m,:host([layout=center]) .scale-l{margin-block:0px;justify-content:center;text-align:center}:host([layout=center]) .scale-s .content,:host([layout=center]) .scale-m .content,:host([layout=center]) .scale-l .content{flex:1 1 auto;flex-grow:1}.container{position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;cursor:pointer;align-content:center;justify-content:space-between;padding-inline:0px;font-size:var(--calcite-font-size--1);line-height:1rem;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;outline-color:transparent;color:var(--calcite-tab-text-color, var(--calcite-color-text-3));background-color:var(--calcite-tab-background-color, transparent)}.selected-indicator{position:absolute;display:block;block-size:.125rem;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;inset-block-end:0;inset-inline-start:0;inset-inline-end:0;inline-size:100%}:host([bordered][selected]) .container:after{position:absolute;display:block;block-size:.125rem;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;inset-block-end:-1px;inset-inline-start:0;inset-inline-end:0;inline-size:100%;content:""}:host([bordered][selected]) .container.container--bottom:after{inset-block-start:-1px}:host([bordered][selected]:focus) .container:after{background:transparent}.container--bottom .selected-indicator{inset-block-end:unset;inset-block-start:0}:host(:not([bordered])) .container:hover,:host(:not([bordered])) .container:active{color:var(--calcite-color-text-1)}:host([bordered]:not([selected]):hover:not(:focus)) .selected-indicator{background-color:var(--calcite-color-foreground-2)}:host([bordered]:not([selected]):hover:not(:focus)) .container:not(.container--bottom) .selected-indicator{box-shadow:inset 0 1px var(--calcite-color-border-1)}:host([bordered]:not([selected]):hover:not(:focus)) .container.container--bottom .selected-indicator{box-shadow:inset 0 -1px var(--calcite-color-border-1)}:host([selected]:focus) .selected-indicator{block-size:4px}.calcite-tab-title--icon{position:relative;margin:0;display:inline-flex;align-self:center}.calcite-tab-title--icon svg{transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out}.content--has-text .icon-start,.content--has-text .calcite-tab-title--icon.icon-start{color:var(--calcite-tab-icon-color-start, var(--calcite-icon-color))}.content--has-text .calcite-tab-title--icon.icon-start .icon-end,.content--has-text .calcite-tab-title--icon.icon-end{color:var(--calcite-tab-icon-color-end, var(--calcite-icon-color))}.content--has-text{padding:.25rem}.content--has-text .calcite-tab-title--icon.icon-start{margin-inline-end:var(--calcite-spacing-sm)}.content--has-text .calcite-tab-title--icon.icon-end{margin-inline-start:var(--calcite-spacing-sm)}.x-button{display:flex;block-size:100%;cursor:pointer;appearance:none;align-content:center;align-items:center;justify-content:center;align-self:center;border-style:none;background-color:transparent;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;outline-color:transparent;margin-inline-start:var(--calcite-spacing-sm);margin-inline-end:var(--calcite-spacing-px);block-size:calc(100% - var(--calcite-spacing-xxs));color:var(--calcite-tab-close-icon-color, var(--calcite-color-text-3));background-color:var(--calcite-tab-close-icon-background-color, var(--calcite-color-transparent))}.x-button:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus)}.x-button:focus,.x-button:hover,.x-button:active{color:var(--calcite-tab-close-icon-color-press, var(--calcite-color-text-1));background-color:var(--calcite-tab-close-icon-background-color-press, var(--calcite-color-foreground-3))}:host([bordered]) .container{border-color:transparent;border-inline-width:var(--calcite-spacing-px);border-inline-style:solid}:host([bordered]) .container:hover,:host([bordered]) .container:active{color:var(--calcite-color-text-1)}:host([bordered]) .container .x-button calcite-icon{margin-block-start:var(--calcite-spacing-px)}:host([bordered]) .container .x-button:focus,:host([bordered]) .container .x-button:hover,:host([bordered]) .container .x-button:active{box-shadow:0 2px 0 0 var(--calcite-tab-close-icon-background-color-press, var(--calcite-color-foreground-3))}:host([bordered]) .container.container--bottom{border-block-start-style:solid;border-block-start-width:1px}:host([bordered]) .container.container--bottom .selected-indicator{inset-block-start:unset;inset-block-end:0}:host([bordered]) .container.container--bottom .x-button{box-shadow:0 -2px 0 0 var(--calcite-tab-close-icon-background-color, var(--calcite-color-transparent))}:host([bordered]) .container.container--bottom .x-button:focus,:host([bordered]) .container.container--bottom .x-button:hover,:host([bordered]) .container.container--bottom .x-button:active{box-shadow:0 -2px 0 0 var(--calcite-tab-close-icon-background-color-press, var(--calcite-color-foreground-3))}:host([bordered]) .container.container--bottom .x-button calcite-icon{margin-block-end:var(--calcite-spacing-px)}:host([bordered]) .container:not(.container--bottom){border-block-end-style:solid;border-block-end-width:1px}:host([bordered]) .container:not(.container--bottom) .x-button{block-size:calc(100% - var(--calcite-spacing-px));margin-block-start:-1px}:host([bordered]) .container .selected-indicator{inset-block-start:0;inset-block-end:unset;inset-inline-start:-1px;inset-inline-end:0;inline-size:calc(100% + var(--calcite-spacing-base))}:host([bordered]) .container:host(:not([selected])) .container .x-button{box-shadow:0 2px 0 0 transparent}:host([bordered]) .container:host(:not([selected])):host(:hover) .container:not(.container--bottom){border-block-end-color:var(--calcite-tab-border-color, var(--calcite-color-border-1))}:host([bordered]) .container:host(:not([selected])):host(:hover):host(:not(:focus)) .selected-indicator{box-shadow:inset 0 var(--calcite-internal-tab-shadow-length) var(--calcite-tab-border-color, var(--calcite-color-border-1))}:host([bordered]) .container:host(:not([selected])):host(:hover):host(:not(:focus)) :not(.container--bottom){--calcite-internal-tab-shadow-length: 1px}:host([bordered]) .container:host(:not([selected])):host(:hover):host(:not(:focus)) .container--bottom{--calcite-internal-tab-shadow-length: -1px}:host([bordered]) .container:hover{background-color:var(--calcite-tab-background-color-hover, var(--calcite-color-foreground-2));border-block-end-color:var(--calcite-color-border-1)}:host(:hover) .selected-indicator{background-color:var(--calcite-color-border-3)}:host([selected]) .selected-indicator,:host([selected]:hover) .selected-indicator,:host(:focus) .selected-indicator,:host(:active) .selected-indicator{background-color:var(--calcite-tab-accent-color-press, var(--calcite-color-brand))}:host([closed]){display:none}:host([selected]) .container{border-color:transparent;color:var(--calcite-tab-text-color, var(--calcite-color-text-1))}:host([selected][bordered]) .container{border-inline-color:var(--calcite-tab-border-color, var(--calcite-color-border-1))}:host([selected][bordered]) .container:after{background-color:var(--calcite-tab-background-color, var(--calcite-color-foreground-1))}:host([selected][bordered]) .container:hover,:host([selected][bordered]) .container:active{background:transparent}:host(:focus) .container{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host(:focus) .container:focus-within{outline-color:transparent}:host([icon-start][icon-end]) .calcite-tab-title--icon:first-child{margin-inline-end:var(--calcite-spacing-sm)}:host([layout=inline][bordered]) .scale-m .content,:host([layout=center][bordered]) .scale-m .content{padding-inline:.75rem}:host([layout=inline][bordered]) .scale-s .content,:host([layout=center][bordered]) .scale-s .content{padding-inline:.5rem}:host([layout=inline][bordered]) .scale-l .content,:host([layout=center][bordered]) .scale-l .content{padding-inline:1rem}:host([layout=inline][closable]) .scale-s .content,:host([layout=inline][closable]) .scale-m .content,:host([layout=inline][closable]) .scale-l .content{padding-inline-end:0}@media(forced-colors:active){:host{outline-width:0;outline-offset:0}:host(:focus) .container{outline-color:highlight}:host([bordered][selected]) .container{border-block-end-style:none}:host([bordered][selected]) .container--bottom{border-block-start-style:none}.x-button{z-index:var(--calcite-z-index)}.selected-indicator{background-color:highlight}}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) .container{pointer-events:none;opacity:.5}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,h=class extends m{constructor(){super(),this.closeButtonRef=p(),this.guid=R.host(k()),this.mutationObserver=l("mutation",()=>this.updateHasText()),this.resizeObserver=l("resize",()=>{this.calciteInternalTabIconChanged.emit()}),this.messages=z(),this.hasText=!1,this.bordered=!1,this.closable=!1,this.closed=!1,this.disabled=!1,this.position="top",this.scale="m",this.selected=!1,this.calciteInternalTabIconChanged=e({cancelable:!1}),this.calciteInternalTabTitleRegister=e({cancelable:!1}),this.calciteInternalTabsActivate=e({cancelable:!1}),this.calciteInternalTabsClose=e({cancelable:!1}),this.calciteInternalTabsFocusFirst=e({cancelable:!1}),this.calciteInternalTabsFocusLast=e({cancelable:!1}),this.calciteInternalTabsFocusNext=e({cancelable:!1}),this.calciteInternalTabsFocusPrevious=e({cancelable:!1}),this.calciteTabsActivate=e({cancelable:!1}),this.calciteTabsClose=e({cancelable:!1}),this.listenOn(document.body,"calciteInternalTabChange",this.internalTabChangeHandler),this.listen("click",this.onClick),this.listen("keydown",this.keyDownHandler)}static{this.properties={controls:[16,{},{state:!0}],hasText:[16,{},{state:!0}],bordered:[7,{},{reflect:!0,type:Boolean}],closable:[7,{},{reflect:!0,type:Boolean}],closed:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],iconEnd:[3,{type:String},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{type:String},{reflect:!0}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],position:1,scale:1,selected:[7,{},{reflect:!0,type:Boolean}],tab:[3,{},{reflect:!0}]}}static{this.styles=S}async activateTab(t=!0){if(this.disabled||this.closed)return;let i={tab:this.tab,userTriggered:t};this.calciteInternalTabsActivate.emit(i),t&&requestAnimationFrame(()=>this.calciteTabsActivate.emit())}async getTabIdentifier(){return this.tab?this.tab:this.getTabIndex()}async getTabIndex(){return Array.prototype.indexOf.call(y(this.el.parentElement.children).filter(t=>t.matches("calcite-tab-title")),this.el)}_updateAriaInfo(t=[],i=[]){this.controls=t[i.indexOf(this.el.id)]||null}connectedCallback(){super.connectedCallback(),this.setupTextContentObserver(),this.parentTabsEl=this.el.closest("calcite-tabs")}async load(){this.updateHasText(),this.tab&&this.selected&&this.activateTab(!1)}willUpdate(t){t.has("selected")&&(this.hasUpdated||this.selected!==!1)&&this.selectedHandler(),this.parentTabsEl&&(this.layout=this.parentTabsEl.layout,this.bordered=this.parentTabsEl.bordered)}updated(){I(this)}async loaded(){this.calciteInternalTabTitleRegister.emit(await this.getTabIdentifier())}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),document.body?.dispatchEvent(new CustomEvent("calciteTabTitleUnregister",{detail:this.el})),this.resizeObserver?.disconnect()}selectedHandler(){this.selected&&this.activateTab(!1)}internalTabChangeHandler(t){t.composedPath().find(c=>c.tagName==="CALCITE-TABS")===this.parentTabsEl&&(this.tab?this.selected=this.tab===t.detail.tab:this.getTabIndex().then(c=>{this.selected=c===t.detail.tab}),t.stopPropagation())}onClick(){this.activateTab()}keyDownHandler(t){switch(t.key){case" ":case"Enter":t.composedPath().includes(this.closeButtonRef.value)||(this.activateTab(),t.preventDefault());break;case"ArrowRight":t.preventDefault(),d(this.el)==="ltr"?this.calciteInternalTabsFocusNext.emit():this.calciteInternalTabsFocusPrevious.emit();break;case"ArrowLeft":t.preventDefault(),d(this.el)==="ltr"?this.calciteInternalTabsFocusPrevious.emit():this.calciteInternalTabsFocusNext.emit();break;case"Home":t.preventDefault(),this.calciteInternalTabsFocusFirst.emit();break;case"End":t.preventDefault(),this.calciteInternalTabsFocusLast.emit();break}}closeClickHandler(){this.closeTabTitleAndNotify()}updateHasText(){this.hasText=this.el.textContent.trim().length>0}setContainerRef(t){g(this.resizeObserver,this.containerEl,t),this.containerEl=t}setupTextContentObserver(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}closeTabTitleAndNotify(){this.closed=!0,this.calciteInternalTabsClose.emit({tab:this.tab}),requestAnimationFrame(()=>this.calciteTabsClose.emit())}render(){let{el:t,closed:i}=this,c=t.id||this.guid,E=r`<calcite-icon class=${n({[o.titleIcon]:!0,[o.iconStart]:!0})} .flipRtl=${this.iconFlipRtl==="start"||this.iconFlipRtl==="both"} .icon=${this.iconStart} .scale=${b(this.scale)}></calcite-icon>`,F=r`<calcite-icon class=${n({[o.titleIcon]:!0,[o.iconEnd]:!0})} .flipRtl=${this.iconFlipRtl==="end"||this.iconFlipRtl==="both"} .icon=${this.iconEnd} .scale=${b(this.scale)}></calcite-icon>`;return s(this.el,"aria-controls",this.controls),this.el.ariaSelected=T(this.selected),s(this.el,"id",c),this.el.role="tab",s(this.el,"tabIndex",this.selected&&!this.disabled?0:-1),w({disabled:this.disabled,children:r`<div class=${n({[o.container]:!0,[o.containerBottom]:this.position==="bottom",[o.iconPresent]:!!this.iconStart||!!this.iconEnd,[o.scale(this.scale)]:!0})} .hidden=${i} ${f(this.setContainerRef)}><div class=${n({[o.content]:!0,[o.contentHasText]:this.hasText})}>${this.iconStart?E:null}<slot></slot>${this.iconEnd?F:null}</div>${this.renderCloseButton()}<div class=${n(o.selectedIndicator)}></div></div>`})}renderCloseButton(){let{closable:t,messages:i}=this;return t?x("close-button",C({disabled:!1,focusable:!0,label:i.close,onClick:this.closeClickHandler,ref:this.closeButtonRef,round:!1,scale:this.scale,title:i.close})):null}};v("calcite-tab-title",h);export{h as TabTitle};
|
|
3
|
+
v5.0.0-next.4 */
|
|
4
|
+
import{b as C}from"./HZVCGOQL.js";import{a as I,b as w}from"./PRB44CR7.js";import{a as x}from"./H42LHYUA.js";import{a as l,b as g}from"./J2NLU7RP.js";import{a as z}from"./PNBL2IVW.js";import"./D5SFHDV6.js";import{a as b}from"./TLLHA7VC.js";import"./VZVYZPXQ.js";import{c as y,e as d,q as T}from"./Z6CRZOOK.js";import{a as k}from"./XRJOD24G.js";import{B as p,C as f,D as m,E as n,H as s,P as v,g as u,h as r,o as e}from"./CSQVLDPF.js";var o={container:"container",containerBottom:"container--bottom",content:"content",contentHasText:"content--has-text",iconEnd:"icon-end",iconPresent:"icon-present",iconStart:"icon-start",titleIcon:"calcite-tab-title--icon",scale:a=>`scale-${a}`,selectedIndicator:"selected-indicator"},A="calcite-tab-title",R={host:a=>`${A}-${a}`},S=u`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block;outline:2px solid transparent;outline-offset:2px;margin-inline-start:0px}:host([layout=inline]){flex:0 1 auto}:host([layout=center]){flex:1 1 auto}.content{position:relative;margin-block-end:.125rem;box-sizing:border-box;display:flex;block-size:100%;align-items:center;justify-content:center}.scale-s .content{padding-block:.25rem;font-size:var(--calcite-font-size--2);line-height:1rem}.scale-s .x-button{inline-size:1.25rem}.scale-m .content{padding-block:.5rem;font-size:var(--calcite-font-size--1);line-height:1rem}.scale-m .x-button{inline-size:1.75rem}.scale-l .content{padding-block:.625rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}.scale-l .x-button{inline-size:2rem}:host([closable]) .content{border-block-end-color:transparent}:host([layout=inline]) .content,:host([layout=center]) .content{padding-inline:.25rem}:host([layout=center]) .scale-s,:host([layout=center]) .scale-m,:host([layout=center]) .scale-l{margin-block:0px;justify-content:center;text-align:center}:host([layout=center]) .scale-s .content,:host([layout=center]) .scale-m .content,:host([layout=center]) .scale-l .content{flex:1 1 auto;flex-grow:1}.container{position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;cursor:pointer;align-content:center;justify-content:space-between;padding-inline:0px;font-size:var(--calcite-font-size--1);line-height:1rem;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;outline-color:transparent;color:var(--calcite-tab-text-color, var(--calcite-color-text-3));background-color:var(--calcite-tab-background-color, transparent)}.selected-indicator{position:absolute;display:block;block-size:.125rem;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;inset-block-end:0;inset-inline-start:0;inset-inline-end:0;inline-size:100%}:host([bordered][selected]) .container:after{position:absolute;display:block;block-size:.125rem;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;inset-block-end:-1px;inset-inline-start:0;inset-inline-end:0;inline-size:100%;content:""}:host([bordered][selected]) .container.container--bottom:after{inset-block-start:-1px}:host([bordered][selected]:focus) .container:after{background:transparent}.container--bottom .selected-indicator{inset-block-end:unset;inset-block-start:0}:host(:not([bordered])) .container:hover,:host(:not([bordered])) .container:active{color:var(--calcite-color-text-1)}:host([bordered]:not([selected]):hover:not(:focus)) .selected-indicator{background-color:var(--calcite-color-foreground-2)}:host([bordered]:not([selected]):hover:not(:focus)) .container:not(.container--bottom) .selected-indicator{box-shadow:inset 0 1px var(--calcite-color-border-1)}:host([bordered]:not([selected]):hover:not(:focus)) .container.container--bottom .selected-indicator{box-shadow:inset 0 -1px var(--calcite-color-border-1)}:host([selected]:focus) .selected-indicator{block-size:4px}.calcite-tab-title--icon{position:relative;margin:0;display:inline-flex;align-self:center}.calcite-tab-title--icon svg{transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out}.content--has-text .icon-start,.content--has-text .calcite-tab-title--icon.icon-start{color:var(--calcite-tab-icon-color-start, var(--calcite-icon-color))}.content--has-text .calcite-tab-title--icon.icon-start .icon-end,.content--has-text .calcite-tab-title--icon.icon-end{color:var(--calcite-tab-icon-color-end, var(--calcite-icon-color))}.content--has-text{padding:.25rem}.content--has-text .calcite-tab-title--icon.icon-start{margin-inline-end:var(--calcite-spacing-sm)}.content--has-text .calcite-tab-title--icon.icon-end{margin-inline-start:var(--calcite-spacing-sm)}.x-button{display:flex;block-size:100%;cursor:pointer;appearance:none;align-content:center;align-items:center;justify-content:center;align-self:center;border-style:none;background-color:transparent;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;outline-color:transparent;margin-inline-start:var(--calcite-spacing-sm);margin-inline-end:var(--calcite-spacing-px);block-size:calc(100% - var(--calcite-spacing-xxs));color:var(--calcite-tab-close-icon-color, var(--calcite-color-text-3));background-color:var(--calcite-tab-close-icon-background-color, var(--calcite-color-transparent))}.x-button:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus)}.x-button:focus,.x-button:hover,.x-button:active{color:var(--calcite-tab-close-icon-color-press, var(--calcite-color-text-1));background-color:var(--calcite-tab-close-icon-background-color-press, var(--calcite-color-foreground-3))}:host([bordered]) .container{border-color:transparent;border-inline-width:var(--calcite-spacing-px);border-inline-style:solid}:host([bordered]) .container:hover,:host([bordered]) .container:active{color:var(--calcite-color-text-1)}:host([bordered]) .container .x-button calcite-icon{margin-block-start:var(--calcite-spacing-px)}:host([bordered]) .container .x-button:focus,:host([bordered]) .container .x-button:hover,:host([bordered]) .container .x-button:active{box-shadow:0 2px 0 0 var(--calcite-tab-close-icon-background-color-press, var(--calcite-color-foreground-3))}:host([bordered]) .container.container--bottom{border-block-start-style:solid;border-block-start-width:1px}:host([bordered]) .container.container--bottom .selected-indicator{inset-block-start:unset;inset-block-end:0}:host([bordered]) .container.container--bottom .x-button{box-shadow:0 -2px 0 0 var(--calcite-tab-close-icon-background-color, var(--calcite-color-transparent))}:host([bordered]) .container.container--bottom .x-button:focus,:host([bordered]) .container.container--bottom .x-button:hover,:host([bordered]) .container.container--bottom .x-button:active{box-shadow:0 -2px 0 0 var(--calcite-tab-close-icon-background-color-press, var(--calcite-color-foreground-3))}:host([bordered]) .container.container--bottom .x-button calcite-icon{margin-block-end:var(--calcite-spacing-px)}:host([bordered]) .container:not(.container--bottom){border-block-end-style:solid;border-block-end-width:1px}:host([bordered]) .container:not(.container--bottom) .x-button{block-size:calc(100% - var(--calcite-spacing-px));margin-block-start:-1px}:host([bordered]) .container .selected-indicator{inset-block-start:0;inset-block-end:unset;inset-inline-start:-1px;inset-inline-end:0;inline-size:calc(100% + var(--calcite-spacing-base))}:host([bordered]) .container:host(:not([selected])) .container .x-button{box-shadow:0 2px 0 0 transparent}:host([bordered]) .container:host(:not([selected])):host(:hover) .container:not(.container--bottom){border-block-end-color:var(--calcite-tab-border-color, var(--calcite-color-border-1))}:host([bordered]) .container:host(:not([selected])):host(:hover):host(:not(:focus)) .selected-indicator{box-shadow:inset 0 var(--calcite-internal-tab-shadow-length) var(--calcite-tab-border-color, var(--calcite-color-border-1))}:host([bordered]) .container:host(:not([selected])):host(:hover):host(:not(:focus)) :not(.container--bottom){--calcite-internal-tab-shadow-length: 1px}:host([bordered]) .container:host(:not([selected])):host(:hover):host(:not(:focus)) .container--bottom{--calcite-internal-tab-shadow-length: -1px}:host([bordered]) .container:hover{background-color:var(--calcite-tab-background-color-hover, var(--calcite-color-foreground-2));border-block-end-color:var(--calcite-color-border-1)}:host(:hover) .selected-indicator{background-color:var(--calcite-color-border-3)}:host([selected]) .selected-indicator,:host([selected]:hover) .selected-indicator,:host(:focus) .selected-indicator,:host(:active) .selected-indicator{background-color:var(--calcite-tab-accent-color-press, var(--calcite-color-brand))}:host([closed]){display:none}:host([selected]) .container{border-color:transparent;color:var(--calcite-tab-text-color, var(--calcite-color-text-1))}:host([selected][bordered]) .container{border-inline-color:var(--calcite-tab-border-color, var(--calcite-color-border-1))}:host([selected][bordered]) .container:after{background-color:var(--calcite-tab-background-color, var(--calcite-color-foreground-1))}:host([selected][bordered]) .container:hover,:host([selected][bordered]) .container:active{background:transparent}:host(:focus) .container{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host(:focus) .container:focus-within{outline-color:transparent}:host([icon-start][icon-end]) .calcite-tab-title--icon:first-child{margin-inline-end:var(--calcite-spacing-sm)}:host([layout=inline][bordered]) .scale-m .content,:host([layout=center][bordered]) .scale-m .content{padding-inline:.75rem}:host([layout=inline][bordered]) .scale-s .content,:host([layout=center][bordered]) .scale-s .content{padding-inline:.5rem}:host([layout=inline][bordered]) .scale-l .content,:host([layout=center][bordered]) .scale-l .content{padding-inline:1rem}:host([layout=inline][closable]) .scale-s .content,:host([layout=inline][closable]) .scale-m .content,:host([layout=inline][closable]) .scale-l .content{padding-inline-end:0}@media(forced-colors:active){:host{outline-width:0;outline-offset:0}:host(:focus) .container{outline-color:highlight}:host([bordered][selected]) .container{border-block-end-style:none}:host([bordered][selected]) .container--bottom{border-block-start-style:none}.x-button{z-index:var(--calcite-z-index)}.selected-indicator{background-color:highlight}}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) .container{pointer-events:none;opacity:.5}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,h=class extends m{constructor(){super(),this.closeButtonRef=p(),this.guid=R.host(k()),this.mutationObserver=l("mutation",()=>this.updateHasText()),this.resizeObserver=l("resize",()=>{this.calciteInternalTabIconChanged.emit()}),this.messages=z(),this.hasText=!1,this.bordered=!1,this.closable=!1,this.closed=!1,this.disabled=!1,this.position="top",this.scale="m",this.selected=!1,this.calciteInternalTabIconChanged=e({cancelable:!1}),this.calciteInternalTabTitleRegister=e({cancelable:!1}),this.calciteInternalTabsActivate=e({cancelable:!1}),this.calciteInternalTabsClose=e({cancelable:!1}),this.calciteInternalTabsFocusFirst=e({cancelable:!1}),this.calciteInternalTabsFocusLast=e({cancelable:!1}),this.calciteInternalTabsFocusNext=e({cancelable:!1}),this.calciteInternalTabsFocusPrevious=e({cancelable:!1}),this.calciteTabsActivate=e({cancelable:!1}),this.calciteTabsClose=e({cancelable:!1}),this.listenOn(document.body,"calciteInternalTabChange",this.internalTabChangeHandler),this.listen("click",this.onClick),this.listen("keydown",this.keyDownHandler)}static{this.properties={controls:[16,{},{state:!0}],hasText:[16,{},{state:!0}],bordered:[7,{},{reflect:!0,type:Boolean}],closable:[7,{},{reflect:!0,type:Boolean}],closed:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],iconEnd:[3,{type:String},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{type:String},{reflect:!0}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],position:1,scale:1,selected:[7,{},{reflect:!0,type:Boolean}],tab:[3,{},{reflect:!0}]}}static{this.styles=S}async activateTab(t=!0){if(this.disabled||this.closed)return;let i={tab:this.tab,userTriggered:t};this.calciteInternalTabsActivate.emit(i),t&&requestAnimationFrame(()=>this.calciteTabsActivate.emit())}async getTabIdentifier(){return this.tab?this.tab:this.getTabIndex()}async getTabIndex(){return Array.prototype.indexOf.call(y(this.el.parentElement.children).filter(t=>t.matches("calcite-tab-title")),this.el)}_updateAriaInfo(t=[],i=[]){this.controls=t[i.indexOf(this.el.id)]||null}connectedCallback(){super.connectedCallback(),this.setupTextContentObserver(),this.parentTabsEl=this.el.closest("calcite-tabs")}async load(){this.updateHasText(),this.tab&&this.selected&&this.activateTab(!1)}willUpdate(t){t.has("selected")&&(this.hasUpdated||this.selected!==!1)&&this.selectedHandler(),this.parentTabsEl&&(this.layout=this.parentTabsEl.layout,this.bordered=this.parentTabsEl.bordered)}updated(){I(this)}async loaded(){this.calciteInternalTabTitleRegister.emit(await this.getTabIdentifier())}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),document.body?.dispatchEvent(new CustomEvent("calciteTabTitleUnregister",{detail:this.el})),this.resizeObserver?.disconnect()}selectedHandler(){this.selected&&this.activateTab(!1)}internalTabChangeHandler(t){t.composedPath().find(c=>c.tagName==="CALCITE-TABS")===this.parentTabsEl&&(this.tab?this.selected=this.tab===t.detail.tab:this.getTabIndex().then(c=>{this.selected=c===t.detail.tab}),t.stopPropagation())}onClick(){this.activateTab()}keyDownHandler(t){switch(t.key){case" ":case"Enter":t.composedPath().includes(this.closeButtonRef.value)||(this.activateTab(),t.preventDefault());break;case"ArrowRight":t.preventDefault(),d(this.el)==="ltr"?this.calciteInternalTabsFocusNext.emit():this.calciteInternalTabsFocusPrevious.emit();break;case"ArrowLeft":t.preventDefault(),d(this.el)==="ltr"?this.calciteInternalTabsFocusPrevious.emit():this.calciteInternalTabsFocusNext.emit();break;case"Home":t.preventDefault(),this.calciteInternalTabsFocusFirst.emit();break;case"End":t.preventDefault(),this.calciteInternalTabsFocusLast.emit();break}}closeClickHandler(){this.closeTabTitleAndNotify()}updateHasText(){this.hasText=this.el.textContent.trim().length>0}setContainerRef(t){g(this.resizeObserver,this.containerEl,t),this.containerEl=t}setupTextContentObserver(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}closeTabTitleAndNotify(){this.closed=!0,this.calciteInternalTabsClose.emit({tab:this.tab}),requestAnimationFrame(()=>this.calciteTabsClose.emit())}render(){let{el:t,closed:i}=this,c=t.id||this.guid,E=r`<calcite-icon class=${n({[o.titleIcon]:!0,[o.iconStart]:!0})} .flipRtl=${this.iconFlipRtl==="start"||this.iconFlipRtl==="both"} .icon=${this.iconStart} .scale=${b(this.scale)}></calcite-icon>`,F=r`<calcite-icon class=${n({[o.titleIcon]:!0,[o.iconEnd]:!0})} .flipRtl=${this.iconFlipRtl==="end"||this.iconFlipRtl==="both"} .icon=${this.iconEnd} .scale=${b(this.scale)}></calcite-icon>`;return s(this.el,"aria-controls",this.controls),this.el.ariaSelected=T(this.selected),s(this.el,"id",c),this.el.role="tab",s(this.el,"tabIndex",this.selected&&!this.disabled?0:-1),w({disabled:this.disabled,children:r`<div class=${n({[o.container]:!0,[o.containerBottom]:this.position==="bottom",[o.iconPresent]:!!this.iconStart||!!this.iconEnd,[o.scale(this.scale)]:!0})} .hidden=${i} ${f(this.setContainerRef)}><div class=${n({[o.content]:!0,[o.contentHasText]:this.hasText})}>${this.iconStart?E:null}<slot></slot>${this.iconEnd?F:null}</div>${this.renderCloseButton()}<div class=${n(o.selectedIndicator)}></div></div>`})}renderCloseButton(){let{closable:t,messages:i}=this;return t?x("close-button",C({disabled:!1,focusable:!0,label:i.close,onClick:this.closeClickHandler,ref:this.closeButtonRef,round:!1,scale:this.scale,title:i.close})):null}};v("calcite-tab-title",h);export{h as TabTitle};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.4 */
|
|
4
4
|
var c={max:"320px"},a={max:"476px"},i={max:"768px"},t={max:"1152px"},e="8px",n="12px",s="16px",x="2px",o="0.25rem",p="0.5rem";export{c as a,a as b,i as c,t as d,e,n as f,s as g,x as h,o as i,p as j};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{e as $,f as q,g as B}from"./YA2XH3BT.js";var M={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};var G=Object.create(null);for(let t in M)Object.hasOwn(M,t)&&(G[M[t]]=t);var _={to:{},get:{}};_.get=function(t){let e=t.slice(0,3).toLowerCase(),n,r;switch(e){case"hsl":{n=_.get.hsl(t),r="hsl";break}case"hwb":{n=_.get.hwb(t),r="hwb";break}default:{n=_.get.rgb(t),r="rgb";break}}return n?{model:r,value:n}:null};_.get.rgb=function(t){if(!t)return null;let e=/^#([a-f\d]{3,4})$/i,n=/^#([a-f\d]{6})([a-f\d]{2})?$/i,r=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,o=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,s=/^(\w+)$/,a=[0,0,0,1],l,i,h;if(l=t.match(n)){for(h=l[2],l=l[1],i=0;i<3;i++){let p=i*2;a[i]=Number.parseInt(l.slice(p,p+2),16)}h&&(a[3]=Number.parseInt(h,16)/255)}else if(l=t.match(e)){for(l=l[1],h=l[3],i=0;i<3;i++)a[i]=Number.parseInt(l[i]+l[i],16);h&&(a[3]=Number.parseInt(h+h,16)/255)}else if(l=t.match(r)){for(i=0;i<3;i++)a[i]=Number.parseInt(l[i+1],10);l[4]&&(a[3]=l[5]?Number.parseFloat(l[4])*.01:Number.parseFloat(l[4]))}else if(l=t.match(o)){for(i=0;i<3;i++)a[i]=Math.round(Number.parseFloat(l[i+1])*2.55);l[4]&&(a[3]=l[5]?Number.parseFloat(l[4])*.01:Number.parseFloat(l[4]))}else return(l=t.match(s))?l[1]==="transparent"?[0,0,0,0]:Object.hasOwn(M,l[1])?(a=M[l[1]],a[3]=1,a):null:null;for(i=0;i<3;i++)a[i]=v(a[i],0,255);return a[3]=v(a[3],0,1),a};_.get.hsl=function(t){if(!t)return null;let e=/^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*)?\)$/,n=t.match(e);if(n){let r=Number.parseFloat(n[4]),o=(Number.parseFloat(n[1])%360+360)%360,s=v(Number.parseFloat(n[2]),0,100),a=v(Number.parseFloat(n[3]),0,100),l=v(Number.isNaN(r)?1:r,0,1);return[o,s,a,l]}return null};_.get.hwb=function(t){if(!t)return null;let e=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,n=t.match(e);if(n){let r=Number.parseFloat(n[4]),o=(Number.parseFloat(n[1])%360+360)%360,s=v(Number.parseFloat(n[2]),0,100),a=v(Number.parseFloat(n[3]),0,100),l=v(Number.isNaN(r)?1:r,0,1);return[o,s,a,l]}return null};_.to.hex=function(...t){return"#"+N(t[0])+N(t[1])+N(t[2])+(t[3]<1?N(Math.round(t[3]*255)):"")};_.to.rgb=function(...t){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]+")"};_.to.rgb.percent=function(...t){let e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||t[3]===1?"rgb("+e+"%, "+n+"%, "+r+"%)":"rgba("+e+"%, "+n+"%, "+r+"%, "+t[3]+")"};_.to.hsl=function(...t){return t.length<4||t[3]===1?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};_.to.hwb=function(...t){let e="";return t.length>=4&&t[3]!==1&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"};_.to.keyword=function(...t){return G[t.slice(0,3)]};function v(t,e,n){return Math.min(Math.max(e,t),n)}function N(t){let e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}var S=_;var x={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};var T={};for(let t of Object.keys(x))T[x[t]]=t;var c={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},k=c,w=(6/29)**3;function A(t){let e=t>.0031308?1.055*t**.4166666666666667-.055:t*12.92;return Math.min(Math.max(0,e),1)}function F(t){return t>.04045?((t+.055)/1.055)**2.4:t/12.92}for(let t of Object.keys(c)){if(!("channels"in c[t]))throw new Error("missing channels property: "+t);if(!("labels"in c[t]))throw new Error("missing channel labels property: "+t);if(c[t].labels.length!==c[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:n}=c[t];delete c[t].channels,delete c[t].labels,Object.defineProperty(c[t],"channels",{value:e}),Object.defineProperty(c[t],"labels",{value:n})}c.rgb.hsl=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255,o=Math.min(e,n,r),s=Math.max(e,n,r),a=s-o,l,i;switch(s){case o:{l=0;break}case e:{l=(n-r)/a;break}case n:{l=2+(r-e)/a;break}case r:{l=4+(e-n)/a;break}}l=Math.min(l*60,360),l<0&&(l+=360);let h=(o+s)/2;return s===o?i=0:h<=.5?i=a/(s+o):i=a/(2-s-o),[l,i*100,h*100]};c.rgb.hsv=function(t){let e,n,r,o,s,a=t[0]/255,l=t[1]/255,i=t[2]/255,h=Math.max(a,l,i),p=h-Math.min(a,l,i),y=function(J){return(h-J)/6/p+1/2};if(p===0)o=0,s=0;else{switch(s=p/h,e=y(a),n=y(l),r=y(i),h){case a:{o=r-n;break}case l:{o=1/3+e-r;break}case i:{o=2/3+n-e;break}}o<0?o+=1:o>1&&(o-=1)}return[o*360,s*100,h*100]};c.rgb.hwb=function(t){let e=t[0],n=t[1],r=t[2],o=c.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(n,r));return r=1-1/255*Math.max(e,Math.max(n,r)),[o,s*100,r*100]};c.rgb.oklab=function(t){let e=F(t[0]/255),n=F(t[1]/255),r=F(t[2]/255),o=Math.cbrt(.4122214708*e+.5363325363*n+.0514459929*r),s=Math.cbrt(.2119034982*e+.6806995451*n+.1073969566*r),a=Math.cbrt(.0883024619*e+.2817188376*n+.6299787005*r),l=.2104542553*o+.793617785*s-.0040720468*a,i=1.9779984951*o-2.428592205*s+.4505937099*a,h=.0259040371*o+.7827717662*s-.808675766*a;return[l*100,i*100,h*100]};c.rgb.cmyk=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255,o=Math.min(1-e,1-n,1-r),s=(1-e-o)/(1-o)||0,a=(1-n-o)/(1-o)||0,l=(1-r-o)/(1-o)||0;return[s*100,a*100,l*100,o*100]};function Z(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}c.rgb.keyword=function(t){let e=T[t];if(e)return e;let n=Number.POSITIVE_INFINITY,r;for(let o of Object.keys(x)){let s=x[o],a=Z(t,s);a<n&&(n=a,r=o)}return r};c.keyword.rgb=function(t){return x[t]};c.rgb.xyz=function(t){let e=F(t[0]/255),n=F(t[1]/255),r=F(t[2]/255),o=e*.4124564+n*.3575761+r*.1804375,s=e*.2126729+n*.7151522+r*.072175,a=e*.0193339+n*.119192+r*.9503041;return[o*100,s*100,a*100]};c.rgb.lab=function(t){let e=c.rgb.xyz(t),n=e[0],r=e[1],o=e[2];n/=95.047,r/=100,o/=108.883,n=n>w?n**(1/3):7.787*n+16/116,r=r>w?r**(1/3):7.787*r+16/116,o=o>w?o**(1/3):7.787*o+16/116;let s=116*r-16,a=500*(n-r),l=200*(r-o);return[s,a,l]};c.hsl.rgb=function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,o,s;if(n===0)return s=r*255,[s,s,s];let a=r<.5?r*(1+n):r+n-r*n,l=2*r-a,i=[0,0,0];for(let h=0;h<3;h++)o=e+1/3*-(h-1),o<0&&o++,o>1&&o--,6*o<1?s=l+(a-l)*6*o:2*o<1?s=a:3*o<2?s=l+(a-l)*(2/3-o)*6:s=l,i[h]=s*255;return i};c.hsl.hsv=function(t){let e=t[0],n=t[1]/100,r=t[2]/100,o=n,s=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=s<=1?s:2-s;let a=(r+n)/2,l=r===0?2*o/(s+o):2*n/(r+n);return[e,l*100,a*100]};c.hsv.rgb=function(t){let e=t[0]/60,n=t[1]/100,r=t[2]/100,o=Math.floor(e)%6,s=e-Math.floor(e),a=255*r*(1-n),l=255*r*(1-n*s),i=255*r*(1-n*(1-s));switch(r*=255,o){case 0:return[r,i,a];case 1:return[l,r,a];case 2:return[a,r,i];case 3:return[a,l,r];case 4:return[i,a,r];case 5:return[r,a,l]}};c.hsv.hsl=function(t){let e=t[0],n=t[1]/100,r=t[2]/100,o=Math.max(r,.01),s,a;a=(2-n)*r;let l=(2-n)*o;return s=n*o,s/=l<=1?l:2-l,s=s||0,a/=2,[e,s*100,a*100]};c.hwb.rgb=function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,o=n+r,s;o>1&&(n/=o,r/=o);let a=Math.floor(6*e),l=1-r;s=6*e-a,(a&1)!==0&&(s=1-s);let i=n+s*(l-n),h,p,y;switch(a){default:case 6:case 0:{h=l,p=i,y=n;break}case 1:{h=i,p=l,y=n;break}case 2:{h=n,p=l,y=i;break}case 3:{h=n,p=i,y=l;break}case 4:{h=i,p=n,y=l;break}case 5:{h=l,p=n,y=i;break}}return[h*255,p*255,y*255]};c.cmyk.rgb=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,o=t[3]/100,s=1-Math.min(1,e*(1-o)+o),a=1-Math.min(1,n*(1-o)+o),l=1-Math.min(1,r*(1-o)+o);return[s*255,a*255,l*255]};c.xyz.rgb=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,o,s,a;return o=e*3.2404542+n*-1.5371385+r*-.4985314,s=e*-.969266+n*1.8760108+r*.041556,a=e*.0556434+n*-.2040259+r*1.0572252,o=A(o),s=A(s),a=A(a),[o*255,s*255,a*255]};c.xyz.lab=function(t){let e=t[0],n=t[1],r=t[2];e/=95.047,n/=100,r/=108.883,e=e>w?e**(1/3):7.787*e+16/116,n=n>w?n**(1/3):7.787*n+16/116,r=r>w?r**(1/3):7.787*r+16/116;let o=116*n-16,s=500*(e-n),a=200*(n-r);return[o,s,a]};c.xyz.oklab=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,o=Math.cbrt(.8189330101*e+.3618667424*n-.1288597137*r),s=Math.cbrt(.0329845436*e+.9293118715*n+.0361456387*r),a=Math.cbrt(.0482003018*e+.2643662691*n+.633851707*r),l=.2104542553*o+.793617785*s-.0040720468*a,i=1.9779984951*o-2.428592205*s+.4505937099*a,h=.0259040371*o+.7827717662*s-.808675766*a;return[l*100,i*100,h*100]};c.oklab.oklch=function(t){return c.lab.lch(t)};c.oklab.xyz=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,o=(.999999998*e+.396337792*n+.215803758*r)**3,s=(1.000000008*e-.105561342*n-.063854175*r)**3,a=(1.000000055*e-.089484182*n-1.291485538*r)**3,l=1.227013851*o-.55779998*s+.281256149*a,i=-.040580178*o+1.11225687*s-.071676679*a,h=-.076381285*o-.421481978*s+1.58616322*a;return[l*100,i*100,h*100]};c.oklab.rgb=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,o=(e+.3963377774*n+.2158037573*r)**3,s=(e-.1055613458*n-.0638541728*r)**3,a=(e-.0894841775*n-1.291485548*r)**3,l=A(4.0767416621*o-3.3077115913*s+.2309699292*a),i=A(-1.2684380046*o+2.6097574011*s-.3413193965*a),h=A(-.0041960863*o-.7034186147*s+1.707614701*a);return[l*255,i*255,h*255]};c.oklch.oklab=function(t){return c.lch.lab(t)};c.lab.xyz=function(t){let e=t[0],n=t[1],r=t[2],o,s,a;s=(e+16)/116,o=n/500+s,a=s-r/200;let l=s**3,i=o**3,h=a**3;return s=l>w?l:(s-16/116)/7.787,o=i>w?i:(o-16/116)/7.787,a=h>w?h:(a-16/116)/7.787,o*=95.047,s*=100,a*=108.883,[o,s,a]};c.lab.lch=function(t){let e=t[0],n=t[1],r=t[2],o;o=Math.atan2(r,n)*360/2/Math.PI,o<0&&(o+=360);let a=Math.sqrt(n*n+r*r);return[e,a,o]};c.lch.lab=function(t){let e=t[0],n=t[1],o=t[2]/360*2*Math.PI,s=n*Math.cos(o),a=n*Math.sin(o);return[e,s,a]};c.rgb.ansi16=function(t,e=null){let[n,r,o]=t,s=e===null?c.rgb.hsv(t)[2]:e;if(s=Math.round(s/50),s===0)return 30;let a=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return s===2&&(a+=60),a};c.hsv.ansi16=function(t){return c.rgb.ansi16(c.hsv.rgb(t),t[2])};c.rgb.ansi256=function(t){let e=t[0],n=t[1],r=t[2];return e>>4===n>>4&&n>>4===r>>4?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};c.ansi16.rgb=function(t){t=t[0];let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let n=(Math.trunc(t>50)+1)*.5,r=(e&1)*n*255,o=(e>>1&1)*n*255,s=(e>>2&1)*n*255;return[r,o,s]};c.ansi256.rgb=function(t){if(t=t[0],t>=232){let s=(t-232)*10+8;return[s,s,s]}t-=16;let e,n=Math.floor(t/36)/5*255,r=Math.floor((e=t%36)/6)/5*255,o=e%6/5*255;return[n,r,o]};c.rgb.hex=function(t){let n=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".slice(n.length)+n};c.hex.rgb=function(t){let e=t.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!e)return[0,0,0];let n=e[0];e[0].length===3&&(n=[...n].map(l=>l+l).join(""));let r=Number.parseInt(n,16),o=r>>16&255,s=r>>8&255,a=r&255;return[o,s,a]};c.rgb.hcg=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255,o=Math.max(Math.max(e,n),r),s=Math.min(Math.min(e,n),r),a=o-s,l,i=a<1?s/(1-a):0;return a<=0?l=0:o===e?l=(n-r)/a%6:o===n?l=2+(r-e)/a:l=4+(e-n)/a,l/=6,l%=1,[l*360,a*100,i*100]};c.hsl.hcg=function(t){let e=t[1]/100,n=t[2]/100,r=n<.5?2*e*n:2*e*(1-n),o=0;return r<1&&(o=(n-.5*r)/(1-r)),[t[0],r*100,o*100]};c.hsv.hcg=function(t){let e=t[1]/100,n=t[2]/100,r=e*n,o=0;return r<1&&(o=(n-r)/(1-r)),[t[0],r*100,o*100]};c.hcg.rgb=function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100;if(n===0)return[r*255,r*255,r*255];let o=[0,0,0],s=e%1*6,a=s%1,l=1-a,i=0;switch(Math.floor(s)){case 0:{o[0]=1,o[1]=a,o[2]=0;break}case 1:{o[0]=l,o[1]=1,o[2]=0;break}case 2:{o[0]=0,o[1]=1,o[2]=a;break}case 3:{o[0]=0,o[1]=l,o[2]=1;break}case 4:{o[0]=a,o[1]=0,o[2]=1;break}default:o[0]=1,o[1]=0,o[2]=l}return i=(1-n)*r,[(n*o[0]+i)*255,(n*o[1]+i)*255,(n*o[2]+i)*255]};c.hcg.hsv=function(t){let e=t[1]/100,n=t[2]/100,r=e+n*(1-e),o=0;return r>0&&(o=e/r),[t[0],o*100,r*100]};c.hcg.hsl=function(t){let e=t[1]/100,r=t[2]/100*(1-e)+.5*e,o=0;return r>0&&r<.5?o=e/(2*r):r>=.5&&r<1&&(o=e/(2*(1-r))),[t[0],o*100,r*100]};c.hcg.hwb=function(t){let e=t[1]/100,n=t[2]/100,r=e+n*(1-e);return[t[0],(r-e)*100,(1-r)*100]};c.hwb.hcg=function(t){let e=t[1]/100,r=1-t[2]/100,o=r-e,s=0;return o<1&&(s=(r-o)/(1-o)),[t[0],o*100,s*100]};c.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};c.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};c.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};c.gray.hsl=function(t){return[0,0,t[0]]};c.gray.hsv=c.gray.hsl;c.gray.hwb=function(t){return[0,100,t[0]]};c.gray.cmyk=function(t){return[0,0,0,t[0]]};c.gray.lab=function(t){return[t[0],0,0]};c.gray.hex=function(t){let e=Math.round(t[0]/100*255)&255,r=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".slice(r.length)+r};c.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]};function Q(){let t={},e=Object.keys(k);for(let{length:n}=e,r=0;r<n;r++)t[e[r]]={distance:-1,parent:null};return t}function V(t){let e=Q(),n=[t];for(e[t].distance=0;n.length>0;){let r=n.pop(),o=Object.keys(k[r]);for(let{length:s}=o,a=0;a<s;a++){let l=o[a],i=e[l];i.distance===-1&&(i.distance=e[r].distance+1,i.parent=r,n.unshift(l))}}return e}function tt(t,e){return function(n){return e(t(n))}}function et(t,e){let n=[e[t].parent,t],r=k[e[t].parent][t],o=e[t].parent;for(;e[o].parent;)n.unshift(e[o].parent),r=tt(k[e[o].parent][o],r),o=e[o].parent;return r.conversion=n,r}function nt(t){let e=V(t),n={},r=Object.keys(e);for(let{length:o}=r,s=0;s<o;s++){let a=r[s];e[a].parent!==null&&(n[a]=et(a,e))}return n}var W=nt;var C={},rt=Object.keys(k);function ot(t){let e=function(...n){let r=n[0];return r==null?r:(r.length>1&&(n=r),t(n))};return"conversion"in t&&(e.conversion=t.conversion),e}function st(t){let e=function(...n){let r=n[0];if(r==null)return r;r.length>1&&(n=r);let o=t(n);if(typeof o=="object")for(let{length:s}=o,a=0;a<s;a++)o[a]=Math.round(o[a]);return o};return"conversion"in t&&(e.conversion=t.conversion),e}for(let t of rt){C[t]={},Object.defineProperty(C[t],"channels",{value:k[t].channels}),Object.defineProperty(C[t],"labels",{value:k[t].labels});let e=W(t),n=Object.keys(e);for(let r of n){let o=e[r];C[t][r]=st(o),C[t][r].raw=ot(o)}}var m=C;var P=["keyword","gray","hex"],O={};for(let t of Object.keys(m))O[[...m[t].labels].sort().join("")]=t;var L={};function g(t,e){if(!(this instanceof g))return new g(t,e);if(e&&e in P&&(e=null),e&&!(e in m))throw new Error("Unknown model: "+e);let n,r;if(t==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof g)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if(typeof t=="string"){let o=S.get(t);if(o===null)throw new Error("Unable to parse color from string: "+t);this.model=o.model,r=m[this.model].channels,this.color=o.value.slice(0,r),this.valpha=typeof o.value[r]=="number"?o.value[r]:1}else if(t.length>0){this.model=e||"rgb",r=m[this.model].channels;let o=Array.prototype.slice.call(t,0,r);this.color=z(o,r),this.valpha=typeof t[r]=="number"?t[r]:1}else if(typeof t=="number")this.model="rgb",this.color=[t>>16&255,t>>8&255,t&255],this.valpha=1;else{this.valpha=1;let o=Object.keys(t);"alpha"in t&&(o.splice(o.indexOf("alpha"),1),this.valpha=typeof t.alpha=="number"?t.alpha:0);let s=o.sort().join("");if(!(s in O))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=O[s];let{labels:a}=m[this.model],l=[];for(n=0;n<a.length;n++)l.push(t[a[n]]);this.color=z(l)}if(L[this.model])for(r=m[this.model].channels,n=0;n<r;n++){let o=L[this.model][n];o&&(this.color[n]=o(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}g.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let e=this.model in S.to?this:this.rgb();e=e.round(typeof t=="number"?t:1);let n=e.valpha===1?e.color:[...e.color,this.valpha];return S.to[e.model](...n)},percentString(t){let e=this.rgb().round(typeof t=="number"?t:1),n=e.valpha===1?e.color:[...e.color,this.valpha];return S.to.rgb.percent(...n)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let t={},{channels:e}=m[this.model],{labels:n}=m[this.model];for(let r=0;r<e;r++)t[n[r]]=this.color[r];return this.valpha!==1&&(t.alpha=this.valpha),t},unitArray(){let t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,this.valpha!==1&&t.push(this.valpha),t},unitObject(){let t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,this.valpha!==1&&(t.alpha=this.valpha),t},round(t){return t=Math.max(t||0,0),new g([...this.color.map(lt(t)),this.valpha],this.model)},alpha(t){return t!==void 0?new g([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},red:u("rgb",0,b(255)),green:u("rgb",1,b(255)),blue:u("rgb",2,b(255)),hue:u(["hsl","hsv","hsl","hwb","hcg"],0,t=>(t%360+360)%360),saturationl:u("hsl",1,b(100)),lightness:u("hsl",2,b(100)),saturationv:u("hsv",1,b(100)),value:u("hsv",2,b(100)),chroma:u("hcg",1,b(100)),gray:u("hcg",2,b(100)),white:u("hwb",1,b(100)),wblack:u("hwb",2,b(100)),cyan:u("cmyk",0,b(100)),magenta:u("cmyk",1,b(100)),yellow:u("cmyk",2,b(100)),black:u("cmyk",3,b(100)),x:u("xyz",0,b(95.047)),y:u("xyz",1,b(100)),z:u("xyz",2,b(108.833)),l:u("lab",0,b(100)),a:u("lab",1),b:u("lab",2),keyword(t){return t!==void 0?new g(t):m[this.model].keyword(this.color)},hex(t){return t!==void 0?new g(t):S.to.hex(...this.rgb().round().color)},hexa(t){if(t!==void 0)return new g(t);let e=this.rgb().round().color,n=Math.round(this.valpha*255).toString(16).toUpperCase();return n.length===1&&(n="0"+n),S.to.hex(...e)+n},rgbNumber(){let t=this.rgb().color;return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255},luminosity(){let t=this.rgb().color,e=[];for(let[n,r]of t.entries()){let o=r/255;e[n]=o<=.04045?o/12.92:((o+.055)/1.055)**2.4}return .2126*e[0]+.7152*e[1]+.0722*e[2]},contrast(t){let e=this.luminosity(),n=t.luminosity();return e>n?(e+.05)/(n+.05):(n+.05)/(e+.05)},level(t){let e=this.contrast(t);return e>=7?"AAA":e>=4.5?"AA":""},isDark(){let t=this.rgb().color;return(t[0]*2126+t[1]*7152+t[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let t=this.rgb();for(let e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten(t){let e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){let e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate(t){let e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate(t){let e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten(t){let e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken(t){let e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale(){let t=this.rgb().color,e=t[0]*.3+t[1]*.59+t[2]*.11;return g.rgb(e,e,e)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){let e=this.hsl(),n=e.color[0];return n=(n+t)%360,n=n<0?360+n:n,e.color[0]=n,e},mix(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);let n=t.rgb(),r=this.rgb(),o=e===void 0?.5:e,s=2*o-1,a=n.alpha()-r.alpha(),l=((s*a===-1?s:(s+a)/(1+s*a))+1)/2,i=1-l;return g.rgb(l*n.red()+i*r.red(),l*n.green()+i*r.green(),l*n.blue()+i*r.blue(),n.alpha()*o+r.alpha()*(1-o))}};for(let t of Object.keys(m)){if(P.includes(t))continue;let{channels:e}=m[t];g.prototype[t]=function(...n){return this.model===t?new g(this):n.length>0?new g(n,t):new g([...it(m[this.model][t].raw(this.color)),this.valpha],t)},g[t]=function(...n){let r=n[0];return typeof r=="number"&&(r=z(n,e)),new g(r,t)}}function at(t,e){return Number(t.toFixed(e))}function lt(t){return function(e){return at(e,t)}}function u(t,e,n){t=Array.isArray(t)?t:[t];for(let r of t)(L[r]||=[])[e]=n;return t=t[0],function(r){let o;return r!==void 0?(n&&(r=n(r)),o=this[t](),o.color[e]=r,o):(o=this[t]().color[e],n&&(o=n(o)),o)}}function b(t){return function(e){return Math.max(0,Math.min(t,e))}}function it(t){return Array.isArray(t)?t:[t]}function z(t,e){for(let n=0;n<e;n++)typeof t[n]!="number"&&(t[n]=0);return t}var E=g;var Et={channel:"channel",channels:"channels",colorField:"color-field",colorFieldScope:"scope--color-field",colorMode:"color-mode",colorModeContainer:"color-mode-container",container:"container",control:"control",controlAndScope:"control-and-scope",controlSection:"control-section",deleteColor:"delete-color",header:"header",hexAndChannelsGroup:"hex-and-channels-group",hexOptions:"color-hex-options",hueScope:"scope--hue",hueSlider:"hue-slider",opacityScope:"scope--opacity",opacitySlider:"opacity-slider",preview:"preview",previewAndSliders:"preview-and-sliders",saveColor:"save-color",savedColor:"saved-color",savedColorsButtons:"saved-colors-buttons",savedColorsSection:"saved-colors-section",scope:"scope",section:"section",slider:"slider",sliders:"sliders",splitSection:"section--split",swatchGroup:"swatch-group"},Rt=E("#007AC2"),$t="calcite-color-",qt={r:255,g:255,b:255},ct={h:360,s:100,v:100},Bt=ct.h-1,Gt={min:0,max:100},ht={s:{gap:parseInt($),slider:{height:12},thumb:{radius:7},preview:{size:20},minWidth:200},m:{gap:parseInt(q),slider:{height:12},thumb:{radius:7},preview:{size:24},minWidth:240},l:{gap:parseInt(B),slider:{height:12},thumb:{radius:7},preview:{size:32},minWidth:304}},Tt=1,Wt={minus:"minus",plus:"plus"},Pt=/^[0-9A-F]$/i,ut=/^#[0-9A-F]{3}$/i,ft=/^#[0-9A-F]{6}$/i,dt=/^#[0-9A-F]{4}$/i,bt=/^#[0-9A-F]{8}$/i;function jt(t,e=!1,n){return e&&!t?null:E(t!=null&&typeof t=="object"&&_t(n)?pt(t):t)}var Xt=t=>Number((t*100).toFixed()),Dt=t=>Number((t/100).toFixed(2));function D(t,e=!1){return R(t,e)||gt(t,e)}function U(t,e,n){return t?t.length===e&&n.test(t):!1}function R(t,e=!1){return U(t,e?5:4,e?dt:ut)}function gt(t,e=!1){return U(t,e?9:7,e?bt:ft)}function Ut(t,e=!1,n=!1){if(t=t.toLowerCase(),t.startsWith("#")||(t=`#${t}`),R(t,e))return j(X(t,e));if(e&&n&&D(t,!1)){let r=R(t,!1);return j(X(`${t}${r?"f":"ff"}`,!0))}return t}function Kt(t,e=!1){return e?t.hexa():t.hex()}function j(t){let{r:e,g:n,b:r}=t,o=I(e),s=I(n),a=I(r),l="a"in t?I(t.a*255):"";return`#${o}${s}${a}${l}`.toLowerCase()}function I(t){return t.toString(16).padStart(2,"0")}function Yt(t){let e={...t,a:t.alpha??1};return delete e.alpha,e}function pt(t){let e={...t,alpha:t.a??1};return delete e.a,e}function X(t,e=!1){if(!D(t,e))return null;t=t.replace("#","");let n,r,o,s;if(t.length===3||t.length===4){let[l,i,h,p]=t.split("");n=parseInt(`${l}${l}`,16),r=parseInt(`${i}${i}`,16),o=parseInt(`${h}${h}`,16),s=parseInt(`${p}${p}`,16)/255}else n=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),o=parseInt(t.slice(4,6),16),s=parseInt(t.slice(6,8),16)/255;return isNaN(s)?{r:n,g:r,b:o}:{r:n,g:r,b:o,a:s}}var K=t=>t,f=K({HEX:"hex",HEXA:"hexa",RGB_CSS:"rgb-css",RGBA_CSS:"rgba-css",HSL_CSS:"hsl-css",HSLA_CSS:"hsla-css"}),d=K({RGB:"rgb",RGBA:"rgba",HSL:"hsl",HSLA:"hsla",HSV:"hsv",HSVA:"hsva"});function Jt(t){if(typeof t=="string"){if(t.startsWith("#")){let{length:e}=t;if(e===4||e===7)return f.HEX;if(e===5||e===9)return f.HEXA}if(t.startsWith("rgba("))return f.RGBA_CSS;if(t.startsWith("rgb("))return f.RGB_CSS;if(t.startsWith("hsl("))return f.HSL_CSS;if(t.startsWith("hsla("))return f.HSLA_CSS}if(typeof t=="object"){if(H(t,"r","g","b"))return H(t,"a")?d.RGBA:d.RGB;if(H(t,"h","s","l"))return H(t,"a")?d.HSLA:d.HSL;if(H(t,"h","s","v"))return H(t,"a")?d.HSVA:d.HSV}return null}function H(t,...e){return e.every(n=>n&&t&&`${n}`in t)}function Zt(t,e){return t?.rgb().array().toString()===e?.rgb().array().toString()}function _t(t){return t===f.HEXA||t===f.RGBA_CSS||t===f.HSLA_CSS||t===d.RGBA||t===d.HSLA||t===d.HSVA}function Qt(t){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}function Vt(t){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}var mt=1,Y=mt*2;function te(t,e,n){let r=n?ht.l.preview.size:e.preview.size,o=t-Y,s=e.gap*3;return Math.max(o-s-r,0)}function ee(t){let n=t-Y;return{width:Math.max(n,0),height:Math.max(Math.floor(n/1.8),0)}}export{E as a,Et as b,Rt as c,$t as d,qt as e,ct as f,Bt as g,Gt as h,ht as i,Tt as j,Wt as k,Pt as l,jt as m,Xt as n,Dt as o,D as p,R as q,gt as r,Ut as s,Kt as t,j as u,Yt as v,X as w,f as x,Jt as y,Zt as z,_t as A,Qt as B,Vt as C,te as D,ee as E};
|
|
3
|
+
v5.0.0-next.4 */
|
|
4
|
+
import{e as $,f as q,g as B}from"./U5ZHIRE4.js";var M={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};var G=Object.create(null);for(let t in M)Object.hasOwn(M,t)&&(G[M[t]]=t);var _={to:{},get:{}};_.get=function(t){let e=t.slice(0,3).toLowerCase(),n,r;switch(e){case"hsl":{n=_.get.hsl(t),r="hsl";break}case"hwb":{n=_.get.hwb(t),r="hwb";break}default:{n=_.get.rgb(t),r="rgb";break}}return n?{model:r,value:n}:null};_.get.rgb=function(t){if(!t)return null;let e=/^#([a-f\d]{3,4})$/i,n=/^#([a-f\d]{6})([a-f\d]{2})?$/i,r=/^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,o=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/,s=/^(\w+)$/,a=[0,0,0,1],l,i,h;if(l=t.match(n)){for(h=l[2],l=l[1],i=0;i<3;i++){let p=i*2;a[i]=Number.parseInt(l.slice(p,p+2),16)}h&&(a[3]=Number.parseInt(h,16)/255)}else if(l=t.match(e)){for(l=l[1],h=l[3],i=0;i<3;i++)a[i]=Number.parseInt(l[i]+l[i],16);h&&(a[3]=Number.parseInt(h+h,16)/255)}else if(l=t.match(r)){for(i=0;i<3;i++)a[i]=Number.parseInt(l[i+1],10);l[4]&&(a[3]=l[5]?Number.parseFloat(l[4])*.01:Number.parseFloat(l[4]))}else if(l=t.match(o)){for(i=0;i<3;i++)a[i]=Math.round(Number.parseFloat(l[i+1])*2.55);l[4]&&(a[3]=l[5]?Number.parseFloat(l[4])*.01:Number.parseFloat(l[4]))}else return(l=t.match(s))?l[1]==="transparent"?[0,0,0,0]:Object.hasOwn(M,l[1])?(a=M[l[1]],a[3]=1,a):null:null;for(i=0;i<3;i++)a[i]=v(a[i],0,255);return a[3]=v(a[3],0,1),a};_.get.hsl=function(t){if(!t)return null;let e=/^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*)?\)$/,n=t.match(e);if(n){let r=Number.parseFloat(n[4]),o=(Number.parseFloat(n[1])%360+360)%360,s=v(Number.parseFloat(n[2]),0,100),a=v(Number.parseFloat(n[3]),0,100),l=v(Number.isNaN(r)?1:r,0,1);return[o,s,a,l]}return null};_.get.hwb=function(t){if(!t)return null;let e=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/,n=t.match(e);if(n){let r=Number.parseFloat(n[4]),o=(Number.parseFloat(n[1])%360+360)%360,s=v(Number.parseFloat(n[2]),0,100),a=v(Number.parseFloat(n[3]),0,100),l=v(Number.isNaN(r)?1:r,0,1);return[o,s,a,l]}return null};_.to.hex=function(...t){return"#"+N(t[0])+N(t[1])+N(t[2])+(t[3]<1?N(Math.round(t[3]*255)):"")};_.to.rgb=function(...t){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]+")"};_.to.rgb.percent=function(...t){let e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||t[3]===1?"rgb("+e+"%, "+n+"%, "+r+"%)":"rgba("+e+"%, "+n+"%, "+r+"%, "+t[3]+")"};_.to.hsl=function(...t){return t.length<4||t[3]===1?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};_.to.hwb=function(...t){let e="";return t.length>=4&&t[3]!==1&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"};_.to.keyword=function(...t){return G[t.slice(0,3)]};function v(t,e,n){return Math.min(Math.max(e,t),n)}function N(t){let e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}var S=_;var x={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};var T={};for(let t of Object.keys(x))T[x[t]]=t;var c={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},k=c,w=(6/29)**3;function A(t){let e=t>.0031308?1.055*t**.4166666666666667-.055:t*12.92;return Math.min(Math.max(0,e),1)}function F(t){return t>.04045?((t+.055)/1.055)**2.4:t/12.92}for(let t of Object.keys(c)){if(!("channels"in c[t]))throw new Error("missing channels property: "+t);if(!("labels"in c[t]))throw new Error("missing channel labels property: "+t);if(c[t].labels.length!==c[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:n}=c[t];delete c[t].channels,delete c[t].labels,Object.defineProperty(c[t],"channels",{value:e}),Object.defineProperty(c[t],"labels",{value:n})}c.rgb.hsl=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255,o=Math.min(e,n,r),s=Math.max(e,n,r),a=s-o,l,i;switch(s){case o:{l=0;break}case e:{l=(n-r)/a;break}case n:{l=2+(r-e)/a;break}case r:{l=4+(e-n)/a;break}}l=Math.min(l*60,360),l<0&&(l+=360);let h=(o+s)/2;return s===o?i=0:h<=.5?i=a/(s+o):i=a/(2-s-o),[l,i*100,h*100]};c.rgb.hsv=function(t){let e,n,r,o,s,a=t[0]/255,l=t[1]/255,i=t[2]/255,h=Math.max(a,l,i),p=h-Math.min(a,l,i),y=function(J){return(h-J)/6/p+1/2};if(p===0)o=0,s=0;else{switch(s=p/h,e=y(a),n=y(l),r=y(i),h){case a:{o=r-n;break}case l:{o=1/3+e-r;break}case i:{o=2/3+n-e;break}}o<0?o+=1:o>1&&(o-=1)}return[o*360,s*100,h*100]};c.rgb.hwb=function(t){let e=t[0],n=t[1],r=t[2],o=c.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(n,r));return r=1-1/255*Math.max(e,Math.max(n,r)),[o,s*100,r*100]};c.rgb.oklab=function(t){let e=F(t[0]/255),n=F(t[1]/255),r=F(t[2]/255),o=Math.cbrt(.4122214708*e+.5363325363*n+.0514459929*r),s=Math.cbrt(.2119034982*e+.6806995451*n+.1073969566*r),a=Math.cbrt(.0883024619*e+.2817188376*n+.6299787005*r),l=.2104542553*o+.793617785*s-.0040720468*a,i=1.9779984951*o-2.428592205*s+.4505937099*a,h=.0259040371*o+.7827717662*s-.808675766*a;return[l*100,i*100,h*100]};c.rgb.cmyk=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255,o=Math.min(1-e,1-n,1-r),s=(1-e-o)/(1-o)||0,a=(1-n-o)/(1-o)||0,l=(1-r-o)/(1-o)||0;return[s*100,a*100,l*100,o*100]};function Z(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}c.rgb.keyword=function(t){let e=T[t];if(e)return e;let n=Number.POSITIVE_INFINITY,r;for(let o of Object.keys(x)){let s=x[o],a=Z(t,s);a<n&&(n=a,r=o)}return r};c.keyword.rgb=function(t){return x[t]};c.rgb.xyz=function(t){let e=F(t[0]/255),n=F(t[1]/255),r=F(t[2]/255),o=e*.4124564+n*.3575761+r*.1804375,s=e*.2126729+n*.7151522+r*.072175,a=e*.0193339+n*.119192+r*.9503041;return[o*100,s*100,a*100]};c.rgb.lab=function(t){let e=c.rgb.xyz(t),n=e[0],r=e[1],o=e[2];n/=95.047,r/=100,o/=108.883,n=n>w?n**(1/3):7.787*n+16/116,r=r>w?r**(1/3):7.787*r+16/116,o=o>w?o**(1/3):7.787*o+16/116;let s=116*r-16,a=500*(n-r),l=200*(r-o);return[s,a,l]};c.hsl.rgb=function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,o,s;if(n===0)return s=r*255,[s,s,s];let a=r<.5?r*(1+n):r+n-r*n,l=2*r-a,i=[0,0,0];for(let h=0;h<3;h++)o=e+1/3*-(h-1),o<0&&o++,o>1&&o--,6*o<1?s=l+(a-l)*6*o:2*o<1?s=a:3*o<2?s=l+(a-l)*(2/3-o)*6:s=l,i[h]=s*255;return i};c.hsl.hsv=function(t){let e=t[0],n=t[1]/100,r=t[2]/100,o=n,s=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=s<=1?s:2-s;let a=(r+n)/2,l=r===0?2*o/(s+o):2*n/(r+n);return[e,l*100,a*100]};c.hsv.rgb=function(t){let e=t[0]/60,n=t[1]/100,r=t[2]/100,o=Math.floor(e)%6,s=e-Math.floor(e),a=255*r*(1-n),l=255*r*(1-n*s),i=255*r*(1-n*(1-s));switch(r*=255,o){case 0:return[r,i,a];case 1:return[l,r,a];case 2:return[a,r,i];case 3:return[a,l,r];case 4:return[i,a,r];case 5:return[r,a,l]}};c.hsv.hsl=function(t){let e=t[0],n=t[1]/100,r=t[2]/100,o=Math.max(r,.01),s,a;a=(2-n)*r;let l=(2-n)*o;return s=n*o,s/=l<=1?l:2-l,s=s||0,a/=2,[e,s*100,a*100]};c.hwb.rgb=function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,o=n+r,s;o>1&&(n/=o,r/=o);let a=Math.floor(6*e),l=1-r;s=6*e-a,(a&1)!==0&&(s=1-s);let i=n+s*(l-n),h,p,y;switch(a){default:case 6:case 0:{h=l,p=i,y=n;break}case 1:{h=i,p=l,y=n;break}case 2:{h=n,p=l,y=i;break}case 3:{h=n,p=i,y=l;break}case 4:{h=i,p=n,y=l;break}case 5:{h=l,p=n,y=i;break}}return[h*255,p*255,y*255]};c.cmyk.rgb=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,o=t[3]/100,s=1-Math.min(1,e*(1-o)+o),a=1-Math.min(1,n*(1-o)+o),l=1-Math.min(1,r*(1-o)+o);return[s*255,a*255,l*255]};c.xyz.rgb=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,o,s,a;return o=e*3.2404542+n*-1.5371385+r*-.4985314,s=e*-.969266+n*1.8760108+r*.041556,a=e*.0556434+n*-.2040259+r*1.0572252,o=A(o),s=A(s),a=A(a),[o*255,s*255,a*255]};c.xyz.lab=function(t){let e=t[0],n=t[1],r=t[2];e/=95.047,n/=100,r/=108.883,e=e>w?e**(1/3):7.787*e+16/116,n=n>w?n**(1/3):7.787*n+16/116,r=r>w?r**(1/3):7.787*r+16/116;let o=116*n-16,s=500*(e-n),a=200*(n-r);return[o,s,a]};c.xyz.oklab=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,o=Math.cbrt(.8189330101*e+.3618667424*n-.1288597137*r),s=Math.cbrt(.0329845436*e+.9293118715*n+.0361456387*r),a=Math.cbrt(.0482003018*e+.2643662691*n+.633851707*r),l=.2104542553*o+.793617785*s-.0040720468*a,i=1.9779984951*o-2.428592205*s+.4505937099*a,h=.0259040371*o+.7827717662*s-.808675766*a;return[l*100,i*100,h*100]};c.oklab.oklch=function(t){return c.lab.lch(t)};c.oklab.xyz=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,o=(.999999998*e+.396337792*n+.215803758*r)**3,s=(1.000000008*e-.105561342*n-.063854175*r)**3,a=(1.000000055*e-.089484182*n-1.291485538*r)**3,l=1.227013851*o-.55779998*s+.281256149*a,i=-.040580178*o+1.11225687*s-.071676679*a,h=-.076381285*o-.421481978*s+1.58616322*a;return[l*100,i*100,h*100]};c.oklab.rgb=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,o=(e+.3963377774*n+.2158037573*r)**3,s=(e-.1055613458*n-.0638541728*r)**3,a=(e-.0894841775*n-1.291485548*r)**3,l=A(4.0767416621*o-3.3077115913*s+.2309699292*a),i=A(-1.2684380046*o+2.6097574011*s-.3413193965*a),h=A(-.0041960863*o-.7034186147*s+1.707614701*a);return[l*255,i*255,h*255]};c.oklch.oklab=function(t){return c.lch.lab(t)};c.lab.xyz=function(t){let e=t[0],n=t[1],r=t[2],o,s,a;s=(e+16)/116,o=n/500+s,a=s-r/200;let l=s**3,i=o**3,h=a**3;return s=l>w?l:(s-16/116)/7.787,o=i>w?i:(o-16/116)/7.787,a=h>w?h:(a-16/116)/7.787,o*=95.047,s*=100,a*=108.883,[o,s,a]};c.lab.lch=function(t){let e=t[0],n=t[1],r=t[2],o;o=Math.atan2(r,n)*360/2/Math.PI,o<0&&(o+=360);let a=Math.sqrt(n*n+r*r);return[e,a,o]};c.lch.lab=function(t){let e=t[0],n=t[1],o=t[2]/360*2*Math.PI,s=n*Math.cos(o),a=n*Math.sin(o);return[e,s,a]};c.rgb.ansi16=function(t,e=null){let[n,r,o]=t,s=e===null?c.rgb.hsv(t)[2]:e;if(s=Math.round(s/50),s===0)return 30;let a=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return s===2&&(a+=60),a};c.hsv.ansi16=function(t){return c.rgb.ansi16(c.hsv.rgb(t),t[2])};c.rgb.ansi256=function(t){let e=t[0],n=t[1],r=t[2];return e>>4===n>>4&&n>>4===r>>4?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};c.ansi16.rgb=function(t){t=t[0];let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let n=(Math.trunc(t>50)+1)*.5,r=(e&1)*n*255,o=(e>>1&1)*n*255,s=(e>>2&1)*n*255;return[r,o,s]};c.ansi256.rgb=function(t){if(t=t[0],t>=232){let s=(t-232)*10+8;return[s,s,s]}t-=16;let e,n=Math.floor(t/36)/5*255,r=Math.floor((e=t%36)/6)/5*255,o=e%6/5*255;return[n,r,o]};c.rgb.hex=function(t){let n=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".slice(n.length)+n};c.hex.rgb=function(t){let e=t.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!e)return[0,0,0];let n=e[0];e[0].length===3&&(n=[...n].map(l=>l+l).join(""));let r=Number.parseInt(n,16),o=r>>16&255,s=r>>8&255,a=r&255;return[o,s,a]};c.rgb.hcg=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255,o=Math.max(Math.max(e,n),r),s=Math.min(Math.min(e,n),r),a=o-s,l,i=a<1?s/(1-a):0;return a<=0?l=0:o===e?l=(n-r)/a%6:o===n?l=2+(r-e)/a:l=4+(e-n)/a,l/=6,l%=1,[l*360,a*100,i*100]};c.hsl.hcg=function(t){let e=t[1]/100,n=t[2]/100,r=n<.5?2*e*n:2*e*(1-n),o=0;return r<1&&(o=(n-.5*r)/(1-r)),[t[0],r*100,o*100]};c.hsv.hcg=function(t){let e=t[1]/100,n=t[2]/100,r=e*n,o=0;return r<1&&(o=(n-r)/(1-r)),[t[0],r*100,o*100]};c.hcg.rgb=function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100;if(n===0)return[r*255,r*255,r*255];let o=[0,0,0],s=e%1*6,a=s%1,l=1-a,i=0;switch(Math.floor(s)){case 0:{o[0]=1,o[1]=a,o[2]=0;break}case 1:{o[0]=l,o[1]=1,o[2]=0;break}case 2:{o[0]=0,o[1]=1,o[2]=a;break}case 3:{o[0]=0,o[1]=l,o[2]=1;break}case 4:{o[0]=a,o[1]=0,o[2]=1;break}default:o[0]=1,o[1]=0,o[2]=l}return i=(1-n)*r,[(n*o[0]+i)*255,(n*o[1]+i)*255,(n*o[2]+i)*255]};c.hcg.hsv=function(t){let e=t[1]/100,n=t[2]/100,r=e+n*(1-e),o=0;return r>0&&(o=e/r),[t[0],o*100,r*100]};c.hcg.hsl=function(t){let e=t[1]/100,r=t[2]/100*(1-e)+.5*e,o=0;return r>0&&r<.5?o=e/(2*r):r>=.5&&r<1&&(o=e/(2*(1-r))),[t[0],o*100,r*100]};c.hcg.hwb=function(t){let e=t[1]/100,n=t[2]/100,r=e+n*(1-e);return[t[0],(r-e)*100,(1-r)*100]};c.hwb.hcg=function(t){let e=t[1]/100,r=1-t[2]/100,o=r-e,s=0;return o<1&&(s=(r-o)/(1-o)),[t[0],o*100,s*100]};c.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};c.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};c.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};c.gray.hsl=function(t){return[0,0,t[0]]};c.gray.hsv=c.gray.hsl;c.gray.hwb=function(t){return[0,100,t[0]]};c.gray.cmyk=function(t){return[0,0,0,t[0]]};c.gray.lab=function(t){return[t[0],0,0]};c.gray.hex=function(t){let e=Math.round(t[0]/100*255)&255,r=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".slice(r.length)+r};c.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]};function Q(){let t={},e=Object.keys(k);for(let{length:n}=e,r=0;r<n;r++)t[e[r]]={distance:-1,parent:null};return t}function V(t){let e=Q(),n=[t];for(e[t].distance=0;n.length>0;){let r=n.pop(),o=Object.keys(k[r]);for(let{length:s}=o,a=0;a<s;a++){let l=o[a],i=e[l];i.distance===-1&&(i.distance=e[r].distance+1,i.parent=r,n.unshift(l))}}return e}function tt(t,e){return function(n){return e(t(n))}}function et(t,e){let n=[e[t].parent,t],r=k[e[t].parent][t],o=e[t].parent;for(;e[o].parent;)n.unshift(e[o].parent),r=tt(k[e[o].parent][o],r),o=e[o].parent;return r.conversion=n,r}function nt(t){let e=V(t),n={},r=Object.keys(e);for(let{length:o}=r,s=0;s<o;s++){let a=r[s];e[a].parent!==null&&(n[a]=et(a,e))}return n}var W=nt;var C={},rt=Object.keys(k);function ot(t){let e=function(...n){let r=n[0];return r==null?r:(r.length>1&&(n=r),t(n))};return"conversion"in t&&(e.conversion=t.conversion),e}function st(t){let e=function(...n){let r=n[0];if(r==null)return r;r.length>1&&(n=r);let o=t(n);if(typeof o=="object")for(let{length:s}=o,a=0;a<s;a++)o[a]=Math.round(o[a]);return o};return"conversion"in t&&(e.conversion=t.conversion),e}for(let t of rt){C[t]={},Object.defineProperty(C[t],"channels",{value:k[t].channels}),Object.defineProperty(C[t],"labels",{value:k[t].labels});let e=W(t),n=Object.keys(e);for(let r of n){let o=e[r];C[t][r]=st(o),C[t][r].raw=ot(o)}}var m=C;var P=["keyword","gray","hex"],O={};for(let t of Object.keys(m))O[[...m[t].labels].sort().join("")]=t;var L={};function g(t,e){if(!(this instanceof g))return new g(t,e);if(e&&e in P&&(e=null),e&&!(e in m))throw new Error("Unknown model: "+e);let n,r;if(t==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof g)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if(typeof t=="string"){let o=S.get(t);if(o===null)throw new Error("Unable to parse color from string: "+t);this.model=o.model,r=m[this.model].channels,this.color=o.value.slice(0,r),this.valpha=typeof o.value[r]=="number"?o.value[r]:1}else if(t.length>0){this.model=e||"rgb",r=m[this.model].channels;let o=Array.prototype.slice.call(t,0,r);this.color=z(o,r),this.valpha=typeof t[r]=="number"?t[r]:1}else if(typeof t=="number")this.model="rgb",this.color=[t>>16&255,t>>8&255,t&255],this.valpha=1;else{this.valpha=1;let o=Object.keys(t);"alpha"in t&&(o.splice(o.indexOf("alpha"),1),this.valpha=typeof t.alpha=="number"?t.alpha:0);let s=o.sort().join("");if(!(s in O))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=O[s];let{labels:a}=m[this.model],l=[];for(n=0;n<a.length;n++)l.push(t[a[n]]);this.color=z(l)}if(L[this.model])for(r=m[this.model].channels,n=0;n<r;n++){let o=L[this.model][n];o&&(this.color[n]=o(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}g.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let e=this.model in S.to?this:this.rgb();e=e.round(typeof t=="number"?t:1);let n=e.valpha===1?e.color:[...e.color,this.valpha];return S.to[e.model](...n)},percentString(t){let e=this.rgb().round(typeof t=="number"?t:1),n=e.valpha===1?e.color:[...e.color,this.valpha];return S.to.rgb.percent(...n)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let t={},{channels:e}=m[this.model],{labels:n}=m[this.model];for(let r=0;r<e;r++)t[n[r]]=this.color[r];return this.valpha!==1&&(t.alpha=this.valpha),t},unitArray(){let t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,this.valpha!==1&&t.push(this.valpha),t},unitObject(){let t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,this.valpha!==1&&(t.alpha=this.valpha),t},round(t){return t=Math.max(t||0,0),new g([...this.color.map(lt(t)),this.valpha],this.model)},alpha(t){return t!==void 0?new g([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},red:u("rgb",0,b(255)),green:u("rgb",1,b(255)),blue:u("rgb",2,b(255)),hue:u(["hsl","hsv","hsl","hwb","hcg"],0,t=>(t%360+360)%360),saturationl:u("hsl",1,b(100)),lightness:u("hsl",2,b(100)),saturationv:u("hsv",1,b(100)),value:u("hsv",2,b(100)),chroma:u("hcg",1,b(100)),gray:u("hcg",2,b(100)),white:u("hwb",1,b(100)),wblack:u("hwb",2,b(100)),cyan:u("cmyk",0,b(100)),magenta:u("cmyk",1,b(100)),yellow:u("cmyk",2,b(100)),black:u("cmyk",3,b(100)),x:u("xyz",0,b(95.047)),y:u("xyz",1,b(100)),z:u("xyz",2,b(108.833)),l:u("lab",0,b(100)),a:u("lab",1),b:u("lab",2),keyword(t){return t!==void 0?new g(t):m[this.model].keyword(this.color)},hex(t){return t!==void 0?new g(t):S.to.hex(...this.rgb().round().color)},hexa(t){if(t!==void 0)return new g(t);let e=this.rgb().round().color,n=Math.round(this.valpha*255).toString(16).toUpperCase();return n.length===1&&(n="0"+n),S.to.hex(...e)+n},rgbNumber(){let t=this.rgb().color;return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255},luminosity(){let t=this.rgb().color,e=[];for(let[n,r]of t.entries()){let o=r/255;e[n]=o<=.04045?o/12.92:((o+.055)/1.055)**2.4}return .2126*e[0]+.7152*e[1]+.0722*e[2]},contrast(t){let e=this.luminosity(),n=t.luminosity();return e>n?(e+.05)/(n+.05):(n+.05)/(e+.05)},level(t){let e=this.contrast(t);return e>=7?"AAA":e>=4.5?"AA":""},isDark(){let t=this.rgb().color;return(t[0]*2126+t[1]*7152+t[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let t=this.rgb();for(let e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten(t){let e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){let e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate(t){let e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate(t){let e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten(t){let e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken(t){let e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale(){let t=this.rgb().color,e=t[0]*.3+t[1]*.59+t[2]*.11;return g.rgb(e,e,e)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){let e=this.hsl(),n=e.color[0];return n=(n+t)%360,n=n<0?360+n:n,e.color[0]=n,e},mix(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);let n=t.rgb(),r=this.rgb(),o=e===void 0?.5:e,s=2*o-1,a=n.alpha()-r.alpha(),l=((s*a===-1?s:(s+a)/(1+s*a))+1)/2,i=1-l;return g.rgb(l*n.red()+i*r.red(),l*n.green()+i*r.green(),l*n.blue()+i*r.blue(),n.alpha()*o+r.alpha()*(1-o))}};for(let t of Object.keys(m)){if(P.includes(t))continue;let{channels:e}=m[t];g.prototype[t]=function(...n){return this.model===t?new g(this):n.length>0?new g(n,t):new g([...it(m[this.model][t].raw(this.color)),this.valpha],t)},g[t]=function(...n){let r=n[0];return typeof r=="number"&&(r=z(n,e)),new g(r,t)}}function at(t,e){return Number(t.toFixed(e))}function lt(t){return function(e){return at(e,t)}}function u(t,e,n){t=Array.isArray(t)?t:[t];for(let r of t)(L[r]||=[])[e]=n;return t=t[0],function(r){let o;return r!==void 0?(n&&(r=n(r)),o=this[t](),o.color[e]=r,o):(o=this[t]().color[e],n&&(o=n(o)),o)}}function b(t){return function(e){return Math.max(0,Math.min(t,e))}}function it(t){return Array.isArray(t)?t:[t]}function z(t,e){for(let n=0;n<e;n++)typeof t[n]!="number"&&(t[n]=0);return t}var E=g;var Et={channel:"channel",channels:"channels",colorField:"color-field",colorFieldScope:"scope--color-field",colorMode:"color-mode",colorModeContainer:"color-mode-container",container:"container",control:"control",controlAndScope:"control-and-scope",controlSection:"control-section",deleteColor:"delete-color",header:"header",hexAndChannelsGroup:"hex-and-channels-group",hexOptions:"color-hex-options",hueScope:"scope--hue",hueSlider:"hue-slider",opacityScope:"scope--opacity",opacitySlider:"opacity-slider",preview:"preview",previewAndSliders:"preview-and-sliders",saveColor:"save-color",savedColor:"saved-color",savedColorsButtons:"saved-colors-buttons",savedColorsSection:"saved-colors-section",scope:"scope",section:"section",slider:"slider",sliders:"sliders",splitSection:"section--split",swatchGroup:"swatch-group"},Rt=E("#007AC2"),$t="calcite-color-",qt={r:255,g:255,b:255},ct={h:360,s:100,v:100},Bt=ct.h-1,Gt={min:0,max:100},ht={s:{gap:parseInt($),slider:{height:12},thumb:{radius:7},preview:{size:20},minWidth:200},m:{gap:parseInt(q),slider:{height:12},thumb:{radius:7},preview:{size:24},minWidth:240},l:{gap:parseInt(B),slider:{height:12},thumb:{radius:7},preview:{size:32},minWidth:304}},Tt=1,Wt={minus:"minus",plus:"plus"},Pt=/^[0-9A-F]$/i,ut=/^#[0-9A-F]{3}$/i,ft=/^#[0-9A-F]{6}$/i,dt=/^#[0-9A-F]{4}$/i,bt=/^#[0-9A-F]{8}$/i;function jt(t,e=!1,n){return e&&!t?null:E(t!=null&&typeof t=="object"&&_t(n)?pt(t):t)}var Xt=t=>Number((t*100).toFixed()),Dt=t=>Number((t/100).toFixed(2));function D(t,e=!1){return R(t,e)||gt(t,e)}function U(t,e,n){return t?t.length===e&&n.test(t):!1}function R(t,e=!1){return U(t,e?5:4,e?dt:ut)}function gt(t,e=!1){return U(t,e?9:7,e?bt:ft)}function Ut(t,e=!1,n=!1){if(t=t.toLowerCase(),t.startsWith("#")||(t=`#${t}`),R(t,e))return j(X(t,e));if(e&&n&&D(t,!1)){let r=R(t,!1);return j(X(`${t}${r?"f":"ff"}`,!0))}return t}function Kt(t,e=!1){return e?t.hexa():t.hex()}function j(t){let{r:e,g:n,b:r}=t,o=I(e),s=I(n),a=I(r),l="a"in t?I(t.a*255):"";return`#${o}${s}${a}${l}`.toLowerCase()}function I(t){return t.toString(16).padStart(2,"0")}function Yt(t){let e={...t,a:t.alpha??1};return delete e.alpha,e}function pt(t){let e={...t,alpha:t.a??1};return delete e.a,e}function X(t,e=!1){if(!D(t,e))return null;t=t.replace("#","");let n,r,o,s;if(t.length===3||t.length===4){let[l,i,h,p]=t.split("");n=parseInt(`${l}${l}`,16),r=parseInt(`${i}${i}`,16),o=parseInt(`${h}${h}`,16),s=parseInt(`${p}${p}`,16)/255}else n=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),o=parseInt(t.slice(4,6),16),s=parseInt(t.slice(6,8),16)/255;return isNaN(s)?{r:n,g:r,b:o}:{r:n,g:r,b:o,a:s}}var K=t=>t,f=K({HEX:"hex",HEXA:"hexa",RGB_CSS:"rgb-css",RGBA_CSS:"rgba-css",HSL_CSS:"hsl-css",HSLA_CSS:"hsla-css"}),d=K({RGB:"rgb",RGBA:"rgba",HSL:"hsl",HSLA:"hsla",HSV:"hsv",HSVA:"hsva"});function Jt(t){if(typeof t=="string"){if(t.startsWith("#")){let{length:e}=t;if(e===4||e===7)return f.HEX;if(e===5||e===9)return f.HEXA}if(t.startsWith("rgba("))return f.RGBA_CSS;if(t.startsWith("rgb("))return f.RGB_CSS;if(t.startsWith("hsl("))return f.HSL_CSS;if(t.startsWith("hsla("))return f.HSLA_CSS}if(typeof t=="object"){if(H(t,"r","g","b"))return H(t,"a")?d.RGBA:d.RGB;if(H(t,"h","s","l"))return H(t,"a")?d.HSLA:d.HSL;if(H(t,"h","s","v"))return H(t,"a")?d.HSVA:d.HSV}return null}function H(t,...e){return e.every(n=>n&&t&&`${n}`in t)}function Zt(t,e){return t?.rgb().array().toString()===e?.rgb().array().toString()}function _t(t){return t===f.HEXA||t===f.RGBA_CSS||t===f.HSLA_CSS||t===d.RGBA||t===d.HSLA||t===d.HSVA}function Qt(t){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}function Vt(t){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}var mt=1,Y=mt*2;function te(t,e,n){let r=n?ht.l.preview.size:e.preview.size,o=t-Y,s=e.gap*3;return Math.max(o-s-r,0)}function ee(t){let n=t-Y;return{width:Math.max(n,0),height:Math.max(Math.floor(n/1.8),0)}}export{E as a,Et as b,Rt as c,$t as d,qt as e,ct as f,Bt as g,Gt as h,ht as i,Tt as j,Wt as k,Pt as l,jt as m,Xt as n,Dt as o,D as p,R as q,gt as r,Ut as s,Kt as t,j as u,Yt as v,X as w,f as x,Jt as y,Zt as z,_t as A,Qt as B,Vt as C,te as D,ee as E};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as I}from"./
|
|
3
|
+
v5.0.0-next.4 */
|
|
4
|
+
import{a as I}from"./SHXU5GEM.js";import{c as z,d as w,e as C}from"./J2ACTXE5.js";import{c as f,e as k,h as x}from"./U3G47NPB.js";import{a as u,b as p}from"./PRB44CR7.js";import{a as y}from"./2DX2SAQ7.js";import{a as m}from"./PNBL2IVW.js";import{a as v}from"./HKVRX5SD.js";import"./D5SFHDV6.js";import"./TLLHA7VC.js";import"./VZVYZPXQ.js";import{e as b}from"./Z6CRZOOK.js";import"./XRJOD24G.js";import{B as r,C as n,D as h,E as a,G as i,J as d,P as g,g as o,h as l,i as s,o as t}from"./CSQVLDPF.js";var T={toggle:"toggle",check:"check-svg"},$=o`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host([scale=s]) .check-svg,:host([scale=s]) .toggle{inline-size:var(--calcite-checkbox-size, .75rem);block-size:var(--calcite-checkbox-size, .75rem)}:host([scale=m]) .check-svg,:host([scale=m]) .toggle{inline-size:var(--calcite-checkbox-size, var(--calcite-font-size--1));block-size:var(--calcite-checkbox-size, var(--calcite-font-size--1))}:host([scale=l]) .check-svg,:host([scale=l]) .toggle{inline-size:var(--calcite-checkbox-size, 1rem);block-size:var(--calcite-checkbox-size, 1rem)}:host{position:relative;display:inline-flex;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}:host .check-svg{pointer-events:none;box-sizing:border-box;display:block;overflow:hidden;background-color:var(--calcite-color-foreground-1);fill:currentColor;stroke:currentColor;stroke-width:1;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;box-shadow:inset 0 0 0 1px var(--calcite-checkbox-border-color, var(--calcite-color-border-input));color:var(--calcite-checkbox-icon-color, var(--calcite-color-background))}:host([status=invalid]:not([checked])) .check-svg{box-shadow:inset 0 0 0 1px var(--calcite-color-status-danger)}:host([status=invalid]:not([checked])) .toggle:hover .check-svg{box-shadow:inset 0 0 0 2px var(--calcite-color-brand-hover)}:host([status=invalid]:not([checked])) .toggle:active .check-svg{box-shadow:inset 0 0 0 2px var(--calcite-color-brand-press)}:host([status=invalid]:not([checked])) .toggle:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([checked]) .check-svg,:host([indeterminate]) .check-svg{background-color:var(--calcite-color-brand);box-shadow:inset 0 0 0 1px var(--calcite-color-brand)}:host([checked]) .toggle:hover .check-svg,:host([indeterminate]) .toggle:hover .check-svg{background-color:var(--calcite-checkbox-border-color-hover, var(--calcite-color-brand-hover))}:host([checked]) .toggle:active .check-svg,:host([indeterminate]) .toggle:active .check-svg{background-color:var(--calcite-checkbox-border-color-press, var(--calcite-color-brand-press));box-shadow:inset 0 0 0 2px var(--calcite-checkbox-border-color-press, var(--calcite-color-brand-press))}:host([hovered]) .toggle .check-svg,:host .toggle:hover .check-svg{box-shadow:inset 0 0 0 2px var(--calcite-checkbox-border-color-hover, var(--calcite-color-brand-hover))}.toggle:active .check-svg{box-shadow:inset 0 0 0 2px var(--calcite-checkbox-border-color-press, var(--calcite-color-brand-press))}.toggle{position:relative;outline-color:transparent}.toggle:active,.toggle:focus,.toggle:focus-visible{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.toggle:after,.toggle:before{inset-block-start:50%;inset-inline-start:50%;min-block-size:1.5rem;min-inline-size:1.5rem;position:absolute}.toggle:not(.calcite--rtl):after{content:"";transform:translate(-50%) translateY(-50%)}.toggle.calcite--rtl:before{content:"";transform:translate(50%) translateY(-50%)}@media(forced-colors:active){.check-svg{border:1px solid currentColor}}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}`,c=class extends h{constructor(){super(),this.checkedPath="M5.5 12L2 8.689l.637-.636L5.5 10.727l8.022-7.87.637.637z",this.indeterminatePath="M13 8v1H3V8z",this.onLabelClick=()=>{this.toggle()},this.toggleRef=r(),this.messages=m(),this.focusSetter=v()(this),this.checked=!1,this.disabled=!1,this.hovered=!1,this.indeterminate=!1,this.required=!1,this.scale="m",this.status="idle",this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.calciteCheckboxChange=t({cancelable:!1}),this.calciteInternalCheckboxBlur=t({cancelable:!1}),this.calciteInternalCheckboxFocus=t({cancelable:!1}),this.listen("click",this.clickHandler),this.listen("keydown",this.keyDownHandler)}static{this.properties={checked:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],hovered:[7,{},{reflect:!0,type:Boolean}],indeterminate:[7,{},{reflect:!0,type:Boolean}],label:1,labelText:1,messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],validity:[0,{},{attribute:!1}],value:1}}static{this.styles=$}async setFocus(e){return this.focusSetter(()=>this.toggleRef.value,e)}connectedCallback(){super.connectedCallback(),z(this),f(this)}updated(){u(this)}disconnectedCallback(){super.disconnectedCallback(),w(this),k(this)}syncHiddenFormInput(e){e.type="checkbox"}getPath(){return this.indeterminate?this.indeterminatePath:this.checked?this.checkedPath:""}toggle(){this.disabled||(this.checked=!this.checked,this.setFocus(),this.indeterminate=!1,this.calciteCheckboxChange.emit())}keyDownHandler(e){y(e.key)&&(this.toggle(),e.preventDefault())}clickHandler(){this.toggle()}onToggleBlur(){this.calciteInternalCheckboxBlur.emit(!1)}onToggleFocus(){this.calciteInternalCheckboxFocus.emit(!0)}render(){let e=b(this.el)==="rtl";return p({disabled:this.disabled,children:l`<div .ariaChecked=${this.checked} .ariaLabel=${C(this)} .ariaRequired=${this.required} class=${a({[T.toggle]:!0,[d.rtl]:e})} @blur=${this.onToggleBlur} @focus=${this.onToggleFocus} role=checkbox tabindex=${(this.disabled?void 0:0)??i} ${n(this.toggleRef)}><svg aria-hidden=true class=${a(T.check)} viewBox="0 0 16 16">${s`<path d=${this.getPath()??i} />`}</svg><slot></slot></div>${this.labelText&&I({bottomSpacingDisabled:!0,labelText:this.labelText,required:this.required,spacingInlineStart:!0,tooltipText:this.messages.required})||""}${x({component:this})}`})}};g("calcite-checkbox",c);export{c as Checkbox};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as Dt}from"./V25MLN7E.js";import{e as Lt}from"./S4PILGWU.js";import{K as Tt}from"./C7SWOQAB.js";var vt=["top","right","bottom","left"],Ft=["start","end"],bt=vt.reduce((t,e)=>t.concat(e,e+"-"+Ft[0],e+"-"+Ft[1]),[]),j=Math.min,V=Math.max,rt=Math.round,ct=Math.floor,M=t=>({x:t,y:t}),Oe={left:"right",right:"left",bottom:"top",top:"bottom"},Re={start:"end",end:"start"};function ut(t,e,n){return V(t,j(e,n))}function X(t,e){return typeof t=="function"?t(e):t}function W(t){return t.split("-")[0]}function k(t){return t.split("-")[1]}function At(t){return t==="x"?"y":"x"}function dt(t){return t==="y"?"height":"width"}var Se=new Set(["top","bottom"]);function _(t){return Se.has(W(t))?"y":"x"}function mt(t){return At(_(t))}function Ot(t,e,n){n===void 0&&(n=!1);let o=k(t),i=mt(t),r=dt(i),s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=st(s)),[s,st(s)]}function Nt(t){let e=st(t);return[it(t),e,it(e)]}function it(t){return t.replace(/start|end/g,e=>Re[e])}var Mt=["left","right"],kt=["right","left"],Pe=["top","bottom"],Ce=["bottom","top"];function Ee(t,e,n){switch(t){case"top":case"bottom":return n?e?kt:Mt:e?Mt:kt;case"left":case"right":return e?Pe:Ce;default:return[]}}function Bt(t,e,n,o){let i=k(t),r=Ee(W(t),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),e&&(r=r.concat(r.map(it)))),r}function st(t){return t.replace(/left|right|bottom|top/g,e=>Oe[e])}function Te(t){return{top:0,right:0,bottom:0,left:0,...t}}function Rt(t){return typeof t!="number"?Te(t):{top:t,right:t,bottom:t,left:t}}function K(t){let{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Wt(t,e,n){let{reference:o,floating:i}=t,r=_(e),s=mt(e),c=dt(s),l=W(e),a=r==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2,f;switch(l){case"top":f={x:d,y:o.y-i.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-i.width,y:u};break;default:f={x:o.x,y:o.y}}switch(k(e)){case"start":f[s]-=m*(n&&a?-1:1);break;case"end":f[s]+=m*(n&&a?-1:1);break}return f}var Vt=async(t,e,n)=>{let{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,c=r.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e)),a=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=Wt(a,o,l),m=o,f={},g=0;for(let h=0;h<c.length;h++){let{name:p,fn:w}=c[h],{x,y,data:b,reset:v}=await w({x:d,y:u,initialPlacement:o,placement:m,strategy:i,middlewareData:f,rects:a,platform:s,elements:{reference:t,floating:e}});d=x??d,u=y??u,f={...f,[p]:{...f[p],...b}},v&&g<=50&&(g++,typeof v=="object"&&(v.placement&&(m=v.placement),v.rects&&(a=v.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):v.rects),{x:d,y:u}=Wt(a,m,l)),h=-1)}return{x:d,y:u,placement:m,strategy:i,middlewareData:f}};async function Z(t,e){var n;e===void 0&&(e={});let{x:o,y:i,platform:r,rects:s,elements:c,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:f=0}=X(e,t),g=Rt(f),p=c[m?u==="floating"?"reference":"floating":u],w=K(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(p)))==null||n?p:p.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:a,rootBoundary:d,strategy:l})),x=u==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,y=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating)),b=await(r.isElement==null?void 0:r.isElement(y))?await(r.getScale==null?void 0:r.getScale(y))||{x:1,y:1}:{x:1,y:1},v=K(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:y,strategy:l}):x);return{top:(w.top-v.top+g.top)/b.y,bottom:(v.bottom-w.bottom+g.bottom)/b.y,left:(w.left-v.left+g.left)/b.x,right:(v.right-w.right+g.right)/b.x}}var _t=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:o,placement:i,rects:r,platform:s,elements:c,middlewareData:l}=e,{element:a,padding:d=0}=X(t,e)||{};if(a==null)return{};let u=Rt(d),m={x:n,y:o},f=mt(i),g=dt(f),h=await s.getDimensions(a),p=f==="y",w=p?"top":"left",x=p?"bottom":"right",y=p?"clientHeight":"clientWidth",b=r.reference[g]+r.reference[f]-m[f]-r.floating[g],v=m[f]-r.reference[f],R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a)),O=R?R[y]:0;(!O||!await(s.isElement==null?void 0:s.isElement(R)))&&(O=c.floating[y]||r.floating[g]);let I=b/2-v/2,C=O/2-h[g]/2-1,A=j(u[w],C),L=j(u[x],C),$=A,Y=O-h[g]-L,S=O/2-h[g]/2+I,q=ut($,S,Y),H=!l.arrow&&k(i)!=null&&S!==q&&r.reference[g]/2-(S<$?A:L)-h[g]/2<0,D=H?S<$?S-$:S-Y:0;return{[f]:m[f]+D,data:{[f]:q,centerOffset:S-q-D,...H&&{alignmentOffset:D}},reset:H}}});function Le(t,e,n){return(t?[...n.filter(i=>k(i)===t),...n.filter(i=>k(i)!==t)]:n.filter(i=>W(i)===i)).filter(i=>t?k(i)===t||(e?it(i)!==i:!1):!0)}var zt=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,i;let{rects:r,middlewareData:s,placement:c,platform:l,elements:a}=e,{crossAxis:d=!1,alignment:u,allowedPlacements:m=bt,autoAlignment:f=!0,...g}=X(t,e),h=u!==void 0||m===bt?Le(u||null,f,m):m,p=await Z(e,g),w=((n=s.autoPlacement)==null?void 0:n.index)||0,x=h[w];if(x==null)return{};let y=Ot(x,r,await(l.isRTL==null?void 0:l.isRTL(a.floating)));if(c!==x)return{reset:{placement:h[0]}};let b=[p[W(x)],p[y[0]],p[y[1]]],v=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:x,overflows:b}],R=h[w+1];if(R)return{data:{index:w+1,overflows:v},reset:{placement:R}};let O=v.map(A=>{let L=k(A.placement);return[A.placement,L&&d?A.overflows.slice(0,2).reduce(($,Y)=>$+Y,0):A.overflows[0],A.overflows]}).sort((A,L)=>A[1]-L[1]),C=((i=O.filter(A=>A[2].slice(0,k(A[0])?2:3).every(L=>L<=0))[0])==null?void 0:i[0])||O[0][0];return C!==c?{data:{index:w+1,overflows:v},reset:{placement:C}}:{}}}},It=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;let{placement:i,middlewareData:r,rects:s,initialPlacement:c,platform:l,elements:a}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...p}=X(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};let w=W(i),x=_(c),y=W(c)===c,b=await(l.isRTL==null?void 0:l.isRTL(a.floating)),v=m||(y||!h?[st(c)]:Nt(c)),R=g!=="none";!m&&R&&v.push(...Bt(c,h,g,b));let O=[c,...v],I=await Z(e,p),C=[],A=((o=r.flip)==null?void 0:o.overflows)||[];if(d&&C.push(I[w]),u){let S=Ot(i,s,b);C.push(I[S[0]],I[S[1]])}if(A=[...A,{placement:i,overflows:C}],!C.every(S=>S<=0)){var L,$;let S=(((L=r.flip)==null?void 0:L.index)||0)+1,q=O[S];if(q&&(!(u==="alignment"?x!==_(q):!1)||A.every(F=>_(F.placement)===x?F.overflows[0]>0:!0)))return{data:{index:S,overflows:A},reset:{placement:q}};let H=($=A.filter(D=>D.overflows[0]<=0).sort((D,F)=>D.overflows[1]-F.overflows[1])[0])==null?void 0:$.placement;if(!H)switch(f){case"bestFit":{var Y;let D=(Y=A.filter(F=>{if(R){let U=_(F.placement);return U===x||U==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(U=>U>0).reduce((U,Ae)=>U+Ae,0)]).sort((F,U)=>F[1]-U[1])[0])==null?void 0:Y[0];D&&(H=D);break}case"initialPlacement":H=c;break}if(i!==H)return{reset:{placement:H}}}return{}}}};function $t(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Ht(t){return vt.some(e=>t[e]>=0)}var Ut=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){let{rects:n}=e,{strategy:o="referenceHidden",...i}=X(t,e);switch(o){case"referenceHidden":{let r=await Z(e,{...i,elementContext:"reference"}),s=$t(r,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Ht(s)}}}case"escaped":{let r=await Z(e,{...i,altBoundary:!0}),s=$t(r,n.floating);return{data:{escapedOffsets:s,escaped:Ht(s)}}}default:return{}}}}};var De=new Set(["left","top"]);async function Fe(t,e){let{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=W(n),c=k(n),l=_(n)==="y",a=De.has(s)?-1:1,d=r&&l?-1:1,u=X(e,t),{mainAxis:m,crossAxis:f,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof g=="number"&&(f=c==="end"?g*-1:g),l?{x:f*d,y:m*a}:{x:m*a,y:f*d}}var jt=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;let{x:i,y:r,placement:s,middlewareData:c}=e,l=await Fe(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:r+l.y,data:{...l,placement:s}}}}},Xt=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:c={fn:p=>{let{x:w,y:x}=p;return{x:w,y:x}}},...l}=X(t,e),a={x:n,y:o},d=await Z(e,l),u=_(W(i)),m=At(u),f=a[m],g=a[u];if(r){let p=m==="y"?"top":"left",w=m==="y"?"bottom":"right",x=f+d[p],y=f-d[w];f=ut(x,f,y)}if(s){let p=u==="y"?"top":"left",w=u==="y"?"bottom":"right",x=g+d[p],y=g-d[w];g=ut(x,g,y)}let h=c.fn({...e,[m]:f,[u]:g});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[m]:r,[u]:s}}}}}};function gt(){return typeof window<"u"}function G(t){return qt(t)?(t.nodeName||"").toLowerCase():"#document"}function P(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function N(t){var e;return(e=(qt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function qt(t){return gt()?t instanceof Node||t instanceof P(t).Node:!1}function E(t){return gt()?t instanceof Element||t instanceof P(t).Element:!1}function B(t){return gt()?t instanceof HTMLElement||t instanceof P(t).HTMLElement:!1}function Yt(t){return!gt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof P(t).ShadowRoot}var Me=new Set(["inline","contents"]);function et(t){let{overflow:e,overflowX:n,overflowY:o,display:i}=T(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!Me.has(i)}var ke=new Set(["table","td","th"]);function Kt(t){return ke.has(G(t))}var Ne=[":popover-open",":modal"];function lt(t){return Ne.some(e=>{try{return t.matches(e)}catch{return!1}})}var Be=["transform","translate","scale","rotate","perspective"],We=["transform","translate","scale","rotate","perspective","filter"],$e=["paint","layout","strict","content"];function nt(t){let e=ht(),n=E(t)?T(t):t;return Be.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||We.some(o=>(n.willChange||"").includes(o))||$e.some(o=>(n.contain||"").includes(o))}function Gt(t){let e=z(t);for(;B(e)&&!J(e);){if(nt(e))return e;if(lt(e))return null;e=z(e)}return null}function ht(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var He=new Set(["html","body","#document"]);function J(t){return He.has(G(t))}function T(t){return P(t).getComputedStyle(t)}function at(t){return E(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function z(t){if(G(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Yt(t)&&t.host||N(t);return Yt(e)?e.host:e}function Jt(t){let e=z(t);return J(e)?t.ownerDocument?t.ownerDocument.body:t.body:B(e)&&et(e)?e:Jt(e)}function tt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);let i=Jt(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),s=P(i);if(r){let c=pt(s);return e.concat(s,s.visualViewport||[],et(i)?i:[],c&&n?tt(c):[])}return e.concat(i,tt(i,[],n))}function pt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ee(t){let e=T(t),n=parseFloat(e.width)||0,o=parseFloat(e.height)||0,i=B(t),r=i?t.offsetWidth:n,s=i?t.offsetHeight:o,c=rt(n)!==r||rt(o)!==s;return c&&(n=r,o=s),{width:n,height:o,$:c}}function Pt(t){return E(t)?t:t.contextElement}function ot(t){let e=Pt(t);if(!B(e))return M(1);let n=e.getBoundingClientRect(),{width:o,height:i,$:r}=ee(e),s=(r?rt(n.width):n.width)/o,c=(r?rt(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}var Ve=M(0);function ne(t){let e=P(t);return!ht()||!e.visualViewport?Ve:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function _e(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==P(t)?!1:e}function Q(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);let i=t.getBoundingClientRect(),r=Pt(t),s=M(1);e&&(o?E(o)&&(s=ot(o)):s=ot(t));let c=_e(r,n,o)?ne(r):M(0),l=(i.left+c.x)/s.x,a=(i.top+c.y)/s.y,d=i.width/s.x,u=i.height/s.y;if(r){let m=P(r),f=o&&E(o)?P(o):o,g=m,h=pt(g);for(;h&&o&&f!==g;){let p=ot(h),w=h.getBoundingClientRect(),x=T(h),y=w.left+(h.clientLeft+parseFloat(x.paddingLeft))*p.x,b=w.top+(h.clientTop+parseFloat(x.paddingTop))*p.y;l*=p.x,a*=p.y,d*=p.x,u*=p.y,l+=y,a+=b,g=P(h),h=pt(g)}}return K({width:d,height:u,x:l,y:a})}function wt(t,e){let n=at(t).scrollLeft;return e?e.left+n:Q(N(t)).left+n}function oe(t,e){let n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-wt(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function ze(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t,r=i==="fixed",s=N(o),c=e?lt(e.floating):!1;if(o===s||c&&r)return n;let l={scrollLeft:0,scrollTop:0},a=M(1),d=M(0),u=B(o);if((u||!u&&!r)&&((G(o)!=="body"||et(s))&&(l=at(o)),B(o))){let f=Q(o);a=ot(o),d.x=f.x+o.clientLeft,d.y=f.y+o.clientTop}let m=s&&!u&&!r?oe(s,l):M(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+d.x+m.x,y:n.y*a.y-l.scrollTop*a.y+d.y+m.y}}function Ie(t){return Array.from(t.getClientRects())}function Ue(t){let e=N(t),n=at(t),o=t.ownerDocument.body,i=V(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=V(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight),s=-n.scrollLeft+wt(t),c=-n.scrollTop;return T(o).direction==="rtl"&&(s+=V(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:c}}var Qt=25;function je(t,e){let n=P(t),o=N(t),i=n.visualViewport,r=o.clientWidth,s=o.clientHeight,c=0,l=0;if(i){r=i.width,s=i.height;let d=ht();(!d||d&&e==="fixed")&&(c=i.offsetLeft,l=i.offsetTop)}let a=wt(o);if(a<=0){let d=o.ownerDocument,u=d.body,m=getComputedStyle(u),f=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(o.clientWidth-u.clientWidth-f);g<=Qt&&(r-=g)}else a<=Qt&&(r+=a);return{width:r,height:s,x:c,y:l}}var Xe=new Set(["absolute","fixed"]);function Ye(t,e){let n=Q(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=B(t)?ot(t):M(1),s=t.clientWidth*r.x,c=t.clientHeight*r.y,l=i*r.x,a=o*r.y;return{width:s,height:c,x:l,y:a}}function Zt(t,e,n){let o;if(e==="viewport")o=je(t,n);else if(e==="document")o=Ue(N(t));else if(E(e))o=Ye(e,n);else{let i=ne(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return K(o)}function ie(t,e){let n=z(t);return n===e||!E(n)||J(n)?!1:T(n).position==="fixed"||ie(n,e)}function qe(t,e){let n=e.get(t);if(n)return n;let o=tt(t,[],!1).filter(c=>E(c)&&G(c)!=="body"),i=null,r=T(t).position==="fixed",s=r?z(t):t;for(;E(s)&&!J(s);){let c=T(s),l=nt(s);!l&&c.position==="fixed"&&(i=null),(r?!l&&!i:!l&&c.position==="static"&&!!i&&Xe.has(i.position)||et(s)&&!l&&ie(t,s))?o=o.filter(d=>d!==s):i=c,s=z(s)}return e.set(t,o),o}function Ke(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t,s=[...n==="clippingAncestors"?lt(e)?[]:qe(e,this._c):[].concat(n),o],c=s[0],l=s.reduce((a,d)=>{let u=Zt(e,d,i);return a.top=V(u.top,a.top),a.right=j(u.right,a.right),a.bottom=j(u.bottom,a.bottom),a.left=V(u.left,a.left),a},Zt(e,c,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ge(t){let{width:e,height:n}=ee(t);return{width:e,height:n}}function Je(t,e,n){let o=B(e),i=N(e),r=n==="fixed",s=Q(t,!0,r,e),c={scrollLeft:0,scrollTop:0},l=M(0);function a(){l.x=wt(i)}if(o||!o&&!r)if((G(e)!=="body"||et(i))&&(c=at(e)),o){let f=Q(e,!0,r,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else i&&a();r&&!o&&i&&a();let d=i&&!o&&!r?oe(i,c):M(0),u=s.left+c.scrollLeft-l.x-d.x,m=s.top+c.scrollTop-l.y-d.y;return{x:u,y:m,width:s.width,height:s.height}}function St(t){return T(t).position==="static"}function te(t,e){if(!B(t)||T(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return N(t)===n&&(n=n.ownerDocument.body),n}function se(t,e){let n=P(t);if(lt(t))return n;if(!B(t)){let i=z(t);for(;i&&!J(i);){if(E(i)&&!St(i))return i;i=z(i)}return n}let o=te(t,e);for(;o&&Kt(o)&&St(o);)o=te(o,e);return o&&J(o)&&St(o)&&!nt(o)?n:o||Gt(t)||n}var Qe=async function(t){let e=this.getOffsetParent||se,n=this.getDimensions,o=await n(t.floating);return{reference:Je(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Ze(t){return T(t).direction==="rtl"}var xt={convertOffsetParentRelativeRectToViewportRelativeRect:ze,getDocumentElement:N,getClippingRect:Ke,getOffsetParent:se,getElementRects:Qe,getClientRects:Ie,getDimensions:Ge,getScale:ot,isElement:E,isRTL:Ze};function re(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function tn(t,e){let n=null,o,i=N(t);function r(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),r();let a=t.getBoundingClientRect(),{left:d,top:u,width:m,height:f}=a;if(c||e(),!m||!f)return;let g=ct(u),h=ct(i.clientWidth-(d+m)),p=ct(i.clientHeight-(u+f)),w=ct(d),y={rootMargin:-g+"px "+-h+"px "+-p+"px "+-w+"px",threshold:V(0,j(1,l))||1},b=!0;function v(R){let O=R[0].intersectionRatio;if(O!==l){if(!b)return s();O?s(!1,O):o=setTimeout(()=>{s(!1,1e-7)},1e3)}O===1&&!re(a,t.getBoundingClientRect())&&s(),b=!1}try{n=new IntersectionObserver(v,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(v,y)}n.observe(t)}return s(!0),r}function ce(t,e,n,o){o===void 0&&(o={});let{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,a=Pt(t),d=i||r?[...a?tt(a):[],...tt(e)]:[];d.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),r&&w.addEventListener("resize",n)});let u=a&&c?tn(a,n):null,m=-1,f=null;s&&(f=new ResizeObserver(w=>{let[x]=w;x&&x.target===a&&f&&(f.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var y;(y=f)==null||y.observe(e)})),n()}),a&&!l&&f.observe(a),f.observe(e));let g,h=l?Q(t):null;l&&p();function p(){let w=Q(t);h&&!re(h,w)&&n(),h=w,g=requestAnimationFrame(p)}return n(),()=>{var w;d.forEach(x=>{i&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),u?.(),(w=f)==null||w.disconnect(),f=null,l&&cancelAnimationFrame(g)}}var le=jt,ae=zt,fe=Xt,Ct=It;var ue=Ut,de=_t;var me=(t,e,n)=>{let o=new Map,i={platform:xt,...n},r={...i.platform,_c:o};return Vt(t,e,{...i,platform:r})};function ge(t){return en(t)}function Et(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function en(t){for(let e=t;e;e=Et(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Et(t);e;e=Et(e)){if(!(e instanceof Element))continue;let n=getComputedStyle(e);if(n.display!=="contents"&&(n.position!=="static"||nt(n)||e.tagName==="BODY"))return e}return null}(function(){if(!!1){let e=xt.getOffsetParent;xt.getOffsetParent=n=>e(n,ge)}})();function he(t){let e=window.devicePixelRatio||1;return Math.round(t*e)/e}var ye=(async(t,{referenceEl:e,floatingEl:n,overlayPositioning:o="absolute",placement:i,flipDisabled:r,flipPlacements:s,offsetDistance:c,offsetSkidding:l,arrowEl:a,type:d})=>{if(!e||!n)return;let u=Lt(n)==="rtl",{x:m,y:f,placement:g,strategy:h,middlewareData:p}=await me(e,n,{strategy:o,placement:i==="auto"||i==="auto-start"||i==="auto-end"?void 0:pe(i,u),middleware:on({placement:i,flipDisabled:r,flipPlacements:s?.map(b=>pe(b,u)),offsetDistance:c,offsetSkidding:l,arrowEl:a,type:d})});if(a&&p.arrow){let{x:b,y:v}=p.arrow,R=g.split("-")[0],O=b!=null?"left":"top",I=cn[R],C={left:"",top:"",bottom:"",right:""};"floatingLayout"in t&&(t.floatingLayout=R==="left"||R==="right"?"horizontal":"vertical"),Object.assign(a.style,{...C,[O]:`${O=="left"?b:v}px`,[R]:"100%",transform:I})}let x=p.hide?.referenceHidden?"hidden":null,y=x?"none":null;n.setAttribute(nn,g),Object.assign(n.style,{pointerEvents:y,position:h,transform:`translate(${he(m)}px,${he(f)}px)`,visibility:x})}),nn="data-placement",ve=["top","bottom","right","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end","leading","trailing","leading-start","leading-end","trailing-start","trailing-end"],Ln="bottom-start",Dn="bottom-end",Fn={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function on({placement:t,flipDisabled:e,flipPlacements:n,offsetDistance:o,offsetSkidding:i,arrowEl:r,type:s}){let c=[fe(),ue()];return s==="menu"&&c.push(Ct({fallbackPlacements:n||["top-start","top","top-end","bottom-start","bottom","bottom-end"]})),c.push(le({mainAxis:typeof o=="number"?o:0,crossAxis:typeof i=="number"?i:0})),t==="auto"||t==="auto-start"||t==="auto-end"?c.push(ae({alignment:t==="auto-start"?"start":t==="auto-end"?"end":null})):e||c.push(Ct(n?{fallbackPlacements:n}:{})),r&&c.push(de({element:r})),c}function sn(t){return ve.includes(t)}function Mn(t,e){let n=t.filter(sn);return n.length!==t.length&&console.warn(`${e.tagName}: Invalid value found in: flipPlacements. Try any of these: ${ve.map(o=>`"${o}"`).join(", ").trim()}`,{el:e}),n}function pe(t,e=!1){let n=["left","right"];return e&&n.reverse(),t.replace(/leading/gi,n[0]).replace(/trailing/gi,n[1])}async function kn(t,e,n=!1){if(!t.open||!e.floatingEl||!e.referenceEl)return;if(Object.assign(e.floatingEl.style,{display:"block",position:e.overlayPositioning??"absolute"}),!ft.get(t))return be(t);await(n?rn(t):ye)(t,e)}function rn(t){let e=yt.get(t);return e||(e=Dt(ye,Tt.reposition,{edges:["leading","trailing"]}),yt.set(t,e),e)}var cn={top:"",left:"rotate(-90deg)",bottom:"rotate(180deg)",right:"rotate(90deg)"},ft=new WeakMap,yt=new WeakMap;async function be(t){let{referenceEl:e,floatingEl:n}=t;if(!n.isConnected)return;let o=ce;ft.set(t,{state:"pending"});let i,r=o(e,n,()=>{let s=t.reposition();i||(i=s)});return ft.set(t,{state:"active",cleanUp:r}),i}function ln(t){let{floatingEl:e}=t;e&&Object.assign(e.style,{display:"",pointerEvents:"",position:"",transform:"",visibility:""})}async function Nn(t){let{floatingEl:e,referenceEl:n}=t;if(ln(t),!(!e||!n)&&(an(t),!!t.open))return be(t)}function an(t){let e=ft.get(t);e?.state==="active"&&e.cleanUp(),ft.delete(t),yt.get(t)?.cancel(),yt.delete(t)}var we=4,Bn=Math.ceil(Math.hypot(we,we));export{Ln as a,Dn as b,Fn as c,Mn as d,kn as e,ln as f,Nn as g,an as h,Bn as i};
|
|
3
|
+
v5.0.0-next.4 */
|
|
4
|
+
import{a as Dt}from"./EQC2JW3I.js";import{e as Lt}from"./Z6CRZOOK.js";import{K as Tt}from"./CSQVLDPF.js";var vt=["top","right","bottom","left"],Ft=["start","end"],bt=vt.reduce((t,e)=>t.concat(e,e+"-"+Ft[0],e+"-"+Ft[1]),[]),j=Math.min,V=Math.max,rt=Math.round,ct=Math.floor,M=t=>({x:t,y:t}),Oe={left:"right",right:"left",bottom:"top",top:"bottom"},Re={start:"end",end:"start"};function ut(t,e,n){return V(t,j(e,n))}function X(t,e){return typeof t=="function"?t(e):t}function W(t){return t.split("-")[0]}function k(t){return t.split("-")[1]}function At(t){return t==="x"?"y":"x"}function dt(t){return t==="y"?"height":"width"}var Se=new Set(["top","bottom"]);function _(t){return Se.has(W(t))?"y":"x"}function mt(t){return At(_(t))}function Ot(t,e,n){n===void 0&&(n=!1);let o=k(t),i=mt(t),r=dt(i),s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=st(s)),[s,st(s)]}function Nt(t){let e=st(t);return[it(t),e,it(e)]}function it(t){return t.replace(/start|end/g,e=>Re[e])}var Mt=["left","right"],kt=["right","left"],Pe=["top","bottom"],Ce=["bottom","top"];function Ee(t,e,n){switch(t){case"top":case"bottom":return n?e?kt:Mt:e?Mt:kt;case"left":case"right":return e?Pe:Ce;default:return[]}}function Bt(t,e,n,o){let i=k(t),r=Ee(W(t),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),e&&(r=r.concat(r.map(it)))),r}function st(t){return t.replace(/left|right|bottom|top/g,e=>Oe[e])}function Te(t){return{top:0,right:0,bottom:0,left:0,...t}}function Rt(t){return typeof t!="number"?Te(t):{top:t,right:t,bottom:t,left:t}}function K(t){let{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Wt(t,e,n){let{reference:o,floating:i}=t,r=_(e),s=mt(e),c=dt(s),l=W(e),a=r==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2,f;switch(l){case"top":f={x:d,y:o.y-i.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-i.width,y:u};break;default:f={x:o.x,y:o.y}}switch(k(e)){case"start":f[s]-=m*(n&&a?-1:1);break;case"end":f[s]+=m*(n&&a?-1:1);break}return f}var Vt=async(t,e,n)=>{let{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,c=r.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e)),a=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=Wt(a,o,l),m=o,f={},g=0;for(let h=0;h<c.length;h++){let{name:p,fn:w}=c[h],{x,y,data:b,reset:v}=await w({x:d,y:u,initialPlacement:o,placement:m,strategy:i,middlewareData:f,rects:a,platform:s,elements:{reference:t,floating:e}});d=x??d,u=y??u,f={...f,[p]:{...f[p],...b}},v&&g<=50&&(g++,typeof v=="object"&&(v.placement&&(m=v.placement),v.rects&&(a=v.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):v.rects),{x:d,y:u}=Wt(a,m,l)),h=-1)}return{x:d,y:u,placement:m,strategy:i,middlewareData:f}};async function Z(t,e){var n;e===void 0&&(e={});let{x:o,y:i,platform:r,rects:s,elements:c,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:f=0}=X(e,t),g=Rt(f),p=c[m?u==="floating"?"reference":"floating":u],w=K(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(p)))==null||n?p:p.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:a,rootBoundary:d,strategy:l})),x=u==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,y=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating)),b=await(r.isElement==null?void 0:r.isElement(y))?await(r.getScale==null?void 0:r.getScale(y))||{x:1,y:1}:{x:1,y:1},v=K(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:y,strategy:l}):x);return{top:(w.top-v.top+g.top)/b.y,bottom:(v.bottom-w.bottom+g.bottom)/b.y,left:(w.left-v.left+g.left)/b.x,right:(v.right-w.right+g.right)/b.x}}var _t=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:o,placement:i,rects:r,platform:s,elements:c,middlewareData:l}=e,{element:a,padding:d=0}=X(t,e)||{};if(a==null)return{};let u=Rt(d),m={x:n,y:o},f=mt(i),g=dt(f),h=await s.getDimensions(a),p=f==="y",w=p?"top":"left",x=p?"bottom":"right",y=p?"clientHeight":"clientWidth",b=r.reference[g]+r.reference[f]-m[f]-r.floating[g],v=m[f]-r.reference[f],R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a)),O=R?R[y]:0;(!O||!await(s.isElement==null?void 0:s.isElement(R)))&&(O=c.floating[y]||r.floating[g]);let I=b/2-v/2,C=O/2-h[g]/2-1,A=j(u[w],C),L=j(u[x],C),$=A,Y=O-h[g]-L,S=O/2-h[g]/2+I,q=ut($,S,Y),H=!l.arrow&&k(i)!=null&&S!==q&&r.reference[g]/2-(S<$?A:L)-h[g]/2<0,D=H?S<$?S-$:S-Y:0;return{[f]:m[f]+D,data:{[f]:q,centerOffset:S-q-D,...H&&{alignmentOffset:D}},reset:H}}});function Le(t,e,n){return(t?[...n.filter(i=>k(i)===t),...n.filter(i=>k(i)!==t)]:n.filter(i=>W(i)===i)).filter(i=>t?k(i)===t||(e?it(i)!==i:!1):!0)}var zt=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,i;let{rects:r,middlewareData:s,placement:c,platform:l,elements:a}=e,{crossAxis:d=!1,alignment:u,allowedPlacements:m=bt,autoAlignment:f=!0,...g}=X(t,e),h=u!==void 0||m===bt?Le(u||null,f,m):m,p=await Z(e,g),w=((n=s.autoPlacement)==null?void 0:n.index)||0,x=h[w];if(x==null)return{};let y=Ot(x,r,await(l.isRTL==null?void 0:l.isRTL(a.floating)));if(c!==x)return{reset:{placement:h[0]}};let b=[p[W(x)],p[y[0]],p[y[1]]],v=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:x,overflows:b}],R=h[w+1];if(R)return{data:{index:w+1,overflows:v},reset:{placement:R}};let O=v.map(A=>{let L=k(A.placement);return[A.placement,L&&d?A.overflows.slice(0,2).reduce(($,Y)=>$+Y,0):A.overflows[0],A.overflows]}).sort((A,L)=>A[1]-L[1]),C=((i=O.filter(A=>A[2].slice(0,k(A[0])?2:3).every(L=>L<=0))[0])==null?void 0:i[0])||O[0][0];return C!==c?{data:{index:w+1,overflows:v},reset:{placement:C}}:{}}}},It=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;let{placement:i,middlewareData:r,rects:s,initialPlacement:c,platform:l,elements:a}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...p}=X(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};let w=W(i),x=_(c),y=W(c)===c,b=await(l.isRTL==null?void 0:l.isRTL(a.floating)),v=m||(y||!h?[st(c)]:Nt(c)),R=g!=="none";!m&&R&&v.push(...Bt(c,h,g,b));let O=[c,...v],I=await Z(e,p),C=[],A=((o=r.flip)==null?void 0:o.overflows)||[];if(d&&C.push(I[w]),u){let S=Ot(i,s,b);C.push(I[S[0]],I[S[1]])}if(A=[...A,{placement:i,overflows:C}],!C.every(S=>S<=0)){var L,$;let S=(((L=r.flip)==null?void 0:L.index)||0)+1,q=O[S];if(q&&(!(u==="alignment"?x!==_(q):!1)||A.every(F=>_(F.placement)===x?F.overflows[0]>0:!0)))return{data:{index:S,overflows:A},reset:{placement:q}};let H=($=A.filter(D=>D.overflows[0]<=0).sort((D,F)=>D.overflows[1]-F.overflows[1])[0])==null?void 0:$.placement;if(!H)switch(f){case"bestFit":{var Y;let D=(Y=A.filter(F=>{if(R){let U=_(F.placement);return U===x||U==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(U=>U>0).reduce((U,Ae)=>U+Ae,0)]).sort((F,U)=>F[1]-U[1])[0])==null?void 0:Y[0];D&&(H=D);break}case"initialPlacement":H=c;break}if(i!==H)return{reset:{placement:H}}}return{}}}};function $t(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Ht(t){return vt.some(e=>t[e]>=0)}var Ut=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){let{rects:n}=e,{strategy:o="referenceHidden",...i}=X(t,e);switch(o){case"referenceHidden":{let r=await Z(e,{...i,elementContext:"reference"}),s=$t(r,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Ht(s)}}}case"escaped":{let r=await Z(e,{...i,altBoundary:!0}),s=$t(r,n.floating);return{data:{escapedOffsets:s,escaped:Ht(s)}}}default:return{}}}}};var De=new Set(["left","top"]);async function Fe(t,e){let{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=W(n),c=k(n),l=_(n)==="y",a=De.has(s)?-1:1,d=r&&l?-1:1,u=X(e,t),{mainAxis:m,crossAxis:f,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof g=="number"&&(f=c==="end"?g*-1:g),l?{x:f*d,y:m*a}:{x:m*a,y:f*d}}var jt=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;let{x:i,y:r,placement:s,middlewareData:c}=e,l=await Fe(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:r+l.y,data:{...l,placement:s}}}}},Xt=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:c={fn:p=>{let{x:w,y:x}=p;return{x:w,y:x}}},...l}=X(t,e),a={x:n,y:o},d=await Z(e,l),u=_(W(i)),m=At(u),f=a[m],g=a[u];if(r){let p=m==="y"?"top":"left",w=m==="y"?"bottom":"right",x=f+d[p],y=f-d[w];f=ut(x,f,y)}if(s){let p=u==="y"?"top":"left",w=u==="y"?"bottom":"right",x=g+d[p],y=g-d[w];g=ut(x,g,y)}let h=c.fn({...e,[m]:f,[u]:g});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[m]:r,[u]:s}}}}}};function gt(){return typeof window<"u"}function G(t){return qt(t)?(t.nodeName||"").toLowerCase():"#document"}function P(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function N(t){var e;return(e=(qt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function qt(t){return gt()?t instanceof Node||t instanceof P(t).Node:!1}function E(t){return gt()?t instanceof Element||t instanceof P(t).Element:!1}function B(t){return gt()?t instanceof HTMLElement||t instanceof P(t).HTMLElement:!1}function Yt(t){return!gt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof P(t).ShadowRoot}var Me=new Set(["inline","contents"]);function et(t){let{overflow:e,overflowX:n,overflowY:o,display:i}=T(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!Me.has(i)}var ke=new Set(["table","td","th"]);function Kt(t){return ke.has(G(t))}var Ne=[":popover-open",":modal"];function lt(t){return Ne.some(e=>{try{return t.matches(e)}catch{return!1}})}var Be=["transform","translate","scale","rotate","perspective"],We=["transform","translate","scale","rotate","perspective","filter"],$e=["paint","layout","strict","content"];function nt(t){let e=ht(),n=E(t)?T(t):t;return Be.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||We.some(o=>(n.willChange||"").includes(o))||$e.some(o=>(n.contain||"").includes(o))}function Gt(t){let e=z(t);for(;B(e)&&!J(e);){if(nt(e))return e;if(lt(e))return null;e=z(e)}return null}function ht(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var He=new Set(["html","body","#document"]);function J(t){return He.has(G(t))}function T(t){return P(t).getComputedStyle(t)}function at(t){return E(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function z(t){if(G(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Yt(t)&&t.host||N(t);return Yt(e)?e.host:e}function Jt(t){let e=z(t);return J(e)?t.ownerDocument?t.ownerDocument.body:t.body:B(e)&&et(e)?e:Jt(e)}function tt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);let i=Jt(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),s=P(i);if(r){let c=pt(s);return e.concat(s,s.visualViewport||[],et(i)?i:[],c&&n?tt(c):[])}return e.concat(i,tt(i,[],n))}function pt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ee(t){let e=T(t),n=parseFloat(e.width)||0,o=parseFloat(e.height)||0,i=B(t),r=i?t.offsetWidth:n,s=i?t.offsetHeight:o,c=rt(n)!==r||rt(o)!==s;return c&&(n=r,o=s),{width:n,height:o,$:c}}function Pt(t){return E(t)?t:t.contextElement}function ot(t){let e=Pt(t);if(!B(e))return M(1);let n=e.getBoundingClientRect(),{width:o,height:i,$:r}=ee(e),s=(r?rt(n.width):n.width)/o,c=(r?rt(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}var Ve=M(0);function ne(t){let e=P(t);return!ht()||!e.visualViewport?Ve:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function _e(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==P(t)?!1:e}function Q(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);let i=t.getBoundingClientRect(),r=Pt(t),s=M(1);e&&(o?E(o)&&(s=ot(o)):s=ot(t));let c=_e(r,n,o)?ne(r):M(0),l=(i.left+c.x)/s.x,a=(i.top+c.y)/s.y,d=i.width/s.x,u=i.height/s.y;if(r){let m=P(r),f=o&&E(o)?P(o):o,g=m,h=pt(g);for(;h&&o&&f!==g;){let p=ot(h),w=h.getBoundingClientRect(),x=T(h),y=w.left+(h.clientLeft+parseFloat(x.paddingLeft))*p.x,b=w.top+(h.clientTop+parseFloat(x.paddingTop))*p.y;l*=p.x,a*=p.y,d*=p.x,u*=p.y,l+=y,a+=b,g=P(h),h=pt(g)}}return K({width:d,height:u,x:l,y:a})}function wt(t,e){let n=at(t).scrollLeft;return e?e.left+n:Q(N(t)).left+n}function oe(t,e){let n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-wt(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function ze(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t,r=i==="fixed",s=N(o),c=e?lt(e.floating):!1;if(o===s||c&&r)return n;let l={scrollLeft:0,scrollTop:0},a=M(1),d=M(0),u=B(o);if((u||!u&&!r)&&((G(o)!=="body"||et(s))&&(l=at(o)),B(o))){let f=Q(o);a=ot(o),d.x=f.x+o.clientLeft,d.y=f.y+o.clientTop}let m=s&&!u&&!r?oe(s,l):M(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+d.x+m.x,y:n.y*a.y-l.scrollTop*a.y+d.y+m.y}}function Ie(t){return Array.from(t.getClientRects())}function Ue(t){let e=N(t),n=at(t),o=t.ownerDocument.body,i=V(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=V(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight),s=-n.scrollLeft+wt(t),c=-n.scrollTop;return T(o).direction==="rtl"&&(s+=V(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:c}}var Qt=25;function je(t,e){let n=P(t),o=N(t),i=n.visualViewport,r=o.clientWidth,s=o.clientHeight,c=0,l=0;if(i){r=i.width,s=i.height;let d=ht();(!d||d&&e==="fixed")&&(c=i.offsetLeft,l=i.offsetTop)}let a=wt(o);if(a<=0){let d=o.ownerDocument,u=d.body,m=getComputedStyle(u),f=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(o.clientWidth-u.clientWidth-f);g<=Qt&&(r-=g)}else a<=Qt&&(r+=a);return{width:r,height:s,x:c,y:l}}var Xe=new Set(["absolute","fixed"]);function Ye(t,e){let n=Q(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=B(t)?ot(t):M(1),s=t.clientWidth*r.x,c=t.clientHeight*r.y,l=i*r.x,a=o*r.y;return{width:s,height:c,x:l,y:a}}function Zt(t,e,n){let o;if(e==="viewport")o=je(t,n);else if(e==="document")o=Ue(N(t));else if(E(e))o=Ye(e,n);else{let i=ne(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return K(o)}function ie(t,e){let n=z(t);return n===e||!E(n)||J(n)?!1:T(n).position==="fixed"||ie(n,e)}function qe(t,e){let n=e.get(t);if(n)return n;let o=tt(t,[],!1).filter(c=>E(c)&&G(c)!=="body"),i=null,r=T(t).position==="fixed",s=r?z(t):t;for(;E(s)&&!J(s);){let c=T(s),l=nt(s);!l&&c.position==="fixed"&&(i=null),(r?!l&&!i:!l&&c.position==="static"&&!!i&&Xe.has(i.position)||et(s)&&!l&&ie(t,s))?o=o.filter(d=>d!==s):i=c,s=z(s)}return e.set(t,o),o}function Ke(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t,s=[...n==="clippingAncestors"?lt(e)?[]:qe(e,this._c):[].concat(n),o],c=s[0],l=s.reduce((a,d)=>{let u=Zt(e,d,i);return a.top=V(u.top,a.top),a.right=j(u.right,a.right),a.bottom=j(u.bottom,a.bottom),a.left=V(u.left,a.left),a},Zt(e,c,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ge(t){let{width:e,height:n}=ee(t);return{width:e,height:n}}function Je(t,e,n){let o=B(e),i=N(e),r=n==="fixed",s=Q(t,!0,r,e),c={scrollLeft:0,scrollTop:0},l=M(0);function a(){l.x=wt(i)}if(o||!o&&!r)if((G(e)!=="body"||et(i))&&(c=at(e)),o){let f=Q(e,!0,r,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else i&&a();r&&!o&&i&&a();let d=i&&!o&&!r?oe(i,c):M(0),u=s.left+c.scrollLeft-l.x-d.x,m=s.top+c.scrollTop-l.y-d.y;return{x:u,y:m,width:s.width,height:s.height}}function St(t){return T(t).position==="static"}function te(t,e){if(!B(t)||T(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return N(t)===n&&(n=n.ownerDocument.body),n}function se(t,e){let n=P(t);if(lt(t))return n;if(!B(t)){let i=z(t);for(;i&&!J(i);){if(E(i)&&!St(i))return i;i=z(i)}return n}let o=te(t,e);for(;o&&Kt(o)&&St(o);)o=te(o,e);return o&&J(o)&&St(o)&&!nt(o)?n:o||Gt(t)||n}var Qe=async function(t){let e=this.getOffsetParent||se,n=this.getDimensions,o=await n(t.floating);return{reference:Je(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Ze(t){return T(t).direction==="rtl"}var xt={convertOffsetParentRelativeRectToViewportRelativeRect:ze,getDocumentElement:N,getClippingRect:Ke,getOffsetParent:se,getElementRects:Qe,getClientRects:Ie,getDimensions:Ge,getScale:ot,isElement:E,isRTL:Ze};function re(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function tn(t,e){let n=null,o,i=N(t);function r(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),r();let a=t.getBoundingClientRect(),{left:d,top:u,width:m,height:f}=a;if(c||e(),!m||!f)return;let g=ct(u),h=ct(i.clientWidth-(d+m)),p=ct(i.clientHeight-(u+f)),w=ct(d),y={rootMargin:-g+"px "+-h+"px "+-p+"px "+-w+"px",threshold:V(0,j(1,l))||1},b=!0;function v(R){let O=R[0].intersectionRatio;if(O!==l){if(!b)return s();O?s(!1,O):o=setTimeout(()=>{s(!1,1e-7)},1e3)}O===1&&!re(a,t.getBoundingClientRect())&&s(),b=!1}try{n=new IntersectionObserver(v,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(v,y)}n.observe(t)}return s(!0),r}function ce(t,e,n,o){o===void 0&&(o={});let{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,a=Pt(t),d=i||r?[...a?tt(a):[],...tt(e)]:[];d.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),r&&w.addEventListener("resize",n)});let u=a&&c?tn(a,n):null,m=-1,f=null;s&&(f=new ResizeObserver(w=>{let[x]=w;x&&x.target===a&&f&&(f.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var y;(y=f)==null||y.observe(e)})),n()}),a&&!l&&f.observe(a),f.observe(e));let g,h=l?Q(t):null;l&&p();function p(){let w=Q(t);h&&!re(h,w)&&n(),h=w,g=requestAnimationFrame(p)}return n(),()=>{var w;d.forEach(x=>{i&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),u?.(),(w=f)==null||w.disconnect(),f=null,l&&cancelAnimationFrame(g)}}var le=jt,ae=zt,fe=Xt,Ct=It;var ue=Ut,de=_t;var me=(t,e,n)=>{let o=new Map,i={platform:xt,...n},r={...i.platform,_c:o};return Vt(t,e,{...i,platform:r})};function ge(t){return en(t)}function Et(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function en(t){for(let e=t;e;e=Et(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Et(t);e;e=Et(e)){if(!(e instanceof Element))continue;let n=getComputedStyle(e);if(n.display!=="contents"&&(n.position!=="static"||nt(n)||e.tagName==="BODY"))return e}return null}(function(){if(!!1){let e=xt.getOffsetParent;xt.getOffsetParent=n=>e(n,ge)}})();function he(t){let e=window.devicePixelRatio||1;return Math.round(t*e)/e}var ye=(async(t,{referenceEl:e,floatingEl:n,overlayPositioning:o="absolute",placement:i,flipDisabled:r,flipPlacements:s,offsetDistance:c,offsetSkidding:l,arrowEl:a,type:d})=>{if(!e||!n)return;let u=Lt(n)==="rtl",{x:m,y:f,placement:g,strategy:h,middlewareData:p}=await me(e,n,{strategy:o,placement:i==="auto"||i==="auto-start"||i==="auto-end"?void 0:pe(i,u),middleware:on({placement:i,flipDisabled:r,flipPlacements:s?.map(b=>pe(b,u)),offsetDistance:c,offsetSkidding:l,arrowEl:a,type:d})});if(a&&p.arrow){let{x:b,y:v}=p.arrow,R=g.split("-")[0],O=b!=null?"left":"top",I=cn[R],C={left:"",top:"",bottom:"",right:""};"floatingLayout"in t&&(t.floatingLayout=R==="left"||R==="right"?"horizontal":"vertical"),Object.assign(a.style,{...C,[O]:`${O=="left"?b:v}px`,[R]:"100%",transform:I})}let x=p.hide?.referenceHidden?"hidden":null,y=x?"none":null;n.setAttribute(nn,g),Object.assign(n.style,{pointerEvents:y,position:h,transform:`translate(${he(m)}px,${he(f)}px)`,visibility:x})}),nn="data-placement",ve=["top","bottom","right","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end","leading","trailing","leading-start","leading-end","trailing-start","trailing-end"],Ln="bottom-start",Dn="bottom-end",Fn={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function on({placement:t,flipDisabled:e,flipPlacements:n,offsetDistance:o,offsetSkidding:i,arrowEl:r,type:s}){let c=[fe(),ue()];return s==="menu"&&c.push(Ct({fallbackPlacements:n||["top-start","top","top-end","bottom-start","bottom","bottom-end"]})),c.push(le({mainAxis:typeof o=="number"?o:0,crossAxis:typeof i=="number"?i:0})),t==="auto"||t==="auto-start"||t==="auto-end"?c.push(ae({alignment:t==="auto-start"?"start":t==="auto-end"?"end":null})):e||c.push(Ct(n?{fallbackPlacements:n}:{})),r&&c.push(de({element:r})),c}function sn(t){return ve.includes(t)}function Mn(t,e){let n=t.filter(sn);return n.length!==t.length&&console.warn(`${e.tagName}: Invalid value found in: flipPlacements. Try any of these: ${ve.map(o=>`"${o}"`).join(", ").trim()}`,{el:e}),n}function pe(t,e=!1){let n=["left","right"];return e&&n.reverse(),t.replace(/leading/gi,n[0]).replace(/trailing/gi,n[1])}async function kn(t,e,n=!1){if(!t.open||!e.floatingEl||!e.referenceEl)return;if(Object.assign(e.floatingEl.style,{display:"block",position:e.overlayPositioning??"absolute"}),!ft.get(t))return be(t);await(n?rn(t):ye)(t,e)}function rn(t){let e=yt.get(t);return e||(e=Dt(ye,Tt.reposition,{edges:["leading","trailing"]}),yt.set(t,e),e)}var cn={top:"",left:"rotate(-90deg)",bottom:"rotate(180deg)",right:"rotate(90deg)"},ft=new WeakMap,yt=new WeakMap;async function be(t){let{referenceEl:e,floatingEl:n}=t;if(!n.isConnected)return;let o=ce;ft.set(t,{state:"pending"});let i,r=o(e,n,()=>{let s=t.reposition();i||(i=s)});return ft.set(t,{state:"active",cleanUp:r}),i}function ln(t){let{floatingEl:e}=t;e&&Object.assign(e.style,{display:"",pointerEvents:"",position:"",transform:"",visibility:""})}async function Nn(t){let{floatingEl:e,referenceEl:n}=t;if(ln(t),!(!e||!n)&&(an(t),!!t.open))return be(t)}function an(t){let e=ft.get(t);e?.state==="active"&&e.cleanUp(),ft.delete(t),yt.get(t)?.cancel(),yt.delete(t)}var we=4,Bn=Math.ceil(Math.hypot(we,we));export{Ln as a,Dn as b,Fn as c,Mn as d,kn as e,ln as f,Nn as g,an as h,Bn as i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as F}from"./ZS5AQJG2.js";import{c as z,d as C,e as A}from"./Z7ARDFVR.js";import{c as w,e as I,h as R}from"./RJQBTNQM.js";import{a as y,b as B}from"./MNOO2GEE.js";import{a as d}from"./7NSIROF7.js";import{a as x}from"./UMUEMXJF.js";import"./GBKXT23N.js";import"./KJXOD5Z2.js";import"./UBGSVRI6.js";import{e as k}from"./S4PILGWU.js";import"./OFPYAEOU.js";import{B as p,C as m,D as v,E as l,P as g,g as u,h as b,l as f,o as c}from"./C7SWOQAB.js";var L={container:"container",radio:"radio"},T=u`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block;cursor:pointer}:host .container{position:relative;outline:2px solid transparent;outline-offset:2px;display:flex}:host .radio{cursor:pointer;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;outline-color:transparent;border-radius:var(--calcite-radio-button-corner-radius, var(--calcite-corner-radius-pill));background-color:var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1));box-shadow:inset 0 0 0 var(--calcite-border-width-sm) var(--calcite-radio-button-border-color, var(--calcite-color-border-input))}:host([hovered]) .radio,:host(:not([checked])[focused]:not([disabled])) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-md) var(--calcite-radio-button-border-color, var(--calcite-color-brand-hover))}:host([hovered]) .radio:active,:host(:not([checked])[focused]:not([disabled])) .radio:active{box-shadow:inset 0 0 0 var(--calcite-border-width-md) var(--calcite-color-brand-press)}:host([focused]) .radio{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([disabled]) .radio{cursor:default;opacity:var(--calcite-opacity-disabled)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hovered][disabled]) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-sm) var(--calcite-radio-button-border-color, var(--calcite-color-border-input))}:host([scale=s]){--calcite-internal-radio-size: var( --calcite-radio-button-size, var(--calcite-radio-size, var(--calcite-size-fixed-md)) )}:host([scale=m]){--calcite-internal-radio-size: var( --calcite-radio-button-size, var(--calcite-radio-size, var(--calcite-size-fixed-md-plus)) )}:host([scale=l]){--calcite-internal-radio-size: var( --calcite-radio-button-size, var(--calcite-radio-size, var(--calcite-size-fixed-lg)) )}.radio{block-size:var(--calcite-internal-radio-size);inline-size:var(--calcite-internal-radio-size);size:var(--calcite-internal-radio-size)}:host([scale=s][checked]) .radio,:host([hovered][scale=s][checked][disabled]) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-lg) var(--calcite-radio-button-border-color, var(--calcite-color-brand))}:host([scale=s][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-lg) var(--calcite-radio-button-border-color, var(--calcite-color-brand)),0 0 0 2px var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1))}:host([scale=m][checked]) .radio,:host([hovered][scale=m][checked][disabled]) .radio{box-shadow:inset 0 0 0 5px var(--calcite-radio-button-border-color, var(--calcite-color-brand))}:host([scale=m][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 5px var(--calcite-radio-button-border-color, var(--calcite-color-brand)),0 0 0 2px var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1))}:host([scale=l][checked]) .radio,:host([hovered][scale=l][checked][disabled]) .radio{box-shadow:inset 0 0 0 6px var(--calcite-radio-button-border-color, var(--calcite-color-brand))}:host([scale=l][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 6px var(--calcite-radio-button-border-color, var(--calcite-color-brand)),0 0 0 2px var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1))}@media(forced-colors:active){:host([checked]) .radio:after,:host([checked][disabled]) .radio:after{content:"";inline-size:var(--calcite-internal-radio-size);block-size:var(--calcite-internal-radio-size);background-color:CanvasText;display:block}}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}`,h=class extends v{constructor(){super(),this.containerRef=p(),this.focusSetter=x()(this),this.checked=!1,this.disabled=!1,this.focused=!1,this.hovered=!1,this.required=!1,this.scale="m",this.calciteInternalRadioButtonBlur=c({cancelable:!1}),this.calciteInternalRadioButtonCheckedChange=c({cancelable:!1}),this.calciteInternalRadioButtonFocus=c({cancelable:!1}),this.calciteRadioButtonChange=c({cancelable:!1}),this.listen("pointerenter",this.pointerEnterHandler),this.listen("pointerleave",this.pointerLeaveHandler),this.listen("click",this.clickHandler),this.listen("keydown",this.handleKeyDown)}static{this.properties={checked:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],focused:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],hovered:[7,{},{reflect:!0,type:Boolean}],label:1,labelText:1,name:[3,{},{reflect:!0}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],value:1}}static{this.styles=T}async emitCheckedChange(){this.calciteInternalRadioButtonCheckedChange.emit()}async setFocus(e){return this.focusSetter(()=>this.containerRef.value,e)}connectedCallback(){this.rootNode=this.el.getRootNode(),this.name&&this.checkLastRadioButton(),z(this),w(this),this.updateTabIndexOfOtherRadioButtonsInGroup(),super.connectedCallback()}willUpdate(e){this.hasUpdated&&e.has("checked")&&this.checkedChanged(this.checked),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.updateTabIndexOfOtherRadioButtonsInGroup(),e.has("name")&&this.checkLastRadioButton()}updated(){y(this)}loaded(){this.focused&&!this.disabled&&this.setFocus()}disconnectedCallback(){super.disconnectedCallback(),C(this),I(this),this.updateTabIndexOfOtherRadioButtonsInGroup()}checkedChanged(e){e&&this.uncheckOtherRadioButtonsInGroup(),this.calciteInternalRadioButtonCheckedChange.emit()}syncHiddenFormInput(e){e.type="radio"}selectItem(e,i){e[i].click()}queryButtons(){return Array.from(this.rootNode.querySelectorAll("calcite-radio-button:not([hidden])")).filter(e=>e.name===this.name)}isFocusable(){let e=this.queryButtons(),i=e.find(a=>!a.disabled),t=e.find(a=>a.checked);return i===this.el&&!t}check(){this.disabled||(this.focused=!0,this.setFocus(),!this.checked&&(this.uncheckAllRadioButtonsInGroup(),this.checked=!0,this.calciteRadioButtonChange.emit()))}clickHandler(){this.disabled||this.check()}onLabelClick(e){if(this.disabled||this.el.hidden)return;let i=e.currentTarget,t=i.for?this.rootNode.querySelector(`calcite-radio-button[id="${i.for}"]`):i.querySelector(`calcite-radio-button[name="${this.name}"]`);t&&(t.focused=!0,this.setFocus(),!t.checked&&(this.uncheckOtherRadioButtonsInGroup(),t.checked=!0,this.calciteRadioButtonChange.emit()))}checkLastRadioButton(){let i=this.queryButtons().filter(t=>t.checked);if(i?.length>1){let t=i[i.length-1];i.filter(a=>a!==t).forEach(a=>{a.checked=!1,a.emitCheckedChange()})}}uncheckAllRadioButtonsInGroup(){this.queryButtons().forEach(i=>{i.checked&&(i.checked=!1,i.focused=!1)})}uncheckOtherRadioButtonsInGroup(){this.queryButtons().filter(t=>t!==this.el).forEach(t=>{t.checked&&(t.checked=!1,t.focused=!1)})}updateTabIndexOfOtherRadioButtonsInGroup(){this.queryButtons().filter(t=>t!==this.el&&!t.disabled).forEach(t=>{t.manager?.component.requestUpdate()})}getTabIndex(){if(!this.disabled)return this.checked||this.isFocusable()?0:-1}pointerEnterHandler(){this.disabled||(this.hovered=!0)}pointerLeaveHandler(){this.disabled||(this.hovered=!1)}handleKeyDown(e){let i=["ArrowLeft","ArrowUp","ArrowRight","ArrowDown"," "],{key:t}=e,{el:a}=this;if(i.indexOf(t)===-1)return;if(t===" "){this.check(),e.preventDefault();return}let r=t;k(a)==="rtl"&&(t==="ArrowRight"&&(r="ArrowLeft"),t==="ArrowLeft"&&(r="ArrowRight"));let o=Array.from(this.rootNode.querySelectorAll("calcite-radio-button:not([hidden])")).filter(s=>s.name===this.name),n=0;switch(o.some((s,q)=>{if(s.checked)return n=q,!0}),r){case"ArrowLeft":case"ArrowUp":e.preventDefault(),this.selectItem(o,this.getNextNonDisabledIndex(o,n,"left"));return;case"ArrowRight":case"ArrowDown":e.preventDefault(),this.selectItem(o,this.getNextNonDisabledIndex(o,n,"right"));return;default:return}}getNextNonDisabledIndex(e,i,t){let a=e.length,r=t==="left"?-1:1,o=d(i+r,a);for(;e[o].disabled;)o=d(o+r,a);return o}onContainerBlur(){this.focused=!1,this.calciteInternalRadioButtonBlur.emit()}onContainerFocus(){this.disabled||(this.focused=!0,this.calciteInternalRadioButtonFocus.emit())}render(){let e=this.getTabIndex();return B({disabled:this.disabled,children:b`<div .ariaChecked=${this.checked} .ariaLabel=${A(this)} class=${l(L.container)} @blur=${this.onContainerBlur} @focus=${this.onContainerFocus} role=radio tabindex=${e??f} ${m(this.containerRef)}><div class=${l(L.radio)}></div>${this.labelText&&F({labelText:this.labelText,spacingInlineStart:!0})||""}</div>${R({component:this})}`})}};g("calcite-radio-button",h);export{h as RadioButton};
|
|
3
|
+
v5.0.0-next.4 */
|
|
4
|
+
import{a as F}from"./SHXU5GEM.js";import{c as z,d as C,e as A}from"./J2ACTXE5.js";import{c as w,e as I,h as R}from"./U3G47NPB.js";import{a as y,b as B}from"./PRB44CR7.js";import{a as d}from"./AS2E2XYE.js";import{a as x}from"./HKVRX5SD.js";import"./D5SFHDV6.js";import"./TLLHA7VC.js";import"./VZVYZPXQ.js";import{e as k}from"./Z6CRZOOK.js";import"./XRJOD24G.js";import{B as p,C as m,D as v,E as l,P as g,g as u,h as b,l as f,o as c}from"./CSQVLDPF.js";var L={container:"container",radio:"radio"},T=u`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block;cursor:pointer}:host .container{position:relative;outline:2px solid transparent;outline-offset:2px;display:flex}:host .radio{cursor:pointer;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;outline-color:transparent;border-radius:var(--calcite-radio-button-corner-radius, var(--calcite-corner-radius-pill));background-color:var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1));box-shadow:inset 0 0 0 var(--calcite-border-width-sm) var(--calcite-radio-button-border-color, var(--calcite-color-border-input))}:host([hovered]) .radio,:host(:not([checked])[focused]:not([disabled])) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-md) var(--calcite-radio-button-border-color, var(--calcite-color-brand-hover))}:host([hovered]) .radio:active,:host(:not([checked])[focused]:not([disabled])) .radio:active{box-shadow:inset 0 0 0 var(--calcite-border-width-md) var(--calcite-color-brand-press)}:host([focused]) .radio{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([disabled]) .radio{cursor:default;opacity:var(--calcite-opacity-disabled)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hovered][disabled]) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-sm) var(--calcite-radio-button-border-color, var(--calcite-color-border-input))}:host([scale=s]){--calcite-internal-radio-size: var( --calcite-radio-button-size, var(--calcite-radio-size, var(--calcite-size-fixed-md)) )}:host([scale=m]){--calcite-internal-radio-size: var( --calcite-radio-button-size, var(--calcite-radio-size, var(--calcite-size-fixed-md-plus)) )}:host([scale=l]){--calcite-internal-radio-size: var( --calcite-radio-button-size, var(--calcite-radio-size, var(--calcite-size-fixed-lg)) )}.radio{block-size:var(--calcite-internal-radio-size);inline-size:var(--calcite-internal-radio-size);size:var(--calcite-internal-radio-size)}:host([scale=s][checked]) .radio,:host([hovered][scale=s][checked][disabled]) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-lg) var(--calcite-radio-button-border-color, var(--calcite-color-brand))}:host([scale=s][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 var(--calcite-border-width-lg) var(--calcite-radio-button-border-color, var(--calcite-color-brand)),0 0 0 2px var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1))}:host([scale=m][checked]) .radio,:host([hovered][scale=m][checked][disabled]) .radio{box-shadow:inset 0 0 0 5px var(--calcite-radio-button-border-color, var(--calcite-color-brand))}:host([scale=m][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 5px var(--calcite-radio-button-border-color, var(--calcite-color-brand)),0 0 0 2px var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1))}:host([scale=l][checked]) .radio,:host([hovered][scale=l][checked][disabled]) .radio{box-shadow:inset 0 0 0 6px var(--calcite-radio-button-border-color, var(--calcite-color-brand))}:host([scale=l][focused][checked]:not([disabled])) .radio{box-shadow:inset 0 0 0 6px var(--calcite-radio-button-border-color, var(--calcite-color-brand)),0 0 0 2px var(--calcite-radio-button-background-color, var(--calcite-color-foreground-1))}@media(forced-colors:active){:host([checked]) .radio:after,:host([checked][disabled]) .radio:after{content:"";inline-size:var(--calcite-internal-radio-size);block-size:var(--calcite-internal-radio-size);background-color:CanvasText;display:block}}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}`,h=class extends v{constructor(){super(),this.containerRef=p(),this.focusSetter=x()(this),this.checked=!1,this.disabled=!1,this.focused=!1,this.hovered=!1,this.required=!1,this.scale="m",this.calciteInternalRadioButtonBlur=c({cancelable:!1}),this.calciteInternalRadioButtonCheckedChange=c({cancelable:!1}),this.calciteInternalRadioButtonFocus=c({cancelable:!1}),this.calciteRadioButtonChange=c({cancelable:!1}),this.listen("pointerenter",this.pointerEnterHandler),this.listen("pointerleave",this.pointerLeaveHandler),this.listen("click",this.clickHandler),this.listen("keydown",this.handleKeyDown)}static{this.properties={checked:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],focused:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],hovered:[7,{},{reflect:!0,type:Boolean}],label:1,labelText:1,name:[3,{},{reflect:!0}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],value:1}}static{this.styles=T}async emitCheckedChange(){this.calciteInternalRadioButtonCheckedChange.emit()}async setFocus(e){return this.focusSetter(()=>this.containerRef.value,e)}connectedCallback(){this.rootNode=this.el.getRootNode(),this.name&&this.checkLastRadioButton(),z(this),w(this),this.updateTabIndexOfOtherRadioButtonsInGroup(),super.connectedCallback()}willUpdate(e){this.hasUpdated&&e.has("checked")&&this.checkedChanged(this.checked),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.updateTabIndexOfOtherRadioButtonsInGroup(),e.has("name")&&this.checkLastRadioButton()}updated(){y(this)}loaded(){this.focused&&!this.disabled&&this.setFocus()}disconnectedCallback(){super.disconnectedCallback(),C(this),I(this),this.updateTabIndexOfOtherRadioButtonsInGroup()}checkedChanged(e){e&&this.uncheckOtherRadioButtonsInGroup(),this.calciteInternalRadioButtonCheckedChange.emit()}syncHiddenFormInput(e){e.type="radio"}selectItem(e,i){e[i].click()}queryButtons(){return Array.from(this.rootNode.querySelectorAll("calcite-radio-button:not([hidden])")).filter(e=>e.name===this.name)}isFocusable(){let e=this.queryButtons(),i=e.find(a=>!a.disabled),t=e.find(a=>a.checked);return i===this.el&&!t}check(){this.disabled||(this.focused=!0,this.setFocus(),!this.checked&&(this.uncheckAllRadioButtonsInGroup(),this.checked=!0,this.calciteRadioButtonChange.emit()))}clickHandler(){this.disabled||this.check()}onLabelClick(e){if(this.disabled||this.el.hidden)return;let i=e.currentTarget,t=i.for?this.rootNode.querySelector(`calcite-radio-button[id="${i.for}"]`):i.querySelector(`calcite-radio-button[name="${this.name}"]`);t&&(t.focused=!0,this.setFocus(),!t.checked&&(this.uncheckOtherRadioButtonsInGroup(),t.checked=!0,this.calciteRadioButtonChange.emit()))}checkLastRadioButton(){let i=this.queryButtons().filter(t=>t.checked);if(i?.length>1){let t=i[i.length-1];i.filter(a=>a!==t).forEach(a=>{a.checked=!1,a.emitCheckedChange()})}}uncheckAllRadioButtonsInGroup(){this.queryButtons().forEach(i=>{i.checked&&(i.checked=!1,i.focused=!1)})}uncheckOtherRadioButtonsInGroup(){this.queryButtons().filter(t=>t!==this.el).forEach(t=>{t.checked&&(t.checked=!1,t.focused=!1)})}updateTabIndexOfOtherRadioButtonsInGroup(){this.queryButtons().filter(t=>t!==this.el&&!t.disabled).forEach(t=>{t.manager?.component.requestUpdate()})}getTabIndex(){if(!this.disabled)return this.checked||this.isFocusable()?0:-1}pointerEnterHandler(){this.disabled||(this.hovered=!0)}pointerLeaveHandler(){this.disabled||(this.hovered=!1)}handleKeyDown(e){let i=["ArrowLeft","ArrowUp","ArrowRight","ArrowDown"," "],{key:t}=e,{el:a}=this;if(i.indexOf(t)===-1)return;if(t===" "){this.check(),e.preventDefault();return}let r=t;k(a)==="rtl"&&(t==="ArrowRight"&&(r="ArrowLeft"),t==="ArrowLeft"&&(r="ArrowRight"));let o=Array.from(this.rootNode.querySelectorAll("calcite-radio-button:not([hidden])")).filter(s=>s.name===this.name),n=0;switch(o.some((s,q)=>{if(s.checked)return n=q,!0}),r){case"ArrowLeft":case"ArrowUp":e.preventDefault(),this.selectItem(o,this.getNextNonDisabledIndex(o,n,"left"));return;case"ArrowRight":case"ArrowDown":e.preventDefault(),this.selectItem(o,this.getNextNonDisabledIndex(o,n,"right"));return;default:return}}getNextNonDisabledIndex(e,i,t){let a=e.length,r=t==="left"?-1:1,o=d(i+r,a);for(;e[o].disabled;)o=d(o+r,a);return o}onContainerBlur(){this.focused=!1,this.calciteInternalRadioButtonBlur.emit()}onContainerFocus(){this.disabled||(this.focused=!0,this.calciteInternalRadioButtonFocus.emit())}render(){let e=this.getTabIndex();return B({disabled:this.disabled,children:b`<div .ariaChecked=${this.checked} .ariaLabel=${A(this)} class=${l(L.container)} @blur=${this.onContainerBlur} @focus=${this.onContainerFocus} role=radio tabindex=${e??f} ${m(this.containerRef)}><div class=${l(L.radio)}></div>${this.labelText&&F({labelText:this.labelText,spacingInlineStart:!0})||""}</div>${R({component:this})}`})}};g("calcite-radio-button",h);export{h as RadioButton};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as S,b as C}from"./
|
|
3
|
+
v5.0.0-next.4 */
|
|
4
|
+
import{a as S,b as C}from"./WNEJDZTS.js";import{a as O,b as x}from"./PRB44CR7.js";import{a as g}from"./J2NLU7RP.js";import{a as y}from"./VZVYZPXQ.js";import{l as v}from"./Z6CRZOOK.js";import"./XRJOD24G.js";import{D as b,E as p,P as f,g as h,h as u,o as m}from"./CSQVLDPF.js";var l={container:"container",containerHorizontal:"container--horizontal",containerVertical:"container--vertical"},E=h`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.container{display:flex;flex:1 1 auto}.container--vertical{flex-direction:column}.container--horizontal{flex-direction:row}:host([hidden]){display:none}[hidden]{display:none}`,c=class extends b{constructor(){super(),this.dragEnabled=!0,this.items=[],this.mutationObserver=g("mutation",()=>{this.setUpSorting()}),this.disabled=!1,this.handleSelector="calcite-handle",this.layout="vertical",this.loading=!1,this.calciteListOrderChange=m({cancelable:!1}),this.listen("calciteHandleNudge",this.calciteHandleNudgeNextHandler)}static{this.properties={canPull:[0,{},{attribute:!1}],canPut:[0,{},{attribute:!1}],disabled:[7,{},{reflect:!0,type:Boolean}],dragSelector:[3,{},{reflect:!0}],group:[3,{},{reflect:!0}],handleSelector:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],loading:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=E}connectedCallback(){super.connectedCallback(),this.setUpSorting(),this.beginObserving()}load(){y.deprecated("component",{name:"sortable-list",removalVersion:4,suggested:"block-group"})}updated(){O(this)}disconnectedCallback(){super.disconnectedCallback(),C(this),this.endObserving()}calciteHandleNudgeNextHandler(e){this.handleNudgeEvent(e)}onGlobalDragStart(){this.endObserving()}onGlobalDragEnd(){this.beginObserving()}onDragEnd(){}onDragStart(){}onDragSort(){this.items=Array.from(this.el.children),this.calciteListOrderChange.emit()}handleNudgeEvent(e){let{direction:a}=e.detail,t=e.composedPath().find(r=>r.matches(this.handleSelector)),i=this.items.find(r=>r.contains(t)||e.composedPath().includes(r)),d=this.items.length-1,s=this.items.indexOf(i),o=!1,n;a==="up"?s===0?o=!0:n=s-1:s===d?n=0:s===d-1?o=!0:n=s+2,this.endObserving(),o?i.parentElement.appendChild(i):i.parentElement.insertBefore(i,this.items[n]),this.items=Array.from(this.el.children),this.beginObserving(),requestAnimationFrame(()=>v(t)),"selected"in t&&(t.selected=!0)}setUpSorting(){this.items=Array.from(this.el.children),S(this)}beginObserving(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}endObserving(){this.mutationObserver?.disconnect()}render(){let{disabled:e,layout:a}=this,t=a==="horizontal"||!1;return x({disabled:e,children:u`<div class=${p({[l.container]:!0,[l.containerVertical]:!t,[l.containerHorizontal]:t})}><slot></slot></div>`})}};f("calcite-sortable-list",c);export{c as SortableList};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{N as s}from"./
|
|
3
|
+
v5.0.0-next.4 */
|
|
4
|
+
import{N as s}from"./CSQVLDPF.js";var d=new Set,f={trace:0,debug:1,info:2,warn:4,error:8,off:10};function p(e){return f[e]>=f[s().logLevel]}function r(e,...n){if(!p(e))return;console[e].call(this,"%ccalcite","background: #007AC2; color: #fff; border-radius: 4px; padding: 2px 4px;",...n)}var a,m={debug:e=>r("debug",e),info:e=>r("info",e),warn:e=>r("warn",e),error:e=>r("error",e),trace:e=>r("trace",e),deprecated:$};function $(e,{component:n,name:t,suggested:o,removalVersion:i}){let c=`${e}:${e==="component"?"":n}${t}`;if(d.has(c))return;d.add(c);let l=Array.isArray(o);l&&!a&&(a=new Intl.ListFormat("en",{style:"long",type:"disjunction"}));let g=`[${t}] ${e} is deprecated and will be removed in ${i==="future"?"a future version":`v${i}`}.${o?` Use ${l?a.format(o.map(u=>`"${u}"`)):`"${o}"`} instead.`:""}`;r("warn",g)}export{m as a};
|