1"use strict";(self.webpackChunkultimate_jekyll=self.webpackChunkultimate_jekyll||[]).push([[6445],{6445(e,t,n){n.r(t);var o=n(8129),a=n(200);let s=null,i=null,d=!1,c=1,r={},l=!1,u=null;const p=()=>new Promise(async function(e){return await o.A.dom().ready(),o.A.auth().listen({once:!0},e=>{if(!e.user)return;r=window.STUDIO_CLIPS||{};const t=Object.keys(r);if(0===t.length){const e=document.getElementById("studio");return void(e&&(e.hidden=!1,e.innerHTML='<div style="display:flex;align-items:center;justify-content:center;min-height:100vh;color:rgba(255,255,255,0.5);font-size:1.1rem">No clips registered. Set <code style="color:#fff;margin:0 6px">window.STUDIO_CLIPS</code> in your project JS.</div>'))}!function(e){const t=document.getElementById("studio-clips");t&&e.forEach((e,n)=>{const o=document.createElement("button");o.className="studio-clip-btn"+(0===n?" active":""),o.dataset.clip=e,o.textContent=r[e].label||e,t.appendChild(o),o.addEventListener("click",()=>{l||(document.querySelector(".studio-clip-btn.active")?.classList.remove("active"),o.classList.add("active"),s=e,d||f(s))})})}(t),function(){u=new a.FormManager("#studio-controls-form",{autoReady:!0,allowResubmit:!0}),document.querySelectorAll(".studio-aspect-btn").forEach(e=>{e.addEventListener("click",()=>{if(l)return;document.querySelector(".studio-aspect-btn.active")?.classList.remove("active"),e.classList.add("active");const t=document.getElementById("studio-canvas");t&&t.setAttribute("data-aspect",e.dataset.aspect),g(),f(s)})});const e=document.getElementById("studio-pause"),t=document.getElementById("studio-pause-val");e?.addEventListener("input",()=>{t.textContent=e.value});const n=document.getElementById("studio-speed");n?.addEventListener("change",()=>{c=parseFloat(n.value)});const o=document.getElementById("studio-resolution");o?.addEventListener("change",()=>{g(),f(s)});const i=document.getElementById("studio-toggle");i?.addEventListener("click",()=>{l||(d=!d,i.textContent=d?"â¶ Play":"⸠Pause",d||f(s))})}(),function(){const e=document.getElementById("studio-record");e&&e.addEventListener("click",()=>{l||async function(){const e=document.getElementById("studio-canvas"),t=document.getElementById("studio-record"),n=document.getElementById("studio-fieldset"),o=r[s];if(!e||!o)return;let a;console.log(`[Studio] Recording clip: ${s}`),l=!0,d=!0,clearTimeout(i),n&&(n.disabled=!0),t.disabled=!1,t.classList.add("recording"),t.textContent="⺠Recording...";try{console.log("[Studio] Requesting screen capture..."),a=await navigator.mediaDevices.getDisplayMedia({video:{displaySurface:"browser",frameRate:{ideal:60}},preferCurrentTab:!0}),console.log("[Studio] Screen capture granted")}catch(e){return console.warn("[Studio] Screen capture denied:",e.message),void y(t,n)}try{if("undefined"!=typeof CropTarget&&a.getVideoTracks()[0].cropTo){const t=await CropTarget.fromElement(e);await a.getVideoTracks()[0].cropTo(t),console.log("[Studio] CropTarget applied â recording canvas only")}else console.log("[Studio] CropTarget not available â recording full tab")}catch(e){console.log("[Studio] CropTarget failed:",e.message,"â recording full tab")}const u=function(){const e=["video/webm;codecs=vp9","video/webm;codecs=vp8","video/webm"];for(const t of e)if(MediaRecorder.isTypeSupported(t))return t;return"video/webm"}();console.log(`[Studio] Using mime type: ${u}`);const p=new MediaRecorder(a,{mimeType:u,videoBitsPerSecond:16e6}),g=[];p.ondataavailable=e=>{e.data.size>0&&(g.push(e.data),console.log(`[Studio] Chunk received: ${(e.data.size/1024).toFixed(1)}KB (${g.length} total)`))},p.onstop=()=>{a.getTracks().forEach(e=>e.stop());const o=p.mimeType.includes("mp4")?"mp4":"webm",i=e.getAttribute("data-aspect")||"16-9",{w:d,h:c}=m(),r=new Blob(g,{type:p.mimeType}),l=`${s}-${i.replace(":","x")}-${d}x${c}.${o}`;console.log(`[Studio] Recording complete â ${g.length} chunks, ${(r.size/1024).toFixed(1)}KB, mime: ${p.mimeType}`),console.log(`[Studio] Downloading: ${l}`);const u=URL.createObjectURL(r),v=document.createElement("a");
1v.href=u,v.download=l,v.click(),URL.revokeObjectURL(u),y(t,n),f(s)},p.onerror=e=>{console.error("[Studio] Recorder error:",e.error)},a.getVideoTracks()[0].addEventListener("ended",()=>{console.log("[Studio] Screen sharing ended by user"),"inactive"!==p.state&&p.stop()}),e.innerHTML="",e.classList.add("recording"),await v(1e3),console.log("[Studio] Canvas settled, starting recorder..."),await new Promise(e=>{p.onstart=()=>{console.log("[Studio] Recorder started"),e()},p.start(100)});const b=parseInt(document.getElementById("studio-pause")?.value||1500),x=o.duration/c;console.log(`[Studio] Pre-delay: ${b}ms, clip duration: ${x}ms (speed: ${c}x)`),await v(b),console.log("[Studio] Building clip animation..."),o.build(e,h(e)),await v(x),console.log("[Studio] Clip finished, stopping recorder..."),"inactive"!==p.state&&p.stop()}()})}(),document.getElementById("studio").hidden=!1,g(),s=t[0],f(s)}),e()});function m(){const e=document.getElementById("studio-resolution"),t=e?.value||"1920x1080",[n,o]=t.split("x").map(Number);return{w:n,h:o}}function g(){const e=document.getElementById("studio-canvas");if(!e)return;const t=e.getAttribute("data-aspect"),{w:n,h:o}=m();let a,s;"9:16"===t?(s=o,a=Math.round(9*o/16)):(a=n,s=o);const i="9:16"===t?Math.round(303.75):960,d=a/i,c=s/540;e.style.width=i+"px",e.style.height="540px",e.style.transform=`scale(${d}, ${c})`,e.style.transformOrigin="center center",e.setAttribute("data-size",`${a} à ${s}`)}function f(e){clearTimeout(i);const t=document.getElementById("studio-canvas");if(!t)return;t.innerHTML="";const n=r[e];if(!n)return;const o=parseInt(document.getElementById("studio-pause")?.value||1500),a=n.duration/c;i=setTimeout(()=>{n.build(t,h(t)),i=setTimeout(()=>{d||s!==e||l||f(e)},a)},o)}function y(e,t){l=!1,d=!1,e.classList.remove("recording"),e.textContent="⺠Record",t&&(t.disabled=!1);const n=document.getElementById("studio-canvas");n&&n.classList.remove("recording");const o=document.getElementById("studio-toggle");o&&(o.textContent="⸠Pause")}function v(e){return new Promise(t=>setTimeout(t,e))}function h(e){return{animate:b,el:x,flowClip:t=>function(e,{title:t,nodes:n}){const o="9:16"===e.getAttribute("data-aspect"),a=x("div","s-hero-title text-center px-3");a.innerHTML=`<span class="s-display d-block fw-bold">${t}</span>`,e.appendChild(a);const s=o?"â":"â",i=x("div","s-hidden d-flex align-items-center justify-content-center gap-3 px-4 "+(o?"flex-column":""));n.forEach((e,t)=>{t>0&&i.appendChild(x("span","s-hidden s-accent fw-bold fs-4 flex-shrink-0",s));const n=x("div","s-hidden card rounded-4 p-3 text-center");n.style.width="140px",n.innerHTML=`\n <span class="d-block fs-4 mb-2">${e.icon}</span>\n <span class="d-block fw-bold small">${e.label}</span>\n <small class="d-block font-monospace text-body-secondary" style="font-size:0.65rem">${e.stat}</small>\n `,i.appendChild(n)}),e.appendChild(i),b(a,[{opacity:0,transform:"translateY(-20px)"},{opacity:1,transform:"translateY(0)"}],{duration:600}),b(i,[{opacity:0},{opacity:1}],{delay:300,duration:300,easing:"ease"}),i.querySelectorAll(".card").forEach((e,t)=>{b(e,[{opacity:0,transform:"scale(0.5) translateY(20px)"},{opacity:1,transform:"scale(1) translateY(0)"}],{delay:500+250*t,duration:500})}),i.querySelectorAll(".s-accent").forEach((e,t)=>{b(e,[{opacity:0},{opacity:1}],{delay:650+250*t,duration:300,easing:"ease"})})}(e,t),cardClip:t=>function(e,{badge:t,title:n,contentFn:o}){const a=x("div","s-hidden card rounded-4 p-4");a.style.maxWidth="500px",a.style.width="90%",a.innerHTML=`\n <div class="d-flex align-items-center gap-2 mb-3">${t}</div>\n <div class="s-display fs-5 fw-bold mb-3">${n}</div>\n <div class="d-flex flex-column gap-2" data-content></div>\n `,e.appendChild(a),b(a,[{opacity:0,transform:"scale(0.8) translateY(30px)"},{opacity:1,transform:"scale(1) translateY(0)"}],{duration:600}),o(a.querySelector("[data-content]"),{animate:b,el:x})}(e,t),chatClip:t=>function(e,{header:t,messages:n}){const o=x("div","s-hidden text-center px-3");o.innerHTML=t,e.appendChild(o),b(o,[{opacity:0,transform:"translateY(-20px)"},{opacity:1,transform:"translateY(0)"}],{duration:500});const a=x("div","d-flex flex-column gap-2 px-4 w-100");
1a.style.maxWidth="480px",n.forEach((e,t)=>{const n=x("div","s-hidden rounded-4 px-3 py-2 small lh-sm "+("ai"===e.type?"s-bubble-ai align-self-end":"s-bubble-them align-self-start"));n.style.maxWidth="85%",n.innerHTML=e.text+(e.label?`<span class="s-chat-label d-block text-uppercase mt-1">${e.label}</span>`:""),a.appendChild(n),b(n,[{opacity:0,transform:"translateY(16px) scale(0.92)"},{opacity:1,transform:"translateY(0) scale(1)"}],{delay:800+800*t,duration:500})}),e.appendChild(a)}(e,t)}}function b(e,t,n={}){const o=(n.delay||0)/c,a=(n.duration||500)/c,s=n.fill||"forwards",i=n.easing||"cubic-bezier(0.34, 1.56, 0.64, 1)";return e.animate(t,{delay:o,duration:a,fill:s,easing:i})}function x(e,t,n){const o=document.createElement(e);return t&&(o.className=t),n&&(o.innerHTML=n),o}n.dn(p),n.d(t,["default",0,p])}}]);
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.