@ncino/web-components 4.3.0-preview.7 → 4.3.0-preview.9
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/components/input/gator/dropdown/input-dropdown.gator.js +1 -1
- package/dist/components/input/gator/input-date/input-date.gator.js +1 -1
- package/dist/components/input/gator/input-time/input-time.gator.js +1 -1
- package/dist/components/menu/base/gator/menu.gator.js +1 -1
- package/dist/components/panel/gator/panel.storybook-test.js +1 -1
- package/dist/components/popover/gator/popover.gator.js +1 -1
- package/dist/components/table/gator/table.gator.js +70 -37
- package/dist/components/tooltip/gator/tooltip.gator.js +1 -1
- package/dist/components/tooltip/slds/tooltip.slds.js +1 -1
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.2/node_modules/@floating-ui/core/dist/floating-ui.core.js +1 -0
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.2/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +1 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +1 -0
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +1 -0
- package/dist/node_modules/.pnpm/{@storybook_instrumenter@8.6.14_storybook@8.6.14_prettier@3.5.3_ → @storybook_instrumenter@8.6.14_storybook@8.6.14_prettier@3.6.2_}/node_modules/@storybook/instrumenter/dist/index.js +1 -1
- package/dist/node_modules/.pnpm/{@storybook_test@8.6.14_storybook@8.6.14_prettier@3.5.3_ → @storybook_test@8.6.14_storybook@8.6.14_prettier@3.6.2_}/node_modules/@storybook/test/dist/index.js +1 -1
- package/dist/packages/web-components/src/components/table/gator/table.gator.scss.js +1 -1
- package/dist/types/components/table/gator/table.gator.d.ts +3 -0
- package/dist/types/components/table/table.d.ts +2 -0
- package/dist/utils/vitest-a11y-utils.js +1 -1
- package/package.json +2 -2
- package/web-types.json +1 -1
- package/dist/node_modules/.pnpm/@floating-ui_core@1.7.1/node_modules/@floating-ui/core/dist/floating-ui.core.js +0 -1
- package/dist/node_modules/.pnpm/@floating-ui_dom@1.7.1/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -1
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -1
- package/dist/node_modules/.pnpm/@floating-ui_utils@0.2.9/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -1
- /package/dist/node_modules/.pnpm/{@storybook_core@8.6.14_prettier@3.5.3_storybook@8.6.14_prettier@3.5.3_ → @storybook_core@8.6.14_prettier@3.6.2_storybook@8.6.14_prettier@3.6.2_}/node_modules/@storybook/core/dist/channels/index.js +0 -0
- /package/dist/node_modules/.pnpm/{@storybook_core@8.6.14_prettier@3.5.3_storybook@8.6.14_prettier@3.5.3_ → @storybook_core@8.6.14_prettier@3.6.2_storybook@8.6.14_prettier@3.6.2_}/node_modules/@storybook/core/dist/client-logger/index.js +0 -0
- /package/dist/node_modules/.pnpm/{@storybook_core@8.6.14_prettier@3.5.3_storybook@8.6.14_prettier@3.5.3_ → @storybook_core@8.6.14_prettier@3.6.2_storybook@8.6.14_prettier@3.6.2_}/node_modules/@storybook/core/dist/core-events/index.js +0 -0
- /package/dist/node_modules/.pnpm/{@storybook_core@8.6.14_prettier@3.5.3_storybook@8.6.14_prettier@3.5.3_ → @storybook_core@8.6.14_prettier@3.6.2_storybook@8.6.14_prettier@3.6.2_}/node_modules/@storybook/core/dist/csf/index.js +0 -0
- /package/dist/node_modules/.pnpm/{@storybook_core@8.6.14_prettier@3.5.3_storybook@8.6.14_prettier@3.5.3_ → @storybook_core@8.6.14_prettier@3.6.2_storybook@8.6.14_prettier@3.6.2_}/node_modules/@storybook/core/dist/preview-api/index.js +0 -0
- /package/dist/node_modules/.pnpm/{@storybook_core@8.6.14_prettier@3.5.3_storybook@8.6.14_prettier@3.5.3_ → @storybook_core@8.6.14_prettier@3.6.2_storybook@8.6.14_prettier@3.6.2_}/node_modules/@storybook/core/dist/preview-errors.js +0 -0
- /package/dist/node_modules/.pnpm/{@vitest_browser@3.2.4_msw@2.7.3_@types_node@24.0.1_typescript@5.8.3__playwright@1.53.1__64bf204e83d923e607f171b7f35f4f46 → @vitest_browser@3.2.4_msw@2.7.3_@types_node@24.0.7_typescript@5.8.3__playwright@1.53.1__894c207534f0ba223b8299d9f5ff1049}/node_modules/@vitest/browser/context.js +0 -0
- /package/dist/node_modules/.pnpm/{vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.1_@vitest_browser@3.2.4_@vitest_ui@3._5d5a5c8a4aa2033fceb23b072a94a45b → vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.7_@vitest_browser@3.2.4_@vitest_ui@3._93f645c93c51b497c065da8f21fff0a5}/node_modules/vitest/dist/chunks/_commonjsHelpers.BFTU3MAI.js +0 -0
- /package/dist/node_modules/.pnpm/{vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.1_@vitest_browser@3.2.4_@vitest_ui@3._5d5a5c8a4aa2033fceb23b072a94a45b → vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.7_@vitest_browser@3.2.4_@vitest_ui@3._93f645c93c51b497c065da8f21fff0a5}/node_modules/vitest/dist/chunks/date.Bq6ZW5rf.js +0 -0
- /package/dist/node_modules/.pnpm/{vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.1_@vitest_browser@3.2.4_@vitest_ui@3._5d5a5c8a4aa2033fceb23b072a94a45b → vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.7_@vitest_browser@3.2.4_@vitest_ui@3._93f645c93c51b497c065da8f21fff0a5}/node_modules/vitest/dist/chunks/utils.XdZDrNZV.js +0 -0
- /package/dist/node_modules/.pnpm/{vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.1_@vitest_browser@3.2.4_@vitest_ui@3._5d5a5c8a4aa2033fceb23b072a94a45b → vitest@3.2.4_@types_debug@4.1.12_@types_node@24.0.7_@vitest_browser@3.2.4_@vitest_ui@3._93f645c93c51b497c065da8f21fff0a5}/node_modules/vitest/dist/chunks/vi.bdSIJ99Y.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{NjcPopover as g}from"../popover.js";import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as p,nothing as u}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js";import{LitElement as v}from"../../../node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js";import{ref as b}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/ref.js";import{customElement as _}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import y from"../../../packages/web-components/src/components/popover/gator/popover.gator.scss.js";import P from"../../../packages/web-components/src/components/popover/popover.scss.js";import E from"../../../packages/web-components/src/tokens/primitive.tokens.scss.js";import k from"../../../packages/web-components/src/tokens/semantic.tokens.scss.js";import{autoUpdate as w,computePosition as O,autoPlacement as S}from"../../../node_modules/.pnpm/@floating-ui_dom@1.7.
|
|
1
|
+
import{NjcPopover as g}from"../popover.js";import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as p,nothing as u}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js";import{LitElement as v}from"../../../node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js";import{ref as b}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/ref.js";import{customElement as _}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import y from"../../../packages/web-components/src/components/popover/gator/popover.gator.scss.js";import P from"../../../packages/web-components/src/components/popover/popover.scss.js";import E from"../../../packages/web-components/src/tokens/primitive.tokens.scss.js";import k from"../../../packages/web-components/src/tokens/semantic.tokens.scss.js";import{autoUpdate as w,computePosition as O,autoPlacement as S}from"../../../node_modules/.pnpm/@floating-ui_dom@1.7.2/node_modules/@floating-ui/dom/dist/floating-ui.dom.js";import $ from"../../../packages/web-components/public/styles/gator/gator-global-styles.css.js";import{KEY_CONSTANTS as l}from"../../../consts/key-constants.js";import{msg as x}from"../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/install.js";import"../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/runtime.js";import{unsafeCSS as h}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/css-tag.js";var R=Object.getOwnPropertyDescriptor,C=(t,e,i,r)=>{for(var o=r>1?void 0:r?R(e,i):e,s=t.length-1,n;s>=0;s--)(n=t[s])&&(o=n(o)||o);return o};let m=class extends g{render(){return p`
|
|
2
2
|
<div
|
|
3
3
|
${b(this._popoverRef)}
|
|
4
4
|
id="${this.popoverId}"
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{nothing as
|
|
2
|
-
<table class="gator-table ${this.tableElevatedClass}" role="grid"
|
|
3
|
-
|
|
1
|
+
import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{nothing as f,html as r}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js";import"../../../node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js";import{customElement as m}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import{property as b}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/property.js";import{state as $}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/state.js";import w from"../../../packages/web-components/src/components/table/table.tokens.scss.js";import T from"../../../packages/web-components/src/components/table/gator/table.gator.scss.js";import P from"../../../packages/web-components/src/tokens/primitive.tokens.scss.js";import y from"../../../packages/web-components/src/tokens/semantic.tokens.scss.js";import{NjcTable as C}from"../table.js";import"../../checkbox/checkbox.gator.js";import{unsafeHTML as R}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/unsafe-html.js";import{msg as x}from"../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/install.js";import"../../../node_modules/.pnpm/@lit_localize@0.12.2/node_modules/@lit/localize/init/runtime.js";import{unsafeCSS as g}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/css-tag.js";var B=Object.defineProperty,v=Object.getOwnPropertyDescriptor,p=(t,e,l,s)=>{for(var a=s>1?void 0:s?v(e,l):e,i=t.length-1,d;i>=0;i--)(d=t[i])&&(a=(s?d(e,l,a):d(a))||a);return s&&a&&B(e,l,a),a};let c=class extends C{constructor(){super(...arguments),this.elevated=!1,this.includePagination=!1,this.selectedRows=[],this._currentPage=1}render(){return this.columns?this.renderWrapper(this.getTableHeader(this.columns),this.getTableBody(this.columns,this.displayedRowData)):null}get tableElevatedClass(){return this.elevated?"gator-table-elevated":""}renderWrapper(t,e){return r`
|
|
2
|
+
<table class="gator-table ${this.tableElevatedClass}" role="grid"
|
|
3
|
+
aria-labelledby="${this.tableAriaLabelledBy}">
|
|
4
|
+
${t} ${e}
|
|
4
5
|
</table>
|
|
5
6
|
${this.includePagination?r`
|
|
6
7
|
<ngc-table-pagination
|
|
@@ -10,45 +11,77 @@ import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit
|
|
|
10
11
|
@pagechanged="${this.handlePageChanged}"
|
|
11
12
|
@itemsperpagechanged="${this.handleItemsPerPageChanged}"
|
|
12
13
|
></ngc-table-pagination>
|
|
13
|
-
|
|
14
|
-
`}handlePageChanged(
|
|
15
|
-
<
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
`:f}
|
|
15
|
+
`}handlePageChanged(t){this._currentPage=t.detail.page}handleItemsPerPageChanged(t){this.itemsPerPage=t.detail.itemsPerPage}getTableHeader(t){const e=t.map(this.getTableHeaderColumn);return this.selectable&&e.unshift(r`
|
|
16
|
+
<th id="col-select" scope="col">
|
|
17
|
+
<ngc-checkbox
|
|
18
|
+
title-text="${x("Select All")}"
|
|
19
|
+
hide-label
|
|
20
|
+
?selected="${this.selectedRows.length===this.data.length}"
|
|
21
|
+
@change="${l=>this.handleSelectAll(l)}"
|
|
22
|
+
></ngc-checkbox>
|
|
23
|
+
</th>`),r`
|
|
24
|
+
<thead role="rowgroup">
|
|
23
25
|
<tr role="row">
|
|
24
|
-
|
|
26
|
+
${e}
|
|
25
27
|
</tr>
|
|
26
|
-
|
|
27
|
-
`}handleSelectAll(
|
|
28
|
-
${s.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
</thead>
|
|
29
|
+
`}handleSelectAll(t){t.detail.selected?(this.selectedRows=[...this.data],this.data.forEach(e=>{e.selected=t.detail.selected})):(this.selectedRows=[],this.data.forEach(e=>{e.selected=!1})),this.dispatchEvent(new CustomEvent("selectall",{bubbles:!0,detail:{selectedRows:this.selectedRows}})),this.requestUpdate()}getTableHeaderColumn(t){const e=`col-${t.field}`;return r`
|
|
30
|
+
<th id="${e}" scope="col">${t.name}</th>`}getTableBody(t,e){const l=[];let s={rows:[]};return e.forEach(a=>{a.isTableHeader?((s.rows.length>0||s.header)&&l.push(s),s={header:a,rows:[]}):s.rows.push(a)}),(s.rows.length>0||s.header)&&l.push(s),l.length===0&&e.length>0&&l.push({rows:e}),r`
|
|
31
|
+
${l.map(a=>this.getCategoryBody(a,t))}
|
|
32
|
+
`}getCategoryBody(t,e){let l="",s="",a="";t.header&&(l=t.header.headerText||t.header.categoryText||t.header.name||"Category",a=`category-${l.toLowerCase().replace(/\s+/g,"-")}`,s=a);const i=t.header?this.getTableHeaderRow(e,t.header):"",d=t.rows.map(n=>this.getTableBodyRow(n,e,a)),u=e.some(n=>n.includedInTotals===!0),o=t.rows.length>0&&u?this.getTotalRow(t.rows,e,a):"";return r`
|
|
33
|
+
<tbody role="rowgroup" ${s?r`aria-labelledby="${s}"`:""}>
|
|
34
|
+
${i}
|
|
35
|
+
${d}
|
|
36
|
+
${o}
|
|
33
37
|
</tbody>
|
|
34
|
-
`}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
`}getTotalRow(t,e,l){const s={};e.forEach(o=>{s[o.field]=0,o.includedInTotals&&t.forEach(n=>{const h=this.parseNumericValue(n[o.field]);h!==null&&(s[o.field]+=h)})});const a=l?`${l}-total`:"total-row",i=r`
|
|
39
|
+
<th
|
|
40
|
+
id="${a}"
|
|
41
|
+
scope="row"
|
|
42
|
+
class="gator-table-total-label"
|
|
43
|
+
>
|
|
44
|
+
Total
|
|
45
|
+
</th>
|
|
46
|
+
`,d=e.map(o=>{const n=`col-${o.field}`,h=[a,l,n].filter(Boolean).join(" ");return o.includedInTotals?r`
|
|
47
|
+
<td
|
|
48
|
+
role="gridcell"
|
|
49
|
+
headers="${h}"
|
|
50
|
+
class="gator-table-total-cell"
|
|
51
|
+
>
|
|
52
|
+
${this.formatTotal(s[o.field],o)}
|
|
53
|
+
</td>
|
|
54
|
+
`:r`
|
|
55
|
+
<td
|
|
56
|
+
role="gridcell"
|
|
57
|
+
class="gator-table-total-cell"
|
|
58
|
+
>
|
|
59
|
+
|
|
60
|
+
</td>
|
|
61
|
+
`}),u=this.selectable?[i,...d]:[i,...d.slice(1)];return r`
|
|
62
|
+
<tr role="row" class="gator-table-total-row">
|
|
63
|
+
${u}
|
|
64
|
+
</tr>
|
|
65
|
+
`}parseNumericValue(t){if(typeof t=="number")return t;if(typeof t=="string"){const e=t.replace(/[^0-9.-]/g,""),l=parseFloat(e);if(!isNaN(l))return l}return null}formatTotal(t,e){const l=typeof e.decimalPlaces=="number"?e.decimalPlaces:2,s=t.toFixed(l);return typeof e.cellRenderer=="function"?e.cellRenderer({[e.field]:s}):s}getTableBodyRow(t,e,l){const s=e.map(a=>this.getTableBodyCell(t,a,l));if(this.selectable){const a=l?`col-select ${l}`:"col-select";s.unshift(r`
|
|
66
|
+
<td role="gridcell" class="gator-table-checkbox-column" headers="${a}">
|
|
67
|
+
<ngc-checkbox
|
|
68
|
+
label="test"
|
|
69
|
+
?selected="${t.selected}"
|
|
70
|
+
@change="${i=>this.handleTableBodyRowSelected(i,t)}"
|
|
71
|
+
></ngc-checkbox>
|
|
72
|
+
</td>`)}return r`
|
|
73
|
+
<tr role="row" class="${this.selectable&&t.selected?"gator-table-row-selected":""}">
|
|
74
|
+
${s}
|
|
75
|
+
</tr>
|
|
76
|
+
`}getTableHeaderRow(t,e){const l=this.selectable?t.length+1:t.length,s=e.headerText||e.categoryText||e.name||"Category";return r`
|
|
45
77
|
<tr role="row" class="gator-table-category-header">
|
|
46
|
-
<th role="rowheader" colspan="${
|
|
47
|
-
${
|
|
78
|
+
<th role="rowheader" colspan="${l}" scope="rowgroup" class="gator-table-header-cell"
|
|
79
|
+
id="${`category-${s.toLowerCase().replace(/\s+/g,"-")}`}">
|
|
80
|
+
${s}
|
|
48
81
|
</th>
|
|
49
82
|
</tr>
|
|
50
|
-
`}handleTableBodyRowSelected(e
|
|
83
|
+
`}handleTableBodyRowSelected(t,e){t.detail.selected?(e.selected=!0,this.selectedRows.push(e)):(e.selected=!1,this.selectedRows=this.selectedRows.filter(l=>l!==e)),this.dispatchEvent(new CustomEvent("rowselected",{bubbles:!0,detail:{data:e,selectedRows:this.selectedRows}})),this.requestUpdate()}get displayedRowData(){if(!this.includePagination)return this.data;const t=(this._currentPage-1)*this.itemsPerPage,e=t+this.itemsPerPage;return this.data.slice(t,e)}getTableBodyCell(t,e,l){const s=`col-${e.field}`,a=l?`${s} ${l}`:s;return r`
|
|
51
84
|
<td role="gridcell" headers="${a}">
|
|
52
|
-
${
|
|
85
|
+
${R(this.getValueForCell(t,e))}
|
|
53
86
|
</td>
|
|
54
|
-
`}getValueForCell(e
|
|
87
|
+
`}getValueForCell(t,e){return typeof e.cellRenderer=="function"?e.cellRenderer(t):t[e.field]}};c.styles=[g(y),g(P),g(w),g(T)];p([b({type:Boolean})],c.prototype,"elevated",2);p([b({type:Boolean,attribute:"include-pagination"})],c.prototype,"includePagination",2);p([$()],c.prototype,"_currentPage",2);c=p([m("ngc-table")],c);export{c as NgcTable};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{NjcTooltip as f}from"../tooltip.js";import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as a}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js";import{LitElement as m}from"../../../node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js";import{ref as u}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/ref.js";import{customElement as c}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import h from"../../../packages/web-components/src/components/tooltip/gator/tooltip.gator.scss.js";import g from"../../../packages/web-components/src/components/tooltip/tooltip.scss.js";import b from"../../../packages/web-components/src/components/tooltip/tooltip.tokens.scss.js";import d from"../../../packages/web-components/src/tokens/primitive.tokens.scss.js";import _ from"../../../packages/web-components/src/tokens/semantic.tokens.scss.js";import{autoUpdate as v,computePosition as O}from"../../../node_modules/.pnpm/@floating-ui_dom@1.7.
|
|
1
|
+
import{NjcTooltip as f}from"../tooltip.js";import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as a}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js";import{LitElement as m}from"../../../node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js";import{ref as u}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/ref.js";import{customElement as c}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import h from"../../../packages/web-components/src/components/tooltip/gator/tooltip.gator.scss.js";import g from"../../../packages/web-components/src/components/tooltip/tooltip.scss.js";import b from"../../../packages/web-components/src/components/tooltip/tooltip.tokens.scss.js";import d from"../../../packages/web-components/src/tokens/primitive.tokens.scss.js";import _ from"../../../packages/web-components/src/tokens/semantic.tokens.scss.js";import{autoUpdate as v,computePosition as O}from"../../../node_modules/.pnpm/@floating-ui_dom@1.7.2/node_modules/@floating-ui/dom/dist/floating-ui.dom.js";import{unsafeCSS as o}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/css-tag.js";var y=Object.getOwnPropertyDescriptor,x=(t,e,r,l)=>{for(var i=l>1?void 0:l?y(e,r):e,n=t.length-1,p;n>=0;n--)(p=t[n])&&(i=p(i)||i);return i};let s=class extends f{render(){return a`
|
|
2
2
|
<div ${u(this._tooltipRef)} class="gator-tooltip ${this.nubbinPositionClass}" role="tooltip" id="${this.tooltipId}">
|
|
3
3
|
<div class="gator-tooltip-body">
|
|
4
4
|
<slot></slot>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{NjcTooltip as u}from"../tooltip.js";import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as a}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js";import"../../../node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js";import{ref as f}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/ref.js";import{customElement as c}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import m from"../../../packages/web-components/src/index.slds.scss.js";import b from"../../../packages/web-components/src/components/tooltip/tooltip.scss.js";import{autoUpdate as d,computePosition as h}from"../../../node_modules/.pnpm/@floating-ui_dom@1.7.
|
|
1
|
+
import{NjcTooltip as u}from"../tooltip.js";import"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/reactive-element.js";import{html as a}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/lit-html.js";import"../../../node_modules/.pnpm/lit-element@4.2.0/node_modules/lit-element/lit-element.js";import{ref as f}from"../../../node_modules/.pnpm/lit-html@3.3.0/node_modules/lit-html/directives/ref.js";import{customElement as c}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/decorators/custom-element.js";import m from"../../../packages/web-components/src/index.slds.scss.js";import b from"../../../packages/web-components/src/components/tooltip/tooltip.scss.js";import{autoUpdate as d,computePosition as h}from"../../../node_modules/.pnpm/@floating-ui_dom@1.7.2/node_modules/@floating-ui/dom/dist/floating-ui.dom.js";import{unsafeCSS as p}from"../../../node_modules/.pnpm/@lit_reactive-element@2.1.0/node_modules/@lit/reactive-element/css-tag.js";var _=Object.getOwnPropertyDescriptor,v=(t,e,o,n)=>{for(var s=n>1?void 0:n?_(e,o):e,i=t.length-1,l;i>=0;i--)(l=t[i])&&(s=l(s)||s);return s};let r=class extends u{render(){return a`
|
|
2
2
|
<div data-id="tooltip" ${f(this._tooltipRef)} class="slds-popover slds-popover_tooltip ${this.nubbinPositionClass}" role="tooltip">
|
|
3
3
|
<div class="slds-popover__body">
|
|
4
4
|
<slot></slot>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{getSideAxis as L,getAlignmentAxis as H,getSide as F,getAlignment as C,getAxisLength as J,evaluate as _,getOppositePlacement as K,getExpandedPlacements as N,getOppositeAxisPlacements as Q,getAlignmentSides as q,getPaddingObject as U,rectToClientRect as I,placements as X,getOppositeAlignmentPlacement as W}from"../../../../../@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js";function Y(n,l,f){let{reference:t,floating:e}=n;const i=L(l),c=H(l),a=J(c),w=F(l),p=i==="y",g=t.x+t.width/2-e.width/2,r=t.y+t.height/2-e.height/2,d=t[a]/2-e[a]/2;let o;switch(w){case"top":o={x:g,y:t.y-e.height};break;case"bottom":o={x:g,y:t.y+t.height};break;case"right":o={x:t.x+t.width,y:r};break;case"left":o={x:t.x-e.width,y:r};break;default:o={x:t.x,y:t.y}}switch(C(l)){case"start":o[c]-=d*(f&&p?-1:1);break;case"end":o[c]+=d*(f&&p?-1:1);break}return o}const te=async(n,l,f)=>{const{placement:t="bottom",strategy:e="absolute",middleware:i=[],platform:c}=f,a=i.filter(Boolean),w=await(c.isRTL==null?void 0:c.isRTL(l));let p=await c.getElementRects({reference:n,floating:l,strategy:e}),{x:g,y:r}=Y(p,t,w),d=t,o={},x=0;for(let h=0;h<a.length;h++){const{name:y,fn:v}=a[h],{x:u,y:P,data:b,reset:s}=await v({x:g,y:r,initialPlacement:t,placement:d,strategy:e,middlewareData:o,rects:p,platform:c,elements:{reference:n,floating:l}});g=u??g,r=P??r,o={...o,[y]:{...o[y],...b}},s&&x<=50&&(x++,typeof s=="object"&&(s.placement&&(d=s.placement),s.rects&&(p=s.rects===!0?await c.getElementRects({reference:n,floating:l,strategy:e}):s.rects),{x:g,y:r}=Y(p,d,w)),h=-1)}return{x:g,y:r,placement:d,strategy:e,middlewareData:o}};async function z(n,l){var f;l===void 0&&(l={});const{x:t,y:e,platform:i,rects:c,elements:a,strategy:w}=n,{boundary:p="clippingAncestors",rootBoundary:g="viewport",elementContext:r="floating",altBoundary:d=!1,padding:o=0}=_(l,n),x=U(o),y=a[d?r==="floating"?"reference":"floating":r],v=I(await i.getClippingRect({element:(f=await(i.isElement==null?void 0:i.isElement(y)))==null||f?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:p,rootBoundary:g,strategy:w})),u=r==="floating"?{x:t,y:e,width:c.floating.width,height:c.floating.height}:c.reference,P=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),b=await(i.isElement==null?void 0:i.isElement(P))?await(i.getScale==null?void 0:i.getScale(P))||{x:1,y:1}:{x:1,y:1},s=I(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:u,offsetParent:P,strategy:w}):u);return{top:(v.top-s.top+x.top)/b.y,bottom:(s.bottom-v.bottom+x.bottom)/b.y,left:(v.left-s.left+x.left)/b.x,right:(s.right-v.right+x.right)/b.x}}function Z(n,l,f){return(n?[...f.filter(e=>C(e)===n),...f.filter(e=>C(e)!==n)]:f.filter(e=>F(e)===e)).filter(e=>n?C(e)===n||(l?W(e)!==e:!1):!0)}const ne=function(n){return n===void 0&&(n={}),{name:"autoPlacement",options:n,async fn(l){var f,t,e;const{rects:i,middlewareData:c,placement:a,platform:w,elements:p}=l,{crossAxis:g=!1,alignment:r,allowedPlacements:d=X,autoAlignment:o=!0,...x}=_(n,l),h=r!==void 0||d===X?Z(r||null,o,d):d,y=await z(l,x),v=((f=c.autoPlacement)==null?void 0:f.index)||0,u=h[v];if(u==null)return{};const P=q(u,i,await(w.isRTL==null?void 0:w.isRTL(p.floating)));if(a!==u)return{reset:{placement:h[0]}};const b=[y[F(u)],y[P[0]],y[P[1]]],s=[...((t=c.autoPlacement)==null?void 0:t.overflows)||[],{placement:u,overflows:b}],T=h[v+1];if(T)return{data:{index:v+1,overflows:s},reset:{placement:T}};const B=s.map(m=>{const O=C(m.placement);return[m.placement,O&&g?m.overflows.slice(0,2).reduce((j,M)=>j+M,0):m.overflows[0],m.overflows]}).sort((m,O)=>m[1]-O[1]),S=((e=B.filter(m=>m[2].slice(0,C(m[0])?2:3).every(O=>O<=0))[0])==null?void 0:e[0])||B[0][0];return S!==a?{data:{index:v+1,overflows:s},reset:{placement:S}}:{}}}},le=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(l){var f,t;const{placement:e,middlewareData:i,rects:c,initialPlacement:a,platform:w,elements:p}=l,{mainAxis:g=!0,crossAxis:r=!0,fallbackPlacements:d,fallbackStrategy:o="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:h=!0,...y}=_(n,l);if((f=i.arrow)!=null&&f.alignmentOffset)return{};const v=F(e),u=L(a),P=F(a)===a,b=await(w.isRTL==null?void 0:w.isRTL(p.floating)),s=d||(P||!h?[K(a)]:N(a)),T=x!=="none";!d&&T&&s.push(...Q(a,h,x,b));const B=[a,...s],$=await z(l,y),S=[];let m=((t=i.flip)==null?void 0:t.overflows)||[];if(g&&S.push($[v]),r){const k=q(e,c,b);S.push($[k[0]],$[k[1]])}if(m=[...m,{placement:e,overflows:S}],!S.every(k=>k<=0)){var O,j;const k=(((O=i.flip)==null?void 0:O.index)||0)+1,V=B[k];if(V&&(!(r==="alignment"?u!==L(V):!1)||m.every(A=>A.overflows[0]>0&&L(A.placement)===u)))return{data:{index:k,overflows:m},reset:{placement:V}};let D=(j=m.filter(E=>E.overflows[0]<=0).sort((E,A)=>E.overflows[1]-A.overflows[1])[0])==null?void 0:j.placement;if(!D)switch(o){case"bestFit":{var M;const E=(M=m.filter(A=>{if(T){const R=L(A.placement);return R===u||R==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(R=>R>0).reduce((R,G)=>R+G,0)]).sort((A,R)=>A[1]-R[1])[0])==null?void 0:M[0];E&&(D=E);break}case"initialPlacement":D=a;break}if(e!==D)return{reset:{placement:D}}}return{}}}};export{ne as autoPlacement,te as computePosition,z as detectOverflow,le as flip,I as rectToClientRect};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{computePosition as ot,flip as st,autoPlacement as rt}from"../../../../../@floating-ui_core@1.7.2/node_modules/@floating-ui/core/dist/floating-ui.core.js";import{createCoords as w,rectToClientRect as J,floor as A,max as E,round as H,min as z}from"../../../../../@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.js";import{getOverflowAncestors as M,isElement as v,getDocumentElement as O,getWindow as L,getFrameElement as K,getComputedStyle as R,isHTMLElement as b,isWebKit as Q,isTopLayer as S,getParentNode as W,isLastTraversableNode as N,isTableElement as ct,isContainingBlock as Y,getContainingBlock as lt,getNodeName as _,isOverflowElement as P,getNodeScroll as I}from"../../../../../@floating-ui_utils@0.2.10/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js";function Z(t){const e=R(t);let n=parseFloat(e.width)||0,i=parseFloat(e.height)||0;const o=b(t),r=o?t.offsetWidth:n,s=o?t.offsetHeight:i,c=H(n)!==r||H(i)!==s;return c&&(n=r,i=s),{width:n,height:i,$:c}}function $(t){return v(t)?t:t.contextElement}function F(t){const e=$(t);if(!b(e))return w(1);const n=e.getBoundingClientRect(),{width:i,height:o,$:r}=Z(e);let s=(r?H(n.width):n.width)/i,c=(r?H(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const ft=w(0);function X(t){const e=L(t);return!Q()||!e.visualViewport?ft:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ut(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==L(t)?!1:e}function T(t,e,n,i){e===void 0&&(e=!1),n===void 0&&(n=!1);const o=t.getBoundingClientRect(),r=$(t);let s=w(1);e&&(i?v(i)&&(s=F(i)):s=F(t));const c=ut(r,n,i)?X(r):w(0);let l=(o.left+c.x)/s.x,f=(o.top+c.y)/s.y,u=o.width/s.x,h=o.height/s.y;if(r){const p=L(r),a=i&&v(i)?L(i):i;let x=p,g=K(x);for(;g&&i&&a!==x;){const m=F(g),d=g.getBoundingClientRect(),y=R(g),C=d.left+(g.clientLeft+parseFloat(y.paddingLeft))*m.x,B=d.top+(g.clientTop+parseFloat(y.paddingTop))*m.y;l*=m.x,f*=m.y,u*=m.x,h*=m.y,l+=C,f+=B,x=L(g),g=K(x)}}return J({width:u,height:h,x:l,y:f})}function q(t,e){const n=I(t).scrollLeft;return e?e.left+n:T(O(t)).left+n}function tt(t,e,n){n===void 0&&(n=!1);const i=t.getBoundingClientRect(),o=i.left+e.scrollLeft-(n?0:q(t,i)),r=i.top+e.scrollTop;return{x:o,y:r}}function ht(t){let{elements:e,rect:n,offsetParent:i,strategy:o}=t;const r=o==="fixed",s=O(i),c=e?S(e.floating):!1;if(i===s||c&&r)return n;let l={scrollLeft:0,scrollTop:0},f=w(1);const u=w(0),h=b(i);if((h||!h&&!r)&&((_(i)!=="body"||P(s))&&(l=I(i)),b(i))){const a=T(i);f=F(i),u.x=a.x+i.clientLeft,u.y=a.y+i.clientTop}const p=s&&!h&&!r?tt(s,l,!0):w(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-l.scrollLeft*f.x+u.x+p.x,y:n.y*f.y-l.scrollTop*f.y+u.y+p.y}}function at(t){return Array.from(t.getClientRects())}function dt(t){const e=O(t),n=I(t),i=t.ownerDocument.body,o=E(e.scrollWidth,e.clientWidth,i.scrollWidth,i.clientWidth),r=E(e.scrollHeight,e.clientHeight,i.scrollHeight,i.clientHeight);let s=-n.scrollLeft+q(t);const c=-n.scrollTop;return R(i).direction==="rtl"&&(s+=E(e.clientWidth,i.clientWidth)-o),{width:o,height:r,x:s,y:c}}function gt(t,e){const n=L(t),i=O(t),o=n.visualViewport;let r=i.clientWidth,s=i.clientHeight,c=0,l=0;if(o){r=o.width,s=o.height;const f=Q();(!f||f&&e==="fixed")&&(c=o.offsetLeft,l=o.offsetTop)}return{width:r,height:s,x:c,y:l}}const pt=new Set(["absolute","fixed"]);function mt(t,e){const n=T(t,!0,e==="fixed"),i=n.top+t.clientTop,o=n.left+t.clientLeft,r=b(t)?F(t):w(1),s=t.clientWidth*r.x,c=t.clientHeight*r.y,l=o*r.x,f=i*r.y;return{width:s,height:c,x:l,y:f}}function j(t,e,n){let i;if(e==="viewport")i=gt(t,n);else if(e==="document")i=dt(O(t));else if(v(e))i=mt(e,n);else{const o=X(t);i={x:e.x-o.x,y:e.y-o.y,width:e.width,height:e.height}}return J(i)}function et(t,e){const n=W(t);return n===e||!v(n)||N(n)?!1:R(n).position==="fixed"||et(n,e)}function wt(t,e){const n=e.get(t);if(n)return n;let i=M(t,[],!1).filter(c=>v(c)&&_(c)!=="body"),o=null;const r=R(t).position==="fixed";let s=r?W(t):t;for(;v(s)&&!N(s);){const c=R(s),l=Y(s);!l&&c.position==="fixed"&&(o=null),(r?!l&&!o:!l&&c.position==="static"&&!!o&&pt.has(o.position)||P(s)&&!l&&et(t,s))?i=i.filter(u=>u!==s):o=c,s=W(s)}return e.set(t,i),i}function xt(t){let{element:e,boundary:n,rootBoundary:i,strategy:o}=t;const s=[...n==="clippingAncestors"?S(e)?[]:wt(e,this._c):[].concat(n),i],c=s[0],l=s.reduce((f,u)=>{const h=j(e,u,o);return f.top=E(h.top,f.top),f.right=z(h.right,f.right),f.bottom=z(h.bottom,f.bottom),f.left=E(h.left,f.left),f},j(e,c,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function yt(t){const{width:e,height:n}=Z(t);return{width:e,height:n}}function vt(t,e,n){const i=b(e),o=O(e),r=n==="fixed",s=T(t,!0,r,e);let c={scrollLeft:0,scrollTop:0};const l=w(0);function f(){l.x=q(o)}if(i||!i&&!r)if((_(e)!=="body"||P(o))&&(c=I(e)),i){const a=T(e,!0,r,e);l.x=a.x+e.clientLeft,l.y=a.y+e.clientTop}else o&&f();r&&!i&&o&&f();const u=o&&!i&&!r?tt(o,c):w(0),h=s.left+c.scrollLeft-l.x-u.x,p=s.top+c.scrollTop-l.y-u.y;return{x:h,y:p,width:s.width,height:s.height}}function V(t){return R(t).position==="static"}function G(t,e){if(!b(t)||R(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return O(t)===n&&(n=n.ownerDocument.body),n}function nt(t,e){const n=L(t);if(S(t))return n;if(!b(t)){let o=W(t);for(;o&&!N(o);){if(v(o)&&!V(o))return o;o=W(o)}return n}let i=G(t,e);for(;i&&ct(i)&&V(i);)i=G(i,e);return i&&N(i)&&V(i)&&!Y(i)?n:i||lt(t)||n}const Rt=async function(t){const e=this.getOffsetParent||nt,n=this.getDimensions,i=await n(t.floating);return{reference:vt(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function Ot(t){return R(t).direction==="rtl"}const bt={convertOffsetParentRelativeRectToViewportRelativeRect:ht,getDocumentElement:O,getClippingRect:xt,getOffsetParent:nt,getElementRects:Rt,getClientRects:at,getDimensions:yt,getScale:F,isElement:v,isRTL:Ot};function it(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Ct(t,e){let n=null,i;const o=O(t);function r(){var c;clearTimeout(i),(c=n)==null||c.disconnect(),n=null}function s(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),r();const f=t.getBoundingClientRect(),{left:u,top:h,width:p,height:a}=f;if(c||e(),!p||!a)return;const x=A(h),g=A(o.clientWidth-(u+p)),m=A(o.clientHeight-(h+a)),d=A(u),C={rootMargin:-x+"px "+-g+"px "+-m+"px "+-d+"px",threshold:E(0,z(1,l))||1};let B=!0;function k(U){const D=U[0].intersectionRatio;if(D!==l){if(!B)return s();D?s(!1,D):i=setTimeout(()=>{s(!1,1e-7)},1e3)}D===1&&!it(f,t.getBoundingClientRect())&&s(),B=!1}try{n=new IntersectionObserver(k,{...C,root:o.ownerDocument})}catch{n=new IntersectionObserver(k,C)}n.observe(t)}return s(!0),r}function Ft(t,e,n,i){i===void 0&&(i={});const{ancestorScroll:o=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=i,f=$(t),u=o||r?[...f?M(f):[],...M(e)]:[];u.forEach(d=>{o&&d.addEventListener("scroll",n,{passive:!0}),r&&d.addEventListener("resize",n)});const h=f&&c?Ct(f,n):null;let p=-1,a=null;s&&(a=new ResizeObserver(d=>{let[y]=d;y&&y.target===f&&a&&(a.unobserve(e),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var C;(C=a)==null||C.observe(e)})),n()}),f&&!l&&a.observe(f),a.observe(e));let x,g=l?T(t):null;l&&m();function m(){const d=T(t);g&&!it(g,d)&&n(),g=d,x=requestAnimationFrame(m)}return n(),()=>{var d;u.forEach(y=>{o&&y.removeEventListener("scroll",n),r&&y.removeEventListener("resize",n)}),h==null||h(),(d=a)==null||d.disconnect(),a=null,l&&cancelAnimationFrame(x)}}const Wt=rt,Bt=st,Dt=(t,e,n)=>{const i=new Map,o={platform:bt,...n},r={...o.platform,_c:i};return ot(t,e,{...o,platform:r})};export{Wt as autoPlacement,Ft as autoUpdate,Dt as computePosition,Bt as flip,M as getOverflowAncestors,bt as platform};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function c(){return typeof window<"u"}function u(t){return p(t)?(t.nodeName||"").toLowerCase():"#document"}function i(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function N(t){var e;return(e=(p(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function p(t){return c()?t instanceof Node||t instanceof i(t).Node:!1}function m(t){return c()?t instanceof Element||t instanceof i(t).Element:!1}function w(t){return c()?t instanceof HTMLElement||t instanceof i(t).HTMLElement:!1}function f(t){return!c()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof i(t).ShadowRoot}const E=new Set(["inline","contents"]);function y(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=S(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!E.has(r)}const T=new Set(["table","td","th"]);function A(t){return T.has(u(t))}const v=[":popover-open",":modal"];function L(t){return v.some(e=>{try{return t.matches(e)}catch{return!1}})}const D=["transform","translate","scale","rotate","perspective"],C=["transform","translate","scale","rotate","perspective","filter"],k=["paint","layout","strict","content"];function V(t){const e=O(),n=m(t)?S(t):t;return D.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)||C.some(o=>(n.willChange||"").includes(o))||k.some(o=>(n.contain||"").includes(o))}function B(t){let e=s(t);for(;w(e)&&!h(e);){if(V(e))return e;if(L(e))return null;e=s(e)}return null}function O(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const R=new Set(["html","body","#document"]);function h(t){return R.has(u(t))}function S(t){return i(t).getComputedStyle(t)}function F(t){return m(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function s(t){if(u(t)==="html")return t;const e=t.assignedSlot||t.parentNode||f(t)&&t.host||N(t);return f(e)?e.host:e}function b(t){const e=s(t);return h(e)?t.ownerDocument?t.ownerDocument.body:t.body:w(e)&&y(e)?e:b(e)}function d(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=b(t),g=r===((o=t.ownerDocument)==null?void 0:o.body),l=i(r);if(g){const a=_(l);return e.concat(l,l.visualViewport||[],y(r)?r:[],a&&n?d(a):[])}return e.concat(r,d(r,[],n))}function _(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}export{S as getComputedStyle,B as getContainingBlock,N as getDocumentElement,_ as getFrameElement,b as getNearestOverflowAncestor,u as getNodeName,F as getNodeScroll,d as getOverflowAncestors,s as getParentNode,i as getWindow,V as isContainingBlock,m as isElement,w as isHTMLElement,h as isLastTraversableNode,p as isNode,y as isOverflowElement,f as isShadowRoot,A as isTableElement,L as isTopLayer,O as isWebKit};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const p=["top","right","bottom","left"],l=["start","end"],j=p.reduce((t,e)=>t.concat(e,e+"-"+l[0],e+"-"+l[1]),[]),C=Math.min,L=Math.max,E=Math.round,R=Math.floor,T=t=>({x:t,y:t}),h={left:"right",right:"left",bottom:"top",top:"bottom"},x={start:"end",end:"start"};function k(t,e){return typeof t=="function"?t(e):t}function g(t){return t.split("-")[0]}function m(t){return t.split("-")[1]}function b(t){return t==="x"?"y":"x"}function d(t){return t==="y"?"height":"width"}const A=new Set(["top","bottom"]);function P(t){return A.has(g(t))?"y":"x"}function y(t){return b(P(t))}function q(t,e,n){n===void 0&&(n=!1);const r=m(t),i=y(t),o=d(i);let c=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return e.reference[o]>e.floating[o]&&(c=f(c)),[c,f(c)]}function z(t){const e=f(t);return[s(t),e,s(e)]}function s(t){return t.replace(/start|end/g,e=>x[e])}const u=["left","right"],a=["right","left"],M=["top","bottom"],O=["bottom","top"];function S(t,e,n){switch(t){case"top":case"bottom":return n?e?a:u:e?u:a;case"left":case"right":return e?M:O;default:return[]}}function B(t,e,n,r){const i=m(t);let o=S(g(t),n==="start",r);return i&&(o=o.map(c=>c+"-"+i),e&&(o=o.concat(o.map(s)))),o}function f(t){return t.replace(/left|right|bottom|top/g,e=>h[e])}function w(t){return{top:0,right:0,bottom:0,left:0,...t}}function D(t){return typeof t!="number"?w(t):{top:t,right:t,bottom:t,left:t}}function F(t){const{x:e,y:n,width:r,height:i}=t;return{width:r,height:i,top:n,left:e,right:e+r,bottom:n+i,x:e,y:n}}export{l as alignments,T as createCoords,k as evaluate,w as expandPaddingObject,R as floor,m as getAlignment,y as getAlignmentAxis,q as getAlignmentSides,d as getAxisLength,z as getExpandedPlacements,s as getOppositeAlignmentPlacement,b as getOppositeAxis,B as getOppositeAxisPlacements,f as getOppositePlacement,D as getPaddingObject,g as getSide,P as getSideAxis,L as max,C as min,j as placements,F as rectToClientRect,E as round,p as sides};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Nr=Object.defineProperty;var Tr=(e,t,r)=>t in e?Nr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Y=(e,t,r)=>Tr(e,typeof t!="symbol"?t+"":t,r);import{once as Ar}from"../../../../../@storybook_core@8.6.14_prettier@3.
|
|
1
|
+
var Nr=Object.defineProperty;var Tr=(e,t,r)=>t in e?Nr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Y=(e,t,r)=>Tr(e,typeof t!="symbol"?t+"":t,r);import{once as Ar}from"../../../../../@storybook_core@8.6.14_prettier@3.6.2_storybook@8.6.14_prettier@3.6.2_/node_modules/@storybook/core/dist/client-logger/index.js";import{FORCE_REMOUNT as ve,STORY_RENDER_PHASE_CHANGED as Mr,SET_CURRENT_STORY as Ir}from"../../../../../@storybook_core@8.6.14_prettier@3.6.2_storybook@8.6.14_prettier@3.6.2_/node_modules/@storybook/core/dist/core-events/index.js";import{addons as Pr}from"../../../../../@storybook_core@8.6.14_prettier@3.6.2_storybook@8.6.14_prettier@3.6.2_/node_modules/@storybook/core/dist/preview-api/index.js";import{global as L}from"../../../../../@storybook_global@5.0.0/node_modules/@storybook/global/dist/index.js";var Rr=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')}),Lr={reset:[0,0],bold:[1,22,"\x1B[22m\x1B[1m"],dim:[2,22,"\x1B[22m\x1B[2m"],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29],black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],gray:[90,39],bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]},Dr=Object.entries(Lr);function Ue(e){return String(e)}Ue.open="";Ue.close="";function jr(e=!1){let t=typeof process<"u"?process:void 0,r=(t==null?void 0:t.env)||{},n=(t==null?void 0:t.argv)||[];return!("NO_COLOR"in r||n.includes("--no-color"))&&("FORCE_COLOR"in r||n.includes("--color")||(t==null?void 0:t.platform)==="win32"||e&&r.TERM!=="dumb"||"CI"in r)||typeof window<"u"&&!!window.chrome}function Fr(e=!1){let t=jr(e),r=(u,s,c,a)=>{let o="",h=0;do o+=u.substring(h,a)+c,h=a+s.length,a=u.indexOf(s,h);while(~a);return o+u.substring(h)},n=(u,s,c=u)=>{let a=o=>{let h=String(o),y=h.indexOf(s,u.length);return~y?u+r(h,s,c,y)+s:u+h+s};return a.open=u,a.close=s,a},i={isColorSupported:t},l=u=>`\x1B[${u}m`;for(let[u,s]of Dr)i[u]=t?n(l(s[0]),l(s[1]),s[2]):Ue;return i}var v=Fr(!1);function Br(e,t){let r=Object.keys(e),n=t===null?r:r.sort(t);if(Object.getOwnPropertySymbols)for(let i of Object.getOwnPropertySymbols(e))Object.getOwnPropertyDescriptor(e,i).enumerable&&n.push(i);return n}function Oe(e,t,r,n,i,l,u=": "){let s="",c=0,a=e.next();if(!a.done){s+=t.spacingOuter;let o=r+t.indent;for(;!a.done;){if(s+=o,c++===t.maxWidth){s+="…";break}let h=l(a.value[0],t,o,n,i),y=l(a.value[1],t,o,n,i);s+=h+u+y,a=e.next(),a.done?t.min||(s+=","):s+=`,${t.spacingInner}`}s+=t.spacingOuter+r}return s}function Ke(e,t,r,n,i,l){let u="",s=0,c=e.next();if(!c.done){u+=t.spacingOuter;let a=r+t.indent;for(;!c.done;){if(u+=a,s++===t.maxWidth){u+="…";break}u+=l(c.value,t,a,n,i),c=e.next(),c.done?t.min||(u+=","):u+=`,${t.spacingInner}`}u+=t.spacingOuter+r}return u}function $e(e,t,r,n,i,l){let u="";e=e instanceof ArrayBuffer?new DataView(e):e;let s=a=>a instanceof DataView,c=s(e)?e.byteLength:e.length;if(c>0){u+=t.spacingOuter;let a=r+t.indent;for(let o=0;o<c;o++){if(u+=a,o===t.maxWidth){u+="…";break}(s(e)||o in e)&&(u+=l(s(e)?e.getInt8(o):e[o],t,a,n,i)),o<c-1?u+=`,${t.spacingInner}`:t.min||(u+=",")}u+=t.spacingOuter+r}return u}function qe(e,t,r,n,i,l){let u="",s=Br(e,t.compareKeys);if(s.length>0){u+=t.spacingOuter;let c=r+t.indent;for(let a=0;a<s.length;a++){let o=s[a],h=l(o,t,c,n,i),y=l(e[o],t,c,n,i);u+=`${c+h}: ${y}`,a<s.length-1?u+=`,${t.spacingInner}`:t.min||(u+=",")}u+=t.spacingOuter+r}return u}var xr=typeof Symbol=="function"&&Symbol.for?Symbol.for("jest.asymmetricMatcher"):1267621,Ce=" ",kr=(e,t,r,n,i,l)=>{let u=e.toString();if(u==="ArrayContaining"||u==="ArrayNotContaining")return++n>t.maxDepth?`[${u}]`:`${u+Ce}[${$e(e.sample,t,r,n,i,l)}]`;if(u==="ObjectContaining"||u==="ObjectNotContaining")return++n>t.maxDepth?`[${u}]`:`${u+Ce}{${qe(e.sample,t,r,n,i,l)}}`;if(u==="StringMatching"||u==="StringNotMatching"||u==="StringContaining"||u==="StringNotContaining")return u+Ce+l(e.sample,t,r,n,i);if(typeof e.toAsymmetricMatcher!="function")throw new TypeError(`Asymmetric matcher ${e.constructor.name} does not implement toAsymmetricMatcher()`);return e.toAsymmetricMatcher()},zr=e=>e&&e.$$typeof===xr,Ur={serialize:kr,test:zr},Kr=" ",qt=new Set(["DOMStringMap","NamedNodeMap"]),qr=/^(?:HTML\w*Collection|NodeList)$/;function Wr(e){return qt.has(e)||qr.test(e)}var Yr=e=>e&&e.constructor&&!!e.constructor.name&&Wr(e.constructor.name);function Vr(e){return e.constructor.name==="NamedNodeMap"}var Hr=(e,t,r,n,i,l)=>{let u=e.constructor.name;return++n>t.maxDepth?`[${u}]`:(t.min?"":u+Kr)+(qt.has(u)?`{${qe(Vr(e)?[...e].reduce((s,c)=>(s[c.name]=c.value,s),{}):{...e},t,r,n,i,l)}}`:`[${$e([...e],t,r,n,i,l)}]`)},Gr={serialize:Hr,test:Yr};function Wt(e){return e.replaceAll("<","<").replaceAll(">",">")}function We(e,t,r,n,i,l,u){let s=n+r.indent,c=r.colors;return e.map(a=>{let o=t[a],h=u(o,r,s,i,l);return typeof o!="string"&&(h.includes(`
|
|
2
2
|
`)&&(h=r.spacingOuter+s+h+r.spacingOuter+n),h=`{${h}}`),`${r.spacingInner+n+c.prop.open+a+c.prop.close}=${c.value.open}${h}${c.value.close}`}).join("")}function Ye(e,t,r,n,i,l){return e.map(u=>t.spacingOuter+r+(typeof u=="string"?Yt(u,t):l(u,t,r,n,i))).join("")}function Yt(e,t){let r=t.colors.content;return r.open+Wt(e)+r.close}function Jr(e,t){let r=t.colors.comment;return`${r.open}<!--${Wt(e)}-->${r.close}`}function Ve(e,t,r,n,i){let l=n.colors.tag;return`${l.open}<${e}${t&&l.close+t+n.spacingOuter+i+l.open}${r?`>${l.close}${r}${n.spacingOuter}${i}${l.open}</${e}`:`${t&&!n.min?"":" "}/`}>${l.close}`}function He(e,t){let r=t.colors.tag;return`${r.open}<${e}${r.close} …${r.open} />${r.close}`}var Xr=1,Vt=3,Ht=8,Gt=11,Zr=/^(?:(?:HTML|SVG)\w*)?Element$/;function Qr(e){try{return typeof e.hasAttribute=="function"&&e.hasAttribute("is")}catch{return!1}}function vr(e){let t=e.constructor.name,{nodeType:r,tagName:n}=e,i=typeof n=="string"&&n.includes("-")||Qr(e);return r===Xr&&(Zr.test(t)||i)||r===Vt&&t==="Text"||r===Ht&&t==="Comment"||r===Gt&&t==="DocumentFragment"}var en=e=>{var t;return((t=e==null?void 0:e.constructor)==null?void 0:t.name)&&vr(e)};function tn(e){return e.nodeType===Vt}function rn(e){return e.nodeType===Ht}function Ne(e){return e.nodeType===Gt}var nn=(e,t,r,n,i,l)=>{if(tn(e))return Yt(e.data,t);if(rn(e))return Jr(e.data,t);let u=Ne(e)?"DocumentFragment":e.tagName.toLowerCase();return++n>t.maxDepth?He(u,t):Ve(u,We(Ne(e)?[]:Array.from(e.attributes,s=>s.name).sort(),Ne(e)?{}:[...e.attributes].reduce((s,c)=>(s[c.name]=c.value,s),{}),t,r+t.indent,n,i,l),Ye(Array.prototype.slice.call(e.childNodes||e.children),t,r+t.indent,n,i,l),t,r)},ln={serialize:nn,test:en},un="@@__IMMUTABLE_ITERABLE__@@",sn="@@__IMMUTABLE_LIST__@@",on="@@__IMMUTABLE_KEYED__@@",cn="@@__IMMUTABLE_MAP__@@",et="@@__IMMUTABLE_ORDERED__@@",an="@@__IMMUTABLE_RECORD__@@",gn="@@__IMMUTABLE_SEQ__@@",hn="@@__IMMUTABLE_SET__@@",fn="@@__IMMUTABLE_STACK__@@",ge=e=>`Immutable.${e}`,de=e=>`[${e}]`,me=" ",tt="…";function mn(e,t,r,n,i,l,u){return++n>t.maxDepth?de(ge(u)):`${ge(u)+me}{${Oe(e.entries(),t,r,n,i,l)}}`}function pn(e){let t=0;return{next(){if(t<e._keys.length){let r=e._keys[t++];return{done:!1,value:[r,e.get(r)]}}return{done:!0,value:void 0}}}}function yn(e,t,r,n,i,l){let u=ge(e._name||"Record");return++n>t.maxDepth?de(u):`${u+me}{${Oe(pn(e),t,r,n,i,l)}}`}function bn(e,t,r,n,i,l){let u=ge("Seq");return++n>t.maxDepth?de(u):e[on]?`${u+me}{${e._iter||e._object?Oe(e.entries(),t,r,n,i,l):tt}}`:`${u+me}[${e._iter||e._array||e._collection||e._iterable?Ke(e.values(),t,r,n,i,l):tt}]`}function Te(e,t,r,n,i,l,u){return++n>t.maxDepth?de(ge(u)):`${ge(u)+me}[${Ke(e.values(),t,r,n,i,l)}]`}var Sn=(e,t,r,n,i,l)=>e[cn]?mn(e,t,r,n,i,l,e[et]?"OrderedMap":"Map"):e[sn]?Te(e,t,r,n,i,l,"List"):e[hn]?Te(e,t,r,n,i,l,e[et]?"OrderedSet":"Set"):e[fn]?Te(e,t,r,n,i,l,"Stack"):e[gn]?bn(e,t,r,n,i,l):yn(e,t,r,n,i,l),_n=e=>e&&(e[un]===!0||e[an]===!0),$n={serialize:Sn,test:_n},rt={exports:{}},C={},nt;function On(){if(nt)return C;nt=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),s=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),a=Symbol.for("react.suspense"),o=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen"),m;m=Symbol.for("react.module.reference");function p(g){if(typeof g=="object"&&g!==null){var b=g.$$typeof;switch(b){case e:switch(g=g.type,g){case r:case i:case n:case a:case o:return g;default:switch(g=g&&g.$$typeof,g){case s:case u:case c:case y:case h:case l:return g;default:return b}}case t:return b}}}return C.ContextConsumer=u,C.ContextProvider=l,C.Element=e,C.ForwardRef=c,C.Fragment=r,C.Lazy=y,C.Memo=h,C.Portal=t,C.Profiler=i,C.StrictMode=n,C.Suspense=a,C.SuspenseList=o,C.isAsyncMode=function(){return!1},C.isConcurrentMode=function(){return!1},C.isContextConsumer=function(g){return p(g)===u},C.isContextProvider=function(g){return p(g)===l},C.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===e},C.isForwardRef=function(g){return p(g)===c},C.isFragment=function(g){return p(g)===r},C.isLazy=function(g){return p(g)===y},C.isMemo=function(g){return p(g)===h},C.isPortal=function(g){return p(g)===t},C.isProfiler=function(g){return p(g)===i},C.isStrictMode=function(g){return p(g)===n},C.isSuspense=function(g){return p(g)===a},C.isSuspenseList=function(g){return p(g)===o},C.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===r||g===i||g===n||g===a||g===o||g===f||typeof g=="object"&&g!==null&&(g.$$typeof===y||g.$$typeof===h||g.$$typeof===l||g.$$typeof===u||g.$$typeof===c||g.$$typeof===m||g.getModuleId!==void 0)},C.typeOf=p,C}var it;function dn(){return it||(it=1,rt.exports=On()),rt.exports}var ie=dn();function Jt(e,t=[]){if(Array.isArray(e))for(let r of e)Jt(r,t);else e!=null&&e!==!1&&e!==""&&t.push(e);return t}function lt(e){let t=e.type;if(typeof t=="string")return t;if(typeof t=="function")return t.displayName||t.name||"Unknown";if(ie.isFragment(e))return"React.Fragment";if(ie.isSuspense(e))return"React.Suspense";if(typeof t=="object"&&t!==null){if(ie.isContextProvider(e))return"Context.Provider";if(ie.isContextConsumer(e))return"Context.Consumer";if(ie.isForwardRef(e)){if(t.displayName)return t.displayName;let r=t.render.displayName||t.render.name||"";return r===""?"ForwardRef":`ForwardRef(${r})`}if(ie.isMemo(e)){let r=t.displayName||t.type.displayName||t.type.name||"";return r===""?"Memo":`Memo(${r})`}}return"UNDEFINED"}function wn(e){let{props:t}=e;return Object.keys(t).filter(r=>r!=="children"&&t[r]!==void 0).sort()}var En=(e,t,r,n,i,l)=>++n>t.maxDepth?He(lt(e),t):Ve(lt(e),We(wn(e),e.props,t,r+t.indent,n,i,l),Ye(Jt(e.props.children),t,r+t.indent,n,i,l),t,r),Cn=e=>e!=null&&ie.isElement(e),Nn={serialize:En,test:Cn},Tn=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.test.json"):245830487;function An(e){let{props:t}=e;return t?Object.keys(t).filter(r=>t[r]!==void 0).sort():[]}var Mn=(e,t,r,n,i,l)=>++n>t.maxDepth?He(e.type,t):Ve(e.type,e.props?We(An(e),e.props,t,r+t.indent,n,i,l):"",e.children?Ye(e.children,t,r+t.indent,n,i,l):"",t,r),In=e=>e&&e.$$typeof===Tn,Pn={serialize:Mn,test:In},Xt=Object.prototype.toString,Rn=Date.prototype.toISOString,Ln=Error.prototype.toString,ut=RegExp.prototype.toString;function Ae(e){return typeof e.constructor=="function"&&e.constructor.name||"Object"}function Dn(e){return typeof window<"u"&&e===window}var jn=/^Symbol\((.*)\)(.*)$/,Fn=/\n/g,Zt=class extends Error{constructor(e,t){super(e),this.stack=t,this.name=this.constructor.name}};function Bn(e){return e==="[object Array]"||e==="[object ArrayBuffer]"||e==="[object DataView]"||e==="[object Float32Array]"||e==="[object Float64Array]"||e==="[object Int8Array]"||e==="[object Int16Array]"||e==="[object Int32Array]"||e==="[object Uint8Array]"||e==="[object Uint8ClampedArray]"||e==="[object Uint16Array]"||e==="[object Uint32Array]"}function xn(e){return Object.is(e,-0)?"-0":String(e)}function kn(e){return`${e}n`}function st(e,t){return t?`[Function ${e.name||"anonymous"}]`:"[Function]"}function ot(e){return String(e).replace(jn,"Symbol($1)")}function ct(e){return`[${Ln.call(e)}]`}function Qt(e,t,r,n){if(e===!0||e===!1)return`${e}`;if(e===void 0)return"undefined";if(e===null)return"null";let i=typeof e;if(i==="number")return xn(e);if(i==="bigint")return kn(e);if(i==="string")return n?`"${e.replaceAll(/"|\\/g,"\\$&")}"`:`"${e}"`;if(i==="function")return st(e,t);if(i==="symbol")return ot(e);let l=Xt.call(e);return l==="[object WeakMap]"?"WeakMap {}":l==="[object WeakSet]"?"WeakSet {}":l==="[object Function]"||l==="[object GeneratorFunction]"?st(e,t):l==="[object Symbol]"?ot(e):l==="[object Date]"?Number.isNaN(+e)?"Date { NaN }":Rn.call(e):l==="[object Error]"?ct(e):l==="[object RegExp]"?r?ut.call(e).replaceAll(/[$()*+.?[\\\]^{|}]/g,"\\$&"):ut.call(e):e instanceof Error?ct(e):null}function vt(e,t,r,n,i,l){if(i.includes(e))return"[Circular]";i=[...i],i.push(e);let u=++n>t.maxDepth,s=t.min;if(t.callToJSON&&!u&&e.toJSON&&typeof e.toJSON=="function"&&!l)return te(e.toJSON(),t,r,n,i,!0);let c=Xt.call(e);return c==="[object Arguments]"?u?"[Arguments]":`${s?"":"Arguments "}[${$e(e,t,r,n,i,te)}]`:Bn(c)?u?`[${e.constructor.name}]`:`${s||!t.printBasicPrototype&&e.constructor.name==="Array"?"":`${e.constructor.name} `}[${$e(e,t,r,n,i,te)}]`:c==="[object Map]"?u?"[Map]":`Map {${Oe(e.entries(),t,r,n,i,te," => ")}}`:c==="[object Set]"?u?"[Set]":`Set {${Ke(e.values(),t,r,n,i,te)}}`:u||Dn(e)?`[${Ae(e)}]`:`${s||!t.printBasicPrototype&&Ae(e)==="Object"?"":`${Ae(e)} `}{${qe(e,t,r,n,i,te)}}`}function zn(e){return e.serialize!=null}function er(e,t,r,n,i,l){let u;try{u=zn(e)?e.serialize(t,r,n,i,l,te):e.print(t,s=>te(s,r,n,i,l),s=>{let c=n+r.indent;return c+s.replaceAll(Fn,`
|
|
3
3
|
${c}`)},{edgeSpacing:r.spacingOuter,min:r.min,spacing:r.spacingInner},r.colors)}catch(s){throw new Zt(s.message,s.stack)}if(typeof u!="string")throw new TypeError(`pretty-format: Plugin must return type "string" but instead returned "${typeof u}".`);return u}function tr(e,t){for(let r of e)try{if(r.test(t))return r}catch(n){throw new Zt(n.message,n.stack)}return null}function te(e,t,r,n,i,l){let u=tr(t.plugins,e);if(u!==null)return er(u,e,t,r,n,i);let s=Qt(e,t.printFunctionName,t.escapeRegex,t.escapeString);return s!==null?s:vt(e,t,r,n,i,l)}var Ge={comment:"gray",content:"reset",prop:"yellow",tag:"cyan",value:"green"},rr=Object.keys(Ge),K={callToJSON:!0,compareKeys:void 0,escapeRegex:!1,escapeString:!0,highlight:!1,indent:2,maxDepth:Number.POSITIVE_INFINITY,maxWidth:Number.POSITIVE_INFINITY,min:!1,plugins:[],printBasicPrototype:!0,printFunctionName:!0,theme:Ge};function Un(e){for(let t of Object.keys(e))if(!Object.prototype.hasOwnProperty.call(K,t))throw new Error(`pretty-format: Unknown option "${t}".`);if(e.min&&e.indent!==void 0&&e.indent!==0)throw new Error('pretty-format: Options "min" and "indent" cannot be used together.')}function Kn(){return rr.reduce((e,t)=>{let r=Ge[t],n=r&&v[r];if(n&&typeof n.close=="string"&&typeof n.open=="string")e[t]=n;else throw new Error(`pretty-format: Option "theme" has a key "${t}" whose value "${r}" is undefined in ansi-styles.`);return e},Object.create(null))}function qn(){return rr.reduce((e,t)=>(e[t]={close:"",open:""},e),Object.create(null))}function nr(e){return(e==null?void 0:e.printFunctionName)??K.printFunctionName}function ir(e){return(e==null?void 0:e.escapeRegex)??K.escapeRegex}function lr(e){return(e==null?void 0:e.escapeString)??K.escapeString}function at(e){return{callToJSON:(e==null?void 0:e.callToJSON)??K.callToJSON,colors:e!=null&&e.highlight?Kn():qn(),compareKeys:typeof(e==null?void 0:e.compareKeys)=="function"||(e==null?void 0:e.compareKeys)===null?e.compareKeys:K.compareKeys,escapeRegex:ir(e),escapeString:lr(e),indent:e!=null&&e.min?"":Wn((e==null?void 0:e.indent)??K.indent),maxDepth:(e==null?void 0:e.maxDepth)??K.maxDepth,maxWidth:(e==null?void 0:e.maxWidth)??K.maxWidth,min:(e==null?void 0:e.min)??K.min,plugins:(e==null?void 0:e.plugins)??K.plugins,printBasicPrototype:(e==null?void 0:e.printBasicPrototype)??!0,printFunctionName:nr(e),spacingInner:e!=null&&e.min?" ":`
|
|
4
4
|
`,spacingOuter:e!=null&&e.min?"":`
|