zignal-stencil-library 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/cjs/app-globals-V2Kpy_OQ.js +8 -0
- package/dist/cjs/app-globals-V2Kpy_OQ.js.map +1 -0
- package/dist/cjs/autocomplete-select_18.cjs.entry.js +41433 -0
- package/dist/cjs/autocomplete-select_18.cjs.entry.js.map +1 -0
- package/dist/cjs/index-C4CtrJXU.js +2199 -0
- package/dist/cjs/index-C4CtrJXU.js.map +1 -0
- package/dist/cjs/index-tRPYdc8n.js +1927 -0
- package/dist/cjs/index-tRPYdc8n.js.map +1 -0
- package/dist/cjs/index.cjs.js +7 -0
- package/dist/cjs/index.cjs.js.map +1 -0
- package/dist/cjs/loader.cjs.js +16 -0
- package/dist/cjs/loader.cjs.js.map +1 -0
- package/dist/cjs/zignal-stencil-library.cjs.js +28 -0
- package/dist/cjs/zignal-stencil-library.cjs.js.map +1 -0
- package/dist/collection/api/index.js +132 -0
- package/dist/collection/api/index.js.map +1 -0
- package/dist/collection/collection-manifest.json +29 -0
- package/dist/collection/components/autocomplete-select/autocomplete-select.css +1 -0
- package/dist/collection/components/autocomplete-select/autocomplete-select.js +230 -0
- package/dist/collection/components/autocomplete-select/autocomplete-select.js.map +1 -0
- package/dist/collection/components/channel-box/channel-box.css +1 -0
- package/dist/collection/components/channel-box/channel-box.js +93 -0
- package/dist/collection/components/channel-box/channel-box.js.map +1 -0
- package/dist/collection/components/chat-app/chat-app.css +1 -0
- package/dist/collection/components/chat-app/chat-app.js +227 -0
- package/dist/collection/components/chat-app/chat-app.js.map +1 -0
- package/dist/collection/components/chat-header/chat-header.css +1 -0
- package/dist/collection/components/chat-header/chat-header.js +45 -0
- package/dist/collection/components/chat-header/chat-header.js.map +1 -0
- package/dist/collection/components/chat-input/chat-input.css +1 -0
- package/dist/collection/components/chat-input/chat-input.js +118 -0
- package/dist/collection/components/chat-input/chat-input.js.map +1 -0
- package/dist/collection/components/dialog-editor/dialog-editor.css +1 -0
- package/dist/collection/components/dialog-editor/dialog-editor.js +176 -0
- package/dist/collection/components/dialog-editor/dialog-editor.js.map +1 -0
- package/dist/collection/components/dialog-preview-media/dialog-preview-media.css +1 -0
- package/dist/collection/components/dialog-preview-media/dialog-preview-media.js +96 -0
- package/dist/collection/components/dialog-preview-media/dialog-preview-media.js.map +1 -0
- package/dist/collection/components/dialog-search/dialog-search.css +1 -0
- package/dist/collection/components/dialog-search/dialog-search.js +105 -0
- package/dist/collection/components/dialog-search/dialog-search.js.map +1 -0
- package/dist/collection/components/internal-component/chat-item.js +28 -0
- package/dist/collection/components/internal-component/chat-item.js.map +1 -0
- package/dist/collection/components/internal-component/icon.js +9 -0
- package/dist/collection/components/internal-component/icon.js.map +1 -0
- package/dist/collection/components/internal-component/tag-or-status-item.js +9 -0
- package/dist/collection/components/internal-component/tag-or-status-item.js.map +1 -0
- package/dist/collection/components/internal-component/z-button.js +24 -0
- package/dist/collection/components/internal-component/z-button.js.map +1 -0
- package/dist/collection/components/internal-component/z-icon-button.js +23 -0
- package/dist/collection/components/internal-component/z-icon-button.js.map +1 -0
- package/dist/collection/components/internal-component/z-input-area.js +8 -0
- package/dist/collection/components/internal-component/z-input-area.js.map +1 -0
- package/dist/collection/components/internal-component/z-input.js +8 -0
- package/dist/collection/components/internal-component/z-input.js.map +1 -0
- package/dist/collection/components/internal-component/z-select-input.js +9 -0
- package/dist/collection/components/internal-component/z-select-input.js.map +1 -0
- package/dist/collection/components/menu-list/menu-list.css +1 -0
- package/dist/collection/components/menu-list/menu-list.js +168 -0
- package/dist/collection/components/menu-list/menu-list.js.map +1 -0
- package/dist/collection/components/message-box/message-box.css +1 -0
- package/dist/collection/components/message-box/message-box.js +179 -0
- package/dist/collection/components/message-box/message-box.js.map +1 -0
- package/dist/collection/components/message-content/message-content.css +1 -0
- package/dist/collection/components/message-content/message-content.js +98 -0
- package/dist/collection/components/message-content/message-content.js.map +1 -0
- package/dist/collection/components/message-item/message-item.css +1 -0
- package/dist/collection/components/message-item/message-item.js +115 -0
- package/dist/collection/components/message-item/message-item.js.map +1 -0
- package/dist/collection/components/profile-history/profile-history.css +1 -0
- package/dist/collection/components/profile-history/profile-history.js +18 -0
- package/dist/collection/components/profile-history/profile-history.js.map +1 -0
- package/dist/collection/components/profile-info/profile-info.css +1 -0
- package/dist/collection/components/profile-info/profile-info.js +255 -0
- package/dist/collection/components/profile-info/profile-info.js.map +1 -0
- package/dist/collection/components/profile-media/profile-media.css +1 -0
- package/dist/collection/components/profile-media/profile-media.js +18 -0
- package/dist/collection/components/profile-media/profile-media.js.map +1 -0
- package/dist/collection/components/profile-tabs/profile-tabs.css +1 -0
- package/dist/collection/components/profile-tabs/profile-tabs.js +43 -0
- package/dist/collection/components/profile-tabs/profile-tabs.js.map +1 -0
- package/dist/collection/components/search-box/search-box.css +1 -0
- package/dist/collection/components/search-box/search-box.js +71 -0
- package/dist/collection/components/search-box/search-box.js.map +1 -0
- package/dist/collection/components/tag-popper/tag-popper.css +1 -0
- package/dist/collection/components/tag-popper/tag-popper.js +124 -0
- package/dist/collection/components/tag-popper/tag-popper.js.map +1 -0
- package/dist/collection/global/i18n.js +13 -0
- package/dist/collection/global/i18n.js.map +1 -0
- package/dist/collection/index.js +11 -0
- package/dist/collection/index.js.map +1 -0
- package/dist/collection/postcss/property-to-variable.js +54 -0
- package/dist/collection/store/store.js +25 -0
- package/dist/collection/store/store.js.map +1 -0
- package/dist/collection/utils/axios.js +11 -0
- package/dist/collection/utils/axios.js.map +1 -0
- package/dist/collection/utils/constant.js +5 -0
- package/dist/collection/utils/constant.js.map +1 -0
- package/dist/collection/utils/dayjs.js +175 -0
- package/dist/collection/utils/dayjs.js.map +1 -0
- package/dist/collection/utils/socket.js +59 -0
- package/dist/collection/utils/socket.js.map +1 -0
- package/dist/collection/utils/utils.js +8 -0
- package/dist/collection/utils/utils.js.map +1 -0
- package/dist/components/autocomplete-select.d.ts +11 -0
- package/dist/components/autocomplete-select.js +9 -0
- package/dist/components/autocomplete-select.js.map +1 -0
- package/dist/components/channel-box.d.ts +11 -0
- package/dist/components/channel-box.js +9 -0
- package/dist/components/channel-box.js.map +1 -0
- package/dist/components/chat-app.d.ts +11 -0
- package/dist/components/chat-app.js +226 -0
- package/dist/components/chat-app.js.map +1 -0
- package/dist/components/chat-header.d.ts +11 -0
- package/dist/components/chat-header.js +9 -0
- package/dist/components/chat-header.js.map +1 -0
- package/dist/components/chat-input.d.ts +11 -0
- package/dist/components/chat-input.js +9 -0
- package/dist/components/chat-input.js.map +1 -0
- package/dist/components/dialog-editor.d.ts +11 -0
- package/dist/components/dialog-editor.js +9 -0
- package/dist/components/dialog-editor.js.map +1 -0
- package/dist/components/dialog-preview-media.d.ts +11 -0
- package/dist/components/dialog-preview-media.js +9 -0
- package/dist/components/dialog-preview-media.js.map +1 -0
- package/dist/components/dialog-search.d.ts +11 -0
- package/dist/components/dialog-search.js +9 -0
- package/dist/components/dialog-search.js.map +1 -0
- package/dist/components/index.d.ts +33 -0
- package/dist/components/index.js +2199 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/menu-list.d.ts +11 -0
- package/dist/components/menu-list.js +9 -0
- package/dist/components/menu-list.js.map +1 -0
- package/dist/components/message-box.d.ts +11 -0
- package/dist/components/message-box.js +9 -0
- package/dist/components/message-box.js.map +1 -0
- package/dist/components/message-content.d.ts +11 -0
- package/dist/components/message-content.js +9 -0
- package/dist/components/message-content.js.map +1 -0
- package/dist/components/message-item.d.ts +11 -0
- package/dist/components/message-item.js +9 -0
- package/dist/components/message-item.js.map +1 -0
- package/dist/components/p-6xqe-pLQ.js +1509 -0
- package/dist/components/p-6xqe-pLQ.js.map +1 -0
- package/dist/components/p-B8jcXcXq.js +10 -0
- package/dist/components/p-B8jcXcXq.js.map +1 -0
- package/dist/components/p-BAxNTWPI.js +32 -0
- package/dist/components/p-BAxNTWPI.js.map +1 -0
- package/dist/components/p-BZ4TvILZ.js +24 -0
- package/dist/components/p-BZ4TvILZ.js.map +1 -0
- package/dist/components/p-BZ_KFdA7.js +99 -0
- package/dist/components/p-BZ_KFdA7.js.map +1 -0
- package/dist/components/p-BaEi6GXz.js +27448 -0
- package/dist/components/p-BaEi6GXz.js.map +1 -0
- package/dist/components/p-BcC6bTqM.js +104 -0
- package/dist/components/p-BcC6bTqM.js.map +1 -0
- package/dist/components/p-Beycm8NN.js +3027 -0
- package/dist/components/p-Beycm8NN.js.map +1 -0
- package/dist/components/p-Bf89k6bd.js +3932 -0
- package/dist/components/p-Bf89k6bd.js.map +1 -0
- package/dist/components/p-BtkLsQfZ.js +17 -0
- package/dist/components/p-BtkLsQfZ.js.map +1 -0
- package/dist/components/p-C9EokLnL.js +102 -0
- package/dist/components/p-C9EokLnL.js.map +1 -0
- package/dist/components/p-CHaS9akB.js +33 -0
- package/dist/components/p-CHaS9akB.js.map +1 -0
- package/dist/components/p-CQZRPVaY.js +1715 -0
- package/dist/components/p-CQZRPVaY.js.map +1 -0
- package/dist/components/p-CS8eN-II.js +60 -0
- package/dist/components/p-CS8eN-II.js.map +1 -0
- package/dist/components/p-CUmphmPD.js +48 -0
- package/dist/components/p-CUmphmPD.js.map +1 -0
- package/dist/components/p-ChdOg2lI.js +90 -0
- package/dist/components/p-ChdOg2lI.js.map +1 -0
- package/dist/components/p-CkqA8kPB.js +210 -0
- package/dist/components/p-CkqA8kPB.js.map +1 -0
- package/dist/components/p-CmWIRJ5t.js +91 -0
- package/dist/components/p-CmWIRJ5t.js.map +1 -0
- package/dist/components/p-CzESq-LE.js +88 -0
- package/dist/components/p-CzESq-LE.js.map +1 -0
- package/dist/components/p-DD3M-jE2.js +87 -0
- package/dist/components/p-DD3M-jE2.js.map +1 -0
- package/dist/components/p-DFjLV5Vy.js +71 -0
- package/dist/components/p-DFjLV5Vy.js.map +1 -0
- package/dist/components/p-DYI8iHdE.js +279 -0
- package/dist/components/p-DYI8iHdE.js.map +1 -0
- package/dist/components/p-DfRY75vS.js +16 -0
- package/dist/components/p-DfRY75vS.js.map +1 -0
- package/dist/components/p-DspEZ2pG.js +85 -0
- package/dist/components/p-DspEZ2pG.js.map +1 -0
- package/dist/components/p-LCZ_Vyoy.js +4084 -0
- package/dist/components/p-LCZ_Vyoy.js.map +1 -0
- package/dist/components/p-N-wb2wDd.js +236 -0
- package/dist/components/p-N-wb2wDd.js.map +1 -0
- package/dist/components/p-Urxy5c9-.js +154 -0
- package/dist/components/p-Urxy5c9-.js.map +1 -0
- package/dist/components/p-nz95LAGz.js +33 -0
- package/dist/components/p-nz95LAGz.js.map +1 -0
- package/dist/components/profile-history.d.ts +11 -0
- package/dist/components/profile-history.js +9 -0
- package/dist/components/profile-history.js.map +1 -0
- package/dist/components/profile-info.d.ts +11 -0
- package/dist/components/profile-info.js +9 -0
- package/dist/components/profile-info.js.map +1 -0
- package/dist/components/profile-media.d.ts +11 -0
- package/dist/components/profile-media.js +9 -0
- package/dist/components/profile-media.js.map +1 -0
- package/dist/components/profile-tabs.d.ts +11 -0
- package/dist/components/profile-tabs.js +9 -0
- package/dist/components/profile-tabs.js.map +1 -0
- package/dist/components/search-box.d.ts +11 -0
- package/dist/components/search-box.js +9 -0
- package/dist/components/search-box.js.map +1 -0
- package/dist/components/tag-popper.d.ts +11 -0
- package/dist/components/tag-popper.js +9 -0
- package/dist/components/tag-popper.js.map +1 -0
- package/dist/esm/app-globals-DQuL1Twl.js +6 -0
- package/dist/esm/app-globals-DQuL1Twl.js.map +1 -0
- package/dist/esm/autocomplete-select.channel-box.chat-app.chat-header.chat-input.dialog-editor.dialog-preview-media.dialog-search.menu-list.message-box.message-content.message-item.profile-history.profile-info.profile-media.profile-tabs.search-box.tag-popper.entry.js.map +1 -0
- package/dist/esm/autocomplete-select_18.entry.js +41414 -0
- package/dist/esm/autocomplete-select_18.entry.js.map +1 -0
- package/dist/esm/index-C0ey1F02.js +1917 -0
- package/dist/esm/index-C0ey1F02.js.map +1 -0
- package/dist/esm/index-DasOEma2.js +2197 -0
- package/dist/esm/index-DasOEma2.js.map +1 -0
- package/dist/esm/index.js +4 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/loader.js +14 -0
- package/dist/esm/loader.js.map +1 -0
- package/dist/esm/zignal-stencil-library.js +24 -0
- package/dist/esm/zignal-stencil-library.js.map +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/api/index.d.ts +12 -0
- package/dist/types/api/index.type.d.ts +98 -0
- package/dist/types/components/autocomplete-select/autocomplete-select.d.ts +19 -0
- package/dist/types/components/channel-box/channel-box.d.ts +11 -0
- package/dist/types/components/chat-app/chat-app.d.ts +25 -0
- package/dist/types/components/chat-header/chat-header.d.ts +3 -0
- package/dist/types/components/chat-input/chat-input.d.ts +9 -0
- package/dist/types/components/dialog-editor/dialog-editor.d.ts +16 -0
- package/dist/types/components/dialog-preview-media/dialog-preview-media.d.ts +8 -0
- package/dist/types/components/dialog-search/dialog-search.d.ts +18 -0
- package/dist/types/components/internal-component/chat-item.d.ts +6 -0
- package/dist/types/components/internal-component/icon.d.ts +7 -0
- package/dist/types/components/internal-component/tag-or-status-item.d.ts +7 -0
- package/dist/types/components/internal-component/z-button.d.ts +15 -0
- package/dist/types/components/internal-component/z-icon-button.d.ts +13 -0
- package/dist/types/components/internal-component/z-input-area.d.ts +13 -0
- package/dist/types/components/internal-component/z-input.d.ts +13 -0
- package/dist/types/components/internal-component/z-select-input.d.ts +13 -0
- package/dist/types/components/menu-list/menu-list.d.ts +17 -0
- package/dist/types/components/message-box/message-box.d.ts +19 -0
- package/dist/types/components/message-content/message-content.d.ts +8 -0
- package/dist/types/components/message-item/message-item.d.ts +9 -0
- package/dist/types/components/profile-history/profile-history.d.ts +3 -0
- package/dist/types/components/profile-info/profile-info.d.ts +29 -0
- package/dist/types/components/profile-media/profile-media.d.ts +3 -0
- package/dist/types/components/profile-tabs/profile-tabs.d.ts +8 -0
- package/dist/types/components/search-box/search-box.d.ts +10 -0
- package/dist/types/components/tag-popper/tag-popper.d.ts +13 -0
- package/dist/types/components.d.ts +498 -0
- package/dist/types/global/i18n.d.ts +2 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/stencil-public-runtime.d.ts +1709 -0
- package/dist/types/store/store.d.ts +16 -0
- package/dist/types/store/store.type.d.ts +132 -0
- package/dist/types/utils/axios.d.ts +1 -0
- package/dist/types/utils/constant.d.ts +1 -0
- package/dist/types/utils/dayjs.d.ts +31 -0
- package/dist/types/utils/socket.d.ts +6 -0
- package/dist/types/utils/utils.d.ts +2 -0
- package/dist/zignal-stencil-library/index.esm.js +2 -0
- package/dist/zignal-stencil-library/index.esm.js.map +1 -0
- package/dist/zignal-stencil-library/loader.esm.js.map +1 -0
- package/dist/zignal-stencil-library/p-C0ey1F02.js +3 -0
- package/dist/zignal-stencil-library/p-C0ey1F02.js.map +1 -0
- package/dist/zignal-stencil-library/p-DQuL1Twl.js +2 -0
- package/dist/zignal-stencil-library/p-DQuL1Twl.js.map +1 -0
- package/dist/zignal-stencil-library/p-DasOEma2.js +2 -0
- package/dist/zignal-stencil-library/p-DasOEma2.js.map +1 -0
- package/dist/zignal-stencil-library/p-ee2ebe92.entry.js +9777 -0
- package/dist/zignal-stencil-library/p-ee2ebe92.entry.js.map +1 -0
- package/dist/zignal-stencil-library/zignal-stencil-library.css +1 -0
- package/dist/zignal-stencil-library/zignal-stencil-library.esm.js +2 -0
- package/dist/zignal-stencil-library/zignal-stencil-library.esm.js.map +1 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +73 -0
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import { g as getRenderingRef, f as forceUpdate } from './p-CQZRPVaY.js';
|
|
2
|
+
|
|
3
|
+
const appendToMap = (map, propName, value) => {
|
|
4
|
+
const items = map.get(propName);
|
|
5
|
+
if (!items) {
|
|
6
|
+
map.set(propName, [value]);
|
|
7
|
+
}
|
|
8
|
+
else if (!items.includes(value)) {
|
|
9
|
+
items.push(value);
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
const debounce = (fn, ms) => {
|
|
13
|
+
let timeoutId;
|
|
14
|
+
return (...args) => {
|
|
15
|
+
if (timeoutId) {
|
|
16
|
+
clearTimeout(timeoutId);
|
|
17
|
+
}
|
|
18
|
+
timeoutId = setTimeout(() => {
|
|
19
|
+
timeoutId = 0;
|
|
20
|
+
fn(...args);
|
|
21
|
+
}, ms);
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Check if a possible element isConnected.
|
|
27
|
+
* The property might not be there, so we check for it.
|
|
28
|
+
*
|
|
29
|
+
* We want it to return true if isConnected is not a property,
|
|
30
|
+
* otherwise we would remove these elements and would not update.
|
|
31
|
+
*
|
|
32
|
+
* Better leak in Edge than to be useless.
|
|
33
|
+
*/
|
|
34
|
+
const isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;
|
|
35
|
+
const cleanupElements = debounce((map) => {
|
|
36
|
+
for (let key of map.keys()) {
|
|
37
|
+
map.set(key, map.get(key).filter(isConnected));
|
|
38
|
+
}
|
|
39
|
+
}, 2_000);
|
|
40
|
+
const stencilSubscription = () => {
|
|
41
|
+
if (typeof getRenderingRef !== 'function') {
|
|
42
|
+
// If we are not in a stencil project, we do nothing.
|
|
43
|
+
// This function is not really exported by @stencil/core.
|
|
44
|
+
return {};
|
|
45
|
+
}
|
|
46
|
+
const elmsToUpdate = new Map();
|
|
47
|
+
return {
|
|
48
|
+
dispose: () => elmsToUpdate.clear(),
|
|
49
|
+
get: (propName) => {
|
|
50
|
+
const elm = getRenderingRef();
|
|
51
|
+
if (elm) {
|
|
52
|
+
appendToMap(elmsToUpdate, propName, elm);
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
set: (propName) => {
|
|
56
|
+
const elements = elmsToUpdate.get(propName);
|
|
57
|
+
if (elements) {
|
|
58
|
+
elmsToUpdate.set(propName, elements.filter(forceUpdate));
|
|
59
|
+
}
|
|
60
|
+
cleanupElements(elmsToUpdate);
|
|
61
|
+
},
|
|
62
|
+
reset: () => {
|
|
63
|
+
elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));
|
|
64
|
+
cleanupElements(elmsToUpdate);
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
const unwrap = (val) => (typeof val === 'function' ? val() : val);
|
|
70
|
+
const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {
|
|
71
|
+
const unwrappedState = unwrap(defaultState);
|
|
72
|
+
let states = new Map(Object.entries(unwrappedState ?? {}));
|
|
73
|
+
const handlers = {
|
|
74
|
+
dispose: [],
|
|
75
|
+
get: [],
|
|
76
|
+
set: [],
|
|
77
|
+
reset: [],
|
|
78
|
+
};
|
|
79
|
+
// Track onChange listeners to enable removeListener functionality
|
|
80
|
+
const changeListeners = new Map();
|
|
81
|
+
const reset = () => {
|
|
82
|
+
// When resetting the state, the default state may be a function - unwrap it to invoke it.
|
|
83
|
+
// otherwise, the state won't be properly reset
|
|
84
|
+
states = new Map(Object.entries(unwrap(defaultState) ?? {}));
|
|
85
|
+
handlers.reset.forEach((cb) => cb());
|
|
86
|
+
};
|
|
87
|
+
const dispose = () => {
|
|
88
|
+
// Call first dispose as resetting the state would
|
|
89
|
+
// cause less updates ;)
|
|
90
|
+
handlers.dispose.forEach((cb) => cb());
|
|
91
|
+
reset();
|
|
92
|
+
};
|
|
93
|
+
const get = (propName) => {
|
|
94
|
+
handlers.get.forEach((cb) => cb(propName));
|
|
95
|
+
return states.get(propName);
|
|
96
|
+
};
|
|
97
|
+
const set = (propName, value) => {
|
|
98
|
+
const oldValue = states.get(propName);
|
|
99
|
+
if (shouldUpdate(value, oldValue, propName)) {
|
|
100
|
+
states.set(propName, value);
|
|
101
|
+
handlers.set.forEach((cb) => cb(propName, value, oldValue));
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
const state = (typeof Proxy === 'undefined'
|
|
105
|
+
? {}
|
|
106
|
+
: new Proxy(unwrappedState, {
|
|
107
|
+
get(_, propName) {
|
|
108
|
+
return get(propName);
|
|
109
|
+
},
|
|
110
|
+
ownKeys(_) {
|
|
111
|
+
return Array.from(states.keys());
|
|
112
|
+
},
|
|
113
|
+
getOwnPropertyDescriptor() {
|
|
114
|
+
return {
|
|
115
|
+
enumerable: true,
|
|
116
|
+
configurable: true,
|
|
117
|
+
};
|
|
118
|
+
},
|
|
119
|
+
has(_, propName) {
|
|
120
|
+
return states.has(propName);
|
|
121
|
+
},
|
|
122
|
+
set(_, propName, value) {
|
|
123
|
+
set(propName, value);
|
|
124
|
+
return true;
|
|
125
|
+
},
|
|
126
|
+
}));
|
|
127
|
+
const on = (eventName, callback) => {
|
|
128
|
+
handlers[eventName].push(callback);
|
|
129
|
+
return () => {
|
|
130
|
+
removeFromArray(handlers[eventName], callback);
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
const onChange = (propName, cb) => {
|
|
134
|
+
const setHandler = (key, newValue) => {
|
|
135
|
+
if (key === propName) {
|
|
136
|
+
cb(newValue);
|
|
137
|
+
}
|
|
138
|
+
};
|
|
139
|
+
const resetHandler = () => cb(unwrap(defaultState)[propName]);
|
|
140
|
+
// Register the handlers
|
|
141
|
+
const unSet = on('set', setHandler);
|
|
142
|
+
const unReset = on('reset', resetHandler);
|
|
143
|
+
// Track the relationship between the user callback and internal handlers
|
|
144
|
+
changeListeners.set(cb, { setHandler, resetHandler, propName });
|
|
145
|
+
return () => {
|
|
146
|
+
unSet();
|
|
147
|
+
unReset();
|
|
148
|
+
changeListeners.delete(cb);
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
const use = (...subscriptions) => {
|
|
152
|
+
const unsubs = subscriptions.reduce((unsubs, subscription) => {
|
|
153
|
+
if (subscription.set) {
|
|
154
|
+
unsubs.push(on('set', subscription.set));
|
|
155
|
+
}
|
|
156
|
+
if (subscription.get) {
|
|
157
|
+
unsubs.push(on('get', subscription.get));
|
|
158
|
+
}
|
|
159
|
+
if (subscription.reset) {
|
|
160
|
+
unsubs.push(on('reset', subscription.reset));
|
|
161
|
+
}
|
|
162
|
+
if (subscription.dispose) {
|
|
163
|
+
unsubs.push(on('dispose', subscription.dispose));
|
|
164
|
+
}
|
|
165
|
+
return unsubs;
|
|
166
|
+
}, []);
|
|
167
|
+
return () => unsubs.forEach((unsub) => unsub());
|
|
168
|
+
};
|
|
169
|
+
const forceUpdate = (key) => {
|
|
170
|
+
const oldValue = states.get(key);
|
|
171
|
+
handlers.set.forEach((cb) => cb(key, oldValue, oldValue));
|
|
172
|
+
};
|
|
173
|
+
const removeListener = (propName, listener) => {
|
|
174
|
+
const listenerInfo = changeListeners.get(listener);
|
|
175
|
+
if (listenerInfo && listenerInfo.propName === propName) {
|
|
176
|
+
// Remove the specific handlers that were created for this listener
|
|
177
|
+
removeFromArray(handlers.set, listenerInfo.setHandler);
|
|
178
|
+
removeFromArray(handlers.reset, listenerInfo.resetHandler);
|
|
179
|
+
changeListeners.delete(listener);
|
|
180
|
+
}
|
|
181
|
+
};
|
|
182
|
+
return {
|
|
183
|
+
state,
|
|
184
|
+
get,
|
|
185
|
+
set,
|
|
186
|
+
on,
|
|
187
|
+
onChange,
|
|
188
|
+
use,
|
|
189
|
+
dispose,
|
|
190
|
+
reset,
|
|
191
|
+
forceUpdate,
|
|
192
|
+
removeListener,
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
const removeFromArray = (array, item) => {
|
|
196
|
+
const index = array.indexOf(item);
|
|
197
|
+
if (index >= 0) {
|
|
198
|
+
array[index] = array[array.length - 1];
|
|
199
|
+
array.length--;
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
const createStore = (defaultState, shouldUpdate) => {
|
|
204
|
+
const map = createObservableMap(defaultState, shouldUpdate);
|
|
205
|
+
map.use(stencilSubscription());
|
|
206
|
+
return map;
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
const configStore = createStore({
|
|
210
|
+
language: 'en',
|
|
211
|
+
theme: 'light',
|
|
212
|
+
businessId: null,
|
|
213
|
+
shopId: null,
|
|
214
|
+
accessToken: null,
|
|
215
|
+
isProduction: false
|
|
216
|
+
});
|
|
217
|
+
const messagesStore = createStore({
|
|
218
|
+
messages: [],
|
|
219
|
+
});
|
|
220
|
+
const chatsStore = createStore({
|
|
221
|
+
chats: [],
|
|
222
|
+
});
|
|
223
|
+
const userStore = createStore({
|
|
224
|
+
user: null,
|
|
225
|
+
});
|
|
226
|
+
const selectedChatStore = createStore({
|
|
227
|
+
selectedChat: null,
|
|
228
|
+
});
|
|
229
|
+
const selectedMessageToReplyStore = createStore({
|
|
230
|
+
selectedMessageToReply: null,
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
export { chatsStore as a, selectedMessageToReplyStore as b, configStore as c, messagesStore as m, selectedChatStore as s, userStore as u };
|
|
234
|
+
//# sourceMappingURL=p-N-wb2wDd.js.map
|
|
235
|
+
|
|
236
|
+
//# sourceMappingURL=p-N-wb2wDd.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-N-wb2wDd.js","mappings":";;AAEA,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,KAAK;AAC9C,IAAI,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC;AACnC,IAAI,IAAI,CAAC,KAAK,EAAE;AAChB,QAAQ,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC;AAClC;AACA,SAAS,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;AACrC,QAAQ,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC;AACzB;AACA,CAAC;AACD,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,KAAK;AAC7B,IAAI,IAA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EAAE,IAAI;AAChB,IAAA,MAAM,EAAE,IAAI;AACZ,IAAA,WAAW,EAAE,IAAI;AACjB,IAAA,YAAY,EAAE;AACf,CAAA;AAEM,MAAM,aAAa,GAAG,WAAW,CAAkC;AACxE,IAAA,QAAQ,EAAE,EAAE;AACb,CAAA;AAEM,MAAM,UAAU,GAAG,WAAW,CAAwB;AAC3D,IAAA,KAAK,EAAE,EAAE;AACV,CAAA;AAEM,MAAM,SAAS,GAAG,WAAW,CAA4B;AAC9D,IAAA,IAAI,EAAE,IAAI;AACX,CAAA;AAEM,MAAM,iBAAiB,GAAG,WAAW,CAAoC;AAC9E,IAAA,YAAY,EAAE,IAAI;AACnB,CAAA;AAEM,MAAM,2BAA2B,GAAG,WAAW,CAAqD;AACzG,IAAA,sBAAsB,EAAE,IAAI;AAC7B,CAAA;;;;","names":[],"sources":["../../node_modules/@stencil/store/dist/index.js","src/store/store.ts"],"sourcesContent":["import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2_000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst unwrap = (val) => (typeof val === 'function' ? val() : val);\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n const unwrappedState = unwrap(defaultState);\n let states = new Map(Object.entries(unwrappedState ?? {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n // Track onChange listeners to enable removeListener functionality\n const changeListeners = new Map();\n const reset = () => {\n // When resetting the state, the default state may be a function - unwrap it to invoke it.\n // otherwise, the state won't be properly reset\n states = new Map(Object.entries(unwrap(defaultState) ?? {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(unwrappedState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const setHandler = (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n };\n const resetHandler = () => cb(unwrap(defaultState)[propName]);\n // Register the handlers\n const unSet = on('set', setHandler);\n const unReset = on('reset', resetHandler);\n // Track the relationship between the user callback and internal handlers\n changeListeners.set(cb, { setHandler, resetHandler, propName });\n return () => {\n unSet();\n unReset();\n changeListeners.delete(cb);\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n const removeListener = (propName, listener) => {\n const listenerInfo = changeListeners.get(listener);\n if (listenerInfo && listenerInfo.propName === propName) {\n // Remove the specific handlers that were created for this listener\n removeFromArray(handlers.set, listenerInfo.setHandler);\n removeFromArray(handlers.reset, listenerInfo.resetHandler);\n changeListeners.delete(listener);\n }\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n removeListener,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n","import { createStore } from '@stencil/store';\n\nexport const configStore = createStore<ConfigStore>({\n language: 'en',\n theme: 'light',\n businessId: null,\n shopId: null,\n accessToken: null,\n isProduction: false\n});\n\nexport const messagesStore = createStore<{ messages: ChatMessageItem[] }>({\n messages: [],\n});\n\nexport const chatsStore = createStore<{ chats: ChatItem[] }>({\n chats: [],\n});\n\nexport const userStore = createStore<{ user: UserItem | null }>({\n user: null,\n});\n\nexport const selectedChatStore = createStore<{ selectedChat: ChatItem | null }>({\n selectedChat: null,\n});\n\nexport const selectedMessageToReplyStore = createStore<{ selectedMessageToReply: ChatMessageItem | null }>({\n selectedMessageToReply: null,\n});\n"],"version":3}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { h, p as proxyCustomElement, H, a as Host } from './p-CQZRPVaY.js';
|
|
2
|
+
import { d as dayjs } from './p-BZ4TvILZ.js';
|
|
3
|
+
import { c as configStore, s as selectedChatStore, a as chatsStore } from './p-N-wb2wDd.js';
|
|
4
|
+
import { l as leaveRoom, i as initSocket, j as joinRoom } from './p-LCZ_Vyoy.js';
|
|
5
|
+
import { T as TagOrStatusItem } from './p-BtkLsQfZ.js';
|
|
6
|
+
import { h as getChat, i as getChats } from './p-Bf89k6bd.js';
|
|
7
|
+
import { d as defineCustomElement$1 } from './p-ChdOg2lI.js';
|
|
8
|
+
|
|
9
|
+
const ChatItem = ({ item }) => {
|
|
10
|
+
const { id, connection, channel, user, tags, unread_count, last_message, last_message_at, type } = item;
|
|
11
|
+
const platformColor = channel === 'line' ? 'text-green-500' : 'text-blue-500';
|
|
12
|
+
const theme = configStore.get('theme');
|
|
13
|
+
const isSelected = selectedChatStore.get('selectedChat')?.id === id;
|
|
14
|
+
const getLastMessage = () => {
|
|
15
|
+
if (['{image}', '{video}'].includes(last_message)) {
|
|
16
|
+
return (type === 'user' ? user.nickname : 'คุณ') + ' ส่ง' + (last_message === '{image}' ? 'รูปภาพ' : 'วิดีโอ');
|
|
17
|
+
}
|
|
18
|
+
return last_message;
|
|
19
|
+
};
|
|
20
|
+
const handleSelectChatClick = () => {
|
|
21
|
+
const selectedChat = selectedChatStore.get('selectedChat');
|
|
22
|
+
if (selectedChat && selectedChat.id !== item.id) {
|
|
23
|
+
leaveRoom(selectedChat.id);
|
|
24
|
+
}
|
|
25
|
+
selectedChatStore.set('selectedChat', item);
|
|
26
|
+
};
|
|
27
|
+
return (h("div", { class: `relative ${isSelected ? 'bg-pink-100' : `z-background-${theme}`} px-4 py-3 my-1 mx-2 flex items-start space-x-4 shadow-sm cursor-pointer rounded-xl`, onClick: () => handleSelectChatClick() },
|
|
28
|
+
h("div", { class: "grid grid-flow-row-dense grid-cols-7 grid-rows-1 min-h-20 w-full" },
|
|
29
|
+
h("div", { class: "col-span-2 my-auto mr-1" },
|
|
30
|
+
h("img", { src: user.picture_url, alt: "avatar", class: "size-16 rounded-full object-cover" })),
|
|
31
|
+
h("div", { class: "col-span-4" },
|
|
32
|
+
h("div", { class: "flex items-center space-x-1" },
|
|
33
|
+
h("img", { src: `https://zwizai-platform.s3.ap-southeast-1.amazonaws.com/zignal-package/${channel}.png`, alt: "agent avatar", class: "size-4 rounded-full" }),
|
|
34
|
+
h("span", { class: `text-sm ${platformColor}` }, connection.name)),
|
|
35
|
+
h("div", { class: `font-semibold text-base ${isSelected ? 'text-black' : `z-text-${theme}`}` }, user.name),
|
|
36
|
+
h("div", { class: "text-sm text-gray-600" }, getLastMessage()),
|
|
37
|
+
h("div", { class: "flex flex-row gap-1 items-center flex-wrap" },
|
|
38
|
+
tags.slice(0, 2).map((tag) => h(TagOrStatusItem, { item: tag })),
|
|
39
|
+
tags.length > 2 &&
|
|
40
|
+
h("div", { class: "inline-block" },
|
|
41
|
+
h("tag-popper", { tags: tags })))),
|
|
42
|
+
h("div", { class: "col-span-1 text-right flex flex-col justify-between" },
|
|
43
|
+
h("div", { class: "text-xs text-gray-500" }, dayjs(last_message_at).isValid() ? dayjs(last_message_at).format('HH:mm') : ''),
|
|
44
|
+
unread_count > 0 &&
|
|
45
|
+
h("div", null,
|
|
46
|
+
h("span", { class: "text-xs bg-primary text-white px-2 py-0.5 rounded-full" }, unread_count > 1000 ? '999+' : unread_count)),
|
|
47
|
+
h("div", { class: "mt-auto ml-auto" },
|
|
48
|
+
h("img", { src: `https://zwizai-platform.s3.ap-southeast-1.amazonaws.com/zignal-package/nong-z.png`, alt: "agent avatar", class: "size-5 rounded-full" }))))));
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
const channelBoxCss = "/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer theme{:host,:root{--color-red-500:oklch(63.7% .237 25.331);--color-gray-600:oklch(44.6% .03 256.802);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--color-green-500:oklch(72.3% .219 149.579);--color-blue-500:oklch(62.3% .214 259.815);--color-pink-100:oklch(94.8% .028 342.258);--container-lg:32rem;--text-lg:1.125rem;--text-lg--line-height:1.55556;--font-weight-bold:700;--radius-lg:.5rem;--color-yellow-300:oklch(90.5% .182 98.111);--text-xs:.75rem;--text-xs--line-height:1.33333;--text-sm:.875rem;--text-sm--line-height:1.42857;--text-base:1rem;--text-base--line-height:1.5;--font-weight-semibold:600;--container-xl:36rem;--radius-xl:.75rem;--font-weight-medium:500;--radius-md:.375rem;--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-700:oklch(37.3% .034 259.733);--color-black:#000;--color-white:#fff;--spacing:.25rem;--default-font-family:\"Kanit\",var(--default-font);--default-mono-font-family:var(--font-mono);--default-font:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--color-primary:#e02848;--color-secondary:#023761;--color-background:#fff;--color-primary-dark:#b50f30;--color-secondary-dark:#fff;--color-background-dark:#23292d}}@layer base{*,::backdrop,:after,:before{--tw-space-y-reverse:0;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-drop-shadow-alpha:100%;--tw-shadow:0 0 #0000;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-alpha:100%;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-offset-width:0;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;border:0 solid;box-sizing:border-box;margin:0;padding:0}::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);tab-size:4;-webkit-tap-highlight-color:transparent;line-height:1.5}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:currentColor;color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field{padding-block:0;padding-bottom:0;padding-top:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-month-field{padding-block:0;padding-bottom:0;padding-top:0}::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field{padding-block:0;padding-bottom:0;padding-top:0}::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-second-field{padding-block:0;padding-bottom:0;padding-top:0}::-webkit-datetime-edit-meridiem-field{padding-block:0;padding-bottom:0;padding-top:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}[multiple],[type=date],[type=datetime-local],[type=email],[type=month],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=time],[type=url],[type=week],input:where(:not([type])),select,textarea{appearance:none;--tw-shadow:0 0 #0000;background-color:#fff;border-color:oklch(55.1% .027 264.364);border-radius:0;border-width:1px;font-size:1rem;line-height:1.5rem;padding:.5rem .75rem}:is([type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select):focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:oklch(54.6% .245 262.881);--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color);border-color:oklch(54.6% .245 262.881);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid #0000}input::placeholder,textarea::placeholder{color:oklch(55.1% .027 264.364);opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}select{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='oklch(55.1%25 0.027 264.364)' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E\");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;print-color-adjust:exact}[multiple],[size]:where(select:not([size=\"1\"])){background-image:none;background-position:0 0;background-repeat:unset;background-size:initial;padding-right:.75rem;print-color-adjust:unset}[type=checkbox],[type=radio]{appearance:none;color:oklch(54.6% .245 262.881);print-color-adjust:exact;-webkit-user-select:none;user-select:none;vertical-align:middle;--tw-shadow:0 0 #0000;background-color:#fff;background-origin:border-box;border-color:oklch(55.1% .027 264.364);border-width:1px;display:inline-block;flex-shrink:0;height:1rem;padding:0;width:1rem}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:oklch(54.6% .245 262.881);--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid #0000}[type=checkbox]:checked,[type=radio]:checked{background-color:currentColor;background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}[type=checkbox]:checked{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 16 16'%3E%3Cpath d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0'/%3E%3C/svg%3E\")}[type=radio]:checked{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E\")}[type=checkbox]:checked:focus,[type=checkbox]:checked:hover,[type=radio]:checked:focus,[type=radio]:checked:hover{background-color:currentColor;border-color:#0000}[type=checkbox]:indeterminate{background-color:currentColor;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3E%3C/svg%3E\");background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}[type=checkbox]:indeterminate:focus,[type=checkbox]:indeterminate:hover{background-color:currentColor;border-color:#0000}[type=file]{background:unset;border-color:inherit;border-radius:0;border-width:0;font-size:unset;line-height:inherit;padding:0}[type=file]:focus{outline:1px solid buttontext;outline:1px auto -webkit-focus-ring-color}}@layer components;@layer utilities{.flex{display:flex}.flex-col{flex-direction:column}.overflow-y-auto{overflow-y:auto}.scroll-smooth{scroll-behavior:smooth}.py-1{padding-block:calc(var(--spacing)*1)}}.scroll-container::-webkit-scrollbar{background:0 0;height:8px;width:8px}.scroll-container:active::-webkit-scrollbar,.scroll-container:hover::-webkit-scrollbar{background:#0000001a}.scroll-container:active::-webkit-scrollbar-thumb,.scroll-container:hover::-webkit-scrollbar-thumb{background:#0006;border-radius:4px}.z-text-light{color:var(--color-black)}.z-text-dark{color:var(--color-white)}.z-text-primary-light{color:var(--color-primary)}.z-text-primary-dark{color:var(--color-primary-dark)}.z-text-gray-light{color:var(--color-gray-500)}.z-text-gray-dark{color:var(--color-gray-300)}.z-border-light{border-color:var(--color-black)}.z-border-dark{border-color:var(--color-white)}.z-border-primary-light{border-color:var(--color-primary)}.z-border-primary-dark{border-color:var(--color-primary-dark)}.z-border-divider-light{border-color:var(--color-gray-400)}.z-border-divider-dark{border-color:var(--color-gray-300)}.z-search-input-background-light{background-color:var(--color-gray-200)}.z-search-input-background-dark{background-color:var(--color-gray-500)}.z-chat-input-background-light{background-color:var(--color-white)}.z-chat-input-background-dark{background-color:var(--color-gray-700)}.z-placeholder-light::placeholder{color:var(--color-gray-500)}.z-placeholder-dark::placeholder{color:var(--color-gray-200)}.z-background-light{background-color:var(--color-background)}.z-background-dark{background-color:var(--color-background-dark)}.z-paper-light{background-color:var(--color-gray-100)}.z-paper-dark{background-color:var(--color-gray-700)}.z-width-100{width:100%}.z-width-75{width:75%}.z-width-50{width:50%}.z-width-25{width:25%}.z-width-0{width:0}/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-ring-offset-width:0px;--tw-space-y-reverse:0;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}@layer base{}@layer components;@layer utilities{.absolute{position:absolute}.relative{position:relative}.z-50{z-index:50}.mt-1{margin-top:calc(var(--spacing)*1)}.w-52{width:calc(var(--spacing)*52)}.flex-wrap{flex-wrap:wrap}.gap-2{gap:calc(var(--spacing)*2)}.rounded-md{border-radius:var(--radius-md)}.p-4{padding:calc(var(--spacing)*4)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.top-0{top:calc(var(--spacing)*0)}.right-0{right:calc(var(--spacing)*0)}.col-span-1{grid-column:span 1/span 1}.col-span-2{grid-column:span 2/span 2}.col-span-4{grid-column:span 4/span 4}.mx-2{margin-inline:calc(var(--spacing)*2)}.my-1{margin-block:calc(var(--spacing)*1)}.my-auto{margin-block:auto}.mt-auto{margin-top:auto}.mr-0{margin-right:calc(var(--spacing)*0)}.mr-1{margin-right:calc(var(--spacing)*1)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-4{margin-bottom:calc(var(--spacing)*4)}.ml-auto{margin-left:auto}.block{display:block}.grid{display:grid}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.size-3{height:calc(var(--spacing)*3);width:calc(var(--spacing)*3)}.size-4{height:calc(var(--spacing)*4);width:calc(var(--spacing)*4)}.size-5{height:calc(var(--spacing)*5);width:calc(var(--spacing)*5)}.size-16{height:calc(var(--spacing)*16);width:calc(var(--spacing)*16)}.h-0{height:calc(var(--spacing)*0)}.h-5{height:calc(var(--spacing)*5)}.min-h-20{min-height:calc(var(--spacing)*20)}.w-0{width:calc(var(--spacing)*0)}.w-5{width:calc(var(--spacing)*5)}.w-full{width:100%}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.grid-flow-row-dense{grid-auto-flow:dense}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.grid-rows-1{grid-template-rows:repeat(1,minmax(0,1fr))}.flex-row{flex-direction:row}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing)*1)}}/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;@layer utilities{:where(.space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-end:calc(var(--spacing)*1*(1 - var(--tw-space-x-reverse)));margin-inline-start:calc(var(--spacing)*1*var(--tw-space-x-reverse))}:where(.space-x-4>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-end:calc(var(--spacing)*4*(1 - var(--tw-space-x-reverse)));margin-inline-start:calc(var(--spacing)*4*var(--tw-space-x-reverse))}.rounded-full{border-radius:3.40282e+38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-t-\\[14px\\]{border-top-style:var(--tw-border-style);border-top-width:14px}.border-l-\\[14px\\]{border-left-style:var(--tw-border-style);border-left-width:14px}.border-primary{border-color:var(--color-primary)}.border-t-red-500{border-top-color:var(--color-red-500)}.border-l-transparent{border-left-color:#0000}.bg-pink-100{background-color:var(--color-pink-100)}.bg-primary{background-color:var(--color-primary)}.object-cover{object-fit:cover}.px-2{padding-inline:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.text-right{text-align:right}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-nowrap{text-wrap:nowrap}.text-black{color:var(--color-black)}.text-blue-500{color:var(--color-blue-500)}.text-gray-500{color:var(--color-gray-500)}.text-gray-600{color:var(--color-gray-600)}.text-green-500{color:var(--color-green-500)}.text-primary{color:var(--color-primary)}.text-red-500{color:var(--color-red-500)}.text-white{color:var(--color-white)}.opacity-50{opacity:.5}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-primary{--tw-ring-color:var(--color-primary)}.transition{transition-duration:var(--tw-duration,var(--default-transition-duration));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,visibility,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function))}.focus\\:border-primary:focus{border-color:var(--color-primary)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.top-1{top:calc(var(--spacing)*1)}.right-1{right:calc(var(--spacing)*1)}.z-\\[99\\]{z-index:99}.min-w-\\[280px\\]{min-width:280px}.flex-1{flex:1}.overflow-x-hidden{overflow-x:hidden}.text-\\[10px\\]{font-size:10px}.text-\\[gray\\]{color:gray}.opacity-10{opacity:.1}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.size-8{height:calc(var(--spacing)*8);width:calc(var(--spacing)*8)}.h-4{height:calc(var(--spacing)*4)}.h-\\[60px\\]{height:60px}.w-4{width:calc(var(--spacing)*4)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-auto{margin-bottom:auto}.ml-2{margin-left:calc(var(--spacing)*2)}.border-none{--tw-border-style:none;border-style:none}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.mt-6{margin-top:calc(var(--spacing)*6)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.max-h-\\[80vh\\]{max-height:80vh}.w-xl{width:var(--container-xl)}}/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;@layer utilities{}/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;@layer utilities{}/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;@layer utilities{}/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;@layer utilities{:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-end:calc(var(--spacing)*2*(1 - var(--tw-space-y-reverse)));margin-block-start:calc(var(--spacing)*2*var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.p-6{padding:calc(var(--spacing)*6)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.top-0\\.5{top:calc(var(--spacing)*.5)}.right-0\\.5{right:calc(var(--spacing)*.5)}.m-auto{margin:auto}.w-lg{width:var(--container-lg)}.object-contain{object-fit:contain}.pt-8{padding-top:calc(var(--spacing)*8)}.mx-auto{margin-inline:auto}.mb-10{margin-bottom:calc(var(--spacing)*10)}.h-18{height:calc(var(--spacing)*18)}.w-18{width:calc(var(--spacing)*18)}.place-content-center{place-content:center}.text-center{text-align:center}.text-gray-400{color:var(--color-gray-400)}.bottom-\\[40px\\]{bottom:40px}.left-0{left:calc(var(--spacing)*0)}.mt-2{margin-top:calc(var(--spacing)*2)}.w-32{width:calc(var(--spacing)*32)}.fixed{position:fixed}.inset-0{inset:calc(var(--spacing)*0)}.size-42{height:calc(var(--spacing)*42);width:calc(var(--spacing)*42)}.rounded-br-\\[0\\]{border-bottom-right-radius:0}.rounded-bl-\\[0\\]{border-bottom-left-radius:0}.bg-black\\/40{background-color:#0006}}/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;@layer utilities{}/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;@layer utilities{}/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;@layer utilities{}/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;@layer utilities{@supports (color:color-mix(in lab,red,red)){.bg-black\\/40{background-color:color-mix(in srgb,#00040%,transparent);background-color:color-mix(in oklab,var(--color-black)40%,transparent)}}.bg-gray-200{background-color:var(--color-gray-200)}.p-2{padding:calc(var(--spacing)*2)}.pt-2{padding-top:calc(var(--spacing)*2)}.pb-5{padding-bottom:calc(var(--spacing)*5)}.right-full{right:100%}.-bottom-2{bottom:calc(var(--spacing)*-2)}.left-full{left:100%}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mr-2{margin-right:calc(var(--spacing)*2)}.mb-\\[-0\\.75rem\\]{margin-bottom:-.75rem}.h-6{height:calc(var(--spacing)*6)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.bg-yellow-300{background-color:var(--color-yellow-300)}.text-left{text-align:left}.col-span-3{grid-column:span 3/span 3}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.items-baseline-last{align-items:last baseline}.gap-y-1{row-gap:calc(var(--spacing)*1)}.border-b-\\[0\\.5px\\]{border-bottom-style:var(--tw-border-style);border-bottom-width:.5px}.pt-0{padding-top:calc(var(--spacing)*0)}.whitespace-pre-line{white-space:pre-line}.capitalize{text-transform:capitalize}.top-1\\/2{top:50%}.right-1\\.25{right:calc(var(--spacing)*1.25)}.max-w-xl{max-width:var(--container-xl)}.-translate-y-1\\/2{--tw-translate-y:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.p-1\\.5{padding:calc(var(--spacing)*1.5)}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.hidden{display:none}}/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;@layer utilities{}/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;@layer utilities{} /*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities;/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;@layer utilities{}/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;@layer utilities{:where(.space-x-8>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-end:calc(var(--spacing)*8*(1 - var(--tw-space-x-reverse)));margin-inline-start:calc(var(--spacing)*8*var(--tw-space-x-reverse))}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-transparent{border-color:#0000}.py-4{padding-block:calc(var(--spacing)*4)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}}/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;@layer utilities{}@property --tw-space-y-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-x{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\"*\";inherits:false;initial-value:0}@property --tw-space-x-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:\"*\";inherits:false}@property --tw-blur{syntax:\"*\";inherits:false}@property --tw-brightness{syntax:\"*\";inherits:false}@property --tw-contrast{syntax:\"*\";inherits:false}@property --tw-grayscale{syntax:\"*\";inherits:false}@property --tw-hue-rotate{syntax:\"*\";inherits:false}@property --tw-invert{syntax:\"*\";inherits:false}@property --tw-opacity{syntax:\"*\";inherits:false}@property --tw-saturate{syntax:\"*\";inherits:false}@property --tw-sepia{syntax:\"*\";inherits:false}@property --tw-drop-shadow{syntax:\"*\";inherits:false}@property --tw-drop-shadow-color{syntax:\"*\";inherits:false}@property --tw-drop-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:\"*\";inherits:false}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}:host{display:block}@media (forced-colors:active){[type=checkbox]:checked,[type=radio]:checked{appearance:auto}[type=checkbox]:indeterminate{appearance:auto}[type=checkbox]:checked,[type=checkbox]:indeterminate,[type=radio]:checked{appearance:auto}}@media screen and (min-width:0){.z-max-height{height:calc(100vh - 56px)}}@media screen and (min-width:600px){.z-max-height{height:calc(100vh - 64px)}}@media (hover:hover){.hover\\:brightness-110:hover{--tw-brightness:brightness(110%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.hover\\:opacity-100:hover{opacity:1}}";
|
|
52
|
+
|
|
53
|
+
const ChannelBox = /*@__PURE__*/ proxyCustomElement(class ChannelBox extends H {
|
|
54
|
+
constructor() {
|
|
55
|
+
super();
|
|
56
|
+
this.__registerHost();
|
|
57
|
+
}
|
|
58
|
+
nextKey;
|
|
59
|
+
hasMore = true;
|
|
60
|
+
pageLimit = 12;
|
|
61
|
+
containerRef;
|
|
62
|
+
async handleGetChat(sessionId) {
|
|
63
|
+
try {
|
|
64
|
+
const { chat } = await getChat({ sessionId });
|
|
65
|
+
let _chats = structuredClone(chatsStore.get('chats'));
|
|
66
|
+
const existChatIndex = _chats.findIndex((item) => item.id === sessionId);
|
|
67
|
+
if (existChatIndex !== -1 && _chats[existChatIndex].last_message_at === chat.last_message_at) {
|
|
68
|
+
_chats[existChatIndex] = chat;
|
|
69
|
+
chatsStore.set('chats', _chats);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
if (existChatIndex !== -1) {
|
|
73
|
+
_chats = _chats.filter((_, index) => index !== existChatIndex);
|
|
74
|
+
_chats.unshift(chat);
|
|
75
|
+
chatsStore.set('chats', _chats);
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
_chats.unshift(chat);
|
|
79
|
+
chatsStore.set('chats', _chats);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
catch (error) {
|
|
83
|
+
console.error('Failed to load Chat', error);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
async componentWillLoad() {
|
|
87
|
+
await this.loadChats();
|
|
88
|
+
const socket = initSocket();
|
|
89
|
+
const shopId = configStore.get('shopId');
|
|
90
|
+
joinRoom(shopId);
|
|
91
|
+
socket.on('chat', ({ sessionId }) => {
|
|
92
|
+
this.handleGetChat(sessionId);
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
async loadChats() {
|
|
96
|
+
if (!this.hasMore)
|
|
97
|
+
return;
|
|
98
|
+
try {
|
|
99
|
+
const { chats, next } = await getChats({ limit: this.pageLimit, start: this.nextKey });
|
|
100
|
+
chatsStore.set('chats', [
|
|
101
|
+
...chatsStore.get('chats'),
|
|
102
|
+
...chats
|
|
103
|
+
]);
|
|
104
|
+
this.hasMore = !!next;
|
|
105
|
+
this.nextKey = next;
|
|
106
|
+
}
|
|
107
|
+
catch (error) {
|
|
108
|
+
console.error('Failed to load Chats', error);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
handleScroll = () => {
|
|
112
|
+
const el = this.containerRef;
|
|
113
|
+
if (!el)
|
|
114
|
+
return;
|
|
115
|
+
const threshold = 100;
|
|
116
|
+
if (el.scrollHeight - el.scrollTop - el.clientHeight < threshold) {
|
|
117
|
+
this.loadChats();
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
render() {
|
|
121
|
+
const chats = chatsStore.get('chats');
|
|
122
|
+
const theme = configStore.get('theme');
|
|
123
|
+
return (h(Host, { key: '529976e7d05518b9e9111db86ff4ad6703bd72d1' }, h("slot", { key: '6a7759c0fb93a65f1a0b5965ab5266626dd3956f' }, h("div", { key: 'c1f5295e6a016197d761d7437b42eda437455da4', class: `flex flex-col py-1 overflow-y-auto scroll-smooth scroll-container z-paper-${theme}`, ref: el => (this.containerRef = el), onScroll: this.handleScroll }, chats.map((item) => h(ChatItem, { item: item }))))));
|
|
124
|
+
}
|
|
125
|
+
static get style() { return channelBoxCss; }
|
|
126
|
+
}, [260, "channel-box", {
|
|
127
|
+
"nextKey": [32],
|
|
128
|
+
"hasMore": [32],
|
|
129
|
+
"pageLimit": [32]
|
|
130
|
+
}]);
|
|
131
|
+
function defineCustomElement() {
|
|
132
|
+
if (typeof customElements === "undefined") {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
const components = ["channel-box", "tag-popper"];
|
|
136
|
+
components.forEach(tagName => { switch (tagName) {
|
|
137
|
+
case "channel-box":
|
|
138
|
+
if (!customElements.get(tagName)) {
|
|
139
|
+
customElements.define(tagName, ChannelBox);
|
|
140
|
+
}
|
|
141
|
+
break;
|
|
142
|
+
case "tag-popper":
|
|
143
|
+
if (!customElements.get(tagName)) {
|
|
144
|
+
defineCustomElement$1();
|
|
145
|
+
}
|
|
146
|
+
break;
|
|
147
|
+
} });
|
|
148
|
+
}
|
|
149
|
+
defineCustomElement();
|
|
150
|
+
|
|
151
|
+
export { ChannelBox as C, defineCustomElement as d };
|
|
152
|
+
//# sourceMappingURL=p-Urxy5c9-.js.map
|
|
153
|
+
|
|
154
|
+
//# sourceMappingURL=p-Urxy5c9-.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-Urxy5c9-.js","mappings":";;;;;;;;AAUO,MAAM,QAAQ,GAAuC,CAAC,EAAE,IAAI,EAAE,KAAI;IACvE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,IAAI,EAAE,GAAG,IAAI;AACvG,IAAA,MAAM,aAAa,GAAG,OAAO,KAAK,MAAM,GAAG,gBAAgB,GAAG,eAAe;IAC7E,MAAM,KAAK,GAAG,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC;AACtC,IAAA,MAAM,UAAU,GAAG,iBAAiB,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,EAAE,KAAK,EAAE;IAEnE,MAAM,cAAc,GAAG,MAAK;QAC1B,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE;AACjD,YAAA,OAAO,CAAC,IAAI,KAAK,MAAM,GAAG,IAAI,CAAC,QAAQ,GAAG,KAAK,IAAI,MAAM,IAAI,YAAY,KAAK,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAC;;AAGhH,QAAA,OAAO,YAAY;AACrB,KAAC;IAED,MAAM,qBAAqB,GAAG,MAAK;QACjC,MAAM,YAAY,GAAG,iBAAiB,CAAC,GAAG,CAAC,cAAc,CAAC;QAC1D,IAAI,YAAY,IAAI,YAAY,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,EAAE;AAC/C,YAAA,SAAS,CAAC,YAAY,CAAC,EAAE,CAAC;;AAG5B,QAAA,iBAAiB,CAAC,G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EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACE,CACE,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAE,CAA6E,0EAAA,EAAA,KAAK,EAAE,EAC3F,GAAG,EAAE,EAAE,KAAK,IAAI,CAAC,YAAY,GAAG,EAAE,CAAC,EACnC,QAAQ,EAAE,IAAI,CAAC,YAAY,EAAA,EAE1B,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,KAAK,CAAA,CAAC,QAAQ,EAAC,EAAA,IAAI,EAAE,IAAI,EAAA,CAAI,CAAC,CAC1C,CACD,CACF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/internal-component/chat-item.tsx","src/components/channel-box/channel-box.css?tag=channel-box","src/components/channel-box/channel-box.tsx"],"sourcesContent":["import { FunctionalComponent, h } from '@stencil/core';\nimport dayjs from 'dayjs';\nimport { configStore, selectedChatStore } from '../../store/store';\nimport { leaveRoom } from '../../utils/socket';\nimport { TagOrStatusItem } from './tag-or-status-item';\n\ninterface ChatItemProps {\n item: ChatItem;\n}\n\nexport const ChatItem: FunctionalComponent<ChatItemProps> = ({ item }) => {\n const { id, connection, channel, user, tags, unread_count, last_message, last_message_at, type } = item;\n const platformColor = channel === 'line' ? 'text-green-500' : 'text-blue-500';\n const theme = configStore.get('theme');\n const isSelected = selectedChatStore.get('selectedChat')?.id === id;\n\n const getLastMessage = () => {\n if (['{image}', '{video}'].includes(last_message)) {\n return (type === 'user' ? user.nickname : 'คุณ') + ' ส่ง' + (last_message === '{image}' ? 'รูปภาพ' : 'วิดีโอ');\n }\n\n return last_message;\n }\n\n const handleSelectChatClick = () => {\n const selectedChat = selectedChatStore.get('selectedChat');\n if (selectedChat && selectedChat.id !== item.id) {\n leaveRoom(selectedChat.id);\n }\n\n selectedChatStore.set('selectedChat', item);\n }\n\n return (\n <div\n class={`relative ${isSelected ? 'bg-pink-100' : `z-background-${theme}`} px-4 py-3 my-1 mx-2 flex items-start space-x-4 shadow-sm cursor-pointer rounded-xl`}\n onClick={() => handleSelectChatClick()}\n >\n {/* {isPinned && (\n <div class=\"absolute top-0 right-0 w-0 h-0 mr-0 border-t-[14px] border-l-[14px] border-t-red-500 border-l-transparent\" />\n )} */}\n\n <div class=\"grid grid-flow-row-dense grid-cols-7 grid-rows-1 min-h-20 w-full\">\n <div class=\"col-span-2 my-auto mr-1\">\n <img\n src={user.picture_url}\n alt=\"avatar\"\n class=\"size-16 rounded-full object-cover\"\n />\n </div>\n <div class=\"col-span-4\">\n <div class=\"flex items-center space-x-1\">\n <img\n src={`https://zwizai-platform.s3.ap-southeast-1.amazonaws.com/zignal-package/${channel}.png`}\n alt=\"agent avatar\"\n class=\"size-4 rounded-full\"\n />\n <span class={`text-sm ${platformColor}`}>\n {connection.name}\n </span>\n </div>\n <div class={`font-semibold text-base ${isSelected ? 'text-black' : `z-text-${theme}`}`}>\n {user.name}\n </div>\n <div class=\"text-sm text-gray-600\">\n {getLastMessage()}\n </div>\n <div class=\"flex flex-row gap-1 items-center flex-wrap\">\n {tags.slice(0, 2).map((tag) => <TagOrStatusItem item={tag} />)}\n {tags.length > 2 &&\n <div class=\"inline-block\">\n <tag-popper tags={tags} />\n </div>\n }\n </div>\n </div>\n <div class=\"col-span-1 text-right flex flex-col justify-between\">\n <div class=\"text-xs text-gray-500\">\n {dayjs(last_message_at).isValid() ? dayjs(last_message_at).format('HH:mm') : ''}\n </div>\n {unread_count > 0 &&\n <div>\n <span class=\"text-xs bg-primary text-white px-2 py-0.5 rounded-full\">\n {unread_count > 1000 ? '999+' : unread_count}\n </span>\n </div>\n }\n <div class=\"mt-auto ml-auto\">\n <img\n src={`https://zwizai-platform.s3.ap-southeast-1.amazonaws.com/zignal-package/nong-z.png`}\n alt=\"agent avatar\"\n class=\"size-5 rounded-full\"\n />\n </div>\n </div>\n </div>\n </div>\n );\n};\n",":host {\n display: block;\n}\n","import { Component, Host, State, h } from '@stencil/core';\nimport { ChatItem } from '../internal-component/chat-item';\nimport { configStore, chatsStore } from '../../store/store';\nimport { getChat, getChats } from '../../api';\nimport { initSocket, joinRoom } from '../../utils/socket';\n\n@Component({\n tag: 'channel-box',\n styleUrl: 'channel-box.css',\n})\nexport class ChannelBox {\n @State() nextKey?: string;\n @State() hasMore = true;\n @State() pageLimit = 12;\n private containerRef: HTMLDivElement;\n\n private async handleGetChat(sessionId: string) {\n try {\n const { chat } = await getChat({ sessionId });\n let _chats = structuredClone(chatsStore.get('chats'));\n const existChatIndex = _chats.findIndex((item) => item.id === sessionId);\n\n if (existChatIndex !== -1 && _chats[existChatIndex].last_message_at === chat.last_message_at) {\n _chats[existChatIndex] = chat\n chatsStore.set('chats', _chats);\n return;\n }\n\n if (existChatIndex !== -1) {\n _chats = _chats.filter((_, index) => index !== existChatIndex)\n _chats.unshift(chat);\n chatsStore.set('chats', _chats);\n return;\n }\n\n _chats.unshift(chat);\n chatsStore.set('chats', _chats);\n return;\n } catch (error) {\n console.error('Failed to load Chat', error);\n }\n }\n\n async componentWillLoad() {\n await this.loadChats();\n\n const socket = initSocket();\n\n const shopId = configStore.get('shopId');\n joinRoom(shopId);\n\n socket.on('chat', ({ sessionId }: { sessionId: string }) => {\n this.handleGetChat(sessionId)\n });\n }\n\n private async loadChats() {\n if (!this.hasMore) return;\n\n try {\n const { chats, next } = await getChats({ limit: this.pageLimit, start: this.nextKey });\n chatsStore.set('chats', [\n ...chatsStore.get('chats'),\n ...chats\n ]);\n this.hasMore = !!next;\n this.nextKey = next;\n } catch (error) {\n console.error('Failed to load Chats', error);\n }\n }\n\n private handleScroll = () => {\n const el = this.containerRef;\n if (!el) return;\n\n const threshold = 100;\n if (el.scrollHeight - el.scrollTop - el.clientHeight < threshold) {\n this.loadChats();\n }\n };\n\n render() {\n const chats = chatsStore.get('chats');\n const theme = configStore.get('theme');\n\n return (\n <Host>\n <slot>\n <div\n class={`flex flex-col py-1 overflow-y-auto scroll-smooth scroll-container z-paper-${theme}`}\n ref={el => (this.containerRef = el)}\n onScroll={this.handleScroll}\n >\n {chats.map((item) => <ChatItem item={item} />)}\n </div>\n </slot>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { p as proxyCustomElement, H, h, a as Host } from './p-CQZRPVaY.js';
|
|
2
|
+
|
|
3
|
+
const profileHistoryCss = "@layer base{*,::backdrop,:after,:before{--tw-space-y-reverse:0;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-shadow:0 0 #0000;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-alpha:100%;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-offset-width:0;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-drop-shadow-alpha:100%;border:0 solid;box-sizing:border-box;margin:0;padding:0}}/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-ring-offset-width:0px;--tw-space-y-reverse:0;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-space-x-reverse:0;--tw-border-style:solid;--tw-font-weight:initial;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial}}}@layer theme{:host,:root{--color-green-500:oklch(72.3% .219 149.579);--color-blue-500:oklch(62.3% .214 259.815);--color-pink-100:oklch(94.8% .028 342.258);--container-lg:32rem;--text-lg:1.125rem;--text-lg--line-height:1.55556;--font-weight-bold:700;--radius-lg:.5rem;--color-yellow-300:oklch(90.5% .182 98.111);--text-xs:.75rem;--text-xs--line-height:1.33333;--text-sm:.875rem;--text-sm--line-height:1.42857;--text-base:1rem;--text-base--line-height:1.5;--font-weight-semibold:600;--container-xl:36rem;--radius-xl:.75rem;--radius-md:.375rem;--spacing:.25rem;--font-weight-medium:500;--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace;--color-gray-100:oklch(96.7% .003 264.542);--color-gray-200:oklch(92.8% .006 264.531);--color-gray-300:oklch(87.2% .01 258.338);--color-gray-400:oklch(70.7% .022 261.325);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-700:oklch(37.3% .034 259.733);--color-black:#000;--color-white:#fff;--default-font-family:\"Kanit\",var(--default-font);--default-mono-font-family:var(--font-mono);--default-font:ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\";--color-primary:#e02848;--color-secondary:#023761;--color-background:#fff;--color-primary-dark:#b50f30;--color-secondary-dark:#fff;--color-background-dark:#23292d}}@layer base{::file-selector-button{appearance:button;background-color:#0000;border:0 solid;border-radius:0;box-sizing:border-box;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;margin:0;margin-inline-end:4px;opacity:1;padding:0}:host,html{-webkit-text-size-adjust:100%;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\",\"Segoe UI Symbol\",\"Noto Color Emoji\");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);tab-size:4;-webkit-tap-highlight-color:transparent;line-height:1.5}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-size:1em;font-variation-settings:var(--default-mono-font-variation-settings,normal)}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}button,input,optgroup,select,textarea{background-color:#0000;border-radius:0;color:inherit;font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;opacity:1}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:currentColor;color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field{padding-block:0;padding-bottom:0;padding-top:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-month-field{padding-block:0;padding-bottom:0;padding-top:0}::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field{padding-block:0;padding-bottom:0;padding-top:0}::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-second-field{padding-block:0;padding-bottom:0;padding-top:0}::-webkit-datetime-edit-meridiem-field{padding-block:0;padding-bottom:0;padding-top:0}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}[multiple],[type=date],[type=datetime-local],[type=email],[type=month],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=time],[type=url],[type=week],input:where(:not([type])),select,textarea{appearance:none;--tw-shadow:0 0 #0000;background-color:#fff;border-color:oklch(55.1% .027 264.364);border-radius:0;border-width:1px;font-size:1rem;line-height:1.5rem;padding:.5rem .75rem}:is([type=text],input:where(:not([type])),[type=email],[type=url],[type=password],[type=number],[type=date],[type=datetime-local],[type=month],[type=search],[type=tel],[type=time],[type=week],[multiple],textarea,select):focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:oklch(54.6% .245 262.881);--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(1px + var(--tw-ring-offset-width))var(--tw-ring-color);border-color:oklch(54.6% .245 262.881);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid #0000}input::placeholder,textarea::placeholder{color:oklch(55.1% .027 264.364);opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}select{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='oklch(55.1%25 0.027 264.364)' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E\");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;print-color-adjust:exact}[multiple],[size]:where(select:not([size=\"1\"])){background-image:none;background-position:0 0;background-repeat:unset;background-size:initial;padding-right:.75rem;print-color-adjust:unset}[type=checkbox],[type=radio]{appearance:none;color:oklch(54.6% .245 262.881);print-color-adjust:exact;-webkit-user-select:none;user-select:none;vertical-align:middle;--tw-shadow:0 0 #0000;background-color:#fff;background-origin:border-box;border-color:oklch(55.1% .027 264.364);border-width:1px;display:inline-block;flex-shrink:0;height:1rem;padding:0;width:1rem}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline-offset:2px;--tw-ring-inset:var(--tw-empty, );--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:oklch(54.6% .245 262.881);--tw-ring-offset-shadow:var(--tw-ring-inset)0 0 0 var(--tw-ring-offset-width)var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset)0 0 0 calc(2px + var(--tw-ring-offset-width))var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);outline:2px solid #0000}[type=checkbox]:checked,[type=radio]:checked{background-color:currentColor;background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}[type=checkbox]:checked{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 16 16'%3E%3Cpath d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0'/%3E%3C/svg%3E\")}[type=radio]:checked{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E\")}[type=checkbox]:checked:focus,[type=checkbox]:checked:hover,[type=radio]:checked:focus,[type=radio]:checked:hover{background-color:currentColor;border-color:#0000}[type=checkbox]:indeterminate{background-color:currentColor;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3E%3C/svg%3E\");background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:#0000}[type=checkbox]:indeterminate:focus,[type=checkbox]:indeterminate:hover{background-color:currentColor;border-color:#0000}[type=file]{background:unset;border-color:inherit;border-radius:0;border-width:0;font-size:unset;line-height:inherit;padding:0}[type=file]:focus{outline:1px solid buttontext;outline:1px auto -webkit-focus-ring-color}}@layer components;@layer utilities{.absolute{position:absolute}.relative{position:relative}.top-1{top:calc(var(--spacing)*1)}.right-1{right:calc(var(--spacing)*1)}.z-\\[99\\]{z-index:99}.flex{display:flex}.w-full{width:100%}.min-w-\\[280px\\]{min-width:280px}.flex-1{flex:1}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.scroll-smooth{scroll-behavior:smooth}.text-\\[10px\\]{font-size:10px}.text-\\[gray\\]{color:gray}.opacity-10{opacity:.1}.shadow-md{--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,#0000001a),0 2px 4px -2px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.scroll-container::-webkit-scrollbar{background:0 0;height:8px;width:8px}.scroll-container:active::-webkit-scrollbar,.scroll-container:hover::-webkit-scrollbar{background:#0000001a}.scroll-container:active::-webkit-scrollbar-thumb,.scroll-container:hover::-webkit-scrollbar-thumb{background:#0006;border-radius:4px}.z-text-light{color:var(--color-black)}.z-text-dark{color:var(--color-white)}.z-text-primary-light{color:var(--color-primary)}.z-text-primary-dark{color:var(--color-primary-dark)}.z-text-gray-light{color:var(--color-gray-500)}.z-text-gray-dark{color:var(--color-gray-300)}.z-border-light{border-color:var(--color-black)}.z-border-dark{border-color:var(--color-white)}.z-border-primary-light{border-color:var(--color-primary)}.z-border-primary-dark{border-color:var(--color-primary-dark)}.z-border-divider-light{border-color:var(--color-gray-400)}.z-border-divider-dark{border-color:var(--color-gray-300)}.z-search-input-background-light{background-color:var(--color-gray-200)}.z-search-input-background-dark{background-color:var(--color-gray-500)}.z-chat-input-background-light{background-color:var(--color-white)}.z-chat-input-background-dark{background-color:var(--color-gray-700)}.z-placeholder-light::placeholder{color:var(--color-gray-500)}.z-placeholder-dark::placeholder{color:var(--color-gray-200)}.z-background-light{background-color:var(--color-background)}.z-background-dark{background-color:var(--color-background-dark)}.z-paper-light{background-color:var(--color-gray-100)}.z-paper-dark{background-color:var(--color-gray-700)}.z-width-100{width:100%}.z-width-75{width:75%}.z-width-50{width:50%}.z-width-25{width:25%}.z-width-0{width:0}/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;@layer utilities{.my-auto{margin-block:auto}.size-8{height:calc(var(--spacing)*8);width:calc(var(--spacing)*8)}.h-4{height:calc(var(--spacing)*4)}.h-\\[60px\\]{height:60px}.w-4{width:calc(var(--spacing)*4)}.items-center{align-items:center}.justify-between{justify-content:space-between}.gap-1{gap:calc(var(--spacing)*1)}:where(.space-x-1>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-end:calc(var(--spacing)*1*(1 - var(--tw-space-x-reverse)));margin-inline-start:calc(var(--spacing)*1*var(--tw-space-x-reverse))}.rounded-full{border-radius:3.40282e+38px}.object-cover{object-fit:cover}.px-2{padding-inline:calc(var(--spacing)*2)}.py-3{padding-block:calc(var(--spacing)*3)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.text-blue-500{color:var(--color-blue-500)}.text-green-500{color:var(--color-green-500)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.mb-2{margin-bottom:calc(var(--spacing)*2)}.mb-auto{margin-bottom:auto}.ml-2{margin-left:calc(var(--spacing)*2)}.border-none{--tw-border-style:none;border-style:none}.bg-pink-100{background-color:var(--color-pink-100)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-2{padding-block:calc(var(--spacing)*2)}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.text-black{color:var(--color-black)}.text-gray-500{color:var(--color-gray-500)}.shadow-inner{--tw-shadow:inset 0 2px 4px 0 var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-primary{--tw-ring-color:var(--color-primary)}.focus\\:outline-none:focus{--tw-outline-style:none;outline-style:none}.mt-6{margin-top:calc(var(--spacing)*6)}.mb-6{margin-bottom:calc(var(--spacing)*6)}.max-h-\\[80vh\\]{max-height:80vh}.w-xl{width:var(--container-xl)}.gap-2{gap:calc(var(--spacing)*2)}}/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;@layer utilities{}/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;@layer utilities{:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-end:calc(var(--spacing)*2*(1 - var(--tw-space-y-reverse)));margin-block-start:calc(var(--spacing)*2*var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.rounded-lg{border-radius:var(--radius-lg)}.p-6{padding:calc(var(--spacing)*6)}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.top-0\\.5{top:calc(var(--spacing)*.5)}.right-0\\.5{right:calc(var(--spacing)*.5)}.m-auto{margin:auto}.w-lg{width:var(--container-lg)}.justify-center{justify-content:center}.object-contain{object-fit:contain}.pt-8{padding-top:calc(var(--spacing)*8)}.mx-auto{margin-inline:auto}.mb-10{margin-bottom:calc(var(--spacing)*10)}.grid{display:grid}.h-18{height:calc(var(--spacing)*18)}.w-18{width:calc(var(--spacing)*18)}.place-content-center{place-content:center}.p-4{padding:calc(var(--spacing)*4)}.text-center{text-align:center}.text-gray-400{color:var(--color-gray-400)}.text-primary{color:var(--color-primary)}.right-0{right:calc(var(--spacing)*0)}.bottom-\\[40px\\]{bottom:40px}.left-0{left:calc(var(--spacing)*0)}.z-50{z-index:50}.mt-2{margin-top:calc(var(--spacing)*2)}.w-32{width:calc(var(--spacing)*32)}.cursor-pointer{cursor:pointer}.rounded-md{border-radius:var(--radius-md)}.fixed{position:fixed}.inset-0{inset:calc(var(--spacing)*0)}.size-42{height:calc(var(--spacing)*42);width:calc(var(--spacing)*42)}.rounded-xl{border-radius:var(--radius-xl)}.rounded-br-\\[0\\]{border-bottom-right-radius:0}.rounded-bl-\\[0\\]{border-bottom-left-radius:0}.bg-black\\/40{background-color:#0006}}/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;@layer utilities{}/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;@layer utilities{}/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;@layer utilities{}/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;@layer utilities{@supports (color:color-mix(in lab,red,red)){.bg-black\\/40{background-color:color-mix(in srgb,#00040%,transparent);background-color:color-mix(in oklab,var(--color-black)40%,transparent)}}.bg-gray-200{background-color:var(--color-gray-200)}.bg-primary{background-color:var(--color-primary)}.p-2{padding:calc(var(--spacing)*2)}.px-3{padding-inline:calc(var(--spacing)*3)}.pt-2{padding-top:calc(var(--spacing)*2)}.pb-5{padding-bottom:calc(var(--spacing)*5)}.text-white{color:var(--color-white)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.right-full{right:100%}.-bottom-2{bottom:calc(var(--spacing)*-2)}.left-full{left:100%}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-1{margin-top:calc(var(--spacing)*1)}.mr-2{margin-right:calc(var(--spacing)*2)}.mb-\\[-0\\.75rem\\]{margin-bottom:-.75rem}.h-6{height:calc(var(--spacing)*6)}.w-6{width:calc(var(--spacing)*6)}.w-8{width:calc(var(--spacing)*8)}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.bg-yellow-300{background-color:var(--color-yellow-300)}.text-left{text-align:left}.text-right{text-align:right}.col-span-1{grid-column:span 1/span 1}.col-span-2{grid-column:span 2/span 2}.col-span-3{grid-column:span 3/span 3}.mr-1{margin-right:calc(var(--spacing)*1)}.size-4{height:calc(var(--spacing)*4);width:calc(var(--spacing)*4)}.size-16{height:calc(var(--spacing)*16);width:calc(var(--spacing)*16)}.min-h-20{min-height:calc(var(--spacing)*20)}.grid-flow-row-dense{grid-auto-flow:dense}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-rows-1{grid-template-rows:repeat(1,minmax(0,1fr))}.flex-wrap{flex-wrap:wrap}.items-baseline-last{align-items:last baseline}.gap-y-1{row-gap:calc(var(--spacing)*1)}.border-b-\\[0\\.5px\\]{border-bottom-style:var(--tw-border-style);border-bottom-width:.5px}.pt-0{padding-top:calc(var(--spacing)*0)}.whitespace-pre-line{white-space:pre-line}.capitalize{text-transform:capitalize}.top-1\\/2{top:50%}.right-1\\.25{right:calc(var(--spacing)*1.25)}.max-w-xl{max-width:var(--container-xl)}.-translate-y-1\\/2{--tw-translate-y:-50%;translate:var(--tw-translate-x)var(--tw-translate-y)}.p-1\\.5{padding:calc(var(--spacing)*1.5)}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.mt-auto{margin-top:auto}.hidden{display:none}}/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;@layer utilities{}/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;@layer utilities{} /*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities; /*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities;/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;@layer utilities{}/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;@layer utilities{:where(.space-x-8>:not(:last-child)){--tw-space-x-reverse:0;margin-inline-end:calc(var(--spacing)*8*(1 - var(--tw-space-x-reverse)));margin-inline-start:calc(var(--spacing)*8*var(--tw-space-x-reverse))}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-transparent{border-color:#0000}.py-4{padding-block:calc(var(--spacing)*4)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.filter{filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}.w-52{width:calc(var(--spacing)*52)}}/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;@layer utilities{} /*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer base{}@layer components,utilities;/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;/*! tailwindcss v4.1.11 | MIT License | https://tailwindcss.com */@layer properties{}@layer base{}@layer components;@layer utilities{}@property --tw-space-y-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-x{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-y{syntax:\"*\";inherits:false;initial-value:0}@property --tw-translate-z{syntax:\"*\";inherits:false;initial-value:0}@property --tw-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:\"*\";inherits:false}@property --tw-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:\"*\";inherits:false}@property --tw-inset-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:\"*\";inherits:false}@property --tw-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:\"*\";inherits:false}@property --tw-inset-ring-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:\"*\";inherits:false}@property --tw-ring-offset-width{syntax:\"<length>\";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:\"*\";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:\"*\";inherits:false;initial-value:0 0 #0000}@property --tw-space-x-reverse{syntax:\"*\";inherits:false;initial-value:0}@property --tw-border-style{syntax:\"*\";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:\"*\";inherits:false}@property --tw-blur{syntax:\"*\";inherits:false}@property --tw-brightness{syntax:\"*\";inherits:false}@property --tw-contrast{syntax:\"*\";inherits:false}@property --tw-grayscale{syntax:\"*\";inherits:false}@property --tw-hue-rotate{syntax:\"*\";inherits:false}@property --tw-invert{syntax:\"*\";inherits:false}@property --tw-opacity{syntax:\"*\";inherits:false}@property --tw-saturate{syntax:\"*\";inherits:false}@property --tw-sepia{syntax:\"*\";inherits:false}@property --tw-drop-shadow{syntax:\"*\";inherits:false}@property --tw-drop-shadow-color{syntax:\"*\";inherits:false}@property --tw-drop-shadow-alpha{syntax:\"<percentage>\";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:\"*\";inherits:false}:host{display:block}@media (forced-colors:active){[type=checkbox]:checked,[type=radio]:checked{appearance:auto}[type=checkbox]:indeterminate{appearance:auto}[type=checkbox]:checked,[type=checkbox]:indeterminate,[type=radio]:checked{appearance:auto}}@media (hover:hover){.hover\\:opacity-100:hover{opacity:1}.hover\\:brightness-110:hover{--tw-brightness:brightness(110%);filter:var(--tw-blur,)var(--tw-brightness,)var(--tw-contrast,)var(--tw-grayscale,)var(--tw-hue-rotate,)var(--tw-invert,)var(--tw-saturate,)var(--tw-sepia,)var(--tw-drop-shadow,)}}@media screen and (min-width:0){.z-max-height{height:calc(100vh - 56px)}}@media screen and (min-width:600px){.z-max-height{height:calc(100vh - 64px)}}";
|
|
4
|
+
|
|
5
|
+
const ProfileHistory = /*@__PURE__*/ proxyCustomElement(class ProfileHistory extends H {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
}
|
|
10
|
+
render() {
|
|
11
|
+
return (h(Host, { key: 'b216481cd42ee5d4a470aa71cce5ed6e13d3cf30' }, h("slot", { key: 'df527ebdd4516320cf7aa29e1e5e06449af7fa5d' }, "History")));
|
|
12
|
+
}
|
|
13
|
+
static get style() { return profileHistoryCss; }
|
|
14
|
+
}, [260, "profile-history"]);
|
|
15
|
+
function defineCustomElement() {
|
|
16
|
+
if (typeof customElements === "undefined") {
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
const components = ["profile-history"];
|
|
20
|
+
components.forEach(tagName => { switch (tagName) {
|
|
21
|
+
case "profile-history":
|
|
22
|
+
if (!customElements.get(tagName)) {
|
|
23
|
+
customElements.define(tagName, ProfileHistory);
|
|
24
|
+
}
|
|
25
|
+
break;
|
|
26
|
+
} });
|
|
27
|
+
}
|
|
28
|
+
defineCustomElement();
|
|
29
|
+
|
|
30
|
+
export { ProfileHistory as P, defineCustomElement as d };
|
|
31
|
+
//# sourceMappingURL=p-nz95LAGz.js.map
|
|
32
|
+
|
|
33
|
+
//# sourceMappingURL=p-nz95LAGz.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-nz95LAGz.js","mappings":";;AAAA,MAAM,iBAAiB,GAAG,6nyBAA6nyB;;MCM1oyB,cAAc,iBAAAA,kBAAA,CAAA,MAAA,cAAA,SAAAC,CAAA,CAAA;;;;;IACzB,MAAM,GAAA;QACJ,QACE,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACH,CAEO,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EAAA,SAAA,CAAA,CACF;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/profile-history/profile-history.css?tag=profile-history","src/components/profile-history/profile-history.tsx"],"sourcesContent":[":host {\n display: block;\n}\n","import { Component, Host, h } from '@stencil/core';\n\n@Component({\n tag: 'profile-history',\n styleUrl: 'profile-history.css',\n})\nexport class ProfileHistory {\n render() {\n return (\n <Host>\n <slot>\n History\n </slot>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface ProfileHistory extends Components.ProfileHistory, HTMLElement {}
|
|
4
|
+
export const ProfileHistory: {
|
|
5
|
+
prototype: ProfileHistory;
|
|
6
|
+
new (): ProfileHistory;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { P as ProfileHistory$1, d as defineCustomElement$1 } from './p-nz95LAGz.js';
|
|
2
|
+
|
|
3
|
+
const ProfileHistory = ProfileHistory$1;
|
|
4
|
+
const defineCustomElement = defineCustomElement$1;
|
|
5
|
+
|
|
6
|
+
export { ProfileHistory, defineCustomElement };
|
|
7
|
+
//# sourceMappingURL=profile-history.js.map
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=profile-history.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"profile-history.js","mappings":";;;;;;;","names":[],"sources":[],"sourcesContent":[],"version":3}
|