1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5684],{95684:(t,e,r)=>{r.r(e),r.d(e,{detectSlides:()=>n,extractPage:()=>l});var i=r(78617),o=r(7236);function n(t){let e=t.getElementById("root")??t.body;if(!e)return[];let r=Array.from(e.querySelectorAll(".slide"));if(0===r.length){let t=Array.from(e.children);for(;t.length>0;){let e=t.shift(),i=e.getBoundingClientRect();if(i.width>=200&&i.height>=200){let t=e.ownerDocument.defaultView.getComputedStyle(e);if(t.width.endsWith("px")&&t.height.endsWith("px")&&parseFloat(t.width)===i.width){r.push(e);continue}}e.childElementCount>0&&t.length<50&&t.unshift(...Array.from(e.children))}}if(0===r.length)for(let t of Array.from(e.querySelectorAll("*"))){let e=t.ownerDocument.defaultView.getComputedStyle(t);if("none"===e.boxShadow)continue;let i=t.getBoundingClientRect();!(i.width<300)&&!(i.height<300)&&e.width.endsWith("px")&&e.height.endsWith("px")&&r.push(t)}let i=new Set;return r.filter(t=>!i.has(t)&&(i.add(t),!0)).map((t,e)=>{let r=t.getBoundingClientRect(),i=Math.round(r.width),o=Math.round(r.height);return{index:e,el:t,width:i,height:o,bbox:r,label:`Slide ${e+1} \xb7 ${i}\xd7${o}`}})}async function l(t,e,r){let o=t.el.ownerDocument,n=o.defaultView,l=[],c=[],g=0,b={doc:o,win:n,slideBBox:t.el.getBoundingClientRect(),emit:(t,e)=>{l.push({element:t,zIndex:e,order:g++})},pending:c,designId:e},y=function(t){let e=t.backgroundImage;if(e&&"none"!==e){let t=m(e);if(t)return t}let r=t.backgroundColor;return r&&!p(r)?{type:"solid",color:h(r)}:{type:"solid",color:"#ffffff"}}(n.getComputedStyle(t.el));for(let e of Array.from(t.el.children))!function t(e,r,o=0){var n;if(1!==e.nodeType)return;let l=r.win.getComputedStyle(e);if("none"===l.display||"hidden"===l.visibility)return;let c=parseFloat(l.opacity||"1");if(0===c)return;let g=e.id;if("__bundler_thumbnail"===g||"__bundler_loading"===g)return;let b=function(t,e){let r=t.zIndex;if(!r||"auto"===r)return e;let i=parseInt(r,10);return Number.isFinite(i)?i:e}(l,o);if("svg"===e.tagName||"svg"===e.tagName.toLowerCase())return void function(t,e,r,o){let n=s(t,e),{x:l,y:u}=n,{width:d,height:h}=n;if(d<4||h<4){let e=parseFloat(t.getAttribute("width")||"0"),r=parseFloat(t.getAttribute("height")||"0");e>4&&r>4&&(d=e,h=r)}if(d<4||h<4||a(l,u,d,h,e))return;let f={id:(0,i.Ak)(8),type:"image",x:l,y:u,width:d,height:h,rotation:0,opacity:r,visible:!0,locked:!1,src:"",cornerRadius:0,brightness:0,blur:0};e.emit(f,o),e.pending.push((async()=>{try{f.src=await w(t,d,h,e.designId)}catch(t){console.warn("SVG raster failed:",t)}})())}(e,r,c,b);if("IMG"===e.tagName)return void function(t,e,r,o,n){let{x:l,y:d,width:h,height:f}=s(t,e);if(h<1||f<1||a(l,d,h,f,e))return;let c=t.currentSrc||t.src;if(!c)return;let g=u(o.borderRadius),p={id:(0,i.Ak)(8),type:"image",x:l,y:d,width:h,height:f,rotation:0,opacity:r,visible:!0,locked:!1,src:c,cornerRadius:g.uniform??0,brightness:0,blur:0};e.emit(p,n)}(e,r,c,l,b);if("IMAGE-SLOT"===e.tagName)return void function(t,e,r,o){let{x:n,y:l,width:u,height:d}=s(t,e);if(u<1||d<1||a(n,l,u,d,e))return;let h=parseFloat(t.getAttribute("radius")||"0"),f=t.shadowRoot,c=f?.querySelector?.("img"),g=c?.currentSrc||c?.src||"";if(g&&!g.startsWith("about:")&&!g.startsWith("data:image/svg")){let t={id:(0,i.Ak)(8),type:"image",x:n,y:l,width:u,height:d,rotation:0,opacity:r,visible:!0,locked:!1,src:g,cornerRadius:h,brightness:0,blur:0};e.emit(t,o);return}let p={id:(0,i.Ak)(8),type:"rect",x:n,y:l,width:u,height:d,rotation:0,opacity:r,visible:!0,locked:!1,fill:"#f4f6f8",stroke:"",strokeWidth:0,cornerRadius:h,shadowBlur:0,shadowColor:"#000000",shadowOffsetX:0,shadowOffsetY:0};e.emit(p,o)}(e,r,c,b);for(let o of((!p((n=l).backgroundColor)||n.backgroundImage&&"none"!==n.backgroundImage&&n.backgroundImage.startsWith("linear-gradient")||parseFloat(n.borderTopWidth||"0")>0||parseFloat(n.borderBottomWidth||"0")>0||parseFloat(n.borderLeftWidth||"0")>0||parseFloat(n.borderRightWidth||"0")>0||n.boxShadow&&"none"!==n.boxShadow)&&function(t,e,r,o,n){let{x:l,y:c,width:g,height:b}=s(t,e);if(g<1||b<1||a(l,c,g,b,e))return;let w=u(r.borderRadius),y=function(t){let e=d(t.borderTopWidth||"0"),r=d(t.borderRightWidth||"0"),i=d(t.borderBottomWidth||"0"),o=d(t.borderLeftWidth||"0"),n=f(e>0?t.borderTopColor:i>0?t.borderBottomColor:o>0?t.borderLeftColor:t.borderRightColor||"#000");return{top:e,right:r,bottom:i,left:o,color:n,uniform:e>0&&e===r&&e===i&&e===o}}(r),x=function(t){let e={blur:0,color:"#000000",offsetX:0,offsetY:0,opacity:0}
1;if(!t||"none"===t)return e;for(let e of t.split(/,(?![^()]*\))/)){let t=e.trim();if(t.startsWith("inset")&&!(t=t.slice(5).trim()))continue;let r=t.match(/^(rgba?\([^)]+\)|#[0-9a-f]+)\s+(-?[\d.]+)px\s+(-?[\d.]+)px\s+(-?[\d.]+)px/i);if(!r||e.trim().startsWith("inset"))continue;let[,i,o,n,l]=r,a=function(t){let e=t.match(/rgba?\([^)]+\)/i);if(e){let t=e[0].replace(/^rgba?\(|\)$/g,"").split(/[,\s/]+/).filter(Boolean);if(4===t.length){let e=parseFloat(t[3]);if(Number.isFinite(e))return Math.max(0,Math.min(1,e))}}return t.startsWith("#")&&9===t.length?parseInt(t.slice(7,9),16)/255:1}(i);return{blur:parseFloat(l),color:h(i),offsetX:parseFloat(o),offsetY:parseFloat(n),opacity:a}}return e}(r.boxShadow),k=m(r.backgroundImage),M=p(r.backgroundColor)?"transparent":f(r.backgroundColor),S="transparent"!==M,B=!!k,F=y.top>0||y.right>0||y.bottom>0||y.left>0,C=x.opacity>0&&x.blur>0;if(!S&&!B&&!F&&!C)return;let A=y.uniform,W=A?y.top:0,v=A?y.color:"",R=Math.min(g,b)/2;if(null!==w.uniform&&2>Math.abs(w.uniform-R)&&4>Math.abs(g-b)){let t={id:(0,i.Ak)(8),type:"ellipse",x:l,y:c,width:g,height:b,rotation:0,opacity:o,visible:!0,locked:!1,fill:M,stroke:v,strokeWidth:W,shadowBlur:x.blur,shadowColor:x.color,shadowOffsetX:x.offsetX,shadowOffsetY:x.offsetY,shadowOpacity:x.opacity};e.emit(t,n);return}let I={id:(0,i.Ak)(8),type:"rect",x:l,y:c,width:g,height:b,rotation:0,opacity:o,visible:!0,locked:!1,fill:M,stroke:v,strokeWidth:W,cornerRadius:w.uniform??0,shadowBlur:x.blur,shadowColor:x.color,shadowOffsetX:x.offsetX,shadowOffsetY:x.offsetY,shadowOpacity:x.opacity};k&&"linear"===k.type&&(I.fillGradient={type:"linear",angle:k.angle,stops:k.stops}),e.emit(I,n),!A&&F&&function(t,e,r,o,n,l,a,s){let u=(t,e,r,o)=>({id:(0,i.Ak)(8),type:"rect",x:t,y:e,width:r,height:o,rotation:0,opacity:l,visible:!0,locked:!1,fill:n.color,stroke:"",strokeWidth:0,cornerRadius:0,shadowBlur:0,shadowColor:"#000000",shadowOffsetX:0,shadowOffsetY:0});n.top>0&&s.emit(u(t,e,r,n.top),a),n.right>0&&s.emit(u(t+r-n.right,e,n.right,o),a),n.bottom>0&&s.emit(u(t,e+o-n.bottom,r,n.bottom),a),n.left>0&&s.emit(u(t,e,n.left,o),a)}(l,c,g,b,y,o,n,e)}(e,r,l,c,b),Array.from(e.childNodes)))1===o.nodeType?t(o,r,b):3===o.nodeType&&function(t,e,r,o,n){var l,s;let u=(t.textContent||"").trim();if(!u)return;let d=e.doc.createRange();try{d.selectNode(t)}catch{return}let h=d.getBoundingClientRect();try{d.detach?.()}catch{}if(h.width<1||h.height<1)return;let c=h.left-e.slideBBox.left,g=h.top-e.slideBBox.top;if(a(c,g,h.width,h.height,e))return;let p=Math.max(8,Math.round(parseFloat(r.fontSize)||16)),m=(l=r.fontFamily,(l.split(",")[0]?.trim()||"Poppins").replace(/^['"]|['"]$/g,"")),b=function(t){let e="bold"===t.fontWeight||parseInt(t.fontWeight||"400",10)>=600,r="italic"===t.fontStyle;return e&&r?"bold italic":e?"bold":r?"italic":"normal"}(r),w="center"===r.textAlign?"center":"right"===r.textAlign?"right":"left",y=function(t,e){if(!t||"normal"===t)return 1.2;if(t.endsWith("px")){let r=parseFloat(t);return e>0?r/e:1.2}let r=parseFloat(t);return Number.isFinite(r)?r:1.2}(r.lineHeight,p),x=(s=r.letterSpacing)&&"normal"!==s&&parseFloat(s)||0,k={id:(0,i.Ak)(8),type:"text",x:c,y:g,width:h.width,height:h.height,rotation:0,opacity:o,visible:!0,locked:!1,text:u,fontSize:p,fontFamily:m,fontStyle:b,textDecoration:"",align:w,lineHeight:y,letterSpacing:x,fill:f(r.color),stroke:"",strokeWidth:0};e.emit(k,n)}(o,r,l,c,b)}(e,b);await Promise.all(c),l.sort((t,e)=>t.zIndex-e.zIndex||t.order-e.order);let x=l.map(t=>t.element);return{width:t.width,height:t.height,background:y,elements:x,name:r}}function a(t,e,r,i,o){let n=o.slideBBox.width,l=o.slideBBox.height;return t+r<0||e+i<0||t>n||e>l}function s(t,e){let r=t.getBoundingClientRect();return{x:r.left-e.slideBBox.left,y:r.top-e.slideBBox.top,width:r.width,height:r.height}}function u(t){if(!t)return{uniform:0};let e=t.split(/[/\s]+/).filter(Boolean);if(0===e.length)return{uniform:0};let r=d(e[0]);return{uniform:(e.every(t=>d(t)===r),r)}}function d(t){let e=parseFloat(t);return Number.isFinite(e)?e:0}function h(t){if(!t)return"#000000";if(t.startsWith("#"))return 4===t.length?g(t):t.slice(0,7);let e=t.match(/rgba?\(([^)]+)\)/i);if(!e)return"#000000";
1let r=e[1].split(/[,\s/]+/).filter(Boolean);if(r.length<3)return"#000000";let i=Math.max(0,Math.min(255,Math.round(parseFloat(r[0])))),o=Math.max(0,Math.min(255,Math.round(parseFloat(r[1])))),n=Math.max(0,Math.min(255,Math.round(parseFloat(r[2]))));return"#"+i.toString(16).padStart(2,"0")+o.toString(16).padStart(2,"0")+n.toString(16).padStart(2,"0")}function f(t){if(!t)return"#000000";if("transparent"===t)return"rgba(0,0,0,0)";if(t.startsWith("#")){var e;let r,i,o,n;return 4===t.length?g(t):9===t.length?(r=parseInt((e=t).slice(1,3),16),i=parseInt(e.slice(3,5),16),o=parseInt(e.slice(5,7),16),(n=parseInt(e.slice(7,9),16)/255)>=1?e.slice(0,7):`rgba(${r},${i},${o},${c(n)})`):t.slice(0,7)}let r=t.match(/rgba?\(([^)]+)\)/i);if(!r)return t;let i=r[1].split(/[,\s/]+/).filter(Boolean);if(i.length<3)return"#000000";let o=Math.max(0,Math.min(255,Math.round(parseFloat(i[0])))),n=Math.max(0,Math.min(255,Math.round(parseFloat(i[1])))),l=Math.max(0,Math.min(255,Math.round(parseFloat(i[2])))),a=i.length>=4?parseFloat(i[3]):1;return!Number.isFinite(a)||a>=1?"#"+o.toString(16).padStart(2,"0")+n.toString(16).padStart(2,"0")+l.toString(16).padStart(2,"0"):`rgba(${o},${n},${l},${c(a)})`}function c(t){return Math.max(0,Math.min(1,Math.round(1e3*t)/1e3))}function g(t){return"#"+t[1]+t[1]+t[2]+t[2]+t[3]+t[3]}function p(t){if(!t||"transparent"===t)return!0;let e=t.match(/rgba?\(([^)]+)\)/i);if(!e)return!1;let r=e[1].split(/[,\s/]+/).filter(Boolean);return 4===r.length&&0===parseFloat(r[3])}function m(t){let e;if(!t||"none"===t)return null;let r=t.match(/^linear-gradient\(([\s\S]*)\)$/);if(!r)return null;let i=function(t){let e=[],r=0,i="";for(let o of t)"("===o?r++:")"===o&&r--,","===o&&0===r?(e.push(i),i=""):i+=o;return i&&e.push(i),e}(r[1]);if(i.length<2)return null;let o=180,n=i[0].trim();n.endsWith("deg")?(o=parseFloat(n),i.shift()):n.startsWith("to ")&&(o=(e=n.toLowerCase()).includes("bottom right")?135:e.includes("bottom left")?225:e.includes("top right")?45:e.includes("top left")?315:e.includes("bottom")?180:e.includes("top")?0:e.includes("right")?90:e.includes("left")?270:180,i.shift());let l=[];for(let t=0;t<i.length;t++){let e=function(t,e){let r=t.trim();if(!r)return null;let i=r.match(/\s+(-?\d+(?:\.\d+)?)(%|px)\s*$/),o=r,n=e;return(i&&void 0!==i.index&&("%"===i[2]&&(n=parseFloat(i[1])/100),o=r.slice(0,i.index).trim()),o)?{pos:Math.max(0,Math.min(1,n)),color:f(o)}:null}(i[t].trim(),t/Math.max(1,i.length-1));e&&l.push(e)}return l.length<2?null:{type:"linear",angle:o,stops:l}}let b="marketing-design-images";async function w(t,e,r,n){let l=t.cloneNode(!0);l.setAttribute("width",String(Math.round(e))),l.setAttribute("height",String(Math.round(r))),l.getAttribute("xmlns")||l.setAttribute("xmlns","http://www.w3.org/2000/svg");try{let e=t.ownerDocument?.defaultView;if(e){let r=e.getComputedStyle(t).color;if(r){let t=l.getAttribute("style")||"";l.setAttribute("style",`color:${r};${t}`)}}}catch{}let a=new XMLSerializer().serializeToString(l),s=URL.createObjectURL(new Blob([a],{type:"image/svg+xml;charset=utf-8"}));try{var u;let t=await (u=s,new Promise((t,e)=>{let r=new Image;r.crossOrigin="anonymous",r.onload=()=>t(r),r.onerror=()=>e(Error("Imagine necitibilÄ")),r.src=u})),l=document.createElement("canvas");l.width=Math.round(2*e),l.height=Math.round(2*r);let a=l.getContext("2d");if(!a)throw Error("Canvas context indisponibil");a.drawImage(t,0,0,l.width,l.height);let d=l.toDataURL("image/png"),h=await (await fetch(d)).blob(),f=(0,o.U)(),c=`imports/${n??"drafts"}`,g=`${c}/${(0,i.Ak)(12)}.png`,{error:p}=await f.storage.from(b).upload(g,h,{cacheControl:"31536000",upsert:!1,contentType:"image/png"});if(p)throw Error(p.message);let{data:m}=f.storage.from(b).getPublicUrl(g);return m.publicUrl}finally{URL.revokeObjectURL(s)}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.