1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4136],{54151:function(e,t,n){var o=n(85893),r=n(67294),a=n(26787),s=n(41664),l=n.n(s),i=n(11163),c=n(23121),d=n(9778);let u="https://storyloop.com/wp-json",p="wp/v2";t.Z=e=>{let{message:t}=e,{closeAlertPopup:n,alertHeading:s,subId:h,SetHeadingOfAlertPopup:m,SetMessageOfAlertPopup:f}=(0,r.useContext)(a.t),[v,w]=(0,r.useState)(!1),x=(0,r.useRef)(null),g=(0,i.useRouter)(),j=!1;j=(0,d.Z)(),(0,r.useEffect)(()=>{let e=e=>{x.current&&!x.current.contains(e.target)&&n()};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[n]);let b=async()=>{let e=localStorage.getItem("token");if(!e){g.replace("/");return}w(!0);try{let t=await fetch("".concat(u,"/").concat(p,"/user/subscription/cancel"),{method:"POST",headers:{Authorization:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({subscription_id:h})});if(403===t.status)throw g.replace("/"),Error("Failed to cancel the subscription");await t.json(),t.ok?(m("Subscription Details"),f("Subscription cancelled successfully."),g.reload()):w(!1)}catch(e){console.error("Error:",e)}},y=async()=>{let e=localStorage.getItem("token");if(!e){g.replace("/");return}w(!0);try{let t=await fetch("".concat(u,"/").concat(p,"/user/subscription/restart"),{method:"POST",headers:{Authorization:"Bearer ".concat(e),"Content-Type":"application/json"},body:JSON.stringify({subscription_id:h})});if(403===t.status)throw g.replace("/"),Error("Failed to cancel the subscription");await t.json(),t.ok?(m("Subscription Details"),f("Subscription restarted successfully."),g.reload()):w(!1)}catch(e){console.error("Error:",e)}};return(0,o.jsxs)("div",{className:"info-popup info-active alert-popup-view alert-popup-bg",id:"alert-popup",children:[v&&(0,o.jsx)(c.Z,{}),(0,o.jsx)("div",{className:"info-popup-outer",children:(0,o.jsxs)("div",{className:"info-popup-wrapper",ref:x,children:[(0,o.jsxs)("div",{className:"info-popup-header",children:[(0,o.jsx)("h6",{children:"Information "}),(0,o.jsx)("a",{href:"javascript:void(0)",className:"info-close",onClick:n,children:(0,o.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:[(0,o.jsx)("path",{d:"M15 5L5 15",stroke:"#181818","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"}),(0,o.jsx)("path",{d:"M5 5L15 15",stroke:"#181818","stroke-width":"1.2","stroke-linecap":"round","stroke-linejoin":"round"})]})})]}),(0,o.jsxs)("div",{className:"info-popup-form",children:[(0,o.jsx)("h3",{children:s}),/<\/?[a-z][\s\S]*>/i.test(t)?(0,o.jsx)("p",{dangerouslySetInnerHTML:{__html:t}}):(0,o.jsx)("p",{children:t}),(0,o.jsxs)("div",{className:"closing-button",children:[(0,o.jsx)(l(),{href:"Cart Information"===s&&!1===j?"/cart":"javascript:void(0)",onClick:"Cart Information"===s?()=>{"Cart Information"===s&&!1===j&&g.push("/cart"),n()}:"Cancel Subscription"===s?b:"Restart Subscription"===s?y:n,className:"primary-btn cls-btn ",children:"Cart Information"===s&&!1===j?"View Cart":"Cancel Subscription"===s||"Restart Subscription"===s?"Yes":"Got It"}),("Cancel Subscription"===s||"Restart Subscription"===s)&&(0,o.jsx)("a",{onClick:n,className:"primary-btn cls-btn",children:"No"})]})]})]})})]})}},23121:function(e,t,n){var o=n(85893),r=n(20726),a=n.n(r);n(67294);var s=n(60215);t.Z=()=>(0,o.jsxs)("div",{className:"jsx-d37a1548c0ea1636 loading-overlay",children:[(0,o.jsx)(s.Z,{color:"#ffffff",size:80}),(0,o.jsx)(a(),{id:"d37a1548c0ea1636",children:".loading-overlay.jsx-d37a1548c0ea1636{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.5);display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-moz-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-moz-box-align:center;-ms-flex-align:center;align-items:center;z-index:9999}"})]})},81458:function(e,t,n){n.d(t,{Z:function(){return x}});var o=n(85893),r=n(67294),a=n(26787),s=n(11163),l=n(54847);let i="preferredResolution";function c(e){let t=(e||"").toLowerCase();return/\b4k\b/.test(t)?"4K":/\b(1080|full\s*hd|hd)\b/.test(t)?"HD":/\bpro\s*res|prores\b/.test(t)?"PRORES":/\b(480|sd)\b/.test(t)?"SD":/\bu?960p?\b/.test(t)?"U960":/\bu?720p?\b/.test(t)?"U720":"OTHER"}function d(e){switch(c(e)){case"4K":return 0;case"HD":return 1;case"PRORES":return 2;case"SD":return 3;case"U960":return 4;case"U720":return 5;default:return 999}}function u(e){switch(c(e)){case"4K":return 0;case"HD":return 1;case"SD":return 2;case"U960":return 3;case"U720":return 4;case"PRORES":return 999;default:return 500}}var p=()=>{let{showDownloadPopup:e,closeDownloadPopup:t,downloadOption:n,title:p,openAlertPopup:h,ID:m,SetHeadingOfAlertPopup:f,SetMessageOfAlertPopup:v,changeLoadingEffectState:w,slug:x}=(0,r.useContext)(a.t),[g,j]=(0,r.useState)(""),[b,y]=(0,r.useState)(""),[k,S]=(0,r.useState)([]),[N,C]=(0,r.useState)(!1),[E,R]=(0,r.useState)(""),D=(0,r.useRef)(null),L=(0,s.useRouter)();(0,r.useEffect)(()=>{var e;(null==n?void 0:null===(e=n[0])||void 0===e?void 0:e.assets)&&S(n[0].assets)},[n]),(0,r.useEffect)(()=>{let e=e=>{D.current&&!D.current.contains(e.target)&&t()};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[t]);let O=(0,r.useMemo)(()=>[...k||[]].sort((e,t)=>
1{let n=u(e.name)-u(t.name);return 0!==n?n:(e.name||"").localeCompare(t.name||"")}),[k]);(0,r.useEffect)(()=>{let e;if(!k.length)return;let t=null;try{let e=window.localStorage.getItem(i);("4K"===e||"HD"===e||"PRORES"===e||"SD"===e||"U960"===e||"U720"===e)&&(t=e)}catch(e){}t&&(e=k.find(e=>c(e.name)===t)),e||(e=[...k||[]].sort((e,t)=>{let n=d(e.name)-d(t.name);return 0!==n?n:(e.name||"").localeCompare(t.name||"")})[0]),e&&(j(e.name),y(e.url),R(e.filename))},[k]);let P=(e,t)=>{j(e.target.value),y(t.url),R(t.filename);{let e=c(t.name);if("OTHER"!==e)try{window.localStorage.setItem(i,e)}catch(e){}}},I=async()=>{w(!0),C(!0);let e=null==n?void 0:n[0],o=null==e?void 0:e.slug,r=await (0,l.y)({slug:x,name:p,id:m,filename:E,url:b,detail:g,type:o||"0",typeName:null==e?void 0:e.category});if(f("Alert"),(null==r?void 0:r.success)===!0)try{let e=await fetch(r.url,{method:"HEAD"});if(200===e.status){let e=document.createElement("a");e.href=r.url,e.setAttribute("download",""),document.body.appendChild(e),w(!1),e.click(),document.body.removeChild(e),C(!1),t();return}w(!1),v("We are currently bundling the assets for download, please try again in one hour. In the meantime, you can download single assets from the product page. Simply click on an individual asset and click the download button."),h()}catch(e){console.error("Error while checking the product: ",e),w(!1),v("An error occurred while checking the product. Please try again later."),h()}finally{C(!1)}else w(!1),v("Please select a resolution to download."),h(),C(!1)},F=(e,t)=>e.length>t?e.substring(0,t)+"...":e,T=e=>e.replace(/\b4k\b/gi,"4K");return(0,o.jsx)(o.Fragment,{children:(0,o.jsx)("div",{className:"info-popup ".concat(e?"info-active":""),id:"download-popup",children:(0,o.jsx)("div",{className:"info-popup-outer",children:(0,o.jsx)("div",{className:"info-popup-wrapper",ref:D,children:(0,o.jsxs)("form",{children:[(0,o.jsxs)("div",{className:"info-popup-header",children:[(0,o.jsx)("h6",{children:L.asPath.includes("_download_type=packs")?p:p.toLowerCase().replace(/\b\w/g,e=>e.toUpperCase())}),(0,o.jsx)("a",{href:"javascript:void(0)",className:"info-close",onClick:t,children:(0,o.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:[(0,o.jsx)("path",{d:"M15 5L5 15",stroke:"#181818",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"M5 5L15 15",stroke:"#181818",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})]})})]}),(0,o.jsxs)("div",{className:"info-popup-form",children:[(0,o.jsx)("h3",{children:"Download"}),(0,o.jsx)("div",{className:"form-row",children:(0,o.jsx)("div",{className:"form-column full-column",children:(0,o.jsx)("label",{htmlFor:"collection-name",children:"Select Option"})})}),(0,o.jsx)("div",{children:(0,o.jsx)("div",{className:"form-row",style:{display:"flex",justifyContent:"flex-start",whiteSpace:"nowrap"},children:O.map((e,t)=>(0,o.jsx)("div",{className:"form-column third-column",style:{marginTop:"10px",whiteSpace:"nowrap",justifyContent:"flex-start"},children:(0,o.jsx)("a",{href:null==e?void 0:e.url,children:(0,o.jsxs)("div",{className:"checkbox-btn",style:{overflow:"hidden",textOverflow:"ellipsis"},children:[(0,o.jsx)("input",{type:"radio",name:"resolution",value:e.name,className:"input-checkbox",checked:g===e.name,onChange:t=>P(t,e)}),(0,o.jsx)("label",{htmlFor:e.name,children:F(T(e.name),15)})]})})},t))})}),(0,o.jsx)("div",{className:"info-popup-form-footer",children:(0,o.jsx)("button",{type:"button",className:"primary-btn info-close",onClick:I,disabled:N,children:"Download"})})]})]})})})})})},h=n(54151);let m="preferredResolution";function f(e){let t=(e||"").toLowerCase();return/\b4k\b/.test(t)?"4K":/\b(1080|full\s*hd|hd)\b/.test(t)?"HD":/\bpro\s*res|prores\b/.test(t)?"PRORES":/\b(480|sd)\b/.test(t)?"SD":/\bu?960p?\b/.test(t)?"U960":/\bu?720p?\b/.test(t)?"U720":"OTHER"}function v(e){switch(f(e)){case"4K":return 0;case"HD":return 1;case"PRORES":return 2;case"SD":return 3;case"U960":return 4;case"U720":return 5;default:return 999}}function w(e){switch(f(e)){case"4K":return 0;case"HD":return 1;case"SD":return 2;case"U960":return 3;case"U720":return 4;case"PRORES":return 999;default:return 500}}var x=()=>{let{showDownloadPopup:e,closeDownloadPopup:t,downloadOption:n,title:i,slug:c,ID:d,openAlertPopup:u,showAlertPopup:x,SetHeadingOfAlertPopup:g,SetMessageOfAlertPopup:j,changeLoadingEffectState:b,alertMsg:y}=(0,r.useContext)(a.t),[k,S]=(0,r.useState)("Full Pack"),[N,C]=(0,r.useState)(""),[E,R]=(0,r.useState)(""),[D,L]=(0,r.useState)(""),[O,P]=(0,r.useState)(""),[I,F]=(0,r.useState)([]),[T,U]=(0,r.useState)(!1),[A,H]=(0,r.useState)(!1),[_,z]=(0,r.useState)(""),[B,K]=(0,r.useState)(!1),M=(0,r.useRef)(null),Z=(0,s.useRouter)(),W=null==n?void 0:n.some(e=>{var t;return"Entire Pack"===e.category&&(null===(t=e.assets)||void 0===t?void 0:t.length)>0});(0,r.useEffect)(()=>{let e=e=>{M.current&&!M.current.contains(e.target)&&t()};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[t]);let J=(null==n?void 0:n.slice(1))||[];(0,r.useEffect)(()=>
1{if("Full Pack"===k){var e;F((null==n?void 0:null===(e=n[0])||void 0===e?void 0:e.assets)||[]),L("Entire Pack"),P("all"),U(!0)}else{U(!1);let e=null==n?void 0:n.find(e=>e.category===D);F((null==e?void 0:e.assets)||[])}},[k,D,n]);let G=e=>{var t,o,r,a;let s=e.target.value;S(s),"Full Pack"===s?(U(!0),F((null==n?void 0:null===(t=n[0])||void 0===t?void 0:t.assets)||[])):J.length>0&&(U(!1),L((null===(o=J[0])||void 0===o?void 0:o.category)||""),P((null===(r=J[0])||void 0===r?void 0:r.slug)||""),F((null===(a=J[0])||void 0===a?void 0:a.assets)||[])),C(""),R("")},V=(e,t)=>{L(e),P(t);let o=null==n?void 0:n.find(t=>t.category===e);F((null==o?void 0:o.assets)||[]),H(!1),C(""),R("")},Y=(e,t)=>{C(e.target.value),R(null==t?void 0:t.url),z(null==t?void 0:t.filename);{let e=f(null==t?void 0:t.name);if("OTHER"!==e)try{window.localStorage.setItem(m,e)}catch(e){}}},q=async()=>{b(!0),K(!0),g("Alert");let e=await (0,l.y)({slug:c,name:i,id:d,filename:_,url:E,detail:N,type:O||"0",typeName:D});if((null==e?void 0:e.success)===!0)try{let t=await fetch(null==e?void 0:e.url,{method:"HEAD"});if(200===t.status){let t=document.createElement("a");t.href=null==e?void 0:e.url,t.setAttribute("download",""),document.body.appendChild(t),b(!1),t.click(),document.body.removeChild(t),K(!1)}else b(!1),j("We are currently bundling the assets for download, please try again in one hour. In the meantime, you can download single assets from the product page. Simply click on an individual asset and click the download button."),u(),K(!1)}catch(e){console.error("Error while checking the product: ",e),j("An error occurred while checking the product. Please try again later."),u(),K(!1)}else(null==e?void 0:e.success)!==!0?(b(!1),j("We are currently bundling the assets for download, please try again in one hour. In the meantime, you can download single assets from the product page. Simply click on an individual asset and click the download button.")):(b(!1),j("Please select a resolution to download.")),u(),K(!1)};(0,r.useEffect)(()=>{let e=e=>{e.target.closest(".select")||H(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);let Q=e=>e.replace(/\b\w/g,e=>e.toUpperCase()),X=(e,t)=>e.length>t?e.substring(0,t)+"...":e,$=e=>e.replace(/\b4k\b/gi,"4K"),ee=(0,r.useMemo)(()=>[...I||[]].sort((e,t)=>{let n=w(e.name),o=w(t.name);return n!==o?n-o:(e.name||"").localeCompare(t.name||"")}),[I]);return(0,r.useEffect)(()=>{let e;if(!I.length)return;let t=null;try{let e=window.localStorage.getItem(m);("4K"===e||"HD"===e||"PRORES"===e||"SD"===e||"U960"===e||"U720"===e)&&(t=e)}catch(e){}t&&(e=I.find(e=>f(e.name)===t)),e||(e=[...I||[]].sort((e,t)=>{let n=v(e.name),o=v(t.name);return n!==o?n-o:(e.name||"").localeCompare(t.name||"")})[0]),e&&(C(e.name),z(e.filename),R(e.url))},[I]),(0,o.jsxs)(o.Fragment,{children:[W?(0,o.jsx)("div",{className:"info-popup ".concat(e?"info-active":""),id:"download-popup",children:(0,o.jsx)("div",{className:"info-popup-outer",children:(0,o.jsx)("div",{className:"info-popup-wrapper",ref:M,children:(0,o.jsxs)("form",{children:[(0,o.jsxs)("div",{className:"info-popup-header",children:[(0,o.jsx)("h6",{children:Z.asPath.includes("_download_type=packs")?i:i.toLowerCase().replace(/\b\w/g,e=>e.toUpperCase())}),(0,o.jsx)("a",{href:"javascript:void(0)",className:"info-close",onClick:t,children:(0,o.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",children:[(0,o.jsx)("path",{d:"M15 5L5 15",stroke:"#181818",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"}),(0,o.jsx)("path",{d:"M5 5L15 15",stroke:"#181818",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})]})})]}),(0,o.jsxs)("div",{className:"info-popup-form",children:[(0,o.jsx)("h3",{children:"Download"}),(0,o.jsxs)("div",{className:"form-row",children:[(0,o.jsx)("div",{className:"form-column full-column",children:(0,o.jsx)("label",{htmlFor:"collection-name",children:"Select Option"})}),(0,o.jsx)("div",{className:"form-column",children:(0,o.jsxs)("div",{className:"checkbox-btn",children:[(0,o.jsx)("input",{type:"radio",name:"pack",value:"Full Pack",className:"input-checkbox",checked:"Full Pack"===k,onChange:G}),(0,o.jsx)("label",{htmlFor:"all-pack",children:"Full Pack"})]})}),J.length>0&&(0,o.jsx)("div",{className:"form-column",children:(0,o.jsxs)("div",{className:"checkbox-btn",children:[(0,o.jsx)("input",{type:"radio",name:"pack",value:"Subcategory",className:"input-checkbox",checked:"Subcategory"===k,onChange:G}),(0,o.jsx)("label",{htmlFor:"specific-sub-pack",children:"Subcategory"})]})})]}),T&&(0,o.jsx)("div",{className:"form-row",style:{display:"flex",justifyContent:"flex-start",whiteSpace:"nowrap"},children:ee.map((e,t)=>(0,o.jsx)("div",{className:"form-column third-column",style:{marginTop:"10px",whiteSpace:"nowrap",justifyContent:"flex-start"},children:(0,o.jsx)("a",{href:null==e?void 0:e.url,children:(0,o.jsxs)("div",{className:"checkbox-btn",style:{overflow:"hidden",textOverflow:"ellipsis"},children:[(0,o.jsx)("input",{type:"radio",name:"resolution",value:e.name,className:"input-checkbox",checked:N===e.name,onChange:t=>Y(t,e)}),(0,o.jsx)("label",{htmlFor:e.name,children:X($(e.name),15)})]})})},t))}),"Subcategory"===k&&(0,o.jsxs)("div",{children:[(0,o.jsx)("div",{className:"form-row",id:"subpackselection",children:(0,o.jsxs)("div",{className:"form-column full-column",children:[(0,o.jsx)("label",{htmlFor:"collection name",children:"Sub-Pack"}),(0,o.jsxs)("div",{className:"select ",children:[(0,o.jsx)("div",{className:"selectBtn ".concat(A?"active":""),"data-type":"firstOption",onClick:()=>H(!A),children:D?Q(D):"Select a category"}),A&&(0,o.jsx)("div",{className:"selectDropdown ".concat(A?"toggle":""),children:null==n?void 0:n.slice(1).map((e,t)=>(0,o.jsx)("div",{className:"option","data-type":"",onClick:()=>V(e.category,null==e?void 0:e.slug),children:Q(e.category)},t))})]})]})}),(0,o.jsx)("div",{className:"form-row",style:{display:"flex",justifyContent:"flex-start",whiteSpace:"nowrap"},children:ee.map((e,t)=>(0,o.jsx)("div",{className:"form-column third-column",style:{marginTop:"10px",whiteSpace:"nowrap",justifyContent:"flex-start"},children:(0,o.jsx)("a",{href:null==e?void 0:e.url,children:(0,o.jsxs)("div",{className:"checkbox-btn",style:{overflow:"hidden",textOverflow:"ellipsis"},children:[(0,o.jsx)("input",{type:"radio",name:"resolution",value:e.name,className:"input-checkbox",checked:N===e.name,onChange:t=>Y(t,e)}),(0,o.jsx)("label",{htmlFor:e.name,children:X($(e.name),15)})]})})},t))})]}),(0,o.jsx)("div",{className:"info-popup-form-footer",children:(0,o.jsx)("button",{type:"button",className:"primary-btn info-close",onClick:q,disabled:B,children:"Download"})})]})]})})})}):(0,o.jsx)(p,{}),x&&(0,o.jsx)(h.Z,{message:y})]})}},89942:function(e,t,n){var o=n(67294),r=n(26787);t.Z=()=>{let[e,t]=(0,o.useState)([]),{closeAddIntoCollection:n,setSuccessOfCollection:a,collectionAddedSuccess:s}=(0,o.useContext)(r.t),l="https://storyloop.com/wp-json",i="wp/v2",c=async()=>
1{if(localStorage.getItem("token"))try{let e=localStorage.getItem("token"),n=await fetch("".concat(l,"/").concat(i,"/user/wishlists/"),{method:"GET",headers:{Authorization:"Bearer ".concat(e),"Content-Type":"application/json"}}),o=await n.json();Array.isArray(o)?(localStorage.setItem("wishlist",JSON.stringify(o)),t(o)):console.error("Unexpected response format:",o)}catch(e){console.error("Error fetching wishlist data:",e)}},d=async(e,t,o)=>{let r=localStorage.getItem("token");try{if(p(t))a(!1);else{let s=await fetch("".concat(l,"/").concat(i,"/user/wishlists/").concat(e,"/products?product_id=").concat(t),{method:"POST",headers:{Authorization:"Bearer ".concat(r),"Content-Type":"application/json"}});if(!s.ok)throw Error("Failed to add product into collection");await s.json(),n(),a(!0),a(!1),o();return}}catch(e){console.error("Error:",e)}c()},u=async e=>{let t=localStorage.getItem("wishlist"),n=t?JSON.parse(t):[];if("undefined"==typeof localStorage)return!1;let o=localStorage.getItem("token"),r=null;for(let t of n)for(let n of t.products)if(String(n.id)===String(e)){r=t.id;break}try{if(null===r)return console.error("Collection ID is null. Cannot delete product."),!1;if((await fetch("".concat(l,"/").concat(i,"/user/wishlists/").concat(r,"/products/").concat(e),{method:"DELETE",headers:{Authorization:"Bearer ".concat(o),"Content-Type":"application/json"}})).ok)return c(),!0;throw Error("Failed to delete product.")}catch(e){return console.error("Error deleting product:",e),!1}},p=e=>{let t=localStorage.getItem("wishlist"),n=t?JSON.parse(t):[];if("undefined"==typeof localStorage)return!1;if(localStorage.getItem("token")){for(let t of n)for(let n of t.products)if(String(n.id)===String(e))return!0}return!1};return{wishlist:e,fetchWishlist1:c,isProductInWishlist1:p,handleDeleteProductFromCollection:u,addProductToCollection:d}}},54847:function(e,t,n){n.d(t,{y:function(){return o}});let o=async e=>{let{slug:t,name:n,id:o,filename:r,url:a,detail:s,type:l,typeName:i}=e;try{let e=localStorage.getItem("token");if(!e){console.warn("No token found in local storage");return}let c=await fetch("".concat("https://storyloop.com/wp-json","/").concat("wp/v2","/track-download"),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e)},body:JSON.stringify({slug:t,name:n,id:o,filename:r,url:a,detail:s,type:l,typeName:i})}),d=await c.json();if(!c.ok)return console.error("Download logging failed with status:",c.status),d;if(!0===d.success)return d}catch(e){console.error("Error while logging the download:",e);return}}}}]);
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.