@creaditor/newsletter-starterkit 1.0.55 → 1.0.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/1260.creaditor.bundle.js +23 -16
- package/dist/1260.creaditor.bundle.js.gz +0 -0
- package/dist/170.creaditor.bundle.js +21 -20
- package/dist/170.creaditor.bundle.js.gz +0 -0
- package/dist/453.creaditor.bundle.js +11 -111
- package/dist/453.creaditor.bundle.js.gz +0 -0
- package/dist/4569.creaditor.bundle.js +3 -3
- package/dist/4569.creaditor.bundle.js.gz +0 -0
- package/dist/4970.creaditor.bundle.js +1314 -0
- package/dist/4970.creaditor.bundle.js.gz +0 -0
- package/dist/5340.creaditor.bundle.js +17 -17
- package/dist/5340.creaditor.bundle.js.gz +0 -0
- package/dist/5926.creaditor.bundle.js +9 -5
- package/dist/5926.creaditor.bundle.js.gz +0 -0
- package/dist/752.creaditor.bundle.js +4 -4
- package/dist/752.creaditor.bundle.js.gz +0 -0
- package/dist/763.creaditor.bundle.js +34 -1
- package/dist/763.creaditor.bundle.js.gz +0 -0
- package/dist/7937.creaditor.bundle.js +17 -17
- package/dist/7937.creaditor.bundle.js.gz +0 -0
- package/dist/8646.creaditor.bundle.js +1 -0
- package/dist/8646.creaditor.bundle.js.gz +0 -0
- package/dist/9994.creaditor.bundle.js +114 -0
- package/dist/9994.creaditor.bundle.js.gz +0 -0
- package/dist/creaditor.bundle.js +513 -174
- package/dist/creaditor.bundle.js.gz +0 -0
- package/dist/service-worker.js +1 -1
- package/dist/service-worker.js.gz +0 -0
- package/package.json +1 -1
|
@@ -238,20 +238,27 @@
|
|
|
238
238
|
paper-button.gallery,
|
|
239
239
|
paper-button.backgrounds {
|
|
240
240
|
text-transform: none;
|
|
241
|
-
font-size:
|
|
241
|
+
font-size: var(--text-sm, 13px);
|
|
242
242
|
font-weight: 500;
|
|
243
243
|
letter-spacing: 0.01em;
|
|
244
|
-
border-radius: 6px;
|
|
245
|
-
padding:
|
|
244
|
+
border-radius: var(--radius-sm, 6px);
|
|
245
|
+
padding: var(--space-2, 8px) var(--space-4, 16px);
|
|
246
246
|
min-width: 0;
|
|
247
|
+
transition: background var(--duration-fast, 120ms) var(--ease-default, ease);
|
|
247
248
|
}
|
|
248
249
|
paper-button.gallery {
|
|
249
|
-
background: var(--primary);
|
|
250
|
-
color: var(--primary-text);
|
|
250
|
+
background: var(--color-primary, #6366f1);
|
|
251
|
+
color: var(--color-primary-text, #fff);
|
|
252
|
+
}
|
|
253
|
+
paper-button.gallery:hover {
|
|
254
|
+
background: var(--color-primary-hover, #4f46e5);
|
|
251
255
|
}
|
|
252
256
|
paper-button.backgrounds {
|
|
253
|
-
background: #
|
|
254
|
-
color: #
|
|
257
|
+
background: var(--color-bg-muted, #f4f4f6);
|
|
258
|
+
color: var(--color-text-secondary, #555);
|
|
259
|
+
}
|
|
260
|
+
paper-button.backgrounds:hover {
|
|
261
|
+
background: #eaeaed;
|
|
255
262
|
}
|
|
256
263
|
`,g.properties={maxWidth:{type:Number},backgroundInstance:{type:Object},padding:{type:Object},margin:{type:Object},tabs:{type:Array},tabName:{type:String},galleryOpened:{type:Boolean},backgroundVideo:{type:String,reflect:!0},isBackgroundImage:{type:Boolean},backgroundAttachment:{type:String},backgroundPosition:{type:String},backgroundRepeat:{type:String},backgroundSize:{type:String},noResponsive:{type:Boolean},modalable:{type:Boolean},modalName:{type:String},borderStyle:{type:String},borderWidth:{type:Number},borderColor:{type:String},borderTopRightRadius:{type:Number},borderTopLeftRadius:{type:Number},borderBottomRightRadius:{type:Number},borderBottomLeftRadius:{type:Number},borderTopWidth:{type:Number},borderBottomWidth:{type:Number},borderLeftWidth:{type:Number},borderRightWidth:{type:Number},_sectionsExpanded:{type:Boolean,state:!0}},customElements.define("block-editor",g)},15155(t,e,o){o.d(e,{A:()=>a});var r=o(59929),i=o(57176);class n extends r.WF{constructor(){super(),this.items=[],this.columns=2}async openPicker(t){const e=this.shadowRoot.querySelector(`#picker-${t}`);if(!e)return;await e.updateComplete;const o=e.shadowRoot?.querySelector("color-playground");if(o)if(await o.updateComplete,"function"==typeof o.openColorpicker)o.openColorpicker();else{(o.shadowRoot?.querySelector('[role="button"]')||o.shadowRoot?.querySelector("div")||o).click()}}render(){const t=1===this.columns?"grid single-col":"grid";return r.qy`
|
|
257
264
|
<div class="${t}">
|
|
@@ -351,37 +358,37 @@
|
|
|
351
358
|
--editor-container-inline-padding: 0;
|
|
352
359
|
}
|
|
353
360
|
.section {
|
|
354
|
-
border-bottom: 1px solid
|
|
361
|
+
border-bottom: 1px solid var(--color-border);
|
|
355
362
|
}
|
|
356
363
|
.header {
|
|
357
364
|
display: flex;
|
|
358
365
|
align-items: center;
|
|
359
366
|
justify-content: space-between;
|
|
360
|
-
padding:
|
|
367
|
+
padding: var(--space-3) var(--space-4);
|
|
361
368
|
cursor: pointer;
|
|
362
369
|
user-select: none;
|
|
363
370
|
}
|
|
364
371
|
.title {
|
|
365
|
-
font-size:
|
|
372
|
+
font-size: var(--text-md);
|
|
366
373
|
font-weight: 600;
|
|
367
|
-
color:
|
|
374
|
+
color: var(--color-text);
|
|
368
375
|
letter-spacing: 0.01em;
|
|
369
376
|
}
|
|
370
377
|
.chevron {
|
|
371
378
|
width: 16px;
|
|
372
379
|
height: 16px;
|
|
373
|
-
transition: transform
|
|
374
|
-
color:
|
|
380
|
+
transition: transform var(--duration-normal) var(--ease-default), color var(--duration-fast) var(--ease-default);
|
|
381
|
+
color: var(--color-text-faint);
|
|
375
382
|
}
|
|
376
383
|
.header:hover .chevron {
|
|
377
|
-
color:
|
|
384
|
+
color: var(--color-text-muted);
|
|
378
385
|
}
|
|
379
386
|
.chevron.open {
|
|
380
387
|
transform: rotate(180deg);
|
|
381
388
|
}
|
|
382
389
|
.content {
|
|
383
390
|
overflow: hidden;
|
|
384
|
-
transition: max-height
|
|
391
|
+
transition: max-height var(--duration-normal) var(--ease-default), opacity var(--duration-fast) var(--ease-default);
|
|
385
392
|
max-height: 0;
|
|
386
393
|
opacity: 0;
|
|
387
394
|
}
|
|
@@ -390,7 +397,7 @@
|
|
|
390
397
|
opacity: 1;
|
|
391
398
|
}
|
|
392
399
|
.content-inner {
|
|
393
|
-
padding:
|
|
400
|
+
padding: var(--space-3) var(--space-4) var(--space-3) var(--space-4);
|
|
394
401
|
}
|
|
395
402
|
`,n.properties={label:{type:String},open:{type:Boolean},persistKey:{type:String}},customElements.define("cdtr-editor-section",n);const a=(t,e)=>r.qy`
|
|
396
403
|
<cdtr-editor-section
|
|
Binary file
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[170],{60170(e,t,r){r.r(t),r.d(t,{BreadCrumbs:()=>a});var s=r(5441),
|
|
1
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[170],{60170(e,t,r){r.r(t),r.d(t,{BreadCrumbs:()=>a});var s=r(5441),o=r(59929),i=r(86319),n=r(58371),c=r(36565);class a extends o.WF{constructor(){super(),this.crumbs=[],this.cover=function(){const e=document.createElement("div");return e.style.position="fixed",e.style.background="var(--primary)",e.style.zIndex=2,e.style.border="1px dashed black",e.style.opacity=.2,e}(),this.currectCrumb={},this.onSubscribe=()=>{let e;this.crumbs=[];const t=c.Ay.components[c.Ay.components.length-1];if(!t)return;if(e=t.element,!e)return void console.error("selectElement not found","#1ppqmvss6");let r=t.type.getElementType(),s="";t.props.as&&(s=` (${i.M.get("lang",t.props.as)||t.props.as})`),this.currectCrumb={type:r,as:s,name:t.props.name,id:t.id};if(e){let t=e;for(;t&&t.parentElement;)if(t=t.parentElement.closest("[data-type]"),t){const e=i.M.get("components",t.dataset.id);let r=!0;e&&"row"!==e.type&&("col"===e.type&&"block"!==e.parent().type&&(r=!1),r&&this.crumbs.unshift({type:e.type,name:e.props.name,id:e.id,element:e.element,compose:e}))}this.dispatchEvent(new CustomEvent("change",[...this.crumbs]))}},this.onSubscribe=this.onSubscribe.bind(this)}updated(){this.toggleAttribute("hidden-crumbs",0===this.crumbs.length)}onHover(e){if(e){const t=e.getBoundingClientRect();this.cover.style.left=t.left+"px",this.cover.style.top=t.top+"px",this.cover.style.width=t.width+"px",this.cover.style.height=t.height+"px",document.body.appendChild(this.cover)}}render(){const e=i.M.get("langConfig","direction");return this.crumbs.length>0?o.qy`
|
|
2
2
|
<!-- <cdtr-tooltip content="breadcrumbs_info" .opened=${!0}></cdtr-tooltip> -->
|
|
3
3
|
<div>
|
|
4
|
-
${this.crumbs.map((t,r)=>
|
|
4
|
+
${this.crumbs.map((t,r)=>o.qy` <span
|
|
5
5
|
@mouseout=${()=>this.cover.remove()}
|
|
6
6
|
@mouseover=${()=>this.onHover(t.element)}
|
|
7
7
|
@mousedown=${()=>this.clickBread(t)}
|
|
8
8
|
class="breadcrumb"
|
|
9
|
-
>${t.name||
|
|
10
|
-
>${this.crumbs.length===r?null:(0,s.A)(
|
|
11
|
-
${this.mainText?
|
|
12
|
-
${this.currectCrumb.name||
|
|
9
|
+
>${t.name||o.qy`<lang-text text=${t.type}></lang-text>`}</span
|
|
10
|
+
>${this.crumbs.length===r?null:(0,s.A)(n.D9,{style:{transform:`rotate(${"ltr"===e?"180deg":"0"})`},class:"arrow"})}`)}
|
|
11
|
+
${this.mainText?o.qy` <div class="currect">
|
|
12
|
+
${this.currectCrumb.name||o.qy`<lang-text text=${this.currectCrumb.type}></lang-text
|
|
13
13
|
>${this.currectCrumb.as}`}
|
|
14
14
|
</div>`:null}
|
|
15
15
|
</div>
|
|
16
16
|
|
|
17
|
-
`:""}connectedCallback(){super.connectedCallback(),c.Ay.on("select",this.onSubscribe),c.Ay.on("update",this.onSubscribe)}disconnectedCallback(){super.disconnectedCallback(),this.cover.remove(),c.Ay.off("select",this.onSubscribe),c.Ay.off("update",this.onSubscribe)}clickBread(e){this.cover.remove(),c.Ay.clean().selectComponent(e.compose)}}a.styles=
|
|
17
|
+
`:""}connectedCallback(){super.connectedCallback(),c.Ay.on("select",this.onSubscribe),c.Ay.on("update",this.onSubscribe)}disconnectedCallback(){super.disconnectedCallback(),this.cover.remove(),c.Ay.off("select",this.onSubscribe),c.Ay.off("update",this.onSubscribe)}clickBread(e){this.cover.remove(),c.Ay.clean().selectComponent(e.compose)}}a.styles=o.AH`
|
|
18
18
|
:host {
|
|
19
19
|
direction: var(--direction);
|
|
20
20
|
display: block;
|
|
@@ -25,33 +25,34 @@
|
|
|
25
25
|
overflow: hidden;
|
|
26
26
|
}
|
|
27
27
|
:host(:not([hidden-crumbs])) {
|
|
28
|
-
padding:
|
|
28
|
+
padding: var(--space-3) var(--space-4);
|
|
29
|
+
border-bottom: 1px solid var(--color-border);
|
|
29
30
|
}
|
|
30
31
|
.currect {
|
|
31
|
-
font-size:
|
|
32
|
+
font-size: var(--text-xs);
|
|
32
33
|
font-family: var(--font-family);
|
|
33
|
-
font-weight:
|
|
34
|
-
color: var(--primary);
|
|
35
|
-
margin-top:
|
|
36
|
-
margin-right:
|
|
37
|
-
margin-left:
|
|
34
|
+
font-weight: 600;
|
|
35
|
+
color: var(--color-primary, var(--primary));
|
|
36
|
+
margin-top: var(--space-1);
|
|
37
|
+
margin-right: var(--space-1);
|
|
38
|
+
margin-left: var(--space-1);
|
|
38
39
|
display:inline-block;
|
|
39
40
|
}
|
|
40
41
|
.breadcrumb {
|
|
41
|
-
font-size:
|
|
42
|
+
font-size: var(--text-xs);
|
|
42
43
|
cursor: pointer;
|
|
43
44
|
font-family: var(--font-family);
|
|
44
|
-
margin-right:
|
|
45
|
-
margin-left:
|
|
46
|
-
color: var(--breadcrumbs);
|
|
45
|
+
margin-right: var(--space-1);
|
|
46
|
+
margin-left: var(--space-1);
|
|
47
|
+
color: var(--color-text-muted, var(--breadcrumbs));
|
|
47
48
|
}
|
|
48
49
|
.breadcrumb:hover {
|
|
49
|
-
color: var(--primary);
|
|
50
|
+
color: var(--color-primary, var(--primary));
|
|
50
51
|
}
|
|
51
52
|
.arrow {
|
|
52
53
|
height: 14px;
|
|
53
54
|
width: 14px;
|
|
54
|
-
fill:
|
|
55
|
+
fill: var(--color-text-faint);
|
|
55
56
|
vertical-align: middle;
|
|
56
57
|
}
|
|
57
58
|
`,a.properties={crumbs:{type:Array},mainText:{type:Boolean,reflect:!0}},customElements.define("cdtr-breadcrumbs",a)}}]);
|
|
Binary file
|
|
@@ -1,114 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
<cdtr-row alignItems="center" justify="space-between">
|
|
4
|
-
<cdtr-col>
|
|
5
|
-
<cdtr-title>
|
|
6
|
-
<lang-text text="box-shadow"></lang-text>
|
|
7
|
-
</cdtr-title>
|
|
8
|
-
</cdtr-col>
|
|
9
|
-
<cdtr-col sm="2">
|
|
10
|
-
${this.boxShadow!==w?n.qy` <paper-button
|
|
11
|
-
style="min-width:40px;padding:0;"
|
|
12
|
-
@click=${this.removeBoxShadow}
|
|
13
|
-
><cdtr-icon icon="x"></cdtr-icon
|
|
14
|
-
></paper-button>`:null}
|
|
15
|
-
</cdtr-col>
|
|
16
|
-
<cdtr-col sm="3">
|
|
17
|
-
<cdtr-dropdown custom overflow maxHeight="900px" top=${200}>
|
|
18
|
-
<paper-button slot="trigger"
|
|
19
|
-
><cdtr-box-shadow-icon
|
|
20
|
-
.iconStyle="box-shadow:${this.value};"
|
|
21
|
-
></cdtr-box-shadow-icon
|
|
22
|
-
></paper-button>
|
|
23
|
-
<div slot="content">
|
|
24
|
-
<div>
|
|
25
|
-
${"design"===this.tabName?n.qy`
|
|
26
|
-
<cdtr-editor-container>
|
|
27
|
-
<h1 class="mb-2">
|
|
28
|
-
<lang-text
|
|
29
|
-
whiteSpace="break-spaces"
|
|
30
|
-
text="box-shadow"
|
|
31
|
-
></lang-text>
|
|
32
|
-
</h1>
|
|
33
|
-
<cdtr-width-editor
|
|
34
|
-
text="horizontal_shadow_length"
|
|
35
|
-
unit="px"
|
|
36
|
-
max="200"
|
|
37
|
-
min="-200"
|
|
38
|
-
.value=${f.offsetX}
|
|
39
|
-
@input=${p=>this.onChangeBoxShadow("offsetX",p.target.value)}
|
|
40
|
-
></cdtr-width-editor>
|
|
41
|
-
</cdtr-editor-container>
|
|
42
|
-
<cdtr-editor-container>
|
|
43
|
-
<cdtr-width-editor
|
|
44
|
-
text="vertical_shadow_length"
|
|
45
|
-
unit="px"
|
|
46
|
-
max="400"
|
|
47
|
-
min="-400"
|
|
48
|
-
.value=${f.offsetY}
|
|
49
|
-
@input=${p=>this.onChangeBoxShadow("offsetY",p.target.value)}
|
|
50
|
-
></cdtr-width-editor>
|
|
51
|
-
</cdtr-editor-container>
|
|
52
|
-
<cdtr-editor-container>
|
|
53
|
-
<cdtr-width-editor
|
|
54
|
-
text="blur_radius"
|
|
55
|
-
unit="px"
|
|
56
|
-
max="400"
|
|
57
|
-
min="0"
|
|
58
|
-
.value=${f.blurRadius}
|
|
59
|
-
@input=${p=>this.onChangeBoxShadow("blurRadius",p.target.value)}
|
|
60
|
-
></cdtr-width-editor>
|
|
61
|
-
</cdtr-editor-container>
|
|
62
|
-
<cdtr-editor-container>
|
|
63
|
-
<cdtr-width-editor
|
|
64
|
-
text="spread_radius"
|
|
65
|
-
unit="px"
|
|
66
|
-
max="200"
|
|
67
|
-
min="-200"
|
|
68
|
-
.value=${f.spreadRadius}
|
|
69
|
-
@input=${p=>this.onChangeBoxShadow("spreadRadius",p.target.value)}
|
|
70
|
-
></cdtr-width-editor>
|
|
71
|
-
</cdtr-editor-container>
|
|
72
|
-
<cdtr-editor-container>
|
|
73
|
-
<cdtr-colorpicker-editor
|
|
74
|
-
@input=${p=>this.onChangeBoxShadow("color",p.target.value)}
|
|
75
|
-
.value=${f.color}
|
|
76
|
-
text="shadow_color"
|
|
77
|
-
></cdtr-colorpicker-editor>
|
|
78
|
-
</cdtr-editor-container>
|
|
79
|
-
|
|
80
|
-
<cdtr-editor-container>
|
|
81
|
-
<cdtr-row justify="space-between" alignItems="center">
|
|
82
|
-
<cdtr-title
|
|
83
|
-
><lang-text text="inset"></lang-text
|
|
84
|
-
></cdtr-title>
|
|
85
|
-
<cdtr-toggle
|
|
86
|
-
@change=${p=>this.onChangeBoxShadow("inset",!p.target.checked)}
|
|
87
|
-
></cdtr-toggle>
|
|
88
|
-
</cdtr-row>
|
|
89
|
-
</cdtr-editor-container>
|
|
90
|
-
`:null}
|
|
91
|
-
${"gallery"===this.tabName?n.qy`<cdtr-row
|
|
92
|
-
style="overflow-y: auto;
|
|
93
|
-
max-height: 90vh;max-width:500px;"
|
|
94
|
-
justify="center"
|
|
95
|
-
spacing="10px"
|
|
96
|
-
>
|
|
97
|
-
${u.P.map(p=>n.qy` <cdtr-col sm="5" style="height:120px;"
|
|
98
|
-
><paper-button
|
|
99
|
-
@click=${()=>this.changeBoxShadowValue(p.rule)}
|
|
100
|
-
style="box-shadow:${p.rule};margin:0 25px;width:90%;height:90%;"
|
|
101
|
-
></paper-button
|
|
102
|
-
></cdtr-col>`)}
|
|
103
|
-
</cdtr-row>`:null}
|
|
104
|
-
</div>
|
|
105
|
-
</div>
|
|
106
|
-
</cdtr-dropdown>
|
|
107
|
-
</cdtr-col>
|
|
108
|
-
</cdtr-row>
|
|
109
|
-
</cdtr-editor-container>
|
|
110
|
-
`}}).styles=n.AH`
|
|
1
|
+
/*! For license information please see 453.creaditor.bundle.js.LICENSE.txt */
|
|
2
|
+
"use strict";(("undefined"!=typeof self?self:this).webpackChunkCreaditor=("undefined"!=typeof self?self:this).webpackChunkCreaditor||[]).push([[453],{70453(t,e,s){s.r(e),s.d(e,{TitleEditor:()=>o});var n=s(59929),r=s(70980);class o extends n.WF{constructor(){super(),this.pb="6px"}render(){const t={fontWeight:this.bold?700:400,paddingBottom:this.pb};return n.qy`<span style=${(0,r.W)(t)}><slot></slot></span>`}}o.styles=n.AH`
|
|
111
3
|
:host {
|
|
4
|
+
display: block;
|
|
5
|
+
font-size: 13px;
|
|
6
|
+
font-weight: 500;
|
|
7
|
+
color: var(--text-dark-color);
|
|
8
|
+
font-family: var(--font-family);
|
|
9
|
+
-webkit-font-smoothing: antialiased;
|
|
10
|
+
text-align: var(--text-align-locale);
|
|
112
11
|
direction: var(--direction-locale);
|
|
12
|
+
user-select: none;
|
|
113
13
|
}
|
|
114
|
-
`,
|
|
14
|
+
`,o.properties={bold:{type:Boolean},pb:{type:String}},customElements.define("cdtr-title",o)},70980(t,e,s){s.d(e,{W:()=>l});var n=s(80181),r=s(16655);const o="important",i=" !"+o,l=(0,r.u$)(class extends r.WL{constructor(t){if(super(t),t.type!==r.OA.ATTRIBUTE||"style"!==t.name||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce((e,s)=>{const n=t[s];return null==n?e:e+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${n};`},"")}update(t,[e]){const{style:s}=t.element;if(void 0===this.ft)return this.ft=new Set(Object.keys(e)),this.render(e);for(const t of this.ft)null==e[t]&&(this.ft.delete(t),t.includes("-")?s.removeProperty(t):s[t]=null);for(const t in e){const n=e[t];if(null!=n){this.ft.add(t);const e="string"==typeof n&&n.endsWith(i);t.includes("-")||e?s.setProperty(t,e?n.slice(0,-11):n,e?o:""):s[t]=n}}return n.c0}})}}]);
|
|
Binary file
|
|
@@ -788,7 +788,7 @@
|
|
|
788
788
|
</cdtr-row>
|
|
789
789
|
</div>
|
|
790
790
|
</div>
|
|
791
|
-
`}}}customElements.get("paper-button")||Promise.resolve().then(i.bind(i,39239)),customElements.get("cdtr-emoji-picker")||i.e(3105).then(i.t.bind(i,63105,23));class x extends(v(s.WF)){constructor(){super(),this.inputRef=(0,a._)(),this.onBlur=this.onBlur.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.urlInputFocused=!1,this._urlInputRawValue="",this._lastSyncedMyHref=void 0,this._lastBodySyncHref=void 0,this.lastUrl=void 0,this.target="_blank",this.anchors=[],this.event=new UIEvent("change",{view:window,bubbles:!0,cancelable:!0}),this.options=c,this.body="",this.subject="",this.name=o.M.get("lang",c[0].text),this.initAutomations()}onDispatch(){const t=function(t){const{href:e,protocol:i,params:s,body:o,subject:r,target:n,dispatchEvent:a,event:l}=t;if(!e)return a(l),{dispatched:!0};const c=g(e,i,s,o,r,n);return c?{dispatched:!0,href:c.url,protocol:c.protocol,params:c.params,value:c.url,link:c.url,lastUrl:c.url}:{dispatched:!1}}({href:this.href,protocol:this.protocol,params:this.params,body:this.body,subject:this.subject,target:this.target,dispatchEvent:this.dispatchEvent.bind(this),event:this.event});if(t.dispatched){if(t.href){this.href=t.href,this.protocol=t.protocol,this.params=t.params?{...t.params}:{},this.value=t.value,this.link=t.link,this.lastUrl=t.lastUrl;const e="string"==typeof t.href?t.href:t.href?.href;this._urlInputRawValue=null!=e&&""!==e?String(e):""}this.dispatchEvent(this.event)}}onChangeLink(t){const e=t.target.value;this._urlInputRawValue=e;const i=y(e,this.protocol,this.href);null!==i?(this.href=i.href,this.protocol=i.protocol,i.clearParams&&(this.body="",this.subject=""),void 0!==i.body&&(this.body=i.body),void 0!==i.subject&&(this.subject=i.subject),i.shouldBlur&&this.onBlur()):this.href=e}onKeyDown(t){if("submit"===t.type){const t=this.inputRef?.value;void 0!==t?.value&&this.onChangeLink({target:{value:t.value}}),t&&"function"==typeof t.success&&t.success(),this.onDispatch()}}onUrlInputFocus(){const t=this.inputRef?.value?.value;null!=t&&(this._urlInputRawValue=t),this.urlInputFocused=!0}onUrlInputBlur(){this.urlInputFocused=!1,this.hasButton||this.onDispatch()}onBlur(){this.hasButton||this.onDispatch()}onClickOk(){this.onDispatch()}onChangeTarget(t){const e={target:t.target.value};this.target=e.target,t.stopPropagation(),!this.hasButton&&this.href&&this.onBlur()}resolveAnchors(){this.anchors=function(){const t=o.M.get("components");return t?.filter(t=>"anchor"===t.type&&t.props.name||t.props.element_ID)||[]}()}onChangeType(t){const e=function(t,e,i,s){const o=e.find(e=>e.type===t);if(!o)return{forceProtocolChange:!1};const r="anchor"===o.text,n=s!==o.type;return setTimeout(()=>{i&&i.value&&i.value.focus()},500),{protocol:o.type,forceProtocolChange:!0,shouldResolveAnchors:r,clearParams:n}}(t,this.options,this.inputRef,this.protocol);if(e.shouldResolveAnchors&&this.resolveAnchors(),this.protocol=e.protocol,this.forceProtocolChange=e.forceProtocolChange,e.clearParams&&(this.body="",this.subject=""),e.forceProtocolChange){const t=new r.A(this.href,{protocol:this.protocol});t.protocol=this.protocol,this.href=t,this.onBlur()}}connectedCallback(){super.connectedCallback(),this.href=new r.A(this.href);const t=String(this.href?.href||"").match(/^\[\[([^\]]+)\]\]\?/),e=this.href&&this.href.params&&this.href.params[p];(t||e)&&this.parseAutomationLink(this.href)}render(){const t=o.M.get("config","editor","configure","editorProps","linkPicker","savedVariables");this.resolveAnchors();const e=this.lastUrl!==this.href,i=new r.A(this.href,{protocol:e?null:this.protocol});this.protocol&&!e?i.protocol=this.protocol:i.protocol&&(this.protocol=i.protocol);const n=String(this.href?.href||this.href||"");if(this._lastBodySyncHref!==n){this._lastBodySyncHref=n,i.params?(this.body=i.params.text||i.params.body||"",this.subject=i.params.subject||""):(this.body="",this.subject="");n.match(/^\[\[([^\]]+)\]\]\?/)||i.params&&i.params[p]?(this.selectedAutomation=null,this.activeAutomationId=null,this.selectedMailingLists=[],this.selectedMailingListsForAdd=[],this.selectedMailingListsForRemove=[],this.automationAction=null,this.showAutomations=!0,this.parseAutomationLink(this.href)):(this.showAutomations=!1,this.selectedAutomation=null,this.activeAutomationId=null,this.selectedMailingLists=[],this.selectedMailingListsForAdd=[],this.selectedMailingListsForRemove=[],this.automationAction=null)}const l=function(t,e,i){let s=[];return t.isEmail?s=[]:t.isPhone?s=i.filter(t=>("tel:"===t.type||"sms:"===t.type||"whatsapp:"===t.type)&&t.type!==e):-1!==t.href.indexOf("http://")&&"https:"!==e&&(s=[{type:"https:",text:o.M.get("lang","is_user_wants_https"),reccomanded:!0}]),"anchor:"===e&&(s=[]),s}(i,this.protocol,this.options);let c=i.href;const h=String(i.href||""),d=h.match(/^\[\[([^\]]+)\]\]\?/),m=i.params&&i.params[p];if(d)c=h;else if(m){const t=u,e=[];i.params&&Object.keys(i.params).forEach(s=>{if(!t.includes(s)){const t=i.params[s];e.push(`${s}=${encodeURIComponent(t).replace(/%24/g,"$")}`)}});const s=i.url||"";c=i.protocol?"http:"===i.protocol||"https:"===i.protocol?`${i.protocol}//${s}`:`${i.protocol}${s}`:s,e.length>0&&(c+=`?${e.join("&")}`)}const g=function(t){switch(t){case"mailto:":return"what_the_email_address";case"tel:":return"what_the_phone_number";case"sms:":case"whatsapp:":return"what_the_phone_number_to_send_msg";case"anchor:":return"what_the_anchor_name";case"file:":return"what_the_file_name";default:return"what_the_url_address"}}(this.protocol),y=[...this.options],v=y.findIndex(t=>"http:"===t.type);v>-1&&y.splice(v,1);const x=o.M.get("config","editor","configure","editorProps","automations"),w={url:i,href:this.href,protocol:this.protocol,anchors:this.anchors,body:this.body,subject:this.subject,onChangeLink:this.onChangeLink.bind(this),onBlur:this.onBlur.bind(this),onRequest:this.onRequest,updateBody:t=>{this.body=t},updateSubject:t=>{this.subject=t}},$=null!=c&&""!==c?String(c):"",A=this._urlInputRawValue!==$,k=void 0!==this._lastSyncedMyHref&&$!==this._lastSyncedMyHref,_=this.urlInputFocused&&this._urlInputRawValue&&$&&!k;A&&!_?(this._urlInputRawValue=$,this._lastSyncedMyHref=$):A||(this._lastSyncedMyHref=$);const
|
|
791
|
+
`}}}customElements.get("paper-button")||Promise.resolve().then(i.bind(i,39239)),customElements.get("cdtr-emoji-picker")||i.e(3105).then(i.t.bind(i,63105,23));class x extends(v(s.WF)){constructor(){super(),this.inputRef=(0,a._)(),this.onBlur=this.onBlur.bind(this),this.onKeyDown=this.onKeyDown.bind(this),this.urlInputFocused=!1,this._urlInputRawValue="",this._lastSyncedMyHref=void 0,this._lastBodySyncHref=void 0,this.lastUrl=void 0,this.target="_blank",this.anchors=[],this.event=new UIEvent("change",{view:window,bubbles:!0,cancelable:!0}),this.options=c,this.body="",this.subject="",this.name=o.M.get("lang",c[0].text),this.initAutomations()}onDispatch(){const t=function(t){const{href:e,protocol:i,params:s,body:o,subject:r,target:n,dispatchEvent:a,event:l}=t;if(!e)return a(l),{dispatched:!0};const c=g(e,i,s,o,r,n);return c?{dispatched:!0,href:c.url,protocol:c.protocol,params:c.params,value:c.url,link:c.url,lastUrl:c.url}:{dispatched:!1}}({href:this.href,protocol:this.protocol,params:this.params,body:this.body,subject:this.subject,target:this.target,dispatchEvent:this.dispatchEvent.bind(this),event:this.event});if(t.dispatched){if(t.href){this.href=t.href,this.protocol=t.protocol,this.params=t.params?{...t.params}:{},this.value=t.value,this.link=t.link,this.lastUrl=t.lastUrl;const e="string"==typeof t.href?t.href:t.href?.href;this._urlInputRawValue=null!=e&&""!==e?String(e):""}this.dispatchEvent(this.event)}}onChangeLink(t){const e=t.target.value;this._urlInputRawValue=e;const i=y(e,this.protocol,this.href);null!==i?(this.href=i.href,this.protocol=i.protocol,i.clearParams&&(this.body="",this.subject=""),void 0!==i.body&&(this.body=i.body),void 0!==i.subject&&(this.subject=i.subject),i.shouldBlur&&this.onBlur()):this.href=e}onKeyDown(t){if("submit"===t.type){const t=this.inputRef?.value;void 0!==t?.value&&this.onChangeLink({target:{value:t.value}}),t&&"function"==typeof t.success&&t.success(),this.onDispatch()}}onUrlInputFocus(){const t=this.inputRef?.value?.value;null!=t&&(this._urlInputRawValue=t),this.urlInputFocused=!0}onUrlInputBlur(){this.urlInputFocused=!1,this.hasButton||this.onDispatch()}onBlur(){this.hasButton||this.onDispatch()}onClickOk(){this.onDispatch()}onChangeTarget(t){const e={target:t.target.value};this.target=e.target,t.stopPropagation(),!this.hasButton&&this.href&&this.onBlur()}resolveAnchors(){this.anchors=function(){const t=o.M.get("components");return t?.filter(t=>"anchor"===t.type&&t.props.name||t.props.element_ID)||[]}()}onChangeType(t){const e=function(t,e,i,s){const o=e.find(e=>e.type===t);if(!o)return{forceProtocolChange:!1};const r="anchor"===o.text,n=s!==o.type;return setTimeout(()=>{i&&i.value&&i.value.focus()},500),{protocol:o.type,forceProtocolChange:!0,shouldResolveAnchors:r,clearParams:n}}(t,this.options,this.inputRef,this.protocol);if(e.shouldResolveAnchors&&this.resolveAnchors(),this.protocol=e.protocol,this.forceProtocolChange=e.forceProtocolChange,e.clearParams&&(this.body="",this.subject=""),e.forceProtocolChange){const t=new r.A(this.href,{protocol:this.protocol});t.protocol=this.protocol,this.href=t,this.onBlur()}}connectedCallback(){super.connectedCallback(),this.href=new r.A(this.href);const t=String(this.href?.href||"").match(/^\[\[([^\]]+)\]\]\?/),e=this.href&&this.href.params&&this.href.params[p];(t||e)&&this.parseAutomationLink(this.href)}render(){const t=o.M.get("config","editor","configure","editorProps","linkPicker","savedVariables");this.resolveAnchors();const e=this.lastUrl!==this.href,i=new r.A(this.href,{protocol:e?null:this.protocol});this.protocol&&!e?i.protocol=this.protocol:i.protocol&&(this.protocol=i.protocol);const n=String(this.href?.href||this.href||"");if(this._lastBodySyncHref!==n){this._lastBodySyncHref=n,i.params?(this.body=i.params.text||i.params.body||"",this.subject=i.params.subject||""):(this.body="",this.subject="");n.match(/^\[\[([^\]]+)\]\]\?/)||i.params&&i.params[p]?(this.selectedAutomation=null,this.activeAutomationId=null,this.selectedMailingLists=[],this.selectedMailingListsForAdd=[],this.selectedMailingListsForRemove=[],this.automationAction=null,this.showAutomations=!0,this.parseAutomationLink(this.href)):(this.showAutomations=!1,this.selectedAutomation=null,this.activeAutomationId=null,this.selectedMailingLists=[],this.selectedMailingListsForAdd=[],this.selectedMailingListsForRemove=[],this.automationAction=null)}const l=function(t,e,i){let s=[];return t.isEmail?s=[]:t.isPhone?s=i.filter(t=>("tel:"===t.type||"sms:"===t.type||"whatsapp:"===t.type)&&t.type!==e):-1!==t.href.indexOf("http://")&&"https:"!==e&&(s=[{type:"https:",text:o.M.get("lang","is_user_wants_https"),reccomanded:!0}]),"anchor:"===e&&(s=[]),s}(i,this.protocol,this.options);let c=i.href;const h=String(i.href||""),d=h.match(/^\[\[([^\]]+)\]\]\?/),m=i.params&&i.params[p];if(d)c=h;else if(m){const t=u,e=[];i.params&&Object.keys(i.params).forEach(s=>{if(!t.includes(s)){const t=i.params[s];e.push(`${s}=${encodeURIComponent(t).replace(/%24/g,"$")}`)}});const s=i.url||"";c=i.protocol?"http:"===i.protocol||"https:"===i.protocol?`${i.protocol}//${s}`:`${i.protocol}${s}`:s,e.length>0&&(c+=`?${e.join("&")}`)}const g=function(t){switch(t){case"mailto:":return"what_the_email_address";case"tel:":return"what_the_phone_number";case"sms:":case"whatsapp:":return"what_the_phone_number_to_send_msg";case"anchor:":return"what_the_anchor_name";case"file:":return"what_the_file_name";default:return"what_the_url_address"}}(this.protocol),y=[...this.options],v=y.findIndex(t=>"http:"===t.type);v>-1&&y.splice(v,1);const x=o.M.get("config","editor","configure","editorProps","automations"),w={url:i,href:this.href,protocol:this.protocol,anchors:this.anchors,body:this.body,subject:this.subject,onChangeLink:this.onChangeLink.bind(this),onBlur:this.onBlur.bind(this),onRequest:this.onRequest,updateBody:t=>{this.body=t},updateSubject:t=>{this.subject=t}},$=null!=c&&""!==c?String(c):"",A=this._urlInputRawValue!==$,k=void 0!==this._lastSyncedMyHref&&$!==this._lastSyncedMyHref,_=this.urlInputFocused&&this._urlInputRawValue&&$&&!k;A&&!_?(this._urlInputRawValue=$,this._lastSyncedMyHref=$):A||(this._lastSyncedMyHref=$);const S=this.urlInputFocused&&void 0!==this._urlInputRawValue?this._urlInputRawValue:c,R={protocol:this.protocol,url:i,autofocus:this.autofocus,inputRef:(0,a.K)(this.inputRef),onChangeLink:this.onChangeLink.bind(this),onBlur:this.onUrlInputBlur.bind(this),onFocus:this.onUrlInputFocus.bind(this),onKeyDown:this.onKeyDown.bind(this),myHref:S};return this.showAutomations?s.qy` <div class="root">${this.renderAutomationsView()}</div>`:s.qy` <div class="root">
|
|
792
792
|
${j=this.label,j?s.qy`<cdtr-title
|
|
793
793
|
style="font-weight: 700;
|
|
794
794
|
font-size: 14.4px;
|
|
@@ -852,7 +852,7 @@
|
|
|
852
852
|
<cdtr-title class="explain-title"
|
|
853
853
|
><lang-text .text="${g}"></lang-text
|
|
854
854
|
></cdtr-title>
|
|
855
|
-
${function(t){const{protocol:e,url:i,autofocus:s,inputRef:o,onChangeLink:r,onBlur:n,onFocus:a,onKeyDown:l,myHref:c}=t;return"anchor:"===e?null:b({value:c,inputRef:o,autofocus:s,onChange:r,onBlur:n,onFocus:a,onKeyDown:l})}(
|
|
855
|
+
${function(t){const{protocol:e,url:i,autofocus:s,inputRef:o,onChangeLink:r,onBlur:n,onFocus:a,onKeyDown:l,myHref:c}=t;return"anchor:"===e?null:b({value:c,inputRef:o,autofocus:s,onChange:r,onBlur:n,onFocus:a,onKeyDown:l})}(R)}
|
|
856
856
|
${f(this.protocol,w)}
|
|
857
857
|
${x?s.qy` <cdtr-divider></cdtr-divider>
|
|
858
858
|
<cdtr-row justify="flex-start" mt="1">
|
|
@@ -884,4 +884,4 @@
|
|
|
884
884
|
<lang-text text="add_now"></lang-text>
|
|
885
885
|
</paper-button>
|
|
886
886
|
</cdtr-row>`:null}
|
|
887
|
-
</div>`;var U,L,C,I,M,F,q,j}}x.styles=n,x.properties={href:{type:String,reflect:!0},value:{type:Object},protocol:{type:String},name:{type:String},label:{type:String},target:{type:String},hasButton:{type:Boolean},params:{type:Object},explain:{type:String},anchors:{type:Array},link:{},body:{type:String},subject:{type:String},autofocus:{type:Boolean},onRequest:{type:Function}},customElements.get("cdtr-link-element")||customElements.define("cdtr-link-element",x)},88385(t,e,i){i.d(e,{A:()=>a});const s=t=>!(!t||!t.match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)),o=t=>!(!t||!t.replace("-","").match(/^[+]*[(]{0,1}[0-9]{9,9}[)]{0,1}[-\s\./0-9]*$/g)&&!t.match(/[0-9]{3}-[0-9]{3}-[0-9]{4}/));function r(t){const e={},i=/([^&=]+)=?([^&]*)/g,s=t=>{try{return decodeURIComponent(t.replace(/\+/g," "))}catch(e){return t.replace(/\+/g," ")}},o=t.indexOf("?");let r,n=-1!==o?t.substring(o+1):"";for(;null!==(r=i.exec(n));){const t=s(r[1]),i=s(r[2]);t&&(e[t]=i)}return e}function n(t){if(!t)return"";let e=t.replace(/^[^:]+:(?:\/\/)?/,"");return e=e.replace(/^\/+/,""),e=e.split("?")[0],encodeURIComponent(e).replace(/%24/g,"$")}class a{static getProtocol(t){if(!t)return"";const e=t.indexOf(":");return e>0?t.slice(0,e):""}constructor(t,e){if(this.protocol="",this.href="",this.fullHref="",this.target="_self",this.isEmail=!1,this.isPhone=!1,this.isAnchor=!1,this.url="",this.isValid=!0,this.params={},"string"==typeof t?this.href=t:t&&"object"==typeof t&&Object.assign(this,t),/^\[\[[^\]]+\]\]\?/.test(this.href)){const t=this.href;this.isValid=!1,this.protocol=e?.protocol??"",this.isEmail=!1,this.isPhone=!1,this.isAnchor=!1,this.params={...this.params,...e?.params,...r(t)};const i=t.indexOf("?");return this.url=i>-1?t.slice(0,i):t,this.href=t,void(this.fullHref=t)}this.isValid=this.isValidUrl(this.href),this.protocol=e?.protocol??a.getProtocol(this.href);const i=function(t){if(!t)return"";let e=t.replace(/^[^:]+:(?:\/\/)?/,"");return e=e.replace(/^\/+/,""),e=e.split("?")[0],e}(this.href);if(this.isEmail=s(i),this.isPhone=o(i),this.protocol||(this.isEmail?this.protocol="mailto:":this.isPhone?this.protocol="tel:":this.isValid&&(this.protocol="https:")),this.isAnchor=this.href.startsWith("#"),e?.target){if(!["_blank","_self","_parent","_top"].includes(e.target))throw new Error(`Url: invalid target "${e.target}"`);this.target=e.target}this.params={...this.params,...e?.params,...r(this.href)},this.url=n(this.href),this.protocol&&!this.protocol.endsWith(":")&&(this.protocol+=":");const l="http:"===this.protocol||"https:"===this.protocol;this.href=l?`${this.protocol}//${this.url}`:this.protocol+this.url,this.fullHref=this.getUrlWithParams(),this.href=this.getUrlWithParams()}addParam(t,e){this.
|
|
887
|
+
</div>`;var U,L,C,I,M,F,q,j}}x.styles=n,x.properties={href:{type:String,reflect:!0},value:{type:Object},protocol:{type:String},name:{type:String},label:{type:String},target:{type:String},hasButton:{type:Boolean},params:{type:Object},explain:{type:String},anchors:{type:Array},link:{},body:{type:String},subject:{type:String},autofocus:{type:Boolean},onRequest:{type:Function}},customElements.get("cdtr-link-element")||customElements.define("cdtr-link-element",x)},88385(t,e,i){i.d(e,{A:()=>a});const s=t=>!(!t||!t.match(/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/)),o=t=>!(!t||!t.replace("-","").match(/^[+]*[(]{0,1}[0-9]{9,9}[)]{0,1}[-\s\./0-9]*$/g)&&!t.match(/[0-9]{3}-[0-9]{3}-[0-9]{4}/));function r(t){const e={},i=/([^&=]+)=?([^&]*)/g,s=t=>{try{return decodeURIComponent(t.replace(/\+/g," "))}catch(e){return t.replace(/\+/g," ")}},o=t.indexOf("?");let r,n=-1!==o?t.substring(o+1):"";for(;null!==(r=i.exec(n));){const t=s(r[1]),i=s(r[2]);t&&(e[t]=i)}return e}function n(t){if(!t)return"";let e=t.replace(/^[^:]+:(?:\/\/)?/,"");return e=e.replace(/^\/+/,""),e=e.split("?")[0],encodeURIComponent(e).replace(/%24/g,"$")}class a{static getProtocol(t){if(!t)return"";const e=t.indexOf(":");return e>0?t.slice(0,e):""}constructor(t,e){if(this.protocol="",this.href="",this.fullHref="",this.target="_self",this.isEmail=!1,this.isPhone=!1,this.isAnchor=!1,this.url="",this.isValid=!0,this.params={},"string"==typeof t?this.href=t:t&&"object"==typeof t&&Object.assign(this,t),/^\[\[[^\]]+\]\]\?/.test(this.href)){const t=this.href;this.isValid=!1,this.protocol=e?.protocol??"",this.isEmail=!1,this.isPhone=!1,this.isAnchor=!1,this.params={...this.params,...e?.params,...r(t)};const i=t.indexOf("?");return this.url=i>-1?t.slice(0,i):t,this.href=t,void(this.fullHref=t)}this.isValid=this.isValidUrl(this.href),this.protocol=e?.protocol??a.getProtocol(this.href);const i=function(t){if(!t)return"";let e=t.replace(/^[^:]+:(?:\/\/)?/,"");return e=e.replace(/^\/+/,""),e=e.split("?")[0],e}(this.href);if(this.isEmail=s(i),this.isPhone=o(i),this.protocol||(this.isEmail?this.protocol="mailto:":this.isPhone?this.protocol="tel:":this.isValid&&(this.protocol="https:")),this.isAnchor=this.href.startsWith("#"),e?.target){if(!["_blank","_self","_parent","_top"].includes(e.target))throw new Error(`Url: invalid target "${e.target}"`);this.target=e.target}this.params={...this.params,...e?.params,...r(this.href)},this.url=n(this.href),this.protocol&&!this.protocol.endsWith(":")&&(this.protocol+=":");const l="http:"===this.protocol||"https:"===this.protocol;this.href=l?`${this.protocol}//${this.url}`:this.protocol+this.url,this.fullHref=this.getUrlWithParams(),this.href=this.getUrlWithParams()}addParam(t,e){this.params[t]=e,this.href=this.getUrlWithParams()}getUrlWithParams(){let t,e="";try{t=decodeURIComponent(this.url)}catch(e){t=this.url}if(Object.keys(this.params).length>0){t+="?",e="?";for(const i in this.params){const s=this.params[i],o=encodeURIComponent(i).replace(/%24/g,"$");if(s){const i=encodeURIComponent(s).replace(/%24/g,"$");t+=`${o}=${i}&`,e+=`${o}=${i}&`}else t+=`${o}&`,e+=`${o}&`}t=t.slice(0,-1)}const i=t=>{try{return decodeURIComponent(t)}catch{return t}};if(this.protocol&&("http:"===this.protocol||"https:"===this.protocol))return i(this.protocol+"//"+t);if("whatsapp:"===this.protocol){const s=this.extractPhoneFromTextUsingRegex(t);return s.length>0?i("https://wa.me/"+s[0]+e):i("https://wa.me/"+e)}return i(this.protocol+t)}extractPhoneFromTextUsingRegex(t){if(!t)return[];const e=[...t.matchAll(/(?:whatsapp:([^?\s]+)|\+?[\d\s\-\(\)\.]{7,20})/g)];return Array.from(new Set(e.map(t=>t[1]||t[0]).filter(t=>{const e=t.replace(/\D/g,"");return e.length>=7&&e.length<=15}).map(t=>t.trim())))}isValidUrl(t){if(!t)return!1;return/^(https?:\/\/)?([a-zA-Z0-9-]+\.)+[a-zA-Z]{2,}(\/.*)?$/.test(t)}}a.resetURL=n}}]);
|
|
Binary file
|