@emailmaker/emailmaker 1.1.104 → 1.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.
- package/emailmaker-core.7b3c64f5.js +859 -0
- package/emailmaker-esm.js +11 -11
- package/{emailmaker-po.d92031f0.js → emailmaker-po.7b3c64f5.js} +1 -1
- package/emailmaker.d.ts +137 -13
- package/emailmaker.js +12 -12
- package/iframe/.vite/manifest.json +13 -25
- package/iframe/css/sandbox.css +9 -8
- package/iframe/{iframe-eblock.d92031f0.html → iframe-eblock.7b3c64f5.html} +2 -2
- package/iframe/{iframe.d92031f0.html → iframe.7b3c64f5.html} +2 -2
- package/iframe/js/elMarkupHelper.BcpgksI_.js +279 -0
- package/iframe/js/iframe-eblock.body.7b3c64f5.js +9 -0
- package/iframe/js/iframe-eblock.js +2 -2
- package/iframe/js/iframe.body.7b3c64f5.js +129 -0
- package/iframe/js/iframe.js +2 -2
- package/iframe/js/{typograf.all.B0pVhMV_.js → typograf.all.Mun9CrLC.js} +12 -12
- package/package.json +1 -1
- package/runtime/react/index.js +1 -1
- package/static/core/{c100433a.js → 1157da89.js} +1 -1
- package/static/core/{4b7442c5.js → 213ffad0.js} +1 -1
- package/static/core/{1cdd0eaa.js → 26473b73.js} +1 -1
- package/static/core/{20fae5cb.js → 26971a74.js} +1 -1
- package/static/core/{d3f1d83d.js → 2e29db3c.js} +1 -1
- package/static/core/2f32a31d.js +4 -0
- package/static/core/{c67adee2.js → 3bfab25b.js} +1 -1
- package/static/core/{0cb54b92.js → 4797d4f7.js} +6 -6
- package/static/core/{f173fdc6.js → 5c4304c8.js} +1 -1
- package/static/core/{e76ed3bd.js → 6314ae82.js} +1 -1
- package/static/core/6fb2f217.js +4 -0
- package/static/core/{2a6bfcb1.js → 756e184f.js} +1 -1
- package/static/core/{fff40495.js → 850805d7.js} +1 -1
- package/static/core/{bd852c3b.js → 86b377fd.js} +1 -1
- package/static/core/874f77d2.js +2 -0
- package/static/core/{eee25d75.js → 87dcdb89.js} +1 -1
- package/static/core/{9596ee39.js → 8c37b60d.js} +1 -1
- package/static/core/{36f15937.js → 98ab1508.js} +1 -1
- package/static/core/9ef544f4.js +7 -0
- package/static/core/{ba4d44b4.js → a85c7f02.js} +1 -1
- package/static/core/{1922419a.js → abcacabc.js} +1 -1
- package/static/core/{dc45a033.js → b35140b6.js} +1 -1
- package/static/core/{9f7f5230.js → b712bb05.js} +1 -1
- package/static/core/{448f5a93.js → cebc7ae2.js} +1 -1
- package/static/core/{25095aa6.js → dfcb8d34.js} +2 -2
- package/static/core/e4b8362a.js +28 -0
- package/static/core/e88db487.js +1 -0
- package/static/core/{2d570b04.js → e8fa95c8.js} +3 -3
- package/static/core/e90908e7.js +1 -0
- package/static/core/{62b7892b.js → ee6c9aa1.js} +11 -11
- package/static/core/{360afb24.js → efb5b933.js} +1 -1
- package/static/core/{432ad49d.js → f115f982.js} +1 -1
- package/static/esm/73c89921.js +1 -0
- package/static/esm/delivery-libs.js +1 -1
- package/static/umd-runtime/delivery-libs.eFZaeVgo.js +1 -0
- package/static/umd-runtime/{runtime.Wy6_YzQx.js → runtime.DaVzSc6X.js} +1 -1
- package/vendor/@emailmaker/ui-kit/package.json +1 -1
- package/emailmaker-core.d92031f0.js +0 -859
- package/iframe/js/discussHandlers.cyZrdU7c.js +0 -88
- package/iframe/js/iframe-eblock.body.d92031f0.js +0 -233
- package/iframe/js/iframe.body.d92031f0.js +0 -319
- package/iframe/js/rolldown-runtime.qcwTIabA.js +0 -1
- package/static/core/123fc796.js +0 -4
- package/static/core/5dc1b7fa.js +0 -7
- package/static/core/a866296c.js +0 -4
- package/static/core/cd6c8848.js +0 -28
- package/static/core/e6f6edff.js +0 -1
- package/static/esm/d4338c39.js +0 -1
- package/static/umd-runtime/delivery-libs.Cmqsjupj.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
__emailmaker__.define("static/core/
|
|
1
|
+
__emailmaker__.define("static/core/850805d7.js",["require","exports","module","static/core/5dc34752.js","static/core/25b4c1c1.js"],function(i,d,P){const S=i("./5dc34752.js"),p=i("./25b4c1c1.js");var m={items_per_page:"/ page",jump_to:"Aller à",jump_to_confirm:"confirmer",page:"Page",prev_page:"Page précédente",next_page:"Page suivante",prev_5:"5 Pages précédentes",next_5:"5 Pages suivantes",prev_3:"3 Pages précédentes",next_3:"3 Pages suivantes",page_size:"taille de la page"};function n(t){"@babel/helpers - typeof";return n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(t)}function o(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);e&&(l=l.filter(function($){return Object.getOwnPropertyDescriptor(t,$).enumerable})),r.push.apply(r,l)}return r}function c(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?o(Object(r),!0).forEach(function(l){f(t,l,r[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):o(Object(r)).forEach(function(l){Object.defineProperty(t,l,Object.getOwnPropertyDescriptor(r,l))})}return t}function f(t,e,r){return e=h(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function h(t){var e=b(t,"string");return n(e)=="symbol"?e:String(e)}function b(t,e){if(n(t)!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var l=r.call(t,e||"default");if(n(l)!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var g=c(c({},p.commonLocale),{},{locale:"fr_FR",today:"Aujourd'hui",now:"Maintenant",backToToday:"Aujourd'hui",ok:"OK",clear:"Rétablir",week:"Semaine",month:"Mois",year:"Année",timeSelect:"Sélectionner l'heure",dateSelect:"Sélectionner la date",monthSelect:"Choisissez un mois",yearSelect:"Choisissez une année",decadeSelect:"Choisissez une décennie",dayFormat:"DD",previousMonth:"Mois précédent (PageUp)",nextMonth:"Mois suivant (PageDown)",previousYear:"Année précédente (Ctrl + gauche)",nextYear:"Année prochaine (Ctrl + droite)",previousDecade:"Décennie précédente",nextDecade:"Décennie suivante",previousCentury:"Siècle précédent",nextCentury:"Siècle suivant"}),u={placeholder:"Sélectionner l'heure",rangePlaceholder:["Heure de début","Heure de fin"]},s={lang:{placeholder:"Sélectionner une date",yearPlaceholder:"Sélectionner une année",quarterPlaceholder:"Sélectionner un trimestre",monthPlaceholder:"Sélectionner un mois",weekPlaceholder:"Sélectionner une semaine",rangePlaceholder:["Date de début","Date de fin"],rangeYearPlaceholder:["Année de début","Année de fin"],rangeMonthPlaceholder:["Mois de début","Mois de fin"],rangeWeekPlaceholder:["Semaine de début","Semaine de fin"],...g},timePickerLocale:{...u}},v=s,a="La valeur du champ ${label} n'est pas valide pour le type ${type}",y={locale:"fr",Pagination:m,DatePicker:s,TimePicker:u,Calendar:v,global:{close:"Fermer",show:"Afficher",hide:"Masquer"},Table:{filterTitle:"Filtrer",filterConfirm:"OK",filterReset:"Réinitialiser",filterEmptyText:"Aucun filtre",filterCheckAll:"Tout sélectionner",filterSearchPlaceholder:"Chercher dans les filtres",emptyText:"Aucune donnée",selectAll:"Sélectionner la page actuelle",selectInvert:"Inverser la sélection de la page actuelle",selectNone:"Désélectionner toutes les données",selectionAll:"Sélectionner toutes les données",sortTitle:"Trier",expand:"Développer la ligne",collapse:"Réduire la ligne",triggerDesc:"Trier par ordre décroissant",triggerAsc:"Trier par ordre croissant",cancelSort:"Annuler le tri"},Tour:{Next:"Étape suivante",Previous:"Étape précédente",Finish:"Fin de la visite guidée"},Modal:{okText:"OK",cancelText:"Annuler",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Annuler"},Transfer:{titles:["",""],searchPlaceholder:"Rechercher",itemUnit:"élément",itemsUnit:"éléments",remove:"Désélectionner",selectCurrent:"Sélectionner la page actuelle",removeCurrent:"Désélectionner la page actuelle",selectAll:"Sélectionner toutes les données",removeAll:"Désélectionner toutes les données",selectInvert:"Inverser la sélection de la page actuelle"},Upload:{uploading:"Téléchargement...",removeFile:"Effacer le fichier",uploadError:"Erreur de téléchargement",previewFile:"Fichier de prévisualisation",downloadFile:"Télécharger un fichier"},Empty:{description:"Aucune donnée"},Icon:{icon:"icône"},Text:{edit:"Éditer",copy:"Copier",copied:"Copie effectuée",expand:"Développer"},Form:{optional:"(optionnel)",defaultValidateMessages:{default:"Erreur de validation pour le champ ${label}",required:"Le champ ${label} est obligatoire",enum:"La valeur du champ ${label} doit être parmi [${enum}]",whitespace:"La valeur du champ ${label} ne peut pas être vide",date:{format:"La valeur du champ ${label} n'est pas au format date",parse:"La valeur du champ ${label} ne peut pas être convertie vers une date",invalid:"La valeur du champ ${label} n'est pas une date valide"},types:{string:a,method:a,array:a,object:a,number:a,date:a,boolean:a,integer:a,float:a,regexp:a,email:a,url:a,hex:a},string:{len:"La taille du champ ${label} doit être de ${len} caractères",min:"La taille du champ ${label} doit être au minimum de ${min} caractères",max:"La taille du champ ${label} doit être au maximum de ${max} caractères",range:"La taille du champ ${label} doit être entre ${min} et ${max} caractères"},number:{len:"La valeur du champ ${label} doit être égale à ${len}",min:"La valeur du champ ${label} doit être plus grande que ${min}",max:"La valeur du champ ${label} doit être plus petit que ${max}",range:"La valeur du champ ${label} doit être entre ${min} et ${max}"},array:{len:"La taille du tableau ${label} doit être de ${len}",min:"La taille du tableau ${label} doit être au minimum de ${min}",max:"La taille du tableau ${label} doit être au maximum de ${max}",range:"La taille du tableau ${label} doit être entre ${min}-${max}"},pattern:{mismatch:"La valeur du champ ${label} ne correspond pas au modèle ${pattern}"}}}};d.default=y});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
__emailmaker__.define("static/core/
|
|
1
|
+
__emailmaker__.define("static/core/86b377fd.js",["require","exports","module","static/core/5dc34752.js","static/core/25b4c1c1.js"],function(me,O,hr){const H=me("./5dc34752.js"),N=me("./25b4c1c1.js");var it=/\n/g;function at(e){const n=[...e.matchAll(it)].map((r=>r.index||0));n.unshift(-1);const t=ee(n,0,n.length);return r=>de(t,r)}function ee(e,n,t){if(t-n==1)return{offset:e[n],index:n+1};const r=Math.ceil((n+t)/2),s=ee(e,n,r),i=ee(e,r,t);return{offset:s.offset,low:s,high:i}}function de(e,n){return(function(t){return Object.prototype.hasOwnProperty.call(t,"index")})(e)?{line:e.index,column:n-e.offset}:de(e.high.offset<n?e.high:e.low,n)}function ge(e,n="",t={}){const r=typeof n!="string"?n:t,s=typeof n=="string"?n:"",i=e.map(ot),a=!!r.lineNumbers;return function(o,c=0){const l=a?at(o):()=>({line:0,column:0});let h=c;const g=[];e:for(;h<o.length;){let y=!1;for(const p of i){p.regex.lastIndex=h;const k=p.regex.exec(o);if(k&&k[0].length>0){if(!p.discard){const v=l(h),B=typeof p.replace=="string"?k[0].replace(new RegExp(p.regex.source,p.regex.flags),p.replace):k[0];g.push({state:s,name:p.name,text:B,offset:h,len:k[0].length,line:v.line,column:v.column})}if(h=p.regex.lastIndex,y=!0,p.push){const v=p.push(o,h);g.push(...v.tokens),h=v.offset}if(p.pop)break e;break}}if(!y)break}return{tokens:g,offset:h,complete:o.length<=h}}}function ot(e,n){return{...e,regex:ct(e,n)}}function ct(e,n){if(e.name.length===0)throw new Error(`Rule #${n} has empty name, which is not allowed.`);if((function(t){return Object.prototype.hasOwnProperty.call(t,"regex")})(e))return(function(t){if(t.global)throw new Error(`Regular expression /${t.source}/${t.flags} contains the global flag, which is not allowed.`);return t.sticky?t:new RegExp(t.source,t.flags+"y")})(e.regex);if((function(t){return Object.prototype.hasOwnProperty.call(t,"str")})(e)){if(e.str.length===0)throw new Error(`Rule #${n} ("${e.name}") has empty "str" property, which is not allowed.`);return new RegExp(ke(e.str),"y")}return new RegExp(ke(e.name),"y")}function ke(e){return e.replace(/[-[\]{}()*+!<=:?./\\^$|#\s,]/g,"\\$&")}function I(e,n){return(t,r)=>{let s=r,i;return r<t.tokens.length?(i=e(t.tokens[r],t,r),i!==void 0&&s++):n?.(t,r),i===void 0?{matched:!1}:{matched:!0,position:s,value:i}}}function te(e,n){return e.matched?{matched:!0,position:e.position,value:n(e.value,e.position)}:e}function U(e,n){return e.matched?n(e):e}function L(e,n){return(t,r)=>te(e(t,r),(s,i)=>n(s,t,r,i))}function q(e,n){return(t,r)=>{const s=e(t,r);return s.matched?s:{matched:!0,position:r,value:n}}}function F(...e){return(n,t)=>{for(const r of e){const s=r(n,t);if(s.matched)return s}return{matched:!1}}}function W(e,n){return(t,r)=>{const s=e(t,r);return s.matched?s:n(t,r)}}function lt(e,n){return(t,r)=>{const s=[];let i=!0;do{const a=e(t,r);a.matched&&n(a.value,s.length+1,t,r,a.position)?(s.push(a.value),r=a.position):i=!1}while(i);return{matched:!0,position:r,value:s}}}function ne(e){return lt(e,()=>!0)}function ut(e){return w(e,ne(e),(n,t)=>[n,...t])}function w(e,n,t){return(r,s)=>U(e(r,s),i=>te(n(r,i.position),(a,o)=>t(i.value,a,r,s,o)))}function ft(e,n){return w(e,n,t=>t)}function Le(e,n){return w(e,n,(t,r)=>r)}function re(e,n,t,r){return(s,i)=>U(e(s,i),a=>U(n(s,a.position),o=>te(t(s,o.position),(c,l)=>r(a.value,o.value,c,s,i,l))))}function we(e,n,t){return re(e,n,t,(r,s)=>s)}function ht(...e){return(n,t)=>{const r=[];let s=t;for(const i of e){const a=i(n,s);if(a.matched)r.push(a.value),s=a.position;else return{matched:!1}}return{matched:!0,position:s,value:r}}}function pt(...e){return mt(ht(...e))}function mt(e){return L(e,n=>n.flatMap(t=>t))}function dt(e,n){return(t,r)=>{let s=!0,i=e,a=r;do{const o=n(i,t,a)(t,a);o.matched?(i=o.value,a=o.position):s=!1}while(s);return{matched:!0,position:a,value:i}}}function gt(e,n,t){return dt(e,r=>L(n,(s,i,a,o)=>t(r,s,i,a,o)))}function xe(e,n,t){return kt(e,r=>gt(r,w(n,t,(s,i)=>[s,i]),(s,[i,a])=>i(s,a)))}function kt(e,n){return(t,r)=>U(e(t,r),s=>n(s.value,t,r,s.position)(t,s.position))}var Lt="(?:[ \\t\\r\\n\\f]*)",ve="(?:\\n|\\r\\n|\\r|\\f)",K="[^\\x00-\\x7F]",M="(?:\\\\[0-9a-f]{1,6}(?:\\r\\n|[ \\n\\r\\t\\f])?)",j="(?:\\\\[^\\n\\r\\f0-9a-f])",wt=`(?:[_a-z]|${K}|${M}|${j})`,ye=`(?:[_a-z0-9-]|${K}|${M}|${j})`,xt=`(?:${ye}+)`,vt=`(?:[-]?${wt}${ye}*)`,yt=`'([^\\n\\r\\f\\\\']|\\\\${ve}|${K}|${M}|${j})*'`,Bt=`"([^\\n\\r\\f\\\\"]|\\\\${ve}|${K}|${M}|${j})*"`,_t=ge([{name:"ws",regex:new RegExp(Lt)},{name:"hash",regex:new RegExp(`#${xt}`,"i")},{name:"ident",regex:new RegExp(vt,"i")},{name:"str1",regex:new RegExp(yt,"i")},{name:"str2",regex:new RegExp(Bt,"i")},{name:"*"},{name:"."},{name:","},{name:"["},{name:"]"},{name:"="},{name:">"},{name:"|"},{name:"+"},{name:"~"},{name:"^"},{name:"$"}]),bt=ge([{name:"unicode",regex:new RegExp(M,"i")},{name:"escape",regex:new RegExp(j,"i")},{name:"any",regex:new RegExp("[\\s\\S]","i")}]);function Be([e,n,t],[r,s,i]){return[e+r,n+s,t+i]}function St(e){return e.reduce(Be,[0,0,0])}var It=I(e=>e.name==="unicode"?String.fromCodePoint(parseInt(e.text.slice(1),16)):void 0),Nt=I(e=>e.name==="escape"?e.text.slice(1):void 0),Wt=I(e=>e.name==="any"?e.text:void 0),Et=L(ne(F(It,Nt,Wt)),e=>e.join(""));function se(e){const n=bt(e);return Et({tokens:n.tokens,options:void 0},0).value}function d(e){return I(n=>n.name===e?!0:void 0)}var ie=I(e=>e.name==="ws"?null:void 0),ae=q(ie,null);function A(e){return we(ae,e,ae)}var D=I(e=>e.name==="ident"?se(e.text):void 0),Tt=I(e=>e.name==="hash"?se(e.text.slice(1)):void 0),Ct=I(e=>e.name.startsWith("str")?se(e.text.slice(1,-1)):void 0),_e=ft(q(D,""),d("|")),oe=W(w(_e,D,(e,n)=>({name:n,namespace:e})),L(D,e=>({name:e,namespace:null}))),At=W(w(_e,d("*"),e=>({type:"universal",namespace:e,specificity:[0,0,0]})),L(d("*"),()=>({type:"universal",namespace:null,specificity:[0,0,0]}))),Pt=L(oe,({name:e,namespace:n})=>({type:"tag",name:e,namespace:n,specificity:[0,0,1]})),$t=w(d("."),D,(e,n)=>({type:"class",name:n,specificity:[0,1,0]})),Rt=L(Tt,e=>({type:"id",name:e,specificity:[1,0,0]})),be=I(e=>{if(e.name==="ident"){if(e.text==="i"||e.text==="I")return"i";if(e.text==="s"||e.text==="S")return"s"}}),Ot=W(w(Ct,q(Le(ae,be),null),(e,n)=>({value:e,modifier:n})),w(D,q(Le(ie,be),null),(e,n)=>({value:e,modifier:n}))),Mt=F(L(d("="),()=>"="),w(d("~"),d("="),()=>"~="),w(d("|"),d("="),()=>"|="),w(d("^"),d("="),()=>"^="),w(d("$"),d("="),()=>"$="),w(d("*"),d("="),()=>"*=")),jt=re(d("["),A(oe),d("]"),(e,{name:n,namespace:t})=>({type:"attrPresence",name:n,namespace:t,specificity:[0,1,0]})),Dt=we(d("["),re(A(oe),Mt,A(Ot),({name:e,namespace:n},t,{value:r,modifier:s})=>({type:"attrValue",name:e,namespace:n,matcher:t,value:r,modifier:s,specificity:[0,1,0]})),d("]")),Vt=W(jt,Dt),Ht=W(At,Pt),Se=F(Rt,$t,Vt),Ie=L(W(pt(Ht,ne(Se)),ut(Se)),e=>({type:"compound",list:e,specificity:St(e.map(n=>n.specificity))})),Ut=F(L(d(">"),()=>">"),L(d("+"),()=>"+"),L(d("~"),()=>"~"),w(d("|"),d("|"),()=>"||")),qt=W(A(Ut),L(ie,()=>" ")),ce=xe(Ie,L(qt,e=>(n,t)=>({type:"compound",list:[...t.list,{type:"combinator",combinator:e,left:n,specificity:n.specificity}],specificity:Be(n.specificity,t.specificity)})),Ie),pr=xe(L(ce,e=>({type:"list",list:[e]})),L(A(d(",")),()=>(e,n)=>({type:"list",list:[...e.list,n]})),ce);function Ft(e,n){if(!(typeof n=="string"||n instanceof String))throw new Error("Expected a selector string. Actual input is not a string!");const t=_t(n);if(!t.complete)throw new Error(`The input "${n}" was only partially tokenized, stopped at offset ${t.offset}!
|
|
2
2
|
`+Ne(n,t.offset));const r=A(e)({tokens:t.tokens,options:void 0},0);if(!r.matched)throw new Error(`No match for "${n}" input!`);if(r.position<t.tokens.length){const s=t.tokens[r.position];throw new Error(`The input "${n}" was only partially parsed, stopped at offset ${s.offset}!
|
|
3
3
|
`+Ne(n,s.offset,s.len))}return r.value}function Ne(e,n,t=1){return`${e.replace(/(\t)|(\r)|(\n)/g,(r,s,i)=>s?"␉":i?"␍":"␊")}
|
|
4
4
|
${"".padEnd(n)}${"^".repeat(t)}`}function Kt(e){return Ft(ce,e)}function b(e){if(!e.type)throw new Error("This is not an AST node.");switch(e.type){case"universal":return z(e.namespace)+"*";case"tag":return z(e.namespace)+P(e.name);case"class":return"."+P(e.name);case"id":return"#"+P(e.name);case"attrPresence":return`[${z(e.namespace)}${P(e.name)}]`;case"attrValue":return`[${z(e.namespace)}${P(e.name)}${e.matcher}"${zt(e.value)}"${e.modifier?e.modifier:""}]`;case"combinator":return b(e.left)+e.combinator;case"compound":return e.list.reduce((n,t)=>t.type==="combinator"?b(t)+n:n+b(t),"");case"list":return e.list.map(b).join(",")}}function z(e){return e||e===""?P(e)+"|":""}function X(e){return`\\${e.codePointAt(0).toString(16)} `}function P(e){return e.replace(/(^[0-9])|(^-[0-9])|(^-$)|([-0-9a-zA-Z_]|[^\x00-\x7F])|(\x00)|([\x01-\x1f]|\x7f)|([\s\S])/g,(n,t,r,s,i,a,o,c)=>t?X(t):r?"-"+X(r.slice(1)):s?"\\-":i||(a?"�":o?X(o):"\\"+c))}function zt(e){return e.replace(/(")|(\\)|(\x00)|([\x01-\x1f]|\x7f)/g,(n,t,r,s,i)=>t?'\\"':r?"\\\\":s?"�":X(i))}function G(e){if(!e.type)throw new Error("This is not an AST node.");switch(e.type){case"compound":e.list.forEach(G),e.list.sort((n,t)=>Te(We(n),We(t)));break;case"combinator":G(e.left);break;case"list":e.list.forEach(G),e.list.sort((n,t)=>b(n)<b(t)?-1:1)}return e}function We(e){switch(e.type){case"universal":return[1];case"tag":return[1];case"id":return[2];case"class":return[3,e.name];case"attrPresence":return[4,b(e)];case"attrValue":return[5,b(e)];case"combinator":return[15,b(e)]}}function Ee(e,n){return Te(e,n)}function Te(e,n){if(!Array.isArray(e)||!Array.isArray(n))throw new Error("Arguments must be arrays.");const t=e.length<n.length?e.length:n.length;for(let r=0;r<t;r++)if(e[r]!==n[r])return e[r]<n[r]?-1:1;return e.length-n.length}var Ce=class{constructor(e){this.branches=$(Xt(e))}build(e){return e(this.branches)}};function Xt(e){const n=e.length,t=new Array(n);for(let r=0;r<n;r++){const[s,i]=e[r],a=Gt(Kt(s));t[r]={ast:a,terminal:{type:"terminal",valueContainer:{index:r,value:i,specificity:a.specificity}}}}return t}function Gt(e){return Ae(e),G(e),e}function Ae(e){const n=[];e.list.forEach(t=>{switch(t.type){case"class":n.push({matcher:"~=",modifier:null,name:"class",namespace:null,specificity:t.specificity,type:"attrValue",value:t.name});break;case"id":n.push({matcher:"=",modifier:null,name:"id",namespace:null,specificity:t.specificity,type:"attrValue",value:t.name});break;case"combinator":Ae(t.left),n.push(t);break;case"universal":break;default:n.push(t)}}),e.list=n}function $(e){const n=[];for(;e.length;){const t=Oe(e,a=>!0,Pe),{matches:r,nonmatches:s,empty:i}=Yt(e,t);e=s,r.length&&n.push(Zt(t,r)),i.length&&n.push(...Jt(i))}return n}function Jt(e){const n=[];for(const t of e){const r=t.terminal;if(r.type==="terminal")n.push(r);else{const{matches:s,rest:i}=rn(r.cont,a=>a.type==="terminal");s.forEach(a=>n.push(a)),i.length&&(r.cont=i,n.push(r))}}return n}function Yt(e,n){const t=[],r=[],s=[];for(const i of e){const a=i.ast.list;a.length?(a.some(o=>Pe(o)===n)?t:r).push(i):s.push(i)}return{matches:t,nonmatches:r,empty:s}}function Pe(e){switch(e.type){case"attrPresence":return`attrPresence ${e.name}`;case"attrValue":return`attrValue ${e.name}`;case"combinator":return`combinator ${e.combinator}`;default:return e.type}}function Zt(e,n){if(e==="tag")return Qt(n);if(e.startsWith("attrValue "))return tn(e.substring(10),n);if(e.startsWith("attrPresence "))return en(e.substring(13),n);if(e==="combinator >")return $e(">",n);if(e==="combinator +")return $e("+",n);throw new Error(`Unsupported selector kind: ${e}`)}function Qt(e){const n=le(e,t=>t.type==="tag",t=>t.name);return{type:"tagName",variants:Object.entries(n).map(([t,r])=>({type:"variant",value:t,cont:$(r.items)}))}}function en(e,n){for(const t of n)Re(t,r=>r.type==="attrPresence"&&r.name===e);return{type:"attrPresence",name:e,cont:$(n)}}function tn(e,n){const t=le(n,s=>s.type==="attrValue"&&s.name===e,s=>`${s.matcher} ${s.modifier||""} ${s.value}`),r=[];for(const s of Object.values(t)){const i=s.oneSimpleSelector,a=nn(i),o=$(s.items);r.push({type:"matcher",matcher:i.matcher,modifier:i.modifier,value:i.value,predicate:a,cont:o})}return{type:"attrValue",name:e,matchers:r}}function nn(e){if(e.modifier==="i"){const n=e.value.toLowerCase();switch(e.matcher){case"=":return t=>n===t.toLowerCase();case"~=":return t=>t.toLowerCase().split(/[ \t]+/).includes(n);case"^=":return t=>t.toLowerCase().startsWith(n);case"$=":return t=>t.toLowerCase().endsWith(n);case"*=":return t=>t.toLowerCase().includes(n);case"|=":return t=>{const r=t.toLowerCase();return n===r||r.startsWith(n)&&r[n.length]==="-"}}}else{const n=e.value;switch(e.matcher){case"=":return t=>n===t;case"~=":return t=>t.split(/[ \t]+/).includes(n);case"^=":return t=>t.startsWith(n);case"$=":return t=>t.endsWith(n);case"*=":return t=>t.includes(n);case"|=":return t=>n===t||t.startsWith(n)&&t[n.length]==="-"}}}function $e(e,n){const t=le(n,s=>s.type==="combinator"&&s.combinator===e,s=>b(s.left)),r=[];for(const s of Object.values(t)){const i=$(s.items),a=s.oneSimpleSelector.left;r.push({ast:a,terminal:{type:"popElement",cont:i}})}return{type:"pushElement",combinator:e,cont:$(r)}}function le(e,n,t){const r={};for(;e.length;){const s=Oe(e,n,t),i=h=>n(h)&&t(h)===s,a=h=>h.ast.list.some(i),{matches:o,rest:c}=sn(e,a);let l=null;for(const h of o){const g=Re(h,i);l||(l=g)}if(l==null)throw new Error("No simple selector is found.");r[s]={oneSimpleSelector:l,items:o},e=c}return r}function Re(e,n){const t=e.ast.list,r=new Array(t.length);let s=-1;for(let a=t.length;a-- >0;)n(t[a])&&(r[a]=!0,s=a);if(s==-1)throw new Error("Couldn't find the required simple selector.");const i=t[s];return e.ast.list=t.filter((a,o)=>!r[o]),i}function Oe(e,n,t){const r={};for(const a of e){const o={};for(const c of a.ast.list.filter(n))o[t(c)]=!0;for(const c of Object.keys(o))r[c]?r[c]++:r[c]=1}let s="",i=0;for(const a of Object.entries(r))a[1]>i&&(s=a[0],i=a[1]);return s}function rn(e,n){const t=[],r=[];for(const s of e)n(s)?t.push(s):r.push(s);return{matches:t,rest:r}}function sn(e,n){const t=[],r=[];for(const s of e)n(s)?t.push(s):r.push(s);return{matches:t,rest:r}}var an=class{constructor(e){this.f=e}pickAll(e){return this.f(e)}pick1(e,n=!1){const t=this.f(e),r=t.length;if(r===0)return null;if(r===1)return t[0].value;const s=n?on:cn;let i=t[0];for(let a=1;a<r;a++){const o=t[a];s(i,o)&&(i=o)}return i.value}};function on(e,n){const t=Ee(n.specificity,e.specificity);return t>0||t===0&&n.index<e.index}function cn(e,n){const t=Ee(n.specificity,e.specificity);return t>0||t===0&&n.index>e.index}function Me(e){return new an(R(e))}function R(e){const n=e.map(ln);return(t,...r)=>n.flatMap(s=>s(t,...r))}function ln(e){switch(e.type){case"terminal":return()=>[e.valueContainer];case"tagName":return un(e);case"attrValue":return hn(e);case"attrPresence":return fn(e);case"pushElement":return pn(e);case"popElement":return mn(e);default:return()=>[]}}function un(e){const n={};for(const t of e.variants)n[t.value.toLowerCase()]=R(t.cont);return(t,...r)=>{const s=t.tagName?.toLowerCase(),i=s&&n[s];return i?i(t,...r):[]}}function fn(e){const n=e.name,t=R(e.cont);return(r,...s)=>r.hasAttribute(n)?t(r,...s):[]}function hn(e){const n=[];for(const r of e.matchers){const s=r.predicate,i=R(r.cont);n.push((a,o,...c)=>s(a)?i(o,...c):[])}const t=e.name;return(r,...s)=>{const i=r.getAttribute(t);return i!==null?n.flatMap(a=>a(i,r,...s)):[]}}function pn(e){const n=R(e.cont),t=e.combinator==="+"?dn:gn;return(r,...s)=>{const i=t(r);return i?n(i,r,...s):[]}}function mn(e){const n=R(e.cont);return(t,r,...s)=>n(r,...s)}function dn(e){let n=e.previousSibling;for(;n&&n.nodeType!==Node.ELEMENT_NODE;)n=n.previousSibling;return n}function gn(e){return e.parentElement}var kn=H.__commonJSMin(((e,n)=>{var t=function(f){return r(f)&&!s(f)};function r(u){return!!u&&typeof u=="object"}function s(u){var f=Object.prototype.toString.call(u);return f==="[object RegExp]"||f==="[object Date]"||a(u)}var i=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function a(u){return u.$$typeof===i}function o(u){return Array.isArray(u)?[]:{}}function c(u,f){return f.clone!==!1&&f.isMergeableObject(u)?B(o(u),u,f):u}function l(u,f,m){return u.concat(f).map(function(_){return c(_,m)})}function h(u,f){if(!f.customMerge)return B;var m=f.customMerge(u);return typeof m=="function"?m:B}function g(u){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(u).filter(function(f){return Object.propertyIsEnumerable.call(u,f)}):[]}function y(u){return Object.keys(u).concat(g(u))}function p(u,f){try{return f in u}catch{return!1}}function k(u,f){return p(u,f)&&!(Object.hasOwnProperty.call(u,f)&&Object.propertyIsEnumerable.call(u,f))}function v(u,f,m){var _={};return m.isMergeableObject(u)&&y(u).forEach(function(x){_[x]=c(u[x],m)}),y(f).forEach(function(x){k(u,x)||(p(u,x)&&m.isMergeableObject(f[x])?_[x]=h(x,m)(u[x],f[x],m):_[x]=c(f[x],m))}),_}function B(u,f,m){m=m||{},m.arrayMerge=m.arrayMerge||l,m.isMergeableObject=m.isMergeableObject||t,m.cloneUnlessOtherwiseSpecified=c;var _=Array.isArray(f);return _!==Array.isArray(u)?c(f,m):_?m.arrayMerge(u,f,m):v(u,f,m)}B.all=function(f,m){if(!Array.isArray(f))throw new Error("first argument should be an array");return f.reduce(function(_,x){return B(_,x,m)},{})};var fr=B;n.exports=fr})),je=H.__toESM(kn());function ue(e,n,t=()=>{}){if(e===void 0){const r=function(...s){return n(r,...s)};return r}return e>=0?function(...r){return n(ue(e-1,n,t),...r)}:t}function De(e,n){let t=0,r=e.length;for(;t<r&&e[t]===n;)++t;for(;r>t&&e[r-1]===n;)--r;return t>0||r<e.length?e.substring(t,r):e}function Ln(e,n){let t=e.length;for(;t>0&&e[t-1]===n;)--t;return t<e.length?e.substring(0,t):e}function wn(e){return e.replace(/[\s\S]/g,n=>"\\u"+n.charCodeAt().toString(16).padStart(4,"0"))}function Ve(e,n){const t=new Map;for(let r=e.length;r-- >0;){const s=e[r],i=n(s);t.set(i,t.has(i)?(0,je.default)(s,t.get(i),{arrayMerge:xn}):s)}return[...t.values()].reverse()}var xn=(e,n,t)=>[...n];function J(e,n){for(const t of n){if(!e)return;e=e[t]}return e}function He(e,n="a",t=26){const r=[];do e-=1,r.push(e%t),e=e/t>>0;while(e>0);const s=n.charCodeAt(0);return r.reverse().map(i=>String.fromCharCode(s+i)).join("")}var fe=["I","X","C","M"],Ue=["V","L","D"];function qe(e){return[...e+""].map(n=>+n).reverse().map((n,t)=>n%5<4?(n<5?"":Ue[t])+fe[t].repeat(n%5):fe[t]+(n<5?Ue[t]:fe[t+1])).reverse().join("")}var Fe=class{constructor(e,n=void 0){this.lines=[],this.nextLineWords=[],this.maxLineLength=n||e.wordwrap||Number.MAX_VALUE,this.nextLineAvailableChars=this.maxLineLength,this.wrapCharacters=J(e,["longWordSplit","wrapCharacters"])||[],this.forceWrapOnLimit=J(e,["longWordSplit","forceWrapOnLimit"])||!1,this.stashedSpace=!1,this.wordBreakOpportunity=!1}pushWord(e,n=!1){this.nextLineAvailableChars<=0&&!n&&this.startNewLine();const t=this.nextLineWords.length===0,r=e.length+(t?0:1);if(r<=this.nextLineAvailableChars||n)this.nextLineWords.push(e),this.nextLineAvailableChars-=r;else{const[s,...i]=this.splitLongWord(e);t||this.startNewLine(),this.nextLineWords.push(s),this.nextLineAvailableChars-=s.length;for(const a of i)this.startNewLine(),this.nextLineWords.push(a),this.nextLineAvailableChars-=a.length}}popWord(){const e=this.nextLineWords.pop();if(e!==void 0){const n=this.nextLineWords.length===0,t=e.length+(n?0:1);this.nextLineAvailableChars+=t}return e}concatWord(e,n=!1){if(this.wordBreakOpportunity&&e.length>this.nextLineAvailableChars)this.pushWord(e,n),this.wordBreakOpportunity=!1;else{const t=this.popWord();this.pushWord(t?t.concat(e):e,n)}}startNewLine(e=1){this.lines.push(this.nextLineWords),e>1&&this.lines.push(...Array.from({length:e-1},()=>[])),this.nextLineWords=[],this.nextLineAvailableChars=this.maxLineLength}isEmpty(){return this.lines.length===0&&this.nextLineWords.length===0}clear(){this.lines.length=0,this.nextLineWords.length=0,this.nextLineAvailableChars=this.maxLineLength}toString(){return[...this.lines,this.nextLineWords].map(e=>e.join(" ")).join(`
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
(function(){try{if(typeof document<"u"){var o=".blocks-app .block-page-header__dropdown-menu{top:10px}.blocks-app .anticon.anticon-edit.block-page-header__icon-edit{color:#8c8c8c;margin-left:6px;font-size:16px}.blocks-app .ant-typography-edit:hover .anticon.anticon-edit.block-page-header__icon-edit{color:var(--em-colorPrimaryHover)}.blocks-app .ant-page-header.block-page-header{margin-bottom:20px;padding-left:0;padding-right:0}@media (width<=1450px){.blocks-app .ant-page-header.block-page-header{padding-left:12px;padding-right:12px}}.blocks-app .block-page-header .ant-page-header-heading-left{flex-grow:1;overflow:visible}.blocks-app .block-page-header .ant-page-header-back{align-self:flex-start;margin-left:12px;margin-right:0;padding-top:12px}.blocks-app .block-page-header .ant-page-header-heading-title{white-space:pre-wrap;flex-grow:1;font-weight:500;overflow:visible}.blocks-app .block-page-header .ant-typography{margin-bottom:0;padding:4px 12px}.blocks-app .block-page-header .ant-typography-edit-content{margin-top:0;padding:0;left:auto}.blocks-app .block-page-header .ant-input{font-size:inherit;font-weight:inherit}.blocks-app .block-page-header .ant-page-header-heading-extra>*{margin-left:8px}.blocks-app .block-page-header .ant-btn.block-page-header__btn_extra,.blocks-app header .ant-btn.block-page-header__btn_extra{width:32px;padding:0}.blocks-app .block-page__row{margin-bottom:60px}@media (width>=1700px){.blocks-app .block-page__row{margin-right:-60px}}",e=window.__emailmaker_styles__||(window.__emailmaker_styles__={sheets:{},order:[]}),n=o;if(!e.sheets[n]){var t=null;try{typeof CSSStyleSheet=="function"&&"replaceSync"in CSSStyleSheet.prototype&&(t=new CSSStyleSheet,t.replaceSync(o))}catch{t=null}if(t){if(!e.host||!e.host.isConnected||!e.host.sheet){var a=document.createElement("style");a.setAttribute("data-emailmaker","true"),document.head.appendChild(a),e.host=a}for(var l=e.host.sheet,i=0;i<t.cssRules.length;i++)try{l.insertRule(t.cssRules[i].cssText,l.cssRules.length)}catch{}(e.texts||(e.texts=[])).push(o),(e.listeners||[]).forEach(function(p){try{p(o)}catch{}})}else{var a=document.createElement("style");a.setAttribute("data-emailmaker","true"),a.appendChild(document.createTextNode(o)),document.head.appendChild(a)}e.sheets[n]=!0,e.order.push(n)}}}catch(p){console.error("vite-plugin-css-injected-by-js",p)}})();
|
|
2
|
+
__emailmaker__.define("static/core/874f77d2.js",["require","exports","module","static/core/5dc34752.js","static/core/c9d6507f.js","static/core/25b4c1c1.js","static/core/dbb67c2d.js","static/core/e90908e7.js","react","react/jsx-runtime","__delivery__/libs","classnames"],function(f,te,le){const J=f("./5dc34752.js"),V=f("./c9d6507f.js"),e=f("./25b4c1c1.js"),A=f("./dbb67c2d.js"),oe=f("./e90908e7.js");let l=f("react");l=J.__toESM(l);let o=f("react/jsx-runtime"),i=f("__delivery__/libs"),Y=f("classnames");Y=J.__toESM(Y);var q=({block:t,autoSaveBlockResult:p})=>{const{__:c,_x:u}=e.useI18n();e.useDispatch();const I=e.useEmailAttributesWriter(),a=e.useAppNavigate(),_=e.useCurrentUser(),{modal:y}=i.ui_kit$App.useApp(),m=e.useNotification(),{confirm:$}=y,{token:F}=(0,i.ui_kit$useToken)(),G=e.useAppConfig(),K=e.useContainer(),C=()=>{e.leaveBlock(K)},b=e.useSelector(e.selectCodeModeDirection),O=t.hasOwnProperty("type")?e.BLOCK:e.EMAIL,x=e.useSelector(e.selectElementSettings$1),z=e.useSelector(e.selectElementSettings),S=O==="email"?x:z,E=e.useSelector(e.selectIsCodeMode),Q=()=>(S?.type===e.ELEMENT_TYPES.TEXT||S?.type===e.ELEMENT_TYPES.LINK||S.type===e.ELEMENT_TYPES.BUTTON)&&E&&b!=="bottom",d=e.useProjectData(),{owner:w,admin:h}=e.useMyRoles(),W=e.useStore(),N=(s,g)=>W.dispatch(e.blocksApi.endpoints.deleteBlock.initiate(s.id)).then(k=>{k.error&&m.fromError("BLOCK_REMOVING_ERROR",e.getBlockDesc(s),k.error),C(),g(`/projects/${s.project}/blocks`),m.success({id:"BLOCK_REMOVING_SUCCESS",title:c("The block “")+k.data.title+u("” was successfully removed.","block"),data:e.getBlockDesc(s)})}),B=(s,g)=>{$({mask:{closable:!0},centered:!0,title:u("Are you sure you want to delete the “","block")+s.title+c("” block?"),icon:(0,o.jsx)(e.EmIcons,{icon:"DeleteOutlined",component:i.icons$DeleteOutlined,size:22,style:{color:i.ui_kit$iconColors.danger,marginInlineEnd:12,flexShrink:0}}),okText:c("Yes"),cancelText:c("No"),onOk:()=>N(s,g)})},T=()=>{C(),a(`/projects/${d.id}/blocks`)},L=s=>{I({title:s})},[H,P]=e.useAddBlockMutation(),X=e.useContentReader(),D=()=>{t.isNew?t.isNew?m.warning({id:"COPY_NOT_SAVED",payload:t,title:c("To create a copy, you need to save the block.")}):H({title:e.generateCopyTitle(t.title),blocktags:t.blocktags,project:d.id,subject:t.subject,description:t.description,html:X(),type:t.type?t.type:"Other"}).then(s=>{if(s.error){m.error({id:"BLOCK_CLONING_ERROR",data:e.getBlockDesc(t),innerException:s.error,title:s.error.data.code,description:s.error.data.message});return}a(`/projects/${d.id}/blocks/${s.data.id}`),m.success({id:"BLOCK_CLONING_SUCCESS",data:e.getBlockDesc(t),title:c("The copy of block “")+t.title+u("” was successfully created.","block")})}):e.getEmitter(K,V.events.ON_BLOCK_CLONE_ID).fire(t)},M=()=>{t.isNew?(C(),a(`/projects/${d.id}/blocks`),m.success({id:"BLOCK_REMOVING_SUCCESS",title:c("The draft of the block has been deleted."),data:e.getBlockDesc(t)})):B(t,a)};let v=[];v.push({label:c("Clone"),icon:(0,o.jsx)(e.EmIcons,{icon:"CopyOutlined",component:i.icons$CopyOutlined,size:16}),key:"Clone",className:"em-analytics__block-clone",disabled:P.isLoading,onClick:D}),(w||h||_.id?.toString()===t.author?.toString())&&v.push({label:(0,o.jsx)(e.SwitchLockBtn,{element:t},"Lock"),icon:t.lock?(0,o.jsx)(e.EmIcons,{icon:"UnlockOutlined",component:i.icons$UnlockOutlined,style:{fontSize:"16px"}}):(0,o.jsx)(e.EmIcons,{icon:"LockOutlined",component:i.icons$LockOutlined,style:{fontSize:"16px"}}),disabled:t.isNew},{label:c("Remove"),icon:(0,o.jsx)(e.EmIcons,{icon:"DeleteOutlined",component:i.icons$DeleteOutlined,size:16}),key:"Remove",className:"em-analytics__block-remove",onClick:M,style:{color:"#ff4d4f"}}),e.useSetTitle(t.title===null?c("New block title"):t.title);const R=(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)(i.ui_kit$Space,{size:10,children:[G.headerArrowBackVisible&&(0,o.jsx)(i.ui_kit$Tooltip,{title:c("Back"),placement:"left",children:(0,o.jsx)(i.ui_kit$Button,{type:"text",icon:(0,o.jsx)(e.EmIcons,{icon:"ArrowLeftOutlined",component:i.icons$ArrowLeftOutlined}),onClick:T,shape:"circle"})}),(0,o.jsx)(i.ui_kit$Paragraph,{className:"ant-page-header-heading-title",editable:{triggerType:["text","icon"],icon:(0,o.jsx)(e.EmIcons,{icon:"EditOutlined",component:i.icons$EditOutlined,className:"email-page-header__icon-edit"}),onChange:L},children:t.title===null?c("New block title"):t.title})]})}),n=(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(A.EmailPreviewMenu,{emailElement:t}),t.lock?(0,o.jsx)(e.EmIcons,{icon:"LockOutlined",component:i.icons$LockOutlined,className:(0,Y.default)("lock-icon",{"lock-icon__disabled":!(w||h||_.id?.toString()===t.author?.toString())}),style:{color:F.colorPrimary,fontSize:"16px"}},"Lock"):null,(0,o.jsx)(i.ui_kit$Dropdown,{arrow:"true",menu:{items:v},children:(0,o.jsx)(i.ui_kit$Button,{className:"block-page-header__btn block-page-header__btn_extra",onClick:()=>{},children:(0,o.jsx)(e.EmIcons,{icon:"EllipsisOutlined",component:i.icons$EllipsisOutlined})})},"Actions"),(0,o.jsx)(oe.SaveBlockBtn,{className:"em-analytics__block-save",block:t,isEditableRights:w||h||_.id?.toString()===t.author?.toString(),autoSaveBlockResult:p,ownsDocument:!0},"Save")]}),r=G.commandButtonsEnabled?n:(0,o.jsx)(A.EmailPreviewMenu,{emailElement:t});return(0,o.jsx)(e.Header,{leftBlock:R,rightBlock:r,className:"header_blocks",isHeaderCodeMenuOpen:Q()})};q.propTypes={};function ee(t=document){const p=t.getElementById("email_iframe_slot");return{slot:p,area:p?.closest("[data-scroll-area]")??null}}function ne(t){if(t)return t.renderGuid??(t.id!=null?String(t.id):void 0)}function se(t,p={}){const c=e.useStore(),u=p.key??ne(t),I=p.recovery===!0,a=(0,l.useMemo)(()=>{if(u===void 0)return;const m=e.getEmailDocuments(V.getContainer(c));return I?t?.id!=null?m.open(String(t.id),{email:t}):m.openDraft(t):m.openBlock(u,t)},[u,c,I]),_=t?.modified,y=t?.lock;return(0,l.useEffect)(()=>{e.writeSourceReport(a,e.fromServerFacts({modified:_,lock:y}))},[a,_,y]),a}var{Content:re}=i.ui_kit$Layout,ie=({session:t})=>{const{__:p}=e.useI18n(),c=e.useSendPostMessage(),{blockId:u,projectId:I}=e.useRouteParams(),a=e.useDispatch();e.useAppNavigate();const _=e.useCookieManager();e.useSelector(e.selectMonacoFocusing),e.useSelector(e.selectIsPanelHistoryCollapsed);const y=_.get(e.APP_COOKIES.em_new_block),{isSuccess:m,data:$}=e.useGetBlockQuery(+y,{skip:!!t||!y}),[F,G]=(0,l.useState)(!1),{isLoading:K,isSuccess:C,isError:b,error:O,data:x}=e.useGetBlockQuery(u,{skip:!!t||!u});(0,l.useEffect)(()=>{b&&O&&e.reportEntityLoadError("block",u,O)},[b,O,u]);const z=y?m:C,S=C&&x?.id?x:m&&$,E=t?t.block:S,Q=se(t?void 0:S||void 0,{key:!t&&S?.id!=null?e.blockSessionKey(S.id):void 0}),d=t?t.document:Q,w=e.useDocumentAttributes(d),h=(0,l.useMemo)(()=>d?e.resolveOpenEmail({attributes:w,readContent:()=>d.getContent(),docId:d.get().docId,hasSession:!0,serverId:d.get().serverId,show:void 0}):E,[w,d,E]),W=e.useStore(),N=e.getEmailDocuments(V.getContainer(W)).history();e.usePublishDocumentSession(d,N);const B=e.useDocumentUndo({document:d,history:N}),T=(0,l.useCallback)(()=>{B.undo()},[B]),L=(0,l.useCallback)(()=>{B.redo()},[B]),H=(0,l.useRef)();(0,l.useEffect)(()=>{H.current!==E?.id&&(B.clear(),H.current=E?.id)},[E,B]);const P=(0,l.useCallback)(n=>{(window.navigator.appVersion.indexOf("Mac")&&n.metaKey||n.ctrlKey)&&(n.code==="KeyZ"?(n.preventDefault(),n.shiftKey?L():T()):n.code==="KeyY"&&!n.shiftKey&&(n.preventDefault(),L()))},[T,L]);(0,l.useEffect)(()=>(document.body.classList.add("editor"),()=>{a(e.resetPanes()),a(e.closeModal$1()),a(e.resetElementHistorySlice()),a(e.setActiveSettingsTab(e.BUILD))}),[a]);const X=n=>{const r=n.data.operation,s=n.data.action,g=document.getElementById("iframe-scroll-top"),k=document.getElementById("iframe-scroll-bottom");if(r===e.EVENT_TYPES.APPLICATION_ACTION&&(s==="undo"?T():s==="redo"&&L()),r===e.EVENT_TYPES.APPLICATION_SCROLL_BLOCK_SHOW){const{slot:Z}=ee(),U=document.body.getBoundingClientRect().height,j=Z?.getClientRects()[0];if(!j||!g||!k)return;j.top<0&&(g.style.display="block"),j.top+j.height>U&&(k.style.display="block")}r===e.EVENT_TYPES.APPLICATION_SCROLL_BLOCK_HIDE&&g&&k&&(g.style.display="none",k.style.display="none")};e.useListenPostMessage(X);const D=(0,l.useCallback)(n=>{n.target?.closest?.(".file-manager, .ant-modal.file-manager")||(n.preventDefault(),n.target&&c({operation:e.EVENT_TYPES.SANDBOX_DRAG_CANCEL}))},[c]),M=(0,l.useCallback)(()=>{},[]),v=(0,l.useCallback)(n=>{if(n.preventDefault(),n.target?.closest?.(".file-manager, .ant-modal.file-manager"))return;const r=document.getElementById("iframe-scroll-top"),s=document.getElementById("iframe-scroll-bottom"),{slot:g,area:k}=ee();if(!g||!r||!s)return;const{height:Z,top:U}=g.getBoundingClientRect(),j=document.body.getBoundingClientRect().height;U>1?r.style.display==="block"&&(r.style.display="none"):r.style.display==="none"&&(r.style.display="block"),Z-j+U<1?s.style.display==="block"&&(s.style.display="none"):s.style.display==="none"&&(s.style.display="block"),n.target===r&&k?.scrollBy(0,-20),n.target===s&&k?.scrollBy(0,20)},[]),R=(0,l.useCallback)(()=>{const n=document.getElementById("iframe-scroll-top"),r=document.getElementById("iframe-scroll-bottom");n&&r&&(n.style.display="none",r.style.display="none")},[]);return(0,l.useEffect)(()=>(window.addEventListener("dragstart",M),window.addEventListener("drop",D),window.addEventListener("dragend",R),window.addEventListener("dragover",v),window.addEventListener("keydown",P),()=>{window.removeEventListener("dragstart",M),window.removeEventListener("drop",D),window.removeEventListener("dragover",v),window.removeEventListener("dragend",R),window.removeEventListener("keydown",P)}),[P,M,D,R,v]),(0,o.jsx)(e.DocumentSessionProvider,{document:d,history:N,children:(0,o.jsxs)(i.ui_kit$Layout,{className:"block-page",children:[E&&(0,o.jsx)(q,{block:h}),K&&(0,o.jsx)(i.ui_kit$PageLoader,{}),b&&O&&!1,t?E&&(0,o.jsx)(A.EmailPane_default,{emailElement:h,kind:"block",isSuccess:!0}):(!u&&(y?F&&$:!0)||C&&x)&&(0,o.jsx)(A.EmailPane_default,{emailElement:h,kind:"block",isSuccess:z})]})})},ce=()=>{const{document:t,email:p}=e.useOpenEmail(),c=(0,l.useMemo)(()=>({document:t,block:p}),[t,p]);return(0,o.jsx)(ie,{session:c})};te.default=ce});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
__emailmaker__.define("static/core/
|
|
1
|
+
__emailmaker__.define("static/core/87dcdb89.js",["require","exports","module","static/core/5dc34752.js","static/core/25b4c1c1.js"],function(i,d,P){const h=i("./5dc34752.js"),p=i("./25b4c1c1.js");var u={items_per_page:"/ pagina",jump_to:"vai a",jump_to_confirm:"Conferma",page:"Pagina",prev_page:"Pagina precedente",next_page:"Pagina successiva",prev_5:"Precedente 5 pagine",next_5:"Prossime 5 pagine",prev_3:"Precedente 3 pagine",next_3:"Prossime 3 pagine",page_size:"dimensioni della pagina"};function o(a){"@babel/helpers - typeof";return o=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(a)}function l(a,e){var r=Object.keys(a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(a);e&&(n=n.filter(function(S){return Object.getOwnPropertyDescriptor(a,S).enumerable})),r.push.apply(r,n)}return r}function c(a){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?l(Object(r),!0).forEach(function(n){g(a,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach(function(n){Object.defineProperty(a,n,Object.getOwnPropertyDescriptor(r,n))})}return a}function g(a,e,r){return e=f(e),e in a?Object.defineProperty(a,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):a[e]=r,a}function f(a){var e=v(a,"string");return o(e)=="symbol"?e:String(e)}function v(a,e){if(o(a)!="object"||!a)return a;var r=a[Symbol.toPrimitive];if(r!==void 0){var n=r.call(a,e||"default");if(o(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}var b=c(c({},p.commonLocale),{},{locale:"it_IT",today:"Oggi",now:"Adesso",backToToday:"Torna ad oggi",ok:"OK",clear:"Cancella",week:"Settimana",month:"Mese",year:"Anno",timeSelect:"Seleziona l'ora",dateSelect:"Seleziona la data",monthSelect:"Seleziona il mese",yearSelect:"Seleziona l'anno",decadeSelect:"Seleziona il decennio",previousMonth:"Il mese scorso (PageUp)",nextMonth:"Il prossimo mese (PageDown)",previousYear:"L'anno scorso (Control + sinistra)",nextYear:"L'anno prossimo (Control + destra)",previousDecade:"Ultimo decennio",nextDecade:"Prossimo decennio",previousCentury:"Secolo precedente",nextCentury:"Prossimo secolo",shortWeekDays:["Dom","Lun","Mar","Mer","Gio","Ven","Sab"],shortMonths:["Gen","Feb","Mar","Apr","Mag","Giu","Lug","Ago","Set","Ott","Nov","Dic"]}),s={placeholder:"Selezionare l'orario",rangePlaceholder:["Inizio orario","Fine orario"]},m={lang:{placeholder:"Selezionare la data",rangePlaceholder:["Data d'inizio","Data di fine"],...b},timePickerLocale:{...s}},y=m,t=" ${label} non è un ${type} valido",$={locale:"it",Pagination:u,DatePicker:m,TimePicker:s,Calendar:y,global:{placeholder:"Selezionare",close:"Chiudi",show:"Mostra",hide:"Nascondi"},Table:{filterTitle:"Menù Filtro",filterConfirm:"OK",filterReset:"Reset",filterEmptyText:"Senza filtri",filterCheckAll:"Seleziona tutti",filterSearchPlaceholder:"Cerca nei filtri",emptyText:"Senza dati",selectAll:"Seleziona pagina corrente",selectInvert:"Inverti selezione nella pagina corrente",selectNone:"Deseleziona tutto",selectionAll:"Seleziona tutto",sortTitle:"Ordina",expand:"Espandi riga",collapse:"Comprimi riga ",triggerDesc:"Clicca per ordinare in modo discendente",triggerAsc:"Clicca per ordinare in modo ascendente",cancelSort:"Clicca per eliminare l'ordinamento"},Tour:{Next:"Successivo",Previous:"Precedente",Finish:"Termina"},Modal:{okText:"OK",cancelText:"Annulla",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Annulla"},Transfer:{titles:["",""],searchPlaceholder:"Cerca qui",itemUnit:"elemento",itemsUnit:"elementi",remove:"Elimina",selectCurrent:"Seleziona la pagina corrente",removeCurrent:"Rimuovi la pagina corrente",selectAll:"Seleziona tutti i dati",removeAll:"Rimuovi tutti i dati",selectInvert:"Inverti la pagina corrente"},Upload:{uploading:"Caricamento...",removeFile:"Rimuovi il file",uploadError:"Errore di caricamento",previewFile:"Anteprima file",downloadFile:"Scarica file"},Empty:{description:"Nessun dato"},Icon:{icon:"icona"},Text:{edit:"modifica",copy:"copia",copied:"copia effettuata",expand:"espandi"},Form:{optional:"(opzionale)",defaultValidateMessages:{default:"Errore di convalida del campo ${label}",required:"Si prega di inserire ${label}",enum:"${label} deve essere uno di [${enum}]",whitespace:"${label} non può essere un carattere vuoto",date:{format:"Il formato della data ${label} non è valido",parse:"${label} non può essere convertito in una data",invalid:"${label} non è una data valida"},types:{string:t,method:t,array:t,object:t,number:t,date:t,boolean:t,integer:t,float:t,regexp:t,email:t,url:t,hex:t},string:{len:"${label} deve avere ${len} caratteri",min:"${label} deve contenere almeno ${min} caratteri",max:"${label} deve contenere fino a ${max} caratteri",range:"${label} deve contenere tra ${min}-${max} caratteri"},number:{len:"${label} deve essere uguale a ${len}",min:"${label} valore minimo è ${min}",max:"${label} valor e massimo è ${max}",range:"${label} deve essere compreso tra ${min}-${max}"},array:{len:"Deve essere ${len} ${label}",min:"Almeno ${min} ${label}",max:"Massimo ${max} ${label}",range:"Il totale di ${label} deve essere compreso tra ${min}-${max}"},pattern:{mismatch:"${label} non corrisponde al modello ${pattern}"}}},QRCode:{expired:"Codice QR scaduto",refresh:"Ricarica",scanned:"Scansionato"},ColorPicker:{presetEmpty:"Vuoto",transparent:"Trasparente",singleColor:"Tinta unita",gradientColor:"Gradiente"}};d.default=$});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
__emailmaker__.define("static/core/
|
|
1
|
+
__emailmaker__.define("static/core/8c37b60d.js",["require","exports","module","static/core/5dc34752.js","static/core/25b4c1c1.js","static/core/86b377fd.js"],function(f,M,it){const D=f("./5dc34752.js"),s=f("./25b4c1c1.js"),h=f("./86b377fd.js");var F=1.25,O=80,$=3,k=1,p=16,L="p, div, td, th";function d(t){if(!t)return;const e=parseFloat(t);if(Number.isFinite(e))return t.trim().endsWith("pt")?e*4/3:e}function A(t){return t.style}function l(t){const e=A(t);if(!e)return!1;if(e.display==="none"||e.visibility==="hidden"||e.opacity==="0")return!0;const r=d(e.fontSize);return r!==void 0&&r<=k&&N(t)<=k?!0:d(e.maxHeight)===0}function u(t){for(let e=t;e;e=e.parentElement){const r=d(A(e)?.fontSize);if(r!==void 0)return r}return p}function w(t,e){for(const r of Array.from(t.childNodes)){if(s.isTextNode(r)){const n=r.data.trim().length;if(n){const i=u(r.parentElement);e.set(i,(e.get(i)??0)+n)}continue}!s.isElement(r)||l(r)||w(r,e)}}function j(t){const e=new Map;w(t,e);let r=p,n=0;for(const[i,o]of e)o>n&&(r=i,n=o);return r}function N(t){let e=u(t);for(const r of Array.from(t.querySelectorAll("*")))r.textContent?.trim()&&(e=Math.max(e,u(r)));return e}function q(t,e){return t.querySelector("a")?.textContent?.trim()===e}function b(t){return Array.from(t.querySelectorAll(L)).some(e=>e.textContent?.trim())}function G(t){const e=j(t),r=[];for(const o of Array.from(t.querySelectorAll(L))){if(l(o)||b(o))continue;const a=o.textContent?.trim()??"";if(!a||a.length>O||q(o,a))continue;const c=N(o);c>=e*F&&r.push({elem:o,size:c})}const n=[...new Set(r.map(o=>o.size))].sort((o,a)=>a-o),i=new Map;for(const{elem:o,size:a}of r)i.set(o,Math.min(n.indexOf(a)+1,$));return{headingLevels:i}}var R=D.__exportAll({markdownAnchor:()=>Y,markdownBlock:()=>X,markdownImage:()=>Q,markdownInline:()=>J,markdownOrderedList:()=>Z,markdownStrong:()=>K,markdownUnorderedList:()=>U}),E=h.formatList,_=20;function W(t){return!t||t.includes("%")?NaN:parseFloat(t)}function m(t,e){const r=t.style,n=e==="width"?"maxWidth":"maxHeight";for(const i of[t.getAttribute(e),r?.[e],r?.[n]]){const o=W(i);if(Number.isFinite(o))return o}return NaN}function S(t){return(t.getAttribute("alt")??"").trim()?!1:m(t,"width")<=_||m(t,"height")<=_}function B(t){return t.replace(/ /g,"%20").replace(/\(/g,"%28").replace(/\)/g,"%29")}function x(t){const e=t.getAttribute("href");return!e||e.startsWith("#")?"":e}function g(t){for(const e of Array.from(t.childNodes)){if(s.isTextNode(e)){if(/\S/.test(e.data))return!0;continue}if(!s.isElement(e))continue;const r=e.tagName.toLowerCase();if(r==="img"){if(e.getAttribute("src")&&!S(e))return!0;continue}if(r==="hr"||r==="a"&&x(e)&&v(e)||g(e))return!0}return!1}function v(t){const e=(t.getAttribute("title")??"").trim();if(e)return e;const r=t.querySelector("img");return r?(r.getAttribute("title")??"").trim():""}function y(t,e,r){r.addLiteral("["),e(),r.addLiteral(`](${B(t)})`)}function I(t,e){return t.parentElement?.tagName.toLowerCase()!=="li"?e:{...e,leadingLineBreaks:1,trailingLineBreaks:1}}var U=(t,e,r,n)=>{E(t,e,r,I(t,n),()=>"- ")},Z=(t,e,r,n)=>{let i=Number(t.getAttribute("start")??"1")||1;E(t,e,r,I(t,n),()=>`${i++}. `)},V={h1:1,h2:2,h3:3,h4:4,h5:5,h6:6};function z(t,e){return V[t.tagName.toLowerCase()]??e.metadata?.headingLevels.get(t)}var X=(t,e,r,n)=>{if(l(t)||!g(t))return;const i=z(t,r);r.openBlock({leadingLineBreaks:i?2:n.leadingLineBreaks}),i&&r.addLiteral(`${"#".repeat(i)} `),e(Array.from(t.childNodes),r),r.closeBlock({trailingLineBreaks:i?2:n.trailingLineBreaks})};function P(t,e){for(let r=t.parentElement;r;r=r.parentElement)if(z(r,e))return!0;return!1}function C(t){return s.isTextNode(t)?!/\S/.test(t.data):s.isElement(t)&&t.tagName.toLowerCase()==="br"}var K=(t,e,r)=>{const n=Array.from(t.childNodes);if(P(t,r)){e(n,r);return}let i=0,o=n.length;for(;i<o&&C(n[i]);)i++;for(;o>i&&C(n[o-1]);)o--;const a=n.slice(i,o),c=a.map(nt=>nt.textContent??"").join("");if(!a.length||c!==c.trim()){e(n,r);return}e(n.slice(0,i),r),r.addLiteral("**"),e(a,r),r.addLiteral("**"),e(n.slice(o),r)},J=(t,e,r)=>{l(t)||e(Array.from(t.childNodes),r)};function T(t){return t.replace(/&/g,"&").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function H(t,e){const r=m(t,e);return Number.isFinite(r)?` ${e}="${Math.round(r)}"`:""}var Q=(t,e,r)=>{const n=t.getAttribute("src");if(!n||S(t))return;const i=t.getAttribute("alt")??"",o=H(t,"width"),a=H(t,"height");if(o||a){r.addLiteral(`<img src="${T(n)}" alt="${T(i)}"${o}${a}>`);return}r.addLiteral("})`)},Y=(t,e,r)=>{const n=x(t);if(!n){e(Array.from(t.childNodes),r);return}if(g(t)){y(n,()=>e(Array.from(t.childNodes),r),r);return}const i=v(t);i&&y(n,()=>r.addInline(i),r)},tt={"\\":"\\\\","`":"\\`","*":"\\*",_:"\\_","[":"\\[","]":"\\]","#":"\\#",">":"\\>"},et={wordwrap:!1,encodeCharacters:tt,baseElements:{selectors:["body"]},formatters:R,selectors:[{selector:"*",format:"markdownInline"},{selector:"p",format:"markdownBlock",options:{leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"div",format:"markdownBlock",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"td",format:"markdownBlock",options:{leadingLineBreaks:1,trailingLineBreaks:1}},{selector:"table",format:"markdownBlock",options:{leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"th",format:"markdownBlock",options:{leadingLineBreaks:1,trailingLineBreaks:1}},...["h1","h2","h3","h4","h5","h6"].map(t=>({selector:t,format:"markdownBlock"})),{selector:"a",format:"markdownAnchor"},{selector:"img",format:"markdownImage"},{selector:"ul",format:"markdownUnorderedList"},{selector:"ol",format:"markdownOrderedList"},{selector:"hr",format:"blockString",options:{string:"---",leadingLineBreaks:2,trailingLineBreaks:2}},{selector:"b",format:"markdownStrong"},{selector:"strong",format:"markdownStrong"},{selector:"i",format:"inlineSurround",options:{prefix:"*",suffix:"*"}},{selector:"em",format:"inlineSurround",options:{prefix:"*",suffix:"*"}}]};function rt(t){return h.convert(t,et,G(t))}M.htmlToMarkdown=rt});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
__emailmaker__.define("static/core/
|
|
1
|
+
__emailmaker__.define("static/core/98ab1508.js",["require","exports","module","static/core/5dc34752.js","static/core/86b377fd.js"],function(e,t,r){const l=e("./5dc34752.js");var o={wordwrap:200,tables:!0,selectors:[...e("./86b377fd.js").DEFAULT_OPTIONS.selectors||[],{selector:"table",format:"dataTable"},{selector:"ul",format:"list"},{selector:"ol",format:"list"},{selector:"pre",format:"block"},{selector:"blockquote",format:"blockquote"}],baseElements:{selectors:["body","table"]},preserveNewlines:!1,longWordSplit:{forceWrapOnLimit:!1}};t.EmailTextPlainConvertOptions=o});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
__emailmaker__.define("static/core/61378c9e.js",["require","exports","module"],function(d,a,u){function l(c,s="application/octet-stream"){let t=c.trim(),o=s?.trim()||"application/octet-stream";const r=t.indexOf(",");if(t.startsWith("data:")&&r>=0){const e=t.slice(5,r).split(";")[0]?.trim();e&&(o=e),t=t.slice(r+1)}const m=t.replace(/\s/g,""),i=atob(m),n=new Uint8Array(i.length);for(let e=0;e<i.length;e++)n[e]=i.charCodeAt(e);return new Blob([n],{type:o})}Object.defineProperty(a,"base64ToBlob",{enumerable:!0,get:function(){return l}})});
|
|
2
|
+
|
|
3
|
+
(function(){try{if(typeof document<"u"){var t=".blocks-app .image-preview{text-align:center;min-height:100px;position:relative}.blocks-app .image-preview .image-editor-modal{border:1px solid red}.blocks-app .image-preview__edit-button{position:absolute;bottom:10px;left:50%;transform:translate(-50%)}.blocks-app .image-preview img{border:1px solid var(--em-colorBorder);border-radius:6px;max-width:100%;max-height:500px}.blocks-app .serach-results .ant-row{align-items:center}.blocks-app .serach-results .blocks-search__divider-wrapper{margin-top:12px;position:relative}.blocks-app .serach-results .blocks-search__divider-wrapper .ant-divider-horizontal{border-top:1px solid var(--em-colorBorderSecondary);background:0 0;width:100%;height:1px;min-height:0;margin:0;position:static}.blocks-app .slideshow-container{width:524px;height:350px;margin:auto;position:relative;overflow:hidden}.blocks-app .slideshow-image{opacity:0;width:100%;height:100%;position:absolute;top:0;left:0}.blocks-app .image-ai .slideshow-image{width:auto;height:auto}.blocks-app .image-ai__image-item{text-align:center;border-radius:6px;justify-content:center;align-items:center;min-height:100px;display:flex;position:relative}.blocks-app .image-ai__image-item .buttons{justify-content:space-between;display:flex;position:absolute;bottom:10px;left:50%;transform:translate(-50%)}.blocks-app .image-ai .text-area-input-hybrid{border:none;outline:none;min-height:0;padding:0 0 0 1px}.blocks-app .image-ai .text-area-input-hybrid textarea{height:32px;min-height:32px;padding:3px 11px;line-height:26px}.blocks-app .image-ai__loading{justify-content:center;align-items:center;min-height:150px;display:flex}.blocks-app .image-ai__loading .spin{flex-direction:column;justify-content:center;align-items:center;height:150px;display:flex}.blocks-app .image-ai__loading .status{margin:3px 0 0}.blocks-app .image-ai__preview{border-radius:6px;margin-top:24px;overflow:hidden}.blocks-app .image-ai__preview .image-ai__image-item img{border-radius:calc(var(--em-borderRadius) * 1px);object-fit:contain;max-height:100%;transition:height 1s;top:50%;left:50%;overflow:hidden;transform:translate(-50%,-50%)}.blocks-app .image-ai .small{width:302px;height:202px}.blocks-app .image-ai .large{width:524px;height:350px}.blocks-app .image-ai .image-ai__row{padding:0 2px}.blocks-app .image-ai .image-ai__input-affix-wrapper{border-style:solid;border-width:calc(var(--em-borderWidth) * 1px);border-color:var(--em-colorFillSecondaryDarken);border-radius:calc(var(--em-borderRadius) * 1px);width:100%;padding-left:0;display:inline-flex}.blocks-app .image-ai .image-ai__input-affix-wrapper:hover{border-color:var(--em-borderColorHover)}.blocks-app .image-ai .image-ai__input-affix-wrapper.ant-input-affix-wrapper-focused{border-color:var(--em-colorPrimaryBorder)}.blocks-app .image-ai .image-ai__textarea{font-size:16px}.blocks-app .image-ai .image-ai__input-icon{font-size:16px;top:0;right:0}.dark .blocks-app .image-ai .image-ai__preview .image-ai__image-item img{background:#2b2b2b;border:1px solid #434343}.dark .blocks-app .image-ai .ant-btn{background:#1f1f1f}.dark .blocks-app .image-ai .ant-btn:hover{color:var(--em-colorPrimary)}.blocks-app .stock-tab img{border-radius:0;max-width:none;max-height:none}.blocks-app .stock-tab .stock-search-input{padding:0 2px}.blocks-app .stock-tab .my-masonry-grid{text-align:center;width:auto;display:flex}.blocks-app .stock-tab .my-masonry-grid_column{background-clip:padding-box}.blocks-app .stock-tab .list-item{cursor:pointer;background:#f0f2f5;border:1px solid #f0f2f5;border-radius:6px;min-height:100px;max-height:100px;margin-bottom:20px;transition:all .3s;display:inline-block;position:relative;overflow:hidden}.blocks-app .stock-tab .list-item .overlay-image{opacity:0;background-size:cover;width:110px;height:40px;transition:opacity .5s;position:absolute;bottom:10px;right:10px}.blocks-app .stock-tab .list-item .ant-spin{color:#f0f2f5;font-size:20px;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.blocks-app .stock-tab .list-item img{object-fit:cover;opacity:0;border-radius:6px;height:auto;transition:opacity .5s ease-in-out;display:block}.blocks-app .stock-tab .list-item.loaded{border:1px solid #d9d9d9;max-height:1000px}.blocks-app .stock-tab .list-item.loaded img{opacity:1;height:100%}.blocks-app .stock-tab .list-item.loaded .loaded-image{opacity:.5}.blocks-app .stock-tab .list-item:hover{box-shadow:0 1px 2px -2px #00000029,0 3px 6px #0000001f,0 5px 12px 4px #00000017}.blocks-app .stock-tab .list-item:hover p.creator-info,.blocks-app .stock-tab .list-item:hover .overlay-image{opacity:1}.blocks-app .stock-tab .list-item p.creator-info{color:#fff;opacity:0;background-color:#00000080;border-radius:0 0 6px;margin:0;padding:5px;font-size:10px;line-height:1.2;position:absolute;bottom:0;right:0}.blocks-app .stock-tab .list-item p.creator-info:hover a{color:#fff;text-decoration:underline}.blocks-app .stock-tab .list-item p.creator-info a{color:#fff;text-decoration:none}.blocks-app .stock-color-filter{display:flex}.blocks-app .stock-color-filter label{border-width:1px;width:24px;height:24px;margin:4px;padding:0;font-size:0;border-radius:6px!important}.blocks-app .stock-color-filter label.all-colors{background-image:linear-gradient(135deg,red,#ff7f00,#ff0,#0f0,#00f,#8b00ff)}.blocks-app .stock-color-filter label.black-color{background:#222}.blocks-app .stock-color-filter label.bw-color{background-image:linear-gradient(135deg,#222 50%,#fff 50%)}.blocks-app .stock-color-filter label.white-color{background:#fff}.blocks-app .stock-color-filter label.orange-color{background:#fa8c16}.blocks-app .stock-color-filter label.red-color{background:#f5222d}.blocks-app .stock-color-filter label.purple-color{background:#722ed1}.blocks-app .stock-color-filter label.magenta-color{background:#eb2f96}.blocks-app .stock-color-filter label.green-color{background:#52c41a}.blocks-app .stock-color-filter label.teal-color{background:#43c3c3}.blocks-app .stock-color-filter label.blue-color{background:#1677ff}.blocks-app .stock-color-filter .ant-radio-button-wrapper:not(:first-child):before{display:none}.blocks-app .serach-results{padding-top:6px}.blocks-app .serach-results .stock-search-input{width:322px;padding:0 2px}.blocks-app .serach-results .blocks-search__divider-wrapper{width:calc(100% + 48px);margin-top:12px;margin-left:-24px;margin-right:-24px;position:relative}.blocks-app .serach-results .blocks-search__divider-wrapper .ant-divider-horizontal{pointer-events:none;border-top:1px solid var(--em-colorBorderSecondary);background:linear-gradient(180deg, var(--em-colorBgContainerDisabled), transparent 40%);border-bottom:none;width:100%;height:20px;min-height:20px;margin:0;position:relative;bottom:auto;left:auto;right:auto}.dark .blocks-app .image-center .stock-tab .serach-results .blocks-search__divider-wrapper .ant-divider-horizontal{background:linear-gradient(180deg, var(--em-colorBgBase), transparent 40%)}.dark .blocks-app .stock-tab .list-item{background:#2b2b2b;border:1px solid #2b2b2b}.dark .blocks-app .stock-tab .list-item.loaded{border:1px solid #434343}.blocks-app .image-center .image-center-image-preview{justify-content:center;align-items:center;display:flex}.blocks-app .image-center .ant-divider-horizontal{pointer-events:none;z-index:1;background:linear-gradient(180deg, var(--em-colorBgContainerDisabled), transparent 40%);width:calc(100% + 48px);height:20px;margin:24px -24px 0;position:absolute;bottom:-19px}.dark .blocks-app .image-center .ant-divider-horizontal{background:linear-gradient(180deg, var(--em-colorBgBase), transparent 40%)}.blocks-app .image-center .ant-divider-horizontal.ant-divider-with-text{background:0 0;width:calc(100% + 38px);margin:0 -24px 20px;position:relative;top:0}.blocks-app .image-center img{border-radius:4px;max-width:524px;max-height:352px}.blocks-app .image-center .image-size{justify-content:center;margin-top:6px;font-size:14px;line-height:22px;display:flex}.blocks-app .image-center .ant-upload.ant-upload-drag{border-radius:6px}.blocks-app .image-center .ant-modal-body .stock-search-input{margin-bottom:0}.blocks-app .image-center .ant-modal-body .serach-results .stock-search-input{margin-bottom:10px}.blocks-app .image-center .ant-modal-body .ant-form:not(.serach-results) .ant-form-item:last-child{margin-bottom:0}.blocks-app .image-center .ant-modal-body .ant-tabs{transition:all .7s cubic-bezier(.075,.82,.165,1)}.blocks-app .image-center .ant-modal-body .ant-tabs .ant-tabs-content-holder{overflow-y:clip}.blocks-app .ant-modal{transition:width .7s ease-in-out}",e=window.__emailmaker_styles__||(window.__emailmaker_styles__={sheets:{},order:[]}),r=t;if(!e.sheets[r]){var o=null;try{typeof CSSStyleSheet=="function"&&"replaceSync"in CSSStyleSheet.prototype&&(o=new CSSStyleSheet,o.replaceSync(t))}catch{o=null}if(o){if(!e.host||!e.host.isConnected||!e.host.sheet){var a=document.createElement("style");a.setAttribute("data-emailmaker","true"),document.head.appendChild(a),e.host=a}for(var l=e.host.sheet,p=0;p<o.cssRules.length;p++)try{l.insertRule(o.cssRules[p].cssText,l.cssRules.length)}catch{}(e.texts||(e.texts=[])).push(t),(e.listeners||[]).forEach(function(i){try{i(t)}catch{}})}else{var a=document.createElement("style");a.setAttribute("data-emailmaker","true"),a.appendChild(document.createTextNode(t)),document.head.appendChild(a)}e.sheets[r]=!0,e.order.push(r)}}}catch(i){console.error("vite-plugin-css-injected-by-js",i)}})();
|
|
4
|
+
__emailmaker__.define("static/core/9ef544f4.js",["require","exports","module","static/core/5dc34752.js","static/core/c9d6507f.js","static/core/25b4c1c1.js","static/core/e4b8362a.js","static/core/61378c9e.js","react","react/jsx-runtime","__delivery__/libs","vite/preload-helper"],function(ie,kt,fn){const Xe=ie("./5dc34752.js"),be=ie("./c9d6507f.js"),s=ie("./25b4c1c1.js"),ne=ie("./e4b8362a.js"),It=ie("./61378c9e.js");let e=ie("react");e=Xe.__toESM(e);let t=ie("react/jsx-runtime"),m=ie("__delivery__/libs"),xt=ie("vite/preload-helper");var _t=Xe.__toESM(s.require_prop_types()),Et=s.lazyRoute(()=>(0,xt.__vitePreload)(()=>Promise.resolve().then(()=>ie("./efb5b933.js")),void 0,{}.url));function St(r){return s.useSelector(s.selectSecondModal)?(0,t.jsx)(e.Suspense,{fallback:null,children:(0,t.jsx)(Et,{...r})}):null}var jt=({currentImageLink:r,newLink:o,previewDisplayUrl:i,resolvedPreviewObjectUrl:l,resolvedPreviewBlob:u,resolveImageBlob:c,onSave:f,uploadImageResultIsLoading:p})=>{const g=i||l;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{children:(0,t.jsxs)("div",{className:"image-preview",children:[p&&(0,t.jsx)("div",{style:{position:"absolute",height:"100%",width:"100%",display:"flex",alignItems:"center",justifyContent:"center",background:s.emCssVar("colorBgLayout"),zIndex:10,opacity:.7},children:(0,t.jsx)(m.ui_kit$Spin,{size:"large"})}),g&&(0,t.jsx)("img",{alt:"uploadedImage",src:g})]})}),(0,t.jsx)(St,{currentImageLink:r,prefetchedBlob:u,resolveImageBlob:c,newLink:o,onSave:f,uploadImageResultIsLoading:p})]})},_e={Pixel:"Pixel",Percent:"Percent"},et={unit:_e.Percent,value:80};function Rt(r){return typeof r=="number"?{unit:_e.Percent,value:r*100}:typeof r=="string"?/^(\d*(\.\d+)?)px$/.exec(r)?{unit:_e.Pixel,value:parseFloat(r)}:/^(\d*(\.\d+)?)%$/.exec(r)?{unit:_e.Percent,value:parseFloat(r)}:et:et}function Lt(r,o){const i=Rt(r);let l;return i.unit===_e.Pixel?l=`${i.value}px`:l=`${100-i.value}%`,o?`${l} 0px 0px 0px`:`0px 0px ${l} 0px`}function tt({next:r,hasMore:o,children:i,loader:l,scrollThreshold:u=.8,endMessage:c,style:f,height:p,scrollableTarget:g,hasChildren:w,inverse:I=!1,pullDownToRefresh:y=!1,pullDownToRefreshContent:h,releaseToRefreshContent:x,pullDownToRefreshThreshold:k=100,refreshFunction:L,onScroll:b,dataLength:S,initialScrollY:R,className:F="",role:Q,tabIndex:D,id:G,...z}){const[W,H]=(0,e.useState)(!1),[T,q]=(0,e.useState)(!1),[V,re]=(0,e.useState)(0),_=(0,e.useRef)(null),Y=(0,e.useRef)(null),N=(0,e.useRef)(null),B=(0,e.useRef)(r);B.current=r;const ee=(0,e.useRef)(L);ee.current=L;const P=(0,e.useRef)(k);P.current=k;const n=(0,e.useRef)(!1),A=(0,e.useRef)(!1),j=(0,e.useRef)(0),$=(0,e.useRef)(0),le=(0,e.useRef)(0),E=(0,e.useCallback)(()=>g instanceof HTMLElement?g:typeof g=="string"?document.getElementById(g):null,[g]);(0,e.useEffect)(()=>{if(typeof S>"u")throw new Error('mandatory prop "dataLength" is missing. The prop is needed when loading more content. Check README.md for usage');if(y&&typeof L!="function")throw new Error(`Mandatory prop "refreshFunction" missing.
|
|
5
|
+
Pull Down To Refresh functionality will not work
|
|
6
|
+
as expected. Check README.md for usage'`);if(typeof R=="number"){const U=p?_.current:E();U&&U.scrollHeight>R&&U.scrollTo(0,R)}},[]),(0,e.useEffect)(()=>{n.current=!1,H(!1)},[S]),(0,e.useEffect)(()=>{if(!o||typeof IntersectionObserver>"u")return;const U=Y.current;if(!U)return;const Z=p?_.current:E(),O=new IntersectionObserver(([te])=>{!te.isIntersecting||n.current||(n.current=!0,H(!0),B.current())},{root:Z,rootMargin:Lt(u,I),threshold:0});return O.observe(U),()=>O.disconnect()},[o,u,I,p,E]),(0,e.useEffect)(()=>{var U;if(!b)return;const Z=(U=p?_.current:E())!==null&&U!==void 0?U:typeof window<"u"?window:null;if(!Z)return;const O=te=>{setTimeout(()=>b(te),0)};return Z.addEventListener("scroll",O),()=>Z.removeEventListener("scroll",O)},[b,p,E]),(0,e.useEffect)(()=>{var U,Z;if(!y)return;const O=(U=p?_.current:E())!==null&&U!==void 0?U:typeof window<"u"?window:null;if(!O)return;if(!((Z=N.current)===null||Z===void 0)&&Z.firstChild){const K=N.current.firstChild.getBoundingClientRect().height;le.current=K,re(K)}const te=K=>{(O instanceof HTMLElement?O.scrollTop:document.documentElement.scrollTop)>0||(A.current=!0,K instanceof MouseEvent?j.current=K.pageY:K instanceof TouchEvent&&(j.current=K.touches[0].pageY),$.current=j.current,_.current&&(_.current.style.willChange="transform",_.current.style.transition="transform 0.2s cubic-bezier(0,0,0.31,1)"))},v=K=>{if(!A.current||(K instanceof MouseEvent?$.current=K.pageY:K instanceof TouchEvent&&($.current=K.touches[0].pageY),$.current<j.current))return;const se=$.current-j.current;se>=P.current&&q(!0),!(se>le.current*1.5)&&_.current&&(_.current.style.overflow="visible",_.current.style.transform=`translate3d(0px, ${se}px, 0px)`)},J=()=>{j.current=0,$.current=0,A.current=!1,q(K=>{var se;return K&&((se=ee.current)===null||se===void 0||se.call(ee)),!1}),requestAnimationFrame(()=>{_.current&&(_.current.style.overflow="auto",_.current.style.transform="none",_.current.style.willChange="unset")})};return O.addEventListener("touchstart",te),O.addEventListener("touchmove",v),O.addEventListener("touchend",J),O.addEventListener("mousedown",te),O.addEventListener("mousemove",v),O.addEventListener("mouseup",J),()=>{O.removeEventListener("touchstart",te),O.removeEventListener("touchmove",v),O.removeEventListener("touchend",J),O.removeEventListener("mousedown",te),O.removeEventListener("mousemove",v),O.removeEventListener("mouseup",J)}},[y,p,E]);const ve={height:p??"auto",overflow:"auto",WebkitOverflowScrolling:"touch",...f},ae=w||!!(i&&i instanceof Array&&i.length),pe=y&&p?{overflow:"auto"}:{},Ce=o?(0,t.jsx)("div",{ref:Y,style:{height:1}}):null;return(0,t.jsx)("div",{style:pe,className:"infinite-scroll-component__outerdiv",children:(0,t.jsxs)("div",{...z,role:Q,tabIndex:D,id:G,className:["infinite-scroll-component",F].filter(Boolean).join(" "),ref:_,style:ve,children:[y&&(0,t.jsx)("div",{style:{position:"relative"},ref:N,children:(0,t.jsx)("div",{style:{position:"absolute",left:0,right:0,top:-1*V},children:T?x:h})}),i,!W&&!ae&&o&&l,W&&o&&l,Ce,!o&&c]})})}function Ot(r,o){if(r==null)return{};var i=Pt(r,o),l,u;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(r);for(u=0;u<c.length;u++)l=c[u],!(o.indexOf(l)>=0)&&Object.prototype.propertyIsEnumerable.call(r,l)&&(i[l]=r[l])}return i}function Pt(r,o){if(r==null)return{};for(var i={},l=Object.keys(r),u,c=0;c<l.length;c++)u=l[c],!(o.indexOf(u)>=0)&&(i[u]=r[u]);return i}function Pe(){return Pe=Object.assign||function(r){for(var o=1;o<arguments.length;o++){var i=arguments[o];for(var l in i)Object.prototype.hasOwnProperty.call(i,l)&&(r[l]=i[l])}return r},Pe.apply(this,arguments)}function nt(r,o){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(r);o&&(l=l.filter(function(u){return Object.getOwnPropertyDescriptor(r,u).enumerable})),i.push.apply(i,l)}return i}function Ee(r){for(var o=1;o<arguments.length;o++){var i=arguments[o]!=null?arguments[o]:{};o%2?nt(Object(i),!0).forEach(function(l){Ut(r,l,i[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):nt(Object(i)).forEach(function(l){Object.defineProperty(r,l,Object.getOwnPropertyDescriptor(i,l))})}return r}function Ut(r,o,i){return o in r?Object.defineProperty(r,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[o]=i,r}var Dt={breakpointCols:void 0,className:void 0,columnClassName:void 0,children:void 0,columnAttrs:void 0,column:void 0},Te=2,Ne=class extends e.default.Component{constructor(r){super(r),this.reCalculateColumnCount=this.reCalculateColumnCount.bind(this),this.reCalculateColumnCountDebounce=this.reCalculateColumnCountDebounce.bind(this);let o;this.props.breakpointCols&&this.props.breakpointCols.default?o=this.props.breakpointCols.default:o=parseInt(this.props.breakpointCols)||Te,this.state={columnCount:o}}componentDidMount(){this.reCalculateColumnCount(),window&&window.addEventListener("resize",this.reCalculateColumnCountDebounce)}componentDidUpdate(){this.reCalculateColumnCount()}componentWillUnmount(){window&&window.removeEventListener("resize",this.reCalculateColumnCountDebounce)}reCalculateColumnCountDebounce(){if(!window||!window.requestAnimationFrame){this.reCalculateColumnCount();return}window.cancelAnimationFrame&&window.cancelAnimationFrame(this._lastRecalculateAnimationFrame),this._lastRecalculateAnimationFrame=window.requestAnimationFrame(()=>{this.reCalculateColumnCount()})}reCalculateColumnCount(){const r=window&&window.innerWidth||1/0;let o=this.props.breakpointCols;typeof o!="object"&&(o={default:parseInt(o)||Te});let i=1/0,l=o.default||Te;for(let u in o){const c=parseInt(u);c>0&&r<=c&&c<i&&(i=c,l=o[u])}l=Math.max(1,parseInt(l)||1),this.state.columnCount!==l&&this.setState({columnCount:l})}itemsInColumns(){const r=this.state.columnCount,o=new Array(r),i=e.default.Children.toArray(this.props.children);for(let l=0;l<i.length;l++){const u=l%r;o[u]||(o[u]=[]),o[u].push(i[l])}return o}renderColumns(){const{column:r,columnAttrs:o={},columnClassName:i}=this.props,l=this.itemsInColumns(),u=`${100/l.length}%`;let c=i;c&&typeof c!="string"&&(this.logDeprecated('The property "columnClassName" requires a string'),typeof c>"u"&&(c="my-masonry-grid_column"));const f=Ee(Ee(Ee({},r),o),{},{style:Ee(Ee({},o.style),{},{width:u}),className:c});return l.map((p,g)=>e.default.createElement("div",Pe({},f,{key:g}),p))}logDeprecated(r){}render(){const r=this.props,{children:o,breakpointCols:i,columnClassName:l,columnAttrs:u,column:c,className:f}=r,p=Ot(r,["children","breakpointCols","columnClassName","columnAttrs","column","className"]);let g=f;return typeof f!="string"&&(this.logDeprecated('The property "className" requires a string'),typeof f>"u"&&(g="my-masonry-grid")),e.default.createElement("div",Pe({},p,{className:g}),this.renderColumns())}};Ne.defaultProps=Dt;function Be(r,o){return r?r.exhausted?{...r,src:null}:{...r,src:r.src||o||null}:null}function st({items:r,getItemId:o,getRequestUrl:i,createController:l}){const[u,c]=(0,e.useState)({}),f=(0,e.useRef)(new Map),p=(0,e.useCallback)(g=>{const w=o(g),I=i(g),y=`${w}:${I}`;if(f.current.has(y))return{itemId:w,requestUrl:I,cacheKey:y,controller:f.current.get(y)};const h=l(I);return f.current.set(y,h),{itemId:w,requestUrl:I,cacheKey:y,controller:h}},[l,o,i]);return(0,e.useEffect)(()=>{const g=new Set,w={},I=r.map(y=>{const{itemId:h,cacheKey:x,controller:k}=p(y);g.add(x),w[h]=k.src;const L=Be(k.handleChangeSrc?.(),k.src);return L?.changed&&L.src&&(w[h]=L.src),k.subscribeToSrcChange?.(b=>{const S=Be(b,k.src);!S?.changed||!S.src||c(R=>R[h]===S.src?R:{...R,[h]:S.src})})}).filter(Boolean);return f.current.forEach((y,h)=>{g.has(h)||f.current.delete(h)}),c(w),()=>{I.forEach(y=>y?.())}},[p,r]),{getDisplaySrc:(0,e.useCallback)(g=>{const{itemId:w,requestUrl:I,controller:y}=p(g);return u[w]||y.src||I},[u,p]),handleLoad:(0,e.useCallback)(g=>{p(g).controller.handleSuccess()},[p]),handleError:(0,e.useCallback)(g=>{const{itemId:w,controller:I}=p(g),y=Be(I.handleError(),I.src);y?.changed&&y.src&&c(h=>({...h,[w]:y.src}))},[p])}}var rt="blocks",Mt=({setCurrentImageLink:r,setModalHeight:o,setModalWidth:i,setImageStockList:l,imageStockList:u,currentReq:c,setCurrentReq:f,inputRef:p,setStockLink:g,customRequest:w})=>{const I=s.useAppConfig(),y=s.useIsStandalone(),[h,x]=(0,e.useState)(!1),[k,L]=(0,e.useState)(2),{__:b}=s.useI18n(),S=s.useNotification(),[R]=s.useLazyGetUnsplashImageQuery(),[F]=s.useLazyGetSearchImageQuery(),Q=(0,e.useCallback)(n=>n instanceof Error||typeof n?.message=="string"&&n.message?n.message:typeof n?.error?.message=="string"&&n.error.message?n.error.message:b("Failed to load stock images through the configured proxy chain."),[b]),D=(0,e.useCallback)(n=>{S.error({id:"STOCK_IMAGES_SEARCH_FAILED",title:b("Failed to load stock images"),description:Q(n)})},[b,Q,S]),G=async()=>{h||(x(!0),F({query:c,page:k}).then(n=>{if(n?.error){D(n.error),x(!1);return}const A=n?.data?.results||[];l(j=>[...j,...A]),x(!1),L(j=>j+1)}).catch(()=>{x(!1)}))};(0,e.useEffect)(()=>{c.keywords!==""&&z()},[c.color,c.orientation]);const z=async()=>{const n=await F({query:c,page:1});if(n?.error){D(n.error),l([]);return}const A=n?.data?.results||[];A.length>0?(l(A),setTimeout(()=>{i(1060),o("84vh")},0)):l([])},[W,H]=(0,e.useState)(null),T=(0,e.useCallback)((n,A,j)=>`${n}${n.includes("?")?"&":"?"}w=${A}&q=${j}`,[]),q=(0,e.useCallback)(n=>be.getProxiedUrl(n,{config:I,standalone:y,resourceType:"stockImages",intent:"display"}),[I,y]),V=(0,e.useCallback)(n=>n.id,[]),re=(0,e.useCallback)(n=>T(n.urls.raw,644,96),[T]),{getDisplaySrc:_,handleLoad:Y,handleError:N}=st({items:u,getItemId:V,getRequestUrl:re,createController:q}),B=n=>A=>{Y(n),A.target.parentNode.classList.add("loaded")},ee=n=>()=>{N(n)},P=(n,A,j)=>{R(A.download_location),H(j),setTimeout(()=>H(null),2e3),g(`${n.raw}&w=1200&q=96`),r(`${n.raw}&w=1200&q=96`),w(`${n.raw}&w=1200&q=96`)};return(0,t.jsxs)("div",{className:"stock-tab",children:[(0,t.jsxs)(m.ui_kit$Form,{onValuesChange:z,className:u.length>0?"serach-results":"",children:[(0,t.jsxs)(m.ui_kit$Row,{gutter:24,children:[(0,t.jsx)(m.ui_kit$Col,{span:u.length>0?"":24,children:(0,t.jsx)(m.ui_kit$Form.Item,{className:"stock-search-input",children:(0,t.jsx)(m.ui_kit$SearchInput,{onSearch:z,allowClear:!0,size:u.length>0?"medium":"large",placeholder:b("Search image"),value:c.keywords,onChange:n=>f(A=>({...A,keywords:n.target.value})),ref:p,spellCheck:"false",enterButton:!1})})}),u.length>0&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.ui_kit$Col,{children:(0,t.jsxs)(m.ui_kit$Radio.Group,{defaultValue:"",onChange:n=>f(A=>({...A,orientation:n.target.value})),children:[(0,t.jsx)(m.ui_kit$Tooltip,{title:b("All"),placement:"top",children:(0,t.jsx)(m.ui_kit$Radio.Button,{value:"",children:(0,t.jsx)(s.EmIcons,{icon:"MixedView",component:m.icons$MixedView})})}),(0,t.jsx)(m.ui_kit$Tooltip,{title:b("Landscape"),placement:"top",children:(0,t.jsx)(m.ui_kit$Radio.Button,{value:"landscape",children:(0,t.jsx)(s.EmIcons,{icon:"LandscapeView",component:m.icons$LandscapeView})})}),(0,t.jsx)(m.ui_kit$Tooltip,{title:b("Portrait"),placement:"top",children:(0,t.jsx)(m.ui_kit$Radio.Button,{value:"portrait",children:(0,t.jsx)(s.EmIcons,{icon:"PortraitView",component:m.icons$PortraitView})})}),(0,t.jsx)(m.ui_kit$Tooltip,{title:b("Squarish"),placement:"top",children:(0,t.jsx)(m.ui_kit$Radio.Button,{value:"squarish",children:(0,t.jsx)(s.EmIcons,{icon:"SquareView",component:m.icons$SquareView})})})]})}),(0,t.jsx)(m.ui_kit$Col,{children:(0,t.jsx)(m.ui_kit$RadioColorFilter,{defaultValue:"",onChange:n=>f(A=>({...A,color:n.target.value})),options:[{value:"",colorClass:"all-colors",label:b("All")},{value:"black",colorClass:"black-color",label:b("Black")},{value:"black_and_white",colorClass:"bw-color",label:b("Black and White")},{value:"white",colorClass:"white-color",label:b("White")},{value:"orange",colorClass:"orange-color",label:b("Orange")},{value:"red",colorClass:"red-color",label:b("Red")},{value:"purple",colorClass:"purple-color",label:b("Purple")},{value:"magenta",colorClass:"magenta-color",label:b("Magenta")},{value:"green",colorClass:"green-color",label:b("Green")},{value:"teal",colorClass:"teal-color",label:b("Teal")},{value:"blue",colorClass:"blue-color",label:b("Blue")}],tooltipPlacement:"top"})})]})]}),u.length>0&&(0,t.jsx)("div",{className:"blocks-search__divider-wrapper",children:(0,t.jsx)("div",{className:"ant-divider ant-divider-horizontal",role:"separator"})})]}),(0,t.jsx)("div",{className:"serach-output-wrapper",style:{marginRight:-10},children:u.length>0&&(0,t.jsx)("div",{id:"scrollableDiv",style:{width:"100%",height:"calc(84vh - 148px)",overflow:"auto",paddingTop:24,paddingRight:14,paddingLeft:24,marginLeft:-24,lineHeight:"0",boxSizing:"unset"},children:(0,t.jsx)(tt,{dataLength:u&&u.length,next:G,hasMore:u,endMessage:(0,t.jsxs)(m.ui_kit$Divider,{plain:!0,children:[b("That`s all we could find.")," 🤐"]}),scrollableTarget:"scrollableDiv",style:{overflow:"visible"},loader:null,children:(0,t.jsx)(Ne,{breakpointCols:{default:3},className:"my-masonry-grid",columnClassName:"my-masonry-grid_column",children:u.map(n=>(0,t.jsxs)("div",{className:"list-item",onClick:()=>P(n.urls,n.links,n.id),children:[(0,t.jsx)("img",{className:W===n.id?"loaded-image":"",width:"322px",src:_(n),alt:n.description,onLoad:B(n),onError:ee(n)}),(0,t.jsxs)("p",{className:"creator-info",onClick:A=>A.stopPropagation(),children:["Photo by"," ",(0,t.jsx)("a",{target:"_blank",href:`${n.user.links.html}?utm_source=${rt}&utm_medium=referral`,rel:"noreferrer",children:n.user.name})," ","on"," ",(0,t.jsx)("a",{target:"_blank",href:`https://unsplash.com/?utm_source=${rt}&utm_medium=referral`,rel:"noreferrer",children:"Unsplash"})]}),W===n.id&&(0,t.jsx)(m.ui_kit$Spin,{className:"ant-spin",size:"small"})]},n.id))})})})})]})};function at(r){return/^(https?:)?\/\//i.test(r.trim())}function Gt(r){const o=r.trim();return at(o)||/^data:/i.test(o)?o:`data:image/jpeg;base64, ${r}`}var Tt=({images:r,transitionDuration:o=1e3})=>{const[i,l]=(0,e.useState)([]);return(0,e.useEffect)(()=>{if(r.length>0){const u=r[r.length-1];l(c=>[...c,{src:u,opacity:0}]),setTimeout(()=>{l(c=>c.map((f,p)=>p===c.length-1?{...f,opacity:1}:f))},1e3)}},[r]),(0,t.jsx)("div",{className:"slideshow-container",children:i.map((u,c)=>(0,t.jsx)("img",{src:Gt(u.src),alt:`Slide ${c+1}`,className:"slideshow-image",style:{opacity:u.opacity,transition:`opacity ${o}ms linear`}},c))})};function Nt({setModalHeight:r,customRequest:o,aiTabRef:i,isImageUploaded:l,setIsImageUploaded:u,aiImageRequest:c,imageAiList:f,setImageAiList:p,isLoadingAi:g,setIsLoadingAi:w,onPluginAiImageLimitExceeded:I,onImageGenerateLimitExceeded:y}){const{__:h}=s.useI18n(),x=s.useAppConfig(),k=s.useNotification(),L=s.usePushToDataLayer(),{blockId:b}=s.useRouteParams(),S=s.useEditorProjectId(),R=s.useRouteEmailId(),[F]=s.useLazySendAiImageRequestQuery(),[Q,{data:D=[]}]=s.useLazyGetAiImageSSEQuery(),G=s.useProjectPlanLimitPreflight(),z=x?.sendAIImageRequest||F,W=x?.trigger||Q,H=x?.handleLimitUsageEmitter||s.useEventEmitter(be.events.ON_LIMIT_ID),[T,q]=(0,e.useState)(0),[V,re]=(0,e.useState)(null),[_,Y]=(0,e.useState)(!1),[N,B]=(0,e.useState)(h("Evaluating the task")),[ee,P]=(0,e.useState)(!1),n=R||b,{limits:A}=x?.limits?x:{limits:{ai_img_limit:0}},{ai_img_limit:j}=A,$=!!(x.limits&&x.counters)&&!0,le=s.useEventEmitter(be.events.AI_IMAGE_REQUEST_ID).hasListeners(),E=ne.shouldCountAiUsage({limitsInPlugin:$,hostedAiActive:le}),ve=!le&&j>0&&T>=j,ae=(0,e.useCallback)(()=>{H.fire({name:"AiImgCount",count:T+1})},[H,T]),pe=(0,e.useMemo)(()=>!ve&&(!E||j===0||T<j),[ve,E,T,j]),Ce=(0,e.useCallback)(async()=>{B(h("Evaluating the task")),c!==""&&!g&&(w(!0),P(!0),p([]),L({event:"submit_form",action:"ai_image_generation",entity_id:R,project_id:S}),z({body:{project_id:S,request:"create-image",connection:"midjourney",message:c}}).then(({data:v,error:J})=>{if(J)throw J;if(v.data.status===401)throw new Error(s.ERROR);if(v?.data?._eventResult){p(v.data.task.images),w(!1),P(!1),B(h("Evaluating the task"));return}v?.data.status===200?(v?.data.task.id&&(B(v.data.task.message),re(v.data.task.id)),v.message&&k.success({id:"AI_IMAGE_SEND_SUCCESS",title:v.message,placement:"bottomRight",data:c}),W({task_id:v?.data.task.id,entity_id:n})):(w(!1),P(!1),k.error({id:"AI_IMAGE_SEND_ERROR",title:v?.message||h("Something went wrong, please try again"),placement:"bottomRight",data:c,innerException:v}))}).catch(v=>{w(!1),P(!1),(v?.error||v?.data)&&k.fromError("AI_IMAGE_SEND_ERROR",c,v.error||v)}))},[c,g,w,P,p,L,R,S,z,k,W,n,h]),U=(0,e.useCallback)(async()=>{pe?(E&&(q(v=>v+1),ae()),Ce()):$&&(I?I():k.error({title:h("The usage limit has been exceeded"),description:h(`The maximum number of requests for the current subscription period has been reached.
|
|
7
|
+
Select the appropriate plan to fulfil more requests`),placement:"bottomRight"}))},[pe,$,le,E,G,y,q,ae,Ce,k,h,I]);(0,e.useEffect)(()=>{$&&q(x?.counters?.ai_img_counter||0)},[x,$]);const Z=s.useEventEmitter(be.events.AI_IMAGE_PROGRESS_ID);(0,e.useEffect)(()=>{const v=Z.event(({progress:J,status:K})=>{B(K||`${Math.round(J)}%`)});return()=>v.dispose()},[Z]);const O=(0,e.useCallback)(async v=>{if(!l){u(!0);try{const J=at(v)?await(await fetch(v)).blob():It.base64ToBlob(v);o({file:new File([J],"image.jpeg",{type:J.type||"image/jpeg"})})}catch{u(!1)}}},[l,u,o]),te=(0,e.useCallback)(v=>{v.status!=="error"&&v.status!=="Canceled"?v.images?(B(v.status),v.progress===100&&(p(v.images),B(h("Evaluating the task")),re(null),P(!1))):(p([v.data]),w(!1)):(w(!1),P(!1),k.error({id:"AI_IMAGE_GET_ERROR",title:h("Something went wrong, please try again"),placement:"bottomRight",data:V}))},[p,B,h,w,r,V,k,P]);return(0,e.useEffect)(()=>{D.length>1&&te(D[D.length-1])},[D,te]),(0,e.useEffect)(()=>{(g||f.length>0)&&setTimeout(()=>{let v=550;i.current&&(v=i.current.offsetHeight+68),r(v)},0)},[i,D,f.length,g,r]),{aiImageCounter:T,setAiImageCounter:q,currentAiImgLimits:j,isFieldsDisabled:ve,canGenerateImage:pe,aiImageRequest:c,imageAiList:f,setImageAiList:p,isLoadingAi:g,setIsLoadingAi:w,loadingDuringGeneration:ee,setLoadingDuringGeneration:P,requestStatus:N,setRequestStatus:B,handleGenerate:U,handleLimitAiImgCount:ae,convertBase64ToFile:O,isShiftPressed:_,setIsShiftPressed:Y,currentReqId:V,setCurrentReqId:re,limitsInPlugin:$}}var Bt=({setModalHeight:r,customRequest:o,aiTabRef:i,inputAiRef:l,isImageUploaded:u,setIsImageUploaded:c,aiImageRequest:f,setAiImageRequest:p,imageAiList:g,setImageAiList:w,isLoadingAi:I,setIsLoadingAi:y})=>{const h=s.useAppNavigate();s.useDispatch();const x=s.useOpenPlanCatalog(),{__:k,_n:L}=s.useI18n(),b=s.useAppConfig(),[S,R]=(0,e.useState)(!1),[F,Q]=(0,e.useState)(null),{aiImageCounter:D,currentAiImgLimits:G,loadingDuringGeneration:z,requestStatus:W,handleGenerate:H,convertBase64ToFile:T,isShiftPressed:q,setIsShiftPressed:V,limitsInPlugin:re}=Nt({setModalHeight:r,customRequest:o,aiTabRef:i,isImageUploaded:u,setIsImageUploaded:c,aiImageRequest:f,imageAiList:g,setImageAiList:w,isLoadingAi:I,setIsLoadingAi:y,onPluginAiImageLimitExceeded:()=>R(!0),onImageGenerateLimitExceeded:Q}),_=S&&G>0?s.getAiTariffUpgradeStep(G):null,Y=_?s.getLimitUpgradePresetDefinition(_.presetId):null,N=F?s.getLimitUpgradePresetDefinition(F.presetId):null,[B,ee]=(0,e.useState)(!1),P=(0,e.useCallback)(()=>ee(!0),[]),n=(0,e.useCallback)(()=>ee(!1),[]),A=(0,e.useCallback)(E=>p(E.target.value),[p]),j=(0,e.useCallback)(E=>{E.key==="Shift"?V(!0):E.key==="Enter"&&!q&&(E.preventDefault(),H())},[q,H,V]),$=(0,e.useCallback)(E=>{E.key==="Shift"&&V(!1)},[V]),le=g[g.length-1];return(0,t.jsxs)("div",{className:"image-ai",children:[Y&&_?(0,t.jsx)(ne.LimitUpgradeModal$1,{open:!0,onClose:()=>R(!1),title:k(Y.titleKey),subtitle:k(Y.subtitleKey),usageResource:Y.usageResource,previousDisplay:s.presetLimitDisplay(_.previousLimit),nextDisplay:s.presetLimitDisplay(_.nextLimit),onChangePlan:()=>{R(!1),x()}}):null,N&&F?(0,t.jsx)(ne.LimitUpgradeModal$1,{open:!0,onClose:()=>Q(null),title:k(N.titleKey),subtitle:k(N.subtitleKey),usageResource:N.usageResource,previousDisplay:s.presetLimitDisplay(F.previousLimit),nextDisplay:s.presetLimitDisplay(F.nextLimit),onChangePlan:()=>{Q(null),x()}}):null,re&&(0,t.jsx)(m.ui_kit$LimitsCounter,{text:`${D} ${k("of")} ${G>0?G:"∞"} images ${L("was used","were used",D)}`,exceeded:G>0&&D>=G,style:{marginTop:-25},extra:(0,t.jsx)("span",{style:{textDecoration:"underline",cursor:"pointer"},onClick:()=>h(b.billingPageUrl||s.APP_ROUTES.billing),children:k("Need more?")})}),(0,t.jsx)(m.ui_kit$Row,{gutter:24,className:"image-ai__row",children:(0,t.jsx)(m.ui_kit$Col,{span:24,children:(0,t.jsx)(m.ui_kit$Form.Item,{style:{margin:0},children:(0,t.jsxs)("span",{className:`ant-input-affix-wrapper ant-input-affix-wrapper-lg image-ai__input-affix-wrapper${B?" ant-input-affix-wrapper-focused":""}`,children:[(0,t.jsx)(m.ui_kit$TextArea,{ref:l,onKeyDown:j,onKeyUp:$,onFocus:P,onBlur:n,autoSize:!0,allowClear:!0,className:"text-area-input-hybrid image-ai__textarea",placeholder:k("Generate image"),value:f,onChange:A,spellCheck:"false"}),(0,t.jsx)("span",{className:"ant-input-suffix image-ai__input-suffix",children:I||z?(0,t.jsx)(s.EmIcons,{icon:"LoadingOutlined",component:m.icons$LoadingOutlined,className:"input-icon image-ai__input-icon",spin:!0}):(0,t.jsx)(s.EmIcons,{icon:"AI",component:m.icons$AI,className:"input-icon image-ai__input-icon",onClick:H})})]})})})}),(I||g.length>0)&&(0,t.jsxs)("div",{className:"image-ai__preview",children:[I&&g.length===0&&(0,t.jsx)("div",{className:"image-ai__loading",children:(0,t.jsxs)("div",{className:"spin",children:[(0,t.jsx)(s.EmIcons,{icon:"LoadingOutlined",component:m.icons$LoadingOutlined,style:{fontSize:48},spin:!0}),(0,t.jsx)("p",{className:"status",children:W})]})}),g.length>0&&(0,t.jsxs)("div",{className:"image-ai__image-item",children:[(0,t.jsx)(Tt,{images:g}),(0,t.jsx)("div",{className:"buttons",children:(0,t.jsx)(m.ui_kit$Button,{onClick:()=>T(le),icon:(0,t.jsx)(s.EmIcons,{icon:"CheckOutlined",component:m.icons$CheckOutlined}),children:k("Use this one")})})]})]})]})},mn="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAkCAYAAAB/up84AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABSBJREFUeNrsWjFv2zoQVoMW8BZ18xaN3qLRW9QtW9OtW92to98vaPoP3K1b1S1b3c2jvWlUNm3lw1s8Mpu3PAo4Iocr70jKlp0COuCQlpKPx/t43x1pv3h8fEwGeT5yNoTgeclLZvza6NgxXoNaGRktjE6MpjC2NVqh92bwt4HxBI1ro0s0dgN2tvD5a8a/9vkq0M+xYKdG81A7Gp6pyBjZddrnO6N36Hkbqyn8u4L3vYC0hjLHeAbPVhC4TwAK/ewNvLsEhyxgFXLK2l/D4tvnOVrUiPEh1k/JjvLYyWENdeTcKazBBr6AdY4AqBTmbkIzhO4gvMumYLxAYKzgPTvhBBajYNwCksHYhOyYiow1KONaKYlfO8bPEWyGEfi5Iu+Vjizg7EzB3xvwWTMxWkHG4mDnMF6BnSnYncLzHWGG4BqiwZkKQMC7I0cOVTCJhvRUKNgNCmCOxhNmrBEWzwGi0Y6rIihbsnOH/JgE2hshKrLZv4Px9yhj1twafRlid/UIGWvlFdlVLirIkIM12nETGLeO2tTPECBUZuT/a7JBMpSxUybYLjulUCN2iEpHQoyuGWZJUCa8R/VGSZvGB0iOdjAO9n8EtC2zUxICSIoW0ICTmA53DCDKQzWZg89XAXZ2B2iMavBnjDKpBX6B1tnAM5aqQgGhnU2D6GmHuqw7AkaOPmP/bsHpFC1kTLqVhglS6fFNgX1MCXUHO1zR1h5AFOoSc1jjmKx/An/1PoBQasBSoZZ3hpyaOrg0IW2sRkG8JsU8CaCaLckAhfi6AG0cmeuzkyMQMtL+SiySkY3oA/EgGeICK0UOZYQKVsQpDAjm2BpsaAGQLMKnMdok3yLtpKS70yT7OUBcm7UTHb5grk5y1Csrj40MqUbUpgW7NXo+RunckODkQvdXM37iwm7b1VA7lAaVB4jUUZOUIzNxfOougAwy3GUN0qWG2IJJ09V2NcvIFE8c54nQelEHFM6C6chUhI+WZjjffDQkrenPhqmlrAC9Naof/aLhXZeNNfMZOk+MtPOVRjNmTpfcCut0+biGZ3PBj1ywWTOfqV3v+yjLFuDPRs8Ddu05vLtmsuHQ0s73wehvR0t7aGkPevfCM5fcGr0MbOW9NSSFwF52cP5KcLIv+X4EUGbCemcOqpoz73/haE4CZNkRjAR20vwENXHRc2bWEMyQuUuGVe4hc6K6rBmg7pKN0XdGX7dts9E3Rr8afUATFl1PqgLAG6T3AoX1nSVtMP9l5r5FVyiu+D14/YssRHOheGVQYNMeinrhsMcV2WVPRR1rIRT4QmiA5r4G6oxp0y6ZzFh4LvhmB84MHz1xta9vWQMrcFR/3iF+7DmEu2YoyTshRbuMvGE9hnwGPQR1tdR04aCueKrqAIgiu/AqcCf1JXPhfuoYosGHn4Hgqa6AnCK4IfSkCa1eCJRxLGnn+mX0rfDOJok4AsQAUpwQlND2++HIgNiOVO1LVRIgtXDPs0bpunEU08vktHLMpoJS1/d9qEo6h6gAzq7RRaPV+QmBeICzUUh2fIHzk0s3HedXwkEy2ReQmjn4XDzDjqkN4D/J04/y/np5KbSrrtbwAyx+kTxdf9tfpvSZIW9O3FScHJAF8PEFc5F2lQzSi5wJheoG3U/t0xYOcgBAcOHuAkr7mY9ditoAiCz2q8uvEcD8gJpSDuGNl5hfnaTJ0/fpheMUr4CitHCO6fqdesj359xh1tWiqggfdUCmcz9ZivZ7+BnQM5P/BRgABx8sJWqTxoYAAAAASUVORK5CYII=",Ft=({setNewLink:r,setCurrentImageLink:o,setModalHeight:i,setModalWidth:l,setImageGifList:u,imageGifList:c,currentReqGif:f,setCurrentReqGif:p,inputRef:g,setStockLink:w,customRequest:I})=>{const{__:y}=s.useI18n(),h=s.useAppConfig(),x=s.useIsStandalone(),k=s.useNotification(),[L,b]=(0,e.useState)(null),[S,R]=(0,e.useState)(!1),[F,Q]=(0,e.useState)(25),[D]=s.useLazyGetSearchGifQuery(),G=(0,e.useCallback)(n=>n instanceof Error||typeof n?.message=="string"&&n.message?n.message:typeof n?.error?.message=="string"&&n.error.message?n.error.message:y("Failed to load GIFs through the configured proxy chain."),[y]),z=(0,e.useCallback)(n=>{k.error({id:"STOCK_GIFS_SEARCH_FAILED",title:y("Failed to load GIFs"),description:G(n)})},[y,G,k]),W=async()=>{S||(R(!0),D({query:f,page:F}).then(n=>{if(n?.error){z(n.error),R(!1);return}u(A=>[...A,...n.data.data]),R(!1),Q(A=>A+25)}).catch(()=>{R(!1)}))},H=async()=>{const n=await D({query:f,page:0});if(n?.error){z(n.error),u([]);return}n?.data?.data?.length>0&&(u(n.data.data),setTimeout(()=>{i("84vh"),l(1060)},0))},T=(n,A)=>{b(A),setTimeout(()=>{b(null)},2e3),w(`${n}`),o(`${n}`),I(`${n}`)},q={default:3},V=(0,e.useCallback)(n=>be.getProxiedUrl(n,{config:h,standalone:x,resourceType:"generic",intent:"display"}),[h,x]),re=(0,e.useCallback)(n=>n.id,[]),_=(0,e.useCallback)(n=>n.images.downsized.url,[]),{getDisplaySrc:Y,handleLoad:N,handleError:B}=st({items:c,getItemId:re,getRequestUrl:_,createController:V}),ee=n=>A=>{N(n),A.target.parentNode.classList.add("loaded")},P=n=>()=>{B(n)};return(0,t.jsxs)("div",{className:"stock-tab",children:[(0,t.jsxs)(m.ui_kit$Form,{onValuesChange:H,className:c.length>0?"serach-results":"",children:[(0,t.jsx)(m.ui_kit$Row,{gutter:24,children:(0,t.jsx)(m.ui_kit$Col,{span:c.length>0?"":24,children:(0,t.jsx)(m.ui_kit$Form.Item,{className:"stock-search-input",children:(0,t.jsx)(m.ui_kit$SearchInput,{onSearch:H,allowClear:!0,size:c.length>0?"medium":"large",placeholder:y("Search GIFs"),value:f.keywords,onChange:n=>p(A=>({...A,keywords:n.target.value})),ref:g,spellCheck:"false",enterButton:!1})})})}),c.length>0&&(0,t.jsx)("div",{className:"blocks-search__divider-wrapper",children:(0,t.jsx)("div",{className:"ant-divider ant-divider-horizontal",role:"separator"})})]}),(0,t.jsx)("div",{className:"serach-output-wrapper",style:{marginRight:-10},children:c.length>0&&(0,t.jsx)("div",{id:"scrollableDiv",style:{width:"100%",height:"calc(84vh - 148px)",overflow:"auto",paddingTop:24,paddingRight:14,paddingLeft:24,marginLeft:-24,lineHeight:"0",boxSizing:"unset"},children:(0,t.jsx)(tt,{dataLength:c&&c.length,next:W,hasMore:c,endMessage:(0,t.jsxs)(m.ui_kit$Divider,{plain:!0,children:[y("That`s all we could find.")," 🤐"]}),scrollableTarget:"scrollableDiv",style:{overflow:"visible"},loader:(0,t.jsx)(m.ui_kit$Spin,{size:"small"}),children:(0,t.jsx)(Ne,{breakpointCols:q,className:"my-masonry-grid",columnClassName:"my-masonry-grid_column",children:c.map((n,A)=>(0,t.jsxs)("div",{className:"list-item",onClick:()=>T(n.images.downsized.url,n.id),children:[(0,t.jsx)("img",{className:L===n.id?"loaded-image":"",width:"322px",src:Y(n),alt:n.title,onLoad:ee(n),onError:P(n)}),(0,t.jsx)("a",{rel:"noreferrer",href:"https://giphy.com/",target:"_blank",onClick:j=>j.stopPropagation(),children:(0,t.jsx)("div",{className:"overlay-image",style:{backgroundImage:"url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAkCAYAAAB/up84AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABSBJREFUeNrsWjFv2zoQVoMW8BZ18xaN3qLRW9QtW9OtW92to98vaPoP3K1b1S1b3c2jvWlUNm3lw1s8Mpu3PAo4Iocr70jKlp0COuCQlpKPx/t43x1pv3h8fEwGeT5yNoTgeclLZvza6NgxXoNaGRktjE6MpjC2NVqh92bwt4HxBI1ro0s0dgN2tvD5a8a/9vkq0M+xYKdG81A7Gp6pyBjZddrnO6N36Hkbqyn8u4L3vYC0hjLHeAbPVhC4TwAK/ewNvLsEhyxgFXLK2l/D4tvnOVrUiPEh1k/JjvLYyWENdeTcKazBBr6AdY4AqBTmbkIzhO4gvMumYLxAYKzgPTvhBBajYNwCksHYhOyYiow1KONaKYlfO8bPEWyGEfi5Iu+Vjizg7EzB3xvwWTMxWkHG4mDnMF6BnSnYncLzHWGG4BqiwZkKQMC7I0cOVTCJhvRUKNgNCmCOxhNmrBEWzwGi0Y6rIihbsnOH/JgE2hshKrLZv4Px9yhj1twafRlid/UIGWvlFdlVLirIkIM12nETGLeO2tTPECBUZuT/a7JBMpSxUybYLjulUCN2iEpHQoyuGWZJUCa8R/VGSZvGB0iOdjAO9n8EtC2zUxICSIoW0ICTmA53DCDKQzWZg89XAXZ2B2iMavBnjDKpBX6B1tnAM5aqQgGhnU2D6GmHuqw7AkaOPmP/bsHpFC1kTLqVhglS6fFNgX1MCXUHO1zR1h5AFOoSc1jjmKx/An/1PoBQasBSoZZ3hpyaOrg0IW2sRkG8JsU8CaCaLckAhfi6AG0cmeuzkyMQMtL+SiySkY3oA/EgGeICK0UOZYQKVsQpDAjm2BpsaAGQLMKnMdok3yLtpKS70yT7OUBcm7UTHb5grk5y1Csrj40MqUbUpgW7NXo+RunckODkQvdXM37iwm7b1VA7lAaVB4jUUZOUIzNxfOougAwy3GUN0qWG2IJJ09V2NcvIFE8c54nQelEHFM6C6chUhI+WZjjffDQkrenPhqmlrAC9Naof/aLhXZeNNfMZOk+MtPOVRjNmTpfcCut0+biGZ3PBj1ywWTOfqV3v+yjLFuDPRs8Ddu05vLtmsuHQ0s73wehvR0t7aGkPevfCM5fcGr0MbOW9NSSFwF52cP5KcLIv+X4EUGbCemcOqpoz73/haE4CZNkRjAR20vwENXHRc2bWEMyQuUuGVe4hc6K6rBmg7pKN0XdGX7dts9E3Rr8afUATFl1PqgLAG6T3AoX1nSVtMP9l5r5FVyiu+D14/YssRHOheGVQYNMeinrhsMcV2WVPRR1rIRT4QmiA5r4G6oxp0y6ZzFh4LvhmB84MHz1xta9vWQMrcFR/3iF+7DmEu2YoyTshRbuMvGE9hnwGPQR1tdR04aCueKrqAIgiu/AqcCf1JXPhfuoYosGHn4Hgqa6AnCK4IfSkCa1eCJRxLGnn+mX0rfDOJok4AsQAUpwQlND2++HIgNiOVO1LVRIgtXDPs0bpunEU08vktHLMpoJS1/d9qEo6h6gAzq7RRaPV+QmBeICzUUh2fIHzk0s3HedXwkEy2ReQmjn4XDzDjqkN4D/J04/y/np5KbSrrtbwAyx+kTxdf9tfpvSZIW9O3FScHJAF8PEFc5F2lQzSi5wJheoG3U/t0xYOcgBAcOHuAkr7mY9ditoAiCz2q8uvEcD8gJpSDuGNl5hfnaTJ0/fpheMUr4CitHCO6fqdesj359xh1tWiqggfdUCmcz9ZivZ7+BnQM5P/BRgABx8sJWqTxoYAAAAASUVORK5CYII=)"}})}),L===n.id&&(0,t.jsx)(m.ui_kit$Spin,{className:"ant-spin",size:"small"})]},n.id+A))})})})})]})},ot="IMG",it="BACKGROUND",zt="GALLERY",we="EDITOR",de="UPLOAD",Fe="STOCK",ze="GIF",$e="AI",$t={mode:"select"},Kt={mode:"save"},{Dragger:Wt}=m.ui_kit$Upload,Vt=(r,o="image")=>s.decodeFileNameFromUrl(r)??o,Se=ne.normalizeImageFormatForDisplay,Ht=(r,o)=>{const i=Se(o);return!i||r.includes(".")?r:`${r}.${i}`},Qt=(r,o)=>new File([r],Ht(Vt(o),r.type),{type:r.type||"application/octet-stream"}),lt=({dataProvider:r,usesBuiltInStorage:o})=>{const i=s.useAppConfig(),l=s.useIntegratorConfigValue("compressMaxSize"),u=s.useIsStandalone(),c=s.shouldInsertUploadLinkAsIs(i),{__:f}=s.useI18n(),p=s.useDispatch(),g=s.useEditorProjectId(),[w]=s.useLazyGetImageInfoQuery(),{modal:I}=m.ui_kit$App.useApp(),y=s.useNotification(),h=s.useSelector(s.selectActiveModal$1),{request:x,resolveImagePicker:k}=s.useImagePicker(),[L,b]=(0,e.useState)(""),[S,R]=(0,e.useState)(""),[F,Q]=(0,e.useState)(""),[D,G]=(0,e.useState)(""),[z,W]=(0,e.useState)(de),[H,T]=(0,e.useState)({width:"",height:"",size:"",format:""}),[q,V]=(0,e.useState)("success"),[re,_]=(0,e.useState)(!1),Y=e.default.useRef(null),N=e.default.useRef(null),B=e.default.useRef(null),ee=e.default.useRef(null),P=e.default.useRef(null),n=e.default.useRef(null),A=e.default.useRef(null),j=e.default.useRef(null),$=e.default.useRef(null),[le,E]=(0,e.useState)("auto"),[ve,ae]=(0,e.useState)(572),[pe,Ce]=(0,e.useState)(!1),[U,Z]=(0,e.useState)({keywords:"",color:"",orientation:""}),[O,te]=(0,e.useState)({keywords:""}),[v,J]=(0,e.useState)([]),[K,se]=(0,e.useState)([]),[ct,qt]=(0,e.useState)([]),[ut,dt]=(0,e.useState)(!1),[ft,Ke]=(0,e.useState)(""),[Yt,je]=(0,e.useState)(!1),[Zt,Ue]=(0,e.useState)(0),mt=s.useProjectData(),pt=mt?.id!==void 0?String(mt.id):g||"",ht=s.useEventEmitter(be.events.UPLOAD_EVENT_ID),fe=ne.useImageBlobResolver(),Re=e.default.useRef(""),ye=e.default.useRef(0),ke=e.default.useRef(""),[Jt,gt]=(0,e.useState)(""),[Xt,vt]=(0,e.useState)(null),[en,We]=(0,e.useState)(""),De=(0,e.useCallback)(a=>{if(!(a instanceof Blob))return;ke.current&&URL.revokeObjectURL(ke.current);const d=URL.createObjectURL(a);ke.current=d,gt(d),vt(a)},[]),me=(0,e.useCallback)(()=>{ke.current&&(URL.revokeObjectURL(ke.current),ke.current=""),gt(""),vt(null)},[]),oe=(0,e.useCallback)(()=>{We("")},[]),Ve=s.usePlanFeatureGate("element_ai_image"),He=s.usePlanFeatureGate("stock_photo"),Qe=s.usePlanFeatureGate("stock_gif"),Ct=s.usePlanFeatureGate("image_editor"),Me=(0,e.useRef)(!1),qe=a=>{Me.current=!0,R(a)},tn=a=>{Me.current=!1,R(a.target.value)},Le=(0,e.useCallback)((a,d,C=f("The image could not be uploaded."))=>{const M=d instanceof Error?d.message:C;y.error({id:"IMAGE_UPLOAD_ERROR",data:a,title:f("Upload failed"),description:M})},[f,y]),nn=(0,e.useCallback)(a=>s.fireUploadImageEvent(ht,{file:a,project:pt}),[pt,ht]),Ae=ne.useImageBlobFetch(),sn=(0,e.useCallback)(a=>fe.resolve(ne.canonicalImageUrlKey(a),void 0,Ae),[Ae,fe]),Ye=async a=>{if(a)try{const d=await an(a);d&&Je(d)?await Ie({file:d}):d||Le({url:a},null,f("Failed to download image from URL."))}catch(d){Le({url:a},d,f("Failed to process image URL."))}},yt=(a,d)=>{const C=s.resolveUploadLinkAction(c,d,Me.current);C==="insertAsIs"?(Me.current=!1,Ge({url:a})):C==="upload"&&Ye(a)},Ze=e.default.useRef(yt);Ze.current=yt;const rn=(0,e.useCallback)(()=>{const a=S.trim();a.toLowerCase().startsWith("http")&&Ze.current(a,"enter")},[S]);e.default.useEffect(()=>{if(z!==de||!D)return;const a=S.trim();if(!a||!a.toLowerCase().startsWith("http"))return;const d=setTimeout(()=>{Ze.current(a,"timer")},1e3);return()=>{clearTimeout(d)}},[S,z,D]);const an=async a=>{try{const d=ne.canonicalImageUrlKey(a),C=await fe.resolve(d,void 0,Ae);return Qt(C,d)}catch{}};document.onpaste=function(a){const d=a.clipboardData?.items?.[0];if(z===de&&D){if(d?.type?.indexOf("image")===0&&i.imageCenterLocalUploadEnabled!==!1){const M=d.getAsFile();Je(M);const X={file:M};R(""),Ie(X);return}const C=a.clipboardData?.getData("text/plain");if(C&&C.trim().toLowerCase().startsWith("http")){a.preventDefault(),a.stopPropagation(),qe(C.trim());return}d?.type?.indexOf("text")===0&&d.getAsString(M=>{if(M.trim().toLowerCase().startsWith("http"))qe(M.trim());else if(M.toString().slice(1,5)==="meta"){const X=M.toString().split('"')[1];X&&qe(X)}})}},(0,e.useEffect)(()=>{const a=d=>{let C=null;x?.kind==="background"?(C=it,G(it)):x?.kind==="img"&&(G(ot),C=ot),x?.currentUrl&&C&&(b(x.currentUrl),W(d))};h===s.MODALS.UPLOAD_IMAGE_MODAL||h===s.MODALS.UPLOAD_BACKGROUND_MODAL?a(we):h===s.MODALS.UPLOAD_IMAGE_MODAL_AI||h===s.MODALS.UPLOAD_BACKGROUND_MODAL_AI?(Ve.isLocked?(je(!0),Ue(s.FEATURE_UPSELL_SLIDE.element_ai_image)):a($e),setTimeout(()=>$.current?.focus({cursor:"start"}),100)):h===s.MODALS.UPLOAD_IMAGE_MODAL_UPLOAD||h===s.MODALS.UPLOAD_BACKGROUND_MODAL_UPLOAD?(a(de),setTimeout(()=>n.current?.focus({cursor:"start"}),100)):h===s.MODALS.UPLOAD_IMAGE_MODAL_STOCK||h===s.MODALS.UPLOAD_BACKGROUND_MODAL_STOCK?(He.isLocked?(je(!0),Ue(s.FEATURE_UPSELL_SLIDE.stock_photo)):a(Fe),setTimeout(()=>j.current?.focus({cursor:"start"}),100)):h===s.MODALS.UPLOAD_IMAGE_MODAL_GIF||h===s.MODALS.UPLOAD_BACKGROUND_MODAL_GIF?(Qe.isLocked?(je(!0),Ue(s.FEATURE_UPSELL_SLIDE.stock_gif)):a(ze),setTimeout(()=>A.current?.focus({cursor:"start"}),100)):h===s.MODALS.UPLOAD_IMAGE_MODAL_EDIT||h===s.MODALS.UPLOAD_BACKGROUND_MODAL_EDIT?(Ct.isLocked?(je(!0),Ue(s.FEATURE_UPSELL_SLIDE.image_editor)):a(we),p(s.openSecondModal(s.MODALS.IMAGE_EDITOR_MODAL))):G("")},[h,p,Ve.isLocked,He.isLocked,Qe.isLocked,Ct.isLocked,x]);const Ge=(0,e.useCallback)(({url:a=L||"",meta:d=$t})=>{b(a),k({url:a,meta:d}),setTimeout(()=>{oe(),me(),Z({keywords:"",color:"",orientation:""}),te({keywords:""}),se([]),J([]),G(""),Ke(""),dt(!1),Q(""),R(""),W(de)},200),p(s.closeModal$1()),p(s.closeSecondModal())},[L,oe,p,k,me]),At=(0,e.useCallback)((a,d)=>(E("auto"),_(!1),Ge({url:a,meta:Kt}),y.success({id:"IMAGE_UPLOAD_SUCCESS",data:d,title:f("The image was successfully uploaded.")}),a),[f,Ge,y]);(0,e.useEffect)(()=>{const a=c?"":S,d=a||F,C=ne.canonicalImageUrlKey(d);if(!d||!C){V(""),Re.current&&fe.abandonKey(Re.current),Re.current="",oe(),me();return}const M=Re.current;M&&M!==C&&(fe.abandonKey(M),oe(),me()),Re.current=C;const X=new AbortController,ce=a?800:0,he=++ye.current,un=setTimeout(async()=>{try{const xe=async()=>{const ue=await fe.resolve(C,X.signal,Ae);if(he!==ye.current)return;const{width:ge,height:dn}=await ne.getImageDimensionsFromBlob(ue);he===ye.current&&(T({width:ge,height:dn,size:(ue.size/1024).toFixed(2),format:Se(ue.type)}),oe(),De(ue))};if(u)await xe();else{const ue=await ne.resolveDataProviderPreview(r,C);if(ue?.previewUrl&&he===ye.current){We(ue.previewUrl),me();try{const{data:ge}=await w(C);if(he!==ye.current)return;ge?T({width:ge?.width,height:ge?.height,size:ge?.fileSize!=null?(ge.fileSize/1024).toFixed(2):"",format:Se(ge?.format)}):await xe()}catch{await xe()}}else await xe()}if(he!==ye.current)return;V("success"),b(d),ae(572),setTimeout(()=>{let ue=0;N.current&&(ue=N.current.offsetHeight+62),E(ue)},0)}catch(xe){if(xe?.name==="AbortError"||X.signal.aborted||he!==ye.current)return;oe(),me(),V("error")}},ce);return()=>{clearTimeout(un),X.abort()}},[S,F,c,u,oe,Ae,w,fe,me,r,De]),(0,e.useEffect)(()=>{if(!L||S||F||!h)return;const a=ne.canonicalImageUrlKey(L),d=new AbortController;let C=!1;const M=async()=>{const X=await fe.resolve(a,d.signal,Ae);if(C)return;const{width:ce,height:he}=await ne.getImageDimensionsFromBlob(X);C||(oe(),De(X),T({width:ce,height:he,size:(X.size/1024).toFixed(2),format:Se(X.type)}))};return(async()=>{try{if(!u){const X=await ne.resolveDataProviderPreview(r,a);if(X?.previewUrl&&!C){We(X.previewUrl),me();try{const{data:ce}=await w(a);if(C)return;ce?T({width:ce?.width,height:ce?.height,size:ce?.fileSize!=null?(ce.fileSize/1024).toFixed(2):"",format:Se(ce?.format)}):await M();return}catch{await M()}}}await M()}catch{C||oe()}})(),()=>{C=!0,d.abort()}},[u,h,oe,L,Ae,w,fe,r,S,F,De]);const on=()=>{p(s.closeModal$1()),setTimeout(()=>{oe(),me(),b(""),R(""),se([]),se([]),Z({keywords:"",color:"",orientation:""}),te({keywords:""}),E("auto"),!ut&&Ke(""),ae(572),W(de)},200)},ln=a=>{a===zt?I.success({mask:{closable:!0},centered:!0,title:f("Coming soon"),content:f("The feature is under development."),okText:f("Ok. I'll be waiting"),onOk:()=>{}}):a===we&&L===""?I.warning({mask:{closable:!0},centered:!0,title:f(""),content:f("To preview and edit the uploaded image"),okText:f("Upload Image"),onOk:()=>{W(de)}}):(setTimeout(()=>{let d=0,C=0;a===de&&Y.current?(U.keywords===""&&n.current?.focus({cursor:"start"}),d=300,C=572):a===we&&N.current?(d=N.current.offsetHeight+62,C=572):a===Fe&&B.current?(U.keywords===""&&j.current?.focus({cursor:"start"}),d=130,C=572,K.length>0&&(C=1060,d="84vh")):a===ze&&ee.current?(U.keywords===""&&A.current?.focus({cursor:"start"}),d=130,C=572,v.length>0&&(C=1060,d="84vh")):a===$e&&P.current&&(ft===""&&ct.length===0?($.current?.focus({cursor:"start"}),d=130):d=P.current.offsetHeight+82,C=572),E(d),ae(C)},0),W(a))};(0,e.useEffect)(()=>{U.keywords===""&&(n?.current?.focus({cursor:"start"}),se([]),setTimeout(()=>{E("auto"),ae(572)},0))},[U,se,E,ae]);const Je=a=>{const d=a.type==="image/jpeg"||a.type==="image/png"||a.type==="image/jpg"||a.type==="image/webp"||a.type==="image/gif"||a.type==="image/svg+xml";return d||y.error({id:"IMAGE_UPLOAD_WRONG_FORMAT",data:a,title:"Upload",description:"You can only upload JPG/JPEG/PNG/WEBP/GIF/SVG file!"}),d},bt=(0,e.useRef)(null),Ie=async({file:a})=>{try{Ce(!0);const d=a===bt.current?await s.prepareImageForEditorResult(a,i,void 0,{compressBySize:l!==void 0}):await s.prepareImageForEditorUpload(a,i),C=await nn(d);if(C.url)return At(C.url,d),C.url;if(!s.shouldFallbackToBuiltInUpload(C,{isStandalone:u,targetIsOurBackend:!!o})){Le(d,s.toUploadImageError(C));return}const M=await s.uploadFileViaDataProvider(d,r);if(M?.url)return At(M.url,d),M.url;Le(d,null);return}catch(d){Le(a,d);return}finally{Ce(!1)}},wt=(0,e.useRef)(Ie);wt.current=Ie;const cn=(0,e.useCallback)(a=>(bt.current=a,wt.current({file:a})),[]);let Oe=[{label:f("Upload"),key:de,children:(0,t.jsxs)("div",{ref:Y,style:{paddingBottom:24},children:[i.imageCenterLocalUploadEnabled!==!1&&(0,t.jsxs)(Wt,{showUploadList:!1,name:"Image",beforeUpload:Je,customRequest:Ie,style:{marginBottom:10},multiple:!1,accept:"image/png, image/jpeg, image/jpg, image/webp, image/gif, image/svg+xml",children:[(0,t.jsx)("p",{className:"ant-upload-drag-icon",children:(0,t.jsx)(s.EmIcons,{icon:"InboxOutlined",component:m.icons$InboxOutlined})}),(0,t.jsx)("p",{className:"ant-upload-text",children:f("Click to select, paste from the clipboard, or drag and drop")}),(0,t.jsx)("p",{className:"ant-upload-hint",children:f("Accepted formats: PNG, JPG, WEBP, SVG or GIF.")})]}),(0,t.jsx)(m.ui_kit$Form,{style:{padding:"0 2px 0 2px"},children:(0,t.jsx)(m.ui_kit$Form.Item,{validateStatus:q,children:(0,t.jsx)(m.ui_kit$Input,{ref:n,allowClear:!0,size:"large",placeholder:f("Paste image URL here"),value:S,onChange:tn,onPressEnter:rn,spellCheck:"false"})})})]})}];return i.imageCenterStockEnabled&&!He.isLocked&&Oe.push({label:f("Stock"),key:Fe,children:(0,t.jsx)("div",{ref:B,style:{paddingBottom:24},children:(0,t.jsx)(Mt,{currentReq:U,setCurrentReq:Z,imageStockList:K,setImageStockList:se,setModalWidth:ae,setModalHeight:E,setStockLink:Q,setCurrentImageLink:b,inputRef:j,customRequest:Ye})})}),i.imageCenterGifEnabled&&!Qe.isLocked&&Oe.push({label:f("GIF"),key:ze,children:(0,t.jsx)("div",{ref:ee,style:{paddingBottom:24},children:(0,t.jsx)(Ft,{currentReqGif:O,setCurrentReqGif:te,imageGifList:v,setImageGifList:J,setModalWidth:ae,setModalHeight:E,setStockLink:Q,setCurrentImageLink:b,inputRef:A,customRequest:Ye})})}),i.elementAIimageEnabled&&!Ve.isLocked&&Oe.push({label:f("AI"),key:$e,children:(0,t.jsx)("div",{ref:P,style:{paddingBottom:24},children:(0,t.jsx)(Bt,{setModalHeight:E,customRequest:Ie,aiImageRequest:ft,setAiImageRequest:Ke,imageAiList:ct,setImageAiList:qt,isLoadingAi:ut,setIsLoadingAi:dt,aiTabRef:P,inputAiRef:$,isImageUploaded:re,setIsImageUploaded:_})})}),i.imageCenterEditorEnabled&&Oe.push({label:"",key:we,children:(0,t.jsx)("div",{ref:N,children:(0,t.jsx)(jt,{currentImageLink:L,newLink:S,previewDisplayUrl:en,resolvedPreviewObjectUrl:Jt,resolvedPreviewBlob:Xt,resolveImageBlob:sn,imageSize:H,onSave:cn,uploadImageResultIsLoading:pe||!1})})}),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.ui_kit$Modal,{width:ve,className:"image-center",title:f("Image Center"),style:{minHeight:390},open:!!D,onOk:Ge,onCancel:on,footer:z===we?(0,t.jsx)(t.Fragment,{}):null,children:(0,t.jsx)(m.ui_kit$Spin,{spinning:pe,children:(0,t.jsx)(m.ui_kit$Tabs,{activeKey:z,onChange:ln,items:Oe,className:"modal-tabs",style:{height:le,minHeight:130}})})}),(0,t.jsx)(s.PlanUpgradePrompt,{open:Yt,onCancel:()=>je(!1),initialSlide:Zt})]})};lt.propTypes={dataProvider:_t.default.object},kt.default=lt});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
__emailmaker__.define("static/core/
|
|
1
|
+
__emailmaker__.define("static/core/a85c7f02.js",["require","exports","module","static/core/5dc34752.js","static/core/25b4c1c1.js"],function(a,m,v){const w=a("./5dc34752.js"),h=a("./25b4c1c1.js");var d={items_per_page:"/ Seite",jump_to:"Gehe zu",jump_to_confirm:"bestätigen",page:"Seite",prev_page:"Vorherige Seite",next_page:"Nächste Seite",prev_5:"5 Seiten zurück",next_5:"5 Seiten vor",prev_3:"3 Seiten zurück",next_3:"3 Seiten vor",page_size:"Page Size"};function i(t){"@babel/helpers - typeof";return i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(t)}function o(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(t);e&&(l=l.filter(function($){return Object.getOwnPropertyDescriptor(t,$).enumerable})),n.push.apply(n,l)}return n}function s(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?o(Object(n),!0).forEach(function(l){p(t,l,n[l])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach(function(l){Object.defineProperty(t,l,Object.getOwnPropertyDescriptor(n,l))})}return t}function p(t,e,n){return e=g(e),e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function g(t){var e=b(t,"string");return i(e)=="symbol"?e:String(e)}function b(t,e){if(i(t)!="object"||!t)return t;var n=t[Symbol.toPrimitive];if(n!==void 0){var l=n.call(t,e||"default");if(i(l)!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var f=s(s({},h.commonLocale),{},{locale:"de_DE",today:"Heute",now:"Jetzt",backToToday:"Zurück zu Heute",ok:"OK",clear:"Zurücksetzen",week:"Woche",month:"Monat",year:"Jahr",timeSelect:"Zeit wählen",dateSelect:"Datum wählen",monthSelect:"Wähle einen Monat",yearSelect:"Wähle ein Jahr",decadeSelect:"Wähle ein Jahrzehnt",previousMonth:"Vorheriger Monat (PageUp)",nextMonth:"Nächster Monat (PageDown)",previousYear:"Vorheriges Jahr (Ctrl + left)",nextYear:"Nächstes Jahr (Ctrl + right)",previousDecade:"Vorheriges Jahrzehnt",nextDecade:"Nächstes Jahrzehnt",previousCentury:"Vorheriges Jahrhundert",nextCentury:"Nächstes Jahrhundert"}),c={placeholder:"Zeit auswählen",rangePlaceholder:["Startzeit","Endzeit"]},u={lang:{placeholder:"Datum auswählen",rangePlaceholder:["Startdatum","Enddatum"],shortWeekDays:["So","Mo","Di","Mi","Do","Fr","Sa"],shortMonths:["Jan","Feb","Mär","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],...f},timePickerLocale:{...c}},y=u,r="${label} ist nicht gültig. ${type} erwartet",S={locale:"de",Pagination:d,DatePicker:u,TimePicker:c,Calendar:y,global:{placeholder:"Bitte auswählen",close:"Schließen",show:"Anzeigen",hide:"Ausblenden"},Table:{filterTitle:"Filter-Menü",filterConfirm:"OK",filterReset:"Zurücksetzen",filterEmptyText:"Keine Filter",filterSearchPlaceholder:"Suche in Filtern",filterCheckAll:"Alle auswählen",selectAll:"Selektiere Alle",selectInvert:"Selektion Invertieren",selectionAll:"Wählen Sie alle Daten aus",sortTitle:"Sortieren",emptyText:"Keine Daten",expand:"Zeile erweitern",collapse:"Zeile reduzieren",triggerDesc:"Klicken zur absteigenden Sortierung",triggerAsc:"Klicken zur aufsteigenden Sortierung",cancelSort:"Klicken zum Abbrechen der Sortierung"},Tour:{Next:"Weiter",Previous:"Zurück",Finish:"Fertig"},Modal:{okText:"OK",cancelText:"Abbrechen",justOkText:"OK"},Popconfirm:{okText:"OK",cancelText:"Abbrechen"},Transfer:{titles:["",""],searchPlaceholder:"Suchen",itemUnit:"Eintrag",itemsUnit:"Einträge",remove:"Entfernen",selectCurrent:"Alle auf aktueller Seite auswählen",removeCurrent:"Auswahl auf aktueller Seite aufheben",selectAll:"Alle auswählen",deselectAll:"Alle abwählen",removeAll:"Auswahl aufheben",selectInvert:"Auswahl umkehren"},Upload:{uploading:"Hochladen...",removeFile:"Datei entfernen",uploadError:"Fehler beim Hochladen",previewFile:"Dateivorschau",downloadFile:"Download-Datei"},Empty:{description:"Keine Daten"},Text:{edit:"Bearbeiten",copy:"Kopieren",copied:"Kopiert",expand:"Erweitern"},Form:{defaultValidateMessages:{default:"Feld-Validierungsfehler: ${label}",required:"Bitte geben Sie ${label} an",enum:"${label} muss eines der folgenden sein [${enum}]",whitespace:"${label} darf kein Leerzeichen sein",date:{format:"${label} ist ein ungültiges Datumsformat",parse:"${label} kann nicht in ein Datum umgewandelt werden",invalid:"${label} ist ein ungültiges Datum"},types:{string:r,method:r,array:r,object:r,number:r,date:r,boolean:r,integer:r,float:r,regexp:r,email:r,url:r,hex:r},string:{len:"${label} muss genau ${len} Zeichen lang sein",min:"${label} muss mindestens ${min} Zeichen lang sein",max:"${label} darf höchstens ${max} Zeichen lang sein",range:"${label} muss zwischen ${min} und ${max} Zeichen lang sein"},number:{len:"${label} muss gleich ${len} sein",min:"${label} muss mindestens ${min} sein",max:"${label} darf maximal ${max} sein",range:"${label} muss zwischen ${min} und ${max} liegen"},array:{len:"Es müssen ${len} ${label} sein",min:"Es müssen mindestens ${min} ${label} sein",max:"Es dürfen maximal ${max} ${label} sein",range:"Die Anzahl an ${label} muss zwischen ${min} und ${max} liegen"},pattern:{mismatch:"${label} entspricht nicht dem ${pattern} Muster"}}},QRCode:{expired:"QR-Code abgelaufen",refresh:"Aktualisieren"}};m.default=S});
|