@htmlbricks/hb-messages-topics-card 0.17.7 → 0.17.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/extra/docs.ts +87 -12
- package/package.json +3 -3
- package/release/docs.js +87 -12
- package/release/docs.js.map +1 -1
- package/release/docs.ts +87 -12
- package/release/manifest.json +214 -99
- package/release/release.js +1 -1
- package/release/release.js.map +1 -1
- package/release/webcomponent.type.d.ts +20 -19
package/release/manifest.json
CHANGED
|
@@ -8,22 +8,73 @@
|
|
|
8
8
|
"additionalProperties": false,
|
|
9
9
|
"properties": {
|
|
10
10
|
"select": {
|
|
11
|
-
"
|
|
12
|
-
"properties": {
|
|
13
|
-
"id": {
|
|
14
|
-
"type": "string"
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
"required": [
|
|
18
|
-
"id"
|
|
19
|
-
],
|
|
20
|
-
"type": "object"
|
|
11
|
+
"$ref": "#/definitions/IChat"
|
|
21
12
|
}
|
|
22
13
|
},
|
|
23
14
|
"required": [
|
|
24
15
|
"select"
|
|
25
16
|
],
|
|
26
17
|
"type": "object"
|
|
18
|
+
},
|
|
19
|
+
"IChat": {
|
|
20
|
+
"additionalProperties": false,
|
|
21
|
+
"properties": {
|
|
22
|
+
"_selected": {
|
|
23
|
+
"type": "boolean"
|
|
24
|
+
},
|
|
25
|
+
"chat_id": {
|
|
26
|
+
"type": "string"
|
|
27
|
+
},
|
|
28
|
+
"chat_img": {
|
|
29
|
+
"type": "string"
|
|
30
|
+
},
|
|
31
|
+
"chat_name": {
|
|
32
|
+
"type": "string"
|
|
33
|
+
},
|
|
34
|
+
"counter": {
|
|
35
|
+
"type": "number"
|
|
36
|
+
},
|
|
37
|
+
"img_uri": {
|
|
38
|
+
"type": "string"
|
|
39
|
+
},
|
|
40
|
+
"is_group": {
|
|
41
|
+
"type": "boolean"
|
|
42
|
+
},
|
|
43
|
+
"last_message_author": {
|
|
44
|
+
"type": "string"
|
|
45
|
+
},
|
|
46
|
+
"last_message_author_img": {
|
|
47
|
+
"type": "string"
|
|
48
|
+
},
|
|
49
|
+
"last_message_text": {
|
|
50
|
+
"type": "string"
|
|
51
|
+
},
|
|
52
|
+
"last_message_time": {
|
|
53
|
+
"format": "date-time",
|
|
54
|
+
"type": "string"
|
|
55
|
+
},
|
|
56
|
+
"localeTimeString": {
|
|
57
|
+
"type": "string"
|
|
58
|
+
},
|
|
59
|
+
"text": {
|
|
60
|
+
"type": "string"
|
|
61
|
+
},
|
|
62
|
+
"time": {
|
|
63
|
+
"format": "date-time",
|
|
64
|
+
"type": "string"
|
|
65
|
+
},
|
|
66
|
+
"title": {
|
|
67
|
+
"type": "string"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"required": [
|
|
71
|
+
"time",
|
|
72
|
+
"title",
|
|
73
|
+
"text",
|
|
74
|
+
"img_uri",
|
|
75
|
+
"chat_id"
|
|
76
|
+
],
|
|
77
|
+
"type": "object"
|
|
27
78
|
}
|
|
28
79
|
}
|
|
29
80
|
},
|
|
@@ -34,71 +85,11 @@
|
|
|
34
85
|
"Component": {
|
|
35
86
|
"additionalProperties": false,
|
|
36
87
|
"properties": {
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
"chat_id": {
|
|
41
|
-
"type": "string"
|
|
42
|
-
},
|
|
43
|
-
"chat_img": {
|
|
44
|
-
"type": "string"
|
|
45
|
-
},
|
|
46
|
-
"chat_name": {
|
|
47
|
-
"type": "string"
|
|
48
|
-
},
|
|
49
|
-
"counter": {
|
|
50
|
-
"type": "number"
|
|
51
|
-
},
|
|
52
|
-
"is_group": {
|
|
53
|
-
"type": "boolean"
|
|
54
|
-
},
|
|
55
|
-
"last_message_author": {
|
|
56
|
-
"type": "string"
|
|
57
|
-
},
|
|
58
|
-
"last_message_author_img": {
|
|
59
|
-
"type": "string"
|
|
60
|
-
},
|
|
61
|
-
"last_message_text": {
|
|
62
|
-
"type": "string"
|
|
63
|
-
},
|
|
64
|
-
"last_message_time": {
|
|
65
|
-
"format": "date-time",
|
|
66
|
-
"type": "string"
|
|
67
|
-
}
|
|
88
|
+
"chats": {
|
|
89
|
+
"items": {
|
|
90
|
+
"$ref": "#/definitions/IChat"
|
|
68
91
|
},
|
|
69
|
-
"
|
|
70
|
-
"chat_id"
|
|
71
|
-
],
|
|
72
|
-
"type": "object"
|
|
73
|
-
},
|
|
74
|
-
"content": {
|
|
75
|
-
"additionalProperties": false,
|
|
76
|
-
"properties": {
|
|
77
|
-
"counter": {
|
|
78
|
-
"type": "number"
|
|
79
|
-
},
|
|
80
|
-
"img_uri": {
|
|
81
|
-
"type": "string"
|
|
82
|
-
},
|
|
83
|
-
"text": {
|
|
84
|
-
"type": "string"
|
|
85
|
-
},
|
|
86
|
-
"time": {
|
|
87
|
-
"format": "date-time",
|
|
88
|
-
"type": "string"
|
|
89
|
-
},
|
|
90
|
-
"title": {
|
|
91
|
-
"type": "string"
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
"required": [
|
|
95
|
-
"time",
|
|
96
|
-
"title",
|
|
97
|
-
"text",
|
|
98
|
-
"img_uri",
|
|
99
|
-
"counter"
|
|
100
|
-
],
|
|
101
|
-
"type": "object"
|
|
92
|
+
"type": "array"
|
|
102
93
|
},
|
|
103
94
|
"id": {
|
|
104
95
|
"type": "string"
|
|
@@ -107,18 +98,76 @@
|
|
|
107
98
|
"type": "string"
|
|
108
99
|
}
|
|
109
100
|
},
|
|
101
|
+
"required": [
|
|
102
|
+
"chats"
|
|
103
|
+
],
|
|
104
|
+
"type": "object"
|
|
105
|
+
},
|
|
106
|
+
"IChat": {
|
|
107
|
+
"additionalProperties": false,
|
|
108
|
+
"properties": {
|
|
109
|
+
"_selected": {
|
|
110
|
+
"type": "boolean"
|
|
111
|
+
},
|
|
112
|
+
"chat_id": {
|
|
113
|
+
"type": "string"
|
|
114
|
+
},
|
|
115
|
+
"chat_img": {
|
|
116
|
+
"type": "string"
|
|
117
|
+
},
|
|
118
|
+
"chat_name": {
|
|
119
|
+
"type": "string"
|
|
120
|
+
},
|
|
121
|
+
"counter": {
|
|
122
|
+
"type": "number"
|
|
123
|
+
},
|
|
124
|
+
"img_uri": {
|
|
125
|
+
"type": "string"
|
|
126
|
+
},
|
|
127
|
+
"is_group": {
|
|
128
|
+
"type": "boolean"
|
|
129
|
+
},
|
|
130
|
+
"last_message_author": {
|
|
131
|
+
"type": "string"
|
|
132
|
+
},
|
|
133
|
+
"last_message_author_img": {
|
|
134
|
+
"type": "string"
|
|
135
|
+
},
|
|
136
|
+
"last_message_text": {
|
|
137
|
+
"type": "string"
|
|
138
|
+
},
|
|
139
|
+
"last_message_time": {
|
|
140
|
+
"format": "date-time",
|
|
141
|
+
"type": "string"
|
|
142
|
+
},
|
|
143
|
+
"localeTimeString": {
|
|
144
|
+
"type": "string"
|
|
145
|
+
},
|
|
146
|
+
"text": {
|
|
147
|
+
"type": "string"
|
|
148
|
+
},
|
|
149
|
+
"time": {
|
|
150
|
+
"format": "date-time",
|
|
151
|
+
"type": "string"
|
|
152
|
+
},
|
|
153
|
+
"title": {
|
|
154
|
+
"type": "string"
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"required": [
|
|
158
|
+
"time",
|
|
159
|
+
"title",
|
|
160
|
+
"text",
|
|
161
|
+
"img_uri",
|
|
162
|
+
"chat_id"
|
|
163
|
+
],
|
|
110
164
|
"type": "object"
|
|
111
165
|
}
|
|
112
166
|
}
|
|
113
167
|
}
|
|
114
168
|
},
|
|
115
169
|
"storybookArgs": {
|
|
116
|
-
"
|
|
117
|
-
"control": {
|
|
118
|
-
"type": "object"
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
"chat": {
|
|
170
|
+
"chats": {
|
|
122
171
|
"control": {
|
|
123
172
|
"type": "object"
|
|
124
173
|
}
|
|
@@ -128,35 +177,101 @@
|
|
|
128
177
|
}
|
|
129
178
|
},
|
|
130
179
|
"styleSetup": {
|
|
131
|
-
"vars": [
|
|
132
|
-
|
|
180
|
+
"vars": [
|
|
181
|
+
{
|
|
182
|
+
"name": "--hb-topics-card-selected-background-color",
|
|
183
|
+
"description": "Selected background color",
|
|
184
|
+
"defaultValue": "#e9ecef",
|
|
185
|
+
"valueType": "color"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"name": "--hb-topics-card-hover-background-color",
|
|
189
|
+
"description": "Hover background color",
|
|
190
|
+
"defaultValue": "#f5f5f5",
|
|
191
|
+
"valueType": "color"
|
|
192
|
+
},
|
|
133
193
|
{
|
|
134
|
-
"name": "
|
|
135
|
-
"description": "
|
|
194
|
+
"name": "--hb-topics-card-size",
|
|
195
|
+
"description": "Topic card size",
|
|
196
|
+
"defaultValue": "calc(1vw + 1vh + 12px)",
|
|
197
|
+
"valueType": "htmlsize"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
"name": "--hb-topics-card-padding",
|
|
201
|
+
"description": "Topic card padding",
|
|
202
|
+
"defaultValue": "4px",
|
|
203
|
+
"valueType": "htmlsize"
|
|
136
204
|
}
|
|
137
|
-
]
|
|
205
|
+
],
|
|
206
|
+
"parts": []
|
|
138
207
|
},
|
|
139
208
|
"author": "Dario Caruso <dev@dariocaruso.info> (https://dariocaruso.info)",
|
|
140
209
|
"contributors": [],
|
|
141
210
|
"owner": "Dario Caruso <dev@dariocaruso.info> (https://dariocaruso.info)",
|
|
142
|
-
"htmlSlots": [
|
|
143
|
-
{
|
|
144
|
-
"name": "skelcontent",
|
|
145
|
-
"description": "test slot"
|
|
146
|
-
}
|
|
147
|
-
],
|
|
211
|
+
"htmlSlots": [],
|
|
148
212
|
"i18n": [],
|
|
149
213
|
"examples": [
|
|
150
214
|
{
|
|
151
215
|
"name": "default",
|
|
152
216
|
"data": {
|
|
153
|
-
"
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
217
|
+
"chats": [
|
|
218
|
+
{
|
|
219
|
+
"chat_id": "ciao0",
|
|
220
|
+
"counter": 0,
|
|
221
|
+
"text": "Hello 0",
|
|
222
|
+
"title": "Hello0",
|
|
223
|
+
"time": "2023-01-21T16:38:43.738Z",
|
|
224
|
+
"img_uri": "https://www.w3schools.com/howto/img_avatar.png"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"chat_id": "ciao1",
|
|
228
|
+
"counter": 0,
|
|
229
|
+
"text": "Hello 1",
|
|
230
|
+
"title": "Hello1",
|
|
231
|
+
"time": "2023-01-21T16:38:43.738Z",
|
|
232
|
+
"img_uri": "https://www.w3schools.com/howto/img_avatar.png"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"chat_id": "ciao2",
|
|
236
|
+
"counter": 0,
|
|
237
|
+
"text": "Hello 2",
|
|
238
|
+
"title": "Hello2",
|
|
239
|
+
"time": "2023-01-21T16:38:43.738Z",
|
|
240
|
+
"img_uri": "https://www.w3schools.com/howto/img_avatar.png"
|
|
241
|
+
}
|
|
242
|
+
]
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
"name": "selected",
|
|
247
|
+
"data": {
|
|
248
|
+
"chats": [
|
|
249
|
+
{
|
|
250
|
+
"chat_id": "ciao0",
|
|
251
|
+
"counter": 0,
|
|
252
|
+
"text": "Hello 0",
|
|
253
|
+
"title": "Hello0",
|
|
254
|
+
"time": "2023-01-21T16:38:43.738Z",
|
|
255
|
+
"img_uri": "https://www.w3schools.com/howto/img_avatar.png"
|
|
256
|
+
},
|
|
257
|
+
{
|
|
258
|
+
"chat_id": "ciao1",
|
|
259
|
+
"counter": 0,
|
|
260
|
+
"text": "Hello 1",
|
|
261
|
+
"title": "Hello1",
|
|
262
|
+
"time": "2023-01-21T16:38:43.738Z",
|
|
263
|
+
"img_uri": "https://www.w3schools.com/howto/img_avatar.png",
|
|
264
|
+
"_selected": true
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"chat_id": "ciao2",
|
|
268
|
+
"counter": 0,
|
|
269
|
+
"text": "Hello 2",
|
|
270
|
+
"title": "Hello2",
|
|
271
|
+
"time": "2023-01-21T16:38:43.738Z",
|
|
272
|
+
"img_uri": "https://www.w3schools.com/howto/img_avatar.png"
|
|
273
|
+
}
|
|
274
|
+
]
|
|
160
275
|
}
|
|
161
276
|
}
|
|
162
277
|
],
|
|
@@ -178,5 +293,5 @@
|
|
|
178
293
|
"size": {},
|
|
179
294
|
"iifePath": "release/release.js",
|
|
180
295
|
"repoName": "@htmlbricks/hb-messages-topics-card",
|
|
181
|
-
"version": "0.17.
|
|
296
|
+
"version": "0.17.9"
|
|
182
297
|
}
|
package/release/release.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var release=function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function r(t){t.forEach(e)}function i(t){return"function"==typeof t}function o(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}let a,s;function c(t,e){return a||(a=document.createElement("a")),a.href=e,t===a.href}function d(t,e){t.appendChild(e)}function l(t,e,n){t.insertBefore(e,n||null)}function u(t){t.parentNode.removeChild(t)}function p(t){return document.createElement(t)}function f(t){return document.createTextNode(t)}function g(){return f(" ")}function h(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function b(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function m(t){const e={};for(const n of t)e[n.name]=n.value;return e}function v(t){s=t}function y(){if(!s)throw new Error("Function called outside component initialization");return s}function w(){const t=y();return(e,n,{cancelable:r=!1}={})=>{const i=t.$$.callbacks[e];if(i){const o=function(t,e,{bubbles:n=!1,cancelable:r=!1}={}){const i=document.createEvent("CustomEvent");return i.initCustomEvent(t,n,r,e),i}(e,n,{cancelable:r});return i.slice().forEach((e=>{e.call(t,o)})),!o.defaultPrevented}return!0}}const $=[],x=[],_=[],k=[],E=Promise.resolve();let z=!1;function C(t){_.push(t)}const S=new Set;let L=0;function N(){const t=s;do{for(;L<$.length;){const t=$[L];L++,v(t),A(t.$$)}for(v(null),$.length=0,L=0;x.length;)x.pop()();for(let t=0;t<_.length;t+=1){const e=_[t];S.has(e)||(S.add(e),e())}_.length=0}while($.length);for(;k.length;)k.pop()();z=!1,S.clear(),v(t)}function A(t){if(null!==t.fragment){t.update(),r(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(C)}}const j=new Set;function D(t,e){-1===t.$$.dirty[0]&&($.push(t),z||(z=!0,E.then(N)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function M(o,a,c,d,l,p,f,g=[-1]){const h=s;v(o);const b=o.$$={fragment:null,ctx:null,props:p,update:t,not_equal:l,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a.context||(h?h.$$.context:[])),callbacks:n(),dirty:g,skip_bound:!1,root:a.target||h.$$.root};f&&f(b.root);let m=!1;if(b.ctx=c?c(o,a.props||{},((t,e,...n)=>{const r=n.length?n[0]:e;return b.ctx&&l(b.ctx[t],b.ctx[t]=r)&&(!b.skip_bound&&b.bound[t]&&b.bound[t](r),m&&D(o,t)),e})):[],b.update(),m=!0,r(b.before_update),b.fragment=!!d&&d(b.ctx),a.target){if(a.hydrate){const t=function(t){return Array.from(t.childNodes)}(a.target);b.fragment&&b.fragment.l(t),t.forEach(u)}else b.fragment&&b.fragment.c();a.intro&&((y=o.$$.fragment)&&y.i&&(j.delete(y),y.i(w))),function(t,n,o,a){const{fragment:s,on_mount:c,on_destroy:d,after_update:l}=t.$$;s&&s.m(n,o),a||C((()=>{const n=c.map(e).filter(i);d?d.push(...n):r(n),t.$$.on_mount=[]})),l.forEach(C)}(o,a.target,a.anchor,a.customElement),N()}var y,w;v(h)}let T;"function"==typeof HTMLElement&&(T=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(e).filter(i);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){r(this.$$.on_disconnect)}$destroy(){!function(t,e){const n=t.$$;null!==n.fragment&&(r(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});var O=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,I=/\n/g,P=/^\s*/,R=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,H=/^:\s*/,F=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,U=/^[;\s]*/,W=/^\s+|\s+$/g,B="";function J(t){return t?t.replace(W,B):B}var q,K=function(t,e){var n,r=null;if(!t||"string"!=typeof t)return r;for(var i,o,a=function(t,e){if("string"!=typeof t)throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var n=1,r=1;function i(t){var e=t.match(I);e&&(n+=e.length);var i=t.lastIndexOf("\n");r=~i?t.length-i:r+t.length}function o(){var t={line:n,column:r};return function(e){return e.position=new a(t),d(),e}}function a(t){this.start=t,this.end={line:n,column:r},this.source=e.source}function s(i){var o=new Error(e.source+":"+n+":"+r+": "+i);if(o.reason=i,o.filename=e.source,o.line=n,o.column=r,o.source=t,!e.silent)throw o}function c(e){var n=e.exec(t);if(n){var r=n[0];return i(r),t=t.slice(r.length),n}}function d(){c(P)}function l(t){var e;for(t=t||[];e=u();)!1!==e&&t.push(e);return t}function u(){var e=o();if("/"==t.charAt(0)&&"*"==t.charAt(1)){for(var n=2;B!=t.charAt(n)&&("*"!=t.charAt(n)||"/"!=t.charAt(n+1));)++n;if(n+=2,B===t.charAt(n-1))return s("End of comment missing");var a=t.slice(2,n-2);return r+=2,i(a),t=t.slice(n),r+=2,e({type:"comment",comment:a})}}function p(){var t=o(),e=c(R);if(e){if(u(),!c(H))return s("property missing ':'");var n=c(F),r=t({type:"declaration",property:J(e[0].replace(O,B)),value:n?J(n[0].replace(O,B)):B});return c(U),r}}return a.prototype.content=t,d(),function(){var t,e=[];for(l(e);t=p();)!1!==t&&(e.push(t),l(e));return e}()}(t),s="function"==typeof e,c=0,d=a.length;c<d;c++)i=(n=a[c]).property,o=n.value,s?e(i,o,n):o&&(r||(r={}),r[i]=o);return r};function V(t){let e,n,r,i,o,a,s,m,v,y,w,$,x,_,k,E,z,C,S,L=t[0].title+"",N=t[0].text+"",A=t[0].counter.toString()+"";return{c(){e=p("div"),n=p("img"),o=g(),a=p("div"),s=p("span"),m=f(L),v=g(),y=p("span"),w=f(t[1]),$=g(),x=p("div"),_=p("span"),k=f(N),E=g(),z=p("span"),C=p("span"),S=f(A),c(n.src,r=t[0].img_uri)||h(n,"src",r),h(n,"alt",i=t[0].img_uri),h(s,"class","text-item"),h(s,"id","title"),h(y,"class","text-item right"),h(y,"id","time"),h(a,"id","header"),h(_,"id","description"),h(_,"class","text-item"),h(C,"class","badge rounded-pill bg-secondary"),h(z,"id","counter"),h(z,"class","text-item right"),h(x,"id","details"),h(e,"id","grid")},m(t,r){l(t,e,r),d(e,n),d(e,o),d(e,a),d(a,s),d(s,m),d(a,v),d(a,y),d(y,w),d(e,$),d(e,x),d(x,_),d(_,k),d(x,E),d(x,z),d(z,C),d(C,S)},p(t,e){1&e&&!c(n.src,r=t[0].img_uri)&&h(n,"src",r),1&e&&i!==(i=t[0].img_uri)&&h(n,"alt",i),1&e&&L!==(L=t[0].title+"")&&b(m,L),2&e&&b(w,t[1]),1&e&&N!==(N=t[0].text+"")&&b(k,N),1&e&&A!==(A=t[0].counter.toString()+"")&&b(S,A)},d(t){t&&u(e)}}}function G(e){let n,r=e[0]&&V(e);return{c(){r&&r.c(),n=f(""),this.c=t},m(t,e){r&&r.m(t,e),l(t,n,e)},p(t,[e]){t[0]?r?r.p(t,e):(r=V(t),r.c(),r.m(n.parentNode,n)):r&&(r.d(1),r=null)},i:t,o:t,d(t){r&&r.d(t),t&&u(n)}}}function Q(t,e,n){y(),w();let r,{id:i}=e,{style:o}=e,{content:a}=e,{chat:s}=e;return t.$$set=t=>{"id"in t&&n(2,i=t.id),"style"in t&&n(4,o=t.style),"content"in t&&n(0,a=t.content),"chat"in t&&n(3,s=t.chat)},t.$$.update=()=>{if(29&t.$$.dirty){if(i||n(2,i=""),o&&K(o),"string"==typeof a)try{n(0,a=JSON.parse(a))}catch(t){console.error("error parsing content",t)}if("string"==typeof s)try{n(3,s=JSON.parse(s))}catch(t){console.error("error parsing chat",t)}!a&&s&&n(0,a={title:s.chat_name||s.last_message_author,text:s.last_message_text,img_uri:s.last_message_author_img,time:s.last_message_time,counter:s.counter||0}),n(1,r=(null==a?void 0:a.time)?new Date(a.time).getHours().toString().padStart(2,"0")+":"+new Date(a.time).getMinutes().toString().padStart(2,"0"):"")}},[a,r,i,s,o]}(function(t,e){e.__esModule=!0,e.LanguageTranslator=e.addComponent=e.getChildStyleToPass=void 0,e.getChildStyleToPass=function(t,e){var n,r,i="";if(t&&(null==e?void 0:e.length)&&(null===(n=Object.keys(t))||void 0===n?void 0:n.length)&&(null===(r=null==e?void 0:e.filter((function(e){return Object.keys(t).includes(e.name)})))||void 0===r?void 0:r.length))for(var o=function(n){(null==e?void 0:e.filter((function(e){return e.name===n&&e.defaultValue!==t[n]})))&&(i+="".concat(n,":").concat(t[n],";"))},a=0,s=Object.keys(t);a<s.length;a++)o(s[a]);return i},e.addComponent=function(t){var e,n=(null===(e=null==t?void 0:t.repoName.split("/"))||void 0===e?void 0:e[1])||(null==t?void 0:t.repoName);if(!n)throw new Error("wrong componentPath "+(null==t?void 0:t.repoName));if(!(null==t?void 0:t.version))throw new Error("wrong version "+(null==t?void 0:t.version));var r=(null==t?void 0:t.iifePath)||"release/release.js";if(!document.getElementById(n+"-script"))try{var i=document.createElement("script");i.id=n+"-script",i.src="https://cdn.jsdelivr.net/npm/".concat(t.repoName,"@").concat(t.version,"/").concat(r),(null==t?void 0:t.local)&&location.href.includes("localhost")&&(i.src="".concat(t.local)),document.head.appendChild(i)}catch(t){console.warn(t)}};var n=function(){function t(t){if(!(null==t?void 0:t.dictionary))throw new Error("no dictionary provided");this.dictionary=t.dictionary,this.setLang(null==t?void 0:t.lang)}return t.prototype.setLang=function(e){e||(e=t.getDefaultLang()),this.lang=e},t.prototype.translateWord=function(e,n){return t.getDictionaryWord(e,this.dictionary,n||this.lang)},t.prototype.translateDate=function(e,n,r){return t.formatDate(e,n,r||this.lang)},t.getDefaultLang=function(){var t,e,n,r,i,o="en";return(null===navigator||void 0===navigator?void 0:navigator.languages)&&(null===(n=null===(e=null===(t=navigator.languages[0])||void 0===t?void 0:t.split("-")[0])||void 0===e?void 0:e.toLowerCase())||void 0===n?void 0:n.length)&&(o=null===(i=null===(r=navigator.languages[0])||void 0===r?void 0:r.split("-")[0])||void 0===i?void 0:i.toLowerCase()),o},t.getDictionaryWord=function(e,n,r){var i;if(!e)throw new Error("no wordKey provided");if(!n)throw new Error("no dictionary provided");if(r&&(null===(i=n[r])||void 0===i?void 0:i[e]))return n[r][e];var o="",a=t.getDefaultLang();if(!r||a!==r){var s=null==n?void 0:n[a];(null==s?void 0:s[e])&&(o=s[e])}return o},t.formatDate=function(e,n,r){if(!e)throw new Error("no date provided");if("function"!=typeof e.getMonth)throw new Error("wrong date format");return new Intl.DateTimeFormat(r||t.getDefaultLang(),n).format(e)},t}();e.LanguageTranslator=n})(q={exports:{}},q.exports);class X extends T{constructor(t){super(),this.shadowRoot.innerHTML='<style>@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css");:host{font-family:"Roboto", sans-serif;width:100%;display:block;--hb-topics-card-size:calc(1vw + 1vh + 12px);--hb-topics-card-padding:4px;--hb-topics-card-double-size:calc(var(--hb-topics-card-size) * 2);--hb-topics-card-double-padding:calc(var(--hb-topics-card-padding) * 2)}#grid{display:grid;grid-template-areas:"img header" "img details";grid-template-columns:var(--hb-topics-card-double-size) calc(100% - var(--hb-topics-card-double-size));grid-template-rows:calc(var(--hb-topics-card-size) + var(--hb-topics-card-double-padding)) calc(var(--hb-topics-card-size) + var(--hb-topics-card-padding))}img{padding:var(--hb-topics-card-padding);grid-area:img;height:calc(var(--hb-topics-card-size) + var(--hb-topics-card-double-padding) + var(--hb-topics-card-size) + var(--hb-topics-card-padding));width:calc(var(--hb-topics-card-size) + var(--hb-topics-card-double-padding) + var(--hb-topics-card-size) + var(--hb-topics-card-padding));border-radius:50%}#header{grid-area:header;padding:var(--hb-topics-card-padding) var(--hb-topics-card-padding) var(--hb-topics-card-padding) 10px;line-height:calc(var(--hb-topics-card-size) + 0px)}#details{padding:var(--hb-topics-card-padding) var(--hb-topics-card-padding) var(--hb-topics-card-padding) 10px;grid-area:details;line-height:calc(var(--hb-topics-card-size) - var(--hb-topics-card-double-padding))}#title{font-size:1.5em;font-weight:600}#description{font-size:1em;font-weight:300;opacity:0.8}#time{font-size:0.8em;font-weight:300;opacity:0.6}.right{position:absolute;right:var(--hb-topics-card-padding)}.text-item{margin-left:12px;margin-right:6px}:host{--bs-blue:var(--bs-primary,#07689f);--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:var(--bs-danger,#f67280);--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:var(--bs-warning,#ffc107);--bs-teal:#20c997;--bs-cyan:var(--bs-info,#a2d5f2);--bs-white:#fff;--bs-gray:var(--bs-secondary,#c9d6df);--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:var(--bs-secondary,#c9d6df);--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:var(--bs-primary,#07689f);--bs-secondary:var(--bs-secondary,#c9d6df);--bs-success:var(--bs-warning,#ffc107);--bs-info:var(--bs-info,#a2d5f2);--bs-warning:#ffc107;--bs-danger:var(--bs-danger,#f67280);--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:13, 110, 253;--bs-secondary-rgb:108, 117, 125;--bs-success-rgb:25, 135, 84;--bs-info-rgb:13, 202, 240;--bs-warning-rgb:255, 193, 7;--bs-danger-rgb:220, 53, 69;--bs-light-rgb:248, 249, 250;--bs-dark-rgb:33, 37, 41;--bs-white-rgb:255, 255, 255;--bs-black-rgb:0, 0, 0;--bs-body-color-rgb:33, 37, 41;--bs-body-bg-rgb:255, 255, 255;--bs-font-sans-serif:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--bs-font-monospace:SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#212529;--bs-body-bg:#fff}*,*::before,*::after{box-sizing:border-box}@media(prefers-reduced-motion: no-preference){:host{scroll-behavior:smooth}}@media(min-width: 1200px){}@media(min-width: 1200px){}@media(min-width: 1200px){}@media(min-width: 1200px){}img{vertical-align:middle}::-moz-focus-inner{padding:0;border-style:none}@media(min-width: 1200px){}::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-text,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}.badge{display:inline-block;padding:0.35em 0.65em;font-size:0.75em;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:0.25rem}.badge:empty{display:none}.bg-secondary{--bs-bg-opacity:1;background-color:rgba(var(--bs-secondary-rgb), var(--bs-bg-opacity)) !important}.rounded-pill{border-radius:50rem !important}@media(min-width: 576px){}@media(min-width: 768px){}@media(min-width: 992px){}@media(min-width: 1200px){}@media(min-width: 1400px){}@media(min-width: 1200px){}@media print{}</style>',M(this,{target:this.shadowRoot,props:m(this.attributes),customElement:!0},Q,G,o,{id:2,style:4,content:0,chat:3},null),t&&(t.target&&l(t.target,this,t.anchor),t.props&&(this.$set(t.props),N()))}static get observedAttributes(){return["id","style","content","chat"]}get id(){return this.$$.ctx[2]}set id(t){this.$$set({id:t}),N()}get style(){return this.$$.ctx[4]}set style(t){this.$$set({style:t}),N()}get content(){return this.$$.ctx[0]}set content(t){this.$$set({content:t}),N()}get chat(){return this.$$.ctx[3]}set chat(t){this.$$set({chat:t}),N()}}return customElements.define("hb-messages-topics-card",X),X}();
|
|
1
|
+
var release=function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function r(t){t.forEach(e)}function o(t){return"function"==typeof t}function i(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}let a,s;function c(t,e){return a||(a=document.createElement("a")),a.href=e,t===a.href}function d(t,e){t.appendChild(e)}function l(t,e,n){t.insertBefore(e,n||null)}function u(t){t.parentNode.removeChild(t)}function f(t){return document.createElement(t)}function p(t){return document.createTextNode(t)}function g(){return p(" ")}function h(){return p("")}function b(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function m(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function v(t){const e={};for(const n of t)e[n.name]=n.value;return e}function y(t){s=t}function w(){if(!s)throw new Error("Function called outside component initialization");return s}function $(){const t=w();return(e,n,{cancelable:r=!1}={})=>{const o=t.$$.callbacks[e];if(o){const i=function(t,e,{bubbles:n=!1,cancelable:r=!1}={}){const o=document.createEvent("CustomEvent");return o.initCustomEvent(t,n,r,e),o}(e,n,{cancelable:r});return o.slice().forEach((e=>{e.call(t,i)})),!i.defaultPrevented}return!0}}const k=[],x=[],E=[],_=[],S=Promise.resolve();let z=!1;function C(t){E.push(t)}const L=new Set;let M=0;function T(){const t=s;do{for(;M<k.length;){const t=k[M];M++,y(t),N(t.$$)}for(y(null),k.length=0,M=0;x.length;)x.pop()();for(let t=0;t<E.length;t+=1){const e=E[t];L.has(e)||(L.add(e),e())}E.length=0}while(k.length);for(;_.length;)_.pop()();z=!1,L.clear(),y(t)}function N(t){if(null!==t.fragment){t.update(),r(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(C)}}const A=new Set;function j(t,e){t&&t.i&&(A.delete(t),t.i(e))}function D(t,e){t.d(1),e.delete(t.key)}function O(t,e){-1===t.$$.dirty[0]&&(k.push(t),z||(z=!0,S.then(T)),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function I(i,a,c,d,l,f,p,g=[-1]){const h=s;y(i);const b=i.$$={fragment:null,ctx:null,props:f,update:t,not_equal:l,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(a.context||(h?h.$$.context:[])),callbacks:n(),dirty:g,skip_bound:!1,root:a.target||h.$$.root};p&&p(b.root);let m=!1;if(b.ctx=c?c(i,a.props||{},((t,e,...n)=>{const r=n.length?n[0]:e;return b.ctx&&l(b.ctx[t],b.ctx[t]=r)&&(!b.skip_bound&&b.bound[t]&&b.bound[t](r),m&&O(i,t)),e})):[],b.update(),m=!0,r(b.before_update),b.fragment=!!d&&d(b.ctx),a.target){if(a.hydrate){const t=function(t){return Array.from(t.childNodes)}(a.target);b.fragment&&b.fragment.l(t),t.forEach(u)}else b.fragment&&b.fragment.c();a.intro&&j(i.$$.fragment),function(t,n,i,a){const{fragment:s,on_mount:c,on_destroy:d,after_update:l}=t.$$;s&&s.m(n,i),a||C((()=>{const n=c.map(e).filter(o);d?d.push(...n):r(n),t.$$.on_mount=[]})),l.forEach(C)}(i,a.target,a.anchor,a.customElement),T()}y(h)}let P;"function"==typeof HTMLElement&&(P=class extends HTMLElement{constructor(){super(),this.attachShadow({mode:"open"})}connectedCallback(){const{on_mount:t}=this.$$;this.$$.on_disconnect=t.map(e).filter(o);for(const t in this.$$.slotted)this.appendChild(this.$$.slotted[t])}attributeChangedCallback(t,e,n){this[t]=n}disconnectedCallback(){r(this.$$.on_disconnect)}$destroy(){!function(t,e){const n=t.$$;null!==n.fragment&&(r(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}});var R=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,H=/\n/g,F=/^\s*/,U=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,W=/^:\s*/,B=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,q=/^[;\s]*/,J=/^\s+|\s+$/g,K="";function V(t){return t?t.replace(J,K):K}var G,Q=function(t,e){var n,r=null;if(!t||"string"!=typeof t)return r;for(var o,i,a=function(t,e){if("string"!=typeof t)throw new TypeError("First argument must be a string");if(!t)return[];e=e||{};var n=1,r=1;function o(t){var e=t.match(H);e&&(n+=e.length);var o=t.lastIndexOf("\n");r=~o?t.length-o:r+t.length}function i(){var t={line:n,column:r};return function(e){return e.position=new a(t),d(),e}}function a(t){this.start=t,this.end={line:n,column:r},this.source=e.source}function s(o){var i=new Error(e.source+":"+n+":"+r+": "+o);if(i.reason=o,i.filename=e.source,i.line=n,i.column=r,i.source=t,!e.silent)throw i}function c(e){var n=e.exec(t);if(n){var r=n[0];return o(r),t=t.slice(r.length),n}}function d(){c(F)}function l(t){var e;for(t=t||[];e=u();)!1!==e&&t.push(e);return t}function u(){var e=i();if("/"==t.charAt(0)&&"*"==t.charAt(1)){for(var n=2;K!=t.charAt(n)&&("*"!=t.charAt(n)||"/"!=t.charAt(n+1));)++n;if(n+=2,K===t.charAt(n-1))return s("End of comment missing");var a=t.slice(2,n-2);return r+=2,o(a),t=t.slice(n),r+=2,e({type:"comment",comment:a})}}function f(){var t=i(),e=c(U);if(e){if(u(),!c(W))return s("property missing ':'");var n=c(B),r=t({type:"declaration",property:V(e[0].replace(R,K)),value:n?V(n[0].replace(R,K)):K});return c(q),r}}return a.prototype.content=t,d(),function(){var t,e=[];for(l(e);t=f();)!1!==t&&(e.push(t),l(e));return e}()}(t),s="function"==typeof e,c=0,d=a.length;c<d;c++)o=(n=a[c]).property,i=n.value,s?e(o,i,n):i&&(r||(r={}),r[o]=i);return r};function X(t,e,n){const r=t.slice();return r[9]=e[n],r}function Y(t){let e,n=[],r=new Map,o=t[0];const i=t=>t[9].chat_id;for(let e=0;e<o.length;e+=1){let a=X(t,o,e),s=i(a);r.set(s,n[e]=Z(s,a))}return{c(){for(let t=0;t<n.length;t+=1)n[t].c();e=h()},m(t,r){for(let e=0;e<n.length;e+=1)n[e].m(t,r);l(t,e,r)},p(t,a){3&a&&(o=t[0],n=function(t,e,n,r,o,i,a,s,c,d,l,u){let f=t.length,p=i.length,g=f;const h={};for(;g--;)h[t[g].key]=g;const b=[],m=new Map,v=new Map;for(g=p;g--;){const t=u(o,i,g),s=n(t);let c=a.get(s);c?r&&c.p(t,e):(c=d(s,t),c.c()),m.set(s,b[g]=c),s in h&&v.set(s,Math.abs(g-h[s]))}const y=new Set,w=new Set;function $(t){j(t,1),t.m(s,l),a.set(t.key,t),l=t.first,p--}for(;f&&p;){const e=b[p-1],n=t[f-1],r=e.key,o=n.key;e===n?(l=e.first,f--,p--):m.has(o)?!a.has(r)||y.has(r)?$(e):w.has(o)?f--:v.get(r)>v.get(o)?(w.add(r),$(e)):(y.add(o),f--):(c(n,a),f--)}for(;f--;){const e=t[f];m.has(e.key)||c(e,a)}for(;p;)$(b[p-1]);return b}(n,a,i,1,t,o,r,e.parentNode,D,Z,e,X))},d(t){for(let e=0;e<n.length;e+=1)n[e].d(t);t&&u(e)}}}function Z(t,e){let n,r,o,i,a,s,h,v,y,w,$,k,x,E,_,S,z,C,L,M,T,N,A,j=e[9].title+"",D=e[9].localeTimeString+"",O=e[9].text+"",I=e[9].counter.toString()+"";function P(){return e[4](e[9])}return{key:t,first:null,c(){n=f("div"),r=f("img"),a=g(),s=f("div"),h=f("span"),v=p(j),y=g(),w=f("span"),$=p(D),k=g(),x=f("div"),E=f("span"),_=p(O),S=g(),z=f("span"),C=f("span"),L=p(I),M=g(),c(r.src,o=e[9].img_uri)||b(r,"src",o),b(r,"alt",i=e[9].img_uri),b(h,"class","text-item title"),b(w,"class","text-item right time"),b(s,"class","header"),b(E,"class","description text-item"),b(C,"class","badge rounded-pill bg-secondary"),b(z,"class","counter text-item right"),b(x,"class","details"),b(n,"class","grid"),b(n,"style",T=e[9]._selected?"background-color: var(--hb-topics-card-selected-background-color);":""),this.first=n},m(t,e){var o,i,c,u;l(t,n,e),d(n,r),d(n,a),d(n,s),d(s,h),d(h,v),d(s,y),d(s,w),d(w,$),d(n,k),d(n,x),d(x,E),d(E,_),d(x,S),d(x,z),d(z,C),d(C,L),d(n,M),N||(i="click",c=P,(o=n).addEventListener(i,c,u),A=()=>o.removeEventListener(i,c,u),N=!0)},p(t,a){e=t,1&a&&!c(r.src,o=e[9].img_uri)&&b(r,"src",o),1&a&&i!==(i=e[9].img_uri)&&b(r,"alt",i),1&a&&j!==(j=e[9].title+"")&&m(v,j),1&a&&D!==(D=e[9].localeTimeString+"")&&m($,D),1&a&&O!==(O=e[9].text+"")&&m(_,O),1&a&&I!==(I=e[9].counter.toString()+"")&&m(L,I),1&a&&T!==(T=e[9]._selected?"background-color: var(--hb-topics-card-selected-background-color);":"")&&b(n,"style",T)},d(t){t&&u(n),N=!1,A()}}}function tt(e){let n,r=e[0]&&Y(e);return{c(){r&&r.c(),n=h(),this.c=t},m(t,e){r&&r.m(t,e),l(t,n,e)},p(t,[e]){t[0]?r?r.p(t,e):(r=Y(t),r.c(),r.m(n.parentNode,n)):r&&(r.d(1),r=null)},i:t,o:t,d(t){r&&r.d(t),t&&u(n)}}}function et(t,e,n){const r=w(),o=$();let{id:i}=e,{style:a}=e,{chats:s}=e;function c(t){var e,i;s.forEach((e=>{e.chat_id!==t.chat_id?e._selected=!1:e._selected=!0})),n(0,s=[...s]),o(e="select",i=t),r.dispatchEvent&&r.dispatchEvent(new CustomEvent(e,{detail:i}))}return t.$$set=t=>{"id"in t&&n(2,i=t.id),"style"in t&&n(3,a=t.style),"chats"in t&&n(0,s=t.chats)},t.$$.update=()=>{if(13&t.$$.dirty){if(i||n(2,i=""),a&&Q(a),"string"==typeof s)try{n(0,s=JSON.parse(s))}catch(t){console.error("error parsing chat",t)}s||n(0,s=[]),s.forEach((t=>{t.localeTimeString||(t.localeTimeString=t.time?new Date(t.time).getHours().toString().padStart(2,"0")+":"+new Date(t.time).getMinutes().toString().padStart(2,"0"):"")}))}},[s,c,i,a,t=>{c(t)}]}(function(t,e){e.__esModule=!0,e.LanguageTranslator=e.addComponent=e.getChildStyleToPass=void 0,e.getChildStyleToPass=function(t,e){var n,r,o="";if(t&&(null==e?void 0:e.length)&&(null===(n=Object.keys(t))||void 0===n?void 0:n.length)&&(null===(r=null==e?void 0:e.filter((function(e){return Object.keys(t).includes(e.name)})))||void 0===r?void 0:r.length))for(var i=function(n){(null==e?void 0:e.filter((function(e){return e.name===n&&e.defaultValue!==t[n]})))&&(o+="".concat(n,":").concat(t[n],";"))},a=0,s=Object.keys(t);a<s.length;a++)i(s[a]);return o},e.addComponent=function(t){var e,n=(null===(e=null==t?void 0:t.repoName.split("/"))||void 0===e?void 0:e[1])||(null==t?void 0:t.repoName);if(!n)throw new Error("wrong componentPath "+(null==t?void 0:t.repoName));if(!(null==t?void 0:t.version))throw new Error("wrong version "+(null==t?void 0:t.version));var r=(null==t?void 0:t.iifePath)||"release/release.js";if(!document.getElementById(n+"-script"))try{var o=document.createElement("script");o.id=n+"-script",o.src="https://cdn.jsdelivr.net/npm/".concat(t.repoName,"@").concat(t.version,"/").concat(r),(null==t?void 0:t.local)&&location.href.includes("localhost")&&(o.src="".concat(t.local)),document.head.appendChild(o)}catch(t){console.warn(t)}};var n=function(){function t(t){if(!(null==t?void 0:t.dictionary))throw new Error("no dictionary provided");this.dictionary=t.dictionary,this.setLang(null==t?void 0:t.lang)}return t.prototype.setLang=function(e){e||(e=t.getDefaultLang()),this.lang=e},t.prototype.translateWord=function(e,n){return t.getDictionaryWord(e,this.dictionary,n||this.lang)},t.prototype.translateDate=function(e,n,r){return t.formatDate(e,n,r||this.lang)},t.getDefaultLang=function(){var t,e,n,r,o,i="en";return(null===navigator||void 0===navigator?void 0:navigator.languages)&&(null===(n=null===(e=null===(t=navigator.languages[0])||void 0===t?void 0:t.split("-")[0])||void 0===e?void 0:e.toLowerCase())||void 0===n?void 0:n.length)&&(i=null===(o=null===(r=navigator.languages[0])||void 0===r?void 0:r.split("-")[0])||void 0===o?void 0:o.toLowerCase()),i},t.getDictionaryWord=function(e,n,r){var o;if(!e)throw new Error("no wordKey provided");if(!n)throw new Error("no dictionary provided");if(r&&(null===(o=n[r])||void 0===o?void 0:o[e]))return n[r][e];var i="",a=t.getDefaultLang();if(!r||a!==r){var s=null==n?void 0:n[a];(null==s?void 0:s[e])&&(i=s[e])}return i},t.formatDate=function(e,n,r){if(!e)throw new Error("no date provided");if("function"!=typeof e.getMonth)throw new Error("wrong date format");return new Intl.DateTimeFormat(r||t.getDefaultLang(),n).format(e)},t}();e.LanguageTranslator=n})(G={exports:{}},G.exports);class nt extends P{constructor(t){super(),this.shadowRoot.innerHTML='<style>@import url("https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap");@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@latest/font/bootstrap-icons.css");:host{font-family:"Roboto", sans-serif;width:100%;display:block;--hb-topics-card-selected-background-color:#e9ecef;--hb-topics-card-hover-background-color:#f5f5f5;--hb-topics-card-size:calc(1vw + 1vh + 12px);--hb-topics-card-padding:4px;--hb-topics-card-double-size:calc(var(--hb-topics-card-size) * 2);--hb-topics-card-double-padding:calc(var(--hb-topics-card-padding) * 2)}.grid{display:grid;grid-template-areas:"img header" "img details";grid-template-columns:var(--hb-topics-card-double-size) calc(100% - var(--hb-topics-card-double-size));grid-template-rows:calc(var(--hb-topics-card-size) + var(--hb-topics-card-double-padding)) calc(var(--hb-topics-card-size) + var(--hb-topics-card-padding))}.grid:hover{background-color:var(--hb-topics-card-hover-background-color)}img{padding:var(--hb-topics-card-padding);grid-area:img;height:calc(var(--hb-topics-card-size) + var(--hb-topics-card-double-padding) + var(--hb-topics-card-size) + var(--hb-topics-card-padding));width:calc(var(--hb-topics-card-size) + var(--hb-topics-card-double-padding) + var(--hb-topics-card-size) + var(--hb-topics-card-padding));border-radius:50%}.header{grid-area:header;padding:var(--hb-topics-card-padding) var(--hb-topics-card-padding) var(--hb-topics-card-padding) 10px;line-height:calc(var(--hb-topics-card-size) + 0px)}.details{padding:var(--hb-topics-card-padding) var(--hb-topics-card-padding) var(--hb-topics-card-padding) 10px;grid-area:details;line-height:calc(var(--hb-topics-card-size) - var(--hb-topics-card-double-padding))}.title{font-size:1.5em;font-weight:600}.description{font-size:1em;font-weight:300;opacity:0.8}.time{font-size:0.8em;font-weight:300;opacity:0.6}.right{position:absolute;right:var(--hb-topics-card-padding)}.text-item{margin-left:12px;margin-right:6px}:host{--bs-blue:var(--bs-primary,#07689f);--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:var(--bs-danger,#f67280);--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:var(--bs-warning,#ffc107);--bs-teal:#20c997;--bs-cyan:var(--bs-info,#a2d5f2);--bs-white:#fff;--bs-gray:var(--bs-secondary,#c9d6df);--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:var(--bs-secondary,#c9d6df);--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:var(--bs-primary,#07689f);--bs-secondary:var(--bs-secondary,#c9d6df);--bs-success:var(--bs-warning,#ffc107);--bs-info:var(--bs-info,#a2d5f2);--bs-warning:#ffc107;--bs-danger:var(--bs-danger,#f67280);--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:13, 110, 253;--bs-secondary-rgb:108, 117, 125;--bs-success-rgb:25, 135, 84;--bs-info-rgb:13, 202, 240;--bs-warning-rgb:255, 193, 7;--bs-danger-rgb:220, 53, 69;--bs-light-rgb:248, 249, 250;--bs-dark-rgb:33, 37, 41;--bs-white-rgb:255, 255, 255;--bs-black-rgb:0, 0, 0;--bs-body-color-rgb:33, 37, 41;--bs-body-bg-rgb:255, 255, 255;--bs-font-sans-serif:system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--bs-font-monospace:SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#212529;--bs-body-bg:#fff}*,*::before,*::after{box-sizing:border-box}@media(prefers-reduced-motion: no-preference){:host{scroll-behavior:smooth}}@media(min-width: 1200px){}@media(min-width: 1200px){}@media(min-width: 1200px){}@media(min-width: 1200px){}img{vertical-align:middle}::-moz-focus-inner{padding:0;border-style:none}@media(min-width: 1200px){}::-webkit-datetime-edit-fields-wrapper,::-webkit-datetime-edit-text,::-webkit-datetime-edit-minute,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-year-field{padding:0}::-webkit-inner-spin-button{height:auto}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-color-swatch-wrapper{padding:0}::file-selector-button{font:inherit}::-webkit-file-upload-button{font:inherit;-webkit-appearance:button}.badge{display:inline-block;padding:0.35em 0.65em;font-size:0.75em;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:0.25rem}.badge:empty{display:none}.bg-secondary{--bs-bg-opacity:1;background-color:rgba(var(--bs-secondary-rgb), var(--bs-bg-opacity)) !important}.rounded-pill{border-radius:50rem !important}@media(min-width: 576px){}@media(min-width: 768px){}@media(min-width: 992px){}@media(min-width: 1200px){}@media(min-width: 1400px){}@media(min-width: 1200px){}@media print{}</style>',I(this,{target:this.shadowRoot,props:v(this.attributes),customElement:!0},et,tt,i,{id:2,style:3,chats:0},null),t&&(t.target&&l(t.target,this,t.anchor),t.props&&(this.$set(t.props),T()))}static get observedAttributes(){return["id","style","chats"]}get id(){return this.$$.ctx[2]}set id(t){this.$$set({id:t}),T()}get style(){return this.$$.ctx[3]}set style(t){this.$$set({style:t}),T()}get chats(){return this.$$.ctx[0]}set chats(t){this.$$set({chats:t}),T()}}return customElements.define("hb-messages-topics-card",nt),nt}();
|
|
2
2
|
//# sourceMappingURL=release.js.map
|