PageSourceSearch

https://storyloop.com/_next/static/chunks/6787-feff49c91531e01c.js

js storyloop.com collected 2026-10-08 07:20:40 UTC 12,688 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6787],{26787:function(e,t,o){o.d(t,{l:function(){return d},t:function(){return c}});var r=o(85893),a=o(9778),s=o(9987),n=o(11163),l=o.n(n),i=o(67294),u=o(9134);let c=(0,i.createContext)({setParentCart:()=>{},updateCartCount:()=>{},parentCart:[],alertMsg:"",subscriber:!1,setSubscriber:()=>{},alertHeading:"",redirectCheckout:!1,showForgotPswrdScreen:!1,collectionAddedSuccess:!1,showReport:!1,categoryChanged:!1,updateCategoryChanged:e=>{},updateSameClicked:e=>{},updateTheStateOfFilterChange:e=>{},viewCart:[],epFilters:{},showSignIn:!1,showPayment:!1,subscriptionInCart:!1,filterChanged:!1,showDownloadPopup:!1,showSingleDownloadPopup:!1,sameClicked:!1,showYoutubePopup:!1,showSignUp:!1,showFilter:!1,showChangePassword:!1,showAddIntoCollection:!1,showSingleProduct:!1,loadingEffect:!1,cart:[],cartCount:0,title:"",slug:"",ID:"",subId:"",showAddCollection:!1,orderId:"",showDeleteCollection:!1,showAlertPopup:!1,downloadOption:[],userSubsStatus:"",productID:null,productName:"",filtersData:[],cartData:{},setFilterData:()=>{},checkedItems:[],name:null,totalCount:0,setTotalCount:()=>{},setOrderId:e=>{},isLoadingFilter:!1,setIsLoadingFilter:()=>{},openDownloadPopup:(e,t,o,r)=>{},paymentData:null,setPaymentMethodData:e=>{},closeDownloadPopup:()=>{},openAddCollection:()=>{},closeAddCollection:()=>{},updateFilters:()=>{},openDeleteCollection:()=>{},goToCheckout:()=>{},closeDeleteCollection:()=>{},openAlertPopup:()=>{},closeAlertPopup:()=>{},showSubscriptionAlert:!1,openAddIntoCollection:()=>{},closeAddIntoCollection:()=>{},openForgotPswdScreen:()=>{},closeForgotPswdScreen:()=>{},removeSubscriptionFromCart:()=>{},openSignIn:()=>{},closeSignIn:()=>{},openSignUp:()=>{},viewReport:()=>{},blockReport:()=>{},closeSignUp:()=>{},openChangePassword:()=>{},closeChangePassword:()=>{},addToCart:e=>{},removeFromCart:e=>{},isProductInCart:e=>!1,setTheProductID:e=>{},setTheProductName:e=>{},saveCartData:e=>{},openFilter:()=>{},closeFilter:()=>{},openSingleProduct:(e,t,o)=>{},closeSingleProduct:()=>{},setChecked:()=>{},openPayment:()=>{},closePayment:()=>{},openYoutubePopup:()=>{},closeYoutubePopup:()=>{},removeFilter:()=>{},setLocalStorageParentCart:()=>{},setviewofCart:()=>{},setSuccessOfCollection:()=>{},setEmptyTheSubscription:e=>{},setUserStatus:e=>{},setTheSubId:e=>{},SetHeadingOfAlertPopup:e=>{},SetMessageOfAlertPopup:e=>{},changeLoadingEffectState:()=>{},categoryProductIds:[],showResendVerification:!1,openResendVerification:()=>{},closeResendVerification:()=>{},pendingSubId:null,setPendingSubId:()=>{},showFailingPopup:!1,setShowFailingPopup:()=>{},hasFailingSubscription:!1,isCheckingSubscription:!1}),d=e=>{let{children:t}=e,[o,d]=(0,i.useState)(!1),[p,S]=(0,i.useState)(!1),[g,h]=(0,i.useState)(!1),[f,m]=(0,i.useState)(!1),[C,w]=(0,i.useState)(!1),[y,P]=(0,i.useState)(!1),[I,b]=(0,i.useState)(null),[v,F]=(0,i.useState)(!1),[A,O]=(0,i.useState)(!1),[D,N]=(0,i.useState)(!1),[E,T]=(0,i.useState)([]),[k,_]=(0,i.useState)(""),[J,R]=(0,i.useState)(!1),[L,U]=(0,i.useState)({cart_items:[],subtotal:0,discounts:null,total:0,fees:[],tax:"0.00"}),[Y,j]=(0,i.useState)(!1),[x,M]=(0,i.useState)(!1),[V,H]=(0,i.useState)([]),[K,Z]=(0,i.useState)(null),[z,B]=(0,i.useState)(),[G,W]=(0,i.useState)([]),[q,Q]=(0,i.useState)(!1),[X,$]=(0,i.useState)({}),[ee,et]=(0,i.useState)(!1),[eo,er]=(0,i.useState)(!1),[ea,es]=(0,i.useState)(!1),[en,el]=(0,i.useState)(!1),[ei,eu]=(0,i.useState)(!1),[ec,ed]=(0,i.useState)(null),[ep,eS]=(0,i.useState)([]),[eg,eh]=(0,i.useState)(null),[ef,em]=(0,i.useState)([]),[eC,ew]=(0,i.useState)(!1),[ey,eP]=(0,i.useState)(0),[eI,eb]=(0,i.useState)(!1),[ev,eF]=(0,i.useState)(!1),[eA,eO]=(0,i.useState)(!1),[eD,eN]=(0,i.useState)([]),[eE,eT]=(0,i.useState)(""),[ek,e_]=(0,i.useState)(""),[eJ,eR]=(0,i.useState)(""),[eL,eU]=(0,i.useState)(0),[eY,ej]=(0,i.useState)(""),[ex,eM]=(0,i.useState)("");(0,n.useRouter)();let[eV,eH]=(0,i.useState)(!1),[eK,eZ]=(0,i.useState)(""),[ez,eB]=(0,i.useState)(""),[eG,eW]=(0,i.useState)(!1),[eq,eQ]=(0,i.useState)(!1),[eX,e$]=(0,i.useState)(!1),[e0,e1]=(0,i.useState)(!1),[e9,e7]=(0,i.useState)("form"),[e8,e2]=(0,i.useState)(""),[e3,e4]=(0,i.useState)(""),[e6,e5]=(0,i.useState)(null),[te,tt]=(0,i.useState)(!1),[to,tr]=(0,i.useState)(!1),[ta,ts]=(0,i.useState)(!1),tn=(0,i.useRef)(!1);(0,s.FK)("monthly"),(0,s.FK)("yearly"),(0,s.FK)("sites");let tl=async()=>{let e=localStorage.getItem("token");if(!e){tr(!1),ts(!1);return}ts(!0);try{let t=await fetch("".concat("https://storyloop.com/wp-json","/").concat("wp/v2","/user/subscriptions/"),{method:"GET",headers:{Authorization:"Bearer ".concat(e),"Content-Type":"application/json"}});if(403===t.status){tr(!1),ts(!1);return}let o=await t.json(),r=!!Array.isArray(o)&&o.some(e=>"Failing"===e.status);tr(r)}catch(e){console.error("Subscription API error:",e),tr(!1)}finally{ts(!1)}};(0,i.useEffect)(()=>{tn.current||(tn.current=!0,tl())},[]),(0,i.useEffect)(()=>{(0,a.Z)()?eH(!0):eH(!1)},[]),(0,i.useEffect)(()=>{let e=localStorage.getItem("parent-cart");if("true"===localStorage.getItem("is_subscribed")&&"Active"===k&&(localStorage.removeItem("cart-id"),localStorage.removeItem("parent-cart")),e)W(JSON.parse(e));else{let e=[];W(e),localStorage.setItem("parent-cart",JSON.stringify(e))}null==z||z.cart_items.map(e=>{if(!G.includes(e.id)){let t=[...G,e.id].filter(e=>e);W(t),localStorage.setItem("parent-cart",JSON.stringify(t))}})},[X]);let ti=()=>{eU(JSON.parse(localStorage.getItem("cart-id")||"[]").length)};(0,i.useEffect)(()=>{},[ev,g]),(0,i.useEffect)(()=>{$(tc()),h(V.some(e=>{let t=(0,s.fE)(e);return"monthly"===t||"yearly"===t||"sites"===t}))},[V,$]),(0,i.useEffect)(()=>{let e=localStorage.getItem("cart-id");e&&(H(JSON.parse(e)),eU(JSON.parse(e).length))},[]);let tu=e=>{let t=null==e?void 0:e.filter(e=>e);localStorage.setItem("cart-id",JSON.stringify(t)),eU(t.length)},tc=()=>{let e=new URLSearchParams(window.location.search),t={},o=["language","season","topic","scripture","style","aesthetic","color","energy","bpm","key","duration","resolution","frame_rate","format","word","producer","artist","audience"];return e.forEach((e,r)=>{r.startsWith("ep_filter_")?t[r.replace("ep_filter_","")]=e.split(","):o.includes(r)&&(t[r]=e.split(","))}),t},td=()=>{et(!1),eh(null),ed(null)},tp=()=>{$(tc())};return(0,i.useEffect)(()=>(tp(),l().events.on("routeChangeComplete",tp),()=>{l().events.off("routeChangeComplete",tp)}),[l()]),(0,r.jsxs)(c.Provider,{value:{categoryChanged:v,updateCategoryChanged:e=>{F(e)},goToCheckout:e=>{O(e)},subId:ex,setTheSubId:e=>{eM(e)},alertMsg:eK,paymentData:I,updateSameClicked:e=>{eQ(!e)},sameClicked:eq,setPaymentMethodData:e=>{b(e)},alertHeading:ez,updateCartCount:ti,SetHeadingOfAlertPopup:e=>{eB(e)},SetMessageOfAlertPopup:e=>{eZ(e)},orderId:eE,redirectCheckout:A,setOrderId:e=>{eT(e)},setLocalStorageParentCart:e=>{let t=null==e?void 0:e.filter(e=>e);localStorage.setItem("parent-cart",JSON.stringify(t))},subscriber:eV,setSubscriber:eH,openForgotPswdScreen:()=>{er(!0)},closeForgotPswdScreen:()=>{er(!1)},showSubscriptionAlert:D,setEmptyTheSubscription:e=>{h(e)},setTheProductName:e=>{Z(e)},showForgotPswrdScreen:eo,setSuccessOfCollection:e=>{m(e)},setParentCart:W,parentCart:G,epFilters:X,collectionAddedSuccess:f,viewCart:z,showReport:eC,cartData:L,setviewofCart:e=>{B(e)},showDownloadPopup:ev,showSingleDownloadPopup:eA,cartCount:eL,subscriptionInCart:g,showAddIntoCollection:x,showAddCollection:ea,showDeleteCollection:en,showAlertPopup:ei,showSignIn:o,userSubsStatus:k,setUserStatus:e=>{_(e)},showSignUp:C,showChangePassword:Y,showFilter:y,filtersData:E,isProductInCart:e=>V.some(t=>t===e),setTheProductID:e=>{ed(e)},setFilterData:e=>{T(e)},openAddCollection:()=>{es(!0)},updateTheStateOfFilterChange:e=>{Q(e)},filterChanged:q,closeAddCollection:()=>{es(!1),td()},openDeleteCollection:()=>{el(!0)},closeDeleteCollection:()=>{el(!1)},openAlertPopup:()=>{eu(!0)},closeAlertPopup:()=>{eu(!1),"/cart"===l().pathname&&(localStorage.removeItem("show_alert_subscription"),N(!1))},openSignIn:()=>{d(!0)},closeSignIn:()=>{td(),d(!1)},openSignUp:()=>{w(!0)},closeSignUp:()=>{td(),w(!1)},openSingleProduct:(e,t,o)=>{ed(e),eh(t),eS(o||[]),et(!0)},closeSingleProduct:td,openChangePassword:()=>{j(!0)},closeChangePassword:()=>{j(!1)},removeSubscriptionFromCart:()=>{h(!1)},openAddIntoCollection:()=>{M(!0)},saveCartData:e=>{U(e)},closeAddIntoCollection:()=>{M(!1)},openDownloadPopup:(e,t,o,r)=>{eN(e),ej(t),e_(o),eR(r),eF(!0),eO(!0)},closeDownloadPopup:()=>{eF(!1),eO(!1)},cart:V,addToCart:e=>{var t;eB("Cart Information");let o=Number(e),r=null!==(t=(0,a.Z)())&&void 0!==t&&t,n=(0,s.fE)(o),l=null==V?void 0:V.find(e=>["monthly","yearly","sites"].includes((0,s.fE)(e)||"")),i=V.includes(o);if(!0===r||"Active"===k){eZ("You are already a subscriber"),eu(!0);return}if(l&&n){if(l===o){eZ("This product is already in your cart."),eu(!0);return}let e=[o];H(e),eU(1),tu(e),"yearly"===n||"sites"===n?(localStorage.setItem("parent-cart",JSON.stringify([o])),W([o])):(localStorage.setItem("parent-cart",JSON.stringify([])),W([])),eZ("Your previous subscription product was replaced."),eu(!0),N(!0),h(!0);return}if(!n&&l){eZ("You have a subscription product in your cart, so you can't add other products."),eu(!0);return}if(i){eZ("This product is already in your cart."),eu(!0);return}if(n){let e=[o];H(e),eU(1),tu(e),"yearly"===n||"sites"===n?(localStorage.setItem("parent-cart",JSON.stringify([o])),W([o])):(localStorage.setItem("parent-cart",JSON.stringify([])),W([])),eZ("Subscription added to cart."),eu(!0),N(!0),h(!0);return}try{let e=[...V,o];H(e),eU(e.length),tu(e),eZ("Product added to cart"),eu(!0),ti()}catch(e){console.error("Error adding product to cart:",e),eZ("There was an issue adding the product to your cart. Please try again."),eu(!0)}},viewReport:()=>{ew(!0)},blockReport:()=>{ew(!1)},removeFromCart:e=>{let t=V.filter(t=>t.ID!==e);H(t),tu(t),ti()},removeFilter:(e,t)=>{let o={...X};if(o[e]){o[e]=o[e].filter(e=>e!==t),0===o[e].length&&delete o[e],$(o);let a=new URLSearchParams(window.location.search),s="ep_filter_".concat(e);
1if(a.has(s)){var r;let e=(null===(r=a.get(s))||void 0===r?void 0:r.split(","))||[];(e=e.filter(e=>e!==t)).length>0?a.set(s,e.join(",")):a.delete(s),l().push({pathname:l().pathname,search:a.toString()},void 0,{shallow:!0})}}},openFilter:()=>{P(!0)},closeFilter:()=>{P(!1)},showSingleProduct:ee,productID:ec,productName:K,checkedItems:ef,setChecked:e=>{em(e)},name:eg,totalCount:ey,setTotalCount:eP,isLoadingFilter:eI,setIsLoadingFilter:eb,showPayment:p,openPayment:()=>{S(!0)},updateFilters:tp,closePayment:()=>{S(!1)},downloadOption:eD,title:eY,slug:ek,ID:eJ,openYoutubePopup:()=>{eW(!0)},closeYoutubePopup:()=>{eW(!1)},showYoutubePopup:eG,changeLoadingEffectState:e=>{e$(e)},loadingEffect:eX,categoryProductIds:ep,showResendVerification:e0,openResendVerification:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"form",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=arguments.length>2?arguments[2]:void 0;e7(e),t&&e2(t),e1(!0),e4(o||"hello")},closeResendVerification:()=>e1(!1),resendVariant:e9,resendPrefillEmail:e8,setResendPrefillEmail:e2,resendMessage:e3,setPendingSubId:e5,setShowFailingPopup:tt,showFailingPopup:te,pendingSubId:e6,hasFailingSubscription:to,isCheckingSubscription:ta},children:[t,(0,r.jsx)(u.Ix,{position:"top-center",theme:"dark"})]})}},9778:function(e,t){t.Z=()=>"true"===localStorage.getItem("access_all")},9987:function(e,t,o){o.d(t,{AH:function(){return c},FK:function(){return l},Pg:function(){return s},fE:function(){return u},iP:function(){return a}});let r=()=>{let e=localStorage.getItem("subscription-products");return e?JSON.parse(e):[]},a=e=>{var t;let o=localStorage.getItem("subscription-products");if(!o)return null;let r=JSON.parse(o),a=null==r?void 0:r.find(t=>t.name.toLowerCase()===e.toLowerCase());return null!==(t=null==a?void 0:a.id)&&void 0!==t?t:null},s={"2 Sites":"2 Sites Subscription","3-4 Sites":"3-4 Sites Subscription","5-9 Sites":"5-9 Sites Subscription","10-19 Sites":"10-19 Sites Subscription"},n=()=>JSON.parse(localStorage.getItem("subscription-products")||"[]"),l=e=>{let t=n(),o=null==t?void 0:t.find(t=>{let o=t.name.toLowerCase();return"monthly"===e?o.includes("month"):"yearly"===e?o.includes("annual")||o.includes("year"):"sites"===e&&o.includes("site")});return o?Number(o.id):null},i=e=>{let t=n();return null==t?void 0:t.find(t=>Number(t.id)===Number(e))},u=e=>{let t=i(e);if(!t)return null;let o=t.name.toLowerCase();return o.includes("month")?"monthly":o.includes("annual")||o.includes("year")?"yearly":o.includes("site")?"sites":"other"},c=()=>r().filter(e=>e.name.toLowerCase().includes("site")).map(e=>e.id)}}]);

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.