@subiz/widget-v4 4.1.108 → 4.1.109

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.
Files changed (100) hide show
  1. package/compiled_src/chatbox/TextMessage.js +4 -2
  2. package/compiled_src/chatbox/Widget.js +1 -0
  3. package/compiled_src/chatbox/block.js +27 -1
  4. package/compiled_src/store/store.js +10 -6
  5. package/package.json +10 -10
  6. package/src/chatbox/TextMessage.js +2 -2
  7. package/src/chatbox/Widget.js +1 -0
  8. package/src/chatbox/block.js +29 -2
  9. package/src/store/store.js +7 -3
  10. package/dist/132.js +0 -6661
  11. package/dist/178.js +0 -406
  12. package/dist/18a02a9c54e.132.js +0 -1
  13. package/dist/18a02a9c54e.178.js +0 -1
  14. package/dist/18a02a9c54e.213.js +0 -1
  15. package/dist/18a02a9c54e.335.js +0 -1
  16. package/dist/18a02a9c54e.362.js +0 -1
  17. package/dist/18a02a9c54e.441.js +0 -1
  18. package/dist/18a02a9c54e.605.js +0 -1
  19. package/dist/18a02a9c54e.678.js +0 -1
  20. package/dist/18a02a9c54e.782.js +0 -1
  21. package/dist/18a02a9c54e.app.js +0 -1
  22. package/dist/18a02a9c54e.index.html +0 -33
  23. package/dist/18a02a9c54e.library.html +0 -33
  24. package/dist/18a02a9c54e.library.js +0 -1
  25. package/dist/18a02a9c54e.preview.html +0 -759
  26. package/dist/18a02a9c54e.preview.js +0 -1
  27. package/dist/18a02a9c54e.screenshoot.js +0 -1
  28. package/dist/18a02a9c54e.webview.js +0 -1
  29. package/dist/213.js +0 -2780
  30. package/dist/335.js +0 -372
  31. package/dist/362.js +0 -107
  32. package/dist/441.js +0 -2855
  33. package/dist/605.js +0 -305
  34. package/dist/678.js +0 -107
  35. package/dist/782.js +0 -107
  36. package/dist/HASH +0 -1
  37. package/dist/assets/img/Facebook.64607ec.png +0 -0
  38. package/dist/assets/img/Zalo.6845707.png +0 -0
  39. package/dist/assets/img/award1a.1a58e10.png +0 -0
  40. package/dist/assets/img/award3a.3b74423.png +0 -0
  41. package/dist/assets/img/award4a.ed6ccd4.png +0 -0
  42. package/dist/assets/img/award5.39eb7ae.png +0 -0
  43. package/dist/assets/img/bubble_default.7d5e4ab.svg +0 -20
  44. package/dist/assets/img/caret.998eb8f.svg +0 -1
  45. package/dist/assets/img/convos_empty.2353007.svg +0 -72
  46. package/dist/assets/img/default.06e6ee0.jpg +0 -0
  47. package/dist/assets/img/default_avatar.5b74dc1.png +0 -0
  48. package/dist/assets/img/done_gray.d7e8203.svg +0 -4
  49. package/dist/assets/img/done_green.b817fd4.svg +0 -4
  50. package/dist/assets/img/emoji/messenger/sub_23.529_58.824.d5faf14.png +0 -0
  51. package/dist/assets/img/emoji/messenger/sub_23.529_60.784.1420241.png +0 -0
  52. package/dist/assets/img/emoji/messenger/sub_25.490_0.000.1e6b2c0.png +0 -0
  53. package/dist/assets/img/emoji/messenger/sub_25.490_45.098.3dfbc08.png +0 -0
  54. package/dist/assets/img/emoji/messenger/sub_25.490_5.882.4b49e94.png +0 -0
  55. package/dist/assets/img/emoji/messenger/sub_27.451_72.549.7114f58.png +0 -0
  56. package/dist/assets/img/emoji/messenger/sub_27.451_84.314.231e2b7.png +0 -0
  57. package/dist/assets/img/emoji/messenger/sub_27.451_96.078.ddbb008.png +0 -0
  58. package/dist/assets/img/emoji/messenger/sub_29.412_5.882.61f3359.png +0 -0
  59. package/dist/assets/img/emoji/messenger/sub_58.824_100.000.6df72bc.png +0 -0
  60. package/dist/assets/img/emoji/messenger/sub_58.824_45.098.3d7a7ad.png +0 -0
  61. package/dist/assets/img/emoji/messenger/sub_58.824_47.059.0f4d6e2.png +0 -0
  62. package/dist/assets/img/emoji/messenger/sub_58.824_54.902.65724c1.png +0 -0
  63. package/dist/assets/img/emoji/messenger/sub_58.824_64.706.9da3cba.png +0 -0
  64. package/dist/assets/img/emoji/messenger/sub_58.824_72.549.edca5cf.png +0 -0
  65. package/dist/assets/img/emoji/messenger/sub_58.824_78.431.f910f2a.png +0 -0
  66. package/dist/assets/img/emoji/messenger/sub_58.824_88.235.def4e71.png +0 -0
  67. package/dist/assets/img/emoji/messenger/sub_60.784_11.765.49c03d0.png +0 -0
  68. package/dist/assets/img/emoji/messenger/sub_60.784_27.451.46b54e5.png +0 -0
  69. package/dist/assets/img/emoji/messenger/sub_60.784_29.412.e36d284.png +0 -0
  70. package/dist/assets/img/emoji/messenger/sub_60.784_3.922.bb191b0.png +0 -0
  71. package/dist/assets/img/emoji/messenger/sub_60.784_35.294.af7b927.png +0 -0
  72. package/dist/assets/img/emoji/messenger/sub_60.784_7.843.98f2a99.png +0 -0
  73. package/dist/assets/img/empty.29bed2d.svg +0 -23
  74. package/dist/assets/img/empty_1.0b98af0.svg +0 -11
  75. package/dist/assets/img/examplte_logo.f86535f.svg +0 -1
  76. package/dist/assets/img/external-link.90577cc.svg +0 -1
  77. package/dist/assets/img/fb_inverse_circle.36c2cfc.png +0 -0
  78. package/dist/assets/img/ghn.070f8e3.svg +0 -17
  79. package/dist/assets/img/ghtk.326eac1.svg +0 -18
  80. package/dist/assets/img/image_default.be0698b.png +0 -0
  81. package/dist/assets/img/info.ebce7ea.svg +0 -1
  82. package/dist/assets/img/loader.37000a7.svg +0 -1
  83. package/dist/assets/img/loading_static.a27f0ac.svg +0 -10
  84. package/dist/assets/img/main-service1.d536cc2.png +0 -0
  85. package/dist/assets/img/main-service2.9b99549.png +0 -0
  86. package/dist/assets/img/not_found_search.2ddb8d1.png +0 -0
  87. package/dist/assets/img/package.8d37d0f.svg +0 -5
  88. package/dist/assets/img/package_fade.763c001.svg +0 -1
  89. package/dist/assets/img/rating--average.1ea492c.svg +0 -12
  90. package/dist/assets/img/rating--great.e3d712e.svg +0 -16
  91. package/dist/assets/img/rating--poor.2938a25.svg +0 -12
  92. package/dist/assets/img/search.f9705ff.svg +0 -1
  93. package/dist/assets/img/send.6db52a9.svg +0 -3
  94. package/dist/assets/img/shop.f7dc7d8.svg +0 -1
  95. package/dist/assets/img/shop_faded.df7845a.svg +0 -1
  96. package/dist/assets/img/subiz-mono.877e9f5.svg +0 -3
  97. package/dist/assets/img/x.26fdfa3.svg +0 -5
  98. package/dist/malicious-app.js +0 -13
  99. package/dist/screenshoot.html +0 -7
  100. package/dist/screenshoot.js +0 -6434
package/dist/605.js DELETED
@@ -1,305 +0,0 @@
1
- "use strict";
2
- (self["webpackChunk_subiz_widget_v4"] = self["webpackChunk_subiz_widget_v4"] || []).push([[605],{
3
-
4
- /***/ 9605:
5
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6
-
7
- __webpack_require__.r(__webpack_exports__);
8
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9
- /* harmony export */ "default": () => (/* binding */ Notif)
10
- /* harmony export */ });
11
- /* harmony import */ var _util_index_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(4494);
12
- /* harmony import */ var preact__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6400);
13
- /* harmony import */ var _common_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2493);
14
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
15
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
16
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
17
-
18
-
19
-
20
- let notifCSS = (() => __webpack_require__.e(/* import() */ 362).then(__webpack_require__.bind(__webpack_require__, 362)))();
21
- class Notif extends _common_js__WEBPACK_IMPORTED_MODULE_2__/* .Com */ .up {
22
- constructor(props) {
23
- super(props);
24
- _defineProperty(this, "state", {
25
- close: true,
26
- cssready: false,
27
- closeAnimation: true,
28
- imageReady: false,
29
- user: {},
30
- timestamp: '',
31
- message: '',
32
- title: '',
33
- last_show: 0
34
- });
35
- _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].setTimeout */ .Z.setTimeout(async () => {
36
- let {
37
- body: impression
38
- } = await this.props.store.sendImpression(this.props.plugin.id);
39
- this.impressionToken = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(impression, 'impression_token') || '';
40
- let image = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(this.props, 'plugin.notification.background_url');
41
- _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].preloadImg */ .Z.preloadImg(image, () => this.setState({
42
- imageReady: true
43
- }));
44
- });
45
- }
46
- setOver(over) {
47
- if (!over) this.mouse_leave = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].Date.now */ .Z.Date.now();else this.mouse_leave = 0;
48
- }
49
- randomTimestampt() {
50
- let random = Math.floor(Math.random() * 5);
51
- if (random == 0) return this.props.t('just_now');
52
- if (random == 1) return '1 ' + this.props.t('minute_ago');
53
- if (random == 2) return '2 ' + this.props.t('minutes_ago');
54
- if (random == 3) return '3 ' + this.props.t('minutes_ago');
55
- return '4 ' + this.props.t('minutes_ago');
56
- }
57
- onClick(e) {
58
- e.stopPropagation();
59
- if (this.props.plugin._dont_follow) return;
60
- this.props.store.sendConversion(this.props.plugin.id, null, this.impressionToken);
61
- let url = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(this.props, 'plugin.notification.url');
62
- if (!url) return;
63
- if (!url.startsWith('http://') && !url.startsWith('https://')) url = '//' + url;
64
- let new_tab = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(this.props, 'plugin.notification.new_tab', false);
65
- if (new_tab) return window.open(url);
66
- window.location.href = url;
67
- }
68
- onCloseButtonClick(e) {
69
- e.preventDefault();
70
- e.stopPropagation();
71
- this.setClose(true);
72
- }
73
- renderCloseButton() {
74
- return (0,preact__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
75
- class: "btn_close",
76
- onClick: e => this.onCloseButtonClick(e)
77
- }, (0,preact__WEBPACK_IMPORTED_MODULE_1__.h)("svg", {
78
- class: "btn_close__icon",
79
- xmlns: "http://www.w3.org/2000/svg",
80
- width: "24",
81
- height: "24",
82
- viewBox: "0 0 24 24",
83
- "stroke-linecap": "round",
84
- "stroke-linejoin": "round"
85
- }, (0,preact__WEBPACK_IMPORTED_MODULE_1__.h)("line", {
86
- x1: "18",
87
- y1: "6",
88
- x2: "6",
89
- y2: "18",
90
- style: "stroke-width: 3 !important;"
91
- }), (0,preact__WEBPACK_IMPORTED_MODULE_1__.h)("line", {
92
- x1: "6",
93
- y1: "6",
94
- x2: "18",
95
- y2: "18",
96
- style: "stroke-width: 3 !important;"
97
- })));
98
- }
99
- async waitForT() {
100
- if (this.props.t) return;
101
- await _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].sleep */ .Z.sleep(100);
102
- return this.waitForT();
103
- }
104
- async setClose(close) {
105
- await this.waitForT();
106
- if (!this.props.t) return;
107
- if (!close) {
108
- _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].clearTimeout */ .Z.clearTimeout(this.lastCloseTimeout);
109
- this.setState({
110
- closeAnimation: false
111
- });
112
- let timestamp = this.randomTimestampt();
113
- let profiles = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(this.props, 'plugin.notification.profiles', []);
114
- let user = profiles[Math.floor(Math.random() * _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].size */ .Z.size(profiles))] || {};
115
- if (user.avatar_url && user.avatar_url.startsWith('http')) {
116
- await _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].preloadImg */ .Z.preloadImg(user.avatar_url);
117
- }
118
- _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].map */ .Z.map(_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(this.props.plugin, 'notification.custom_avatar_urls'), url => {
119
- profiles.push({
120
- type: 'person',
121
- fullname: randomName(),
122
- avatar_url: url,
123
- email: randomEmail(),
124
- address: randomAddress(),
125
- phone: ramdomPhone(),
126
- age: randomAge()
127
- });
128
- });
129
- let i18n_messages = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(this.props, 'plugin.notification.i18n_message_quill_deltas', []);
130
- let i18n_message = i18n_messages[Math.floor(Math.random() * _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].size */ .Z.size(i18n_messages))];
131
- let fallbackmsgs = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(this.props, 'plugin.notification.message_quill_deltas', []);
132
- let fallbackmessage = fallbackmsgs[Math.floor(Math.random() * _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].size */ .Z.size(fallbackmsgs))];
133
- let i18n_title = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(this.props, 'plugin.notification.i18n_title_quill_delta');
134
- return this.setState({
135
- close: false,
136
- last_show: _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].Date.now */ .Z.Date.now(),
137
- timestamp: timestamp,
138
- user: user,
139
- title: this.props.t.i18n(i18n_title) || _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(this.props, 'plugin.notification.title_quill_delta'),
140
- message: this.props.t.i18n(i18n_message) || fallbackmessage
141
- });
142
- }
143
- this.setState({
144
- closeAnimation: true
145
- });
146
- this.mouse_leave = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].Date.now */ .Z.Date.now();
147
- this.lastCloseTimeout = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].setTimeout */ .Z.setTimeout(() => this.setState({
148
- close: true,
149
- closeAnimation: false
150
- }), 150);
151
- if (this.props.plugin._dont_close) _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].setTimeout */ .Z.setTimeout(() => this.setState({
152
- closeAnimation: false,
153
- close: false
154
- }), 1000);
155
- }
156
- async refreshCSS() {
157
- let plugins = this.props.store.matchPlugin();
158
- let found = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].find */ .Z.find(plugins, plugin => plugin.id === this.props.plugin.id);
159
- if (!found) return;
160
- let css = (await notifCSS).default.default.toString();
161
- _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].setCss */ .Z.setCss(this.props.plugin.id, this.$cssStyleDiv, css);
162
- this.setClose(this.state.close);
163
- }
164
- componentWillUnmount() {
165
- _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].clearInterval */ .Z.clearInterval(this.interval);
166
- _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].setCss */ .Z.setCss(this.props.plugin.id, this.$cssStyleDiv, '');
167
- }
168
- async componentDidMount() {
169
- this.setState({
170
- last_show: _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].Date.now */ .Z.Date.now()
171
- });
172
- this.$cssStyleDiv = document.getElementById('subiz-style-for-' + this.props.plugin.id);
173
- if (!this.$cssStyleDiv) {
174
- this.$cssStyleDiv = document.createElement('style');
175
- document.head.appendChild(this.$cssStyleDiv);
176
- this.$cssStyleDiv.type = 'text/css';
177
- this.$cssStyleDiv.id = 'subiz-style-for-' + this.props.plugin.id;
178
- }
179
- this.props.store.onResetCSS(this, () => this.refreshCSS());
180
- await this.refreshCSS();
181
- this.interval = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].setInterval */ .Z.setInterval(() => {
182
- if (this.props._destroy) return this.componentWillUnmount();
183
- let mouseleave = this.mouse_leave;
184
- if (mouseleave === 0) mouseleave = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].Date.now */ .Z.Date.now();
185
- if (_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].Date.now */ .Z.Date.now() - mouseleave < 1000) return;
186
- if (!this.state.close && !this.props.plugin._dont_close) {
187
- if (_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].Date.now */ .Z.Date.now() - this.state.last_show > 8000) return this.setClose(true);
188
- return;
189
- }
190
- if (_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].Date.now */ .Z.Date.now() - this.state.last_show > this.props.plugin.notification.interval_sec) {
191
- return this.setClose(false);
192
- }
193
- }, 1000);
194
- _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].setTimeout */ .Z.setTimeout(() => {
195
- this.setState({
196
- cssready: true
197
- });
198
- this.setClose(false);
199
- }, 50);
200
- }
201
- renderTextFromQuillDelta(quilldelta, profile) {
202
- let qd = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].parseJSON */ .Z.parseJSON(quilldelta);
203
- if (!qd || !qd.ops) return null;
204
- let out = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].map */ .Z.map(qd.ops, op => {
205
- let out = null;
206
- if (!op.insert) return null;
207
- if (typeof op.insert == 'string') out = op.insert;
208
- if (_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(op, 'insert.dynamicField')) {
209
- let key = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(op, 'insert.dynamicField.key');
210
- if (key === 'user.fullname') out = profile.fullname;
211
- if (key === 'user.email') out = profile.email;
212
- if (key === 'user.address') out = profile.address;
213
- if (key === 'user.phone') out = profile.phone;
214
- }
215
- if (_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(op, 'attributes.bold')) out = (0,preact__WEBPACK_IMPORTED_MODULE_1__.h)("b", null, out);
216
- if (_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(op, 'attributes.italic')) out = (0,preact__WEBPACK_IMPORTED_MODULE_1__.h)("b", null, out);
217
- return out;
218
- }).filter(a => a);
219
- if (out.length == 1 && (out[0] == '\n' || out[0] == '')) return [];
220
- return out;
221
- }
222
- render() {
223
- if (!this.props.t) return null;
224
- if (!this.state.cssready) return null;
225
- if (!this.state.imageReady) return null;
226
- if (this.state.close) return null;
227
- if (!this.state.message) return null;
228
- let notif = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(this.props.plugin, 'notification', {});
229
- if (!notif) return null;
230
- let animation = '';
231
- let pos = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(notif, 'position', 'bottom-left');
232
- if (this.props.mobile) pos = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(notif, 'mobile_position', pos);
233
- if (pos === 'top-left' || pos === 'top-right') animation = 'fadeInDown';else if (pos === 'top-center') animation = 'fadeInDownCenter';else if (pos === 'bottom-center') animation = 'fadeInUpCenter';else if (pos === 'bottom-right') {
234
- animation = 'fadeInUpBig';
235
- } else {
236
- pos = 'bottom-left';
237
- animation = 'fadeInUpBig';
238
- }
239
- let user = this.state.user || {};
240
- let subtextStyle = notif.subtext_style || {};
241
- if (subtextStyle.color === undefined) subtextStyle.color = _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].get */ .Z.get(notif, 'message_style.color', 'black');
242
- let st = 'position: fixed !important; z-index: 1000000000 !important';
243
- if (this.props.plugin._preview) st = 'position: absolute !important;';
244
- if (this.state.closeAnimation) animation = 'fadeOut';
245
- let $avatar = null;
246
- if (user.avatar_url) $avatar = (0,preact__WEBPACK_IMPORTED_MODULE_1__.h)("img", {
247
- alt: "notification avatar",
248
- class: "notif_avatar__img",
249
- src: user.avatar_url
250
- });
251
- let $time = (0,preact__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
252
- class: "notif_time",
253
- style: _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].js2css */ .Z.js2css(notif.subtext_style)
254
- }, this.state.timestamp);
255
- let $title = this.renderTextFromQuillDelta(this.state.title, user);
256
- let $message = this.renderTextFromQuillDelta(this.state.message, user);
257
- if (!_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].size */ .Z.size($title) && !_util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].size */ .Z.size($message)) $time = null;
258
- return (0,preact__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
259
- class: animation + ' notif' + ' notif__' + pos,
260
- onClick: e => this.onClick(e),
261
- onmouseover: e => this.setOver(true),
262
- style: st,
263
- onmouseleave: e => this.setOver(false)
264
- }, (0,preact__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
265
- style: "position: relative !important; display: flex !important; align-items: center !important;"
266
- }, (0,preact__WEBPACK_IMPORTED_MODULE_1__.h)("img", {
267
- alt: "notification background",
268
- class: "notif_bg",
269
- src: notif.background_url,
270
- style: _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].js2css */ .Z.js2css(notif.background_style)
271
- }), this.renderCloseButton(), (0,preact__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
272
- class: "notif_avatar",
273
- style: _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].js2css */ .Z.js2css(notif.avatar_style)
274
- }, $avatar), (0,preact__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
275
- class: "notif_body"
276
- }, (0,preact__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
277
- class: "notif_title",
278
- style: _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].js2css */ .Z.js2css(notif.title_style)
279
- }, $title), (0,preact__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
280
- class: "notif_message",
281
- style: _util_index_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"].js2css */ .Z.js2css(notif.message_style)
282
- }, $message), $time)));
283
- }
284
- }
285
- function randomName() {
286
- let db = ['Kiều Thanh', 'Phương Anh', 'Lê Thùy Linh', 'Trang Nguyễn', 'Thanh Hoa', 'Hoài Đức', 'Huơng Giang'];
287
- return db[Math.floor(Math.random() * db.length)];
288
- }
289
- function randomAge() {
290
- return 15 + Math.floor(Math.random() * 20);
291
- }
292
- function ramdomPhone() {
293
- return '+84' + Math.floor(Math.random() * 10) + Math.floor(Math.random() * 10) + Math.floor(Math.random() * 10) + Math.floor(Math.random() * 10) + Math.floor(Math.random() * 10) + Math.floor(Math.random() * 10) + 'xxxx';
294
- }
295
- function randomEmail() {
296
- return randomName().split(' ').join('.').toLowerCase() + '@gmail.com';
297
- }
298
- function randomAddress() {
299
- let db = ['Dịch Vọng Hậu, Cầu Giấy', 'Quận 1, TP Hồ Chí Minh', 'Ngõ 34 Tôn Thất Thuyết', '87 Phạm Hùng', 'Đống Đa, Hà Nội'];
300
- return db[Math.floor(Math.random() * db.length)];
301
- }
302
-
303
- /***/ })
304
-
305
- }]);
package/dist/678.js DELETED
@@ -1,107 +0,0 @@
1
- "use strict";
2
- (self["webpackChunk_subiz_widget_v4"] = self["webpackChunk_subiz_widget_v4"] || []).push([[678],{
3
-
4
- /***/ 2678:
5
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
6
-
7
- __webpack_require__.r(__webpack_exports__);
8
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
9
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
10
- /* harmony export */ });
11
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (__webpack_require__(3048));
12
-
13
- /***/ }),
14
-
15
- /***/ 3048:
16
- /***/ ((module, __webpack_exports__, __webpack_require__) => {
17
-
18
- __webpack_require__.r(__webpack_exports__);
19
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
20
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
21
- /* harmony export */ });
22
- /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(3645);
23
- /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
24
- // Imports
25
-
26
- var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(function(i){return i[1]});
27
- // Module
28
- ___CSS_LOADER_EXPORT___.push([module.id, "/*\n#sbz92 * {\n\tall: unset !important;\n}\n\n#sbz92 {\n\tz-index: @z-index + 100 !important;\n\t#makeImportant() !important;\n}\n\n// prevent #subiz inheriting client site styles\ndiv#sbz92 {\n\tall: initial;\n}\n\n// prevent #subiz inheriting client site !important styles\nbody div#sbz92 {\n\tall: initial !important;\n}\n\nbody div#sbz92 .overlay {\n\tposition: fixed !important;\n\tuser-select: none !important;\n}\n*/\n#sbz92 {\n z-index: 2000000100 !important;\n /* Handle on hover */\n}\n#sbz92 *,\n#sbz92 *::before,\n#sbz92 *::after {\n box-sizing: border-box;\n}\n#sbz92 [tabindex='-1']:focus:not(:focus-visible) {\n outline: 0;\n}\n#sbz92 b,\n#sbz92 strong {\n font-weight: 500;\n}\n#sbz92 a {\n color: #020202;\n text-decoration: none;\n background-color: transparent;\n}\n#sbz92 a:hover {\n cursor: pointer;\n color: #000000;\n text-decoration: underline;\n}\n#sbz92 a:not([href]) {\n color: inherit;\n text-decoration: none;\n}\n#sbz92 a:not([href]):hover {\n color: inherit;\n text-decoration: none;\n}\n#sbz92 img {\n vertical-align: middle;\n border-style: none;\n}\n#sbz92 svg {\n overflow: hidden;\n vertical-align: middle;\n}\n#sbz92 label {\n display: inline-block;\n}\n#sbz92 button {\n border-radius: 0;\n}\n#sbz92 button:focus {\n outline: 1px dotted;\n outline: 5px auto -webkit-focus-ring-color;\n}\n#sbz92 input,\n#sbz92 button,\n#sbz92 select,\n#sbz92 optgroup,\n#sbz92 textarea {\n margin: 0;\n}\n#sbz92 button,\n#sbz92 input {\n overflow: visible;\n}\n#sbz92 button,\n#sbz92 select {\n text-transform: none;\n}\n#sbz92 select {\n word-wrap: normal;\n}\n#sbz92 button,\n#sbz92 [type=\"button\"],\n#sbz92 [type=\"reset\"],\n#sbz92 [type=\"submit\"] {\n -webkit-appearance: button;\n}\n#sbz92 button:not(:disabled),\n#sbz92 [type='button']:not(:disabled),\n#sbz92 [type='reset']:not(:disabled),\n#sbz92 [type='submit']:not(:disabled) {\n cursor: pointer;\n}\n#sbz92 button::-moz-focus-inner,\n#sbz92 [type='button']::-moz-focus-inner,\n#sbz92 [type='reset']::-moz-focus-inner,\n#sbz92 [type='submit']::-moz-focus-inner {\n padding: 0;\n border-style: none;\n}\n#sbz92 input[type='radio'],\n#sbz92 input[type='checkbox'] {\n box-sizing: border-box;\n padding: 0;\n}\n#sbz92 input[type='date'],\n#sbz92 input[type='time'],\n#sbz92 input[type='datetime-local'],\n#sbz92 input[type='month'] {\n -webkit-appearance: listbox;\n}\n#sbz92 textarea {\n overflow: auto;\n resize: vertical;\n}\n#sbz92 [type='number']::-webkit-inner-spin-button,\n#sbz92 [type='number']::-webkit-outer-spin-button {\n height: auto;\n}\n#sbz92 [hidden] {\n display: none;\n}\n#sbz92 ::-webkit-input-placeholder {\n /* Edge */\n color: #777;\n}\n#sbz92 :-ms-input-placeholder {\n /* Internet Explorer 10-11 */\n color: #777;\n}\n#sbz92 ::placeholder {\n color: #777;\n}\n#sbz92 div {\n display: block;\n text-rendering: geometricPrecision;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n}\n#sbz92 ::-webkit-scrollbar {\n width: 7px;\n height: 7px;\n}\n#sbz92 ::-webkit-scrollbar-track {\n border-radius: 10px;\n}\n#sbz92 ::-webkit-scrollbar-thumb {\n border-radius: 10px;\n background: #d6d6d6;\n}\n#sbz92 ::-webkit-scrollbar-thumb:hover {\n background: #aaa;\n}\n#sbz92 .overlay {\n position: fixed;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n background: #000c;\n z-index: 20000000000100;\n overflow: auto;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n#sbz92 .overlay.overlay__hidden {\n display: none;\n}\n#sbz92 .map_modal {\n max-with: 80%;\n max-height: 80%;\n width: 400px;\n height: 400px;\n background: white;\n}\n#sbz92 .map_body {\n width: 100%;\n height: 100%;\n display: flex;\n}\n#sbz92 .map_location {\n border-bottom: 1px solid lightgray;\n padding: 20px;\n font-size: 16px;\n font-family: 'roboto';\n}\n#sbz92 .map_title {\n font-size: 18px;\n font-weight: 500;\n padding: 10px;\n text-align: center;\n border-bottom: 1px solid lightgray;\n font-family: 'roboto';\n}\n#sbz92 .map_locations {\n border-right: 1px solid lightgray;\n width: 200px;\n height: 100%;\n}\n#sbz92 .sm.contact_button {\n width: 40px;\n height: 40px;\n}\n#sbz92 .lg.contact_button {\n width: 60px;\n height: 60px;\n}\n#sbz92 .contact_button {\n width: 50px;\n height: 50px;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n background: pink;\n}\n", ""]);
29
- // Exports
30
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
31
-
32
-
33
- /***/ }),
34
-
35
- /***/ 3645:
36
- /***/ ((module) => {
37
-
38
-
39
-
40
- /*
41
- MIT License http://www.opensource.org/licenses/mit-license.php
42
- Author Tobias Koppers @sokra
43
- */
44
- // css base code, injected by the css-loader
45
- // eslint-disable-next-line func-names
46
- module.exports = function (cssWithMappingToString) {
47
- var list = []; // return the list of modules as css string
48
-
49
- list.toString = function toString() {
50
- return this.map(function (item) {
51
- var content = cssWithMappingToString(item);
52
-
53
- if (item[2]) {
54
- return "@media ".concat(item[2], " {").concat(content, "}");
55
- }
56
-
57
- return content;
58
- }).join("");
59
- }; // import a list of modules into the list
60
- // eslint-disable-next-line func-names
61
-
62
-
63
- list.i = function (modules, mediaQuery, dedupe) {
64
- if (typeof modules === "string") {
65
- // eslint-disable-next-line no-param-reassign
66
- modules = [[null, modules, ""]];
67
- }
68
-
69
- var alreadyImportedModules = {};
70
-
71
- if (dedupe) {
72
- for (var i = 0; i < this.length; i++) {
73
- // eslint-disable-next-line prefer-destructuring
74
- var id = this[i][0];
75
-
76
- if (id != null) {
77
- alreadyImportedModules[id] = true;
78
- }
79
- }
80
- }
81
-
82
- for (var _i = 0; _i < modules.length; _i++) {
83
- var item = [].concat(modules[_i]);
84
-
85
- if (dedupe && alreadyImportedModules[item[0]]) {
86
- // eslint-disable-next-line no-continue
87
- continue;
88
- }
89
-
90
- if (mediaQuery) {
91
- if (!item[2]) {
92
- item[2] = mediaQuery;
93
- } else {
94
- item[2] = "".concat(mediaQuery, " and ").concat(item[2]);
95
- }
96
- }
97
-
98
- list.push(item);
99
- }
100
- };
101
-
102
- return list;
103
- };
104
-
105
- /***/ })
106
-
107
- }]);