PageSourceSearch

https://startupbase.io/js/pages/snappy.js?v=1790567422256

js startupbase.io collected 2026-10-03 23:28:50 UTC 6,667 bytes, 1 lines download raw bytes

1"use strict";!function(){let e=null,t=null;function n(){window.lucide&&"function"==typeof window.lucide.createIcons&&window.lucide.createIcons()}function o(){t&&"function"==typeof t.play&&("function"!=typeof t.once?Promise.resolve(t.play()).catch(function(){return null}):t.once("ready",function(){Promise.resolve(t.play()).catch(function(){return null})}))}function a(){t&&"function"==typeof t.destroy?(t.destroy(),t=null):t=null}function i(n){const i=e;i&&i.items.length&&(i.index=Math.max(0,Math.min(n,i.items.length-1)),function(n){const i=e.stage;a(),i.innerHTML="";const s=document.createElement("div");if(s.className="snappy-lightbox-frame","image"===n.kind){const e=document.createElement("img");return e.className="snappy-lightbox-image",e.src=n.src,e.alt=n.alt||"",s.appendChild(e),void i.appendChild(s)}const l=document.createElement("div");if(l.className="snappy-lightbox-video","youtube"===n.kind||"vimeo"===n.kind){const e=document.createElement("div");return e.setAttribute("data-toggle","plyr"),e.setAttribute("data-plyr-provider",n.kind),e.setAttribute("data-plyr-embed-id",n.embedId||""),l.appendChild(e),s.appendChild(l),i.appendChild(s),t=new Plyr(e),void o()}if("direct"===n.kind){const e=document.createElement("video");e.setAttribute("data-toggle","plyr"),e.setAttribute("controls",""),e.setAttribute("playsinline","");const a=document.createElement("source");return a.src=n.url||"",n.mime&&(a.type=n.mime),e.appendChild(a),l.appendChild(e),s.appendChild(l),i.appendChild(s),t=new Plyr(e),void o()}if("loom"===n.kind){const e=document.createElement("div");e.className="embed-responsive embed-responsive-16by9";const t=document.createElement("iframe");t.className="embed-responsive-item",t.src=n.url||"",t.allow="autoplay; fullscreen; picture-in-picture",t.allowFullscreen=!0,e.appendChild(t),l.appendChild(e),s.appendChild(l),i.appendChild(s)}}(i.items[i.index]),function(){const t=e;if(!t)return;const n=t.items.length>1;t.prev.classList.toggle("d-none",!n||t.index<=0),t.next.classList.toggle("d-none",!n||t.index>=t.items.length-1),t.dots.classList.toggle("d-none",!n),Array.prototype.forEach.call(t.dots.children,function(e,n){e.classList.toggle("is-active",n===t.index),e.setAttribute("aria-current",n===t.index?"true":"false")})}())}function s(){e&&(a(),e.element.classList.add("d-none"),document.body.classList.remove("snappy-lightbox-open"),e.opener&&"function"==typeof e.opener.focus&&e.opener.focus(),e.opener=null,e.items=[],e.index=0,e.stage.innerHTML="",e.dots.innerHTML="")}function l(t,o,a){const l=(e||(e=function(){const t=document.createElement("div");return t.className="snappy-lightbox d-none",t.innerHTML='<div class="snappy-lightbox-backdrop" data-snappy-lightbox-close></div><button type="button" class="snappy-lightbox-close" aria-label="Close media" data-snappy-lightbox-close><i data-lucide="x"></i></button><button type="button" class="snappy-lightbox-arrow snappy-lightbox-arrow-prev d-none" aria-label="Previous media" data-snappy-lightbox-prev><i data-lucide="chevron-left"></i></button><div class="snappy-lightbox-dialog"><div class="snappy-lightbox-stage" data-snappy-lightbox-stage></div><div class="snappy-lightbox-dots d-none" data-snappy-lightbox-dots></div></div><button type="button" class="snappy-lightbox-arrow snappy-lightbox-arrow-next d-none" aria-label="Next media" data-snappy-lightbox-next><i data-lucide="chevron-right"></i></button>',document.body.appendChild(t),n(),t.addEventListener("click",function(e){e.target.closest("[data-snappy-lightbox-close]")&&s()}),document.addEventListener("keydown",function(n){e&&e.element===t&&("Escape"===n.key?s():"ArrowLeft"===n.key?(n.preventDefault(),i(e.index-1)):"ArrowRight"===n.key&&(n.preventDefault(),i(e.index+1)))}),{element:t,stage:t.querySelector("[data-snappy-lightbox-stage]"),prev:t.querySelector("[data-snappy-lightbox-prev]"),next:t.querySelector("[data-snappy-lightbox-next]"),dots:t.querySelector("[data-snappy-lightbox-dots]"),items:[],index:0,opener:null}}()),e);l.items=t,l.index=o,l.opener=a||null,l.dots.innerHTML="",t.forEach(function(e,t){const n=document.createElement("button");n.type="button",n.className="snappy-dot snappy-lightbox-dot",n.setAttribute("aria-label","View slide "+(t+1)),n.addEventListener("click",function(){i(t)}),l.dots.appendChild(n)}),l.prev.onclick=function(){i(l.index-1)},l.next.onclick=function(){i(l.index+1)},l.element.classList.remove("d-none"),document.body.classList.add("snappy-lightbox-open"),i(o)}function d(e){return{kind:String(e.dataset.snappyKind||"image").toLowerCase(),src:e.dataset.snappySrc||"",embedId:e.dataset.snappyEmbedId||"",url:e.dataset.snappyUrl||"",mime:e.dataset.snappyMime||"",alt:(e.querySelector("img")||{}).alt||""}}function c(e){const t=e.querySelector("[data-snappy-track]");if(!t)return;const n=Array.prototype.slice.call(t.children||[]),o=e.querySelector("[data-snappy-prev]"),a=e.querySelector("[data-snappy-next]"),i=e.querySelector("[data-snappy-dots]"),s=n.map(d);n.length<=1&&(o&&o.classList.add("d-none"),a&&a.classList.add("d-none"),i&&i.classList.add("d-none"));let c=0;function r(e){const o=Math.max(0,Math.min(e,n.length-1)),a=n[o];a&&t.scrollTo({left:a.offsetLeft,behavior:"smooth"})}function p(){const e=t.scrollWidth-t.clientWidth;c=function(e,t){let n=0,o=Number.POSITIVE_INFINITY;return t.forEach(function(t,a){const i=Math.abs(t.offsetLeft-e.scrollLeft);i<o&&(o=i,n=a)}),n}(t,n),o&&o.classList.toggle("d-none",n.length<=1||c<=0||t.scrollLeft<=4),a&&a.classList.toggle("d-none",n.length<=1||c>=n.length-1||t.scrollLeft>=e-4),i&&Array.prototype.forEach.call(i.children,function(e,t){e.classList.toggle("is-active",t===c),e.setAttribute("aria-current",t===c?"true":"false")})}i&&(i.innerHTML="",i.classList.toggle("d-none",n.length<=1),n.forEac
1h(function(e,t){const n=document.createElement("button");n.type="button",n.className="snappy-dot",n.setAttribute("aria-label","View slide "+(t+1)),n.addEventListener("click",function(){r(t)}),i.appendChild(n)})),o&&o.addEventListener("click",function(){r(c-1)}),a&&a.addEventListener("click",function(){r(c+1)}),n.forEach(function(e,t){e.addEventListener("click",function(n){n.target.closest(".plyr__control--overlaid")&&(n.preventDefault(),n.stopPropagation(),l(s,t,e))},!0),e.addEventListener("click",function(){l(s,t,e)}),e.addEventListener("keydown",function(n){"Enter"!==n.key&&" "!==n.key||(n.preventDefault(),l(s,t,e))})});let u=!1;t.addEventListener("scroll",function(){u||(u=!0,window.requestAnimationFrame(function(){p(),u=!1}))},{passive:!0}),window.addEventListener("resize",p),p()}document.addEventListener("DOMContentLoaded",function(){n(),document.querySelectorAll("[data-snappy]").forEach(c)})}();

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.