@orangelogic/design-system 2.60.0 → 2.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/library/apps/cortex/src/types.d.ts +2 -0
- package/library/chunks/_baseRest.ClTMQtN1.js +67 -0
- package/library/chunks/{_baseUniq.BUihBa8c.js → _baseUniq.Df-fLIBx.js} +53 -56
- package/library/chunks/{amazon_s3.DeaMdPPn.js → amazon_s3.BEMtqafk.js} +1 -1
- package/library/chunks/animate.El-MpOws.js +37 -0
- package/library/chunks/animation-registry.HmpwNuGH.js +34 -0
- package/library/chunks/{animation.B7d72NVK.js → animation.DfUHRQry.js} +10 -8
- package/library/chunks/array.DCtvHiLS.js +81 -0
- package/library/chunks/asset.CG_yXtWK.js +288 -0
- package/library/chunks/{browser.Va59Ix3P.js → browser.BHOCIF_A.js} +18 -16
- package/library/chunks/{button.CtCSNRB3.js → button.P71VJ5xh.js} +75 -74
- package/library/chunks/{button.styles.C8AIO8fd.js → button.styles.Dl5IQLHU.js} +1 -1
- package/library/chunks/{capitalize.CNStXZBq.js → capitalize.WSkCXkNE.js} +1 -1
- package/library/chunks/{chatbot.sm4Rph1v.js → chatbot.BmpIu59L.js} +2 -2
- package/library/chunks/{class-map.CoZTSvbM.js → class-map.BiVq-cVR.js} +1 -1
- package/library/chunks/{color-swatch-group.qJevXs50.js → color-swatch-group.DlLmydlB.js} +116 -127
- package/library/chunks/color-swatch.Bpb_hW2H.js +407 -0
- package/library/chunks/color.vLD2sNTs.js +164 -0
- package/library/chunks/{component.styles.CI-v8BZa.js → component.styles.DMSLciL5.js} +1 -1
- package/library/chunks/{confirm-popover.D2TF1x6K.js → confirm-popover.C1uA36JR.js} +15 -13
- package/library/chunks/{content-builder.WranV3P4.js → content-builder.Bf7kqzDI.js} +1 -1
- package/library/chunks/converters.DkDtLstb.js +11 -0
- package/library/chunks/{cropper.aA0v16xS.js → cropper.BraEEykE.js} +5004 -5024
- package/library/chunks/custom-element.L4WJXn1j.js +14 -0
- package/library/chunks/debounce.DaHuiSGU.js +15 -0
- package/library/chunks/{default-value.CIKAvD5l.js → default-value.COZopaet.js} +1 -1
- package/library/chunks/{dialog.B1TORO6S.js → dialog.C_75RVVz.js} +52 -49
- package/library/chunks/{directive-helpers.DBHob-_L.js → directive-helpers.Dm4rc594.js} +1 -1
- package/library/chunks/dom.CZrJ64Dm.js +92 -0
- package/library/chunks/{dot-pagination.8f2oX_ge.js → dot-pagination.CoCIJsHC.js} +24 -22
- package/library/chunks/{endpoints.BgyupJys.js → endpoints.B7lcoc1N.js} +1 -3
- package/library/chunks/{file-on-demand.Cwgabdyw.js → file-on-demand.B2jNilAj.js} +1829 -1544
- package/library/chunks/{folder-select.DiWCwR-T.js → folder-select.CSEQxIXF.js} +380 -255
- package/library/chunks/{form-control.styles.NE2Q-quE.js → form-control.styles.CUGhvlfT.js} +1 -1
- package/library/chunks/{form.B8u0ywni.js → form.CO12-VK0.js} +1 -1
- package/library/chunks/{guard.BDP4A85K.js → guard.D4axKaMo.js} +1 -1
- package/library/chunks/{header.B_FD8uLt.js → header.Bd3G0-oA.js} +11 -9
- package/library/chunks/{hub-connection.CxfaT11o.js → hub-connection.BxT2b7Nq.js} +4 -3
- package/library/chunks/{i18n.BP2FRO1v.js → i18n.DrzK7TPf.js} +54 -7
- package/library/chunks/identity.ByMq8VxU.js +6 -0
- package/library/chunks/{if-defined.MfEgpxEN.js → if-defined.BRoBj_Rp.js} +1 -1
- package/library/chunks/{iframe.DZm7FiCl.js → iframe.UCj6Ze2A.js} +18 -16
- package/library/chunks/{image.Ycf8RudS.js → image.DZCRhE3G.js} +82 -79
- package/library/chunks/image.mbpyiQpQ.js +82 -0
- package/library/chunks/index.S0wy3rzm.js +373 -0
- package/library/chunks/isObjectLike.D3cpZO39.js +81 -0
- package/library/chunks/{isSymbol.L0C2ND_U.js → isSymbol.huJ_Cvxt.js} +1 -1
- package/library/chunks/lib-cortex-element.CVMmyPMC.js +146 -0
- package/library/chunks/{list-editor.COkw5JKG.js → list-editor.CrLntuM7.js} +75 -79
- package/library/chunks/{custom-element.vnXBMQxc.js → lit-element.jLBm65_O.js} +123 -277
- package/library/chunks/{live.LdB9xEhp.js → live.SCz6M8Gs.js} +2 -2
- package/library/chunks/{mailchimp.BjbPJfd-.js → mailchimp.Bs6uJVsf.js} +1 -1
- package/library/chunks/{modal.BqNLxgs1.js → modal.U1QltQKe.js} +25 -19
- package/library/chunks/{option.D9KJhzHs.js → option.D1u5-cTt.js} +21 -19
- package/library/chunks/{orangelogic.BgbQXkBv.js → orangelogic.TdFfoPUN.js} +1 -1
- package/library/chunks/{overlayscrollbars.aFuRG5Rs.js → overlayscrollbars.XhGWx9Zk.js} +1 -1
- package/library/chunks/{pagination.C2FN4fmO.js → pagination.BI3LONVU.js} +17 -15
- package/library/chunks/{ref.BaCjlzLO.js → ref.bzeTdX0K.js} +2 -2
- package/library/chunks/{repeat.CauKaXyy.js → repeat.DbF2p5ae.js} +2 -2
- package/library/chunks/responsive.CA6dcNiM.js +17 -0
- package/library/chunks/{scroll.DwPiX2Ox.js → scroll.xtO5yojm.js} +3 -2
- package/library/chunks/{slot.DJLm4Dig.js → slot.j5oheLJC.js} +12 -4
- package/library/chunks/{state.Cw55xXlb.js → state.CSDxrqLd.js} +1 -1
- package/library/chunks/{static.BjNkqt7_.js → static.UA3G1Deq.js} +1 -1
- package/library/chunks/string.Cp_XNbnV.js +160 -0
- package/library/chunks/{style-map.CZovMmo_.js → style-map.llVFPd__.js} +1 -1
- package/library/chunks/{tab-group.5fLnWflv.js → tab-group.DxSlcWK0.js} +20 -18
- package/library/chunks/{table.BAr8KKc6.js → table.CY-iMTWV.js} +457 -505
- package/library/chunks/template.CsJd8Pb_.js +20 -0
- package/library/chunks/time.D_uFZqqe.js +118 -0
- package/library/chunks/{toString.CL_lYXbK.js → toString.CRT5zqEU.js} +3 -3
- package/library/chunks/toast.BXNbwZV8.js +25 -0
- package/library/chunks/{tree.CUfvIDyA.js → tree.CNbrP8cY.js} +33 -36
- package/library/chunks/{typography.BFpl0WMA.js → typography.oDzoLbZS.js} +16 -14
- package/library/chunks/{unsafe-html.DyO9_Rsq.js → unsafe-html.Dff7-rCx.js} +1 -1
- package/library/chunks/url.LjsR2sB5.js +15 -0
- package/library/chunks/user-agent.D9aPuOyL.js +4 -0
- package/library/chunks/watch.q1sEjPWL.js +501 -0
- package/library/components/alert.js +38 -35
- package/library/components/animated-image.js +25 -23
- package/library/components/animation.js +7 -5
- package/library/components/array-line-clamp.d.ts +3 -0
- package/library/components/array-line-clamp.js +195 -0
- package/library/components/asset-link-format.js +223 -212
- package/library/components/atoms.js +164 -162
- package/library/components/avatar.js +28 -26
- package/library/components/badge.js +10 -8
- package/library/components/bicolor-picker.js +21 -19
- package/library/components/border-input-group.js +11 -9
- package/library/components/breadcrumb-item.js +14 -12
- package/library/components/breadcrumb.js +24 -22
- package/library/components/button-group.js +26 -24
- package/library/components/button.js +14 -13
- package/library/components/card.js +28 -19
- package/library/components/checkbox.js +29 -23
- package/library/components/color-picker.js +19 -17
- package/library/components/color-swatch-group.js +20 -17
- package/library/components/color-swatch.js +16 -13
- package/library/components/confirm-popover.js +11 -9
- package/library/components/copy-button.js +15 -13
- package/library/components/corner-position-input-group.js +13 -11
- package/library/components/cortex-element.d.ts +3 -0
- package/library/components/cortex-element.js +5 -0
- package/library/components/cropper.js +7 -5
- package/library/components/details.js +23 -20
- package/library/components/dialog.js +19 -16
- package/library/components/divider.js +13 -11
- package/library/components/dot-pagination.js +11 -9
- package/library/components/dot-status.js +10 -8
- package/library/components/drawer.js +63 -51
- package/library/components/dropdown.js +29 -26
- package/library/components/dynamic-select.js +12 -10
- package/library/components/element-clamp.js +28 -25
- package/library/components/file-on-demand.js +21 -20
- package/library/components/folder-select.js +12 -10
- package/library/components/format-bytes.js +11 -10
- package/library/components/format-date.js +11 -9
- package/library/components/format-number.js +16 -15
- package/library/components/format-time.js +118 -9
- package/library/components/grid-item.js +48 -46
- package/library/components/grid.js +31 -29
- package/library/components/header.js +10 -9
- package/library/components/hub-connection.js +6 -5
- package/library/components/icon-button.js +20 -18
- package/library/components/icon.js +17 -15
- package/library/components/iframe.js +10 -8
- package/library/components/image-comparer.js +27 -25
- package/library/components/image.js +14 -11
- package/library/components/include.js +26 -24
- package/library/components/input-group.js +15 -13
- package/library/components/input.js +23 -21
- package/library/components/line-clamp.js +12 -10
- package/library/components/list-editor.js +17 -15
- package/library/components/markdown.js +80 -78
- package/library/components/masonry.js +46 -44
- package/library/components/menu-item.js +151 -136
- package/library/components/menu-label.js +15 -13
- package/library/components/menu-section.js +18 -16
- package/library/components/menu.js +10 -8
- package/library/components/molecules.js +5 -5
- package/library/components/mutation-observer.js +12 -10
- package/library/components/option.js +10 -8
- package/library/components/organisms.js +2 -2
- package/library/components/padding-input-group.js +30 -28
- package/library/components/pagination.js +14 -12
- package/library/components/popup.js +3296 -9
- package/library/components/position-picker.js +12 -10
- package/library/components/progress-bar.js +13 -11
- package/library/components/progress-ring.js +15 -13
- package/library/components/qr-code.js +54 -52
- package/library/components/radio-button.js +19 -17
- package/library/components/radio-card.js +14 -12
- package/library/components/radio-group.js +20 -18
- package/library/components/radio.js +15 -13
- package/library/components/range.js +25 -23
- package/library/components/rating.js +17 -15
- package/library/components/relative-time.js +16 -14
- package/library/components/resize-observer.js +21 -19
- package/library/components/select.js +1442 -25
- package/library/components/shadow-input-group.js +19 -17
- package/library/components/share-option-list.js +20 -18
- package/library/components/sidebar.js +14 -12
- package/library/components/size-input-group.js +35 -33
- package/library/components/skeleton.js +12 -10
- package/library/components/space.js +12 -10
- package/library/components/spinner.js +17 -15
- package/library/components/split-panel.js +15 -13
- package/library/components/step.js +18 -16
- package/library/components/stepper-wizard.js +11 -9
- package/library/components/stepper.js +13 -11
- package/library/components/switch.js +21 -19
- package/library/components/tab-group.js +15 -13
- package/library/components/tab-panel.js +20 -18
- package/library/components/tab.js +18 -16
- package/library/components/table.js +69 -67
- package/library/components/tag.js +11 -9
- package/library/components/textarea.js +20 -18
- package/library/components/timecode.js +98 -8
- package/library/components/tooltip.js +24 -21
- package/library/components/tree-item.js +14 -11
- package/library/components/tree.js +12 -10
- package/library/components/typeface.js +13 -11
- package/library/components/types.js +15487 -15444
- package/library/components/typography.js +6 -4
- package/library/components/video.js +13 -11
- package/library/components/visually-hidden.js +15 -13
- package/library/events.d.ts +1 -0
- package/library/events.js +1 -0
- package/library/package.json +11 -2
- package/library/packages/atoms/src/components/array-line-clamp/array-line-clamp.d.ts +45 -0
- package/library/packages/atoms/src/components/array-line-clamp/array-line-clamp.styles.d.ts +2 -0
- package/library/packages/atoms/src/components/checkbox/checkbox.d.ts +2 -0
- package/library/packages/atoms/src/components/drawer/drawer.d.ts +7 -1
- package/library/packages/atoms/src/components/include/include.d.ts +1 -0
- package/library/packages/atoms/src/components/menu-item/menu-item.d.ts +2 -0
- package/library/packages/atoms/src/components/tree/tree.d.ts +0 -4
- package/library/packages/atoms/src/index.d.ts +1 -0
- package/library/packages/events/src/cx-file-on-demand-load-more.d.ts +8 -0
- package/library/packages/events/src/cx-file-on-demand-pin.d.ts +8 -0
- package/library/packages/events/src/cx-file-on-demand-unpin.d.ts +8 -0
- package/library/packages/events/src/cx-folder-select-search-term-change.d.ts +8 -0
- package/library/packages/events/src/cx-share-option-list-item-selected.d.ts +8 -0
- package/library/packages/events/src/events.d.ts +6 -2
- package/library/packages/molecules/src/asset-picker/asset-picker.d.ts +2 -0
- package/library/packages/molecules/src/cropper/cropper.d.ts +1 -0
- package/library/packages/molecules/src/cropper/react/Cropper.d.ts +1 -0
- package/library/packages/molecules/src/download-format-picker/download-format-picker.d.ts +1 -0
- package/library/packages/molecules/src/folder-select/components/folder-select-tree/folder-select-tree.d.ts +8 -0
- package/library/packages/molecules/src/folder-select/components/folder-select-tree-item/folder-select-tree-item.d.ts +1 -0
- package/library/packages/molecules/src/folder-select/folder-select.d.ts +6 -1
- package/library/packages/organisms/src/asset-link-format/asset-link-format.d.ts +3 -7
- package/library/packages/organisms/src/content-builder/styleController.d.ts +8 -8
- package/library/packages/organisms/src/file-on-demand/components/file-on-demand-asset/file-on-demand-asset.d.ts +80 -0
- package/library/packages/organisms/src/file-on-demand/components/file-on-demand-asset/file-on-demand-asset.styles.d.ts +2 -0
- package/library/packages/organisms/src/file-on-demand/components/file-on-demand-pinned-status.ts/file-on-demand-pinned-status.d.ts +44 -0
- package/library/packages/organisms/src/file-on-demand/file-on-demand.constants.d.ts +1 -0
- package/library/packages/organisms/src/file-on-demand/file-on-demand.d.ts +11 -18
- package/library/packages/organisms/src/file-on-demand/file-on-demand.utils.d.ts +6 -0
- package/library/packages/services/src/api/folder/folder.d.ts +4 -8
- package/library/packages/services/src/api/folder/folder.types.d.ts +2 -1
- package/library/packages/types/src/file-on-demand.d.ts +4 -0
- package/library/packages/types/src/folder-select.d.ts +9 -2
- package/library/packages/utils/src/custom-element/i18n.d.ts +40 -2
- package/library/packages/utils/src/drag-scroll/drag-scroll.d.ts +22 -0
- package/library/packages/utils/src/drag-scroll/index.d.ts +1 -0
- package/library/packages/utils/src/font/font.d.ts +26 -0
- package/library/packages/utils/src/font/index.d.ts +1 -0
- package/library/packages/utils/src/history-manager/history-manager.d.ts +13 -0
- package/library/packages/utils/src/history-manager/index.d.ts +1 -0
- package/library/packages/utils/src/index.d.ts +45 -0
- package/library/packages/utils/src/template/index.d.ts +1 -0
- package/library/packages/utils/src/template/template.d.ts +3 -0
- package/library/react-web-component.d.ts +418 -360
- package/library/utils.d.ts +1 -0
- package/library/utils.js +180 -0
- package/package.json +11 -2
- package/library/chunks/animation-registry.DavRkTTr.js +0 -69
- package/library/chunks/asset.Ba-CxnNM.js +0 -309
- package/library/chunks/color-swatch.DUe3iLLo.js +0 -558
- package/library/chunks/dom.C0OFx7ND.js +0 -78
- package/library/chunks/format-time.BW6-ZWCX.js +0 -226
- package/library/chunks/isObjectLike.z36Fu426.js +0 -34
- package/library/chunks/popup._w5T7x8f.js +0 -3307
- package/library/chunks/select.DfO4de04.js +0 -1441
- package/library/chunks/string.BCk3SmdZ.js +0 -144
- package/library/chunks/timecode.D7XTiQ_3.js +0 -105
- package/library/chunks/watch.BCJD77bD.js +0 -547
- package/library/packages/events/src/cx-load-more.d.ts +0 -8
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
import { a as S } from "./url.LjsR2sB5.js";
|
|
2
|
+
import "./array.DCtvHiLS.js";
|
|
3
|
+
import "./browser.BHOCIF_A.js";
|
|
4
|
+
import "./color.vLD2sNTs.js";
|
|
5
|
+
import "./modal.U1QltQKe.js";
|
|
6
|
+
import "./animate.El-MpOws.js";
|
|
7
|
+
import "./converters.DkDtLstb.js";
|
|
8
|
+
import "./custom-element.L4WJXn1j.js";
|
|
9
|
+
import "./debounce.DaHuiSGU.js";
|
|
10
|
+
import "./default-value.COZopaet.js";
|
|
11
|
+
import "./drag.DXEXVXPv.js";
|
|
12
|
+
import "./event.mFzZi4sr.js";
|
|
13
|
+
import { f as x } from "./form.CO12-VK0.js";
|
|
14
|
+
import "./i18n.DrzK7TPf.js";
|
|
15
|
+
import "./math.DqTA6ya4.js";
|
|
16
|
+
import "./scroll.xtO5yojm.js";
|
|
17
|
+
import { j as M } from "./dom.CZrJ64Dm.js";
|
|
18
|
+
import "./slot.j5oheLJC.js";
|
|
19
|
+
import "./tabbable.CcMz3mIL.js";
|
|
20
|
+
import "./user-agent.D9aPuOyL.js";
|
|
21
|
+
import "./watch.q1sEjPWL.js";
|
|
22
|
+
import "./toast.BXNbwZV8.js";
|
|
23
|
+
import "./image.mbpyiQpQ.js";
|
|
24
|
+
import "./number.CjNxU7Xs.js";
|
|
25
|
+
import "./parse.Cu5nBDTb.js";
|
|
26
|
+
import "./responsive.CA6dcNiM.js";
|
|
27
|
+
import "./string.Cp_XNbnV.js";
|
|
28
|
+
import "./template.CsJd8Pb_.js";
|
|
29
|
+
import "./time.D_uFZqqe.js";
|
|
30
|
+
function ut(t, e) {
|
|
31
|
+
return typeof Storage < "u" && localStorage.getItem(t) !== null ? localStorage.getItem(t) : e;
|
|
32
|
+
}
|
|
33
|
+
function ct(t, e) {
|
|
34
|
+
typeof Storage < "u" && localStorage.setItem(t, e.toString());
|
|
35
|
+
}
|
|
36
|
+
class ht {
|
|
37
|
+
constructor(e) {
|
|
38
|
+
this.currentZIndex = M(), (this.host = e).addController(this);
|
|
39
|
+
}
|
|
40
|
+
hostConnected() {
|
|
41
|
+
}
|
|
42
|
+
hostDisconnected() {
|
|
43
|
+
}
|
|
44
|
+
async activatePopup() {
|
|
45
|
+
this.currentZIndex = M();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
const mt = (t) => t.ctrlKey || t.metaKey;
|
|
49
|
+
var d = /* @__PURE__ */ ((t) => (t.DoNothing = "do-nothing", t.DownloadAsset = "download-asset", t.ExpandAssetInFullScreen = "expand-asset-in-full-screen", t.OpenAssetOverview = "open-asset-overview", t.OpenLink = "open-link", t.OpenPage = "open-page", t.OpenSpace = "open-space", t.ShareAsset = "share-asset", t.ShowAssetInLibrary = "show-asset-in-library", t))(d || {}), b = /* @__PURE__ */ ((t) => (t.Bento = "bento", t.Carousel = "carousel", t.Grid = "grid", t.Ribbon = "ribbon", t))(b || {}), E = /* @__PURE__ */ ((t) => (t.Expand = "expand", t.Split = "split", t))(E || {}), L = /* @__PURE__ */ ((t) => (t.Api = "api", t.Manual = "manual", t))(L || {}), O = /* @__PURE__ */ ((t) => (t.Automatic = "automatic", t.Custom = "custom", t))(O || {}), f = /* @__PURE__ */ ((t) => (t.DoNothing = "do-nothing", t.OpenAssetInLibrary = "open-asset-in-library", t.OpenAssetOverview = "open-asset-overview", t.Zoom = "zoom", t))(f || {});
|
|
50
|
+
function dt(t) {
|
|
51
|
+
const e = new FormData(t), s = {};
|
|
52
|
+
return e.forEach((n, r) => {
|
|
53
|
+
if (Reflect.has(s, r)) {
|
|
54
|
+
const o = s[r];
|
|
55
|
+
Array.isArray(o) ? o.push(n) : s[r] = [s[r], n];
|
|
56
|
+
} else
|
|
57
|
+
s[r] = n;
|
|
58
|
+
}), s;
|
|
59
|
+
}
|
|
60
|
+
function A(t) {
|
|
61
|
+
const s = [...t.getRootNode().querySelectorAll("*")], n = [...t.elements], r = x.get(t), o = r ? Array.from(r) : [];
|
|
62
|
+
return [...n, ...o].sort(
|
|
63
|
+
(i, a) => s.indexOf(i) < s.indexOf(a) ? -1 : s.indexOf(i) > s.indexOf(a) ? 1 : 0
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
function ft(t) {
|
|
67
|
+
return A(t).some(
|
|
68
|
+
(s) => s.hasAttribute("data-user-valid") || s.hasAttribute("data-user-invalid")
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
function pt(t) {
|
|
72
|
+
if (!this.ownerDocument.defaultView?.Matrix3 || !t)
|
|
73
|
+
return;
|
|
74
|
+
const e = this.ownerDocument.defaultView?.location.origin;
|
|
75
|
+
e && this.ownerDocument?.defaultView?.postMessage(
|
|
76
|
+
{
|
|
77
|
+
detail: { assetId: t, mode: "Details" },
|
|
78
|
+
type: "cx-cms5-view-asset"
|
|
79
|
+
},
|
|
80
|
+
e
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
function gt(t) {
|
|
84
|
+
if (!this.ownerDocument.defaultView?.Matrix3 || !t)
|
|
85
|
+
return;
|
|
86
|
+
const e = this.ownerDocument.defaultView?.location.origin;
|
|
87
|
+
e && this.ownerDocument?.defaultView?.postMessage(
|
|
88
|
+
{
|
|
89
|
+
detail: { assetId: t, mode: "Container" },
|
|
90
|
+
type: "cx-cms5-view-asset"
|
|
91
|
+
},
|
|
92
|
+
e
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
function wt(t, e = void 0) {
|
|
96
|
+
!this.ownerDocument.defaultView?.Matrix3 || !t || this.ownerDocument.defaultView?.open(
|
|
97
|
+
S(t, "https://", !0),
|
|
98
|
+
e ?? "_blank"
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
function yt(t) {
|
|
102
|
+
if (!this.ownerDocument.defaultView?.Matrix3 || !t)
|
|
103
|
+
return;
|
|
104
|
+
const e = this.ownerDocument.defaultView?.location.origin;
|
|
105
|
+
e && this.ownerDocument?.defaultView?.postMessage(
|
|
106
|
+
{
|
|
107
|
+
detail: { assetIds: [t] },
|
|
108
|
+
type: "cx-cms5-share-assets"
|
|
109
|
+
},
|
|
110
|
+
e
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
function Dt(t, e) {
|
|
114
|
+
if (!this.ownerDocument.defaultView?.Matrix3 || !t || !e)
|
|
115
|
+
return;
|
|
116
|
+
const s = this.ownerDocument.defaultView?.location.origin;
|
|
117
|
+
s && this.ownerDocument?.defaultView?.postMessage(
|
|
118
|
+
{ detail: { assetIds: t, formats: e }, type: "cx-cms5-download-assets" },
|
|
119
|
+
s
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
function Mt(t) {
|
|
123
|
+
switch (t) {
|
|
124
|
+
case d.OpenAssetOverview:
|
|
125
|
+
return f.OpenAssetOverview;
|
|
126
|
+
case d.ShowAssetInLibrary:
|
|
127
|
+
return f.OpenAssetInLibrary;
|
|
128
|
+
case d.ExpandAssetInFullScreen:
|
|
129
|
+
return f.Zoom;
|
|
130
|
+
default:
|
|
131
|
+
return t;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
function Ct(t, e) {
|
|
135
|
+
const s = {}, n = new Set(e);
|
|
136
|
+
return Object.keys(t).forEach((r) => {
|
|
137
|
+
n.has(r) || (s[r] = t[r]);
|
|
138
|
+
}), s;
|
|
139
|
+
}
|
|
140
|
+
function vt(t, e) {
|
|
141
|
+
const s = {};
|
|
142
|
+
return e.forEach((n) => {
|
|
143
|
+
n in t && (s[n] = t[n]);
|
|
144
|
+
}), s;
|
|
145
|
+
}
|
|
146
|
+
const I = 10;
|
|
147
|
+
function St(t, e) {
|
|
148
|
+
let s = 0, n = t.length;
|
|
149
|
+
for (; s < n; ) {
|
|
150
|
+
const r = Math.floor((s + n) / 2);
|
|
151
|
+
t[r].time < e.time ? s = r + 1 : n = r;
|
|
152
|
+
}
|
|
153
|
+
t.splice(s, 0, e);
|
|
154
|
+
}
|
|
155
|
+
function F(t, e, s) {
|
|
156
|
+
return t.find(
|
|
157
|
+
(n) => n.col === e && n.row === s
|
|
158
|
+
) ?? null;
|
|
159
|
+
}
|
|
160
|
+
function k(t, e, s) {
|
|
161
|
+
return new Promise((n) => {
|
|
162
|
+
if (e > 0 && Math.abs(t.currentTime - e) < 1e-3) {
|
|
163
|
+
n();
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
if (e === 0) {
|
|
167
|
+
const r = () => {
|
|
168
|
+
t.removeEventListener("seeked", r);
|
|
169
|
+
const o = () => {
|
|
170
|
+
t.removeEventListener("seeked", o), n();
|
|
171
|
+
};
|
|
172
|
+
t.addEventListener("seeked", o), t.currentTime = 0;
|
|
173
|
+
};
|
|
174
|
+
t.addEventListener("seeked", r), t.currentTime = s;
|
|
175
|
+
} else {
|
|
176
|
+
const r = () => {
|
|
177
|
+
t.removeEventListener("seeked", r), n();
|
|
178
|
+
};
|
|
179
|
+
t.addEventListener("seeked", r), t.currentTime = e;
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
async function* xt({
|
|
184
|
+
cache: t,
|
|
185
|
+
canvas: e,
|
|
186
|
+
duration: s,
|
|
187
|
+
maxInterval: n,
|
|
188
|
+
src: r,
|
|
189
|
+
video: o
|
|
190
|
+
}) {
|
|
191
|
+
if (!e)
|
|
192
|
+
throw new Error("Canvas is required");
|
|
193
|
+
if (!o)
|
|
194
|
+
throw new Error("Video is required");
|
|
195
|
+
const { columns: i, frameHeight: a, frameWidth: h, rows: l, spriteCtx: v } = e;
|
|
196
|
+
try {
|
|
197
|
+
for (let u = 0; u < l; u++)
|
|
198
|
+
for (let c = 0; c < i; c++) {
|
|
199
|
+
const p = u * i + c, m = p * n;
|
|
200
|
+
if (m >= s)
|
|
201
|
+
continue;
|
|
202
|
+
const g = c * h, w = u * a, y = F(t[r] ?? [], c, u), D = c === i - 1 && u === l - 1 || m + n >= s;
|
|
203
|
+
y ? yield { ...y, isLastFrame: D } : (await k(o, m, n), v.drawImage(
|
|
204
|
+
o,
|
|
205
|
+
g,
|
|
206
|
+
w,
|
|
207
|
+
h,
|
|
208
|
+
a
|
|
209
|
+
), yield {
|
|
210
|
+
col: c,
|
|
211
|
+
columns: i,
|
|
212
|
+
frameHeight: a,
|
|
213
|
+
frameWidth: h,
|
|
214
|
+
index: p,
|
|
215
|
+
isLastFrame: D,
|
|
216
|
+
row: u,
|
|
217
|
+
rows: l,
|
|
218
|
+
time: Number(m.toFixed(I)),
|
|
219
|
+
x: g,
|
|
220
|
+
y: w
|
|
221
|
+
}), await new Promise(requestAnimationFrame);
|
|
222
|
+
}
|
|
223
|
+
} catch {
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
function bt({
|
|
227
|
+
duration: t,
|
|
228
|
+
frameWidth: e,
|
|
229
|
+
playbackSpeed: s,
|
|
230
|
+
scale: n
|
|
231
|
+
}) {
|
|
232
|
+
let r = e * s / n;
|
|
233
|
+
return r > t && (r = t / 2), r;
|
|
234
|
+
}
|
|
235
|
+
class Et {
|
|
236
|
+
constructor(e, s = {}) {
|
|
237
|
+
this.element = e, this.noChildDrag = s.noChildDrag ?? !1, this.dragThreshold = s.dragThreshold ?? 5, this.isDragging = !1, this.hasDragged = !1, this.startX = 0, this.startY = 0, this.lastClientX = 0, this.lastClientY = 0, this.onMouseDown = this.onMouseDown.bind(this), this.onMouseMove = this.onMouseMove.bind(this), this.onMouseUp = this.onMouseUp.bind(this), this.onClick = this.onClick.bind(this), this.attach();
|
|
238
|
+
}
|
|
239
|
+
attach() {
|
|
240
|
+
this.element.addEventListener("mousedown", this.onMouseDown), window.addEventListener("mouseup", this.onMouseUp), window.addEventListener("mousemove", this.onMouseMove), this.element.addEventListener("click", this.onClick, !0);
|
|
241
|
+
}
|
|
242
|
+
detach() {
|
|
243
|
+
this.element.removeEventListener("mousedown", this.onMouseDown), window.removeEventListener("mouseup", this.onMouseUp), window.removeEventListener("mousemove", this.onMouseMove), this.element.removeEventListener("click", this.onClick, !0);
|
|
244
|
+
}
|
|
245
|
+
onMouseDown(e) {
|
|
246
|
+
this.noChildDrag && e.target !== this.element || (this.isDragging = !0, this.hasDragged = !1, this.startX = e.clientX, this.startY = e.clientY, this.lastClientX = e.clientX, this.lastClientY = e.clientY, e.preventDefault());
|
|
247
|
+
}
|
|
248
|
+
onMouseMove(e) {
|
|
249
|
+
if (!this.isDragging)
|
|
250
|
+
return;
|
|
251
|
+
const s = e.clientX - this.lastClientX, n = e.clientY - this.lastClientY;
|
|
252
|
+
!this.hasDragged && (Math.abs(e.clientX - this.startX) > this.dragThreshold || Math.abs(e.clientY - this.startY) > this.dragThreshold) && (this.hasDragged = !0), this.element.scrollLeft -= s, this.element.scrollTop -= n, this.lastClientX = e.clientX, this.lastClientY = e.clientY;
|
|
253
|
+
}
|
|
254
|
+
onMouseUp() {
|
|
255
|
+
this.isDragging = !1;
|
|
256
|
+
}
|
|
257
|
+
onClick(e) {
|
|
258
|
+
this.hasDragged && (e.stopImmediatePropagation(), e.preventDefault());
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
function C(t, e) {
|
|
262
|
+
if (!t?.document)
|
|
263
|
+
return !1;
|
|
264
|
+
const s = "mmmmmmmmmmwwwwwww", n = "32px", o = t.document.createElement("canvas").getContext("2d"), i = (l) => o ? (o.font = `${n} ${l}, monospace`, o.measureText(s).width) : 0, a = i("monospace");
|
|
265
|
+
return i(e) !== a;
|
|
266
|
+
}
|
|
267
|
+
function Lt(t, e) {
|
|
268
|
+
if (!t?.document.fonts)
|
|
269
|
+
return !1;
|
|
270
|
+
let s = !1;
|
|
271
|
+
return t.document.fonts.forEach((n) => {
|
|
272
|
+
n.family.replace(/['"]/g, "").toLowerCase() === e.toLowerCase() && (s = !0);
|
|
273
|
+
}), s ? !0 : C(t, e);
|
|
274
|
+
}
|
|
275
|
+
function V(t) {
|
|
276
|
+
const e = /\bitalic\b/i, s = /\b(semi[-\s]?condensed|condensed)\b/i, n = (r) => {
|
|
277
|
+
const o = r.fontFamily.toLowerCase(), i = r.fontStyle.toLowerCase(), a = e.test(i), h = s.test(o);
|
|
278
|
+
let l = 0;
|
|
279
|
+
return a && (l = 1), h && (l = a ? 3 : 2), {
|
|
280
|
+
family: r.fontFamily,
|
|
281
|
+
styleRank: l,
|
|
282
|
+
weight: Number(r.fontWeight)
|
|
283
|
+
};
|
|
284
|
+
};
|
|
285
|
+
return [...t].sort((r, o) => {
|
|
286
|
+
const i = n(r), a = n(o);
|
|
287
|
+
return i.weight !== a.weight ? i.weight - a.weight : i.styleRank !== a.styleRank ? i.styleRank - a.styleRank : i.family.localeCompare(a.family);
|
|
288
|
+
});
|
|
289
|
+
}
|
|
290
|
+
function Ot(t, e, s = [300, 400, 500, 700, 900], n = ["normal", "italic"]) {
|
|
291
|
+
const r = [];
|
|
292
|
+
if (C(t, e))
|
|
293
|
+
for (const o of s)
|
|
294
|
+
for (const i of n)
|
|
295
|
+
r.push({
|
|
296
|
+
fontFamily: e,
|
|
297
|
+
fontStyle: i,
|
|
298
|
+
fontWeight: o.toString(),
|
|
299
|
+
src: ""
|
|
300
|
+
});
|
|
301
|
+
return V(r);
|
|
302
|
+
}
|
|
303
|
+
class At {
|
|
304
|
+
constructor(e = null) {
|
|
305
|
+
this.history = e !== null ? [e] : [], this.redoStack = [];
|
|
306
|
+
}
|
|
307
|
+
add(e) {
|
|
308
|
+
this.history.push(e), this.redoStack = [];
|
|
309
|
+
}
|
|
310
|
+
undo() {
|
|
311
|
+
if (this.history.length > 1) {
|
|
312
|
+
const e = this.history.pop();
|
|
313
|
+
return this.redoStack.push(e), this.getCurrent();
|
|
314
|
+
}
|
|
315
|
+
return null;
|
|
316
|
+
}
|
|
317
|
+
redo() {
|
|
318
|
+
if (this.redoStack.length > 0) {
|
|
319
|
+
const e = this.redoStack.pop();
|
|
320
|
+
return this.history.push(e), e;
|
|
321
|
+
}
|
|
322
|
+
return null;
|
|
323
|
+
}
|
|
324
|
+
getCurrent() {
|
|
325
|
+
return this.history[this.history.length - 1] || null;
|
|
326
|
+
}
|
|
327
|
+
clear() {
|
|
328
|
+
this.history = [], this.redoStack = [];
|
|
329
|
+
}
|
|
330
|
+
canUndo() {
|
|
331
|
+
return this.history.length > 1;
|
|
332
|
+
}
|
|
333
|
+
canRedo() {
|
|
334
|
+
return this.redoStack.length > 0;
|
|
335
|
+
}
|
|
336
|
+
getHistory() {
|
|
337
|
+
return [...this.history];
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
export {
|
|
341
|
+
ht as C,
|
|
342
|
+
Et as D,
|
|
343
|
+
b as G,
|
|
344
|
+
At as H,
|
|
345
|
+
E as O,
|
|
346
|
+
I as P,
|
|
347
|
+
L as S,
|
|
348
|
+
d as a,
|
|
349
|
+
O as b,
|
|
350
|
+
f as c,
|
|
351
|
+
ft as d,
|
|
352
|
+
xt as e,
|
|
353
|
+
F as f,
|
|
354
|
+
bt as g,
|
|
355
|
+
St as h,
|
|
356
|
+
mt as i,
|
|
357
|
+
pt as j,
|
|
358
|
+
gt as k,
|
|
359
|
+
wt as l,
|
|
360
|
+
Dt as m,
|
|
361
|
+
C as n,
|
|
362
|
+
Ct as o,
|
|
363
|
+
Lt as p,
|
|
364
|
+
V as q,
|
|
365
|
+
ut as r,
|
|
366
|
+
yt as s,
|
|
367
|
+
Mt as t,
|
|
368
|
+
Ot as u,
|
|
369
|
+
dt as v,
|
|
370
|
+
ct as w,
|
|
371
|
+
A as x,
|
|
372
|
+
vt as y
|
|
373
|
+
};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
var l = typeof global == "object" && global && global.Object === Object && global, y = typeof self == "object" && self && self.Object === Object && self, s = l || y || Function("return this")(), o = s.Symbol, u = Object.prototype, j = u.hasOwnProperty, p = u.toString, e = o ? o.toStringTag : void 0;
|
|
2
|
+
function v(t) {
|
|
3
|
+
var r = j.call(t, e), n = t[e];
|
|
4
|
+
try {
|
|
5
|
+
t[e] = void 0;
|
|
6
|
+
var g = !0;
|
|
7
|
+
} catch {
|
|
8
|
+
}
|
|
9
|
+
var b = p.call(t);
|
|
10
|
+
return g && (r ? t[e] = n : delete t[e]), b;
|
|
11
|
+
}
|
|
12
|
+
var d = Object.prototype, O = d.toString;
|
|
13
|
+
function S(t) {
|
|
14
|
+
return O.call(t);
|
|
15
|
+
}
|
|
16
|
+
var T = "[object Null]", $ = "[object Undefined]", c = o ? o.toStringTag : void 0;
|
|
17
|
+
function P(t) {
|
|
18
|
+
return t == null ? t === void 0 ? $ : T : c && c in Object(t) ? v(t) : S(t);
|
|
19
|
+
}
|
|
20
|
+
function f(t) {
|
|
21
|
+
var r = typeof t;
|
|
22
|
+
return t != null && (r == "object" || r == "function");
|
|
23
|
+
}
|
|
24
|
+
var h = "[object AsyncFunction]", w = "[object Function]", F = "[object GeneratorFunction]", _ = "[object Proxy]";
|
|
25
|
+
function m(t) {
|
|
26
|
+
if (!f(t))
|
|
27
|
+
return !1;
|
|
28
|
+
var r = P(t);
|
|
29
|
+
return r == w || r == F || r == h || r == _;
|
|
30
|
+
}
|
|
31
|
+
var a = s["__core-js_shared__"], i = function() {
|
|
32
|
+
var t = /[^.]+$/.exec(a && a.keys && a.keys.IE_PROTO || "");
|
|
33
|
+
return t ? "Symbol(src)_1." + t : "";
|
|
34
|
+
}();
|
|
35
|
+
function x(t) {
|
|
36
|
+
return !!i && i in t;
|
|
37
|
+
}
|
|
38
|
+
var k = Function.prototype, I = k.toString;
|
|
39
|
+
function N(t) {
|
|
40
|
+
if (t != null) {
|
|
41
|
+
try {
|
|
42
|
+
return I.call(t);
|
|
43
|
+
} catch {
|
|
44
|
+
}
|
|
45
|
+
try {
|
|
46
|
+
return t + "";
|
|
47
|
+
} catch {
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return "";
|
|
51
|
+
}
|
|
52
|
+
var R = /[\\^$.*+?()[\]{}|]/g, C = /^\[object .+?Constructor\]$/, E = Function.prototype, G = Object.prototype, A = E.toString, D = G.hasOwnProperty, H = RegExp(
|
|
53
|
+
"^" + A.call(D).replace(R, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
54
|
+
);
|
|
55
|
+
function J(t) {
|
|
56
|
+
if (!f(t) || x(t))
|
|
57
|
+
return !1;
|
|
58
|
+
var r = m(t) ? H : C;
|
|
59
|
+
return r.test(N(t));
|
|
60
|
+
}
|
|
61
|
+
function K(t, r) {
|
|
62
|
+
return t?.[r];
|
|
63
|
+
}
|
|
64
|
+
function M(t, r) {
|
|
65
|
+
var n = K(t, r);
|
|
66
|
+
return J(n) ? n : void 0;
|
|
67
|
+
}
|
|
68
|
+
function U(t) {
|
|
69
|
+
return t != null && typeof t == "object";
|
|
70
|
+
}
|
|
71
|
+
export {
|
|
72
|
+
o as S,
|
|
73
|
+
f as a,
|
|
74
|
+
P as b,
|
|
75
|
+
m as c,
|
|
76
|
+
l as f,
|
|
77
|
+
M as g,
|
|
78
|
+
U as i,
|
|
79
|
+
s as r,
|
|
80
|
+
N as t
|
|
81
|
+
};
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { f, u as b, a as g } from "./lit-element.jLBm65_O.js";
|
|
2
|
+
/**
|
|
3
|
+
* @license
|
|
4
|
+
* Copyright 2017 Google LLC
|
|
5
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
6
|
+
*/
|
|
7
|
+
const y = { attribute: !0, type: String, converter: b, reflect: !1, hasChanged: f }, v = (s = y, e, t) => {
|
|
8
|
+
const { kind: i, metadata: r } = t;
|
|
9
|
+
let n = globalThis.litPropertyMetadata.get(r);
|
|
10
|
+
if (n === void 0 && globalThis.litPropertyMetadata.set(r, n = /* @__PURE__ */ new Map()), i === "setter" && ((s = Object.create(s)).wrapped = !0), n.set(t.name, s), i === "accessor") {
|
|
11
|
+
const { name: a } = t;
|
|
12
|
+
return { set(o) {
|
|
13
|
+
const p = e.get.call(this);
|
|
14
|
+
e.set.call(this, o), this.requestUpdate(a, p, s);
|
|
15
|
+
}, init(o) {
|
|
16
|
+
return o !== void 0 && this.C(a, void 0, s, o), o;
|
|
17
|
+
} };
|
|
18
|
+
}
|
|
19
|
+
if (i === "setter") {
|
|
20
|
+
const { name: a } = t;
|
|
21
|
+
return function(o) {
|
|
22
|
+
const p = this[a];
|
|
23
|
+
e.call(this, o), this.requestUpdate(a, p, s);
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
throw Error("Unsupported decorator location: " + i);
|
|
27
|
+
};
|
|
28
|
+
function h(s) {
|
|
29
|
+
return (e, t) => typeof t == "object" ? v(s, e, t) : ((i, r, n) => {
|
|
30
|
+
const a = r.hasOwnProperty(n);
|
|
31
|
+
return r.constructor.createProperty(n, i), a ? Object.getOwnPropertyDescriptor(r, n) : void 0;
|
|
32
|
+
})(s, e, t);
|
|
33
|
+
}
|
|
34
|
+
var m = Object.defineProperty, l = (s, e, t, i) => {
|
|
35
|
+
for (var r = void 0, n = s.length - 1, a; n >= 0; n--)
|
|
36
|
+
(a = s[n]) && (r = a(e, t, r) || r);
|
|
37
|
+
return r && m(e, t, r), r;
|
|
38
|
+
};
|
|
39
|
+
const d = class d extends g {
|
|
40
|
+
constructor() {
|
|
41
|
+
super(), this.theme = "light", this.preRender = !1, Object.entries(
|
|
42
|
+
this.constructor.dependencies
|
|
43
|
+
).forEach(([e, t]) => {
|
|
44
|
+
this.constructor.define(e, t);
|
|
45
|
+
}), this.handleThemeChange = this.handleThemeChange.bind(this);
|
|
46
|
+
}
|
|
47
|
+
emit(e, t) {
|
|
48
|
+
const i = new CustomEvent(e, {
|
|
49
|
+
bubbles: !0,
|
|
50
|
+
cancelable: !1,
|
|
51
|
+
composed: !0,
|
|
52
|
+
detail: {},
|
|
53
|
+
...t
|
|
54
|
+
});
|
|
55
|
+
return this.dispatchEvent(i), i;
|
|
56
|
+
}
|
|
57
|
+
static define(e, t = this, i = {}) {
|
|
58
|
+
const r = customElements.get(e);
|
|
59
|
+
if (!r) {
|
|
60
|
+
try {
|
|
61
|
+
customElements.define(e, t, i);
|
|
62
|
+
} catch {
|
|
63
|
+
customElements.define(
|
|
64
|
+
e,
|
|
65
|
+
class extends t {
|
|
66
|
+
},
|
|
67
|
+
i
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
let n = " (unknown version)", a = n;
|
|
73
|
+
"version" in t && t.version && (n = " v" + t.version), "version" in r && r.version && (a = " v" + r.version), !(n && a && n === a) && console.warn(
|
|
74
|
+
`Attempted to register <${e}>${n}, but <${e}>${a} has already been registered.`
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
static createProperty(e, t) {
|
|
78
|
+
super.createProperty(e, t), t?.attribute && typeof t.attribute == "string" && !Object.prototype.hasOwnProperty.call(
|
|
79
|
+
this.prototype,
|
|
80
|
+
t.attribute
|
|
81
|
+
) && Object.prototype.hasOwnProperty.call(this.prototype, e) && Object.defineProperty(this.prototype, t.attribute, {
|
|
82
|
+
get() {
|
|
83
|
+
return this[e];
|
|
84
|
+
},
|
|
85
|
+
set(i) {
|
|
86
|
+
this[e] = i;
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
firstUpdated(e) {
|
|
91
|
+
super.firstUpdated(e), !this.preRender && this.runFirstUpdated(e);
|
|
92
|
+
}
|
|
93
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
94
|
+
runFirstUpdated(e) {
|
|
95
|
+
}
|
|
96
|
+
connectedUpdatedCallback() {
|
|
97
|
+
}
|
|
98
|
+
runConnectedCallback() {
|
|
99
|
+
}
|
|
100
|
+
adoptedCallback() {
|
|
101
|
+
u(this);
|
|
102
|
+
}
|
|
103
|
+
connectedCallback() {
|
|
104
|
+
super.connectedCallback(), "addEventListener" in globalThis && globalThis.addEventListener("cx-theme-change", this.handleThemeChange), !this.preRender && (this.runConnectedCallback(), this.updateComplete.then(() => {
|
|
105
|
+
this.connectedUpdatedCallback();
|
|
106
|
+
}));
|
|
107
|
+
}
|
|
108
|
+
disconnectedCallback() {
|
|
109
|
+
super.disconnectedCallback(), "removeEventListener" in globalThis && globalThis.removeEventListener("cx-theme-change", this.handleThemeChange), u(this);
|
|
110
|
+
}
|
|
111
|
+
handleThemeChange(e) {
|
|
112
|
+
this.theme = e.detail.theme;
|
|
113
|
+
}
|
|
114
|
+
getTheme() {
|
|
115
|
+
return "getComputedStyle" in globalThis && getComputedStyle(
|
|
116
|
+
globalThis.document.documentElement
|
|
117
|
+
)?.colorScheme === "dark" ? "dark" : "light";
|
|
118
|
+
}
|
|
119
|
+
getState(e) {
|
|
120
|
+
return this[e];
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
d.version = "1", d.dependencies = {};
|
|
124
|
+
let c = d;
|
|
125
|
+
l([
|
|
126
|
+
h()
|
|
127
|
+
], c.prototype, "dir");
|
|
128
|
+
l([
|
|
129
|
+
h()
|
|
130
|
+
], c.prototype, "lang");
|
|
131
|
+
l([
|
|
132
|
+
h()
|
|
133
|
+
], c.prototype, "theme");
|
|
134
|
+
l([
|
|
135
|
+
h({ attribute: "pre-render", type: Boolean })
|
|
136
|
+
], c.prototype, "preRender");
|
|
137
|
+
function u(s) {
|
|
138
|
+
if (s instanceof c)
|
|
139
|
+
return;
|
|
140
|
+
const e = s.localName || s.tagName, t = customElements.get(e.toLowerCase());
|
|
141
|
+
t && Object.setPrototypeOf(s, t.prototype);
|
|
142
|
+
}
|
|
143
|
+
export {
|
|
144
|
+
c as C,
|
|
145
|
+
h as n
|
|
146
|
+
};
|